Translate Latex documents in Studio? Sure!

This came up lately as a request and I thought why not to share with everyone else who needs to translate Latex (*.tex) documents.

  1. Click File > Options > File Types > New...
  2. Select Regular Expression Delimited Text and press OK
  3. Fill in the necessary information for the fields:
    • File type name: (e.g. Latex FileType )
    • File type identifier: (e.g. Latex Document )
    • Name of individual document: (e.g. Latex )
    • Name of individual category: (e.g. Latex )
    • File dialog wildcard expression: (e.g. *.tex )
  4. Click Finish
  5. In the Options dialog go to File Types > Latex FileType > Document structure
  1. Add the following patterns:

Opening pattern

Closing pattern

Multiline

True = tick the box

False = do not tick the box

\\input{\.\./Vorlage/Sprache/

}

True

\\moduletitle{

}

True

\\moduledescription{

}

True

\\modulenotes{

}

True

\\view{

[.!?:]\s?}$

True

\\conditions{

}

True

\\action{

[.!?:]\s?\n?}$

True

\\steptext{

}$

True

\\newstep{

}

True

\\note

$

True

\\medskip

}?[.!?:]$

True

\\question{

}

True

\\answers\s?{

}

True

\\newcommand{\\[a-zA-Z]{0,}}{

}

True

  1. Go to File Types > Latex FileType > Inline tags
  2. Click Add rule
  3. Select from the drop down list Placeholder
    and in enter the following as Opening rule:

    \\textbf\{

  1. Click OK to confirm the inline rule and click again on Add rule
  2. Select from the drop down list Placeholder and enter the following as Opening rule:
    \}

  3. Press OK and go to File Types > Latex FileType > Common
  1. Apply the following options:

Note: These options are not mandatory and you can set here individual settings. The following option selected are based on cases where it commonly works best.

Line breaks: Remove Line Breaks

Notifications: Untick the box

Unicode UTF-8 byte order mark (BOM): Preserve; don´t add if not originally present

Please note:

This is an example and due to several other possible commands that the Latex file type might be including you need to adjust Document structure, Inline tags rules and the Common settings.

...besides that...

^^ That's it! ^^

(Just open your document now)

Feel free to share if you think it helps others too!

 
  • Thank you for this, Richard. I am going to test it out. I just had one thing that wouldn't work in the setup. Trados 2021 would not accept these three opening patterns:

    \\newstep{       }      True   

    \\note    $     True

    \\newcommand{\\[a-zA-Z]{0,}}{      }     True

    "This regular expression is incorrect. Line break characters are not supported in opening pattern."

    Is this going to be a problem? 

    All the best!

    Kevin