auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Markup for branches


From: Nicolas Neuss
Subject: [AUCTeX-devel] Markup for branches
Date: Wed, 11 Sep 2013 13:21:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]