3

I want to translate my LaTeX italian sources into english, using e.g. "google translate". I must "extract" italian text, leaving LaTeX keywords and formulas unchanged.

Example:

\section{Introduzione}

\newcommand{\erelmax}{10^{-3}}
\EXE{Calcolare con uno scarto relativo minore o uguale a $\erelmax$
i valori $\xi$ t.c.
\beq
  \sin(\xi) = \cos(\xi) % \label{eq:ln=cos}
\eeq
} % end EXE

Should be converted into:

\section{Introduction}

\newcommand{\erelmax}{10^{-3}}
\EXE{Compute with a relative gap less than or equal to $\erelmax$
the values $\xi$ s.t.
\beq
  \sin(\xi) = \cos(\xi) % \label{eq:ln=cos}
\eeq
} % end EXE

Any hint?

Martin Scharrer
  • 262,582
  • Ciao Flavio! The question might be interesting, but has nothing to do with TeX and LaTeX, I'm afraid. – egreg Jul 22 '11 at 15:31
  • 1
    unless any of the macro names happen to be italian words, google translate should just ignore them, shouldn't it? – Seamus Jul 22 '11 at 15:39
  • Compile it to a PDF and use pdftotext to get it as text version which can be used for translation. You will still have some other things in it I'm afraid. You could ignored these using the comment package or \long\def\beq#1\eeq{} etc. If you however want to extract and then automatically reinsert the translation then you are out of luck I think. – Martin Scharrer Jul 22 '11 at 15:41
  • 2
    @Martin: Wouldn't detex be easier, if the purpose is to extract text? – You Jul 22 '11 at 15:52
  • @You: Oh, I assume so. I didn't remember that one. – Martin Scharrer Jul 22 '11 at 15:57

0 Answers0