summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ifnextok/ifnextok.tex
blob: 5efcc81391c05e6105b6e0a338aae9f4cdfa3047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
\ProvidesFile{ifnextok.tex}[2011/06/26 documenting ifnextok.sty (UL)]
\title{\textsf{\huge ifnextok}\\---\\\cs{IfNextToken} 
%      \MakeNotSkipping\\{\\\relax}%
       instead of \cs{@ifnextchar}\\Does Not Skip Blank 
       Spaces,\\ [\,and \qtd{\texttt{\string\\ [}} may print bracket in\\ 
       new line\,]\thanks{This document describes version 
       \textcolor{blue}{\UseVersionOf{ifnextok.sty}} 
       of \file{ifnextok.sty} as of \UseDateOf{ifnextok.sty}.}}
{ \RequirePackage{makedoc}[2010/12/20] \ProcessLineMessage{} 
  \MakeJobDoc{18}{\SectionLevelThreeParseInput} 
}
\documentclass{article}%% TODO paper dimensions!?
\input{makedoc.cfg} %% shared formatting settings
\usepackage{color}
% \ReadPackageInfos{ifnextok}                     %% 2011/06/26
\usepackage[stdbreaks]{ifnextok}                %% 2011/05/27
% \usepackage{ifnextok}                           %% 2011/05/31
\newcommand*{\secref}[1]{Section~\ref{sec:#1}}  %% 2011/05/30
\newcommand*{\meta}{\textit}                    %% 2011/06/14
% \MakeActive\" \def"#1"{``#1''}                  %% 2011/06/25
%% <- bad with examples!? TODO
% \usepackage{german} \mdqoff                     %% 2011/05/31
%  \tracingmacros=1 \tracingonline=1
% \IfNextSpace{\show\\}{\show\/}
\makeatletter 
%   \@beginparpenalty\@lowpenalty 
%   \show\@xnewline
%  \tracingmacros=1 \tracingonline=1
%   \NoNewlineSkipping
%   \NextTokenForNextChar\@xnewline
%   \show\@xnewline
%   \show\\
%   \show\@normalcr
\makeatother
\sloppy
\begin{document}
%  \MakeNotSkipping\\{\\\relax}
\maketitle
\begin{abstract} %%% \noindent
%  \MakeNotSkipping\\{\\\relax}
%  \mdqon \MakeNotSkipping"{\rq\rq} (``Uwe L"uck" )
  The 'ifnextok' package deals with the behavior of 
  \LaTeX's internal `\@ifnextchar' to skip blank spaces. 
  This sometimes has surprising or for some users really 
  \emph{unwanted} effects, especially with brackets following 
  `\\' when                     %% v0.1a: was `where'
  the user does \emph{not} intend to specify an 
  optional argument, rather wants that brackets are \emph{printed.} 
  The package offers commands and options for modifying this 
  behavior, maybe limited to certain parts of the document source.\\ 
  [It works!] 
  It may also be useful with active characters in lieu of `\\', 
%  \mdqon
  e.g., the double quote `"' with \ctanpkgref{german}`.sty'
  or \ctanpkgref{babel}.

  v0.3 fixes behavior in non-typesetting mode with 
  `\MakeNotSkipping', using a somewhat different technique
  than \LaTeX's robustifications. 
%   `\DeclareRobustCommand'.
  \par\smallskip\noindent
\strong{Keywords:}\quad 
    macro programming, optional command arguments, 
    manual line breaks, humanities
  \par\smallskip\noindent
\strong{Related packages:}\quad \ctanpkgref{amsmath}, 
    \ctanpkgref{mathtools}
\end{abstract}
  \newpage                                      %% 2011/06/26
\tableofcontents

  \newpage                                      %% 2011/06/26
\section{Installing and Calling}
The package file `ifnextok.sty' is provided ready, 
installation only requires putting it somewhere where \TeX\ finds it 
(which may need updating the filename data 
 base).\urlfoot{ukfaqref}{inst-wlcf}

Below the `\documentclass' line(s) and above `\begin{document}', 
you load `ifnextok.sty' (as usually) by 
\[`\usepackage{ifnextok}'\qquad \mbox{or by}\qquad 
  `\usepackage[<options>]{ifnextok}'\]---<options> described 
in Section~\ref{sec:options}. E.g., the \emph{main goal} of 
writing the package is achieved by 
\[`\usepackage[stdbreaks]{ifnextok}'\]

% \section{The Package File}
\section{Header (Legalize)}
\input{ifnextok.doc}
\end{document}

VERSION HISTORY

2011/05/22f.    very first
2011/05/27      mentioning [stdbreaks] for v0.11
2011/05/30      testing \MakeNotSkipping
2011/06/02      for v0.21: "related packages"
2011/06/26      for v0.3: mentioning \MakeNotSkipping, \newpage, 
                different sectioning