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

 

  1. 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 )
    •  
  2. Click Finish
  1. In the Options dialog go to File Types > Latex FileType > Document structure
  2. 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 structureInline 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!

Write a comment

Comments: 2
  • #1

    rpuschmann (Monday, 23 March 2015 09:36)

    An interesting discussion can be found at Proz.com and maybe further ideas how to handle/improve the filter:
    http://bit.ly/1BngC42

  • #2

    hd wallpaper (Saturday, 16 May 2015 15:18)

    nice post :) very helpfull