[Debian-hebrew-package] [svn] r408 - in pkg/ivritex/branches/upstream/current: . example/letter example/tests example/thesis fonts fonts/culmus latex/hebclass latex/heblatex utils

Lior Kaplan kaplan-guest at costa.debian.org
Sat Apr 15 00:19:27 UTC 2006


Author: kaplan-guest
Date: Sat Apr 15 00:19:15 2006
New Revision: 408

Added:
   pkg/ivritex/branches/upstream/current/ChangeLog
   pkg/ivritex/branches/upstream/current/example/tests/fonts.tex
   pkg/ivritex/branches/upstream/current/fonts/culmus/
   pkg/ivritex/branches/upstream/current/fonts/culmus/Makefile
   pkg/ivritex/branches/upstream/current/fonts/culmus/culmus-he8.enc
   pkg/ivritex/branches/upstream/current/fonts/culmus/type12plain   (contents, props changed)
   pkg/ivritex/branches/upstream/current/latex/hebclass/PPRheb-prosper.sty
Modified:
   pkg/ivritex/branches/upstream/current/Makefile
   pkg/ivritex/branches/upstream/current/README
   pkg/ivritex/branches/upstream/current/example/letter/heblet.tex
   pkg/ivritex/branches/upstream/current/example/tests/Makefile
   pkg/ivritex/branches/upstream/current/example/thesis/thesis.tex
   pkg/ivritex/branches/upstream/current/files_list
   pkg/ivritex/branches/upstream/current/fonts/README
   pkg/ivritex/branches/upstream/current/ivritex.mk
   pkg/ivritex/branches/upstream/current/ivritex.spec
   pkg/ivritex/branches/upstream/current/ivritex.spec.in
   pkg/ivritex/branches/upstream/current/latex/hebclass/Makefile
   pkg/ivritex/branches/upstream/current/latex/hebclass/hebtech.dtx
   pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.cls
   pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.tex
   pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.cls
   pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.tex
   pkg/ivritex/branches/upstream/current/latex/heblatex/hebinp.dtx
   pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.dtx
   pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.fdd
   pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.ins
   pkg/ivritex/branches/upstream/current/utils/transheb.pl   (contents, props changed)
Log:
Load /tmp/tmp.rW9DRo/ivritex-1.2.1 into
pkg/ivritex/branches/upstream/current.


Modified: pkg/ivritex/branches/upstream/current/Makefile
==============================================================================
--- pkg/ivritex/branches/upstream/current/Makefile	(original)
+++ pkg/ivritex/branches/upstream/current/Makefile	Sat Apr 15 00:19:15 2006
@@ -1,4 +1,13 @@
-SUBDIRS=latex/heblatex latex/hebclass fonts bibtex/hebbib example
+ifndef use_oldfonts
+  hebfonts=
+  culmus=fonts/culmus
+else
+  hebfonts=fonts
+  culmus=
+endif
+#SUBDIRS=latex/heblatex latex/hebclass fonts bibtex/hebbib example
+SUBDIRS=latex/heblatex $(hebfots) $(culmus) latex/hebclass \
+	bibtex/hebbib example
 
 include ivritex.mk
 
@@ -23,6 +32,17 @@
 	done
 	$(TAR) -cvzf $(TAR_BALL) $(TAR_BALL_DIR)
 
+dist: $(TAR_BALL_DIST)
+
+# initial version. TODO: parametrize
+$(TAR_BALL_DIST): all
+	$(RM) -r $(TAR_BALL_DIST_DIR)
+	#$(MKDIR) -p $(TAR_BALL_DIST_DIR)/texmf
+	make install DESTDIR=$(PWD)/$(TAR_BALL_DIST_DIR) \
+	  TEX_ROOT=$(PWD)/$(TAR_BALL_DIST_DIR)/texmf
+	$(CP) README $(TAR_BALL_DIST_DIR)/
+	$(TAR) -cvzf $(TAR_BALL_DIST) $(TAR_BALL_DIST_DIR)
+
 rpm: $(TAR_BALL)
 	rpm -tb $(TAR_BALL)
 

Modified: pkg/ivritex/branches/upstream/current/README
==============================================================================
--- pkg/ivritex/branches/upstream/current/README	(original)
+++ pkg/ivritex/branches/upstream/current/README	Sat Apr 15 00:19:15 2006
@@ -17,15 +17,17 @@
 bibtex: BibTeX styles for support of hebrew
 utils: Various scripts and such
 
-Installation:
+INSTALLATION:
 """"""""""""
+
 On a unix system:
+""""""""""""""""
 
 run 'make TEX_ROOT=<YOUR_TEXMF_DIR> install'
 
 or 'make' as a user and later 'make TEX_ROOT=<YOUR_TEXMF_DIR> install' as
 root. By default <TEXMFDIR> is /usr/local/share/texmf , but your system may
-have a different value, e.g: /usr/shar/texmf , /usr/local/lib/texmf
+have a different value, e.g: /usr/share/texmf , /usr/local/lib/texmf
 
 'make' will create the heblatex files and hebclass files. It will also typeset 
 the sample documents using those files.
@@ -33,10 +35,20 @@
 'make install' will install all of the generated files (except the examples).
 
 
+From the dist Package:
+""""""""""""""""""""""
+The dist package includes an installed texmf tree. Locate the root of 
+texmf on your system and run:
+
+  cp -R texmf/ /path/to/texmfdir/
+
+
 On other systems:
+""""""""""""""""
 TODO: fill in instructions
 
 
+
 Note: currently the hebrew babel files install (in the tex tree) under 
 
   tex/generic/0ivritex
@@ -50,3 +62,91 @@
 This is not guaranteed to work by libkpathsea's specs, although it works with
 its implementation. Anyway this hack is only temporary, until those files are 
 merged into babel.
+
+The Culmus Fonts:
+""""""""""""""""
+The package will build by default with the culmus fonts.
+The following options can be passed to the toplevel make at build-time
+to customize this:
+
+To avoid using the culmus fonts, and use the original hebfonts:
+
+  make use_oldfonts=1
+  
+Note that this is not recommended and currently not tested. It also 
+requires that you change the default encoding from HE8 to LHE.
+(TODO: explain how)
+
+  make culmusdir=/path/to/culmus/fonts
+  
+    By defualt the culmus fonts are taken from 
+    /usr/share/fonts/he/Type1 , which is where they are installed by the
+    current culmus-fonts package from culmus.sf.net . If you use
+    a different path (e.g: the redha/mandrake path, or you installed it
+    manually elsewhere) you can use this parameter.
+  
+  
+  make is_debian=1
+
+    use the culmus fonts from the debian package of culmus (a 
+    workaround as they are not alone in a directory)
+
+
+  make use_symlinks=1
+
+    By default the culmus fonts are copied, and thus a different copy of
+    them is created. With this option the files are merely symlinks.
+
+
+Building from the CVS:
+"""""""""""""""""""""
+The latest version [*] of ivritex can be grabbed from the CVS 
+repository on SF.net . The instructions below are for the unix 
+command-line cvs.
+
+See also:
+
+  https://sourceforge.net/cvs/?group_id=33341
+
+1. Login: (you'll only need this once). The password is empty: just
+   press enter when prompted:
+
+   cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/ivritex login
+
+2. Get the tree from the server:
+
+   cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/ivritex get ivritex
+
+3. This will create the source tree in the subdirectory "ivritex".
+   Note that before creating a tar or an rpm, you'll need to create
+   files_list . In the ivritex subdirectory run:
+
+   make update_list
+
+[*] Note that currently the public CVS of sourceforge may be up 
+    to 1 day behind the maintainers' CVS, as it is a copy of it.
+
+Known issues:
+""""""""""""
+* Due to a bug in the culmus fonts (version <= 0.90) it has an extra 
+  unnecessary ligature of lamed-alef. (TODO: perl one-liner to remove 
+  it from original fonts)
+
+* In certain systems the generated postscript has no DSC comments and 
+  thus it is impossible to page page etc. This is due to a bug in 
+  certain versions of dvips. The versions in RedHat 7.3 and in SuSE 7.1
+  are known to be bad, whereas the versions in SuSE 8.2, and debian 
+  unstable are known to be good.
+
+* There is currently no known way to use oldcode (7bit (yuck!)) input
+  mode with the Culmus fonts. This means that the compatibility mode 
+  can't work out-of-the-box, and will require the old fonts.
+
+* Tables are not reversed.
+
+* A reference in math mode:   
+
+    \label{A} $\ref{A}$   
+
+ Fails on the second latex run.
+

Modified: pkg/ivritex/branches/upstream/current/example/letter/heblet.tex
==============================================================================
--- pkg/ivritex/branches/upstream/current/example/letter/heblet.tex	(original)
+++ pkg/ivritex/branches/upstream/current/example/letter/heblet.tex	Sat Apr 15 00:19:15 2006
@@ -70,21 +70,27 @@
 \item \Hebrewdate{\d}{\m}{\y}
 \end{itemize}
 
-\textclas{ãåâîà ÷öøú àê îøàä \textsl{ùðéúï ìäùúîù áâåôðéí} ëøöåðëí \ldots}
+\newcommand{\text}
+  {ãåâîà \textbf{÷öøä} àê îøàä \textsl{ùðéúï \textbf{ìäùúîù} áâåôðéí} 
+  ëøöåðëí \ldots}
+% original hebfonts, may be emulated by culmus. see hebfonts.sty:
+\L{\texttt{clas} } \textclas {\text} \\
+\L{\texttt{shold}} \textshold{\text} \\
+\L{\texttt{shscr}} \textshscr{\text} \\
+\L{\texttt{shstk}} \textshstk{\text} \\
+\L{\texttt{fr}   } \textfr   {\text} \\
+\L{\texttt{redis}} \textredis{\text} \\
+\L{\texttt{crml} } \textcrml {\text} \\
+
+% culmus fonts: 
+\L{\texttt{aha}} \textaha{\text} \\
+\L{\texttt{dav}} \textdav{\text} \\
+\L{\texttt{dru}} \textdru{\text} \\
+\L{\texttt{el} } \textel {\text} \\
+\L{\texttt{mir}} \textmir{\text} \\
+\L{\texttt{na} } \textna {\text} \\
+\L{\texttt{yad}} \textyad{\text} \\
 
-\textshold{ãåâîà ÷öøú àê îøàä ùðéúï ìäùúîù áâåôðéí ëøöåðëí \ldots}
-
-\textshscr{ãåâîà ÷öøú àê îøàä ùðéúï ìäùúîù áâåôðéí ëøöåðëí \ldots}
-
-\textshstk{ãåâîà ÷öøú àê îøàä ùðéúï ìäùúîù áâåôðéí ëøöåðëí \ldots}
-
-\textfr{ãåâîà ÷öøú àê îøàä \textsl{ùðéúï ìäùúîù} \textbf{áâåôðéí} ëøöåðëí
-\ldots}
-
-\textredis{ãåâîà ÷öøú àê îøàä \textsl{ùðéúï ìäùúîù} \textbf{áâåôðéí} ëøöåðëí
-\ldots}
-
-\textcrml{ãåâîà ÷öøú àê îøàä \textsl{ùðéúï ìäùúîù áâåôðéí} ëøöåðëí \ldots}
 
 \begin{enumerate}
 \item øàùåï àê ìà àçøåï

Modified: pkg/ivritex/branches/upstream/current/example/tests/Makefile
==============================================================================
--- pkg/ivritex/branches/upstream/current/example/tests/Makefile	(original)
+++ pkg/ivritex/branches/upstream/current/example/tests/Makefile	Sat Apr 15 00:19:15 2006
@@ -1,4 +1,4 @@
-TEX_SRC=hebhello test_color
+TEX_SRC=hebhello test_color fonts
 
 ROOT_DIR=../..
 include $(ROOT_DIR)/ivritex.mk

Modified: pkg/ivritex/branches/upstream/current/example/thesis/thesis.tex
==============================================================================
--- pkg/ivritex/branches/upstream/current/example/thesis/thesis.tex	(original)
+++ pkg/ivritex/branches/upstream/current/example/thesis/thesis.tex	Sat Apr 15 00:19:15 2006
@@ -18,7 +18,7 @@
 % same holds true for the rest of the files which belong to this package. 
 % 
 \documentclass[12pt]{hebtech} 
-\usepackage[8859-8]{inputenc} 
+\usepackage[cp1255]{inputenc} 
 \usepackage{hebfont}
 \usepackage{latexsym} 
 \usepackage{epsf} 

Modified: pkg/ivritex/branches/upstream/current/files_list
==============================================================================
--- pkg/ivritex/branches/upstream/current/files_list	(original)
+++ pkg/ivritex/branches/upstream/current/files_list	Sat Apr 15 00:19:15 2006
@@ -1,3 +1,4 @@
+ChangeLog
 Makefile
 README
 ivritex.mk
@@ -15,6 +16,7 @@
 example/letter/Makefile
 example/letter/heblet.tex
 example/tests/Makefile
+example/tests/fonts.tex
 example/tests/hebhello.tex
 example/tests/test_color.tex
 example/thesis/Makefile
@@ -34,6 +36,9 @@
 example/thesis/tst2.eps
 fonts/GNUmakefile
 fonts/README
+fonts/culmus/Makefile
+fonts/culmus/culmus-he8.enc
+fonts/culmus/type12plain
 fonts/hebfonts/crml10.mf
 fonts/hebfonts/crmlsl10.mf
 fonts/hebfonts/deads10.mf
@@ -83,6 +88,7 @@
 fonts/omega_hebrew_he8/type1/OmegaHebrew.t3
 latex/README
 latex/hebclass/Makefile
+latex/hebclass/PPRheb-prosper.sty
 latex/hebclass/README
 latex/hebclass/hebclass.ins
 latex/hebclass/hebtech.dtx

Modified: pkg/ivritex/branches/upstream/current/fonts/README
==============================================================================
--- pkg/ivritex/branches/upstream/current/fonts/README	(original)
+++ pkg/ivritex/branches/upstream/current/fonts/README	Sat Apr 15 00:19:15 2006
@@ -4,4 +4,7 @@
 This package currently includes the standard hebrew metafonts as well as a
 modified version of the hebrew font from Omega
 
+The culmus subdirectory includes scripts for creating tex fonts
+from the culmus fonts (that need to be available on the system
+
 For more information read the documentation of the package heblatex.

Modified: pkg/ivritex/branches/upstream/current/ivritex.mk
==============================================================================
--- pkg/ivritex/branches/upstream/current/ivritex.mk	(original)
+++ pkg/ivritex/branches/upstream/current/ivritex.mk	Sat Apr 15 00:19:15 2006
@@ -1,6 +1,7 @@
-PREFIX=/usr/local
+DESTDIR=
+PREFIX=$(DESTDIR)/usr/local
 PROJECT=ivritex
-VERSION=1.1.1
+VERSION=1.2.1
 TEX_ROOT=$(PREFIX)/share/texmf
 HEBBIB_SUBDIR=bibtex/ivritex
 IVRITEX_BIBDIR=$(TEX_ROOT)/$(HEBBIB_SUBDIR)
@@ -16,16 +17,84 @@
 HEBCLASS_DOC_SUBDIR=doc/latex/$(HEBCLASS_DIR)
 HEBCLASS_TARGET_DIR=$(TEX_ROOT)/$(HEBCLASS_SUBDIR)
 HEBCLASS_TARGET_DOC_DIR=$(TEX_ROOT)/$(HEBCLASS_DOC_SUBDIR)
-TEX_INPUTS=.:$(ROOT_DIR)/latex/heblatex:$(ROOT_DIR)/latex/hebclass::
-MF_INPUTS=.:$(ROOT_DIR)/fonts/hebfonts::
+TEXINPUTS_PARAM  = TEXINPUTS=.:$(ROOT_DIR)/latex/{heblatex,hebclass}::
+ifdef use_hebfonts
+MF_INPUTS_PARAM  = MFINPUTS='.:$(ROOT_DIR)/fonts/hebfonts/::'
+else
+MF_INPUTS_PARAM  = MFINPUTS='.:$(ROOT_DIR)/fonts/culmus/tfm/::'
+TFM_FONTS_PARAM  = TFMFONTS='.:$(ROOT_DIR)/fonts/culmus/tfm/::'
+AFM_FONTS_PARAM  = AFMFONTS='.:$(ROOT_DIR)/fonts/culmus/tfm/::'
+T1_FONTS_PARAM   = T1FONTS='.:$(ROOT_DIR)/fonts/culmus/tfm/::'
+VF_FONTS_PARAM   = VFFONTS='.:$(ROOT_DIR)/fonts/culmus/tfm/::'
+FONT_MAPS_PARAM  = TEXFONTMAPS='.:$(ROOT_DIR)/fonts/culmus/fontname::'
+PS_HEADER_PARAM  = TEXPSHEADERS='.:$(ROOT_DIR)/fonts/culmus/::'
+DVIPS_FONT_PARAM = DVIPSFONTS='.:$(ROOT_DIR)/fonts/culmus/tfm/::'
+#FONTNAME_PARAM   = TEXFONTMAPS='.:$(ROOT_DIR)/fonts/culmus/fontname/::' 
+ENC_DIR_PARAM    = TEXPSHEADERS='.:$(ROOT_DIR)/fonts/culmus/::'
+CULMUS_MAP_PARAM = -u+../../fonts/culmus/culmus.map
+# if postscripts fonts are not used this is generally a bad sign
+NO_PK_PARAM=MKTEXPK=0
+endif
 LATEX=latex
 HEBLATEX=elatex
-HEBLATEX_ENV=TEXINPUTS='$(TEX_INPUTS)' MFINPUTS='$(MF_INPUTS)'
+
+# MKTEXPK=0 TEXPSHEADERS='.:../../fonts/culmus/enc/::' strace -o dvips.trace dvips  -u+../../fonts/culmus/culmus.map
+
+# commands for running latex in our test environment: with our own 
+# styles/classes and our own fonts. Setting the fonts is the tough part.
+HEBLATEX_ENV=\
+  $(TEXINPUTS_PARAM) \
+  $(MF_INPUTS_PARAM) \
+  $(VF_FONTS_PARAM) \
+  $(TFM_FONTS_PARAM) \
+  $(AFM_FONTS_PARAM) \
+  $(NO_PK_PARAM) \
+  $(FONT_MAPS_PARAM)
 HEBLATEX_CMD=$(HEBLATEX_ENV) $(HEBLATEX)
 RM=rm -f
 TEX_REHASH=mktexlsr
-DVIPS=$(HEBLATEX_ENV) dvips
+
+DVI2PS=dvips
+
+DVI2PS_CMD=\
+  $(DVIPS_FONT_PARAM) \
+  $(T1_FONTS_PARAM) \
+  $(TFM_FONTS_PARAM) \
+  $(VF_FONTS_PARAM) \
+  $(ENC_DIR_PARAM) \
+  $(NO_PK_PARAM) \
+  $(FONT_MAPS_PARAM) \
+  $(DVI2PS) \
+  $(CULMUS_MAP_PARAM)
+
+DVI_VIEW=xdvi
+DVI_VIEW_CMD=\
+  $(DVIPS_FONT_PARAM) \
+  $(T1_FONTS_PARAM) \
+  $(VF_FONTS_PARAM) \
+  $(TFM_FONTS_PARAM) \
+  $(ENC_DIR_PARAM) \
+  $(FONTNAME_PARAM) \
+  $(NO_PK_PARAM) \
+  $(DVI_VIEW) \
+
+
+#  $(CULMUS_MAP_PARAM)
+  
+
+#	     $(AFM_FONTS_PARAM) $(AFM_FONTS_PARAM) $(VF_FONTS_PARAM) \
 PS2PDF=ps2pdf
+PDFLATEX=\
+  $(TEXINPUTS_PARAM) \
+  $(TFM_FONTS_PARAM) \
+  $(AFM_FONTS_PARAM) \
+  $(T1_FONTS_PARAM) \
+  $(VF_FONTS_PARAM) \
+  $(FONTNAME_PARAM) \
+  $(PS_HEADER_PARAM) \
+  $(NO_PK_PARAM) \
+  pdfelatex
+
 
 CONFIG_MAKEFILE=ivritex.mk
 
@@ -52,7 +121,10 @@
 GREP=grep
 
 TAR_BALL_DIR=$(PROJECT)-$(VERSION)
-TAR_BALL=$(PROJECT)-$(VERSION).tar.gz
+TAR_BALL=$(TAR_BALL_DIR).tar.gz
+
+TAR_BALL_DIST_DIR=$(PROJECT)-$(VERSION)-dist
+TAR_BALL_DIST=$(TAR_BALL_DIST_DIR).tar.gz
 
 EXAMPLES=$(TEX_SRC:%=%.dvi) $(TEX_SRC:%=%.ps) $(TEX_SRC:%=%.pdf)
 TARGETS+=$(EXAMPLES)
@@ -90,6 +162,7 @@
 endif
 
 %.dvi: %.dtx
+	@echo running $(LATEX) $<...
 	$(LATEX) $<
 	#makeindex -s bbind.ist hebrew.idx
 	#makeindex -s bbglo.ist -o hebrew.gls hebrew.glo
@@ -97,12 +170,26 @@
 	$(LATEX) $<
 
 %.dvi: %.tex
+	@echo running $(HEBLATEX_CMD) $<...
 	$(HEBLATEX_CMD) $<
 	$(HEBLATEX_CMD) $<
 	$(HEBLATEX_CMD) $<
 
 %.ps: %.dvi
-	$(DVIPS) -o $@ $<
+	$(DVI2PS_CMD) -o $@ $<
 
-%.pdf: %.ps
-	$(PS2PDF) $< $@
+# view a DVI file with xdvi
+view-%.dvi: %.dvi
+	$(DVI_VIEW_CMD) $<
+
+%.pdf: %.tex
+	$(PDFLATEX) $<
+	$(PDFLATEX) $<
+	$(PDFLATEX) $<
+
+%.pdf: %.dtx
+	$(PDFLATEX) $<
+	#makeindex -s bbind.ist hebrew.idx
+	#makeindex -s bbglo.ist -o hebrew.gls hebrew.glo
+	$(PDFLATEX) $<
+	$(PDFLATEX) $<

Modified: pkg/ivritex/branches/upstream/current/ivritex.spec
==============================================================================
--- pkg/ivritex/branches/upstream/current/ivritex.spec	(original)
+++ pkg/ivritex/branches/upstream/current/ivritex.spec	Sat Apr 15 00:19:15 2006
@@ -1,8 +1,6 @@
 %define name ivritex
-%define version 1.1.1
-#%define heblatex_ver 2.3d
-#%define hebbib_ver 1.0
-%define release 2
+%define version 1.2.1
+%define release 4
 %define url http://ivritex.sf.net/
 
 # A hack: install heblatex under texmf/tex/generic/0ivritex/
@@ -21,16 +19,8 @@
 Version: %{version}
 Release: %{release}
 Source0: %{name}-%{version}.tar.gz
-# # from CTAN
-# Source1: hebexmpl.tar.bz2
-# Source2: heblatex-%{heblatex_ver}.tar.gz
-# # from CTAN
-# Source3: hebfonts.tar.gz
-# # hebrew bibtex styles, by Dekel Tsur
-# Source4: hebbib-%{hebbib_ver}.tar.gz
-# #Source2: tetex-heb-ttf-support.tar.bz2
-# #Source1: bibtex-heb.tar.bz2
-# copied verbatim from Mandrake's tetex package:
+
+# also contains a copy of the GPL-ed culmus fonts
 License: LPPL
 Group: Publishing
 BuildRoot: %{_tmppath}/%{name}-buildroot
@@ -39,14 +29,22 @@
 # currently the fonts package is back inside the main package:
 Obsoletes: tetex-latex-heb-fonts, ivritex-fonts
 Requires: tetex > 0.9
+BuildRequires: culmus-fonts >= 0.90
+# This is required to allow automatic installation of the culmus
+# Type1 fonts.
+# search for 'updmap' in the spec if you want to change that
+Requires: updmap-dir
+# unrem this if you link the fonts rather than copy:
+#Requires: culmus-fonts >= 0.90
 # For creating the docs: It requires the command 'elatex' Actually 
 # 'latex' will do with some minor tweaking of latex/heblatex/Makefile
 # dvips is also needed
 BuildRequires: tetex-latex tetex-dvips
-#Requires: %{name}-fonts = %{version}
 BuildArch: noarch
 URL: %{url}
 
+%define updmap /usr/share/texmf/dvips/config/updmap
+
 %description
 IvriTeX is a package to add Hebrew support to LaTeX. LaTeX is a system for
 typesetting high-quality documents. It takes .tex text files as input and
@@ -57,6 +55,9 @@
 Install ivritex if you want to allow formating of Hebrew LaTeX
 documents, or Hebrew LyX documents.
 
+This package requires the package updmap-dir for the instllation of the 
+Type1 fonts.
+
 %package doc
 Group: Publishing
 Summary: dcumentation and samples for the Hebrew LaTeX package
@@ -88,9 +89,9 @@
  * ivritex-doc: some extra documentation and samples and the sources
                 of the original packages
 
-You need to install both ivritex and ivritex-Fonts to be able to typeset
-Hebrew documents. ivritex-doc contains some useful document samples, as well
-as the "sources" of the hebrew latex files and of the documentation.
+You need to install ivritex to be able to typeset Hebrew documents. 
+ivritex-doc contains some useful document samples, as well as the 
+"sources" of the hebrew latex files and of the documentation.
 
 This package includes one sample document, to enable you to test your
 installation:
@@ -102,7 +103,7 @@
 Many messages will appear. If all was well, a file called hebhello.dvi will be
 created in the current directory. You should be able to view it using:
 
-  xdvi test-heb
+  xdvi hebhello.dvi
 
 After some more procesisng and output to the terminal, a document with one
 line, "ùìåí, World!" ("Shalom World!") should appear. press 'q' to quit.
@@ -111,15 +112,18 @@
 http://ivritex.sf.net/
 EOF
 
+# save an unprocessed copy of the latex directories:
 cp -r latex/heblatex heblatex_sources
 cp -r latex/hebclass hebclass_sources
 
 %build
 cp -r example example_orig
 
-#cd heblatex-%{heblatex_ver}
 # Chances are that setting PREFIX is not necessary here.
 # Also: maybe setting TEX_ROOT would be more correct
+# if you build this for your distro you should probably add
+#   use_symlinks=1
+# (See README)
 make PREFIX=%{_prefix}
 
 # Copy all the documents that were generated from the examples into 
@@ -136,31 +140,15 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 
-make PREFIX=${RPM_BUILD_ROOT}%{_prefix} install
-# rm -rf $RPM_BUILD_ROOT
-# 
-# cd heblatex-%{heblatex_ver}
-# make PREFIX=$RPM_BUILD_ROOT%{_prefix} \
-#      HEBREW_TARGET_DIR=$RPM_BUILD_ROOT%{heblatex_dir} \
-#      install
-# cd ..
-# 
-# install -m 755 -d         $RPM_BUILD_ROOT%{texmfdir}/bibtex/bst/base
-# install -m 644 hebbib/*   $RPM_BUILD_ROOT%{texmfdir}/bibtex/bst/base/
-# install -m 755 -d         $RPM_BUILD_ROOT%{texmfdir}/fonts/source/hebrew
-# install -m 644 hebfonts/* $RPM_BUILD_ROOT%{texmfdir}/fonts/source/hebrew/
-# 
-# 
-# #install -d $RPM_BUILD_ROOT%{_datadir}/
-# #cp -R texmf $RPM_BUILD_ROOT%{_datadir}/
-# #ln -s $RPM_BUILD_ROOT%{texmfdir}/fonts/tfm/truetype/ \
-# #      $RPM_BUILD_ROOT%{texmfdir}/fonts/truetype/tex/tfm
-
+make DESTDIR=${RPM_BUILD_ROOT} PREFIX=${RPM_BUILD_ROOT}%{_prefix} \
+  install
 
 %post 
+cd `dirname %{updmap}`; ./`basename %{updmap}`
 mktexlsr
 
 %postun
+cd `dirname %{updmap}`; ./`basename %{updmap}`
 mktexlsr
 
 %clean
@@ -168,7 +156,7 @@
 
 %files 
 %defattr(-,root,root,0755)  
-%doc README.rpm example/tests/hebhello.tex
+%doc README.rpm example/tests/hebhello.tex ChangeLog
 %{heblatex_dir}/*.def
 %{heblatex_dir}/hebrew*
 %{heblatex_dir}/hebcal.sty
@@ -179,26 +167,31 @@
 %{heblatex_dir}/lhe*.fd
 %{heblatex_dir}/he8*.fd
 %{heblatex_dir}/hebfont.sty
-%{texmfdir}/fonts/tfm/omegahe8/OmegaHebrew.tfm
-%{texmfdir}/fonts/afm/omegahe8/OmegaHebrew.afm
-%{texmfdir}/fonts/type1/omegahe8/OmegaHebrew.*
-%{texmfdir}/fonts/source/hebrew/crm*.mf
-%{texmfdir}/fonts/source/hebrew/deads10.mf
-%{texmfdir}/fonts/source/hebrew/fr*.mf
-%{texmfdir}/fonts/source/hebrew/hc*.mf
-%{texmfdir}/fonts/source/hebrew/he*.mf
-%{texmfdir}/fonts/source/hebrew/jerus10.mf
-%{texmfdir}/fonts/source/hebrew/oldjaf10.mf
-%{texmfdir}/fonts/source/hebrew/redis*.mf
-%{texmfdir}/fonts/source/hebrew/sh*.mf
-%{texmfdir}/fonts/source/hebrew/telav10.mf
+#%{texmfdir}/fonts/tfm/omegahe8/OmegaHebrew.tfm
+#%{texmfdir}/fonts/afm/omegahe8/OmegaHebrew.afm
+#%{texmfdir}/fonts/type1/omegahe8/OmegaHebrew.*
+#%{texmfdir}/fonts/source/hebrew/crm*.mf
+#%{texmfdir}/fonts/source/hebrew/deads10.mf
+#%{texmfdir}/fonts/source/hebrew/fr*.mf
+#%{texmfdir}/fonts/source/hebrew/hc*.mf
+#%{texmfdir}/fonts/source/hebrew/he*.mf
+#%{texmfdir}/fonts/source/hebrew/jerus10.mf
+#%{texmfdir}/fonts/source/hebrew/oldjaf10.mf
+#%{texmfdir}/fonts/source/hebrew/redis*.mf
+#%{texmfdir}/fonts/source/hebrew/sh*.mf
+#%{texmfdir}/fonts/source/hebrew/telav10.mf
 #%{texmfdir}/fonts/truetype/
+%{texmfdir}/fonts/afm/culmus
+%{texmfdir}/fonts/tfm/culmus
+%{texmfdir}/fonts/type1/culmus
+%{texmfdir}/fonts/vf/culmus
+%{texmfdir}/fontname/culmus.map
+%{texmfdir}/dvips/base/culmus-he8.enc
+%{_sysconfdir}/texmf/updmap/culmus.map
 
 %files doc
 %defattr(-,root,root,0755) 
-#%doc example README.html README.txt heblatex-%{heblatex_ver}/BUGS.txt
-# TODO: this list is not complete!!!
-%doc README latex/heblatex/README.html latex/heblatex/BUGS.txt
+%doc README latex/heblatex/README.html latex/heblatex/BUGS.txt ChangeLog
 %doc heblatex_sources hebclass_sources example
 # only to make the makefiles of the examples work:
 %doc ivritex.mk
@@ -207,6 +200,15 @@
 
 
 %changelog
+* Fri Dec  5 2003 Tzafrir Cohen <tzafrir at technion.ac.il> 1.2-3
+- Font files are now copie, rather than linked
+- Fixed README.rpm
+- Require updmap-dir
+
+* Tue Aug 19 2003 Tzafrir Cohen <tzafrir at technion.ac.il> 1.2-1
+- replaced hebfonts with culmus
+- Note that part of culmus files are symlinks
+
 * Thu Jan 16 2003 Tzafrir Cohen <tzafrir at technion.ac.il> 1.1.1-1
 - Added hebclass sources to the -doc package
 - removed unnecessary files from the examples tree in -docs

Modified: pkg/ivritex/branches/upstream/current/ivritex.spec.in
==============================================================================
--- pkg/ivritex/branches/upstream/current/ivritex.spec.in	(original)
+++ pkg/ivritex/branches/upstream/current/ivritex.spec.in	Sat Apr 15 00:19:15 2006
@@ -1,8 +1,6 @@
 %define name ivritex
 %define version @VERSION@
-#%define heblatex_ver 2.3d
-#%define hebbib_ver 1.0
-%define release 2
+%define release 4
 %define url http://ivritex.sf.net/
 
 # A hack: install heblatex under texmf/tex/generic/0ivritex/
@@ -21,16 +19,8 @@
 Version: %{version}
 Release: %{release}
 Source0: %{name}-%{version}.tar.gz
-# # from CTAN
-# Source1: hebexmpl.tar.bz2
-# Source2: heblatex-%{heblatex_ver}.tar.gz
-# # from CTAN
-# Source3: hebfonts.tar.gz
-# # hebrew bibtex styles, by Dekel Tsur
-# Source4: hebbib-%{hebbib_ver}.tar.gz
-# #Source2: tetex-heb-ttf-support.tar.bz2
-# #Source1: bibtex-heb.tar.bz2
-# copied verbatim from Mandrake's tetex package:
+
+# also contains a copy of the GPL-ed culmus fonts
 License: LPPL
 Group: Publishing
 BuildRoot: %{_tmppath}/%{name}-buildroot
@@ -39,14 +29,22 @@
 # currently the fonts package is back inside the main package:
 Obsoletes: tetex-latex-heb-fonts, ivritex-fonts
 Requires: tetex > 0.9
+BuildRequires: culmus-fonts >= 0.90
+# This is required to allow automatic installation of the culmus
+# Type1 fonts.
+# search for 'updmap' in the spec if you want to change that
+Requires: updmap-dir
+# unrem this if you link the fonts rather than copy:
+#Requires: culmus-fonts >= 0.90
 # For creating the docs: It requires the command 'elatex' Actually 
 # 'latex' will do with some minor tweaking of latex/heblatex/Makefile
 # dvips is also needed
 BuildRequires: tetex-latex tetex-dvips
-#Requires: %{name}-fonts = %{version}
 BuildArch: noarch
 URL: %{url}
 
+%define updmap /usr/share/texmf/dvips/config/updmap
+
 %description
 IvriTeX is a package to add Hebrew support to LaTeX. LaTeX is a system for
 typesetting high-quality documents. It takes .tex text files as input and
@@ -57,6 +55,9 @@
 Install ivritex if you want to allow formating of Hebrew LaTeX
 documents, or Hebrew LyX documents.
 
+This package requires the package updmap-dir for the instllation of the 
+Type1 fonts.
+
 %package doc
 Group: Publishing
 Summary: dcumentation and samples for the Hebrew LaTeX package
@@ -88,9 +89,9 @@
  * ivritex-doc: some extra documentation and samples and the sources
                 of the original packages
 
-You need to install both ivritex and ivritex-Fonts to be able to typeset
-Hebrew documents. ivritex-doc contains some useful document samples, as well
-as the "sources" of the hebrew latex files and of the documentation.
+You need to install ivritex to be able to typeset Hebrew documents. 
+ivritex-doc contains some useful document samples, as well as the 
+"sources" of the hebrew latex files and of the documentation.
 
 This package includes one sample document, to enable you to test your
 installation:
@@ -102,7 +103,7 @@
 Many messages will appear. If all was well, a file called hebhello.dvi will be
 created in the current directory. You should be able to view it using:
 
-  xdvi test-heb
+  xdvi hebhello.dvi
 
 After some more procesisng and output to the terminal, a document with one
 line, "ùìåí, World!" ("Shalom World!") should appear. press 'q' to quit.
@@ -111,15 +112,18 @@
 http://ivritex.sf.net/
 EOF
 
+# save an unprocessed copy of the latex directories:
 cp -r latex/heblatex heblatex_sources
 cp -r latex/hebclass hebclass_sources
 
 %build
 cp -r example example_orig
 
-#cd heblatex-%{heblatex_ver}
 # Chances are that setting PREFIX is not necessary here.
 # Also: maybe setting TEX_ROOT would be more correct
+# if you build this for your distro you should probably add
+#   use_symlinks=1
+# (See README)
 make PREFIX=%{_prefix}
 
 # Copy all the documents that were generated from the examples into 
@@ -136,31 +140,15 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 
-make PREFIX=${RPM_BUILD_ROOT}%{_prefix} install
-# rm -rf $RPM_BUILD_ROOT
-# 
-# cd heblatex-%{heblatex_ver}
-# make PREFIX=$RPM_BUILD_ROOT%{_prefix} \
-#      HEBREW_TARGET_DIR=$RPM_BUILD_ROOT%{heblatex_dir} \
-#      install
-# cd ..
-# 
-# install -m 755 -d         $RPM_BUILD_ROOT%{texmfdir}/bibtex/bst/base
-# install -m 644 hebbib/*   $RPM_BUILD_ROOT%{texmfdir}/bibtex/bst/base/
-# install -m 755 -d         $RPM_BUILD_ROOT%{texmfdir}/fonts/source/hebrew
-# install -m 644 hebfonts/* $RPM_BUILD_ROOT%{texmfdir}/fonts/source/hebrew/
-# 
-# 
-# #install -d $RPM_BUILD_ROOT%{_datadir}/
-# #cp -R texmf $RPM_BUILD_ROOT%{_datadir}/
-# #ln -s $RPM_BUILD_ROOT%{texmfdir}/fonts/tfm/truetype/ \
-# #      $RPM_BUILD_ROOT%{texmfdir}/fonts/truetype/tex/tfm
-
+make DESTDIR=${RPM_BUILD_ROOT} PREFIX=${RPM_BUILD_ROOT}%{_prefix} \
+  install
 
 %post 
+cd `dirname %{updmap}`; ./`basename %{updmap}`
 mktexlsr
 
 %postun
+cd `dirname %{updmap}`; ./`basename %{updmap}`
 mktexlsr
 
 %clean
@@ -168,7 +156,7 @@
 
 %files 
 %defattr(-,root,root,0755)  
-%doc README.rpm example/tests/hebhello.tex
+%doc README.rpm example/tests/hebhello.tex ChangeLog
 %{heblatex_dir}/*.def
 %{heblatex_dir}/hebrew*
 %{heblatex_dir}/hebcal.sty
@@ -179,26 +167,31 @@
 %{heblatex_dir}/lhe*.fd
 %{heblatex_dir}/he8*.fd
 %{heblatex_dir}/hebfont.sty
-%{texmfdir}/fonts/tfm/omegahe8/OmegaHebrew.tfm
-%{texmfdir}/fonts/afm/omegahe8/OmegaHebrew.afm
-%{texmfdir}/fonts/type1/omegahe8/OmegaHebrew.*
-%{texmfdir}/fonts/source/hebrew/crm*.mf
-%{texmfdir}/fonts/source/hebrew/deads10.mf
-%{texmfdir}/fonts/source/hebrew/fr*.mf
-%{texmfdir}/fonts/source/hebrew/hc*.mf
-%{texmfdir}/fonts/source/hebrew/he*.mf
-%{texmfdir}/fonts/source/hebrew/jerus10.mf
-%{texmfdir}/fonts/source/hebrew/oldjaf10.mf
-%{texmfdir}/fonts/source/hebrew/redis*.mf
-%{texmfdir}/fonts/source/hebrew/sh*.mf
-%{texmfdir}/fonts/source/hebrew/telav10.mf
+#%{texmfdir}/fonts/tfm/omegahe8/OmegaHebrew.tfm
+#%{texmfdir}/fonts/afm/omegahe8/OmegaHebrew.afm
+#%{texmfdir}/fonts/type1/omegahe8/OmegaHebrew.*
+#%{texmfdir}/fonts/source/hebrew/crm*.mf
+#%{texmfdir}/fonts/source/hebrew/deads10.mf
+#%{texmfdir}/fonts/source/hebrew/fr*.mf
+#%{texmfdir}/fonts/source/hebrew/hc*.mf
+#%{texmfdir}/fonts/source/hebrew/he*.mf
+#%{texmfdir}/fonts/source/hebrew/jerus10.mf
+#%{texmfdir}/fonts/source/hebrew/oldjaf10.mf
+#%{texmfdir}/fonts/source/hebrew/redis*.mf
+#%{texmfdir}/fonts/source/hebrew/sh*.mf
+#%{texmfdir}/fonts/source/hebrew/telav10.mf
 #%{texmfdir}/fonts/truetype/
+%{texmfdir}/fonts/afm/culmus
+%{texmfdir}/fonts/tfm/culmus
+%{texmfdir}/fonts/type1/culmus
+%{texmfdir}/fonts/vf/culmus
+%{texmfdir}/fontname/culmus.map
+%{texmfdir}/dvips/base/culmus-he8.enc
+%{_sysconfdir}/texmf/updmap/culmus.map
 
 %files doc
 %defattr(-,root,root,0755) 
-#%doc example README.html README.txt heblatex-%{heblatex_ver}/BUGS.txt
-# TODO: this list is not complete!!!
-%doc README latex/heblatex/README.html latex/heblatex/BUGS.txt
+%doc README latex/heblatex/README.html latex/heblatex/BUGS.txt ChangeLog
 %doc heblatex_sources hebclass_sources example
 # only to make the makefiles of the examples work:
 %doc ivritex.mk
@@ -207,6 +200,15 @@
 
 
 %changelog
+* Fri Dec  5 2003 Tzafrir Cohen <tzafrir at technion.ac.il> 1.2-3
+- Font files are now copie, rather than linked
+- Fixed README.rpm
+- Require updmap-dir
+
+* Tue Aug 19 2003 Tzafrir Cohen <tzafrir at technion.ac.il> 1.2-1
+- replaced hebfonts with culmus
+- Note that part of culmus files are symlinks
+
 * Thu Jan 16 2003 Tzafrir Cohen <tzafrir at technion.ac.il> 1.1.1-1
 - Added hebclass sources to the -doc package
 - removed unnecessary files from the examples tree in -docs

Modified: pkg/ivritex/branches/upstream/current/latex/hebclass/Makefile
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/hebclass/Makefile	(original)
+++ pkg/ivritex/branches/upstream/current/latex/hebclass/Makefile	Sat Apr 15 00:19:15 2006
@@ -4,9 +4,10 @@
 INSTALL_FILE=hebclass.ins
 FILES_TO_COPY=*.cls tcourse.sty
 CLEAN=hebtech.cls hebthes.tex $(DOC_FILES) *.log *~ *.dvi *.aux *.toc \
-      i*.glo *.idx *.gls *.ilg
+      i*.glo *.idx *.gls *.ilg *.los *.lof *.fol *.cot \
+      *[0-9][0-9][0-9]pk *.tfm 
 
-TEX_SRC=iitcsw iitsmnr tcourse hebthes
+TEX_FILES=iitcsw iitsmnr tcourse hebthes
 DTX_FILES=hebtech
 DOC_FILES=$(DTX_FILES:%=%.ps) 
 SAMPLE_TARGET=hebtech.cls
@@ -15,7 +16,7 @@
 # for the packaging:
 PACKAGE_FILES_LIST = $(SOURCES) iitcsw.cls iitcsw-course.sty \
   iitcsw-samplefig.eepic iitsmnr.cls Makefile README tcourse.sty \
-  $(TEX_FILES:%=%.tex)
+  PPRheb-prosper.sty $(TEX_FILES:%=%.tex)
 TAR_BALL_DIR=$(PACKAGE)-$(VERSION)
 TAR_BALL=$(TAR_BALL_DIR).tar.gz
 

Modified: pkg/ivritex/branches/upstream/current/latex/hebclass/hebtech.dtx
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/hebclass/hebtech.dtx	(original)
+++ pkg/ivritex/branches/upstream/current/latex/hebclass/hebtech.dtx	Sat Apr 15 00:19:15 2006
@@ -8,7 +8,7 @@
 %
 % Copyright 1997-1998 Boris Lavva, e-mail lavva at tx.technion.ac.il.
 % 
-% Copyright 1997-1998 Tzafrir Cohen, e-mail tzafrir at technion.ac.il.
+% Copyright 2002-2003 Tzafrir Cohen, e-mail tzafrir at technion.ac.il.
 % 
 % For further copyright information see any other copyright notices in 
 % this file.
@@ -44,7 +44,7 @@
 %</driver>
 % \fi
 % \ProvidesFile{hebtech.dtx}
-        [2003/01/12 v.1.1a Technion thesis class]
+        [2003/06/01 v.1.1a Technion thesis class]
 %
 % \iffalse
 % \subsection{A driver for this document}
@@ -85,7 +85,7 @@
 %    \LaTeXe\ document class, which supports all available input and
 %    font encodings and thesis written both in Hebrew and English
 %    (by Boris Lavva)}
-% \changes{hebtech~1.1a}{2003/01/12}{%
+% \changes{hebtech~1.1a}{2003/06/01}{%
 %    Adapted to current Technion guidelines, and to current heblatex.
 %    Also added \backslash thesisheader and a sample thesis
 %    (by Tzafrir Cohen)}
@@ -117,7 +117,10 @@
 %
 %    We use standard \LaTeXe{} \pkg{report} class as the base of our
 %    \pkg{hebtech} class. A thesis should be printed in A4 paper,
-%    using $12pt$ fonts, one-sided.
+%    using $12pt$ fonts, one-sided. 
+%
+%    TODO: The default should be (and is, see oneside and twoside 
+%    later on) two-sided, right? (Tzafrir)
 %    \begin{macrocode}
 %<*hebtech>
 \ExecuteOptions{a4paper,12pt,oneside,onecolumn,final,openany}
@@ -462,7 +465,7 @@
   }%
 }
 % initialize everything with today's date:
-\date{\day}{\month}{\number\year}
+\date{\number\day}{\number\month}{\number\year}
 
 %    \end{macrocode}
 %  \end{macro}
@@ -751,7 +754,7 @@
    \ifcase\value{thestype}%
    \or Research Thesis%
    \or Project Thesis%
-   \or Final Paper\else {}\fi}
+   \or Final Paper \else {}\fi}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -773,6 +776,9 @@
 }
 %    \end{macrocode}
 %
+%   The research domain (research field, e.g.: faculty) need not appear for
+%   a Doctor thesis, but should appear for all the others
+% 
 %    \begin{macrocode}
 \def\@lineiii{%
   \if\@@dom\else%
@@ -785,13 +791,17 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\def\@lineiv{\mbox{\hspace{-.2in}\footnotesize%
+\def\@lineiv{\mbox{\hspace{-.2in}\normalsize%
       Submitted to the Senate of the Technion --- %
       Israel Institute of Technology}}
 %    \end{macrocode}
 %
+%    Note that  the word "Haifa" is currently hard-wired in this class. 
+%    It is up to someone else to parametrize this properly when the need
+%    arises.
+%
 %    \begin{macrocode}
-\def\@linev{\footnotesize{\LJMonth}%
+\def\@linev{\MakeUppercase{\footnotesize{\LJMonth}}%
             \hfill\MakeUppercase{Haifa}\hfill%
             \MakeUppercase{\LGMonth}}
 %    \end{macrocode}
@@ -828,14 +838,41 @@
 \def\@@donoriih{} 
 \def\@donorh{}
 %    \end{macrocode}
+%    \begin{macro}{@researchtypeh}
+%    |\@researchtypeh| is almost the same as |\@thestypeh|. However there are
+%    some minor differences that simply could not fit in the original macro
+%    and still be able to fulfil the requirements of the class.
+%
+%    |thestype| describes what type is the thesis itself. |researchtype|
+%    describes what it is about.
+%    \begin{macrocode}
+\def\@researchtypeh{%
+   \ifcase\value{thestype}%
+   \or \hebhe\hebmem\hebhet\hebqof\hebresh%
+   \or \hebhe\hebpe\hebresh\hebvav\hebyod\hebqof\hebtet%
+   \or \hebhe\hebayin\hebbet\hebvav\hebdalet\hebtav\ 
+       \hebhe\hebgimel\hebmem\hebresh 
+   \else {}
+   \fi%
+}
+
+%    \end{macrocode}
+%    \end{macro}
 %
+%    \begin{macro}{@thestypeh}
 %    \begin{macrocode}
 \def\@thestypeh{% 
    \ifcase\value{thestype}% 
-   \or \hebmem\hebhet\hebqof\hebresh%
-   \or \hebpe\hebresh\hebvav\hebyod\hebqof\hebtet%
-   \or \hebayin\hebbet\hebvav\hebdalet\hebtav\ \hebgimel\hebmem\hebresh \else {}\fi} 
+   \or \hebhet\hebyod\hebbet\hebvav\hebresh\ \hebayin\heblamed\ 
+       \hebmem\hebhet\hebqof\hebresh%
+   \or \hebhet\hebyod\hebbet\hebvav\hebresh\ \hebayin\heblamed\ 
+       \hebpe\hebresh\hebvav\hebyod\hebqof\hebtet%
+   \or \hebayin\hebbet\hebvav\hebdalet\hebtav\ \hebgimel\hebmem\hebresh
+   \else {}
+   \fi%
+}
 %    \end{macrocode}
+%    \end{macro}
 %
 %    \begin{macrocode}
 \def\@lineih{%
@@ -883,9 +920,9 @@
 %    \begin{macrocode}
 \def\@linevih{% 
    \ifcase\value{thestype}% 
-   \or \@thestypeh{} \hebnun\hebayin\hebshin\hebhe% 
-   \or \@thestypeh{} \hebnun\hebayin\hebshin\hebhe% 
-   \or \@thestypeh{} \hebnun\hebayin\hebshin\hebtav\hebhe\else{}\fi} 
+   \or \@researchtypeh{} \hebnun\hebayin\hebshin\hebhe% 
+   \or \@researchtypeh{} \hebnun\hebayin\hebshin\hebhe% 
+   \or \@researchtypeh{} \hebnun\hebayin\hebshin\hebtav\hebhe\else{}\fi} 
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -919,9 +956,10 @@
 %             the main language of the document was Hebrew 
 %             \textbf{OR} Hebrew
 %             cover, etc.\ when the main language of the document was
-%             English.\\ This part will be with roman page numbering
+%             English.\\ 
+%             This part will be with roman page numbering
 %             if in English and with hebrew page numbering if in
-%             Hebrew.
+%             Hebrew. (Hebrew numberring currently disabled as it is buggy)
 %    \end{enumerate}
 %
 %  \begin{macro}{\frontmatter}
@@ -929,12 +967,13 @@
 %    (for example, after the Hebrew |\makecover|).
 %    \begin{macrocode}
 \newcommand\frontmatter{%
+  \pagestyle{empty}
   \if at openright\cleardoublepage\else\clearpage\fi%
   % Until gim gets fixed
-  \if at rl\pagenumbering{roman}\else\pagenumbering{roman}\fi}
+  %\if at rl\pagenumbering{roman}\else\pagenumbering{roman}\fi}
   %\if at rl\pagenumbering{gim}\else\pagenumbering{roman}\fi}
   % alph only works well for numbers <= 10
-  %\ifrl\pagenumbering{alph}\else\pagenumbering{roman}\fi}
+  \if at rl\pagenumbering{alph}\else\pagenumbering{roman}\fi}
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -944,6 +983,7 @@
 %    \begin{macrocode}
 \newcommand\mainmatter{%
   \if at openright\cleardoublepage\else\clearpage\fi%
+  \pagestyle{thesis}
   \pagenumbering{arabic}}
 %    \end{macrocode}
 %  \end{macro}
@@ -951,6 +991,8 @@
 %  \begin{macro}{\backmatter}
 %    Should be used at the beginning of the third part
 %    (for example, after the English |\makecover|).
+%
+%    Currently it is exactly the same as the |\frontmatter| macro.
 %    \begin{macrocode}
 \let\backmatter\frontmatter
 %    \end{macrocode}
@@ -997,12 +1039,7 @@
     \end{center}
     \vfill
     \begin{center}
-      \if at rl\Large
-        \hebhet\hebyod\hebbet\hebvav\hebresh\ \hebayin\heblamed\ 
-        \@thestypeh
-      \else\LARGE
-        \@thestype
-      \fi
+      \if at rl\Large \@thestypeh\else\large\@thestype \fi
     \end{center}
     \vfill 
     \begin{center}
@@ -1010,7 +1047,7 @@
          \@lineih \par
          \@lineiih \par
          \@lineiiih%
-      \else\Large
+      \else\large
          \@linei\par
          \@lineii \par
          \@lineiii%
@@ -1019,16 +1056,14 @@
     \vfill%
     \begin{center}
       \bfseries\if at rl\LARGE\@@authorh
-      \else\huge\@@author\fi
+      \else\LARGE\@@author\fi
     \end{center}
     \vfill 
     \begin{center}
-      \if at rl
-         \large
+      \if at rl \large
          \@lineivh \par
          \@linevh
-      \else
-         \Large
+      \else 
          \@lineiv \par
          \@linev\fi
     \end{center}
@@ -1251,7 +1286,7 @@
   \renewcommand{\hebtech at acknowledgment@texth}{#1}
   \renewcommand{\hebtech at acknowledgment@text}{#2}
 }
- %    \end{macrocode}
+%    \end{macrocode}
 %  \end{macro}
 %
 %  \begin{macro}{\dedicationtext}
@@ -1537,7 +1572,7 @@
 }
 
 \providecommand{\thesisheader}{\thesis at header{mainlang}}
-% actually, any text can come instead of 'other':
+ % actually, any text can come instead of 'other':
 \providecommand{\thesisheaderminor}{\thesis at header{other}}
 %    \end{macrocode}
 %  \end{macro}

Modified: pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.cls
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.cls	(original)
+++ pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.cls	Sat Apr 15 00:19:15 2006
@@ -89,7 +89,10 @@
   \newcommand{\iitcsw at goodluckbox}[1]{\LAARGE #1}
 \fi
 
-\newcommand{\draftremarkname}{drxz hiehd} %7bit for "äòøú èéåèä"
+%\newcommand{\draftremarkname}{drxz hiehd} %7bit for "äòøú èéåèä"
+\newcommand{\draftremarkname}{%
+  \hebhe\hebayin\hebresh\hebtav\ \hebtet\hebyod\hebvav\hebtet\hebhe%
+}
 % define \remark:
 \ifiitcswremarks%
   \newcommand{\remark}[2][\draftremarkname]{\footnote{\R{#1: #2}}}%
@@ -124,7 +127,8 @@
 % The following have to be explicitly defined:
 
 % \providecommand\CourseName{úëï ìåâé}
-% \providecommand\CourseFullName{\CourseName \ \L{234262}} %or simply \CourseName
+% \providecommand\CourseFullName{\CourseName \ \L{234262}} 
+% %(or simply \CourseName)
 % \providecommand\Semester{çåøó úùñ"á}
 % \providecommand\AssignmentSubject{îòáã ä-\L{MIPS}}
 % \providecommand\HWNum{2}
@@ -144,20 +148,43 @@
 
 \newcommand{\ExtraInstructions}{}
 
-\def\submittersname{\hebhe\hebmem\hebgimel\hebyod\hebshin\hebyod\hebfinalmem}
+\def\submittersname{%
+  \hebhe\hebmem\hebgimel\hebyod\hebshin\hebyod\hebfinalmem%
+}
 \def\addressname{\hebkaf\hebtav\hebvav\hebbet\hebtav}
 \def\semestername{\hebsamekh\hebmem\hebsamekh\hebtet\hebresh}
-\def\homeworkname{\hebtav\hebresh\hebgimel\hebyod\heblamed \hebbet\hebyod\hebtav}
-\def\withanswersname{\hebayin\hebfinalmem \hebtav\hebshin\hebvav\hebbet\hebvav\hebtav}
-\def\answersprintedname{\hebhe\hebtav\hebshin\hebvav\hebbet\hebvav\hebtav \hebmem\hebvav\hebdalet\hebpe\hebsamekh\hebvav\hebtav !!!}
-\def\tainchargename{\hebmem\hebtav\hebresh\hebgimel\heblamed \hebalef\hebhet\hebresh\hebalef\hebyod}
-\def\rechoursname{\hebshin\hebayin\hebvav\hebtav \hebqof\hebbet\heblamed\hebhe}
-\def\subdatename{\hebtav\hebalef\hebresh\hebyod\hebfinalkaf \hebhe\hebgimel\hebshin\hebhe}
-\def\subinpairsname{\hebhe\hebhe\hebgimel\hebshin\hebhe \hebbet\hebzayin\hebvav\hebgimel\hebvav\hebtav \hebbet\heblamed\hebbet\hebdalet!}
+\def\homeworkname{%
+  \hebtav\hebresh\hebgimel\hebyod\heblamed\ \hebbet\hebyod\hebtav%
+}
+\def\withanswersname{%
+  \hebayin\hebfinalmem\ \hebtav\hebshin\hebvav\hebbet\hebvav\hebtav%
+}
+\def\answersprintedname{%
+  \hebhe\hebtav\hebshin\hebvav\hebbet\hebvav\hebtav\ %
+  \hebmem\hebvav\hebdalet\hebpe\hebsamekh\hebvav\hebtav !!!%
+}
+\def\tainchargename{%
+  \hebmem\hebtav\hebresh\hebgimel\heblamed\ %
+  \hebalef\hebhet\hebresh\hebalef\hebyod%
+}
+\def\rechoursname{
+  \hebshin\hebayin\hebvav\hebtav\ \hebqof\hebbet\heblamed\hebhe%
+}
+\def\subdatename{
+  \hebtav\hebalef\hebresh\hebyod\hebfinalkaf\ %
+  \hebhe\hebgimel\hebshin\hebhe%
+}
+\def\subinpairsname{%
+  \hebhe\hebhe\hebgimel\hebshin\hebhe\ %
+  \hebbet\hebzayin\hebvav\hebgimel\hebvav\hebtav\ %
+  \hebbet\heblamed\hebbet\hebdalet!%
+}
 \def\namename{\hebshin\hebfinalmem}
 \def\studnumname{\hebmem.\hebsamekh.}
 \def\gradename{\hebtsadi\hebyod\hebvav\hebfinalnun}
-\def\retboxname{\hebtav\hebalef \heblamed\hebhe\hebhet\hebzayin\hebresh\hebhe}
+\def\retboxname{
+  \hebtav\hebalef\ \heblamed\hebhe\hebhet\hebzayin\hebresh\hebhe%
+}
 \def\questionname{\hebshin\hebalef\heblamed\hebhe}
 \def\AnswerExplainname{\hebhe\hebsamekh\hebbet\hebresh: }
 \def\goodluckname{\hebbet\hebhe\hebtsadi\heblamed\hebhet\hebhe}
@@ -242,7 +269,8 @@
 %%
 %% \Answer{} Print text in "answer" font if answers are to be printed
 %%
-\newcommand{\Answer}[1]{\ifiitcswanswers\textshscr{#1}\fi}
+%\newcommand{\Answer}[1]{\ifiitcswanswers\textshscr{#1}\fi}
+\newcommand{\Answer}[1]{\ifiitcswanswers\textyad{#1}\fi}
 
 %%
 %% \AnswerLines: Produce 5 (by default) horizental lines, for filling in the 

Modified: pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.tex
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.tex	(original)
+++ pkg/ivritex/branches/upstream/current/latex/hebclass/iitcsw.tex	Sat Apr 15 00:19:15 2006
@@ -21,7 +21,7 @@
   %bookmarks,%
 ]{hyperref}
 \hypersetup{colorlinks=false,raiselinks=false,breaklinks=true,%
-  plainpages=flase,pageanchor=false}
+  plainpages=false,pageanchor=false}
 \HeblatexRedefineL
 
 \usepackage{epic}

Modified: pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.cls
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.cls	(original)
+++ pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.cls	Sat Apr 15 00:19:15 2006
@@ -15,9 +15,14 @@
 % The following condition will be true only on a notes-only printout (not used
 % currently)
 \newif\ifiitsmnrnotesonly  \iitsmnrnotesonlyfalse
+% The following is true if we use prosper instead of seminar: 
+\newif\ifiitsmnrprosper  \iitsmnrprosperfalse
 %
 % The different options (and their effects):
 %
+\DeclareOption{prosper}  {\iitsmnrprospertrue}%
+\DeclareOption{noprosper}{\iitsmnrprosperfalse}% (default)
+
 \DeclareOption{notes}{%
   \renewcommand{\iitsmnr at seminar@options}{notesonly,article}%
   \iitsmnrnotesonlytrue%
@@ -37,11 +42,23 @@
 \DeclareOption{encsi960}{\providecommand{\iitcsw at inputenc}{si960}}%
 \ProcessOptions
 
-\ProvidesClass{iitsmnr}[2001/09/01 homework class]
-\LoadClass[%
-  \iitsmnr at seminar@options,%
-  a4,                      % note that we force an a4 paper
-]{seminar}
+\ProvidesClass{iitsmnr}[2003/10/13 Hebrew seminar-based class]
+
+% Are those defaults sane?
+\providecommand{\prosperoptions}{pdf,slideColor,total}
+\providecommand{\prosperstyle}{heb-prosper}
+\ifiitsmnrprosper
+  \LoadClass[%
+    %\iitsmnr at seminar@options,%
+    \prosperoptions,%         % set by the user  
+    \prosperstyle,%           % set by the user as well
+  ]{prosper}%
+\else%
+  \LoadClass[%
+    \iitsmnr at seminar@options,%
+    a4,%                     % note that we force an a4 paper
+  ]{seminar}%
+\fi
 
 %\RequirePackage[cp862]{inputenc}
 \RequirePackage[english,hebrew]{babel}
@@ -55,11 +72,28 @@
 \RequirePackage{hyperref}
 \HeblatexRedefineL % hyperref has its own definition for \L
 
-% bug-fixes for the seminar class
-\input{seminar.bug}
-\input{seminar.bg2}
-
-
+\ifiitsmnrprosper\else
+  % bug-fixes for the seminar class
+  \input{seminar.bug}
+  \input{seminar.bg2}
+\fi
+
+\ifiitsmnrprosper\else%
+  % We provide \institution and \email, similar to \title and \author
+  % for compatibility with prosper
+  \gdef\iitsmnr at institution{}%
+  \providecommand{\institution}[1]{\renewcommand\iitsmnr at institution{#1}}%
+  \gdef\iitsmnr at email{}%
+  \providecommand{\email}[1]{\renewcommand{\iitsmnr at email}{#1}}%
+\fi
+
+% unfortunetly prosper has no way of ignoring text outside slides
+% Initial hack: define a macro for text. Ignore this text in prosper:
+\newcommand{\notes}[1]{%
+  \ifiitsmnrprosper%
+  \else#1%
+  \fi
+}
 
 %%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%
@@ -68,13 +102,46 @@
 % TODO: this code is problematic. Get the slightly better code from my thesis
 % seminar
 
-% 
-\@ifclassloaded{seminar}{%
-  \raggedslides[0pt]%
-  \def\slidelabel{\bf \if at rl\R{\hebshin\hebqof\hebfinalpe{} \theslide}%
-                      \else\L{Slide \theslide}%
-                      \fi}%
-}{}
+% Override the definition of seminar'a table-of-contents line
+% because the way hyperref overrides it creates problems in the
+% table-of-contents
+%
+% Original macro:
+% \def\contentsline#1#2#3#4{%
+%   \ifx\\#4\\%
+%     \csname l@#1\endcsname{#2}{#3}%
+%   \else
+%     \ifHy at linktocpage
+%       \csname l@#1\endcsname{{#2}}{%
+%         \hyper at linkstart{link}{#4}{#3}\hyper at linkend
+%       }%
+%     \else
+%       \csname l@#1\endcsname{%
+%         \hyper at linkstart{link}{#4}{#2}\hyper at linkend
+%       }{#3}%
+%     \fi
+%   \fi
+% }
+\ifiitsmnrprosper\else
+  \def\contentsline#1#2#3#4{%
+    \ifx\\#4\\%
+      \csname l@#1\endcsname{#2}{#3}%
+    \else
+      \ifHy at linktocpage
+        \csname l@#1\endcsname{{#2}}{%
+          % change: wrap link itself with \L and link text with \R
+          % This should generally work
+          \L{\hyper at linkstart{link}{#4}{\R{#3}}\hyper at linkend}
+        }%
+      \else
+        \csname l@#1\endcsname{%
+          % the same fix as above:
+          \L{\hyper at linkstart{link}{#4}{\R{#2}}\hyper at linkend}
+        }{#3}%
+      \fi
+    \fi
+  }
+\fi
 
 
 %%%%%%%%%%%%%%%
@@ -127,16 +194,24 @@
 % The slide environment has two mandatory arguments
 %  #1: the slide title
 %  #2: the slide time (in seconds)
+\ifiitsmnrprosper%
+  \newenvironment{Slide}[2]{%
+    \begin{slide}{\R{#1}}% ignore the second argment, the time
+  }{%
+    \end{slide}%
+  }%
+\else
 \newenvironment{Slide}[2]{%
+  \typeout{In Slide. Title: #1}%
   \ifiitsmnrnotesonly\else\handouts at pagebreak\fi%
-  \ifiitsmnrslidesonly\else\vspace*{-\iitsmnr at headskip}
+  \ifiitsmnrslidesonly\else\vspace*{-\iitsmnr at headskip}\fi
 
   \begin{slide}
   \slideheading{#1}
   \setcounter{Slide at time}{#2}
 }{%
   \end{slide} 
-  \ifiitsmnrslidesonly\else\vspace{-\iitsmnr at footskip}
+  \ifiitsmnrslidesonly\else\vspace{-\iitsmnr at footskip}\fi
   
   \ifiitsmnrslidesonly%
     \timerAdvance{\value{Slide at time}}%
@@ -149,6 +224,7 @@
     \fi%
   \fi%
 }
+\fi% \ifiitsmnrprosper
 
 % Declare that the 'Slide' environment is also to be considered as "not slide"
 \def\slide at list{slide,slide*,allversions,allversions*,Slide}
@@ -182,7 +258,11 @@
 \newcommand{\iitsmnrTitleExtra}{}
 
 \newcommand{\titleextra}[1]{% 
-  \renewcommand{\iitsmnrTitleExtra}{#1}%
+  \ifiitsmnrprosper%
+    \subtitle{#1}%
+  \else%
+    \renewcommand{\iitsmnrTitleExtra}{#1}%
+  \fi%
 }
 
 % The macro itself:
@@ -195,7 +275,27 @@
 
       \vspace{4ex}
 
-      {\Large \@author}
+      {%
+        \Large \@author\ >%
+	% use \email, if it was given
+        \ifx\iitsmnr at email\@undefined\else%
+	  \L{%
+	    \href{%
+	      mailto:\iitsmnr at email%
+	    }{%
+	      \iitsmnr at email%
+	    }%
+	  }%
+	\fi%
+	<
+      }
+
+      \ifx\iitsmnr at institution\@undefined\else
+        \vspace{2ex}
+        
+        % if \institution was used, print it:
+        {\sc \iitsmnr at institution}
+      \fi
     \end{center}
     
     \vspace{6ex}

Modified: pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.tex
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.tex	(original)
+++ pkg/ivritex/branches/upstream/current/latex/hebclass/iitsmnr.tex	Sat Apr 15 00:19:15 2006
@@ -1,5 +1,13 @@
 \documentclass[handouts]{iitsmnr}
-%\usepackage{usefull1}
+% put here 'slides' instead of 'handouts' for the slides.
+% alternatively: try 'prosper' if you have prosper installed for 
+% fancier slides
+
+\ifiitsmnrprosper
+% formatting commands that are only run in seminar:
+% if you don't intend to ever use the option 'prosper' you can safely 
+% omit those conditions
+\else
 \usepackage{pstricks}
 \usepackage{pst-node}
 
@@ -16,8 +24,6 @@
 \renewcommand{\headrulewidth}{0pt}
 \renewcommand{\footrulewidth}{0pt}
 
-\newcommand{\IvritexUrl}{http://ivritex.sf.net}
-
 
 % To avoid that the headers be too close of the top of the page
 %\renewcommand{\slidetopmargin}{2cm}
@@ -30,6 +36,9 @@
 % To adjust the frame length to the header and footer ones
 \autoslidemarginstrue
  
+\pagestyle{fancy}
+
+\fi% end of seminar-specific part
 
 \makeatletter
 \providecommand{\IvriTeX}{\@ensure at L{Ivri\TeX}}
@@ -39,8 +48,6 @@
 % following line:
 %\centerslidesfalse
 
-\pagestyle{fancy}
-
 \title{äøöàä ìäãâîú äîçì÷ä \L{\texttt{iitsmnr}}}
 \author{öôøéø ëäï}%
 \titleextra{%
@@ -51,16 +58,31 @@
               {\IvritexUrl}%
   }%
 }
+% Other possible macros:
+% on prosper:
+% \subtitle (actually used from \titleextra), \institute
+% 
+% On iitsmnr: \email
+
+\newcommand{\IvritexUrl}{http://ivritex.sf.net}
+
 \begin{document}
 %\hyphenation{ôòîéí}
 
-\begin{Slide}{}{60}
-  \maketitleslide
-\end{Slide}
-\tableofcontents
-%\listofslides
-\section*{øùéîú äù÷ôéí}
+% The title slide:
+\ifiitsmnrprosper
+  \maketitle
+\else
+  \begin{Slide}{}{60}
+    \maketitleslide
+  \end{Slide}
+\fi
+\notes{
+  \tableofcontents
+  %\listofslides
+  \section*{øùéîú äù÷ôéí}
 \slidecontents
+}% end of \notes
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{Slide}{áúåëðéú}{60}
 îä éäéä ìðå äéåí?
@@ -72,9 +94,45 @@
 \item î÷åøåú îéãò ðåñôéí
 \end{itemize}
 \end{Slide}
+\notes{
 
+}% end of \notes
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{Slide}{ä÷ãîä}{1*60+30}
+  \begin{itemize}
+  \item îèøåú äîçì÷ä:
+    \begin{itemize}
+    \item ìàôùø ëúéáú ù÷ôéí ìäøöàåú
+    \item ìäååú áñéñ ðåç ìùéðåééí
+    \end{itemize}
+  \item ôøåéé÷è \IvriTeX
+  \item øùéåï: \L{LPPL}
+  \end{itemize}
+\end{Slide}
+\notes{
 
+\section{ä÷ãîä}
 
+îñîê æä ëúåá áöåøä ùì äøöàä, ëàùø øåá äúåëï ðîöà áäòøåú )\L{notes}(.
+
+\subsection{îèøåú äîçì÷ä}
+
+ìîçì÷ä \L{\texttt{iitsmnr}} éù ùúé îèøåú. îèøä àçú äéà ìùîù ëîçì÷ä ìäëðú
+ù÷ôéí ìäøöàåú. äîèøä äùðéä äéà ìäéåú áñéñ ìùéðåééí. àðé î÷ååä ù÷åáõ
+äîçì÷ä òöîå îúåòã îñôé÷ èåá åðåç äï ìùéîåù åäï ìùéðåé.
+
+\subsection{ôøåéé÷è \IvriTeX}
+
+äçáéìä äæå äéà çì÷ îôøåéé÷è \IvriTeX{}. æäå ôøåéé÷è ùîèøúå ìùôø àú
+äúîéëä äòáøéú á-\LaTeX. ôøèéí ðåñôéí òì äôøåéé÷è úåëìå ìîöåà
+á-\L{\hyperref{\IvritexUrl}{}{}{\IvritexUrl}}. 
+
+\subsection{øùéåï}
+
+ëì äîñîëéí áçáéìä æå ðéúðéí ìäôöä úçú øùéåï \L{LPPL} )\L{the LaTeX 
+Project Public License}(.
+
+}% end of \notes
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{Slide}{øôøðñ}{60+60}
   \begin{itemize}
@@ -90,13 +148,14 @@
   \end{itemize}
 \end{Slide}
 
-
+\notes{
 \section{øôøðñ}
 
 äîçì÷ä äæå îáåññú òì äîçì÷ä \L{seminar}. ëîåëï äéà ëåììú áúåëä úîéëä òáøéú åëï
 èåòðú àú äîçì÷ä \L{hyperref}.
 
-\subsection{äñáéáä \L{\emph{Slide}}} 
+%\subsection{äñáéáä \L{\emph{Slide}}} 
+\subsection{äñáéáä $Slide$} 
 ëîå äñáéáä \L{slide} ùì \L{seminar} àåìí òí ëîä
 úåñôåú. áøàù åáøàùåðä, äéà î÷áìú ùðé ôøîèøéí: äøàùåï äåà ëåúøú äù÷åôéú
 )áòáøéú(, åäùðé äåà æîï äù÷åôéú. ëîåëï äéà ãåàâú ùëì ù÷ó, åääñáøéí ùàçøéå,
@@ -116,18 +175,18 @@
 \subsection{î÷øåàéí}
 
 \begin{itemize}
-\item \textbf{\L{$\backslash$maketitleslide}} 
-  éåöø ù÷ó ëåúøú )á÷åîä ì-)\L{$\backslash$ maketitle}(. öøéê ìäôéò áúåê 
-  ñáéáú \L{Slide}. îùúîù áðúåðéí îäô÷åãåú \L{$\backslash$ title}, 
-  \L{$\backslash$ author} )ëøâéì á-\LaTeX(, å-\L{$\backslash$ titleextra}
+\item \L{\verb"\maketitleslide"} 
+  éåöø ù÷ó ëåúøú )á÷åîä ì-)\L{\verb"\maketitle"}(. öøéê ìäôéò áúåê 
+  ñáéáú \L{Slide}. îùúîù áðúåðéí îäô÷åãåú \L{\verb"\title"}, 
+  \L{\verb"author"} )ëøâéì á-\LaTeX(, å-\L{\verb"\titleextra"}
   )è÷ñè ðåñó áúçúéú ù÷ó äôúéçä(.
 
-\item \textbf{\L{$\backslash$hence}} 
+\item \L{\verb"\hence"} :
   çõ ëôåì áëéååï äè÷ñè )éîéðä áè÷ñè àðâìé, åùîàìä áè÷ñè òáøé(. àôùø ìäùúîù áå
   úîéã áìé ÷ùø ìëéååï äè÷ñè. æåé âí ãåâîä ìúéáú î÷øå äîúðäâ áöåøä ùåðä áòáøéú
   åáàðâìéú.
 \end{itemize}
-
+}% end of \notes
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{Slide}{ä÷ãîä}{1*60+30}
   \begin{itemize}
@@ -140,7 +199,7 @@
   \item øùéåï: \L{LPPL}
   \end{itemize}
 \end{Slide}
-
+\notes{
 \section{ä÷ãîä}
 
 îñîê æä ëúåá áöåøä ùì äøöàä, ëàùø øåá äúåëï ðîöà áäòøåú )\L{notes}(.
@@ -161,7 +220,7 @@
 
 ëì äîñîëéí áçáéìä æå ðéúðéí ìäôöä úçú øùéåï \L{LPPL} )\L{the LaTeX 
 Project Public License}(.
-
+}% end of \notes
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{Slide}{ùéîåù áñéñé}{1+2+3+4+5*5+2}\label{sld:simple-doc}
   îñîê ôùåè:
@@ -189,6 +248,7 @@
 \end{otherlanguage}
 
 \end{Slide}
+\notes{
 
 \section{ùéîåù áñéñé}
 
@@ -204,9 +264,19 @@
 ëì ä ùðîöà áúåê ñáéáú \L{Slide} éåôéò áúåê ù÷ó. ëì îä ùðîöà îçåõ ìùáéáú
 \L{Slides} ùééê ìäòøåú )\L{notes}(. áúåê ñáéáú \L{Slide} àôùø ìäùúîù áëì
 ô÷åãåú \LaTeX{} äøâéìåú. äù÷ó îîåøëæ àðëéú áîñâøú äù÷ó.
+}% end of \notes
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{Slide}{äòøåú )\L{notes}(}{0}
+%\begin{Slide}{äòøåú )\L{notes}(}{0}
+% parens removed: they have a wierd interaction with the postscript
+% here is the postscript code:
+% 
+%  /Title (\R {���{notes}(})
+%
+% As you can see, the ')' must have closed some parens there.
+% I'm note sure if this is a bug of ghostscript (ghostscrit 6.52 
+% has a problem with that) or of dvips that created this postscript
+\begin{Slide}{äòøåú - \L{notes}}{0}
   
   \begin{itemize}
   \item ëì îä ùðîöà îçåõ ìñáéáú \L{Slide}
@@ -215,6 +285,7 @@
   \item ìùéí àú äòé÷ø áù÷ôéí åìôøè áäòøåú
   \end{itemize}
 \end{Slide}
+\notes{
 
 \subsection{äòøåú}
 
@@ -239,6 +310,7 @@
 
 àåìí ìäøöàä éù úåëï, âí àí äåà àéðå îåôéò áù÷ôéí. ääòøåú äï î÷åí îúàéí
 ìëúåá àú äúåëï äæä.
+}% end of \notes
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{Slide}{úæîåï}{0}
@@ -253,6 +325,7 @@
     \end{itemize}
   \end{itemize}
 \end{Slide}
+\notes{
 
 \subsection{úæîåï}
 
@@ -267,6 +340,7 @@
 
 %\section*{åîä îöáéðå ëøâò?}
 %\Slidecontents
+}% end of \notes
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{Slide}{î÷åøåú îéãò ðåñôéí}{2}
@@ -278,21 +352,24 @@
   \item äúéòåã ùì äçáéìä \L{seminar}
   \end{itemize}
 \end{Slide}
-
+\notes{
 \section{î÷åøåú îéãò ðåñôéí}
 
 ëîä ãáøéí ðåñôéí ùîåîìõ ì÷øåà
 
-\subsection{\L{The \LaTeX book}}
+%\subsection{\L{The \LaTeX book}}
+\subsection*{\L{The \LaTeX book}}
 
 ìëúåá
 
-\subsection{\L{The Not So Short Introduction to \LaTeXe}}
+%\subsection{\L{The Not So Short Introduction to \LaTeXe}}
+\subsection*{\L{The Not So Short Introduction to \LaTeXe}}
 
 çåáøú ùì ë-\L{80} òîåãé \L{A5}. àí àéï ìëí âéùä ìñôø, îåîìõ ìäúçéì îîðä.
 ãé îåîìõ ìùîåø áäéãâ éã.
 
-\subsection{÷åáõ ä-\L{info}}
+%\subsection{÷åáõ ä-\L{info}}
+\subsection{÷åáõ ä-$info$}
 
 òí äôöú \L{te\TeX} îâéò ÷åáõ òæøä áôåøîè \L{texinfo}, àùø âí âøñú
 \L{HTML} ùìå æîéðä. àí äúéòåã ùì äçáéìä îåú÷ï ëîå ùöøéê, àæ äô÷åãä 
@@ -304,11 +381,13 @@
 àîåøä ìúú ìëí ÷åáõ òæøä. æä àéðå øôøðñ îìà, àåìí äåà îëéì øùéîä ùì äøáä
 îäô÷åãåú, äñáéáåú åäîåðéí äçùåáéí. äåà áäçìè òåæø ìäúîöà.
   
-\subsection{äúéòåã ùì äçáéìä \L{seminar}}
+%\subsection{äúéòåã ùì äçáéìä \L{seminar}}
+\subsection{äúéòåã ùì äçáéìä $seminar$}
 
 òí äîçì÷ä \L{seminar} îâéò ìà îòè úéòåã. øåá äúéòåã ðîöà áîãøéê ìîùúîù
 )\L{sem-user.dvi}( åëï á÷åáõ äùàìåú äðôåöåú )\L{Seminar-FAQ.html}(.
 ëîåëï äúéòåã ùì çáéìåú ðîùðä ùì äîçì÷ä )ëâåï \L{slidesec}( ðîöà áøåáå
 á÷åáöé äî÷åø ùìäï )\L{slidesec.sty} áî÷øä ùì \L{slidesec}(.
 
+}% end of \notes
 \end{document}

Modified: pkg/ivritex/branches/upstream/current/latex/heblatex/hebinp.dtx
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/heblatex/hebinp.dtx	(original)
+++ pkg/ivritex/branches/upstream/current/latex/heblatex/hebinp.dtx	Sat Apr 15 00:19:15 2006
@@ -59,7 +59,7 @@
 %</driver>
 % \fi
 % \ProvidesFile{hebinp.dtx}
-        [2001/07/22 v1.1a Hebrew input encoding file]
+        [2003/11/02 v1.1a Hebrew input encoding file]
 %
 % \providecommand\dst{\textsc{docstrip}}
 % \GetFileInfo{hebinp.dtx}
@@ -70,9 +70,9 @@
 % \changes{hebinp~1.1}{2001/02/27}{%
 %    Renamed hebrew letters: \backslash alef to \backslash hebalef etc. 
 %    (by Tzafrir Cohen)}
-% \changes{hebinp~1.1a}{2001/07/22}{%
-%    Renamed CP1255 niked \backslash patah to \backslash hebpatah etc. 
-%    Added the macro \backslash DisableNikud - may not be a good idea 
+% \changes{hebinp~1.1a}{2003/07/22}{%
+%    Renamed CP1255 nikud \cs{patah} to \cs{hebpatah} etc. 
+%    Added the macro \cs{DisableNikud} - may not be a good idea 
 %    (by Tzafrir Cohen)}
 %
 % \section{Hebrew input encodings}\label{sec:hebinp}

Modified: pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.dtx
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.dtx	(original)
+++ pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.dtx	Sat Apr 15 00:19:15 2006
@@ -63,7 +63,7 @@
 %</driver>
 % \fi
 % \ProvidesFile{hebrew.dtx}
-        [2002/12/26 v2.3f %
+        [2003/11/01 v2.3h %
 % \iffalse
 %<hebrew>         Hebrew language definition from the babel system
 %<rightleft>         Right-to-Left support from the babel system
@@ -231,6 +231,17 @@
 %    redefined \backslash list instead of redefining every environment 
 %    that uses it. some pscolor handling, removed HeblatexEncoding 
 %    (don't use 2.3e) (by Tzafrir Cohen)}
+% \changes{hebrew~2.3g}{2003/06/05}{
+%    Reimplemented the printing of Hebrew numerals and Hebrew
+%    counters; modified \pkg{hebcal.sty} to use this implementation
+%    when typesetting Hebrew dates; added option |full| to package
+%    \pkg{hebcal}; also removed some gratuitous
+%    spaces inserted by \pkg{hebcal.sty} by adding comment marks.
+%    CAUTION: the changes to \pkg{hebcal.sty} make it dependent on
+%    \pkg{babel} and not useable as a stand-alone package. Is this a
+%    problem? (by Ron Artstein), }
+% \changes{hebrew~2.3h}{2003/11/01}{
+%    changed the default input encoding ot cp1255 (Tzafrir)}
 % \section{The Hebrew language}\label{sec:hebrew}
 %
 %    The file \file{\filename}\footnote{The Hebrew language support
@@ -374,8 +385,8 @@
 %      |\def\HeblatexEncodingFile{he8enc}|
 %    \end{quote}
 %    \begin{macrocode}
-\providecommand{\HeblatexEncoding}{LHE}%
-\providecommand{\HeblatexEncodingFile}{lheenc}%
+\providecommand{\HeblatexEncoding}{HE8}%
+\providecommand{\HeblatexEncodingFile}{he8enc}%
 \newcommand{\heblatex at set@encoding}[2]{
 }
 \AtEndOfPackage{%
@@ -408,7 +419,7 @@
 %    \end{quote}
 %    \begin{macrocode}
 \AtEndOfPackage{%
-  \@ifpackageloaded{inputenc}{}{\RequirePackage[8859-8]{inputenc}}}
+  \@ifpackageloaded{inputenc}{}{\RequirePackage[cp1255]{inputenc}}}
 %    \end{macrocode}
 %
 %    The next step consists of defining commands to switch to (and
@@ -634,275 +645,418 @@
 %    \end{macrocode}
 %  \end{macro}
 %
-%    Here we define the two Hebrew counter types --- |\hebr|, which
-%    counts in Hebrew letters, and |\gim|, which is Gimatria. Both
-%    counters can be used in any place, so we should ensure Hebrew
-%    mode by using the |\@hebrew| macro.
+%  \subsubsection{Hebrew numerals}
 %
-%  \begin{macro}{\hebr}
-%    We begin by defining |\hebr| which produces Hebrew numerals
-%    represented by Hebrew letters.
+%    We provide commands to print numbers in the traditional
+%    notation using Hebrew letters. We need commands that print 
+%    a Hebrew number from a decimal input, as well as commands 
+%    to print the value of a counter as a Hebrew number.  
+%  \begin{macro}{\if at gim@apost}
+%  \begin{macro}{\if at gim@final}
+%    Hebrew numbers can be written in various styles: with or without
+%    apostrophes, and with the letters kaf, mem, nun, pe, tsadi as either
+%    final or initial forms when they are the last letters in the
+%    sequence. We provide two flags to set the style options.
 %    \begin{macrocode}
-\def\@@hebr#1{%
-  \ifcase#1\or \hebalef\or \hebbet\or \hebgimel\or \hebdalet\or %
-     \hebhe\or \hebvav\or \hebzayin\or \hebhet\or \hebtet\or %
-     \hebyod\or \hebkaf\or \heblamed\or \hebmem\or \hebnun\or %
-     \hebsamekh\or \hebayin\or \hebpe\or \hebtsadi\or \hebqof\or %
-     \hebresh\or \hebshin\or \hebtav\else\@ctrerr\fi}
-\def\@hebr#1{\@hebrew{\@@hebr#1}}
-\def\hebr#1{\@hebr{\@nameuse{c@#1}}}
+\newif\if at gim@apost  % whether we print apostrophes
+\newif\if at gim@final  % whether we use final or initial letters
 %    \end{macrocode}
 %  \end{macro}
-%
-%  \begin{macro}{\gim}
-%    The macro |\gim| is similar to |\hebr|, but produces Hebrew
-%    numbers in Gimatria. It is implemented using |\NumToHebNoMil|.
-%
-%    \begin{macrocode}
-\def\gim#1{\protect\NumToHebNoMil{\@nameuse{c@#1}}}
-%    \end{macrocode}
 %  \end{macro}
-%
-% \begin{macro}{\HebrewMilSep}
-%    Separates elements of Hebrew year presented in Hebrew numerals
-%    (gimatria). Default value is '.
-%    \begin{macrocode}
-\def\HebrewMilSep{'}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\NumToHebNoMil}
-%    Translates Hebrew year (modulo 1000) to a string of Hebrew
-%    letters (gimatria).
-%    \begin{macrocode}
-\def\NumToHebNoMil#1{{%
-  \@tempcnta = #1 %
-  %\Remainder{\@tempcnta}{1000}{#1} % E.g., for  5752: #1 = 752
-  \def\HY{}% the string of hundreds, tens and ones
-  \ifnum #1 > 799 \strcat{\HY}{\hebtav\hebtav}\advance#1 by -800 \fi%
-  \ifnum #1 > 399 \strcat{\HY}{\hebtav}\advance#1  by -400 \fi%
-  \ifnum #1 > 299 \strcat{\HY}{\hebshin}\advance#1  by -300 \fi%
-  \ifnum #1 > 199 \strcat{\HY}{\hebresh}\advance#1  by -200 \fi%
-  \ifnum #1 > 99  \strcat{\HY}{\hebqof}\advance#1  by -100 \fi%
-  \ifnum #1 > 0
-%    \end{macrocode}
-%    15 and 16 are special exceptions:
-%    \begin{macrocode}
-           \ifnum #1 = 16 %
-                   \strcat{\HY}{\hebtet\hebzayin}%
-           \else%
-                   \ifnum #1 = 15 %
-                           \strcat{\HY}{\hebtet\hebvav}%
-                   \else%
-                           \Remainder{#1}{10}{\count0 }%
-                           \divide #1 by 10 %
-                           \ifnum\@tempcnta = 0%
-                               \strcat{\HY}{\TensInHebrewEnd{#1}}%
-                           \else%
-                               \strcat{\HY}{\TensInHebrew{#1}}%
-                               \strcat{\HY}{\DigitInHebrew{\count0 }}%
-                           \fi%
-                   \fi%
-           \fi%
-       \fi%
-       \countdef\HYLength=0  % \HYLength==\@tempcnta = strlen(\HY)
-       \HYLength =0 \expandafter\getlength\HY\end%
-       \ifnum\HYLength > 0 %
-           \ifnum\HYLength = 1 %
-                   \HY\HebrewMilSep%
-           \else%
-                   \expandafter\Insert\HY%
-           \fi%
-       \else%
-                   \relax%
-       \fi%
-  }}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\NumToHebrew}
-%    Translates Hebrew year to a string of Hebrew letters (gimatria),
-%    when the year is $0 < \mbox{year} < 10000$.
-%    \begin{macrocode}
-% TODO: Check this function for correct use of counters
-\def\NumToHebrew#1{{%
-       \count2 = #1%
-       \Remainder{\count2}{10000}{#1}% macro only for year <= 9999
-       \count2 = #1%
-       \Remainder{\count2}{1000}{#1}% E.g., for  5752: #1 = 752
-       \divide \count2 by 1000 %      E.g., for  5752: \count2 = 5
-       \countdef\thousand=2 %               \thousand==\count2
-       \def\Thousands{}% the string of thousands
-       \strcat{\Thousands}{\DigitInHebrew{\thousand }}% output 1000'
-       \ifnum\thousand = 5 % Change it in the next Hebrew Millennium..
-               \ifnum#1 > 0 % if 5000 < year < 6000
-                      \def\Thousands{}% don't mention thousands
-               \fi%
-       \fi%
-       \countdef\ThousandsLength=0 %
-       % \ThousandsLength==\count0 = strlen(\Thousands)
-       \ThousandsLength =0 \expandafter\getlength\Thousands\end%
-       % if the letter of thousands is not empty
-       \ifnum\ThousandsLength > 0
-               \strcat{\Thousands}{'}% add '
-       \fi%
-       \def\HY{\NumToHebNoMil{#1}}% the string of hundreds, tens and ones
-       \def\PratGadol{}% An additional string to date. Default: empty
-       \ifnum\thousand < 1%
-           \def\PratGadol{\ )\heblamed\hebpe"\hebgimel(}% 
-       \fi%
-       \ifnum #1 = 0%
-           \def\PratGadol{\ )\heblamed\hebpe"\hebgimel(}% 
-       \fi%
-       \Thousands\HY\PratGadol}}
-%    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\Remainder}
-%    |\Remainder{|\emph{a}|}{|\emph{b}|}{|\emph{c}|}| calculates 
-%    $c = a\%b == a-b\times\frac{a}{b}$
-%    \begin{macrocode}
-\def\Remainder#1#2#3{%
-    #3 = #1%                   %  c = a
-    \divide #3 by #2%          %  c = a/b
-    \multiply #3 by -#2%       %  c = -b(a/b)
-    \advance #3 by #1}%        %  c = a - b(a/b)
+%  \begin{macro}{\hebrewnumeral}
+%  \begin{macro}{\Hebrewnumeral}
+%  \begin{macro}{\Hebrewnumeralfinal}
+%    The commands that print a Hebrew number 
+%    must specify the style locally: relying on a global style
+%    option could cause a counter to
+%    print in an inconsistent manner---for instance, page numbers
+%    might appear in different styles if the global style option
+%    changed mid-way through a document.
+%    The commands only allow three of the four possible flag
+%    combinations (I do not know of a use that requires the
+%    combination of final letters and no apostrophes --RA).
+%
+%    Each command sets the style flags and calls |\@hebrew at numeral|.
+%    Double braces are used in order to protect the values of
+%    |\@tempcnta| and |\@tempcntb|, which are changed by this call;
+%    they also keep the flag assignments local (this is not important
+%    because the global values are never used).
+%    \begin{macrocode}
+\newcommand*{\hebrewnumeral}[1]      % no apostrophe, no final letters
+ {{\@gim at finalfalse\@gim at apostfalse\@hebrew at numeral{#1}}}
+\newcommand*{\Hebrewnumeral}[1]      % apostrophe, no final letters
+ {{\@gim at finalfalse\@gim at aposttrue\@hebrew at numeral{#1}}}
+\newcommand*{\Hebrewnumeralfinal}[1] % apostrophe, final letters
+ {{\@gim at finaltrue\@gim at aposttrue\@hebrew at numeral{#1}}}
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{\strcat}
-%    |\strcat{|\emph{str1}|}{|\emph{str2}|}| appends |str2| to the end
-%    of macro |str1|.
-%    \begin{macrocode}
-\def\strcat#1#2{\edef#1{#1#2}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\DigitInHebrew}
-%    Single digit $1\leq n\leq 9$ as Hebrew letter.
-%    The following shorter macro is also possible:
-%    \begin{verbatim}
-%    \def\DigitInHebrew #1{%
-%       {\ifnum#1>0 \ifnum#1<10 \advance#1 by `\_ \char#1 \fi\fi}}
-%    \end{verbatim}
-%    \begin{macrocode}
-\def\DigitInHebrew#1{%
-    \ifcase#1%
-         %  nothing for 0
-            \or\hebalef%  1
-            \or\hebbet%   2
-            \or\hebgimel% 3
-            \or\hebdalet% 4
-            \or\hebhe%    5
-            \or\hebvav%   6
-            \or\hebzayin% 7
-            \or\hebhet%   8
-            \or\hebtet%   9
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\TensInHebrew}
-%    Convert $10\times n$ ($1\leq n\leq 9$) into single Hebrew
-%    letter (gimatria).
-%    \begin{macrocode}
-\def\TensInHebrew#1{%
-    \ifcase #1%
-           % nothing for 0
-            \or\hebyod%    10
-            \or\hebkaf%    20
-            \or\heblamed%  30
-            \or\hebmem%    40
-            \or\hebnun%    50
-            \or\hebsamekh% 60
-            \or\hebayin%   70
-            \or\hebpe%     80
-            \or\hebtsadi%  90
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\TensInHebrewEnd}
-%    Convert $10\times n$ ($1\leq n\leq 9$) into single Hebrew
-%    letter. This letter is a final letter version (``oth sofith'') if
-%    it exists.
-%    \begin{macrocode}
-\def\TensInHebrewEnd#1{%
-    \ifcase #1%
-            %    nothing for 0
-            \or\hebyod%        10
-            \or\hebfinalkaf%   20
-            \or\heblamed%      30
-            \or\hebfinalmem%   40
-            \or\hebfinalnun%   50
-            \or\hebsamekh%     60
-            \or\hebayin%       70
-            \or\hebfinalpe%    80
-            \or\hebfinaltsadi% 90
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\getlength}
-%    |\getlength{|\emph{string}|}| returns the number of non-blank
-%    tokens. This macro is called if
-%    |\count0|==|strlen(`string')|$\geq 2$.
-%
-%    Usage: |{{\count0=0 \expandafter\getlength#1\end \number\count0}}|
-%    \begin{macrocode}
-\def\getlength#1{%
-       \ifx#1\end%
-         \let\next=\relax%
-       \else%
-         \advance\count0 by 1%
-         \let\next=\getlength%
-       \fi%
-       \next}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\extrashebrew}
-%    When switching to Hebrew, we `save' the current meaning of the
-%    internal \LaTeX\ commands |\@alph| and |\@Alph| and set them to
-%    use Hebrew alphabet.
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \begin{macro}{\alph}
+%  \begin{macro}{\@alph}
+%  \begin{macro}{\Alph}
+%  \begin{macro}{\@Alph}
+%  \begin{macro}{\Alphfinal}
+%  \begin{macro}{\@Alphfinal}
+%    Counter-printing commands are based on the above commands. The
+%    natural name for the counter-printing commands is |\alph|, because
+%    Hebrew numerals are the only way to represent numbers with
+%    Hebrew letters (kaf always means~20, never~11). Hebrew has no
+%    uppercase letters, hence no need for the familiar meaning of |\Alph|;
+%    we therefore define |\alph| to print counters as Hebrew numerals
+%    without apostrophes, and |\Alph| to print with apostrophes. A third
+%    form, |\Alphfinal|, is provided to print with apostrophes and final
+%    letters, as is required for Hebrew year designators. The commands
+%    |\alph| and |\Alph| are defined in \pkg{latex.ltx}, and we only
+%    need to redefine the internal commands |\@alph| and 
+%    |\@Alph|; for |\Alphfinal| we need to provide both a wrapper and
+%    an internal command. 
+%    The counter printing commands are made semi-robust: without the
+%    |\protect|, commands like |\theenumii| break (I'm not quite clear
+%    on why this happens, --RA); at the same time, we cannot make the 
+%    commands too robust (e.g.~with |\DeclareRobustCommand|) because
+%    this would enter the command name rather than its value into
+%    files like |.aux|, |.toc| etc\@.
+%    The old meanings of meaning of |\@alph| and |\@Alph| are saved
+%    upon entering Hebrew mode and restored upon exiting it.
 %    \begin{macrocode}
 \addto\extrashebrew{%
   \let\saved at alph=\@alph%
   \let\saved at Alph=\@Alph%
-  \def\@alph#1{\@hebrew{\@@hebr#1}}%
-  \def\@Alph#1{\@latin{\@@Alph#1}}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\noextrashebrew}
-%    In the macro |\noextrashebrew| we `restore' the |\@alph| and
-%    |\@Alph| commands to their values saved in |\extrashebrew|
-%    above.
-%    \begin{macrocode}
+  \renewcommand*{\@alph}[1]{\protect\hebrewnumeral{\number#1}}%
+  \renewcommand*{\@Alph}[1]{\protect\Hebrewnumeral{\number#1}}%
+  \def\Alphfinal#1{\expandafter\@Alphfinal\csname c@#1\endcsname}%
+  \providecommand*{\@Alphfinal}[1]{\protect\Hebrewnumeralfinal{\number#1}}}
 \addto\noextrashebrew{%
   \let\@alph=\saved at alph%
   \let\@Alph=\saved at Alph}
 %    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\appendix}
-%    It is usual in Hebrew documents to use Hebrew numerals instead of
-%    default uppercase Latin letters in the numbers of appendices.
-%    We save the current |\appendix| definition and simply change the
-%    definitions of |\thesection| (for \emph{article}) and of
-%    |\thechapter| (for \emph{report} and \emph{book}) to use our
-%    |\@hebr| counter.
+%    Note that |\alph| (without apostrophes) is already the
+%    appropriate choice for the second-level enumerate label, and
+%    |\Alph| (with apostrophes) is an appropriate choice for appendix;
+%    however, the default \LaTeX\ labels need to be redefined for
+%    appropriate cross-referencing, see below.
+%    \LaTeX\ default class files specify |\Alph| for
+%    the fourth-level enumerate level, this should probably be changed.
+%    Also, the way labels get flushed left by default looks inappropriate
+%    for Hebrew numerals, so we should redefine |\labelenumii| as well
+%    as |\labelenumiv| (presently not implemented).
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \begin{macro}{\theenumii}
+%  \begin{macro}{\theenumiv}
+%  \begin{macro}{\label}
+%    Cross-references to counter labels need to be printed according
+%    to the language environment in which a label was issued, not
+%    the environment in which it is called: for example, a label~(1b) 
+%    issued in a Latin environment should be referred to as~(1b) in a
+%    Hebrew text, and label~(2dalet) issued in a Hebrew environment
+%    should be referred to as~(2dalet) in a Latin text. This was the
+%    unanimous opinion in a poll sent to the Ivri\TeX\ list. 
+%    We therefore redefine |\theenumii| and |\theenumiv|, so that an
+%    explicit language instruction gets written to the |.aux| file.
+%    \begin{macrocode}
+\renewcommand{\theenumii}
+   {\if at rl\protect\hebrewnumeral{\number\c at enumii}%
+    \else\protect\L{\protect\@@alph{\number\c at enumii}}\fi}
+\renewcommand{\theenumiv}
+   {\if at rl\protect\Hebrewnumeral{\number\c at enumiv}%
+    \else\protect\L{\protect\@@Alph{\number\c at enumiv}}\fi}
+%    \end{macrocode}
+%    We also need to control for the font and direction in which a
+%    counter label is printed. Direction is straightforward: a Latin
+%    label like~(1b) should be written left-to-right when called in a
+%    Hebrew text, and a Hebrew label like~(2dalet) should be written
+%    right-to-left when called in a Latin text. The font question is
+%    more delicate, because we should decide whether the numerals
+%    should be typeset in the font of the language enviroment in which
+%    the label was issued, or that of the environment in which it is
+%    called. 
+%    \begin{itemize}
+%     \item
+%      A purely numeric label like~(23) looks best if it is set in the
+%      font of the surrounding language.
+%     \item
+%      But a mixed alphanumeric label like~(1b) lookes weird if
+%      the~`1' is taken from the Hebrew font; likewise, (2dalet) looks
+%      weird if the~`2' is taken from a Latin font.
+%     \item
+%      Finally, mixing the two possibilities is worst, because a
+%      single Hebrew sentence referring to examples~(1b) and~(2) would
+%      take the~`1' from the Latin font and the~`2' from the Hebrew
+%      font, and this looks really awful. (It is also very hard to
+%      implement). 
+%    \end{itemize}
+%    In light of the conflicting considerations it seems like there's
+%    no perfect solution. I have chosen to implement the top option,
+%    where numerals are taken from the font of the surrounding
+%    language, because it seems to me that reference to purely numeric
+%    labels is the most common, so this gives a good solution to the
+%    majority of cases and a mediocre solution to the minority.
+%
+%    We redefine the |\label| command which writes to the
+%    |.aux| file. Depending on the language environment we issue
+%    appropriate |\beginR/L|$\cdots$|\endR/L| commands to control the
+%    direction without affecting the font. Since these commands do not
+%    affect the value of |\if at rl|, we cannot use the macro
+%    |\@brackets| to determine the correct brackets to be used with
+%    |\p at enumiii|; instead, we let the language environment determine an
+%    explicit definition.
+%    \begin{macrocode}
+\def\label#1{\@bsphack
+  \if at rl
+    \def\p at enumiii{\p at enumii)\theenumii(}%
+    \protected at write\@auxout{}%
+         {\string\newlabel{#1}{{\beginR\@currentlabel\endR}{\thepage}}}%
+  \else
+    \def\p at enumiii{\p at enumii(\theenumii)}%
+    \protected at write\@auxout{}%
+         {\string\newlabel{#1}{{\beginL\@currentlabel\endL}{\thepage}}}%
+  \fi
+  \@esphack}
+%    \end{macrocode}
+%    NOTE: it appears that the definition of |\label| is
+%    language-independent and thus belongs in \pkg{rlbabel.def}, but
+%    this is not the case. The decision to typeset label numerals
+%    in the font of the surrounding language is reasonable for Hebrew,
+%    because mixed-font (1b) and (2dalet) are somewhat acceptable. The
+%    same may not be acceptable for Arabic, whose numeral glyphs are
+%    radically different from those in the Latin fonts. The decision
+%    about the direction may also be different for Arabic, which is
+%    more right-to-left oriented than Hebrew (two examples: dates like
+%    15/6/2003 are written left-to-right in Hebrew but right-to-left
+%    in Arabic; equations like $1+2=3$ are written left-to-right in
+%    Hebrew but right-to-left in Arabic elementary school textbooks
+%    using Arabic numeral glyphs). My personal hunch is that a label
+%    like~(1b) in an Arabic text would be typeset left-to-right if
+%    the~`1' is a Western glyph, but right-to-left if the~`1' is an
+%    Arabic glyph. But this is just a guess, I'd have to ask Arab
+%    typesetters to find the correct answer. --RA.
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \begin{macro}{\appendix}
+%    The following code provides for the proper printing of appendix
+%    numbers in tables of contents. Section and chapter headings are
+%    normally bilingual: regardless of the text language, the author
+%    supplies each section/chapter with two headings---one for the
+%    Hebrew table of contents and one for the Latin table of contents.
+%    It makes sense that the label should be a Latin letter in the
+%    Latin table of contents and a Hebrew letter in the Hebrew table
+%    of contents. The definition is similar to that of |\theenumii|
+%    and |\theenumiv| above, but additional |\protect| commands ensure
+%    that the entire condition is written the |.aux| file. The
+%    appendix number will therefore be typeset according to the
+%    environment in which it is used rather than issued: a Hebrew
+%    number (with apostrophes) in a Hebrew environment and a Latin
+%    capital letter in a Latin environment (the command 
+%    |\@@Alph| is set in \pkg{rlbabel.def} to hold the default meaning
+%    of \LaTeX\ [latin] |\@Alph|, regardless of the mode in which it is
+%    issued). The net result is that
+%    the second appendix will be marked with~`B' in the Latin table of
+%    contents and with `bet' in the Hebrew table of contents; the mark
+%    in the main text will depend on the language of the appendix itself.
 %    \begin{macrocode}
 \@ifclassloaded{letter}{}{%
 \@ifclassloaded{slides}{}{%
   \let\@@appendix=\appendix%
   \@ifclassloaded{article}{%
     \renewcommand\appendix{\@@appendix%
-      \renewcommand\thesection{\protect\if at rl\@hebr\c at section%
-        \protect\else\@Alph\c at section\protect\fi}}}%
+      \renewcommand\thesection
+        {\protect\if at rl\protect\Hebrewnumeral{\number\c at section}%
+         \protect\else\@@Alph\c at section\protect\fi}}}
    {\renewcommand\appendix{\@@appendix%
-      \renewcommand\thechapter{\protect\if at rl\@hebr\c at chapter%
-        \protect\else\@Alph\c at chapter\protect\fi}}}}}
+      \renewcommand\thechapter
+        {\protect\if at rl\protect\Hebrewnumeral{\number\c at chapter}%
+         \protect\else\@@Alph\c at chapter\protect\fi}}}}}
+%    \end{macrocode}
+%    QUESTION: is this also the appropriate way to refer to an
+%    appendix in the text, or should we retain the original label the
+%    same way we did with |enumerate| labels? 
+%    ANOTHER QUESTION: are similar redefinitions needed for other
+%    counters that generate texts in bilingual lists like |.lof/.fol|
+%    and |.lot/.tol|? --RA.
+%  \end{macro}
+%  \begin{macro}{\@hebrew at numeral}
+%    The command |\@hebrew at numeral| prints a Hebrew number. The groups
+%    of thousands, millions, billions are separated by apostrophes and
+%    typeset without apostrophes or final letters; the remainder
+%    (under 1000) is typeset conventionally, with the selected styles
+%    for apostrophes and final letters. 
+%    The function calls on |\gim at no@mil| to typeset each
+%    three-digit block. The algorithm 
+%    is recursive, but the maximum recursion depth is~4 because \TeX\
+%    only allows numbers up to $2^{31}-1 = 2{,}147{,}483{,}647$.
+%    The typesetting routine is wrapped in |\@hebrew| in order to
+%    ensure that numbers are always typeset in Hebrew mode.
+%
+%    Initialize: |\@tempcnta| holds the value, |\@tempcntb| is used for
+%    calculations.
+%    \begin{macrocode}
+\newcommand*{\@hebrew at numeral}[1]
+{\@hebrew{\@tempcnta=#1\@tempcntb=#1\relax
+ \divide\@tempcntb by 1000
+%    \end{macrocode}
+%    If we're under 1000, call |\gim at nomil|
+%    \begin{macrocode}
+ \ifnum\@tempcntb=0\gim at nomil\@tempcnta\relax
+%    \end{macrocode}
+%    If we're above 1000 then force no apostrophe and no final letter
+%    styles for the value above~1000, recur for the value above~1000,
+%    add an apostrophe, and call |\gim at nomil| for the remainder.
+%    \begin{macrocode}
+ \else{\@gim at apostfalse\@gim at finalfalse\@hebrew at numeral\@tempcntb}'%
+      \multiply\@tempcntb by 1000\relax
+      \advance\@tempcnta by -\@tempcntb\relax
+      \gim at nomil\@tempcnta\relax
+ \fi
+}}
+%    \end{macrocode}
+%    NOTE: is it the case that 15,000 and 16,000 are written as
+%    yod-he and yod-vav, rather than tet-vav and tet-zayin? This
+%    vaguely rings a bell, but I'm not certain. If this is the case,
+%    then the current behavior is incorrect and should be changed. --RA.
+%  \end{macro}
+%  \begin{macro}{\gim at nomil}
+%    The command |\gim at nomil| typesets an integer between 0~and~999
+%    (for~0 it typesets nothing). The code has been modified from the
+%    old |hebcal.sty|
+%    (appropriate credits---Boris Lavva and Michail Rozman ?).
+%    |\@tempcnta| holds the total value that remains to be typeset.
+%    At each stage we find the highest valued letter that is 
+%    less than or equal to |\@tempcnta|, and call on |\gim at print| to
+%    subtract this value and print the letter.
+%
+%    Initialize: |\@tempcnta| holds the value, there is no previous
+%    letter. 
+%    \begin{macrocode}
+\newcommand*{\gim at nomil}[1]{\@tempcnta=#1\@gim at prevfalse
+%    \end{macrocode}
+% Find the hundreds digit.
+%    \begin{macrocode}
+  \@tempcntb=\@tempcnta\divide\@tempcntb by 100\relax % hundreds digit
+  \ifcase\@tempcntb                     % print nothing if no hundreds
+     \or\gim at print{100}{\hebqof}%
+     \or\gim at print{200}{\hebresh}%
+     \or\gim at print{300}{\hebshin}%
+     \or\gim at print{400}{\hebtav}%
+     \or\hebtav\@gim at prevtrue\gim at print{500}{\hebqof}%
+     \or\hebtav\@gim at prevtrue\gim at print{600}{\hebresh}%
+     \or\hebtav\@gim at prevtrue\gim at print{700}{\hebshin}%
+     \or\hebtav\@gim at prevtrue\gim at print{800}{\hebtav}%
+     \or\hebtav\@gim at prevtrue\hebtav\gim at print{900}{\hebqof}%
+  \fi
 %    \end{macrocode}
-% \end{macro}
+%    Find the tens digit. The numbers 15 and 16 are traditionally
+%    printed as tet-vav ($9+6$) and tet-zayin ($9+7$) to avoid
+%    spelling the Lord's name.
+%    \begin{macrocode}
+  \@tempcntb=\@tempcnta\divide\@tempcntb by 10\relax      % tens digit
+  \ifcase\@tempcntb                         % print nothing if no tens
+      \or                                   % number between 10 and 19
+              \ifnum\@tempcnta = 16 \gim at print {9}{\hebtet}% tet-zayin
+         \else\ifnum\@tempcnta = 15 \gim at print {9}{\hebtet}% tet-vav
+         \else                      \gim at print{10}{\hebyod}%
+              \fi % \@tempcnta = 15
+              \fi % \@tempcnta = 16
+%    \end{macrocode}
+%    Initial or final forms are selected according to the current
+%    style option; |\gim at print| will force a non-final letter in
+%    non-final position by means of a local style change.
+%    \begin{macrocode}
+      \or\gim at print{20}{\if at gim@final\hebfinalkaf\else\hebkaf\fi}%
+      \or\gim at print{30}{\heblamed}%
+      \or\gim at print{40}{\if at gim@final\hebfinalmem\else\hebmem\fi}%
+      \or\gim at print{50}{\if at gim@final\hebfinalnun\else\hebnun\fi}%
+      \or\gim at print{60}{\hebsamekh}%
+      \or\gim at print{70}{\hebayin}%
+      \or\gim at print{80}{\if at gim@final\hebfinalpe\else\hebpe\fi}%
+      \or\gim at print{90}{\if at gim@final\hebfinaltsadi\else\hebtsadi\fi}%
+  \fi
+%    \end{macrocode}
+%    Print the ones digit.
+%    \begin{macrocode}
+  \ifcase\@tempcnta                         % print nothing if no ones
+      \or\gim at print{1}{\hebalef}%
+      \or\gim at print{2}{\hebbet}%
+      \or\gim at print{3}{\hebgimel}%
+      \or\gim at print{4}{\hebdalet}%
+      \or\gim at print{5}{\hebhe}%
+      \or\gim at print{6}{\hebvav}%
+      \or\gim at print{7}{\hebzayin}%
+      \or\gim at print{8}{\hebhet}%
+      \or\gim at print{9}{\hebtet}%
+  \fi
+}
+%    \end{macrocode}
+%  \end{macro}
+%  \begin{macro}{\gim at print}
+%  \begin{macro}{\if at gim@prev}
+%    The actual printing routine typesets a digit with the appropriate
+%    apostrophes: if a number sequence consists of a
+%    single letter then it is followed by a single apostrophe, and if
+%    it consists of more than one letter then a double
+%    apostrophe is inserted before the last letter.
+%    We typeset the letters one at a time, keeping a flag that tells
+%    us if any previous letters had been typeset.
+%    \begin{macrocode}
+\newif\if at gim@prev % flag if a previous letter has been typeset
+%    \end{macrocode}
+%    For each letter, we
+%    first subtract its value from the total. Then, 
+%    \begin{itemize}
+%     \item
+%      if the result is zero then this is the last letter; we check
+%      the flag to see if this is the only letter and print it with
+%      the appropriate apostrophe;
+%     \item
+%      if the result is not zero then there remain additional letters
+%      to be typeset; we print without an apostrophe and set the
+%      `previous letter' flag. 
+%    \end{itemize}
+%    |\@tempcnta| holds the total value that remains to be typeset.
+%    We first deduct the letter's value from |\@tempcnta|,
+%    so |\@tempcnta| is zero if and only if this is the last letter.
+%    \begin{macrocode}
+\newcommand*{\gim at print}[2]{%   #2 is a letter, #1 is its value.
+  \advance\@tempcnta by -#1\relax% deduct the value from the remainder
+%    \end{macrocode}
+%    If this is the last letter, we print with the appropriate
+%    apostrophe (depending on the style option):
+%    if there is a preceding letter, print |"x| if the style calls for
+%    apostrophes, |x| if it doesn't;
+%    otherwise, this is the only letter: print |x'| if the style calls
+%    for apostrophes, |x| if it doesn't.
+%    \begin{macrocode}
+  \ifnum\@tempcnta=0% if this is the last letter
+     \if at gim@prev\if at gim@apost"\fi#2%
+     \else#2\if at gim@apost'\fi\fi%
+%    \end{macrocode}
+%    If this is not the last letter: print a non-final form (by
+%    forcing a local style option) and set the `previous letter' flag.
+%    \begin{macrocode}
+  \else{\@gim at finalfalse#2}\@gim at prevtrue\fi}
+%    \end{macrocode}
+%  \end{macro}
+%  \end{macro}
+%
+%  \begin{macro}{\hebr}
+%  \begin{macro}{\gim}
+%    The older Hebrew counter commands |\hebr| and |\gim| are retained
+%    in order to keep older documents from breaking. They are set to
+%    be equivalent to |\alph|, and their use is deprecated. Note that
+%    |\hebr| gives different results than it had in the past---it
+%    now typesets 11 as yod-alef rather than kaf.
+%    \begin{macrocode}
+\let\hebr=\alph
+\let\gim=\alph
+%    \end{macrocode}
+%  \end{macro}
+%  \end{macro}
 %
 %    For backward compatibility with `older' \pkg{hebrew.sty}
 %    packages, we define Hebrew equivalents of some useful \LaTeX\
@@ -2483,6 +2637,9 @@
 %    The package was adjusted for \babel{} and \LaTeXe{} by Boris
 %    Lavva.
 %
+%    Changes to the printing routine (only) by Ron Artstein, June 1,
+%    2003.
+%
 %    This package should be included \emph{after} the \pkg{babel} with
 %    \pkg{hebrew} option, as following:
 %    \begin{quote}
@@ -2510,6 +2667,14 @@
 %       |\Hebrewdate{\hd}{\hm}{\hy}|
 %    \end{quote}
 %
+%    \DescribeMacro{full}
+%    The package option |full| sets the flag |\@full at hebrew@year|,
+%    which causes years from the current millenium to be printed with
+%    the thousands digit (he-tav-shin-samekh-gimel). Without this 
+%    option, thousands are not printed for the current millenium.
+%    NOTE: should this be a command option rather than a package
+%    option? --RA.
+%
 % \subsubsection{Introduction}
 %
 %    The Hebrew calendar is inherently complicated: it is lunisolar --
@@ -2560,6 +2725,10 @@
 %
 %    \begin{macrocode}
 %<*calendar>
+\newif\if at full@hebrew at year
+\@full at hebrew@yearfalse
+\DeclareOption{full}{\@full at hebrew@yeartrue}
+\ProcessOptions
 \newcount\Hebrewday  \newcount\Hebrewmonth   \newcount\Hebrewyear
 %    \end{macrocode}
 %
@@ -2612,96 +2781,35 @@
 %    one should change or add commands here.
 %
 %    We start with Hebrew language macros.
-% \begin{macro}{\HebrewYearChar}
-%    Separates elements of Hebrew year presented in Hebrew numerals
-%    (gimatria). Default value is '.
-%    \begin{macrocode}
-\def\HebrewYearChar{'}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ShortHYName}
-%    Translates Hebrew year (modulo 1000) to a string of Hebrew
-%    letters (gimatria).
-%    \begin{macrocode}
-\def\ShortHYName#1{{%
-  \count2 = #1%
-  \Remainder{\count2}{1000}{#1}% E.g., for  5752: #1 = 752
-  \def\HY{}% the string of hundreds, tens and ones
-  \ifnum #1 > 799 \strcat{\HY}{\hebtav\hebtav}\advance#1 by -800 \fi%
-  \ifnum #1 > 399 \strcat{\HY}{\hebtav}\advance#1  by -400 \fi%
-  \ifnum #1 > 299 \strcat{\HY}{\hebshin}\advance#1  by -300 \fi%
-  \ifnum #1 > 199 \strcat{\HY}{\hebresh}\advance#1  by -200 \fi%
-  \ifnum #1 > 99  \strcat{\HY}{\hebqof}\advance#1  by -100 \fi%
-  \ifnum #1 > 0
-%    \end{macrocode}
-%    15 and 16 are special exceptions:
-%    \begin{macrocode}
-           \ifnum #1 = 16 %
-                   \strcat{\HY}{\hebtet\hebzayin}%
-           \else%
-                   \ifnum #1 = 15 %
-                           \strcat{\HY}{\hebtet\hebvav}%
-                   \else%
-                           \Remainder{#1}{10}{\count0 }%
-                           \divide #1 by 10 %
-                           \ifnum\count0 = 0%
-                               \strcat{\HY}{\TensInHebrewEnd{#1}}%
-                           \else%
-                               \strcat{\HY}{\TensInHebrew{#1}}%
-                               \strcat{\HY}{\DigitInHebrew{\count0 }}%
-                           \fi%
-                   \fi%
-           \fi%
-       \fi%
-       \countdef\HYLength=0  % \HYLength==\count0 = strlen(\HY)
-       \HYLength =0 \expandafter\getlength\HY\end%
-       \ifnum\HYLength > 0 %
-           \ifnum\HYLength = 1 %
-                   \HY\HebrewYearChar%
-           \else%
-                   \expandafter\Insert\HY%
-           \fi%
-       \else%
-                   \relax%
-       \fi}}
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\HebrewYearName}
-%    Translates Hebrew year to a string of Hebrew letters (gimatria),
-%    when the year is $0 < \mbox{year} < 10000$.
+%    Prints Hebrew year as a Hebrew number. Disambiguates strings by
+%    adding lamed-pe-gimel to years of the first Jewish millenium and
+%    to years divisible by 1000. Suppresses the thousands digit in the
+%    current millenium unless the package option |full| is selected.
+%    NOTE: should this be provided as a command option rather than a
+%    package option? --RA.
 %    \begin{macrocode}
 \def\HebrewYearName#1{{%
-       \count2 = #1%
-       \Remainder{\count2}{10000}{#1}% macro only for year <= 9999
-       \count2 = #1%
-       \Remainder{\count2}{1000}{#1}% E.g., for  5752: #1 = 752
-       \divide \count2 by 1000 %      E.g., for  5752: \count2 = 5
-       \countdef\thousand=2 %               \thousand==\count2
-       \def\Thousands{}% the string of thousands
-       \strcat{\Thousands}{\DigitInHebrew{\thousand }}% output 1000'
-       \ifnum\thousand = 5 % Change it in the next Hebrew Millennium..
-               \ifnum#1 > 0 % if 5000 < year < 6000
-                      \def\Thousands{}% don't mention thousands
-               \fi%
-       \fi%
-       \countdef\ThousandsLength=0 %
-       % \ThousandsLength==\count0 = strlen(\Thousands)
-       \ThousandsLength =0 \expandafter\getlength\Thousands\end%
-       % if the letter of thousands is not empty
-       \ifnum\ThousandsLength > 0
-               \strcat{\Thousands}{'}% add '
-       \fi%
-       \def\HY{\ShortHYName{#1}}% the string of hundreds, tens and ones
-       \def\PratGadol{}% An additional string to date. Default: empty
-       \ifnum\thousand < 1%
-           \def\PratGadol{\ )\heblamed\hebpe"\hebgimel(}% 
-       \fi%
-       \ifnum #1 = 0%
-           \def\PratGadol{\ )\heblamed\hebpe"\hebgimel(}% 
-       \fi%
-       \Thousands\HY\PratGadol}}
+   \@tempcnta=#1\divide\@tempcnta by 1000\multiply\@tempcnta by 1000
+   \ifnum#1=\@tempcnta\relax % divisible by 1000: disambiguate
+     \Hebrewnumeralfinal{#1}\ )\heblamed\hebpe"\hebgimel(%
+   \else % not divisible by 1000
+     \ifnum#1<1000\relax     % first millennium: disambiguate
+       \Hebrewnumeralfinal{#1}\ )\heblamed\hebpe"\hebgimel(%
+     \else 
+       \ifnum#1<5000
+         \Hebrewnumeralfinal{#1}%
+       \else
+         \ifnum#1<6000 % current millenium, print without thousands
+           \@tempcnta=#1\relax
+           \if at full@hebrew at year\else\advance\@tempcnta by -5000\fi
+           \Hebrewnumeralfinal{\@tempcnta}%
+         \else % #1>6000
+           \Hebrewnumeralfinal{#1}%
+         \fi
+       \fi
+     \fi
+   \fi}}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -2739,108 +2847,10 @@
 % \begin{macro}{\HebrewDayName}
 %    Name of day in Hebrew letters (gimatria).
 %    \begin{macrocode}
-\def\HebrewDayName#1{%
-   \ifcase#1%
-       % nothing for 0
-       \or\hebalef'%
-       \or\hebbet'%
-       \or\hebgimel'%
-       \or\hebdalet'%
-       \or\hebhe'%
-       \or\hebvav'%
-       \or\hebzayin'%
-       \or\hebhet'%
-       \or\hebtet'%
-       \or\hebyod'%
-       \or\hebyod''\hebalef%
-       \or\hebyod''\hebbet%
-       \or\hebyod''\hebgimel%
-       \or\hebyod''\hebdalet%
-       \or\hebtet''\hebvav%
-       \or\hebtet''\hebzayin%
-       \or\hebyod''\hebzayin%
-       \or\hebyod''\hebhet%
-       \or\hebyod''\hebtet%
-       \or\hebkaf'%
-       \or\hebkaf''\hebalef%
-       \or\hebkaf''\hebbet%
-       \or\hebkaf''\hebgimel%
-       \or\hebkaf''\hebdalet%
-       \or\hebkaf''\hebhe%
-       \or\hebkaf''\hebvav%
-       \or\hebkaf''\hebzayin%
-       \or\hebkaf''\hebhet%
-       \or\hebkaf''\hebtet%
-       \or\heblamed'%
-       \or\heblamed''\hebalef%
-   \fi}
+\def\HebrewDayName#1{\Hebrewnumeral{#1}}
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\DigitInHebrew}
-%    Single digit $1\leq n\leq 9$ as Hebrew letter.
-%    The following shorter macro is also possible:
-%    \begin{verbatim}
-%    \def\DigitInHebrew #1{%
-%       {\ifnum#1>0 \ifnum#1<10 \advance#1 by `\_ \char#1 \fi\fi}}
-%    \end{verbatim}
-%    \begin{macrocode}
-\def\DigitInHebrew#1{%
-    \ifcase#1%
-         %  nothing for 0
-            \or\hebalef%  1
-            \or\hebbet%   2
-            \or\hebgimel% 3
-            \or\hebdalet% 4
-            \or\hebhe%    5
-            \or\hebvav%   6
-            \or\hebzayin% 7
-            \or\hebhet%   8
-            \or\hebtet%   9
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\TensInHebrew}
-%    Convert $10\times n$ ($1\leq n\leq 9$) into single Hebrew
-%    letter (gimatria).
-%    \begin{macrocode}
-\def\TensInHebrew#1{%
-    \ifcase #1%
-           % nothing for 0
-            \or\hebyod%    10
-            \or\hebkaf%    20
-            \or\heblamed%  30
-            \or\hebmem%    40
-            \or\hebnun%    50
-            \or\hebsamekh% 60
-            \or\hebayin%   70
-            \or\hebpe%     80
-            \or\hebtsadi%  90
-    \fi}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\TensInHebrewEnd}
-%    Convert $10\times n$ ($1\leq n\leq 9$) into single Hebrew
-%    letter. This letter is a final letter version (``oth sofith'') if
-%    it exists.
-%    \begin{macrocode}
-\def\TensInHebrewEnd#1{%
-    \ifcase #1%
-            %    nothing for 0
-            \or\hebyod%        10
-            \or\hebfinalkaf%   20
-            \or\heblamed%      30
-            \or\hebfinalmem%   40
-            \or\hebfinalnun%   50
-            \or\hebsamekh%     60
-            \or\hebayin%       70
-            \or\hebfinalpe%    80
-            \or\hebfinaltsadi% 90
-    \fi}
-%    \end{macrocode}
-% \end{macro}
 %
 % \begin{macro}{\FormatForHebrew}
 %    The macro |\FormatForHebrew{|\emph{hday}|}{|\emph{hmonth}
@@ -2931,54 +2941,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\strcat}
-%    |\strcat{|\emph{str1}|}{|\emph{str2}|}| appends |str2| to the end
-%    of macro |str1|.
-%    \begin{macrocode}
-\def\strcat#1#2{\edef#1{#1#2}}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\getlength}
-%    |\getlength{|\emph{string}|}| returns the number of non-blank
-%    tokens. This macro is called if
-%    |\count0|==|strlen(`string')|$\geq 2$.
-%
-%    Usage: |{{\count0=0 \expandafter\getlength#1\end \number\count0}}|
-%    \begin{macrocode}
-\def\getlength#1{%
-       \ifx#1\end%
-         \let\next=\relax%
-       \else%
-         \advance\count0 by 1%
-         \let\next=\getlength%
-       \fi%
-       \next}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Insert}
-%    Insert char |"| before the last char and output `string'.
-%
-%    Usage: |{\def\abc{abc}| |\count0=0|
-%    |\expandafter\getlength\abc\end| \\|\expandafter\Insert\abc}|
-%    \begin{macrocode}
-\def\Insert#1{%
-       \ifnum\count0 = 1%
-          #1%
-          \let\next=\relax%
-       \else%
-          #1%
-          \ifnum\count0 = 2%
-             "%
-          \fi
-          \advance\count0 by -1%
-          \let\next=\Insert%
-       \fi%
-       \next}
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\ifundefined}
 %    From the \TeX book, ex. 7.7: 
 %    \begin{quote}
@@ -3046,7 +3008,7 @@
                 \advance #3 by 1% % add leap day
             \fi%
         \fi%
-        \global\@common = #3}
+        \global\@common = #3}%
     #3 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3074,7 +3036,7 @@
          \tmpc = \tmpb%           %
          \divide \tmpc by 400%    % \tmpc = (year-1)/400
          \advance #2 by \tmpc%    % ... plus 4-century years.
-         \global\@common = #2}
+         \global\@common = #2}%
     #2 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3092,7 +3054,7 @@
         \advance #4 by \tmpd%     % add days in prior months
         \GregorianDaysInPriorYears{#3}{\tmpd}%
         \advance #4 by \tmpd%     % add days in prior years
-        \global\@common = #4}
+        \global\@common = #4}%
     #4 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3152,7 +3114,7 @@
 %                                 %  number of leap months this cycle
         \advance #2 by \tmpc%     %  add leap months
 %
-        \global\@common = #2}
+        \global\@common = #2}%
     #2 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3218,7 +3180,7 @@
                 \fi%
             \fi%
         \fi%
-        \global\@common = #2}
+        \global\@common = #2}%
     #2 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3235,7 +3197,7 @@
         \advance #1 by 1%
         \HebrewElapsedDays{#1}{#2}%
         \advance #2 by -\tmpe%
-        \global\@common = #2}
+        \global\@common = #2}%
     #2 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3290,7 +3252,7 @@
                 \advance #3 by 1%  %
             \fi%                   %
         \fi%
-        \global\@common = #3}
+        \global\@common = #3}%
     #3 = \@common}
 %    \end{macrocode}
 % \end{macro}
@@ -3308,7 +3270,7 @@
         \HebrewElapsedDays{#3}{#1}%
         \advance #4 by #1%         % Add days in prior years
         \advance #4 by -1373429%   % Subtract days before Gregorian
-        \global\@common = #4}      %   01.01.0001
+        \global\@common = #4}%     %   01.01.0001
     #4 = \@common}
 %    \end{macrocode}
 % \end{macro}

Modified: pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.fdd
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.fdd	(original)
+++ pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.fdd	Sat Apr 15 00:19:15 2006
@@ -47,7 +47,7 @@
 %                            TeXniek
 %                            All rights reserved.
 % \fi
-% \CheckSum{386}
+% \CheckSum{641}
 %
 % \iffalse
 %<LHEenc>\ProvidesFile{lheenc.def}
@@ -65,66 +65,54 @@
 %<HE8cmr>\ProvidesFile{HE8cmr.fd}
 %<HE8cmss>\ProvidesFile{HE8cmss.fd}
 %<HE8cmtt>\ProvidesFile{HE8cmtt.fd}
+%% The recoded Omega font (only Hebrew glyphs. Lacks other glyphs)
 %<HE8OmegaHebrew>\ProvidesFile{HE8OmegaHebrew.fd}
-%<HE8DeadSea>\ProvidesFile{HE8DeadSea.fd}
-%<HE8Jerusalem>\ProvidesFile{HE8Jerusalem.fd}
-%<HE8OldJaffa>\ProvidesFile{HE8OldJaffa.fd}
-%<HE8TelAviv>\ProvidesFile{HE8TelAviv.fd}
-%<HE8WideJaffa>\ProvidesFile{HE8WideJaffa.fd}
-%<HE8CourierShalom>\ProvidesFile{HE8CourierShalom.fd}
-%<HE8HelveticaNarkissTam>\ProvidesFile{HE8HelveticaNarkissTam.fd}
-%<HE8TimesNarkissim>\ProvidesFile{HE8TimesNarkissim.fd}
-%<HE8mfdavid>\ProvidesFile{HE8mfdavid.fd}
-%<HE8mffrank>\ProvidesFile{HE8mffrank.fd}
-%<HE8mffrankthick>\ProvidesFile{HE8mffrankthick.fd}
-%<HE8mffrankthin>\ProvidesFile{HE8mffrankthin.fd}
-%<HE8mfmiriam>\ProvidesFile{HE8mfmiriam.fd}
-%<HE8mfmiriamwide>\ProvidesFile{HE8mfmiriamwide.fd}
-%<HE8mfnarkistam>\ProvidesFile{HE8mfnarkistam.fd}
+%% The culmus fonts:
+%<HE8aharoni>\ProvidesFile{he8aharoni.fd}
+%<HE8david>\ProvidesFile{he8david.fd}
+%<HE8drugulin>\ProvidesFile{he8drugulin.fd}
+%<HE8ellinia>\ProvidesFile{he8ellinia.fd}
+%<HE8frank>\ProvidesFile{HE8frank.fd}
+%<HE8yad>\ProvidesFile{he8yad.fd}
+%<HE8miriam>\ProvidesFile{he8miriam.fd}
+%<HE8nahlieli>\ProvidesFile{he8nahlieli.fd}
 %<hebfont>\ProvidesPackage{hebfont}
 %<*driver>
 \ProvidesFile{hebrew.drv}
 %</driver>
 % \fi
 % \ProvidesFile{hebrew.fdd}
-        [1998/01/07 v1.1a
+%       [2003/09/14 v1.2a
+%         Hebrew font encodings support
+%         (test version: still liable to change)]
 % \iffalse
-%<LHEenc>         7-bit Hebrew font encoding
-%<LHEcmr>         Hebrew default font
-%<LHEcmss>         Hebrew sans-serif font
-%<LHEcmtt>         Hebrew typewriter font
-%<LHEclas>         Hebrew classic font (by Joel M. Hoffman)
-%<LHEshold>         Hebrew shalom old font (by Jonathan Brecher)
-%<LHEshscr>         Hebrew shalom script font (by Jonathan Brecher)
-%<LHEshstk>         Hebrew shalom stick font (by Jonathan Brecher)
-%<LHEfr>         Hebrew frank-ruehl font
-%<LHEcrml>         Hebrew carmel font (by Dr. Samy Zafrany)
-%<LHEredis>         Hebrew redis font (by Prof. Jacques J. Goldberg)
-%<HE8enc>                 8-bit Hebrew font encoding
-%<HE8cmr>                 Hebrew default font
-%<HE8cmss>                Hebrew sans-serif font
-%<HE8cmtt>                Hebrew typewriter font
-%<HE8OmegaHebrew>         Hebrew font from the Omega project (by ???)
-%<HE8DeadSea>             FILL IN DESCRIPTION
-%<HE8Jerusalem>           FILL IN DESCRIPTION
-%<HE8OldJaffa>            FILL IN DESCRIPTION
-%<HE8TelAviv>             FILL IN DESCRIPTION
-%<HE8WideJaffa>           FILL IN DESCRIPTION
-%<HE8CourierShalom>       Hebrew Shalom (Courier) font (by IBM)
-%<HE8HelveticaNarkissTam> Hebrew NarkisTam (Helvetica) (by Zvi Narkis)
-%<HE8TimesNarkissim>      Hebrew Narkissim (Times) (by Zvi Narkis) 
-%<HE8mfdavid>             Hebrew David font (by ???)
-%<HE8mffrank>             Hebrew Frank-Ruehl font (by ??)
-%<HE8mffrankthick>        Hebrew Frank-Ruehl (thick) font (by ??)
-%<HE8mffrankthin>         Hebrew Frank-Ruehl (thin) font (by ??)
-%<HE8mfmiriam>            Hebrew Miriam font (by ???)
-%<HE8mfmiriamwide>        Hebrew Miriam (wide) font (by ???)
-%<HE8mfnarkistam>         Hebrew Narkis Tam font (by ???)
-%<hebfont>         Hebrew font switching commands
+%<LHEenc>         [7-bit Hebrew font encoding]
+%<LHEcmr>         [Hebrew default font]
+%<LHEcmss>        [Hebrew sans-serif font]
+%<LHEcmtt>        [Hebrew typewriter font]
+%<LHEclas>        [Hebrew classic font (by Joel M. Hoffman)]
+%<LHEshold>       [Hebrew shalom old font (by Jonathan Brecher)]
+%<LHEshscr>       [Hebrew shalom script font (by Jonathan Brecher)]
+%<LHEshstk>       [Hebrew shalom stick font (by Jonathan Brecher)]
+%<LHEfr>          [Hebrew frank-ruehl font]
+%<LHEcrml>        [Hebrew carmel font (by Dr. Samy Zafrany)]
+%<LHEredis>       [Hebrew redis font (by Prof. Jacques J. Goldberg)]
+%<HE8enc>         [8-bit Hebrew font encoding]
+%<HE8cmr>         [Hebrew default font]
+%<HE8cmss>        [Hebrew sans-serif font]
+%<HE8cmtt>        [Hebrew typewriter font]
+%<HE8OmegaHebrew> [Hebrew font from the Omega project] 
+%<HE8aharoni>     [Hebrew sans-serif font (Culmus)]
+%<HE8david>       [Hebrew serif font (Culmus)]
+%<HE8drugulin>    [Hebrew old serif font (Culmus)]
+%<HE8ellinia>     [Hebrew sans-serif font (Culmus)]
+%<HE8frank>       [Hebrew serif font (Culmus)]
+%<HE8yad>         [Hebrew handwriting font (Culmus)]
+%<HE8miriam>      [Hebrew monospaced font (Culmus)]
+%<HE8nahlieli>    [Hebrew sans-serif font (Culmus)]
+%<hebfont>        [2003/10/13 Hebrew font switching commands]
 %<driver>         Driver file for hebrew.fdd file
 % \fi
-%         Hebrew font encodings support
-         (test version: still liable to change)]
 %
 % \font\manual=logo10
 % \providecommand\MF{{\manual META}\-{\manual FONT}}
@@ -136,7 +124,7 @@
 % \providecommand\pkg[1]{\texttt{#1}}
 % \GetFileInfo{hebrew.fdd}
 %
-% \changes{hebfdd~1.0a}{1998/01/01}{%
+% \changes{hebfdd~1.2a}{2003/07/30}{%
 %    Initial version. Supports only 7-bit LHE font encoding and all
 %    available Hebrew \TeX\ fonts (by Boris Lavva)}
 % \changes{hebfdd~1.0b}{2001/08/16}{%
@@ -145,36 +133,33 @@
 % \changes{hebfdd~1.1a}{2001/08/16}{%
 %    Adding 8-bit HE8 fonts. Note that most of them cannot be distributed
 %    with heb\LaTeX\ (by Tzafrir Cohen)}
+% \changes{hebfdd~1.2a}{2003/09/15}{%
+%    Adding HE8, Adding configurations for the Culmus fonts, 
+%    currently 0.90 (by Tzafrir Cohen)}
 %
 % \section{Hebrew font encodings}\label{sec:hebfdd}
 %
-%    % Don't forget to update the docs...
-%    \subsection{THIS SECTION IS OUT OF DATE. UPDATE DOCS TO MATCH HE8
-%    ENCODING}
-%
 %    The file \file{\filename}\footnote{The files described in this
 %    section have version number \fileversion{} and were last revised
-%    on \filedate.} contains the Local Hebrew Encoding (\LHE)
-%    definition, the external font information needed to use the
-%    Hebrew 7-bit fonts (old code fonts) and \pkg{hebfont} package
-%    that provides Hebrew font switching commands.
-%
-%    Using this file as an input, |lheenc.def| encoding definition
-%    file, all |.fd| files (font definition files) and font switching
-%    package for available Hebrew fonts are generated. We chose to use
-%    7-bit encoding as default font encoding, because: 
-%    \begin{enumerate}
-%    \item There are many 7-bit encoded Hebrew fonts available, more
-%          then for any other encoding.
-%    \item Available \TeX{} Hebrew fonts do not include latin
-%          alphabet, and we can safely map Hebrew glyphs to the
-%          \texttt{ASCII} positions (0 -- 127).
-%    \end{enumerate}
+%    on \filedate.} contains the definitions for the 8-bit encoding 
+%    HEbrew 8 (HE8), as  well as the for older 7-bit Local Hebrew 
+%    Encoding (\LHE), the external font information needed to use the
+%    Hebrew 8-bit and 7-bit fonts (old code fonts) and \pkg{hebfont} 
+%    package that provides Hebrew font switching commands.
+%
+%    Using this file as an input, |he8enc.def| (or |lheenc.def|, if 
+%    \LHE{} is used) encoding definition file, all |.fd| files (font 
+%    definition files) and font switching package for available 
+%    Hebrew fonts are generated. 
+%
+%    The usage of \LHE{} (old code) fonts is discourged We chose to use
+%    because there are now avilable Hebrew fonts of good quality that
+%    also provide the Latin glyphs (Culmus).
 %    
 %    Current definition of the \LHE{} encoding supports only Hebrew
 %    letters (|\hebalef|--|\hebtav|), but not Hebrew points, such as
-%    |\hebdagesh|, |\hebqamats|, |\hebpatah|, |\hebshindot|, etc. We 
-%    are working now on such addition.
+%    |\hebdagesh|, |\hebqamats|, |\hebpatah|, |\hebshindot|, etc. 
+%    \HEH{} allows the usage of full CP1255, including Nikud.
 %
 % \StopEventually{}
 %
@@ -213,16 +198,14 @@
 %   HE8cmss & make Hebrew sans-serif font in \HEH\\
 %   HE8cmtt & make Hebrew typewriter font in \HEH\\
 %   HE8OmegaHebrew &        Hebrew font from the Omega project (by ???)\\
-%   HE8CourierShalom &      Hebrew Shalom (Courier) font (by IBM)\\
-%   HE8HelveticaNarkissTam &Hebrew NarkisTam (Helvetica) (by Zvi Narkis)\\
-%   HE8TimesNarkissim &     Hebrew Narkissim (Times) (by Zvi Narkis) \\
-%   HE8mfdavid &            Hebrew David font (by ???)\\
-%   HE8mffrank &            Hebrew Frank-Ruehl font (by ??)\\
-%   HE8mffrankthick &       Hebrew Frank-Ruehl (thick) font (by ??)\\
-%   HE8mffrankthin &        Hebrew Frank-Ruehl (thin) font (by ??)\\
-%   HE8mfmiriam &           Hebrew Miriam font (by ???)\\
-%   HE8mfmiriamwide &       Hebrew Miriam (wide) font (by ???)\\
-%   HE8mfnarkistam &        Hebrew Narkis Tam font (by ???)\\
+%   HE8aharoni  &           Hebrew sans-serif font (Culmus)\\
+%   HE8david  &             Hebrew serif font (Culmus)\\
+%   HE8drugulin  &          Hebrew old serif font (Culmus)\\
+%   HE8ellinia  &           Hebrew sans-serif font (Culmus)\\
+%   HE8frank  &             Hebrew serif font (Culmus)\\
+%   HE8KtavYad  &           Hebrew handwriting font (Culmus)\\
+%   HE8MiriamMono  &        Hebrew monospaced font\\
+%   HE8Nahlieli  &          Hebrew sans-serif font (Culmus)\\
 %   LHEenc    & produce the encoding definition for Local Hebrew
 %               Encoding (\LHE)\\[4pt]
 %   LHEcmr    & make Hebrew default font in \LHE\\
@@ -250,7 +233,512 @@
 %\generateFile{lhecmr.fd}{t}{\from{hebrew.fdd}{LHEcmr,nowarn}}
 %\end{verbatim}
 %
-%  \subsection{The \LHE encoding definition file}
+%  \subsection{The \HEH encoding definition file}
+%
+%    The Hebrew font encoding \HEH{} places Hebrew characters in the
+%    upper half of the code space, positions 128--255 (|"80|--|"FF|). 
+%    Hebrew letters are located in the range 224--250 (|"E0|--|"FA|),
+%    as in ISO-8859-8 and Microsoft Codepage 1255.
+%    Hebrew vowel points are located in the range 192--214
+%    (|"C0|--|"D6|), as in Microsoft Codepage 1255. The rest of the
+%    encoding is idiosyncratic.
+%
+%    The bottom half of the code space is identical to the Cork
+%    Encoding. Hebrew fonts only make use of a portion of this space, 
+%    namely for punctuation and digits. The rest should be filled 
+%    with charaters from the Latin alphabet. Note that there really
+%    isn't enough room for a Hebrew-Latin font because of the shared 
+%    code points for digits and punctuation, so a mixed Hebrew-Latin
+%    text should use separate encodings for Hebrew and Latin. However, 
+%    inclusion of Latin letters in a Hebrew font is recommended, so
+%    that mistyped Latin letters will show up in the output when the
+%    \HEH{} encoding is active.
+%    
+%
+%    First we define the \HEH{} encoding; specify a default
+%    for the font substitution process for the \HEH{} encoding and
+%    supply a font to be used when all else fails.
+%
+%    \begin{macrocode}
+%<*HE8enc>
+\DeclareFontEncoding{HE8}{}{}
+\DeclareFontSubstitution{HE8}{cmr}{m}{n}
+\DeclareErrorFont{HE8}{cmr}{m}{n}{10}
+%</HE8enc>
+%    \end{macrocode}
+%    Some general symbols are provided as commands that switch to a
+%    Latin encoding. (Is this the appropriate place for such
+%    definitions? --Ron Artstein).
+%    \begin{macrocode}
+%<*HE8enc>
+\ProvideTextCommand{\textcopyright}{HE8}{\textcircled{\@latin{c}}}
+\ProvideTextCommand{\textregistered}{HE8}{\textcircled{\scshape%
+                                          \@latin{r}}}
+\ProvideTextCommand{\texttrademark}{HE8}{\textsuperscript{\@latin{TM}}}
+%</HE8enc>
+%    \end{macrocode}
+%
+% %   Because not everyone can input Hebrew input text directly from
+% %   the keyboard we need to define control sequences for all the
+% %   Hebrew glyphs in the fonts. 
+%    In addition, we want to support
+%    many input encodings for Hebrew and to keep the language
+%    definition file (|hebrew.ldf|) independent of input the
+%    encoding. Therefore, we exploit the standard \LaTeXe{} font
+%    encoding mechanism to define control sequences for all the Hebrew
+%    glyphs in the fonts in encoding-specific way. The language
+%    definition file uses only the control sequences and doesn't need
+%    to check the current font or input encoding. 
+%
+%
+%    The code space 128--154 (|"80|--|"9A|) is used for precomposed
+%    glyphs of Hebrew letters with a dot inside. These are all
+%    accessed by commands of the form |\heb...dagesh|; synonyms with
+%    |mappiq| and |shuruq| are provided for alef, he and vav.
+%
+%    \begin{macrocode}
+%<*HE8enc>
+\DeclareTextSymbol{\hebalefdagesh}{HE8}{128}
+\let\hebalefmappiq=\hebalefdagesh
+\DeclareTextSymbol{\hebbetdagesh}{HE8}{129}
+\DeclareTextSymbol{\hebgimeldagesh}{HE8}{130}
+\DeclareTextSymbol{\hebdaletdagesh}{HE8}{131}
+\DeclareTextSymbol{\hebhedagesh}{HE8}{132}
+\let\hebhemappiq=\hebhedagesh
+\DeclareTextSymbol{\hebvavdagesh}{HE8}{133}
+\let\hebvavshuruq=\hebvavdagesh
+\DeclareTextSymbol{\hebzayindagesh}{HE8}{134}
+\DeclareTextSymbol{\hebhetdagesh}{HE8}{135}
+\DeclareTextSymbol{\hebtetdagesh}{HE8}{136}
+\DeclareTextSymbol{\hebyoddagesh}{HE8}{137}
+\DeclareTextSymbol{\hebfinalkafdagesh}{HE8}{138}
+\DeclareTextSymbol{\hebkafdagesh}{HE8}{139}
+\DeclareTextSymbol{\heblameddagesh}{HE8}{140}
+\DeclareTextSymbol{\hebfinalmemdagesh}{HE8}{141}
+\DeclareTextSymbol{\hebmemdagesh}{HE8}{142}
+\DeclareTextSymbol{\hebfinalnundagesh}{HE8}{143}
+\DeclareTextSymbol{\hebnundagesh}{HE8}{144}
+\DeclareTextSymbol{\hebsamekhdagesh}{HE8}{145}
+\DeclareTextSymbol{\hebayindagesh}{HE8}{146}
+\DeclareTextSymbol{\hebfinalpedagesh}{HE8}{147}
+\DeclareTextSymbol{\hebpedagesh}{HE8}{148}
+\DeclareTextSymbol{\hebfinaltsadidagesh}{HE8}{149}
+\DeclareTextSymbol{\hebtsadidagesh}{HE8}{150}
+\DeclareTextSymbol{\hebqofdagesh}{HE8}{151}
+\DeclareTextSymbol{\hebreshdagesh}{HE8}{152}
+\DeclareTextSymbol{\hebshindagesh}{HE8}{153}
+\let\hebsindagesh=\hebshindagesh
+\DeclareTextSymbol{\hebtavdagesh}{HE8}{154}
+%</HE8enc>
+%    \end{macrocode}
+%
+%    The code space 160--191 (|"A0|--|"BF|) is reserved for Hebrew
+%    cantillation marks. Currently these are not supported by fonts,
+%    so commands have not yet been named for them.
+%
+%    The code space 192--214 (|"C0|--|"D6|) is used for Hebrew vowel
+%    points and precomposed ligatures, as in Microsoft Codepage 1255.
+%
+%    \begin{macrocode}
+%<*HE8enc>
+\DeclareTextSymbol{\hebsheva}{HE8}{192}
+\DeclareTextSymbol{\hebhatafsegol}{HE8}{193}
+\DeclareTextSymbol{\hebhatafpatah}{HE8}{194}
+\DeclareTextSymbol{\hebhatafqamats}{HE8}{195}
+\DeclareTextSymbol{\hebhiriq}{HE8}{196}
+\DeclareTextSymbol{\hebtsere}{HE8}{197}
+\DeclareTextSymbol{\hebsegol}{HE8}{198}
+\DeclareTextSymbol{\hebpatah}{HE8}{199}
+\DeclareTextSymbol{\hebqamats}{HE8}{200}
+\DeclareTextSymbol{\hebholam}{HE8}{201}
+\DeclareTextSymbol{\hebqubuts}{HE8}{203}
+\DeclareTextSymbol{\hebdagesh}{HE8}{204}
+\DeclareTextSymbol{\hebmeteg}{HE8}{205}
+\DeclareTextSymbol{\hebmaqaf}{HE8}{206}
+\DeclareTextSymbol{\hebrafe}{HE8}{207}
+\DeclareTextSymbol{\hebpaseq}{HE8}{208}
+\DeclareTextSymbol{\hebshindot}{HE8}{209}
+\DeclareTextSymbol{\hebsindot}{HE8}{210}
+\DeclareTextSymbol{\hebsofpasuq}{HE8}{211}
+\DeclareTextSymbol{\hebdoublevav}{HE8}{212}
+\DeclareTextSymbol{\hebvavyod}{HE8}{213}
+\DeclareTextSymbol{\hebdoubleyod}{HE8}{214}
+%</HE8enc>
+%    \end{macrocode}
+%
+%    The code space 224--250 (|"E0|--|"FA|) is used for the Hebrew
+%    letters, as in ISO-8859-8 and Microsoft Codepage 1255.
+%    \begin{macrocode}
+%<*HE8enc>
+% \lccode``=`` % probably not needed (Tzafrir)
+\DeclareTextSymbol{\hebalef}{HE8}{224}
+\DeclareTextSymbol{\hebbet}{HE8}{225}
+\DeclareTextSymbol{\hebgimel}{HE8}{226}
+\DeclareTextSymbol{\hebdalet}{HE8}{227}
+\DeclareTextSymbol{\hebhe}{HE8}{228}
+\DeclareTextSymbol{\hebvav}{HE8}{229}
+\DeclareTextSymbol{\hebzayin}{HE8}{230}
+\DeclareTextSymbol{\hebhet}{HE8}{231}
+\DeclareTextSymbol{\hebtet}{HE8}{232}
+\DeclareTextSymbol{\hebyod}{HE8}{233}
+\DeclareTextSymbol{\hebfinalkaf}{HE8}{234}
+\DeclareTextSymbol{\hebkaf}{HE8}{235}
+\DeclareTextSymbol{\heblamed}{HE8}{236}
+\DeclareTextSymbol{\hebfinalmem}{HE8}{237}
+\DeclareTextSymbol{\hebmem}{HE8}{238}
+\DeclareTextSymbol{\hebfinalnun}{HE8}{239}
+\DeclareTextSymbol{\hebnun}{HE8}{240}
+\DeclareTextSymbol{\hebsamekh}{HE8}{241}
+\DeclareTextSymbol{\hebayin}{HE8}{242}
+\DeclareTextSymbol{\hebfinalpe}{HE8}{243}
+\DeclareTextSymbol{\hebpe}{HE8}{244}
+\DeclareTextSymbol{\hebfinaltsadi}{HE8}{245}
+\DeclareTextSymbol{\hebtsadi}{HE8}{246}
+\DeclareTextSymbol{\hebqof}{HE8}{247}
+\DeclareTextSymbol{\hebresh}{HE8}{248}
+\DeclareTextSymbol{\hebshin}{HE8}{249}
+\DeclareTextSymbol{\hebtav}{HE8}{250}
+%</HE8enc>
+%    \end{macrocode}
+%    Letter |\hebsin| is defined as a synonym of |\hebshin|:
+%    \begin{macrocode}
+%<+HE8enc>\let\hebsin=\hebshin
+%    \end{macrocode}
+%
+%    The macro |\.| is provided for easy entry of the precomposed
+%    glyphs with a center dot (dagesh). 
+%    For reasons that I (Ron Artstein) don't fully understand,
+%    putting commands like |\hebalef| in the third argument of
+%    |\DeclareTextComposite| only produces the expected results 
+%    when |\.| precedes a literal |\hebalef| in the input, not when 
+%    it precedes an input character which expands into |\hebalef|; my 
+%    guess is that it has to do with the order of expansion. For this 
+%    reason we define the command |\.| to act on characters in the
+%    range 224--250 (|"E0|--|"FA|); this will only work when a
+%    compatible input encoding is used. Note that the third argument of
+%    |\DeclareTextComposite| below will appear empty if this document
+%    is processed with an encoding that doesn't interpret characters
+%    in the high range (e.g.~|OT1|).
+%
+%    \begin{macrocode}
+%<*HE8enc>
+\DeclareTextComposite{\.}{HE8}{à}{128}
+\DeclareTextComposite{\.}{HE8}{á}{129}
+\DeclareTextComposite{\.}{HE8}{â}{130}
+\DeclareTextComposite{\.}{HE8}{ã}{131}
+\DeclareTextComposite{\.}{HE8}{ä}{132}
+\DeclareTextComposite{\.}{HE8}{å}{133}
+\DeclareTextComposite{\.}{HE8}{æ}{134}
+\DeclareTextComposite{\.}{HE8}{ç}{135}
+\DeclareTextComposite{\.}{HE8}{è}{136}
+\DeclareTextComposite{\.}{HE8}{é}{137}
+\DeclareTextComposite{\.}{HE8}{ê}{138}
+\DeclareTextComposite{\.}{HE8}{ë}{139}
+\DeclareTextComposite{\.}{HE8}{ì}{140}
+\DeclareTextComposite{\.}{HE8}{í}{141}
+\DeclareTextComposite{\.}{HE8}{î}{142}
+\DeclareTextComposite{\.}{HE8}{ï}{143}
+\DeclareTextComposite{\.}{HE8}{ð}{144}
+\DeclareTextComposite{\.}{HE8}{ñ}{145}
+\DeclareTextComposite{\.}{HE8}{ò}{146}
+\DeclareTextComposite{\.}{HE8}{ó}{147}
+\DeclareTextComposite{\.}{HE8}{ô}{148}
+\DeclareTextComposite{\.}{HE8}{õ}{149}
+\DeclareTextComposite{\.}{HE8}{ö}{150}
+\DeclareTextComposite{\.}{HE8}{÷}{151}
+\DeclareTextComposite{\.}{HE8}{ø}{152}
+\DeclareTextComposite{\.}{HE8}{ù}{153}
+\DeclareTextComposite{\.}{HE8}{ú}{154}
+%</HE8enc>
+%    \end{macrocode}
+%
+%    The macro |\.| is also (ab)used as a means for the entry of 
+%    traditional Hebrew opening (baseline) quotes: the sequences 
+%    |\.'| and |\."| produce opening single and double quotes,
+%    respectively. In principle these should occupy the code points
+%    13 (|"0D|) and 18 (|"12|) as in the Cork encoding; at present
+%    however these are not supported by fonts, so we use the babel
+%    command |\set at low@box|.
+%
+%    \begin{macrocode}
+%<*HE8enc>
+\DeclareTextCompositeCommand{\.}{HE8}{"}{\set at low@box{"}\box0}
+\DeclareTextCompositeCommand{\.}{HE8}{'}{\set at low@box{'}\box0}
+%</HE8enc>
+%    \end{macrocode}
+%
+% \subsection{The font definition files (in \HEH{} encoding)}
+%
+% \subsubsection{Hebrew default font}
+%
+%    It uses \emph{OmegaHebrew} font for regular font, \emph{Old
+%    Jaffa} font for italic shape and small-caps, \emph{Dead Sea} 
+%    font for bold face, and \emph{Tel-Aviv} for bold-italic
+%    \begin{macrocode}
+%<*HE8cmr>
+\DeclareFontFamily{HE8}{cmr}{\hyphenchar\font45}
+\DeclareFontShape{HE8}{cmr}{m}{n}
+      {<-> david }{}
+%%%%%%% Italicized shape
+\DeclareFontShape{HE8}{cmr}{m}{it}
+      {<-> davidi }{}
+\DeclareFontShape{HE8}{cmr}{m}{sl}
+      {<-> davidi }{}
+\DeclareFontShape{HE8}{cmr}{m}{sc}
+      {<-> david }{}
+%%%%%%% Bold extended series
+\DeclareFontShape{HE8}{cmr}{bx}{n}
+      {<-> davidb }{}
+\DeclareFontShape{HE8}{cmr}{b}{n}
+      {<-> davidb }{}
+%%%%%%% Bold extended (Italic)  series
+\DeclareFontShape{HE8}{cmr}{bx}{sl}
+      {<-> davidi }{}
+\DeclareFontShape{HE8}{cmr}{bx}{it}
+      {<-> davidi }{}
+\DeclareFontShape{HE8}{cmr}{bx}{it} 
+      {<-> sub * david/m/it}{}
+%</HE8cmr>
+%    \end{macrocode}
+%
+% \subsubsection{Hebrew sans-serif font}
+%
+%    Until we have a real sans-serif font in this distribution, this file 
+%    will remain a copy of the roman fonts definitons above.
+%    \begin{macrocode}
+%<*HE8cmss>
+\DeclareFontFamily{HE8}{cmss}{\hyphenchar\font45}
+\DeclareFontShape{HE8}{cmss}{m}{n}
+      {<-> nachlieli }{}
+%%%%%%% Italicized shape
+\DeclareFontShape{HE8}{cmss}{m}{it}
+      {<-> nachlieli }{}
+\DeclareFontShape{HE8}{cmss}{m}{sl}
+      {<-> nachlieli }{}
+\DeclareFontShape{HE8}{cmss}{m}{sc}
+      {<-> nachlieli }{}
+%%%%%%% Bold extended series
+\DeclareFontShape{HE8}{cmss}{bx}{n}
+      {<-> nachlieli }{}
+\DeclareFontShape{HE8}{cmss}{b}{n}
+      {<-> nachlieli }{}
+%%%%%%% Bold extended (Italic)  series
+\DeclareFontShape{HE8}{cmss}{bx}{sl}
+      {<-> nachlieli }{}
+\DeclareFontShape{HE8}{cmss}{bx}{it}
+      {<-> nachlieli }{}
+%</HE8cmss>
+%    \end{macrocode}
+%
+% \subsubsection{Hebrew typewriter font}
+%
+%    Until we have a real sans-serif font in this distribution, this file 
+%    will remain a copy of the roman fonts definitons above.
+%    \begin{macrocode}
+%<*HE8cmtt>
+\DeclareFontFamily{HE8}{cmtt}{\hyphenchar\font45}
+\DeclareFontShape{HE8}{cmtt}{m}{n}
+      {<-> miriam }{}
+%%%%%%% Italicized shape
+\DeclareFontShape{HE8}{cmtt}{m}{it}
+      {<-> miriam }{}
+\DeclareFontShape{HE8}{cmtt}{m}{sl}
+      {<-> miriam }{}
+\DeclareFontShape{HE8}{cmtt}{m}{sc}
+      {<-> miriam }{}
+%%%%%%% Bold extended series
+\DeclareFontShape{HE8}{cmtt}{bx}{n}
+      {<-> miriam }{}
+\DeclareFontShape{HE8}{cmtt}{b}{n}
+      {<-> miriam }{}
+%%%%%%% Bold extended (Italic)  series
+\DeclareFontShape{HE8}{cmtt}{bx}{sl}
+      {<-> miriam }{}
+\DeclareFontShape{HE8}{cmtt}{bx}{it}
+      {<-> miriam }{}
+%</HE8cmtt>
+%    \end{macrocode}
+%
+% \subsubsection{8Bit OmegaHebrew font}
+%
+%    \emph{OmegaHebrew} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8OmegaHebrew>
+\def\OmegaHebrewscale{0.9}
+\DeclareFontFamily{HE8}{OmegaHebrew}{\hyphenchar\font45}
+\DeclareFontShape{HE8}{OmegaHebrew}{m}{n}{<-> [\OmegaHebrewscale] OmegaHebrew }{}
+%\endinput % is it needed [tzafrir]
+%</HE8OmegaHebrew>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit Aharoni font}
+%
+%    \emph{Aharoni} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8aharoni>
+\DeclareFontShape{HE8}{aharoni}{m}{n}   {<-> aharoni}{}
+\DeclareFontShape{HE8}{aharoni}{m}{it}  {<-> aharonii}{}
+\DeclareFontShape{HE8}{aharoni}{m}{sl}  {<-> aharonii}{}
+\DeclareFontShape{HE8}{aharoni}{b}{n}   {<-> aharonib}{}
+\DeclareFontShape{HE8}{aharoni}{bx}{n}  {<-> aharonib}{}
+\DeclareFontShape{HE8}{aharoni}{bx}{it} {<-> aharonibi}{}
+
+%\endinput % is it needed [tzafrir]
+%</HE8aharoni>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit David font}
+%
+%    \emph{David} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8david>
+
+\DeclareFontShape{HE8}{david}{m}{n}   {<-> david}{}
+\DeclareFontShape{HE8}{david}{m}{it}  {<-> davidi}{}
+\DeclareFontShape{HE8}{david}{m}{sl}  {<-> davidi}{}
+\DeclareFontShape{HE8}{david}{b}{n}   {<-> davidb}{}
+\DeclareFontShape{HE8}{david}{bx}{n}  {<-> davidb}{}
+\DeclareFontShape{HE8}{david}{bx}{it} {<-> sub * david/m/it}{}
+
+
+%\endinput % is it needed [tzafrir]
+%</HE8david>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit Drugulin font}
+%
+%    \emph{Drugulin} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8drugulin>
+\DeclareFontShape{HE8}{drugulin}{m}{n}   {<-> drugulinb}{}
+\DeclareFontShape{HE8}{drugulin}{m}{it}  {<-> drugulinbi}{}
+\DeclareFontShape{HE8}{drugulin}{m}{sl}  {<-> drugulinbi}{}
+\DeclareFontShape{HE8}{drugulin}{b}{n}   {<-> drugulinb}{}
+\DeclareFontShape{HE8}{drugulin}{bx}{n}  {<-> drugulinb}{}
+\DeclareFontShape{HE8}{drugulin}{bx}{it} {<-> drugulinbi}{}
+%\endinput % is it needed [tzafrir]
+%</HE8drugulin>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit Ellinia font}
+%
+%    \emph{Ellinia} is a sans-serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8ellinia>
+\DeclareFontShape{HE8}{ellinia}{m}{n}   {<-> ellinia}{}
+\DeclareFontShape{HE8}{ellinia}{m}{it}  {<-> elliniai}{}
+\DeclareFontShape{HE8}{ellinia}{m}{sl}  {<-> elliniai}{}
+\DeclareFontShape{HE8}{ellinia}{b}{n}   {<-> elliniab}{}
+\DeclareFontShape{HE8}{ellinia}{bx}{n}  {<-> elliniab}{}
+\DeclareFontShape{HE8}{ellinia}{bx}{it} {<-> elliniabi}{}
+%\endinput % is it needed [tzafrir]
+%</HE8ellinia>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit FrankRuehl font}
+%
+%    \emph{FrankRuehl} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8frank>
+\DeclareFontShape{HE8}{frank}{m}{n}   {<-> frank}{}
+\DeclareFontShape{HE8}{frank}{m}{it}  {<-> franki}{}
+\DeclareFontShape{HE8}{frank}{m}{sl}  {<-> franki}{}
+\DeclareFontShape{HE8}{frank}{b}{n}   {<-> frankb}{}
+\DeclareFontShape{HE8}{frank}{bx}{n}  {<-> frankb}{}
+\DeclareFontShape{HE8}{frank}{bx}{it} {<-> frankbi}{}
+%\endinput % is it needed [tzafrir]
+%</HE8frank>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit KtavYad font}
+%
+%    \emph{KtavYad} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8yad>
+\DeclareFontShape{HE8}{yad}{m}{n}  {<-> yadi}{}
+\DeclareFontShape{HE8}{yad}{m}{it} {<-> yadi}{}
+\DeclareFontShape{HE8}{yad}{m}{sl} {<-> yadi}{}
+\DeclareFontShape{HE8}{yad}{b}{n}  {<-> yadbi}{}
+\DeclareFontShape{HE8}{yad}{bx}{n} {<-> yadbi}{}
+\DeclareFontShape{HE8}{yad}{bx}{it}{<-> yadbi}{}
+%\endinput % is it needed [tzafrir]
+%</HE8yad>
+%    \end{macrocode}
+%
+% \subsubsection{8Bit MiriamMono font}
+%
+%    \emph{MiriamMono} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8miriam>
+\DeclareFontShape{HE8}{miriam}{m}{n}   {<-> miriam}{}
+\DeclareFontShape{HE8}{miriam}{m}{it}  {<-> miriami}{}
+\DeclareFontShape{HE8}{miriam}{m}{sl}  {<-> miriami}{}
+\DeclareFontShape{HE8}{miriam}{b}{n}   {<-> miriamb}{}
+\DeclareFontShape{HE8}{miriam}{bx}{n}  {<-> miriamb}{}
+\DeclareFontShape{HE8}{miriam}{bx}{it} {<-> miriambi}{}
+
+%\endinput % is it needed [tzafrir]
+%</HE8miriam>
+%    \end{macrocode}
+%
+%
+% \subsubsection{8Bit Nachlieli font}
+%
+%    \emph{Nachlieli} is a serif hebrew font created by the omega project
+%    [FILL IN CREDITS]
+%    [FILL IN GENERAL SHAPE DESCRIPTION]
+%    shapes: [FILL IN]
+%
+%    \begin{macrocode}
+%<*HE8nachlieli>
+\DeclareFontShape{HE8}{nachlieli}{m}{n}   {<-> nachlieli}{}
+\DeclareFontShape{HE8}{nachlieli}{m}{it}  {<-> nachlielii}{}
+\DeclareFontShape{HE8}{nachlieli}{m}{sl}  {<-> nachlielii}{}
+\DeclareFontShape{HE8}{nachlieli}{b}{n}   {<-> nachlielib}{}
+\DeclareFontShape{HE8}{nachlieli}{bx}{n}  {<-> nachlielib}{}
+\DeclareFontShape{HE8}{nachlieli}{bx}{it} {<-> nachlielibi}{}
+%\endinput % is it needed [tzafrir]
+%</HE8nachlieli>
+%    \end{macrocode}
+%  \subsection{The \LHE{} encoding definition file}
 %
 %    The Hebrew font encoding \LHE{} is based upon the old-code encoding
 %    also known as the Israeli Standard SI-960. Many Hebrew \TeX{}
@@ -269,7 +757,7 @@
 \DeclareErrorFont{LHE}{cmr}{m}{n}{10}
 %</LHEenc>
 %    \end{macrocode}
-%    Then we define a few commands in the \LHE{} encoding.
+%    Then we define a few commands in the old \LHE{} encoding.
 %    \begin{macrocode}
 %<*LHEenc>
 \ProvideTextCommand{\textcopyright}{LHE}{\textcircled{\@latin{c}}}
@@ -643,233 +1131,7 @@
 %</LHEredis>
 %    \end{macrocode}
 %
-%  \subsection{The \HEH encoding definition file}
-%
-%    The Hebrew font encoding \HEH{} is based upon an extention by
-%    Microsoft to the ISO-8859-8 standard.  This is an 8bit encoding. The
-%    extentions include hebrew points (``Nikud'').
-%
-%    First we define the Codepage 1255; specify a default
-%    for the font substitution process for the \HEH{} encoding and
-%    supply a font to be used when all else fails.
-%
-%    \begin{macrocode}
-%<*HE8enc>
-\DeclareFontEncoding{HE8}{}{}
-\DeclareFontSubstitution{HE8}{cmr}{m}{n}
-\DeclareErrorFont{HE8}{cmr}{m}{n}{10}
-%</HE8enc>
-%    \end{macrocode}
-%    Then we define a few commands in the \HEH{} encoding.
-%    \begin{macrocode}
-%<*HE8enc>
-\ProvideTextCommand{\textcopyright}{HE8}{\textcircled{\@latin{c}}}
-\ProvideTextCommand{\textregistered}{HE8}{\textcircled{\scshape%
-                                          \@latin{r}}}
-\ProvideTextCommand{\texttrademark}{HE8}{\textsuperscript{\@latin{TM}}}
-%</HE8enc>
-%    \end{macrocode}
-%
-%    \subsubsection{CHECK HERE FOR HE8 UPDATES}
 %
-%    Because not everyone can input Hebrew input text directly from
-%    the keyboard we need to define control sequences for all the
-%    Hebrew glyphs in the fonts. In addition, we want to support
-%    many input encodings for Hebrew and to keep the language
-%    definition file (|hebrew.ldf|) independent of the
-%    encoding. Therefore, we exploit the standard \LaTeXe{} font
-%    encoding mechanism to define control sequences for all the Hebrew
-%    glyphs in the fonts in encoding-specific way. The language
-%    definition file uses only the control sequences and doesn't need
-%    to check the current font or input encoding. 
-%
-%    % In the \HEH{} encoding (7-bit encoding) all the Hebrew glyphes 
-%    % reside in the \emph{lower} half of the font. Currently, only the
-%    % Hebrew letters are supported. They use the same positions as the
-%    % latin small letters in |ASCII| encoding and the position of |`|.
-%
-%    Some general symbols:
-%    \begin{macrocode}
-%<*HE8enc>
-\ProvideTextCommand{\textcopyright}{HE8}{\textcircled{\@latin{c}}}
-\ProvideTextCommand{\textregistered}{HE8}{\textcircled{\scshape%
-                                          \@latin{r}}}
-\ProvideTextCommand{\texttrademark}{HE8}{\textsuperscript{\@latin{TM}}}
-%</HE8enc>
-%    \end{macrocode}
-%
-%    The hebrew points:
-%    \begin{macrocode}
-%<*HE8enc>
-\DeclareTextSymbol{\sheva}{HE8}{192}
-\DeclareTextSymbol{\hatafsegol}{HE8}{193}
-\DeclareTextSymbol{\hatafpatah}{HE8}{194}
-\DeclareTextSymbol{\hatafqamats}{HE8}{195}
-\DeclareTextSymbol{\hiriq}{HE8}{196}
-\DeclareTextSymbol{\tsere}{HE8}{197}
-\DeclareTextSymbol{\segol}{HE8}{198}
-\DeclareTextSymbol{\patah}{HE8}{199}
-\DeclareTextSymbol{\qamats}{HE8}{200}
-\DeclareTextSymbol{\holam}{HE8}{201}
-\DeclareTextSymbol{\qubuts}{HE8}{203}
-\DeclareTextSymbol{\dagesh}{HE8}{204}
-\DeclareTextSymbol{\meteg}{HE8}{205}
-\DeclareTextSymbol{\maqaf}{HE8}{206}
-\DeclareTextSymbol{\rafe}{HE8}{207}
-\DeclareTextSymbol{\paseq}{HE8}{208}
-\DeclareTextSymbol{\shindot}{HE8}{209}
-\DeclareTextSymbol{\sindot}{HE8}{210}
-\DeclareTextSymbol{\sofpasuq}{HE8}{211}
-\DeclareTextSymbol{\doublevav}{HE8}{212}
-\DeclareTextSymbol{\vavyod}{HE8}{213}
-\DeclareTextSymbol{\doubleyod}{HE8}{214}
-%</HE8enc>
-%    \end{macrocode}
-%
-%    Hebrew letters occupy the positions 224--250 in \HEH{} encoding [WHAT
-%    ABOUT OTHER MARKS]:
-%    \begin{macrocode}
-%<*HE8enc>
-% \lccode``=`` % probably not needed (Tzafrir)
-\DeclareTextSymbol{\hebalef}{HE8}{224}
-\DeclareTextSymbol{\hebbet}{HE8}{225}
-\DeclareTextSymbol{\hebgimel}{HE8}{226}
-\DeclareTextSymbol{\hebdalet}{HE8}{227}
-\DeclareTextSymbol{\hebhe}{HE8}{228}
-\DeclareTextSymbol{\hebvav}{HE8}{229}
-\DeclareTextSymbol{\hebzayin}{HE8}{230}
-\DeclareTextSymbol{\hebhet}{HE8}{231}
-\DeclareTextSymbol{\hebtet}{HE8}{232}
-\DeclareTextSymbol{\hebyod}{HE8}{233}
-\DeclareTextSymbol{\hebfinalkaf}{HE8}{234}
-\DeclareTextSymbol{\hebkaf}{HE8}{235}
-\DeclareTextSymbol{\heblamed}{HE8}{236}
-\DeclareTextSymbol{\hebfinalmem}{HE8}{237}
-\DeclareTextSymbol{\hebmem}{HE8}{238}
-\DeclareTextSymbol{\hebfinalnun}{HE8}{239}
-\DeclareTextSymbol{\hebnun}{HE8}{240}
-\DeclareTextSymbol{\hebsamekh}{HE8}{241}
-\DeclareTextSymbol{\hebayin}{HE8}{242}
-\DeclareTextSymbol{\hebfinalpe}{HE8}{243}
-\DeclareTextSymbol{\hebpe}{HE8}{244}
-\DeclareTextSymbol{\hebfinaltsadi}{HE8}{245}
-\DeclareTextSymbol{\hebtsadi}{HE8}{246}
-\DeclareTextSymbol{\hebqof}{HE8}{247}
-\DeclareTextSymbol{\hebresh}{HE8}{248}
-\DeclareTextSymbol{\hebshin}{HE8}{249}
-\DeclareTextSymbol{\hebtav}{HE8}{250}
-%</HE8enc>
-%    \end{macrocode}
-%    Letter |\hebsin| is defined as a synonym of |\hebshin|:
-%    \begin{macrocode}
-%<+HE8enc>\let\hebsin=\hebshin
-%    \end{macrocode}
-%
-% \subsection{The font definition files (in \HEH{} encoding)}
-%
-% \subsubsection{Hebrew default font}
-%
-%    It uses \emph{OmegaHebrew} font for regular font, \emph{Old
-%    Jaffa} font for italic shape and small-caps, \emph{Dead Sea} 
-%    font for bold face, and \emph{Tel-Aviv} for bold-italic
-%    \begin{macrocode}
-%<*HE8cmr>
-\DeclareFontFamily{HE8}{cmr}{\hyphenchar\font45}
-\DeclareFontShape{HE8}{cmr}{m}{n}
-      {<-> OmegaHebrew }{}
-%%%%%%% Italicized shape
-\DeclareFontShape{HE8}{cmr}{m}{it}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmr}{m}{sl}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmr}{m}{sc}
-      {<-> OmegaHebrew }{}
-%%%%%%% Bold extended series
-\DeclareFontShape{HE8}{cmr}{bx}{n}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmr}{b}{n}
-      {<-> OmegaHebrew }{}
-%%%%%%% Bold extended (Italic)  series
-\DeclareFontShape{HE8}{cmr}{bx}{sl}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmr}{bx}{it}
-      {<-> OmegaHebrew }{}
-%</HE8cmr>
-%    \end{macrocode}
-%
-% \subsubsection{Hebrew sans-serif font}
-%
-%    Until we have a real sans-serif font in this distribution, this file 
-%    will remain a copy of the roman fonts definitons above.
-%    \begin{macrocode}
-%<*HE8cmss>
-\DeclareFontFamily{HE8}{cmss}{\hyphenchar\font45}
-\DeclareFontShape{HE8}{cmss}{m}{n}
-      {<-> OmegaHebrew }{}
-%%%%%%% Italicized shape
-\DeclareFontShape{HE8}{cmss}{m}{it}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmss}{m}{sl}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmss}{m}{sc}
-      {<-> OmegaHebrew }{}
-%%%%%%% Bold extended series
-\DeclareFontShape{HE8}{cmss}{bx}{n}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmss}{b}{n}
-      {<-> OmegaHebrew }{}
-%%%%%%% Bold extended (Italic)  series
-\DeclareFontShape{HE8}{cmss}{bx}{sl}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmss}{bx}{it}
-      {<-> OmegaHebrew }{}
-%</HE8cmss>
-%    \end{macrocode}
-%
-% \subsubsection{Hebrew typewriter font}
-%
-%    Until we have a real sans-serif font in this distribution, this file 
-%    will remain a copy of the roman fonts definitons above.
-%    \begin{macrocode}
-%<*HE8cmtt>
-\DeclareFontFamily{HE8}{cmtt}{\hyphenchar\font45}
-\DeclareFontShape{HE8}{cmtt}{m}{n}
-      {<-> OmegaHebrew }{}
-%%%%%%% Italicized shape
-\DeclareFontShape{HE8}{cmtt}{m}{it}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmtt}{m}{sl}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmtt}{m}{sc}
-      {<-> OmegaHebrew }{}
-%%%%%%% Bold extended series
-\DeclareFontShape{HE8}{cmtt}{bx}{n}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmtt}{b}{n}
-      {<-> OmegaHebrew }{}
-%%%%%%% Bold extended (Italic)  series
-\DeclareFontShape{HE8}{cmtt}{bx}{sl}
-      {<-> OmegaHebrew }{}
-\DeclareFontShape{HE8}{cmtt}{bx}{it}
-      {<-> OmegaHebrew }{}
-%</HE8cmtt>
-%    \end{macrocode}
-%
-% \subsubsection{8Bit OmegaHebrew font}
-%
-%    \emph{OmegaHebrew} is a serif hebrew font created by the omega project
-%    [FILL IN CREDITS]
-%    [FILL IN GENERAL SHAPE DESCRIPTION]
-%    shapes: [FILL IN]
-%
-%    \begin{macrocode}
-%<*HE8OmegaHebrew>
-\def\OmegaHebrewscale{0.9}
-\DeclareFontFamily{HE8}{OmegaHebrew}{\hyphenchar\font45}
-\DeclareFontShape{HE8}{OmegaHebrew}{m}{n}{<-> [\OmegaHebrewscale] OmegaHebrew }{}
-%\endinput % is it needed [tzafrir]
-%</HE8OmegaHebrew>
-%    \end{macrocode}
 %
 % \subsubsection{Hebrew font switching commands}
 %
@@ -931,6 +1193,43 @@
 %    old-style |{\rm |\ldots|}| will produce the same result.
 %    \begin{macrocode}
 %<*hebfont>
+ %%
+ %% TODO: the following remmed-out test is not effective
+ %% replace it with something that works
+ %%
+ %\def\ivritex at tmp{HE8}%
+ %\ifx\ivritex at tmp\HeblatexEncoding %
+  % compatibility with hebfonts:
+  \DeclareTextFontCommand{\textjm}{\rmfamily\selectfont}
+  \DeclareTextFontCommand{\textds}{\bfseries\selectfont}
+  \DeclareTextFontCommand{\textoj}{\itshape\selectfont}
+  \DeclareTextFontCommand{\textta}{\sffamily\selectfont}
+  
+  % an attempt to give some replacements to the original hebfonts:
+  % 
+  \DeclareTextFontCommand{\textcrml}{\fontfamily{david}\selectfont}
+  \DeclareTextFontCommand{\textfr}{\fontfamily{frank}\selectfont}
+  \DeclareTextFontCommand{\textredis}{\fontfamily{aharoni}\selectfont}
+  \DeclareTextFontCommand{\textclas}{\fontfamily{drugulin}\selectfont}
+  \DeclareTextFontCommand{\textshold}{\fontfamily{frank}\selectfont}
+  \DeclareTextFontCommand{\textshscr}{\fontfamily{yad}\selectfont}
+  \DeclareTextFontCommand{\textshstk}{\fontfamily{aharoni}\selectfont}
+  % note that redis is larger than shstk
+
+  
+  \DeclareTextFontCommand{\textaha}{\fontfamily{aharoni}\selectfont}
+  \DeclareTextFontCommand{\textdav}{\fontfamily{david}\selectfont}
+  \DeclareTextFontCommand{\textdru}{\fontfamily{drugulin}\selectfont}
+  \DeclareTextFontCommand{\textel} {\fontfamily{ellinia}\selectfont}
+  % \textfr is already declared above
+  \DeclareTextFontCommand{\textmir}{\fontfamily{miriam}\selectfont}
+  \DeclareTextFontCommand{\textna} {\fontfamily{nachlieli}\selectfont}
+  % is this necessary:
+  \DeclareTextFontCommand{\textyad} {\fontfamily{yad}\selectfont}
+ 
+ %\else%
+ % Currently simply ignore the following:
+\ifx\HeblatexEncoding\@undefined% (always false)
 \DeclareTextFontCommand{\textjm}{\rmfamily\selectfont}
 %    \end{macrocode}
 %  \end{macro}
@@ -1015,6 +1314,7 @@
 %    Switches to \emph{Shalom Stick} font.
 %    \begin{macrocode}
 \DeclareTextFontCommand{\textshstk}{\fontfamily{shstk}\selectfont}
+\fi
 %    \end{macrocode}
 %  \end{macro}
 %

Modified: pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.ins
==============================================================================
--- pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.ins	(original)
+++ pkg/ivritex/branches/upstream/current/latex/heblatex/hebrew.ins	Sat Apr 15 00:19:15 2006
@@ -145,7 +145,14 @@
           \file{he8cmr.fd}{\from{hebrew.fdd}{HE8cmr,nowarn}}
           \file{he8cmss.fd}{\from{hebrew.fdd}{HE8cmss,nowarn}}
           \file{he8cmtt.fd}{\from{hebrew.fdd}{HE8cmtt,nowarn}}
-          \file{he8OmegaHebrew.fd}{\from{hebrew.fdd}{HE8OmegaHebrew,nowarn}}
+          \file{he8aharoni.fd}{\from{hebrew.fdd}{HE8aharoni,nowarn}}
+          \file{he8david.fd}{\from{hebrew.fdd}{HE8david,nowarn}}
+          \file{he8drugulin.fd}{\from{hebrew.fdd}{HE8drugulin,nowarn}}
+          \file{he8ellinia.fd}{\from{hebrew.fdd}{HE8ellinia,nowarn}}
+          \file{he8frankruehl.fd}{\from{hebrew.fdd}{HE8frankruehl,nowarn}}
+          \file{he8yad.fd}{\from{hebrew.fdd}{HE8yad,nowarn}}
+          \file{he8miriam.fd}{\from{hebrew.fdd}{HE8miriam,nowarn}}
+          \file{he8nachlieli.fd}{\from{hebrew.fdd}{HE8nachlieli,nowarn}}
           \file{lheshold.fd}{\from{hebrew.fdd}{LHEshold,nowarn}}
           \file{lheshscr.fd}{\from{hebrew.fdd}{LHEshscr,nowarn}}
           \file{lheshstk.fd}{\from{hebrew.fdd}{LHEshstk,nowarn}}

Modified: pkg/ivritex/branches/upstream/current/utils/transheb.pl
==============================================================================
--- pkg/ivritex/branches/upstream/current/utils/transheb.pl	(original)
+++ pkg/ivritex/branches/upstream/current/utils/transheb.pl	Sat Apr 15 00:19:15 2006
@@ -6,16 +6,12 @@
 
 my $InputEncStr = "8bit";
 my $OutputEncStr = "macros";
+my $IsNotUseNikud=1;
+my $IsNotUseDagesh=1;
 
-Getopt::Long::Configure ("bundling");
-GetOptions(
-  'input|i=s'    => \$InputEncStr,
-  'output|o=s' => \$OutputEncStr,
-  'help|h'      => sub {usage_message(); exit(0)}
-);
 
 sub usage_message() {
-  print "
+  print STDERR "
 $0: translates between various encodings of hebrew latex
 
 Usage:
@@ -32,7 +28,10 @@
         
       -o <encoding> |--output=<encoding>
       The output encoding. Default: $OutputEncStr
-    
+
+      -n | --no-nikud  Avoid converting Nikud (implies --no-dages)
+      -d | --no-dages  Avoid converting Dagesh chars
+      -h | --help         Print this text
     Valid Encodings:
     
       8bit 224 iso8 8859-8 8859_8 cp1255
@@ -52,6 +51,82 @@
 "
 }
 
+
+Getopt::Long::Configure ("bundling");
+{
+  my $rc=GetOptions(
+    'input|i=s'    => \$InputEncStr,
+    'output|o=s' => \$OutputEncStr,
+    'no-dagesh|d!' => \$IsNotUseDagesh,
+    'no-nikud|n!' => \$IsNotUseNikud,
+    'help|h'      => sub {usage_message(); exit(0)}
+  );
+  if ($rc != 0) {
+    print STDERR "$0: Error in command-line parsing. Aborting.";
+    usage_message();
+    exit 2;
+  }
+}
+
+# if there is no nikud then there is no dagesh as well:
+if ($IsNotUseNikud) {$IsNotUseDagesh = 1;}
+
+# alefdagesh 128
+# hebalefmappiq 128
+# betdagesh 129
+# gimeldagesh 130
+# daletdagesh 131
+# hedagesh 132
+# hemappiq 132
+# vavdagesh 133
+# vavshuruq 133
+# zayindagesh 134
+# hetdagesh 135
+# tetdagesh 136
+# yoddagesh 137
+# finalkafdagesh 138
+# kafdagesh 139
+# lameddagesh 140
+# finalmemdagesh 141
+# memdagesh 142
+# finalnundagesh 143
+# nundagesh 144
+# samekhdagesh 145
+# ayindagesh 146
+# finalpedagesh 147
+# pedagesh 148
+# finaltsadidagesh 149
+# tsadidagesh 150
+# qofdagesh 151
+# reshdagesh 152
+# shindagesh 153
+# sindagesh 153
+# tavdagesh 154
+# 
+# sheva 192
+# hatafsegol 193
+# hatafpatah 194
+# hatafqamats 195
+# hiriq 196
+# tsere 197
+# segol 198
+# patah 199
+# qamats 200
+# holam 201
+# qubuts 203
+# dagesh 204
+# meteg 205
+# maqaf 206
+# rafe 207
+# paseq 208
+# shindot 209
+# sindot 210
+# sofpasuq 211
+# doublevav 212
+# vavyod 213
+# doubleyod 214
+
+
 my %CODE_7BIT = (In=>[]);
 my %CODE_DOS  = (In=>[]);
 my %CODE_8BIT = (In=>[]);
@@ -95,6 +170,76 @@
   'tav',
 );
 
+if (! $IsNotUseNikud) {
+  push @HEBREW_LETTER,(
+    'sheva',	#192
+    'hatafsegol',	#193
+    'hatafpatah',	#194
+    'hatafqamats',	#195
+    'hiriq',	#196
+    'tsere',	#197
+    'segol',	#198
+    'patah',	#199
+    'qamats',	#200
+    'holam',	#201
+    'qubuts',	#203
+    'dagesh',	#204
+    'meteg',	#205
+    'maqaf',	#206
+    'rafe',	#207
+    'paseq',	#208
+    'shindot',	#209
+    'sindot',	#210
+    'sofpasuq',	#211
+    'doublevav',	#212
+    'vavyod',	#213
+    'doubleyod',	#214
+  );
+  push  @{$CODE_8BIT{In}}, (192 .. 213);
+}
+if (! $IsNotUseDagesh) {
+  push @HEBREW_LETTER,(
+    'alefdagesh', #128
+    'hebalefmappiq', #128
+    'betdagesh', #129
+    'gimeldagesh', #130
+    'daletdagesh', #131
+    'hedagesh', #132
+    'hemappiq', #132
+    'vavdagesh', #133
+    'vavshuruq', #133
+    'zayindagesh', #134
+    'hetdagesh', #135
+    'tetdagesh', #136
+    'yoddagesh', #137
+    'finalkafdagesh', #138
+    'kafdagesh', #139
+    'lameddagesh', #140
+    'finalmemdagesh', #141
+    'memdagesh', #142
+    'finalnundagesh', #143
+    'nundagesh', #144
+    'samekhdagesh', #145
+    'ayindagesh', #146
+    'finalpedagesh', #147
+    'pedagesh', #148
+    'finaltsadidagesh', #149
+    'tsadidagesh', #150
+    'qofdagesh', #151
+    'reshdagesh', #152
+    'shindagesh', #153
+    'sindagesh', #153
+    'tavdagesh', #154
+  );
+  push  @{$CODE_8BIT{In}}, (
+    # 4 characters appear twice (128, 132, 133, 153) and thus a simple 
+    # .. will not do.
+    128, 128 .. 132, 132,
+    133, 133 .. 153, 153,
+    154
+  );
+}
+
 my %CODE_LETTERS_ORIG = (In=>[], Out=>[]);
 my %CODE_LETTERS_NEW  = (In=>[], Out=>[]);
 
@@ -127,19 +272,30 @@
 my $InputEnc;
 my $OutputEnc;
 
-if (!defined $EncodingName{$InputEncStr}){
+if (defined $EncodingName{$InputEncStr}){
   print STDERR "ERROR: undefind input encoding \"$InputEncStr\"\n";
   exit(1);
-} else {
-  $InputEnc=$EncodingName{$InputEncStr}{In};
 }
 
 if (!defined $EncodingName{$OutputEncStr}){
   print STDERR "ERROR: undefind output encoding \"$OutputEncStr\"\n";
   exit(1);
-} else {
-  $OutputEnc=$EncodingName{$OutputEncStr}{Out};
 }
+ 
+if (($EncodingName{$InputEncStr}  == \%CODE_7BIT) || 
+    ($EncodingName{$InputEncStr}  == \%CODE_DOS)  ||
+    ($EncodingName{$OutputEncStr} == \%CODE_7BIT) || 
+    ($EncodingName{$OutputEncStr} == \%CODE_DOS)     ){
+  # I don't want to automatically set no nikud: this may result in 
+  # conversion in a case where the encoding was misgiven.
+  print STDERR 
+    "7bit and dos encodings do not include nikud. Use --nouse-nikud\n";
+  usage_message();
+  exit 3;
+}
+
+$InputEnc=$EncodingName{$InputEncStr}{In};
+$OutputEnc=$EncodingName{$OutputEncStr}{Out};
 
 my $Len = scalar(@$InputEnc);
 



More information about the Debian-hebrew-package mailing list