LaTeX - removal of line breaks in 'target'
Autor de la hebra: joachimnielandt
joachimnielandt
joachimnielandt
Bélgica
Local time: 11:50
Sep 1, 2021

Hello all,

I am testing out OmegaT on my latex project. Seems to work well, but the only problem so far is that the .tex files in my target folder seem to be reformatted. The original line breaks are not respected, and I cannot find a setting that changes this behaviour.

As an example, my source file would contain this:


% allow compilation of images on their own
\\usepackage{standalone}

\\usepackage{lingmacros}
\\usepacka
... See more
Hello all,

I am testing out OmegaT on my latex project. Seems to work well, but the only problem so far is that the .tex files in my target folder seem to be reformatted. The original line breaks are not respected, and I cannot find a setting that changes this behaviour.

As an example, my source file would contain this:


% allow compilation of images on their own
\\usepackage{standalone}

\\usepackage{lingmacros}
\\usepackage{tree-dvips}
\\usepackage{graphicx}
\\graphicspath{ {./img/} } % default image path, no need to specify /img everytime
\\usepackage[dutch]{babel}
\\usepackage{array}
\\usepackage{subcaption}


The related target file would contain this:


% allow compilation of images on their own
\\usepackage{standalone}

\\usepackage{lingmacros} \\usepackage{tree-dvips} \\usepackage{graphicx} \\graphicspath{ {./img/} } \\usepackage[dutch]{babel} \\usepackage{array} \\usepackage{subcaption} \\usepackage{caption} \\usepackage{svg} \\usepackage{tcolorbox} \\usepackage{amssymb} \\usepackage{fontspec} \\usepackage{hyperref} \\usepackage{makecell} \\usepackage{multirow} \\usepackage{fontawesome} \\usepackage{listings,lstautogobble} \\usepackage{tabularx}


Both source and target files have CRLF line endings. When there's double line breaks in the file it seems they are respected, it's only when there's a single one that everything's put into a single line. Eventually, this results in a project that cannot compile, as latex is notoriously picky about newlines and 'empty' space. Can anyone guide me towards a solution?

Thanks!

[Edited at 2021-09-01 11:29 GMT]

[Edited at 2021-09-01 11:30 GMT]
Collapse


 
Erik Freitag
Erik Freitag  Identity Verified
Alemania
Local time: 11:50
Miembro 2006
neerlandés al alemán
+ ...
Workaround Sep 2, 2021

Dear Joachim,

I'm afraid I can't contribute anything substantial, just a workaround:

In my experience, Trados Studio handles LaTeX files without any problems. If you have access to Studio, you could prepare an XLIFF file and then translate this in OmegaT.

Kind regards
Erik


 


Este foro no tiene moderador específicamente asignado.
Para denunciar violaciones a las reglas del sitio u obtener ayuda, póngase en contacto con el personal del sitio »


LaTeX - removal of line breaks in 'target'






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »