What are ways to preview the output of snippets and "minimal working examples" in a question or answer posted on tex.stackexchange?

I was asked to use pastebin, which requires a login. I guess, a static image is created and then inserted with imgur.

What about sharing a link to online latex compilers, like overleaf (which nowadays needs login, too).

Any recommendation or guidelines?

| |
  • 1
    I assume you can get a PDF file, and that Imgur does not accept PDF, You can use Gimp (for example) to convert the PDF to PNG. – John Kormylo May 8 at 13:43
  • 2
    pastebin does not need a login: pastebin.com/kNDYq8dm But it should only be necessary to use pastebin in case your code example somehow exceeds the character limit (which should not happen all that often, given that people are encouraged to post minimal working examples). It is my understanding that pastebin can barely help with preview of the output. Overleaf and other online editors are OK-ish if they are used in addition to the full code that is available in the answer. ... – moewe May 8 at 15:16
  • 1
    ... Nowadays I just open the PDF, select the relevant region (with Ctrl+Mouse drag in SumatraPDF), hit Ctrl+C to copy and then Ctrl+V in the answer editor: The png of the region is automatically uploaded. – moewe May 8 at 15:17
  • Firefox has a very nice "Take a Screenshot" feature on right mouse click. – Friedrich May 8 at 16:24
  • 3
    Overleaf links are strongly discouraged: Adding an Overleaf link as well/instead of MWE – Alan Munn May 8 at 16:25

Browse other questions tagged .