Ihor Radchenko writes: > I haven't seen any publication rule that prevents using valid LaTeX > commands like this. Do you have concrete examples? If not, one could > argue that any auto-generated output could break some imaginary rule.
No, I don't have any concrete example. But it is one thing to use a valid LaTeX command and another to use it unnecessarily. It's like putting \vspace{0pt} between each paragraph. > I am also wondering how LaTeX documents generated from LyX or TeXmacs > look like. Are they not using some obvious machine-generated constructs? I don't know, because I haven't seen them. But I'd bet (at the risk of losing the bet) that none of those machine-generated constructs produce anything as unnecessary as Org's present solution. The situation now becomes the following: Pandoc: selective solution. In specific cases it returns {[}...{]} Org: non-selective solution = ugly LaTeX code. >> Anyway. As for the compilation, it is highly unlikely that \empty will >> cause any unexpected error. But LaTeX and its over 6000 packages is >> unpredictable. It also seemed unlikely that \relax would cause any >> problems, and catching up on the last discussion, it had to be replaced >> by \empty because it returned an error just before \hline. \relax is one >> of the recommended solutions from LaTeX, because it tells LaTeX that the >> previous macro has finished expanding, but it is recommended keeping in >> mind that the user will apply it only when needed, not everywhere. And >> before \hline it doesn't make sense because there will never be an >> '\\[...]' error. So, in the current situation, we can ask ourselves: is >> \empty everywhere safe? Everything points to yes. Can we be 100% sure? >> ...? > > My answer is: "\\" is 100% not universally safe. Simply because we have > that bug report with [ ... ] items in tables. > So, anything with no concrete counter-example is better as long as we > are reasonably sure that we are not breaking LaTeX conventions. As I said, this is a known LaTeX problem that occurs in a rare case, for which there is a known solution (or several), which should be applied in the specific case. And Org already provides the necessary tools to apply it. >> The only thing I can think of, for a non-selective solution like the >> current one, is the following: if \\ has an optional argument that must >> be a length, then let's give it, but with a value of zero: \\[0pt], which >> is equivalent to putting the value by default (zero) explicitly. > > This has been proposed and then rejected by Max in > https://list.orgmode.org/orgmode/ti5tdb$rd2$1...@ciao.gmane.io/ and he > concluded that some side effects are present when using \\[0pt]: > > Max> \\[0pt] > Max> > Max> causes insertion of some code for negative vertical skip (of zero height > Max> this case). It should not be really harmful, but I would avoid this I would like to see some concrete example where this solution was problematic. \\[0pt] is exactly the same as \\ (as for the effects). Redundant but valid.