Tag Info

Hot answers tagged

17

The TeXBook has this exercise: exercise Sometimes you run into a rare word like 'shelfful' that looks better as shelf{}ful without the ff ligature. How can you fool TeX into thinking that there aren't two consecutive f's in such a word? answer {shelf}ful or shelf{}ful, etc.; or even shelf\/ful, which yields a shelf/ful instead of a ...


6

Congratulations! You've found a bug in the code. :) The strut added at the end makes the last word not subject to hyphenation. Here's a correct version with \RaggedRight: \documentclass{article} \usepackage{showframe} \usepackage{ragged2e} \makeatletter \newcommand\tabfill[1]{% \dimen@\linewidth \advance\dimen@\@totalleftmargin ...


5

As usual, in the example the lines are overfull on purpose, so as to force hyphenation. \documentclass{article} \usepackage{polyglossia} \setmainlanguage{nynorsk} \begin{hyphenrules}{nynorsk} \hyphenation{fram-halds-skulen} \end{hyphenrules} \begin{document} \parbox{0pt}{\hspace{0pt}framhaldsskulen} \end{document} Use the same trick of ...


5

to display the black box that indicates overfull lines without any of the other side effects of the [draft] option, put this in your preamble: \setlength\overfullrule{5pt} you can reset this at any time within your document. setting it to a value of 0pt makes it disappear. the package testhyphens suggested by @cfr is also a very useful tool for checking ...


3

The codes you put in the comment work to produce the effect that I think you want. This image shows the default hyphenated layout in a table and longtable then the same again after declaring captions should be justified with no hyphenation (which gives TeX no choice but to over-stretch the space between Table and the number.) \documentclass{article} ...


2

I use \hyp{} from the hyphenat package and have Biber replace all hyphens in the author field with it. Put this in your preamble: \usepackage{hyphenat} \DeclareSourcemap{ \maps[datatype = bibtex]{ \map{ \step[fieldsource = author, match = \regexp{-}, replace = \regexp{\{\\hyp\{\}\}}] } } } For some reason, Biber started to include ...


1

Davids answer shows you how to suppress breaking after an explicit hyphen globally (i.e., for every word with an explicit hyphen). Often one wishes to suppress the breaking only in specific cases, and there are two approaches for this: \mbox{Modula-2} works without any package. ngerman.sty or the ngerman option for the babel package contain a nifty ...


1

The short answer is: You cannot suppress hyphenation at a page break in the usual TeX formats (plain, latex, context). You can discourage a page break at a hyphenated line (\brokenpenalty does this). Somewhat longer explanation: TeX breaks paragraphs into lines. The lines are than broken into pages without touching the line breaks again. So you can shift ...


1

Your example can't break at the ? because the first definition defines the hyphenchar for cmtt in T1 encoding (and you use lmodern) and the second defines \mytexttt but your document uses \texttt. If you replace \texttt with \mytexttt or drop lmodern and use \usepackage[T1]{fontenc} or drop lmodern and use \DeclareFontFamily{OT1}{cmtt}{\hyphenchar ...


1

(Remark: I rewrote this answer completely after the OP posted a more realistic example of the hyphenation problems he encountered when using the \cite macro of the apacite package.) There may well be a bug in the way the apacite package has implemented the \cite command. I therefore suggest you provide the option natbibapa when loading the apacite package ...


1

But IEEEtran automates the procedure that you described. An example is with some other words, but the result should be visible in the second definition: the first line filled with glue. \documentclass{IEEEtran}% http://www.ctan.org/pkg/ieeetran \newtheorem{definition}{Definition}[section] \begin{document} \section{} ...



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