Settings Help
Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/macros/latex/contrib/ifnextok

            README for the `ifnextok' package
       variant of \@ifnextchar not skipping spaces
                (C) Uwe Lueck 2011/06/02

`ifnextok' deals with the behavior of LaTeX's internal 
`\@ifnextchar' to skip blank spaces. This sometimes has surprising 
or for some users really unwanted effects, especially with 
brackets following `\\' when the user does not intend to specify 
an optional argument, rather wants that brackets are printed.
The package offers commands and options for modifying this 
behavior, maybe limited to certain parts of the document source.

A general method the package offers is 


so in "standard" circumstances `\\ [' prints a bracket in a 
new line. `\MakeNotSkipping<target>{<on-space>} modifies <target> 
so it executes <on-space> when followed by a space token.

KEYWORDS: macro programming, optional command arguments, 
          manual line breaks, humanities

RELATED PACKAGES: amsmath, mathtools

The package file `ifnextok.sty' and the documentation files
`ifnextok.pdf' and `ifnextok.tex' can be redistributed and/or 
modified under the terms of the LaTeX Project Public License; 
either version 1.3c of the License, or any later version, see

We did our best to help you, but there is NO WARRANTY. 

The `ifnextok' package is author-maintained in the sense of 
this license.

The latest public version of the package is available at

A TDS version `' is available at

Please report bugs, problems, and suggestions via 


Name Notes


Name Size Date Notes
README 1729 2011-06-02 09:38:53
RELEASEs.txt 3068 2011-06-26 11:25:47
SRCFILEs.txt 401 2011-06-27 11:43:08
ifnextok.pdf 251338 2011-06-27 11:43:07
ifnextok.sty 30518 2011-06-27 10:49:27
testINT.pdf 16686 2011-06-26 11:27:38
testIfNT.pdf 16686 2011-06-27 11:43:03

Down­load the com­plete con­tents of this di­rec­tory in one zip archive (244.2k).

ifnex­tok – Util­ity macro: peek ahead with­out ig­nor­ing spaces

The pack­age deals with the be­haviour of the LaTeX in­ter­nal com­mand \@ifnextchar, which skips blank spaces. This has the po­ten­tial to sur­prise users, since it can pro­duce re­ally un­wanted ef­fects. A com­mon ex­am­ple oc­curs with brack­ets start­ing a line fol­low­ing \\: the com­mand looks for an op­tional ar­gu­ment, whereas the user wants the brack­ets to be printed.

The pack­age of­fers com­mands and op­tions for mod­i­fy­ing this be­haviour, maybe lim­ited to cer­tain parts of the doc­u­ment source.

Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2011 Uwe Lück
Main­tainerUwe Lück
Con­tained inTeXLive as ifnex­tok
MiKTeX as ifnex­tok
Topics sup­port for de­vel­op­ment of (La)TeX macros
Guest Book Sitemap Contact 2014-04-21 03:14 CEST