diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.pdf | bin | 0 -> 186022 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.tex | 45 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/nolbreaks/nolbreaks.sty | 68 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/nolbreaks.tlpsrc | 0 |
6 files changed, 115 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.pdf b/Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.pdf Binary files differnew file mode 100644 index 00000000000..b0fd68a26c6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.pdf diff --git a/Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.tex b/Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.tex new file mode 100644 index 00000000000..d23623ce9fe --- /dev/null +++ b/Master/texmf-dist/doc/latex/nolbreaks/nolbreaks.tex @@ -0,0 +1,45 @@ +\documentclass[pagesize=auto, fontsize=14pt, DIV=10, parskip=half]{scrartcl} + +\usepackage{fixltx2e} +\usepackage{etex} +\usepackage{xspace} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage{microtype} +\usepackage{hyperref} + +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} +\makeatletter +\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} +\makeatother +\newcommand*{\opt}[1]{\texttt{#1}} +\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle} +\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}} + +\addtokomafont{title}{\rmfamily} + +\title{The \pkg{nolbreaks} package\thanks{This manual corresponds to \pkg{nolbreaks}~v1.0, dated~2002/09/19.}} +\author{Donald Arseneau} +\date{2002/09/19} + + +\begin{document} + +\maketitle + +Use \cmd{\nolbreaks}\marg{some text} to prevent linebreaks in \meta{some text}. +This has the advantage over \verb+\mbox{}+ that glue (rubber space) +remains flexible. It has the disadvantage of not working in +all cases! Most common cases are handled here (\cmd{\linebreak} is +disabled, for example) but spaces hidden in macros or \verb+{ }+ +can still create break-points. + +Large pieces of text with no breaks can cause problems with +paragraph justification. Giving the package option \opt{[ragged]} +allows a line before the unbreakable text to be cut short. + +You should declare \cmd{\sloppy} in your document. + +\end{document} diff --git a/Master/texmf-dist/tex/latex/nolbreaks/nolbreaks.sty b/Master/texmf-dist/tex/latex/nolbreaks/nolbreaks.sty new file mode 100644 index 00000000000..70238b56451 --- /dev/null +++ b/Master/texmf-dist/tex/latex/nolbreaks/nolbreaks.sty @@ -0,0 +1,68 @@ +% nolbreaks.sty by Donald Arseneau +% Public domain software -- please improve and submit to CTAN + +\ProvidesPackage{nolbreaks}[2002/09/19 \space v 1.0 \space + - no linebreaks in text] + +% Use \nolbreaks{some text} to prevent linebreaks in "some text". +% This has the advantage over \mbox{} that glue (rubber space) +% remains flexible. It has the disadvantage of not working in +% all cases! Most common cases are handled here (\linebreak is +% disabled, for example) but spaces hidden in macros or { } +% can still create break-points. +% +% Large pieces of text with no breaks can cause problems with +% paragraph justification. Giving the package option [ragged] +% allows a line before the unbreakable text to be cut short. +% +% You should declare \sloppy in your document. + +\let\nb@ragged\relax + +\DeclareOption{ragged}{ + \def\nb@ragged{% + \skip@\lastskip \unskip + \nb@counter \lastpenalty + \hskip \z@ plus 2cm\relax + \penalty\nb@counter + \advance\skip@ \z@ plus -2cm\relax + \hskip\skip@ + }} +\ProcessOptions + +\let\nb@@iwspace=\ % +\let\nb@@hskip=\hskip +\let\nb@@penalty=\penalty +\newcount\nb@counter +\ifx\langwohyphens\undefined + \newlanguage\nb@lang +\else + \let\nb@lang\langwohyphens +\fi + +\DeclareRobustCommand{\nolbreaks}[1]{% + \leavevmode + \begingroup + % Apply flexible lead-in + \nb@ragged + % Prevent hyphenation + \language\nb@lang + % Disable commands that give breakpoints + \let\ \nb@iwspace + \let\hskip\nb@hskip + \let\penalty\nb@penalty + \let\language\nb@counter + % Prevent breaks in math + \relpenalty\@M + \binoppenalty\@M + % Prevent breaks at spaces (only outermost visible spaces) + \@PreserveSpaces \@empty #1 \@PreserveSpaces + \endgroup +} + +\def\@PreserveSpaces#1 {#1\@ifnextchar\@PreserveSpaces{\@gobble}% + {\@firstofone{\nb@@penalty\@M} \@PreserveSpaces\@empty}} + +\def\nb@iwspace{\nb@@penalty\@M \nb@@iwspace} +\def\nb@hskip {\nb@@penalty\@M \nb@@hskip} +\def\nb@penalty{\nb@@penalty\@M \nb@counter} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 2df046732d4..814c9a46aca 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -209,7 +209,7 @@ my @TLP_working = qw( mylatexformat nag namespc natbib nath nature ncclatex ncctools needspace newfile newlfm newspaper newverbs nextpage - nfssext-cfr niceframe nicetext nih nkarta noitcrul + nfssext-cfr niceframe nicetext nih nkarta noitcrul nolbreaks nomencl nomentbl nonfloat nostarch notes notes2bib nrc ntgclass ntheorem-vn numname numprint oberdiek ocgtools ocr-latex octavo ofs ogham oldlatin oldstyle diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 367b23aa815..8be4ecd44fc 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -407,6 +407,7 @@ depend nfssext-cfr depend niceframe depend nicetext depend noitcrul +depend nolbreaks depend nomencl depend nomentbl depend nonfloat diff --git a/Master/tlpkg/tlpsrc/nolbreaks.tlpsrc b/Master/tlpkg/tlpsrc/nolbreaks.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/nolbreaks.tlpsrc |