For the purposes of reproduction, with the aim of avoiding cluttering the mathematical post with program code, and until the [collapsible code markup](https://meta.stackoverflow.com/q/302078/673852) finally arrives at Math.SE, you always have the option of hiding the code in a Markdown comment. After adding this comment you can also include the link to the Markdown source of your post for easy access. This can be done in several steps: 1. Post the answer without the link 1. Get your post id (the first number after `/a/` in the _share_ link) 1. Put this id into `https://math.stackexchange.com/posts/YOUR_POST_ID/revisions` instead of `YOUR_POST_ID` (appropriately change the domain name if it's not Math.SE) 1. In the page to which the resulting link points, get the address of the _source_, and this is your final link to post. The result will look like the following link to this post's Markdown source: [source is here at the end](https://math.meta.stackexchange.com/revisions/c3387656-19eb-4b53-9945-50f2fb938d5d/view-source). You can even avoid having the post look edited if you manage to do this in the edit grace period. There are limitations: * The code must fit into the character limit though, in addition to the answer body. * Markdown treats `>` as a special character, ending the comment on it and thus leaking the rest of the code into the actual rendered HTML page. The latter limitation can be circumvented by using `base64` as I do in this post, and posting the command to decode the resulting string back into human-readable form. Not sure if this command will work out of the box for Windows users (it can be done using Cygwin or maybe even WSL though), but for Unices this should be trivial. Note that the decoding command should avoid the `>` character (see how I hacked around this using `cp`). <!-- To get the Mathematica notebook test.nb containing the example code, run the following in Bash: base64 -d <<EOF | xzcat | cp /dev/stdin test.nb /Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4A7ZBX9dABQKgCQgdX3M/mu5YrnIWq5/6UFQaY6A7T3d iogg8afY63VpiYq/aptmWxxKxASbEdJl0onBr8G4n4G3AYAt21TcmDxhzxd4MFW9kz8fawJyxRKI I51au2z12VIpLe4WFiu3l/uKLaj08K9BkK0uDvmOSCRMBpUgMq4AhU6qXQP6zp5t9aaVvJJIPESK avYvwE6GNMmHvoTQSSSST2bwNynQuzJN8o+BioxZTVZtWazLitCTEyiTqg5ivkK81kXghk6gtbzM w3zXgzf6VgN9k5di2qyaE7pJsKf7fGH7RHs5KsNEzOfR4Tep+5Bubd5+Xk+S9ECbbgGC4sAi8bV0 +CvzWEy7rSUBLk7xDg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