diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/tex/latex/barcode2/barcodes.sty | 146 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/barcode2/code39.tex | 234 |
2 files changed, 380 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/barcode2/barcodes.sty b/Master/texmf-dist/tex/latex/barcode2/barcodes.sty new file mode 100644 index 00000000000..0fc0e02d9b5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/barcode2/barcodes.sty @@ -0,0 +1,146 @@ +%% +%% This is file `barcodes.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% barcodes.dtx (with options: `bcsty') +%% As this is a generated file, you may perhaps not want to edit it. +%% This file belongs to the barcode package. +%% It may be of no great use without the rest of the barcode package. +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Options for using barcodes %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% documented in bcfaq.tex %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% itf stuff +%% general +\font\itf=wlitf scaled 1200 +%% barcodes with depth +\def\bcbox#1{\lower3pt\hbox{\itf +#1-}} +%% barcodes made taller +\newbox\bsavebox +\newdimen\bcboxdepth +\bcboxdepth=4pt +\def\bdbox#1{\setbox\bsavebox\hbox{\itf +#1-} +\vbox{\hsize=\wd\bsavebox\offinterlineskip% +\copy\bsavebox% +\vskip-\ht\bsavebox\vskip\bcboxdepth% +\box\bsavebox\vskip-\bcboxdepth}} +\def\bebox#1{\setbox\bsavebox\hbox{\itf +#1-} +\vbox{\hsize=\wd\bsavebox\offinterlineskip% +\copy\bsavebox% +\copy\bsavebox% +\vskip-\ht\bsavebox\vskip\bcboxdepth% +\box\bsavebox\vskip-\bcboxdepth}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Code 128 stuff +\font\fntcxx=wlc128 scaled \magstep3 +\def\CXXVIII{\bgroup\fntcxx\let\next\hexchar\next} +\def\cxxviii{\message{OOPS, use codean.pl}} +\def\hexchar#1#2{\if#1@ + \global\let\next\egroup + \else\char"#1#2\fi\next} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Code 11 stuff +\font\codxifnt=wlc11 scaled\magstep2 +%% relies on counters \cha and \chb defined below +\newif\ifcodexichecksumk +\codexichecksumkfalse +\makeatletter +\def\check@xichar{% +\ifcodexichecksumk% +{\count0=\cha\count1=\count0\divide\count1by11% + \multiply\count1by11\advance\count0by-\count1% + \ifnum10=\count0-\else\relax\the\count0\fi% + \global\advance\chb by\count0\global\advance\cha by\chb% +}\fi +\chb=\cha\divide\chb by11% +\multiply\chb by11\advance\cha by-\chb% +\ifnum10=\cha-\else\the\cha\fi% +} +\def\csumxi#1{% +\if @#1% +\let\next\check@xichar% +\else \if-#1\advance\chb by10% +\else\advance\chb by#1% +\fi% +\advance\cha by\chb% +#1% +\fi% +\next% +} +\makeatother +\def\codxi#1{{ +\codxifnt +\cha=0\chb=0% +@\let\next\csumxi\expandafter\expandafter\expandafter\csumxi#1@@ +}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\font\codtnfnt=wlc39 scaled\magstep2 +\def\codxxxix#1{{\codtnfnt @#1@}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EAN stuff +%% this code comes from Kalvis M. Jansons +%% eMail: <kalvis@math.ucl.ac.uk> +%% +\font\eanfont=WLEAN scaled 2000 +\def\ean#1{\vbox{\vskip20pt\eanfont#1\vskip20pt}} +\newcount\num +\def\a#1{\num=#1 \advance\num by `A \char\num} +\def\b#1{\num=#1 \advance\num by `a \char\num} +\def\c#1{\num=#1 \advance\num by `K \char\num} +\def\C#1#2#3#4#5#6{\c#1\c#2\c#3\c#4\c#5\c#6} +\def\A#1#2#3#4#5#6#7{\ifcase #7 +{\a#1\a#2\a#3\a#4\a#5\a#6}% +\or {\a#1\a#2\b#3\a#4\b#5\b#6}% +\or {\a#1\a#2\b#3\b#4\a#5\b#6}% +\or {\a#1\a#2\b#3\b#4\b#5\a#6}% +\or {\a#1\b#2\a#3\a#4\b#5\b#6}% +\or {\a#1\b#2\b#3\a#4\a#5\b#6}% +\or {\a#1\b#2\b#3\b#4\a#5\a#6}% +\or {\a#1\b#2\a#3\b#4\a#5\b#6}% +\or {\a#1\b#2\a#3\b#4\b#5\a#6}% +\or {\a#1\b#2\b#3\a#4\b#5\a#6}% +\fi} +\newcount\cha +\newcount\chb +\makeatletter +\long\def\for{\@for} +\makeatother +\gdef\mysix#1#2#3#4#5#6{,#1#2,#3#4,#5#6} +\gdef\mywork#1#2{\advance\cha by #1 \advance\chb by #2} +\gdef\barch#1.#2.#3.{ +\xdef\mylist{0#1\mysix#2\mysix#3} +\cha=0 +\chb=0 +\for \x:=\mylist\do{\expandafter\mywork\x} +\multiply\cha by 3 +\advance\chb by \cha +\cha=\chb +\divide\cha by 10 +\multiply\cha by -10 +\advance\chb by \cha} +\def\bar#1.#2.#3.{\barch#1.#2.#3. +\ifnum\chb>0 #1#2#3 has a bad check sum!\\[20pt] +\else \ean{#1 +\A#2#1-\C#3+}\fi} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `barcodes.sty'. diff --git a/Master/texmf-dist/tex/latex/barcode2/code39.tex b/Master/texmf-dist/tex/latex/barcode2/code39.tex new file mode 100644 index 00000000000..5d751c1017d --- /dev/null +++ b/Master/texmf-dist/tex/latex/barcode2/code39.tex @@ -0,0 +1,234 @@ +%% +%% This is file `code39.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% barcodes.dtx (with options: `code39mac') +%% As this is a generated file, you may perhaps not want to edit it. +%% This file belongs to the barcode package. +%% It may be of no great use without the rest of the barcode package. +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +%%% ==================================================================== +%%% @TeX-file{ +%%% author = "Peter Willadt", +%%% version = "1", +%%% date = "16 August 1997", +%%% time = "10:00:00 GMT", +%%% filename = "code39.tex", +%%% address = "Peter Willadt +%%% Heinrich-Wieland-Allee 5 +%%% 75177 Pforzheim +%%% Germany", +%%% email = "Willadt@t-online.de", +%%% codetable = "ISO/ASCII", +%%% keywords = "Barcode, Code39, TeX", +%%% abstract = "This file contains macros to support the inclusion +%%% of code 39 barcode in TeX documents.", +%%% } +%%% ==================================================================== +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This code supports barcodes in Code 39 +%% Usage: +%% For alphanumerical barcodes: +%% \begincodethirtynine followed by +%% the stuff to code, +%% ended with \endcodethirtynine +%% For numerical only code: +%% modify the code for pharamceuticals +%% For german pharmaceutics: +%% \pzncode1234562@ when 1234562 is the +%% number to be coded as -1234562. +%% this will also verify the checksum +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This file may be freely used without any +%% further permission. +%% It comes with absolutely no warranty. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% this is the common stuff +\newdimen\dick +\newdimen\duenn +\newdimen\duennbar +\newdimen\dickbar +\newdimen\antibleed +\dick=1mm +\duenn=0.5mm +\antibleed=0mm +\dickbar=\dick +\advance\dickbar by -\antibleed +\duennbar=\duenn +\advance\duennbar by -\antibleed +\def\b{\vrule width\duennbar} +\def\B{\vrule width\dickbar} +\def\s{\hskip\duenn\hskip\antibleed} +\def\S{\hskip\dick\hskip\antibleed} +%% + \def\tnzero{\b\s\b\S\B\s\B\s\b\s} + \def\tnone{\B\s\b\S\b\s\b\s\B\s} + \def\tntwo{\b\s\B\S\b\s\b\s\B\s} +\def\tnthree{\B\s\B\S\b\s\b\s\b\s} + \def\tnfour{\b\s\b\S\B\s\b\s\B\s} + \def\tnfive{\B\s\b\S\B\s\b\s\b\s} + \def\tnsix{\b\s\B\S\B\s\b\s\b\s} +\def\tnseven{\b\s\b\S\b\s\B\s\B\s} +\def\tneight{\B\s\b\S\b\s\B\s\b\s} + \def\tnnine{\b\s\B\S\b\s\B\s\b\s} + \def\tninestart{\b\S\b\s\B\s\B\s\b\s} + \def\tnineminus{\b\S\b\s\b\s\B\s\B\s} + \def\tnineplus{\b\S\b\s\b\S\b\S\b\s} +\def\tninedollar{\b\S\b\S\b\S\b\s\b\s} + \def\tnineslash{\b\S\b\S\b\s\b\S\b\s} + \def\tninedot{\B\S\b\s\b\s\B\s\b\s} +\def\tninepercnt{\b\s\b\S\b\S\b\S\b\s} + \def\tninespace{\b\S\B\s\b\s\B\s\b\s} +\def\tninelettera{\B\s\b\s\b\S\b\s\B\s} +\def\tnineletterb{\b\s\B\s\b\S\b\s\B\s} +\def\tnineletterc{\B\s\B\s\b\S\b\s\b\s} +\def\tnineletterd{\b\s\b\s\B\S\b\s\B\s} +\def\tninelettere{\B\s\b\s\B\S\b\s\b\s} +\def\tnineletterf{\b\s\B\s\B\S\b\s\b\s} +\def\tnineletterg{\b\s\b\s\b\S\B\s\B\s} +\def\tnineletterh{\B\s\b\s\b\S\B\s\b\s} +\def\tnineletteri{\b\s\B\s\b\S\B\s\b\s} +\def\tnineletterj{\b\s\b\s\B\S\B\s\b\s} +\def\tnineletterk{\B\s\b\s\b\s\b\S\B\s} +\def\tnineletterl{\b\s\B\s\b\s\b\S\B\s} +\def\tnineletterm{\B\s\B\s\b\s\b\S\b\s} +\def\tninelettern{\b\s\b\s\B\s\b\S\B\s} +\def\tninelettero{\B\s\b\s\B\s\b\S\b\s} +\def\tnineletterp{\b\s\B\s\B\s\b\S\b\s} +\def\tnineletterq{\b\s\b\s\b\s\B\S\B\s} +\def\tnineletterr{\B\s\b\s\b\s\B\S\b\s} +\def\tnineletters{\b\s\B\s\b\s\B\S\b\s} +\def\tninelettert{\b\s\b\s\B\s\B\S\b\s} +\def\tnineletteru{\B\S\b\s\b\s\b\s\B\s} +\def\tnineletterv{\b\S\B\s\b\s\b\s\B\s} +\def\tnineletterw{\B\S\B\s\b\s\b\s\b\s} +\def\tnineletterx{\b\S\b\s\B\s\b\s\B\s} +\def\tninelettery{\B\S\b\s\B\s\b\s\b\s} +\def\tnineletterz{\b\S\B\s\B\s\b\s\b\s} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% this is the code for 39 mode +\def\activatethemall{ +\catcode`\A=\active \catcode`\B=\active +\catcode`\C=\active \catcode`\D=\active +\catcode`\E=\active \catcode`\F=\active +\catcode`\G=\active \catcode`\H=\active +\catcode`\I=\active \catcode`\J=\active +\catcode`\K=\active \catcode`\L=\active +\catcode`\M=\active \catcode`\N=\active +\catcode`\O=\active \catcode`\P=\active +\catcode`\Q=\active \catcode`\R=\active +\catcode`\S=\active \catcode`\T=\active +\catcode`\U=\active \catcode`\V=\active +\catcode`\W=\active \catcode`\X=\active +\catcode`\Y=\active \catcode`\Z=\active +\catcode`+=\active \catcode`-=\active +\catcode`\ =\active \catcode`.=\active +\catcode`\$=\active \catcode`\%=\active +\catcode`\/=\active +\catcode`\0=\active \catcode`\1=\active +\catcode`\2=\active \catcode`\3=\active +\catcode`\4=\active \catcode`\5=\active +\catcode`\6=\active \catcode`\7=\active +\catcode`\8=\active \catcode`\9=\active +} +{\activatethemall +\gdef\begincodethirtynine{ +\bgroup\activatethemall\strut\tninestart +\letA=\tninelettera \letB=\tnineletterb +\letC=\tnineletterc \letD=\tnineletterd +\letE=\tninelettere \letF=\tnineletterf +\letG=\tnineletterg \letH=\tnineletterh +\letI=\tnineletteri \letJ=\tnineletterj +\letK=\tnineletterk \letL=\tnineletterl +\letM=\tnineletterm \letN=\tninelettern +\letO=\tninelettero \letP=\tnineletterp +\letQ=\tnineletterq \letR=\tnineletterr +\letS=\tnineletters \letT=\tninelettert +\letU=\tnineletteru \letV=\tnineletterv +\letW=\tnineletterw \letX=\tnineletterx +\letY=\tninelettery \letZ=\tnineletterz +\let+=\tnineplus \let-=\tnineminus +\let =\tninespace \let.=\tninedot +\let$=\tninedollar \let%=\tninepercnt +\let/=\tnineslash +\let0=\tnzero \let1=\tnone +\let2=\tntwo \let3=\tnthree +\let4=\tnfour \let5=\tnfive +\let6=\tnsix \let7=\tnseven +\let8=\tneight \let9=\tnnine +} +} +\def\endcodethirtynine{ +\tninestart\egroup +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% this code is used for german pharmaceutics +\newcount\ziffern +\newcount\checksum +\newcount\multreg +\def\tndigit#1{% + \ifcase#1\tnzero\or\tnone% + \or\tntwo\or\tnthree% + \or\tnfour\or\tnfive% + \or\tnsix\or\tnseven% + \or\tneight\or\tnnine% + \fi} +\def\endtncode{% + \tninestart% + \ifnum\ziffern=9 + \else\message{wrong digit count} + \fi% + \ifnum\checksum=0 + \else\message{wrong checksum} + \fi% + \egroup} +\def\nexttn#1{% + \advance\ziffern by1 + \if@#1\let\next\endtncode + \else + \tndigit#1% + \ifnum\ziffern=8 + \multreg=\checksum + \divide\multreg by 11 + \multiply\multreg by 11 + \advance\checksum by-\multreg + \multreg=#1 + \advance\checksum by-\multreg + \ifnum\checksum=10 + \checksum=0 + \fi + \else + \multreg=#1 + \multiply\multreg by\ziffern + \advance\checksum by\multreg + \fi% + \fi% + \next} +\def\pzncode{ + \bgroup + \let\next\nexttn + \ziffern=1\checksum=0\multreg=0 + \strut + \tninestart\tnineminus% + \next% +} +\endinput +%% +%% End of file `code39.tex'. |