babel: Adding ngerman' s language shorthands to english as the main document language
\documentclass{article}
\usepackage[ngerman,english]{babel}
\useshorthands{"}
\addto\extrasenglish{\languageshorthands{ngerman}}
\begin{document}
\minipage{1cm}\hrulefill
\hspace{0pt}zoning-facilitated
\hspace{0pt}zoning"=facil"-itated
\endminipage
\end{document}
With lualatex
you do not need the \hspace{0pt}
(LuaTeX hyphenates the first word of a paragraph, which TeX doesn't)
One has to define the language specific shorthands; I've left only the hyphenation related ones:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\makeatletter
\initiate@active@char{"}
\addto\extrasenglish{\languageshorthands{english}\bbl@activate{"}}
\addto\noextrasenglish{\bbl@deactivate{"}}
\declare@shorthand{english}{"-}{\nobreak\-\bbl@allowhyphens}
\declare@shorthand{english}{"|}{%
\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
\allowhyphens}{}}
\declare@shorthand{english}{""}{\hskip\z@skip}
\declare@shorthand{english}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{english}{"=}{\penalty\@M-\hskip\z@skip}
\makeatother
\begin{document}
\hsize=3pt
\hskip0pt zoning-facilitated
\hskip0pt zoning-facil"-itated
\end{document}
It's quite easy also to import the ngerman
shorthands:
\documentclass[a4paper]{article}
\usepackage[ngerman,english]{babel}
\makeatletter
\initiate@active@char{"}
\addto\extrasenglish{\languageshorthands{ngerman}\bbl@activate{"}}
\addto\noextrasenglish{\bbl@deactivate{"}}
\makeatother
\begin{document}
\hsize=3pt
\hskip0pt zoning-facilitated
\hskip0pt zoning-facil"-itated
\end{document}
Of course, ngerman
has to be loaded, otherwise the shorthands would not be known; so the first alternative seems better.