Dear AucTeX-developers,

I want to translate a German mathematics script into English, and I want
to do this in a way which allows me to easily keep both versions
synchronized in the future.

I have come up with the following approach where I only have to
introduce a comment sign before \germantrue for obtaining the English
version:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\newif\ifgerman\germanfalse\germantrue

\ifgerman
\usepackage[ngerman]{babel}
\fi

\newcommand{\de}[2]{{\ifgerman{#1}\else{#2}\fi}}

\begin{document}
\section{\de{Einf"uhrung}{Introduction}}

\de{Wir untersuchen die Gleichung}{We study the equation}
\begin{displaymath}
  y = \sin(x) x \,,
\end{displaymath}

\ldots\de{und zeigen, dass sie f"ur \emph{beliebige} $y$ unendlich viele
  L"osungen hat}{and demonstrate that it has for \emph{arbitrary} $y$
  infinitely many solutions}.
\end{document}
--8<---------------cut here---------------end--------------->8---

The disadvantage is that this LaTeX source text is not that easily
readable any more.  Therefore, my question wrt AucTeX is if it is
(easily) possible to introduce a markup for the \de-Macro which makes
one of the language branches transparent (or maybe even cuts it out
completely).[*]

Another question is, if you have already encountered similar tasks and
could suggest even better ways of handling such branching.

Thank you,

Nicolas

[*] I have taken a look at the AucTeX sources and probably could program
    something myself.  But I think that even a sketch by some AucTeX
    expert of how to proceed best would save me a lot of time and lead
    to better results.

_______________________________________________
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to