An argument in favor of \\[0pt] escaping. Unlike \empty, [0pt] is rather
artificial, so such pattern may be removed (I hope in a safe way) by an
export filter if it is not followed by a bracket or a star.
On 20/10/2022 12:07, Ihor Radchenko wrote:
When transcoding children (e.g. table rows), the sibling rows can always
be accessed using org-export-get-previous-element and
org-export-get-next-element.
Decision if escaping is necessary should be based on export result, not
on the source element.
Max Nikulin writes:
As another approach text properties may be used as a communication
channel unless they are stripped by ox.
I am not sure what you are referring to. If modifying exported string,
it will suffer from the same problems as your idea with comment.
It is a brain storm idea, I still unsure it is feasible.
I mean info "(elisp) Text Properties". I do not think they are usually
ignored by filters. \\ substrings added by ox-latex may have some unique
property. Export filter searches for occurrences of \\ to check if
escaping is necessary, but it ignores particular location if the text
does not have the specific property. I would prefer to mark output of
export snippets with another property value and do not escape them. It
is a kind of out of band communication. Unsure if text properties may be
lost due to string operations in an exporter or vice versa to propagate
to the source buffer.