diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:42 +0000 |
commit | 1eac51abebfe200d850284bf921c8012083ff2f9 (patch) | |
tree | bb78fe11f1f768ce29bd25f60052c5ea587509d2 /Master/texmf-dist/tex/latex/carlisle/dotlessj.sty | |
parent | e981a6612f28cfef515e09e1ab000e49d496f335 (diff) |
carlisle
git-svn-id: svn://tug.org/texlive/trunk@738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/carlisle/dotlessj.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/carlisle/dotlessj.sty | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/carlisle/dotlessj.sty b/Master/texmf-dist/tex/latex/carlisle/dotlessj.sty new file mode 100644 index 00000000000..c91512fb551 --- /dev/null +++ b/Master/texmf-dist/tex/latex/carlisle/dotlessj.sty @@ -0,0 +1,106 @@ + +% dotlessj package +%%%%%%%%%%%%%%%%% +% dotless j (\j) for them that wants one. + +% Copyright 1997 1998 David Carlisle +% +% This file may be distributed under the terms of the LPPL. +% See 00readme.txt for details. +% +% David Carlisle david@dcarlisle.demon.co.uk + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dotlessj}[1998/12/09 v0.03 dotless j package (DPC)] + +% 1997/09/10 v0.01 posted to c.t.t +% 1997/09/11 v0.02 added \jmath support +% 1998/12/09 v0.03 added \v\j for Christoph Eyrich + +\RequirePackage{color} + +% use a coloured rule rather than clipping as it is more portable +% eg the Y&Y dviwindo previewer, and the OzTeX previewer support +% colour package (and dviwindo can print on colour to non PS devices +% such as ink jet printers). +% Disadvantages of using colour are: +% a) it shows up if the background is not white. +% b) You have to arrange that the accent is printed after the colour. +% (Easy to arrange for text accents with LaTeX's +% \DeclareTextCompositeCommand, but a bit more dangerous for math +% accents.) +\def\j@internal{% + \setbox\tw@\hbox{\copy\z@ + \kern-.8\wd\z@ + {\color{white}% + \vrule \@height1.1\ht\z@ \@depth -1.1\ht4 \@width \wd\z@}% + \kern-.2\wd\z@}% + \ht\tw@\ht4 } + +% + +% The \jmath definition, set up to be passed to \mathpalette +\def\jmath@#1#2{% + {\m@th\sbox\z@{$#1j$}\sbox4{$#1\imath$}% + \j@internal + \box\tw@}}% + +% The \jmathaccent definition, set up to be passed to \mathpalette +\def\jmath@x#1#2{% + {\m@th\sbox\z@{$#1j$}\sbox4{$#1\imath$}% + \j@internal + \copy\tw@\kern-\wd\tw@#2{\kern\wd\tw@}}}% + +\DeclareRobustCommand\jmathaccent[1]{{\mathpalette\jmath@x{#1}}} + + +\DeclareRobustCommand\jaccent[1]{% + {\leavevmode\sbox\z@{j}% + \hb@xt@\wd\z@{\hss\clap\j\clap{#1{}}\hss}}}% + +% centered version of \rlap \llap. +\def\clap#1{\hb@xt@\z@{\hss#1\hss}}% + + +% If \jmath is passed to a math accent, need to intercept it and +% instead pass the accent to \jmathaccent. + +\let\j@mathaccent\mathaccent + +\def\mathaccent{\afterassignment\j@mathacc@\count@} + +\def\j@mathacc@#1#2{% + \ifx\jmath#2% + \jmathaccent{\j@mathaccent\count@}% + \else +% #1 should be \relax, but put it back, just in case. + \j@mathaccent\count@#1{#2}% + \fi} + + +% delay everything as \j and friends get defined by encoding files +% read in by, eg fontenc package. + +\AtBeginDocument{% +% +\DeclareRobustCommand\j{% + {\sbox\z@{j}\sbox4{\i}% + \j@internal + \leavevmode\box\tw@}}% +% +\DeclareRobustCommand\jmath{{\mathpalette\jmath@\relax}}% +% +% Could do this for all known encodings, but just do it +% for the default encoding at begin document, to avoid wasting +% too much space. +\DeclareTextCompositeCommand\'{\encodingdefault}{\j}{\jaccent\'}% +\DeclareTextCompositeCommand\`{\encodingdefault}{\j}{\jaccent\`}% +\DeclareTextCompositeCommand\"{\encodingdefault}{\j}{\jaccent\"}% +\DeclareTextCompositeCommand\^{\encodingdefault}{\j}{\jaccent\^}% +\DeclareTextCompositeCommand\~{\encodingdefault}{\j}{\jaccent\~}% +\DeclareTextCompositeCommand\.{\encodingdefault}{\j}{j}% +\DeclareTextCompositeCommand\={\encodingdefault}{\j}{\jaccent\=}% +\DeclareTextCompositeCommand\v{\encodingdefault}{\j}{\jaccent\v}} + + + |