Today I installed writer2latex for a friend who is relatively new to LaTeX and prepared some of his work using LibreOffice, but with the conversion to LaTeX in mind has used things such as \footcite in the OpenDocument file. When we now converted the odt to latex, every backslash was translated into \textbackslash and the curly braces were also altered. Is there any way to prevent writer2latex from doing this, for example via string-replace?
A simple try to do this with
<string-replace input="\" latex-code="\" />
did very strange things such as adding null before every \.
Is there actually any way? Thank you for all help in advance!
barahir1983
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A better way to handle embedded LaTeX code is this: Create a new text style called e.g. LaTeX, containing for example a bold typewriter font. Map this style as follows:
Today I installed writer2latex for a friend who is relatively new to LaTeX and prepared some of his work using LibreOffice, but with the conversion to LaTeX in mind has used things such as \footcite in the OpenDocument file. When we now converted the odt to latex, every backslash was translated into \textbackslash and the curly braces were also altered. Is there any way to prevent writer2latex from doing this, for example via string-replace?
A simple try to do this with
did very strange things such as adding null before every \.
Is there actually any way? Thank you for all help in advance!
barahir1983
forgot to add the specifics: we installed writer2latex 1.2 on a Windows 7 x64 machine and use LibreOffice 3.5.1.
Hi
Thanks for your feedback. It turns out that there is a bug in Writer2LaTeX 1.2 beta; this will be fixed in the final release.
Meanwhile, add fontenc="any" to the rule:
This should fix the problem.
A better way to handle embedded LaTeX code is this: Create a new text style called e.g. LaTeX, containing for example a bold typewriter font. Map this style as follows:
All text marked up with the text style will then be exported as verbatim LaTeX code.
Best regards
Henrik
Thank you very much, I will try both of these solutions.
Best regards
David