Debian Codegraph @

texmf-dist/doc/latex/nolbreaks/nolbreaks.tex

raw
1 \documentclass[pagesize=auto, fontsize=14pt, parskip=half]{scrartcl}
2
3 \usepackage{fixltx2e}
4 \usepackage{etex}
5 \usepackage{xspace}
6 \usepackage{lmodern}
7 \usepackage[T1]{fontenc}
8 \usepackage{textcomp}
9 \usepackage{microtype}
10 \usepackage{hyperref}
11
12 \newcommand*{\pkg}[1]{\textsf{#1}}
13 \newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
14 \makeatletter
15 \newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
16 \makeatother
17 \newcommand*{\opt}[1]{\texttt{#1}}
18 \newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
19 \newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
20
21 \addtokomafont{title}{\rmfamily}
22
23 \title{The \pkg{nolbreaks} package\thanks{This manual corresponds to
24 \pkg{nolbreaks}~v1.2, dated~2012/05/31.}}
25 \author{Donald Arseneau}
26 \date{2012/05/31}
27
28
29 \begin{document}
30
31 \maketitle
32
33 Use \cmd{\nolbreaks}\marg{some text} to prevent line-breaks in
34 \meta{some text}. This has the advantage over \verb+\mbox{ }+ that
35 glue (rubber space) remains flexible, and can adjust to fit the margins.
36 It has the disadvantage of not working in all cases! Most common
37 situations are handled (in particular, \cmd{\newline}, \cmd{\linebreak},
38 and \cmd{\\} are disabled) but spaces hidden in macros or \verb+{ }+
39 (braces) can still create break-points.
40
41 Large pieces of text with no breaks can cause problems with
42 paragraph justification. Using the alternate \cmd{\nolbreaks}\verb'*'
43 allows a line before the unbreakable text to be cut short
44 (like ragged-right). Giving the package option \opt{[ragged]}
45 converts all \cmd{\nolbreaks} commands to \cmd{\nolbreaks*}.
46
47 You should declare \cmd{\sloppy} or set a raised \cmd{\tolerance} in
48 your document when you have large non-breaking chunks.
49
50 The command name \cmd{\nolbreaks} is long to type, so you should
51 probably declare a shorter alias name if you use it a lot, like
52 \ \verb'\newcommand\n{\nolbreaks}'.
53
54 \end{document}