Max Nikulin <maniku...@gmail.com> writes: > I have noticed another case when "latex" in "#+begin_latex" is > rendered as subscript in a Worg article. Do you expect massive > regressions if subscript without explicit curly braces are suppressed?
Not massive, but there will be some., e.g.: #+begin_example org-contrib/babel/examples/drift.org: be the proportion of red individuals. So X_1 is 6 and p_1 is 0.6. To org-contrib/babel/examples/drift.org: individual. So X_2 is a /binomial/ random variable, with 10 trials and org-hacks.org:hydrometer correction, abv calculation, priming sugar for a given CO_2 #+end_example Since we know about these instances, they should be updated (or a file local option be added) if we change the default behavior. There will be other regressions that are harder to find. (Here I just used: ~git grep -I -P "[a-zA-Z]_[0-9]\b" | grep "org:"~) > See the attached patch. Certainly it should be typed as > =#+begin_latex=, cases when authors forget verbatim or code markers > are not rare. Both true. > [2. text/x-patch; > 0001-publish.sh-Suppress-subscripts-without-braces.patch]... > > (setq org-confirm-babel-evaluate nil > [...] > + org-export-with-sub-superscripts '{} > [...] Thanks for the patch. It would probably fix more sub-/superscript problems than it would cause, including also stuff like: #+begin_example exporters/freemind.org:out release_7.9.4/ exporters/xoxo.org:out release_7.9.4/ #+end_example So the objection I have is not about regressions, but about which writing norm to require. I don't think there's a strong reason why people should have to write =CO_{2}= instead of =CO_2=. And there's no good reason for writing "release_7.9.4" in the above examples. However, there /is/ a good reason for the convention that one should use verbatim markers when quoting keywords like =#+begin_src=. Failure to do should be fixed, and export with subscripts is a useful tripwire that should ideally help us to catch it. (Clearly it doesn't always, but it's more noticeable than the fact that text is not monospaced.) That's my two cents in favor of the status quo. WDYT? Note that some pages that use subscripts already implement =^:{}= locally in OPTIONS, e.g. org-contrib/babel/examples/data-collection-analysis.org, and I think we can leave authors to do this on a case by case basis. Whether or not we change the default, it might be a good idea to note it in worg-editing.org. Yours, Christian