Installing VI Editor with Hebrew support
For editing, I currently use gvim with Hebrew macros written by Tomer Kol. Instructions for installing Hebrew vi are from here. Below I copied some relevant parts
- Installing GVim
- Download and install gvim from http://www.vim.org (from now on we will refer to the top level of the vim installation as $gvim [on my computer it is C:\Program Files\Vim]
- Installing Hebrew Font
- On Windows platforms install "netextmo" font from "webheb" package (can belocated easily on the WWW) Location of webheb.exe package: http://www.brijnet.org/ivrit/webheb.exe [local copy here (zipped)]
- Move webheb.exe into an empty folder. Extract the package by running (double-click) webheb.exe . The installation of fonts is done via "Control panel"->Fonts and selecting installation of new fonts from the menu. Then browse to the directory containing the files extracted from the webheb fonts pakcage, select all fonts and choose "Install".
- Setup vim to use the Hebrew font from the package: Append the following line at the end of the file $gvim\_vimrc (needed for proper display/editing of Hebrew text only):
- set guifont=netextmo:h12
- (12 stands for height, use at least 12)
- Installation of Latex Editing Environment and Hebrew switching hotkeys support.
- Installation of up-to-date gsview+ghostscript are recommended (you can find them by "google"-ing for ghostscript)
- [The text with yellowish background below can be skipped by downloading a local copy of TKlatex.vim into $gvim]
- Download the file containing the LaTeX editing environment (applies on Windows and non-Windows) from: http://ae-www.technion.ac.il/pkgs/t-z/vim/ (originally from http://tiger.technion.ac.il/~tomer/TeX/VIM/TKlatex.vim mirrorred with the permission of the author) into $gvim. The file is launched by the _vimrc file (installation of the call to this file follows further in this document). On Windows change the line (currently 726):
- let g:TKDVIviewer = "windvi"
- to:
- let g:TKDVIviewer = "yap"
Also add paths to "acrord32" and "gsview32" command on the two following lines to read according to the following examples; note that "linux-style" directory separators (slash) are used "/":
"C:/Program Files/Adobe/Acrobat 5.0 ME/Reader/acrord32"
"C:/Program Files/Ghostgum/gsview/gsview32"
In latest versions of MikTeX in the same section several lines above you should change "elatex" to "latex" - check which of the 2 latex compilers exists by running them in a CMD window - of course, latex should first be installed...
To use "Make PS" and "Make PDF" items in Latex menu add the following to the path (use the appropriate path of Ghostscript installation):
C:\Program Files\gs\gs8.51\lib
C:\Program Files\gs\gs8.51\bin
Download vimrc_example_latex.txt (from http://ae-www.technion.ac.il/pkgs/t-z/vim/) [local copy] into $gvim. Append to $gvim\_vimrc the following line
source $gvim/vimrc_example_latex.txt
(it contains useful stuff and a call that loads the TKLatex.vim ) Now launching GVim should result in a window with "Latex" and "Language" menus and <F9> hotkey for language and text direction switch between English and Hebrew.
- The webpages referenced above also explain how to instal LyX with Hebrew support. I did not try it. It may be a better solution than VI. In particular, VI does not seem to support NIKUD.
- Probably a better solution would be using XeLaTeX with the bidi package (which supports, among other things, the hyperref, and memior packages). I haven't tried this solution. One place to start with is http://en.foursenses.net/hebrewinxetex
- Example: By now we wrote a draft of a complete study companion in Hebrew for the course in "Algorithms" based on the book "Algorithm deisgn" by Kleinberg and Tardos. I offer here the sources and pdf of two chapters of the study companion, zipped [madrich2.zip]. To compile it extract the files together with directory structure, and execute "pdflatex madrich".
- The package amsthm (definition of theorem-like environments) is not compatible with Hebrew. Work around: Define your own theorem-like environment.
- For example, here is an environment for exercises (תרגיל)
- \newcounter{exercise}[chapter]
- \renewcommand{\theexercise}{\L{\thechapter.\arabic{exercise}}}
- \newcommand{\exer}[1][default] {\par\medskip\noindent\refstepcounter{exercise}\hbox{\bfseries \R{\hebtav\hebresh\hebgimel\hebyod\heblamed}~\theexercise\ \ifthenelse{\equal{#1}{default}}{}{)#1(}}%
- \ignorespaces \fontfamily{aharoni}\selectfont}
- \def\endexer{\hfill$\clubsuit$\par\medskip}
- \newenvironment{exercise}{\exer}{\endexer}
- Figure placement in Hebrew mode is totally wrong. Work around: Put the \includegraphics in English mode. For example
- \begin{figure}[ht]
- \begin{otherlanguage}{english}
- \begin{center}
- \includegraphics{ch3-graph}
- \end{center}
- \end{otherlanguage}
- \caption{גרף בעל שני רכיבי קשירות}
- \label{fig:ch3:1}
- \end{figure}
- Many problems in the interaction between Hebrew and the documentclasses "memoir" & "octav.
- Workaround: Use the standard latex documentclass "book" "\mainmatter" macro of the memoir package. instead, manually use
- at the front matter
- \renewcommand{\thepage}{\roman{page}}
- at the main matter
- \setcounter{page}{1}
- \renewcommand{\thepage}{\arabic{page}}
- The reference \eqref{eq:number} Looks in Hebrew like ")13(" instead of "(13)". Work around: Put it in English mode \L{\eqref{eq:number}}
- In the the "book" documentclass the running heading is the opposite. Work around: use the fancyheader package. I customized the headers as follows:
- \documentclass[a4paper,11pt]{book}
- \usepackage{fancyhdr}
- \pagestyle{fancy} \fancyhead{} \fancyhead[RO]{\slshape \rightmark} \fancyhead[LE]{\slshape \leftmark} \fancyfoot[C]{\thepage}
- It's for double sided printing where on the on side the chapter name, and on the other the section name
- The package "algorithmic": does not produce line numbers with \usepackage[hebrew]{babel}
- The package hyperref does not seem to work with hebrew. Too bad.
- I have problem running pdflatex on Hebrew documents in Miktex 2.8 and the culmus package 0.2.1: got the error miktex-makemf fails. Solution: Run the updmap command manually, from a command window.
I use Ipe 7 to draw figures. Here is a list of issues I encountered and workarounds.
- Ipe uses pdflatex to produce text in the figure. When embedded in a Latex document, the text may "disappear" when producing a paper using pdflatex. The problem seems to be when figures were producing with different latex than the one used to compile the tex file. Solution: load the figure into Ipe and save them again (as pdf files).
- Errors appears when trying to save a figure with some text as pdf. In this case check Help->Ipe configuration and find out where is the latex directory. Check there the files text.pdf and text.tex. If text.pdf is empty when it doesn't suppose, try executing the command "udpmap"
- If you have figures in Ipe 6 pdf file, follow the following procedure: execute
- ipeextract <file>.pdf
- ipe6upgarde <file>.xml
- Open <file>.ipe using Ipe 7
- Enter the style sheet menu (<CTRL><SHIFT>S)
- change the list such that it will contain only "basic" and then "standard" style sheets.
Installing Hebrew Latex on Mac OS X
See https://docs.google.com/document/d/1dC3vK-iFCz_fwCsB9fhYuIF607fw4W9Vu0PdBDhLM0E/mobilebasic?pli=1