% \iffalse meta-comment
%
% Copyright 1989-2003 Johannes L. Braams and any individual authors
% listed elsewhere in this file.  All rights reserved.
% 
% This file is part of the Babel system release 3.7.
% --------------------------------------------------
% 
% It may be distributed under the terms of the LaTeX Project Public
% License, as described in lppl.txt in the base LaTeX distribution.
% Either version 1.2 or, at your option, any later version.
% \fi
% \iffalse meta-comment
%
% Copyright 1997-2000 Boris Lavva and any individual authors
% listed elsewhere in this file.  All rights reserved.
% 
% For further copyright information see any other copyright notices in 
% this file.
% 
% This file is contributed to the Babel system release 3.7.
% ---------------------------------------------------------
%   This system is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
%   For error reports concerning UNCHANGED versions of this file no
%   more than one year old, see bugs.txt.
% 
%   Please do not request updates from me directly.  Primary
%   distribution is through the CTAN archives.
% 
% 
% IMPORTANT COPYRIGHT NOTICE:
% 
% You are NOT ALLOWED to distribute this file alone.
% 
% You are allowed to distribute this file under the condition that it
% is distributed together with all the files listed in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% Permission is granted to copy this file to another file with a
% clearly different name and to customize the declarations in that
% copy to serve the needs of your installation, provided that you
% comply with the conditions in the file legal.txt from the LaTeX2e
% distribution.
% 
% However, NO PERMISSION is granted to produce or to distribute a
% modified version of this file under its original name.
%  
% You are NOT ALLOWED to change this file.
% 
% File `hebinp.dtx' for installing the input hebrew encodings.
% Copyright (C) 1997 -- 2000 Boris Lavva.
%
% Babel package for LaTeX version 2e
% Copyright (C) 1989 -- 2000 by Johannes Braams,
%                            TeXniek
%                            All rights reserved.
% \fi
% \CheckSum{422}
%
% \iffalse
%<si960>  \ProvidesFile{si960.def}
%<8859-8> \ProvidesFile{8859-8.def}
%<cp862>  \ProvidesFile{cp862.def}
%<cp1255> \ProvidesFile{cp1255.def}
%<*driver>
\ProvidesFile{hebinp.drv}
%</driver>
% \fi
% \ProvidesFile{hebinp.dtx}
        [2000/09/26 v1.0a Input encoding file (test version)]
%
% \providecommand\dst{\textsc{docstrip}}
% \GetFileInfo{hebinp.dtx}
%
% \changes{hebinp~1.0a}{1997/12/07}{%
%    Initial version. Provides 8859-8, cp862, cp1255, and old 7-bit
%    input encodings (by Boris Lavva)}
%
% \section{Hebrew input encodings}\label{sec:hebinp}
%
% Hebrew input encodings defined in file |hebinp.dtx|\footnote{The
% files described in this section have version number \fileversion\
% and were last revised on \filedate.} should be used with |inputenc|
% \LaTeXe{} package. This package allows the user
% to specify an input encoding from this file (for example, ISO
% Hebrew/Latin 8859-8, IBM Hebrew codepage 862 or MS Windows
% Hebrew codepage 1255) by saying:
% \begin{quote}
%    |\usepackage[|\emph{encoding name}|]{inputenc}|
% \end{quote}
% The encoding can also be selected in the document with:
% \begin{quote}
%    |\inputencoding{|\emph{encoding name}|}|
% \end{quote}
% The only practical use of this command within a document is when
% using text from several documents to build up a composite work such
% as a volume of journal articles.  Therefore this command will be
% used only in vertical mode.
% 
% The encodings provided by this package are:
% \begin{itemize}
% \item |si960|  7-bit Hebrew encoding for the range 32--127. This
%       encoding also known as ``old-code'' and defined by Israeli
%       Standard SI-960. 
% \item |8859-8| ISO 8859-8 Hebrew/Latin encoding commonly used in
%       UNIX systems. This encoding also known as ``new-code'' and
%       includes hebrew letters in positions starting from 224.
% \item |cp862|  IBM 862 code page commonly used by DOS on
%       IBM-compatible personal computers. This encoding also known as
%       ``pc-code'' and includes hebrew letters in positions starting
%       from 128.
% \item |cp1255| MS Windows 1255 (hebrew) code page which is similar to
%       8859-8. In addition to hebrew letters, this encoding contains
%       also hebrew vowels and dots (nikud).
% \end{itemize}
% Each encoding has an associated |.def| file, for example
% |8859-8.def| which defines the behaviour of each input character,
% using the commands:
% \begin{quote}
%    |\DeclareInputText{|\emph{slot}|}{|\emph{text}|}| \\
%    |\DeclareInputMath{|\emph{slot}|}{|\emph{math}|}|
% \end{quote}
% This defines the input character \emph{slot} to be the
% \emph{text} material or \emph{math} material respectively.
% For example, |8859-8.def| defines slots |"EA| (letter alef)
% and |"B5| ($\mu$) by saying:
%\begin{verbatim}
%    \DeclareInputText{224}{\alef}
%    \DeclareInputMath{181}{\mu}
%\end{verbatim}
% Note that the \emph{commands} should be robust, and should not be
% dependent on the output encoding.  The same \emph{slot} should not
% have both a text and a math declaration for it. (This restriction
% may be removed in future releases of inputenc).
%
% The |.def| file may also define commands using the declarations:\\
% |\providecommand| or |\ProvideTextCommandDefault|.
% For example, |8859-8.def| defines:
%\begin{verbatim}
%    \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
%    \DeclareInputText{188}{\textonequarter}
%\end{verbatim}
%    The use of the `provide' forms here will ensure that a
%    better definition will not be over-written; their use is
%    recommended since, in general, the best defintion depends on the
%    fonts available.
%    
%    See the documentation in |inputenc.dtx| for details of how to
%    declare input definitions for various encodings.
%
% \StopEventually{}
%
% \iffalse
% \subsection{A driver for this document}
%
%    The next bit of code contains the documentation driver file for
%    \TeX{}, i.e., the file that will produce the documentation you
%    are currently reading. It will be extracted from this file by 
%    the \dst{} program.
%
%    \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
\title{Hebrew input encodings for use with \LaTeXe}
\author{Boris Lavva}
\date{Printed \today}
\begin{document}
   \maketitle
   \DocInput{hebinp.dtx}
\end{document}
%</driver>
%    \end{macrocode}
% \fi
%
% \subsection{Default definitions for characters}
%
%    First, we insert a |\makeatletter| at the beginning of all |.def|
%    files to use |@| symbol in the macros' names.
%    \begin{macrocode}
%<-driver>\makeatletter
%    \end{macrocode}
%
%    Some input characters map to internal functions which are not in
%    either the |T1| or |OT1| font encoding. For this reason default
%    definitions are provided in the encoding file: these will be
%    used unless some other output encoding is used which supports
%    those glyphs.  In some cases this default defintion has to be
%    simply an error message.
%
%    Note that this works reasonably well only because the encoding
%    files for both |OT1| and |T1| are loaded in the standard LaTeX
%    format.
%
%    \begin{macrocode}
%<*8859-8|cp862|cp1255>
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
%</8859-8|cp862|cp1255>
%<*8859-8|cp1255>
\ProvideTextCommandDefault{\textthreequarters}{\ensuremath{\frac34}}
%</8859-8|cp1255>
%<*cp862|cp1255>
\ProvideTextCommandDefault{\textflorin}{\textit{f}}
%</cp862|cp1255>
%<*cp862>
\ProvideTextCommandDefault{\textpeseta}{Pt}
%</cp862>
%    \end{macrocode}
%
%    The name |\textblacksquare| is derived from the AMS symbol name
%    since Adobe seem not to want this symbol.  The default
%    definition, as a rule, makes no claim to being a good design.
%    \begin{macrocode}
%<*cp862>
\ProvideTextCommandDefault{\textblacksquare}
   {\vrule \@width .3em \@height .4em \@depth -.1em\relax}
%</cp862>
%    \end{macrocode}
%
% Some commands can't be faked, so we have them generate an error
% message.
%     \begin{macrocode}
%<*8859-8|cp862|cp1255>
\ProvideTextCommandDefault{\textcent}
   {\TextSymbolUnavailable\textcent}
\ProvideTextCommandDefault{\textyen}
   {\TextSymbolUnavailable\textyen}
%</8859-8|cp862|cp1255>
%<*8859-8>
\ProvideTextCommandDefault{\textcurrency}
   {\TextSymbolUnavailable\textcurrency}
%</8859-8>
%<*cp1255>
\ProvideTextCommandDefault{\newsheqel}
   {\TextSymbolUnavailable\newsheqel}
%</cp1255>
%<*8859-8|cp1255>
\ProvideTextCommandDefault{\textbrokenbar}
   {\TextSymbolUnavailable\textbrokenbar}
%</8859-8|cp1255>
%<*cp1255>
\ProvideTextCommandDefault{\textperthousand}
   {\TextSymbolUnavailable\textperthousand}
%</cp1255>
%    \end{macrocode}
%
% Characters that are supposed to be used only in math will be defined
% by |\providecommand| because \LaTeXe{} assumes that the font
% encoding for math fonts is static.
%    \begin{macrocode}
%<*8859-8|cp1255>
\providecommand{\mathonesuperior}{{^1}}
\providecommand{\maththreesuperior}{{^3}}
%</8859-8|cp1255>
%<*8859-8|cp862|cp1255>
\providecommand{\mathtwosuperior}{{^2}}
%</8859-8|cp862|cp1255>
%<*cp862>
\providecommand{\mathordmasculine}{{^o}}
\providecommand{\mathordfeminine}{{^a}}
%</cp862>
%    \end{macrocode}
%
% \subsection{The SI-960 encoding}
%
% The SI-960 or ``old-code'' encoding only allows characters in the
% range 32--127, so we only need to provide an empty |si960.def| file.
%
% \subsection{The ISO 8859-8 encoding and the MS Windows cp1255 encoding}
%
%    The |8859-8.def| encoding file defines the characters in the ISO
%    8859-8 encoding.
%
%    The MS Windows Hebrew character set incorporates the Hebrew
%    letter repertoire of ISO 8859-8, and uses the same code points
%    (starting from 224). It has also some important additions in the
%    128--159 and 190--224 ranges.
%
%    \begin{macrocode}
%<*cp1255>
\DeclareInputText{130}{\quotesinglbase}
\DeclareInputText{131}{\textflorin}
\DeclareInputText{132}{\quotedblbase}
\DeclareInputText{133}{\dots}
\DeclareInputText{134}{\dag}
\DeclareInputText{135}{\ddag}
\DeclareInputText{136}{\^{}}
\DeclareInputText{137}{\textperthousand}
\DeclareInputText{139}{\guilsinglleft}
\DeclareInputText{145}{\textquoteleft}
\DeclareInputText{146}{\textquoteright}
\DeclareInputText{147}{\textquotedblleft}
\DeclareInputText{148}{\textquotedblright}
\DeclareInputText{149}{\textbullet}
\DeclareInputText{150}{\textendash}
\DeclareInputText{151}{\textemdash}
\DeclareInputText{152}{\~{}}
\DeclareInputText{153}{\texttrademark}
\DeclareInputText{155}{\guilsinglright}
%</cp1255>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*8859-8|cp1255>
\DeclareInputText{160}{\nobreakspace}
\DeclareInputText{162}{\textcent}
\DeclareInputText{163}{\pounds}
%<+8859-8>\DeclareInputText{164}{\textcurrency}
%<+cp1255>\DeclareInputText{164}{\newsheqel}
\DeclareInputText{165}{\textyen}
\DeclareInputText{166}{\textbrokenbar}
\DeclareInputText{167}{\S}
\DeclareInputText{168}{\"{}}
\DeclareInputText{169}{\textcopyright}
%<+8859-8>\DeclareInputMath{170}{\times}
\DeclareInputText{171}{\guillemotleft}
\DeclareInputMath{172}{\lnot}
\DeclareInputText{173}{\-}
\DeclareInputText{174}{\textregistered}
\DeclareInputText{175}{\@tabacckludge={}}
\DeclareInputText{176}{\textdegree}
\DeclareInputMath{177}{\pm}
\DeclareInputMath{178}{\mathtwosuperior}
\DeclareInputMath{179}{\maththreesuperior}
\DeclareInputText{180}{\@tabacckludge'{}}
\DeclareInputMath{181}{\mu}
\DeclareInputText{182}{\P}
\DeclareInputText{183}{\textperiodcentered}
%<+8859-8>\DeclareInputText{184}{\c\ }
\DeclareInputMath{185}{\mathonesuperior}
%<+8859-8>\DeclareInputMath{186}{\div}
\DeclareInputText{187}{\guillemotright}
\DeclareInputText{188}{\textonequarter}
\DeclareInputText{189}{\textonehalf}
\DeclareInputText{190}{\textthreequarters}
%</8859-8|cp1255>
%    \end{macrocode}
%
%    Hebrew vowels and dots (nikud) are included only to MS Windows cp1255
%    page and start from the position 192.
%    \begin{macrocode}
%<*cp1255>
\DeclareInputText{192}{\sheva}
\DeclareInputText{193}{\hatafsegol}
\DeclareInputText{194}{\hatafpatah}
\DeclareInputText{195}{\hatafqamats}
\DeclareInputText{196}{\hiriq}
\DeclareInputText{197}{\tsere}
\DeclareInputText{198}{\segol}
\DeclareInputText{199}{\patah}
\DeclareInputText{200}{\qamats}
\DeclareInputText{201}{\holam}
\DeclareInputText{203}{\qubuts}
\DeclareInputText{204}{\dagesh}
\DeclareInputText{205}{\meteg}
\DeclareInputText{206}{\maqaf}
\DeclareInputText{207}{\rafe}
\DeclareInputText{208}{\paseq}
\DeclareInputText{209}{\shindot}
\DeclareInputText{210}{\sindot}
\DeclareInputText{211}{\sofpasuq}
\DeclareInputText{212}{\doublevav}
\DeclareInputText{213}{\vavyod}
\DeclareInputText{214}{\doubleyod}
%</cp1255>
%    \end{macrocode}
%
%    Hebrew letters start from the position 224 in both encodings.
%    \begin{macrocode}
%<*8859-8|cp1255>
\DeclareInputText{224}{\alef}
\DeclareInputText{225}{\bet}
\DeclareInputText{226}{\gimel}
\DeclareInputText{227}{\dalet}
\DeclareInputText{228}{\he}
\DeclareInputText{229}{\vav}
\DeclareInputText{230}{\zayin}
\DeclareInputText{231}{\het}
\DeclareInputText{232}{\tet}
\DeclareInputText{233}{\yod}
\DeclareInputText{234}{\finalkaf}
\DeclareInputText{235}{\kaf}
\DeclareInputText{236}{\lamed}
\DeclareInputText{237}{\finalmem}
\DeclareInputText{238}{\mem}
\DeclareInputText{239}{\finalnun}
\DeclareInputText{240}{\nun}
\DeclareInputText{241}{\samekh}
\DeclareInputText{242}{\ayin}
\DeclareInputText{243}{\finalpe}
\DeclareInputText{244}{\pe}
\DeclareInputText{245}{\finaltsadi}
\DeclareInputText{246}{\tsadi}
\DeclareInputText{247}{\qof}
\DeclareInputText{248}{\resh}
\DeclareInputText{249}{\shin}
\DeclareInputText{250}{\tav}
%</8859-8|cp1255>
%    \end{macrocode}
%
%    Special symbols which define the direction of symbols explicitly.
%    Currently, they are not used in \LaTeX.
%    \begin{macrocode}
%<*cp1255>
\DeclareInputText{253}{\lefttorightmark}
\DeclareInputText{254}{\righttoleftmark}
%</cp1255>
%    \end{macrocode}
%
% \subsection{The IBM code page 862}
%
% The |cp862.def| encoding file defines the characters in the IBM
% codepage 862 encoding. The DOS graphics `letters' and a few
% other positions are ignored (left undefined).
%
%    Hebrew letters start from the position 128.
%    \begin{macrocode}
%<*cp862>
\DeclareInputText{128}{\alef}
\DeclareInputText{129}{\bet}
\DeclareInputText{130}{\gimel}
\DeclareInputText{131}{\dalet}
\DeclareInputText{132}{\he}
\DeclareInputText{133}{\vav}
\DeclareInputText{134}{\zayin}
\DeclareInputText{135}{\het}
\DeclareInputText{136}{\tet}
\DeclareInputText{137}{\yod}
\DeclareInputText{138}{\finalkaf}
\DeclareInputText{139}{\kaf}
\DeclareInputText{140}{\lamed}
\DeclareInputText{141}{\finalmem}
\DeclareInputText{142}{\mem}
\DeclareInputText{143}{\finalnun}
\DeclareInputText{144}{\nun}
\DeclareInputText{145}{\samekh}
\DeclareInputText{146}{\ayin}
\DeclareInputText{147}{\finalpe}
\DeclareInputText{148}{\pe}
\DeclareInputText{149}{\finaltsadi}
\DeclareInputText{150}{\tsadi}
\DeclareInputText{151}{\qof}
\DeclareInputText{152}{\resh}
\DeclareInputText{153}{\shin}
\DeclareInputText{154}{\tav}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareInputText{155}{\textcent}
\DeclareInputText{156}{\pounds}
\DeclareInputText{157}{\textyen}
\DeclareInputText{158}{\textpeseta}
\DeclareInputText{159}{\textflorin}
\DeclareInputText{160}{\@tabacckludge'a}
\DeclareInputText{161}{\@tabacckludge'\i}
\DeclareInputText{162}{\@tabacckludge'o}
\DeclareInputText{163}{\@tabacckludge'u}
\DeclareInputText{164}{\~n}
\DeclareInputText{165}{\~N}
\DeclareInputMath{166}{\mathordfeminine}
\DeclareInputMath{167}{\mathordmasculine}
\DeclareInputText{168}{\textquestiondown}
\DeclareInputMath{170}{\lnot}
\DeclareInputText{171}{\textonehalf}
\DeclareInputText{172}{\textonequarter}
\DeclareInputText{173}{\textexclamdown}
\DeclareInputText{174}{\guillemotleft}
\DeclareInputText{175}{\guillemotright}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareInputMath{224}{\alpha}
\DeclareInputText{225}{\ss}
\DeclareInputMath{226}{\Gamma}
\DeclareInputMath{227}{\pi}
\DeclareInputMath{228}{\Sigma}
\DeclareInputMath{229}{\sigma}
\DeclareInputMath{230}{\mu}
\DeclareInputMath{231}{\tau}
\DeclareInputMath{232}{\Phi}
\DeclareInputMath{233}{\Theta}
\DeclareInputMath{234}{\Omega}
\DeclareInputMath{235}{\delta}
\DeclareInputMath{236}{\infty}
\DeclareInputMath{237}{\phi}
\DeclareInputMath{238}{\varepsilon}
\DeclareInputMath{239}{\cap}
\DeclareInputMath{240}{\equiv}
\DeclareInputMath{241}{\pm}
\DeclareInputMath{242}{\ge}
\DeclareInputMath{243}{\le}
\DeclareInputMath{246}{\div}
\DeclareInputMath{247}{\approx}
\DeclareInputText{248}{\textdegree}
\DeclareInputText{249}{\textperiodcentered}
\DeclareInputText{250}{\textbullet}
\DeclareInputMath{251}{\surd}
\DeclareInputMath{252}{\mathnsuperior}
\DeclareInputMath{253}{\mathtwosuperior}
\DeclareInputText{254}{\textblacksquare}
\DeclareInputText{255}{\nobreakspace}
%</cp862>
%    \end{macrocode}
%
%    Finally, we reset the category code of the |@| sign at the end of
%    all |.def| files.
%    \begin{macrocode}
%<-driver>\makeatother
%    \end{macrocode}
%
% \Finale
%%
%% \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         \~}
\endinput
