The Centernot Package Manual 3

Manual%203

en_np_Manual-3

pt_np_Manual-3

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 5

The centernot package
Heiko Oberdiek
<heiko.oberdiek at googlemail.com>
2016/05/16 v1.4
Abstract
This package provides \centernot that prints the symbol \not on the
following argument. Unlike \not the symbol is horizontally centered.
Contents
1 User interface 1
2 Implementation 2
3 Installation 2
3.1 Download ................................ 2
3.2 Bundle installation ........................... 3
3.3 Package installation .......................... 3
3.4 Refresh le name databases ...................... 3
3.5 Some details for the interested .................... 3
4 Catalogue 4
5 History 4
[2006/12/02 v1.0] ............................... 4
[2007/05/31 v1.1] ............................... 4
[2010/03/29 v1.2] ............................... 4
[2011/07/11 v1.3] ............................... 5
[2016/05/16 v1.4] ............................... 5
6 Index 5
1 User interface
If a negated relational symbol is not available, \not can be used to create the
negated variant of the relational symbol. The disadvantage of \not is that it is
put at a xed location regardless of the width of the relational symbol. There-
fore \centernot takes an argument and measures its width to achieve a better
placement of the symbol \not. Examples:
symbol \not \centernot
=6=6=(denition)
\parallel 6k 6 k
\longrightarrow 6−→ 6
But do not forget that most negated symbols are already available, e.g.:
Please report any issues at https://github.com/ho-tex/oberdiek/issues
1
case package code result
\parallel:centernot $A \centernot\parallel B$ A6 k B
amssymb $A \nparallel B$ AB
\mid:centernot $A \centernot\mid B$ A6 | B
amssymb $A \nmid B$ A-B
mathabx $A \notdivides B$ AB
\rightarrow:centernot $A \centernot\rightarrow B$ A6B
amssymb $A \nrightarrow B$ A9B
mathabx $A \nrightarrow B$ AÛB
2 Implementation
1h*packagei
2\NeedsTeXFormat{LaTeX2e}
3\ProvidesPackage{centernot}
4[2016/05/16 v1.4 Centers the not symbol horizontally (HO)]%
\not is a \mathrel atom with zero width. It prints itself outside its character
box, similar to \rlap. The next \mathrel symbol is then print on top of it. T
E
X
does not add space between two \mathrel atoms. The following implementation
assumes that the math font is designed in such a way that the position of \not
ts well on the equal symbol.
The blue boxes marks the character bounding boxes seen by T
E
X:
\not = \not=
6=6=
\centernot \centernot is not a symbol but a macro that takes one argument. It measures the
width of the argument and places \not horizontally centered on that argument.
The result is a \mathrel atom.
5\newcommand*{\centernot}{%
6\mathpalette\@centernot
7}
8\def\@centernot#1#2{%
9\mathrel{%
10 \rlap{%
11 \settowidth\dimen@{$\m@th#1{#2}$}%
12 \kern.5\dimen@
13 \settowidth\dimen@{$\m@th#1=$}%
14 \kern-.5\dimen@
15 $\m@th#1\not$%
16 }%
17 {#2}%
18 }%
19 }
20 h/packagei
3 Installation
3.1 Download
Package. This package is available on CTAN1:
CTAN:macros/latex/contrib/oberdiek/centernot.dtx The source le.
CTAN:macros/latex/contrib/oberdiek/centernot.pdf Documentation.
1http://ctan.org/pkg/centernot
2
Bundle. All the packages of the bundle ‘oberdiek’ are also available in a TDS
compliant ZIP archive. There the packages are already unpacked and the docu-
mentation les are generated. The les and directories obey the TDS standard.
CTAN:install/macros/latex/contrib/oberdiek.tds.zip
TDS refers to the standard “A Directory Structure for T
E
X Files” (CTAN:tds/
tds.pdf). Directories with texmf in their name are usually organized this way.
3.2 Bundle installation
Unpacking. Unpack the oberdiek.tds.zip in the TDS tree (also known as texmf
tree) of your choice. Example (linux):
unzip oberdiek.tds.zip -d ~/texmf
Script installation. Check the directory TDS:scripts/oberdiek/ for scripts
that need further installation steps. Package attachle2 comes with the Perl script
pdfat.pl that should be installed in such a way that it can be called as pdfat.
Example (linux):
chmod +x scripts/oberdiek/pdfat.pl
cp scripts/oberdiek/pdfat.pl /usr/local/bin/
3.3 Package installation
Unpacking. The .dtx le is a self-extracting docstrip archive. The les are
extracted by running the .dtx through plain T
E
X:
tex centernot.dtx
TDS. Now the dierent les must be moved into the dierent directories in your
installation TDS tree (also known as texmf tree):
centernot.sty tex/latex/oberdiek/centernot.sty
centernot.pdf doc/latex/oberdiek/centernot.pdf
centernot.dtx source/latex/oberdiek/centernot.dtx
If you have a docstrip.cfg that congures and enables docstrip’s TDS installing
feature, then some les can already be in the right place, see the documentation
of docstrip.
3.4 Refresh le name databases
If your T
E
X distribution (teT
E
X, mikT
E
X, …) relies on le name databases, you
must refresh these. For example, teT
E
X users run texhash or mktexlsr.
3.5 Some details for the interested
Unpacking with L
A
T
E
X. The .dtx chooses its action depending on the format:
plain T
E
X: Run docstrip and extract the les.
L
A
T
E
X: Generate the documentation.
If you insist on using L
A
T
E
X for docstrip (really, docstrip does not need L
A
T
E
X),
then inform the autodetect routine about your intention:
latex \let\install=y\input{centernot.dtx}
Do not forget to quote the argument according to the demands of your shell.
3
Generating the documentation. You can use both the .dtx or the .drv to
generate the documentation. The process can be congured by the conguration
le ltxdoc.cfg. For instance, put this line into this le, if you want to have A4 as
paper format:
\PassOptionsToClass{a4paper}{article}
An example follows how to generate the documentation with pdfL
A
T
E
X:
pdatex centernot.dtx
makeindex -s gind.ist centernot.idx
pdatex centernot.dtx
makeindex -s gind.ist centernot.idx
pdatex centernot.dtx
4 Catalogue
The following XML le can be used as source for the T
E
X Catalogue. The ele-
ments caption and description are imported from the original XML le from the
Catalogue. The name of the XML le in the Catalogue is centernot.xml.
21 h*cataloguei
22 <?xml version='1.0' encoding='us-ascii'?>
23 <!DOCTYPE entry SYSTEM 'catalogue.dtd'>
24 <entry datestamp='$Date$' modier='$Author$' id='centernot'>
25 <name>centernot</name>
26 <caption>Centred \not command.</caption>
27 <authorref id='auth:oberdiek'/>
28 <copyright owner='Heiko Oberdiek' year='2006,2007,2010,2011'/>
29 <license type='lppl1.3'/>
30 <version number='1.4'/>
31 <description>
32 The package provides <tt>\centernot</tt> that prints the symbol
33 <tt>\not</tt> on the following argument. Unlike the default
34 <tt>\not</tt> command, the symbol is horizontally centered.
35 <p/>
36 The package is part of the <xref red='oberdiek'>oberdiek</xref>
37 bundle.
38 </description>
39 <documentation details='Package documentation'
40 href='ctan:/macros/latex/contrib/oberdiek/centernot.pdf'/>
41 <ctan le='true' path='/macros/latex/contrib/oberdiek/centernot.dtx'/>
42 <miktex location='oberdiek'/>
43 <texlive location='oberdiek'/>
44 <install path='/macros/latex/contrib/oberdiek/oberdiek.tds.zip'/>
45 </entry>
46 h/cataloguei
5 History
[2006/12/02 v1.0]
First version.
[2007/05/31 v1.1]
Real symbols added in documentation part.
[2010/03/29 v1.2]
Documentation x: ‘negotiated’ to ‘negated’ (Hartmut Henkel).
4
[2011/07/11 v1.3]
Superuous \makeatother removed (Martin Münch).
[2016/05/16 v1.4]
Documentation updates.
6 Index
Numbers written in italic refer to the page where the corresponding entry is de-
scribed; numbers underlined refer to the code line of the denition; plain numbers
refer to the code lines where the entry is used.
Symbols
\@centernot .................. 6,8
C
\centernot .................. 5,32
D
\dimen@ ............. 11,12,13,14
K
\kern ..................... 12,14
M
\m@th .................. 11,13,15
\mathpalette ................... 6
\mathrel ...................... 9
N
\NeedsTeXFormat ............... 2
\newcommand .................. 5
\not ................. 15,26,33,34
P
\ProvidesPackage ............... 3
R
\rlap ........................ 10
S
\settowidth ................ 11,13
5

Navigation menu