summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ean13isbn
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-03 20:50:24 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-03 20:50:24 +0000
commita51e7b83ab266e1e51718bdb0f8007a4517a578a (patch)
treedcef65576b63364e8318938d153fb3b5c51c4a3b /Master/texmf-dist/tex/latex/ean13isbn
parent7f7ad97d2c0c901fc9e2583ba37fac26e15b3a54 (diff)
new ean13isbn package
git-svn-id: svn://tug.org/texlive/trunk@9195 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ean13isbn')
-rw-r--r--Master/texmf-dist/tex/latex/ean13isbn/ean13isbn.sty106
1 files changed, 106 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ean13isbn/ean13isbn.sty b/Master/texmf-dist/tex/latex/ean13isbn/ean13isbn.sty
new file mode 100644
index 00000000000..d55517db90d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ean13isbn/ean13isbn.sty
@@ -0,0 +1,106 @@
+\ProvidesPackage{ean13isbn}[2008/06/20 EAN13 with ISBN]
+\PackageInfo{ean13isbn}{$Id: ean13isbn.sty 208 2008-06-19 23:25:37Z zw $\@gobble}
+
+%% Copyright 2008 Z. Wagner, http://icebearsoft.euweb.cz
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Z. Wagner.
+%
+% This work consists of the files: ean13isbn.sty and
+% the documentation files ean13isbn.tex, ean13isbn.pdf.
+
+\def\zw@setean#1#2{\def\zw@scale{#1 }\def\zw@xm{#2mm }}
+
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{family=zwean,prefix=zwean@}
+\DeclareStringOption{ISBN}
+\DeclareVoidOption{help}{\typeout{\zwean@table}}
+
+\def\zw@set #1 #2 #3 {\ifnum#2<1000 \let\zw@maybespace\space \else \def\zw@maybespace{}\fi
+ \edef\zwean@table{\zwean@table^^J\zw@maybespace #2 0#3mm => SC#1}%
+ \DeclareVoidOption{SC#1}{\zw@setean{#2}{#3}}}
+
+\def\zw@tbline{^^J======================}
+\def\zwean@table{\zw@tbline ^^J\space Mag \space Module\space \space \space \space Option\zw@tbline}
+
+\zw@set 0 800 .264
+\zw@set 0a 818 .270
+\zw@set 0b 850 .281
+\zw@set 1 900 .297
+\zw@set 1a 950 .313
+\zw@set 2 1000 .330
+\zw@set 2a 1050 .346
+\zw@set 3 1100 .363
+\zw@set 3a 1150 .379
+\zw@set 4 1200 .396
+\zw@set 4a 1250 .412
+\zw@set 5 1300 .429
+\zw@set 5a 1350 .445
+\zw@set 5b 1400 .462
+\zw@set 5c 1450 .478
+\zw@set 6 1500 .495
+\zw@set 6a 1550 .511
+\zw@set 7 1600 .528
+\zw@set 7a 1650 .544
+\zw@set 7b 1700 .561
+\zw@set 7c 1750 .577
+\zw@set 8 1800 .594
+\zw@set 8a 1850 .610
+\zw@set 8b 1900 .627
+\zw@set 8c 1950 .643
+\zw@set 9 2000 .660
+\zw@set 10 2120 .700
+
+\edef\zwean@table{\zwean@table \zw@tbline}
+
+\setkeys{zwean}{SC2}
+
+\InputIfFileExists{./ean13isbn.cfg}{}{}
+
+\ProcessKeyvalOptions*
+
+\expandafter\ifx\csname mubytein\endcsname\relax
+ \let\zw@mubytein\relax
+\else
+ \edef\zw@mubytein{\noexpand\mubytein\the\mubytein}\mubytein0
+\fi
+\input{ean13}
+\zw@mubytein
+
+\newdimen\zw@isbnfsize
+
+\def\zw@eansetup@params{\X\zw@xm
+ \font\ocrb ocrb9 scaled \zw@scale
+ \zw@isbnfsize 9.6pt
+ \ifnum\zw@scale<1000
+ \zw@isbnfsize .\zw@scale\zw@isbnfsize
+ \fi
+ \ifnum\zw@scale>1000
+ \def\zw@next##1##2##3##4.{\zw@isbnfsize ##1.##2##3##4\zw@isbnfsize}
+ \expandafter\zw@next\zw@scale.
+ \fi
+ \def\zw@isbnfont{\usefont{OT1}{phv}{mc}{n}\fontsize{\zw@isbnfsize}{\zw@isbnfsize}\selectfont}}
+\zw@eansetup@params
+
+\def\zw@EANisbn{\def\ISBNnum{\let\ocrbsmall\relax
+ \hbox to 96\X{\zw@isbnfont \kern .5\X ISBN\hss \zwean@ISBN}}\barheight=45.151515\X\relax
+ \expandafter\EAN \zwean@ISBN}
+
+\def\EANisbn{\@ifnextchar[\zw@eanwitharg\zw@EANisbn}
+
+\def\zw@eanwitharg{\begingroup \catcode`\-12 \zw@eanarg}
+\def\zw@eanarg[#1]{\setkeys{zwean}{#1}\zw@eansetup@params\zw@EANisbn\endgroup}
+
+\def\EANsetup{\begingroup \catcode`\-12 \zw@eansetup}
+\def\zw@eansetup#1{\endgroup \setkeys{zwean}{#1}\zw@eansetup@params}
+
+\def\ISBN{ISBN \zwean@ISBN}