I have the following table, where the IP addresses are supposed to be hyphenated after every ":". They can't have dashes though. Why does "" not split the word like it shoud with the babel package? In this minimal working example i included all packages i used in the original.


% Pakete einbinden
\usepackage[english]{babel} % Englische Silbentrennung und Typografie 
\usepackage[T1]{fontenc} % Vektorschriften benutzen
\usepackage[utf8x]{inputenc} % Ermöglicht UTF-Sonderzeichen als Input 
\usepackage[colorlinks=false, pdfborder=0]{hyperref} % Hyperlinks
\usepackage{ifthen} % Ermöglicht if-Anweisungen in Latex
\usepackage{colortbl} % Farbige Tabellen
\usepackage{ragged2e} % Für Tabellen
\usepackage{pdflscape} % Ermöglicht es bestimmte Seiten im Querformat anzuzeigen
\usepackage{eurosym} % Für das Eurozeichen
\usepackage{textcomp} % Für ordentliche Darstellung von Sonderzeichen
\usepackage{lmodern} % Ein hübscherer Font
\usepackage{courier} % Ein hübscherer Font für die Result-Zeilen in der Detailbeschreibung der Schwachstellen

\begin{longtable}[l]{p{.12\textwidth} p{.20\textwidth} p{.23\textwidth} p{.30\textwidth}}
\multicolumn{4}{>{\columncolor{blue}}l}{Part 2. Component Compliance Summary}\\

IP Address: & & \cellcolor{red}FAIL & \\

IP Address: &  1234:""1234:""1234:""1234:"":""3b:""1 & \cellcolor{green}PASS & \\

IP Address: &  1234:\-1234:\-1234:\-1234:\-:\-1234:\-2 & \cellcolor{green}PASS & \\

IP Address: &  1234:\-1234:\-1234:\-1234:\-:\-5647:\-3 & \cellcolor{green}PASS & \\

IP Address: &  1234:\-1234:\-1234:\-1234:\-:\-5647:\-ce:\-25 & \cellcolor{green}PASS & \\

enter image description here

  • 1
    "" is a shorthand available in German babel but not in English, so it won't work in this document. I'd probably use hyperref's \nolinkurl for the job. (Note that hyperref should be loaded last.) I would also try to avoid \usepackage[utf8x]{inputenc}, usually \usepackage[utf8]{inputenc} should be enough (in April 2018 \usepackage[utf8]{inputenc} became the default, so if you use a current LaTeX version, you won't need the line at all.) KOMA classes like scrartcl and fancyhdr don't work together that well, you should consider scrlayer-scrpage instead.
    – moewe
    Sep 10, 2018 at 13:24
  • Thank you for the great tips. it works now. Do you know how to prevent the font from changing in \nolinkurl ?
    – Marius Rom
    Sep 10, 2018 at 13:34

1 Answer 1


The "" shorthand is not available in all babel languages. In particular it is available in all German dialects (ngerman etc.) but not for English dialects (english etc.). You can define a command that does the same as "" with


Since you are loading hyperref (which loads url) I would use a command similar to \nolinkurl. The URL breaking algorithm works just fine for IP addresses as well.

I personally quite like the typewriter font you'd get from \nolinkurl, but it is more semantic to define a dedicated command for IPs and when defining it you might as well change the display style.




\begin{longtable}[l]{p{.12\textwidth} p{.20\textwidth} p{.23\textwidth} p{.30\textwidth}}
\multicolumn{4}{>{\columncolor{blue}}l}{Part 2. Component Compliance Summary}\\
IP Address: &  \ip{}                   & \cellpassfail{0} & \\
IP Address: &  \ip{1234:1234:1234:1234::3b:1}       & \cellpassfail{1} & \\
IP Address: &  \ip{1234:1234:1234:1234::1234:2}     & \cellpassfail{1} & \\
IP Address: &  \ip{1234:1234:1234:1234::5647:3}     & \cellpassfail{1} & \\
IP Address: &  \ip{1234:1234:1234:1234::5647:ce:25} & \cellpassfail{1} &

The table from the MWE with nicely breaking IPs


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.