summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-12 23:12:15 +0000
committerKarl Berry <karl@freefriends.org>2011-09-12 23:12:15 +0000
commite0c1dd1100b3d71edfbd747eaf324539d5ca5797 (patch)
tree43eb7fc89ae391038fb94abd2d48b9d1195096f0 /Master
parent38edf1119340e2f29ec18c06631362d405c5f127 (diff)
new latex package nowidow (12sep11)
git-svn-id: svn://tug.org/texlive/trunk@23911 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/nowidow/README1
-rw-r--r--Master/texmf-dist/doc/latex/nowidow/nowidow.pdfbin0 -> 101736 bytes
-rw-r--r--Master/texmf-dist/source/latex/nowidow/nowidow.dtx156
-rw-r--r--Master/texmf-dist/source/latex/nowidow/nowidow.ins57
-rw-r--r--Master/texmf-dist/tex/latex/nowidow/nowidow.sty40
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/nowidow.tlpsrc0
8 files changed, 256 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/nowidow/README b/Master/texmf-dist/doc/latex/nowidow/README
new file mode 100644
index 00000000000..a4ce7873712
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nowidow/README
@@ -0,0 +1 @@
+This package provides a useful macro to manage widow lines.
diff --git a/Master/texmf-dist/doc/latex/nowidow/nowidow.pdf b/Master/texmf-dist/doc/latex/nowidow/nowidow.pdf
new file mode 100644
index 00000000000..437734cb8cb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nowidow/nowidow.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/nowidow/nowidow.dtx b/Master/texmf-dist/source/latex/nowidow/nowidow.dtx
new file mode 100644
index 00000000000..833ca1f0367
--- /dev/null
+++ b/Master/texmf-dist/source/latex/nowidow/nowidow.dtx
@@ -0,0 +1,156 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2011 by Raphaël Pinson <raphink@gmail.com>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Raphaël Pinson.
+%
+% This work consists of the files nowidow.dtx and nowidow.ins
+% and the derived filebase nowidow.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{nowidow.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{nowidow}
+%<*package>
+ [2011/09/11 0.2 Easily prevent widows]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{nowidow}[2011/09/11]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{nowidow.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{24}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{0.2}{2011/09/11}{Fix nowidow@X}
+% \changes{0.1}{2011/09/11}{Initial version}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{nowidow.dtx}
+% \title{The \textsf{nowidow} package}
+% \author{Raphaël Pinson \\ \url{raphink@gmail.com}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% Widows (single lines at the top of a page) happen frequently
+% and should be avoided.
+%
+% The |\widowpenalty| command allows to prevent them,
+% but its syntax is a bit complex to use.
+%
+% The \textsf{nowidow} package provides a |\nowidow| command which is simpler
+% to use in order to prevent widows.
+%
+% \section{Usage}
+%
+% To load the package, use:
+%
+% \begin{verbatim}
+% \usepackage{nowidow}
+% \end{verbatim}
+%
+% \DescribeMacro{\nowidow}
+%
+% To prevent widows in a paragraph, call |\nowidow|
+% immediatly at the of the paragraph (without an empty line),
+% optionally followed by the minimal number of lines you
+% want after the page break:
+%
+% \begin{verbatim}
+% This paragraph overflows to the next page,
+% but I really don't want any widows in it.
+% \nowidow[3]
+% \end{verbatim}
+%
+% The minimal number of lines to be kept after
+% the page break defaults to 2 if not specified.
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \begin{macrocode}
+\ProvidesPackage{nowidow}
+% \end{macrocode}
+%
+% \begin{macro}{\nowidow@X}
+% \begin{macrocode}
+\def\nowidow@X#1{%
+ \ifnum#1<\nowidowmax
+ 10000
+ \expandafter\nowidow@X\expandafter{%
+ \the\numexpr(#1)+1\expandafter\relax\expandafter}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\nowidow}
+% \begin{macrocode}
+\newcommand{\nowidow}[1][2]{%
+ \begingroup
+ \mathchardef\nowidowmax#1\relax
+ \widowpenalties #1 \nowidow@X{1} 0\par
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/nowidow/nowidow.ins b/Master/texmf-dist/source/latex/nowidow/nowidow.ins
new file mode 100644
index 00000000000..756310de661
--- /dev/null
+++ b/Master/texmf-dist/source/latex/nowidow/nowidow.ins
@@ -0,0 +1,57 @@
+%% Copyright (C) 2011 by Raphaël Pinson <raphink@gmail.com>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Raphaël Pinson.
+%%
+%% This work consists of the files nowidow.dtx and nowidow.ins
+%% and the derived filebase nowidow.sty.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/nowidow}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2011 by Raphaël Pinson <raphink@gmail.com>
+--------------------------------------------------------------------------
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{nowidow.sty}{\from{nowidow.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* nowidow.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file nowidow.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/nowidow/nowidow.sty b/Master/texmf-dist/tex/latex/nowidow/nowidow.sty
new file mode 100644
index 00000000000..0eee05aa210
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/nowidow/nowidow.sty
@@ -0,0 +1,40 @@
+%%
+%% This is file `nowidow.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% nowidow.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2011 by Raphaël Pinson <raphink@gmail.com>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{nowidow}
+ [2011/09/11 0.2 Easily prevent widows]
+\ProvidesPackage{nowidow}
+\def\nowidow@X#1{%
+ \ifnum#1<\nowidowmax
+ 10000
+ \expandafter\nowidow@X\expandafter{%
+ \the\numexpr(#1)+1\expandafter\relax\expandafter}%
+ \fi
+}
+\newcommand{\nowidow}[1][2]{%
+ \begingroup
+ \mathchardef\nowidowmax#1\relax
+ \widowpenalties #1 \nowidow@X{1} 0\par
+ \endgroup
+}
+\endinput
+%%
+%% End of file `nowidow.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 959085401c4..8b71c9fdd09 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -266,7 +266,7 @@ my @TLP_working = qw(
nfssext-cfr niceframe nicetext nih nkarta nlctdoc
noitcrul nolbreaks
nomencl nomentbl nonfloat nonumonpart nopageno nostarch notes
- notes2bib notoccite
+ notes2bib notoccite nowidow
nrc ntgclass ntheorem ntheorem-vn nuc numericplots numname numprint
oberdiek objectz ocgtools ocr-b ocr-b-outline ocr-latex octavo ofs ogham
oldlatin oldstandard oldstyle
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index a9faf6df259..a1fd8e66f04 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -465,6 +465,7 @@ depend nonumonpart
depend nopageno
depend notes
depend notoccite
+depend nowidow
depend ntheorem
depend numname
depend numprint
diff --git a/Master/tlpkg/tlpsrc/nowidow.tlpsrc b/Master/tlpkg/tlpsrc/nowidow.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/nowidow.tlpsrc