I recently found TeXmacs, and I find it excellent for quick note taking (for me, typing LaTeX is much too slow and messy for that). One of the reasons why I'm hoping TeXmacs will be useful for this is that it seems to have pretty decent LaTeX export. But it's not perfect. This question is about how to clean up the LaTeX exported by TeXmacs to make it suitable for sending to collaborators and submitting to journals.
There are really two main difficulties I found:
In math mode, instead of
$f(x)$
, TeXmacs loves to produce$f ( x)$
. This example is trivial, but with complex formulae all those extra spaces around the first bracket make things unreadable enough that I can't send the document like this to collaborators. Take for example something like\frac{d^2}{d x^2} \ln f ( x) = \frac{f'' ( x)}{f ( x)} - \frac{f' ( x)^2}{f ( x)^2}
Instead of the usual
\textbf
,\emph
, etc., TeXmacs produces\tmtextbf
,\tmtexit
, etc. with definitions such as\newcommand{\tmtextbf}[1]{{\bfseries{#1}}}
. This can be good, as it's customizable, but in a simple document that doesn't use much more formatting than this it'd be better to have just the standard\textbf
, etc. Is there a way to easily expand these?Where I'd write
i.e.\ something
in LaTeX, I get{\tmabbr{i.e.}} something
. Again, is there an easy way to fix this?
Does anyone here use TeXmacs to produce LaTeX? If yes, do you post-process the output? How?
Is it possible to (easily) configure TeXmacs to produce LaTeX that's more suitable for my needs? Or are there tools for post processing TeXmacs output?