diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ocr-latex/ocr.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ocr-latex/ocr.sty | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ocr-latex/ocr.sty b/Master/texmf-dist/tex/latex/ocr-latex/ocr.sty new file mode 100644 index 00000000000..02d125c3159 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ocr-latex/ocr.sty @@ -0,0 +1,42 @@ +\ProvidesPackage{ocr}[2006/09/18 LaTeX support for the various OCR +fonts. Created by Palle Jorgensen, hamselv@pallej.dk] + +\RequirePackage{ifthen} + +\def\ocrdefault{ocrb} +\DeclareOption{ocr-a}{\def\ocrdefault{ocra}} +\DeclareOption{oca}{\def\ocrdefault{oca}% + \PackageWarning{ocr}{The OCA fonts are buggy. Use the 'ocr-a' option + to get proper OCR-A fonts.^^J}} +\DeclareOption{ocr-b}{\def\ocrdefault{ocrb}} +\DeclareOption{ocr-b-outline}{\def\ocrdefault{ocrbo}} +\DeclareOption{ocr-b-negative}{\def\ocrdefault{ocrbn}} +\DeclareOption{ocr-b-sharp}{\def\ocrdefault{ocrbs}% + \PackageWarning{ocr}{The sharp OCR-B fonts are buggy. Use with care.^^J}} +\DeclareOption{ocr-b-sharp-negative}{\def\ocrdefault{ocrbns}% + \PackageWarning{ocr}{The sharp OCR-B fonts are buggy. Use with care.^^J}} +\ProcessOptions* + +\def\ocrfamily{\fontencoding{OT1}\fontfamily{\ocrdefault}\selectfont} +\DeclareTextFontCommand{\ocr}{\ocrfamily} + +\def\ocrnegfamily{% + \ifthenelse{\equal{\ocrdefault}{ocrb}}{}{% + \PackageWarning{ocr}{% + Using the 'negative OCR-B' fonts without using the\MessageBreak + OCR-B fonts may give a funny result.^^J}} + \fontencoding{OT1}\fontfamily{ocrbn}\selectfont} + +\def\ocrs@negfamily{% + \ifthenelse{\equal{\ocrdefault}{ocrbs}}{}{ + \PackageWarning{ocr}{% + Using the 'negative OCR-B Sharp' fonts without using the\MessageBreak + OCR-B Sharp fonts may give a funny result.^^J}} + \fontencoding{OT1}\fontfamily{ocrbns}\selectfont} + +\ifthenelse{\equal{\ocrdefault}{ocrbs}}{% + \def\ocrnegfamily{\ocrs@negfamily}}{} + +\DeclareTextFontCommand{\ocrneg}{\ocrnegfamily} + +\endinput
\ No newline at end of file |