Hot answers tagged

27

I think we could get a useful addition, requiring only few work and without a security risk to our site, which is always to consider for online compilers. What we would get: One-click preview Fast testing and solving problems without a local TeX installation Actually working with site's TeX code on mobile devices, such as tablets and phones Additionally, ...


19

I would say that it's up to the owner of the post to decide whether they feel editing the code formatting is okay or not, not a third party. When someone's answer is edited, they are notified and can make the call themselves. Maybe they think of the new code formatting as an improvement and are happy about it; if not they can undo the changes themselves.


17

Reading some feedback on meta.stackexchange.com I got the impression that this community feels quite tense about the upcoming CommonMark migration. I feel that some extra levels of transparency shared right here might make your lives a little easier and help alleviate some of the tension, so let me try to address some of the concerns and give you a more ...


16

I'd be against this really. Apart from any technical issues about setting it up, I post a lot of answers and a lot of those have images but almost never do I post a complete document. For a multipage document I take a conscious decision which page or pages to show, and for a single page I usually crop to the area that I want to highlight in the answer. I ...


13

For users who are curious about how the automated edits look like, and who want to review them for potential issues: visit the profile of the Community user (ID -1), and navigate to 'all actions' → 'revisions', or use this direct link. They'll be recognizable by the edit summary "Commonmark migration": (screenshot taken from Meta.SE pending the actual ...


13

I edited the code. The indentation was positively misleading, as nested functions are always indented further than the function they are nested in. Indeed, the original poster used this convention in most of their code, so clearly the incorrect indentation was in error. I also moved the closing parentheses so that the code was in a more conventional lisp ...


12

According to the help on Markdown, StackExchange has programmed "[comments to] support only bold, italic, code and links; in addition, a few shorthand links [...]". Comments, in general, should be used only or limited interaction between posters and other contributors. As such, providing the same markdown capabilities has (most likely) been decided as not ...


11

R is listed as one of the supported list of languages; available as <!-- language: lang-r -->. In general, new scripting languages won't be implemented by StackExchange directly. However, there is hope... The following is taken verbatim from What is syntax highlighting and how does it work?: How does it work? Stack Exchange does not have its own syntax ...


10

This all has to do with the fact that SE uses markdown in posts and comments (similar to setting some character's catcode to \active), and markdown uses the following set of characters that have special meaning: [, ] Used with links/internal references/tags (, ) Used with links/internal references # Headings ! Images, language syntax formatting and spoilers ...


9

Going from the situation that provoked this, I'd like to point out the dangers of being the third man in. This is a well-known phenomenon from rugby: since a rugby match is essentially a pitched battle, it is often hard for a referee to see when a maul turns into a brawl and they might well miss the start of it and see only the retaliation or the third man ...


9

References: Code block is not properly formatted when placed immediately after a list item Why do code snippets not work after lists? This is because any indented text immediately following a list is seen as part of the list, as Joseph mentions. Hence, if you have * list item some text some more text this is printed as list item some ...


8

co-founder of http://SpanDeX.io here, an online LaTeX platform. We have a similar integration with http://LaTeXTemplates.com (Here's an example of our setup there). If there's interest in this kind of integration with TeX.SE, we'd be more than happy to offer our platform up. We have shell escape enabled within secure LaTeX sandboxes, so all TeX live packages ...


8

Adding a "copy code" button To make copying code blocks easier I use an addon for my browser which adds a little "copy code to clipboard" button at the top left: There are several different addon available for this, the one I'm currently using is available for firefox and chrome from https://github.com/zenorocha/codecopy and not only ...


7

How to use a MWE from a question Simply select the code using your mouse and copy/paste it into your TeX editor to work on. How to put code into your answer Select the code from your TeX editor, copy it, and then paste it into the editor box of the answer. To format it as code, select it all and type Control-K or click on the {} icon above the editor ...


7

You'll have to route your query through SEDE. I think the reason here is the difference between the stored content of the post (what you actually typed) and the baked content (what is visualized through the browser). This difference is needed because of Stack Exchange accepting Markdown as input. This query hopefully provides what you're looking for: ...


7

This is something that has been (feature) requested back in 2011 on Meta.SE: Formatting Keyboard Shortcuts for Comments and is truly something that will have to be implemented network-wide. The only automated suggestion is a web-script that you can install via Tampermonkey or Greasemonkey.


7

In most cases, the specific name of a file doesn't matter, but even if it does, there's no need for a heading outside of the code. If the file name does matter, there usually are several files involved with one main file accessing the other(s) (e.g. a .bib file). In those cases, I'd recommend using a filecontents environment in order to enable user to create ...


6

IMHO, reindenting other people's code is a big no-no, unless the code is a complete mess. (Sometimes I am tempted to add linebreaks in those looooong horizontal scrollboxes, but refrain because, well, see my first sentence.) This particular instance, however, has another angle: the edit added an apropriate language code, which clearly was an improvement. ...


6

I'm a little late to the conversation here, sorry, but I think it's worth pointing out the Common LaTeX Service Interface (CLSI). This is an open source API that I developed with Bobby Soares and it powers the online editors ScribTeX, ShareLaTeX and LaTeXLab (in a slightly different implementation). I've been pushing for a wider adoption of this at every ...


6

Not a bug: a feature :-) The code was marked up not using Markdown (4 space indent) but using <pre> tags. That turns off the automatic syntax highlighting: I've edited and all should be fine now.


5

The linked question has now been fixed (along with ~11,000 similarly corrupted postings) see Community effort in fixing the double backslashes issue For a summary of how this got fixed in the end.


5

I do not know a site solution, but you can try to solve his on your own: For Windows there is PhraseExpress, a text expander for Windows (free for personal use), and I guess there are alternatives for Linux and MacOSX, for Windows I know there are. I use this myself for instance to get typographical quotes like “” and ‘’ (also in German „“ or with ...


5

There are already many online LaTeX compilers when you need them. Introducing our own one would necessarily introduce its own bugs and errors, which only drive the site away from its real purpose.


4

This is fixed now. We had placed an arbitrary limit on the number of links that would be automatically rewritten with their full question titles (40, on meta sites). This limit was apparently too low, so we bumped it up to a much higher (still arbitrary) number. Hopefully you won't run into it again any time soon.


4

I have created another Greasemonkey (Firefox) / Tampermonkey (Chrome) script that use clipboard.js. When you hover a code section (<pre><code>) there is a small </> sign that appears on the top right corner of the script. You click it and voilà ! The code is available on this Gist. How to use it : Install Greasemonkey (Firefox) / ...


4

For firefox there is a nice add-on to add this missing feature https://addons.mozilla.org/en-US/firefox/addon/copy-code/?src=api With this add-on every code block has a little button at the top right which copies the whole block to your clipboard.


3

The Stack Overflow Extras (SOX) script provides this functionality through a very minimal icon in the top-right corner of a code display: I have the script activated via Tampermonkey in Chrome, but it is supported in other browsers as well.


3

The linked question has now been fixed as part of a general fix of several thousand similarly affected posts, see https://tex.meta.stackexchange.com/a/7326


2

I think this feature is a brilliant idea. Somebody who has a new question just needs to drag'n'drop their latex folder onto the question, and it compiles automatically (if it does), provides a stacktrace (however useless), and provides the full output at a finger click. New questions would always have some (at least) partially executable code, not just ...


Only top voted, non community-wiki answers of a minimum length are eligible