# LaTex + SDL Trados 2011 - how to?

LaTex + SDL Trados 2011 - how to?

Vitals
Lithuania
Local time: 13:32
Member (2008)
English to Lithuanian
+ ...
 Mar 20, 2015

Dear all,

I was offered a LaTex format files to be translated in SDL Trados 2011.

How do I configure Trados for LaTex tags, etc.?

Does any of you have experience in that and can provide instructions?

Would be very grateful for your help!

Sincerely,
Vitaly

Erik Freitag
Germany
Local time: 12:32
Member (2006)
Dutch to German
+ ...
 No easy answer Mar 20, 2015

Dear Vitaly,

I do sometimes get LaTeX files to translate. It looks that there still is no filter available, and it seems that the task of creating one will be worth your while only if you get a whole lot of these files to translate.

Others have invested quite some time before ultimately failing (look here: http://www.proz.com/forum/sdl_trados_support/238618-regular_expression_delimited_text_filter_for_latex.html)

You may want to search for a product called "Tortoise Tagger" - I have no personal experience with it, though.

My solution ultimately is to translate LaTeX files as plain text and just leave the tags untouched. No problem if you know what you're doing.

Sorry that I can't be of any real help. If you get a working filter, please let me know - it's quite some time ago that I looked into this.

Kind regards,
Erik

SDL Community
United Kingdom
Local time: 12:32
English
 There is an article here... Mar 20, 2015

... by Richard Puschmann that might be useful: http://rpuschmann.jimdo.com/2015/03/20/translate-latex-documents-in-studio-sure/

Regards

Paul
SDL Community Support

Erik Freitag
Germany
Local time: 12:32
Member (2006)
Dutch to German
+ ...
 Too easy? Mar 20, 2015

Dear Paul,

Thanks for the link - looks promising, but it looks like you'd have to repeat steps 8ff. for any LaTeX command (of which there is a large number if you take the standard commands, and an infinite number if you want to include user defined commands or packages, which is quite a standard procedure in LaTex)?

Regards,
Erik

Local time: 18:32
English to Indonesian
+ ...
 Theoretical workflow Mar 22, 2015

I think the following could work:

- Open the Tex file in an editor that can handle it, and can
- Print the resulting text as PDF (requires plug-in). That PDF file would contain the visible text (that needs to be translated) plus images, formulas, and things, but no code
- Extract the text from the PDF, save as plain TXT, delete any (references to) images/formulas
- Translate in your favourite CAT tool, and save the translation as a TMX file (or other suitable memory format)
- Start a new project with the original .json file as plain text file*
- Run "Insert perfect matches from memory"**
- Populate empty source segments**
- Export.

* You may want to add " as a segment delimiter.
**I take it the CAT tool offers those features, don't know about Trados.

Cheers,

Hans

[Edited at 2015-03-22 11:37 GMT]

[Edited at 2015-03-22 12:33 GMT]

Local time: 18:32
English to Indonesian
+ ...
 Nice try... Mar 22, 2015

... but the procedure above can - and therefore will - go wrong if there's any extra formatting within a segment.

An example from the Wiki:

Since I don't have the plug-in yet (still downloading the el-cheapo way, at night only), I can't produce the PDF yet, but it's there one the very same Wiki page. Because of formatting, simply extracting the text from the PDF is going to produce misery. If there's formatting within a sentence/segment, like LaTeX and TeX above, the text will have to be copied piece-by-piece, copying things like LaTeX and TeX as a separate segment.

H

[Edited at 2015-03-22 12:56 GMT]

SDL Community
United Kingdom
Local time: 12:32
English
 You're right... Mar 23, 2015

Erik Freitag wrote:

Thanks for the link - looks promising, but it looks like you'd have to repeat steps 8ff. for any LaTeX command (of which there is a large number if you take the standard commands, and an infinite number if you want to include user defined commands or packages, which is quite a standard procedure in LaTex)?

... it is tricky because of the number of commands and particularly the user defined stuff. I couldn't see an obvious place where all this information is available in an easily digestible format but for the specific files I have seen from Vitaly (he emailed me off forum) I resolved it like this... for interest.

I extracted all new lines that started without any code as these seemed to be translatable text in these files and I added the specific lines starting with code that also seemed to have translatable text. So this gives me an import of all the stuff that should be handled plus any inline tags. I did this with a single expression that can be expanded as necessary in the document structure section of the regex filetype:

Opening Pattern
^(?!\w|\\chapter|\\item).*|^

Closing Pattern
$So here you can see I added \chapter and \item as these also seemed to contain translatable text. Then I used the inline tags to protect code in the extracted lines. I needed three placeholde rules for these files: \\chapter{ }$
\\item

This does a neat job on the three files I saw. But you're right that this won't do them all. I also think that even if we created a filetype to handle all the specified tags (whatever they are?) then you would still need the flexibility to add your own custom tags as well. So tricky as you noted.

But perhaps this approach would allow you to handle most of what you could identify on a scan through the files and then you could always handle any exceptions in exactly the same way you do now, but making sure you added them to your filetype so that over time your filetype became more and more capable, encompassing more variations.

The best solution of course would be to see a thorough specification and then create a proper filetype for these files. Interesting problem though.

Regards

Paul
SDL Community Support

SDL Community
United Kingdom
Local time: 12:32
English
 Actually on reflection... Mar 23, 2015

... the inline tags could be better handled like tnis I think and then you "might" get away with only having to edit the document structure line by adding any new elements that contain translatable text:

\\\w+
}${ All good fun and depends on what the names of these elements look like! Regards Paul SDL Community Support Dan Lucas United Kingdom Local time: 11:32 Member (2014) Japanese to English  I recommend the simple approach Mar 23, 2015 SDL Community wrote: All good fun and depends on what the names of these elements look like! I was mildly obsessed with TeX/LaTeX back in the late 1980s as there wasn't much else out there that would do "real" typesetting back then. I still have the TeX and Metafont books hanging around. Brings it all flooding back! It is an elegant and fascinating system and still widely used in academia. Having said that, I'd be inclined to suck it all into Studio and just translate the text by overwriting it, as suggested by someone earlier. Once I would have seen this as a challenge, now I just think "Life is too short". Regards Dan Vitals Lithuania Local time: 13:32 Member (2008) English to Lithuanian + ... TOPIC STARTER  Some help is still needed... Mar 27, 2015 SDL Community wrote: ... the inline tags could be better handled like tnis I think and then you "might" get away with only having to edit the document structure line by adding any new elements that contain translatable text: \\\w+ }$
{

All good fun and depends on what the names of these elements look like!

Regards

Paul
SDL Community Support

Dear all,

Paul has been extremely helpful in my problem.

I am still struggling with a few files, and did not quite understand this recent post. Paul is away on a leave, so he is unavailable.

Can anyone explain how I can implement this:

\\\w+
}${ Thank you in advance. Vitaly SDL Community United Kingdom Local time: 12:32 English  I sent you... Mar 27, 2015 ... an updated settings file. These last three files you sent me start to make it trickier but I think I got it. used these: Opening Structure ^(?!\w|\\chapter|\\item|\s*\\caption|\s*\w).*|^ Closing Structure$

Inline tags
\\\w+
}
{
(This one I also added an "Exclude" in the advanced settings to break the text)
\\\\

Hope this does it for all your files now.

Regards

Paul
SDL Community Support

To report site rules violations or get help, contact a site moderator:

You can also contact site staff by submitting a support request »

### LaTex + SDL Trados 2011 - how to?

 Translation news related to SDL Trados

TM-Town

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

WordFinder Unlimited
For clarity and excellence

WordFinder is the leading dictionary service that gives you the words you want anywhere, anytime. Access 260+ dictionaries from the world's leading dictionary publishers in virtually any device. Find the right word anywhere, anytime - online or offline.

P.O. Box 903
Syracuse, NY 13201
USA
+1-315-463-7323
ProZ.com Argentina
Calle 14 nro. 622 1/2 entre 44 y 45
La Plata (B1900AND), Buenos Aires
Argentina
+54-221-425-1266
ProZ.com Ukraine
6 Karazina St.
Kharkiv, 61002
Ukraine
+380 57 7281624