diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/ncctools/nccsect.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/ncctools/nccsect.dtx | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/ncctools/nccsect.dtx b/Master/texmf-dist/source/latex/ncctools/nccsect.dtx index 0729288c8ea..f1521679e76 100644 --- a/Master/texmf-dist/source/latex/ncctools/nccsect.dtx +++ b/Master/texmf-dist/source/latex/ncctools/nccsect.dtx @@ -4,7 +4,7 @@ %% %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{nccsect} -%<package> [2006/01/19 v1.5 Extended Section, Caption, and TOC Handling (NCC)] +%<package> [2006/01/20 v1.6 Extended Section, Caption, and TOC Handling (NCC)] % % \changes{v1.00}{2002/02/01}{This version is uploaded to CTAN} % \changes{v1.01}{2002/02/08}{\NCC@thetocchapter hook added} @@ -54,6 +54,7 @@ % \changes{v1.5}{2006/01/19}{Introduce |centerlast| section style} % \changes{v1.5}{2006/01/19}{Introduce |\sectiontagsuffix| command} % \changes{v1.5}{2006/01/19}{Introduce |\captiontagsuffix| command} +% \changes{v1.6}{2006/01/20}{Improve |\NCC@secflush| to work in |rightlast| style} % %<*driver> \let\makeindex\relax @@ -236,7 +237,6 @@ % If the \meta{type} parameter is omitted, the command acts on % all subsequent sections expect those having a specialized tag suffix. % -% \bigskip % \DescribeMacro\indentaftersection % \DescribeMacro\noindentaftersection % The paragraph indentation after a display section is controlled with @@ -277,11 +277,11 @@ % Otherwise, this command is ignored. % % \bigskip -% \textbf{Modifiers.} The customization of a number tag and running head of a concrete +% \textbf{Modifiers.} The customization of a number tag and running head of a particular % section is provided with so-call \textit{modifiers}. A modifier % is a command acting on the nearest sectioning command going after it. % Usually, the modifiers are placed just before a sectioning command. -% All modifiers act with non-starred versions of sections. +% All modifiers act on non-starred versions of sections. % If the next sectioning command is starred, modifiers are ignored. % % \DescribeMacro\norunninghead @@ -443,6 +443,11 @@ % |\newplainsectionstyle{center}{0pt}[c]{0pt plus 1fil}{0pt plus 1fil}|\\ % |\newplainsectionstyle{centerlast}{0pt}[c]{0pt plus 1fil}{0pt plus -1fil}| % \end{quote} +% Analogously to the |centerlast| style, the |rightlast| style (last line is adjusted +% to the right) can be easy created: +% \begin{quote} +% |\newplainsectionstyle{rightlast}{0pt}[r]{0pt plus 1fil}{0pt plus -1fil}| +% \end{quote} % % \DescribeMacro\newhangsectionstyle % The command @@ -2410,18 +2415,29 @@ % \begin{macro}{\NCC@secflush} % |\NCC@secflush|\marg{tag} applies a section style saved in the % |\NCC@secsave| macro and adjusts |\rightskip| and |\parfillskip| -% if left and right margins have no stretchability in sum. -% To adjust the right skip, we do the same tricks as in -% |\NCC@adjsecmargins|. +% if the left and right margins have no stretchability in sum. % \begin{macrocode} \def\NCC@secflush#1{\NCC@secsave{#1}% \@tempskipa\leftskip \advance\@tempskipa\rightskip \advance\@tempskipa -1\@tempskipa +% \end{macrocode} +% There are three general cases in which the +% correction of right margin is required: +% \begin{center}\small\catcode`|=12 +% \begin{tabular}{|l|c|c|c|}\hline +% \tc{\cbox{Case}} & \cbox{\tt\string\leftskip} & \cbox{\tt\string\rightskip} +% & \cbox{\tt\string\parfillskip} \\\hline +% \Strut/.7/ +% Left last &\tt x &\tt y &\tt 0pt plus 1fil \\ +% Center last &\tt x plus 1fil &\tt y plus -1fil &\tt 0pt plus 2fil \\ +% Right last &\tt x plus 1fil &\tt y plus -1fil &\tt 0pt plus 1fil \\\hline +% \end{tabular} +% \end{center} +% In all these cases the correction is simple: we need to add |\parfillskip| +% to the |\rightskip| and set |\parfillskip| to zero. +% \begin{macrocode} \NCC@ifzeroskip\@tempskipa{% - \@tempskipa 1\rightskip \advance\@tempskipa -\rightskip - \advance\@tempskipa \@flushglue - \advance\rightskip \@tempskipa - \advance\parfillskip -\@tempskipa + \advance\rightskip \parfillskip \parfillskip \z@skip }{}% \ignorespaces } |