TransWikia.com

Compile only specific part of document (depending on main language)

TeX - LaTeX Asked on July 23, 2021

Is there a possibility to have LaTeX only compile a specific part of my document depending on the main language set with babel?

I know there can selections be made with if statements, but I don’t know how to include the babel languages.

MWE:

documentclass{scrreprt}
usepackage[utf8]{inputenc}
usepackage[british, ngerman] {babel}

title{Testdokument} 

begin{document}

maketitle

chapter{Test}

selectlanguage{ngerman} 

Dies ist ein Test in Deutsch % print only if ngerman is the main language

selectlanguage{british}

This is a test in british English % print only if british is the main language

end{document}

In addition, can the PDF document be saved under a different name (e.g. document_ngerman.pdf) if ngerman is the main language (or a different name selected by myself?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP