1

I had some problems with hyphenating German cities/towns, so I added to the preamble:

\usepackage[german]{babel}

hoping to fix it. It seems to work pretty good, but now I have 'teil' (part) above the \part name. How do I remove this?

  • 6
    It only makes sense to add \usepackage[german]{babel} to your document if your whole document is in German. (Note that for post-1996 orthography rules you want ngerman, german is alte Rechtschreibung.) If you only want to hyphenate some city names, an approach with \- or \hyphenation (https://tex.stackexchange.com/q/121832/35864) might be appropriate. If you want to use babel for German words and your main text is not in German, load it as \usepackage[ngerman, <main language>]{babel} and use \foreignlanguage{ngerman}{Hamburg}. – moewe Mar 21 '20 at 06:17
  • 2
    Which document class do you employ? – Mico Mar 21 '20 at 08:06
  • ok, thank you, that's helpful. I think I'm going about it incorrectly. I just have a bunch of words in French, German, and Italian and want them hyphenated so they are not running outside the margins. Most of them are places or names. – R. B. Jawad Mar 21 '20 at 13:29

1 Answers1

3

Assuming that you (a) wish to apply babel's german (better: ngerman!) language option to the entire document, (b) wish to remove the Teil prefix from the Roman-numeral part number on the part-only page, and (c) use either one of the standard LaTeX document classes -- article, report, and book -- or a document class that's derived from one of the standard classes, I suggest you insert the following code in the preamble of your document:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@part}{\partname\nobreakspace\thepart}{\thepart}{}{}
\makeatother

This not only removes \partname (which evaluates to Teil) but also the subsequent nonbreaking space that gets inserted by default.

Please advise if you do not use one of the standard document classes.

Mico
  • 506,678