Tag Info

Hot answers tagged

9

The macro \caption executes \@parboxrestore, that in turn executes \let\-\@dischyph which means that, in a caption, \- gets again its original LaTeX meaning of \discretionary{-}{}{}. Indeed, if you look in the .aux file, you see Why does $\discretionary {-}{}{}$ not work in a caption while $\boxplus $ works? It's generally a bad idea to redefine such ...


6

The german package is obsolete. You should instead load \usepackage[T1]{fontenc} Example, where \parbox{0pt} is used to force TeX to hyphenate as much as possible. \documentclass[]{scrbook} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[german]{babel} \begin{document} \parbox{0pt}{\hspace{0pt}Andere übertragen das am besten den ...


6

Judging from your answer it seems you don’t really understand what \hyphenation does. The purpose of \hyphenation{some-word-with-hyphens} is not just to allow TeX to hyphenate the word at the places where the hyphens are: it’s also to forbid it everywhere else. For example, say you want to add a breakpoint to the word “advised” by allowing a break before ...


5

Using || for producing a double em-dash is abusing the system. The fact that | produces an em-dash, when the output font encoding is OT1, is purely incidental and should never be relied upon. The “right” way in TeX/LaTeX for obtaining an em-dash is by typing --- and this works also with fontspec, provided the Ligatures=TeX option, that's activated by ...


4

After a few false starts, it became clear that || is the result of a ConTeXt convention, and for reasons more interesting than mere caprice. From ConTeXt's lang-mis.mkiv file: One of TEX's strong points in building paragraphs is the way hyphenations are handled. Although for real good hyphenation of non-english languages some extensions to the ...


3

I suggest you replace all instances of "–" (hardcoded en-dash) with "--\allowbreak". (Aside: if your document has hard-coded em-dashes, you may want to replace them with "---\allowbreak".) The "\allowbreak" part is needed if you compile your document with LuaLaTeX; it's not strictly necessary with pdfLaTeX (though it doesn't hurt either). For the paragraph ...


3

Just add a \par or blank line leaving the nested enumerate environment. \documentclass{article} \usepackage{ragged2e} \usepackage{polyglossia} \begin{document} \section{Nested list with sloppypar} \begin{enumerate} \item \begin{sloppypar}\justifying\hyphenrules{nohyphenation}Blah blah blah.\end{sloppypar} \begin{enumerate} \item ...


2

While Steven's answer certainly solves your problem, the way you are marking up your document is not ideal. You can simplify everything a lot with the following: \usepackage{etoolbox} \AtBeginEnvironment{enumerate}{\sloppy\hyphenrules{nohyphenation}} Compare (and comment out the \AtBeginEnvironment line to see the difference): \documentclass{article} ...


2

In a list environment, the action of \item is deferred when a paragraph is started. And \begin{sloppypar} starts with \par, which confuses this mechanism. Here's a minimal example that emulates what sloppypar does: \par at the beginning, some other actions that don't concern the issue, and \par at the end. \documentclass{article} ...


2

With \textbf{"Aquivalenz\-umformungen} you define only one possible hyphenation. But the interword space will be too big if TeX tries to hyphenate at this point. Use \begin{sloppypar} Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsumm \textbf{"Aquivalenz\-umformungen} Lorem ipsum \end{sloppypar} The possible stretching of the interwordspace is saved in ...



Only top voted, non community-wiki answers of a minimum length are eligible