summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/velthuis/manual.tex
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-03 21:45:54 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-03 21:45:54 +0000
commit60b4c4c10b1d3f17d0cfd874ee2aa0c760323848 (patch)
treea9bce5b79aea345a4bb9bb73c3bdeb42aa865708 /Master/texmf-dist/doc/generic/velthuis/manual.tex
parenta51e7b83ab266e1e51718bdb0f8007a4517a578a (diff)
velthuis v2.15
git-svn-id: svn://tug.org/texlive/trunk@9196 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/velthuis/manual.tex')
-rw-r--r--Master/texmf-dist/doc/generic/velthuis/manual.tex336
1 files changed, 299 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/generic/velthuis/manual.tex b/Master/texmf-dist/doc/generic/velthuis/manual.tex
index f9e928da856..afba7b6e55e 100644
--- a/Master/texmf-dist/doc/generic/velthuis/manual.tex
+++ b/Master/texmf-dist/doc/generic/velthuis/manual.tex
@@ -1,11 +1,14 @@
%
-% manual.tex v2.14
+% manual.tex v2.14.1
%
% LaTeX source file for the manual for the Devanagari for TeX" package.
-% Copyright (C) 1991-2003 University of Groningen, The Netherlands
+% Copyright (C) 1991-2006 University of Groningen, The Netherlands
%
% Author : Anshuman Pandey <apandey@u.washington.edu>
-% $Id: manual.tex,v 1.6 2006/05/29 09:00:12 icebearsoft Exp $
+% Maintainer : Kevin Carmody <i@kevincarmody.com>
+% Zdenek Wagner <zdenek.wagner@gmail.com>
+%
+% $Id: manual.tex,v 1.10 2008-03-09 15:57:59 icebearsoft Exp $
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
@@ -16,10 +19,11 @@
% merchantability or fitness for a particular purpose. See the
% GNU General Public License for more details.
%
-
+\listfiles
\documentclass[10pt]{article}
\def\DevnagVersion{new}
-\usepackage{geometry,fancyhdr,multicol,mflogo,textcomp,parskip,array,color}
+\usepackage{ifpdf}
+\usepackage{geometry,fancyhdr,multicol,mflogo,textcomp,parskip,array,color,graphicx}
\usepackage{devanagari}
\renewcommand{\rmdefault}{ptm}
@@ -33,21 +37,31 @@
headsep=0pt,
}
+\newif\ifbug \bugtrue % bug in hyperref?
\usepackage{hyperref}
% High resolution pk fonts for pdfTeX
\ifx\pdfpkresolution\undefined \else
\pdfpkresolution 600
\fi
+% For better formating
+\ifpdf
+\usepackage[protrusion=false,expansion=true,stretch=8,shrink=24,step=4]{microtype}
+\fi
-\newcommand{\moddate}{27 May 2006}
-\newcommand{\version}{2.14}
+\newcommand{\moddate}{31 December 2007}
+\newcommand{\version}{2.14.1}
\renewcommand{\headrulewidth}{0pt}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\columnseprule}{0pt}
\newcommand{\devnag}{Devan\=agar{\=\i}}
+\DeclareRobustCommand\babel{\textsf{babel}}
+\DeclareRobustCommand\XeTeX{X\kern-.125em\lower.5ex\hbox{\csname
+ reflectbox\endcsname{E}}\kern-.1667em\TeX}
+\DeclareRobustCommand\XeLaTeX{X\kern-.125em\lower.5ex\hbox{\csname
+ reflectbox\endcsname{E}}\LaTeX}
\def\diatop[#1|#2]{{\leavevmode\setbox1=\hbox{{#1{}}}\setbox2=\hbox{{#2{}}}%
\dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi%
@@ -114,7 +128,7 @@ John Smith & \verb+jds10@cam.ac.uk+ \\
Anshuman Pandey & \verb+apandey@u.washington.edu+ \\
Dominik Wujastyk & \verb+d.wujastyk@ucl.ac.uk+ \\
%Fran\c{c}ois Patte & \verb+patte@math-info.univ-paris5.fr+ \\
-Zden\v{e}k Wagner & \verb+wagner@cesnet.cz+ \\
+Zden\v{e}k Wagner & \verb+zdenek.wagner@gmail.com+ \\
Kevin Carmody & \verb+i@kevincarmody.org+
\end{tabular}
\end{quote}
@@ -307,11 +321,6 @@ Table~\ref{chars}, or by \verb+~m+.
% \item \verb+~a+ produces an `English a' Marathi style. For example,
% Hindi {\dn V\4?sF} and Marathi {\dn V\<?sF}.
-\item Numerals are printed as Arabic numerals by default. The command
-\verb+\dnnum+ switches to \devnag{} numerals. Every numeral after this
-command is printed as a \devnag{} numeral. The command \verb+\cmnum+
-switches back to Arabic numerals.
-
\item In Hindi mode the character \verb+&+ can be put at the end of a
word to produce a \textit{vir\={a}ma} sign under the final consonant.
For example, \verb+pari.sad&+ produces {\dn pErq\qq{d}} . The underscore
@@ -705,6 +714,26 @@ the preprocessor will operate on \texttt{dharmak.setre} and \texttt{kuruk.setre}
but will ignore \verb+\font\zzz=dvng10 at 18pt+ because it occurs within the
\verb+<+ and \verb+>+ delimiters.
+\subsection{Embedding Roman Text within \devnag{} Text}
+
+The font commands \verb+\rsize+ (Plain \TeX{}) and \verb+\NormalFont+
+(\LaTeX{}) put Roman text within \devnag{} Text. This is useful in
+conjuction with the text protection delimiters \verb+<+ and \verb+>+.
+Examples:
+
+\begin{quote}
+Plain \TeX{}: \verb+{\dn naama {\rsize <John>}}+
+
+\LaTeX{}: \verb+{\dn naama {\NormalFont <John>}}+
+\end{quote}
+
+By default, Roman text using \verb+\rsize+ and \verb+\NormalFont+ is printed
+in a Computer Modern font whose size matches the current \devnag{} font.
+Non-\devnag{} punctuation marks, such as comma, question mark, and
+exclamation mark, and Arabic numerals are automatically printed in this font.
+To change this font, redefine the \verb+\rsize+ or \verb+\NormalFont+
+command.
+
\subsection{Breaking Pre-Defined Conjuncts}
The preprocessor will automatically produce predefined ligatures
from certain sequences of consonants. Placing the \texttt{+} character
@@ -1031,6 +1060,12 @@ You should therefore use \verb=\datemodernhindi= in documents processed with
\texttt{\char92 datemodernhindi}}\label{months}
\end{table}
+If you use \verb=\datehindi= or \verb=\datemodernhindi=, you can also use the
+macros \verb+\hindidatearabic+ and \verb+\hindidatedevanagari+ to control
+whether the day number in \verb+\today+ is printed in Arabic or \devnag{},
+respectively. The \verb+\hindidatedevanagari+ mode is the default. The macros
+\verb+\cmnum+ and \verb+\dnnum+ have no effect in this case.
+
The captions are similarly switched to Hindi by \verb=\captionshindi= or
\verb=\captionsmodernhindi=, respectively. Again the texts differ only in the
ligatures used. The captions for the modern Hindi variant are given in
@@ -1083,7 +1118,7 @@ they cause the \verb=\dn= command to switch the caption text and date format as
well. The date format and captions may be switched back by macros
\verb=\dateenglish=, \verb=\dateUSenglish=, and \verb=\captionsenglish=.
-\subsection{Customizing the date and captions}
+\subsection{Customizing the date and captions (\LaTeX{} only)}\label{customizing}
The user might prefer different caption texts. If just a few texts are to be
changed, they can simply be redefined in the main document, for instace by:
@@ -1095,8 +1130,8 @@ This redefinition must appear \textbf{after} \verb=\captionshindi= or
\verb=\captionsmodernhindi= was invoked.
It is also possible to change all definitions. The source texts in the Velthuis
-transliteration can be found in the \texttt{input} directory
-(\verb=$TEXMF/tex/latex/devanagr=) in file
+transliteration can be found in the \texttt{documentation} directory
+(\verb=$TEXMF/doc/generic/velthuis=) in file
\texttt{captions.dn} with some suggested variants in comments. You can either
put modified definitions to your main document (after \textsf{devanagari.sty}) or to a
package of your own. Remember that the preprocessor will not see your package,
@@ -1108,9 +1143,14 @@ the latter case you will have to rebuild the database by running
Do not put your packages to standard distribution directories. You may lose
them when upgrading your \TeX{} distribution.
-\renewcommand\thepage{{\dn\arabic{page}}}
+Customization of the captions texts is easier in the \babel\ module. The module is described in
+section~\ref{babel}.
-\subsection{Using \texorpdfstring{{\dn d\?vnAgrF}}{Devanagari} in Sections and References}
+\ifbug \else
+\renewcommand\thepage{\devanagari{page}}
+\fi
+
+\subsection{Using \texorpdfstring{{\dn d\?vnAgrF}}{Devanagari} in Sections and References (\LaTeX{} only)}
All macros necessary for typesetting \devnag{} text are robust. The
section/chapter titles as well as figure and table captions can contain
\devnag{} words. However, the font is changed to the standard document
@@ -1121,29 +1161,84 @@ correctly while \verb+{\dn\chapter{mis paal}}+ will always
create garbage text. Section numbers as well as page numbers will be
printed in Roman numerals.
-\subsection{\devnag{} Page Numbers}
-Changing page numbers to print \devnag{} numerals is possible by
-redefining the \verb+\thepage+ macro. This redefinition places the
-\verb+page+ counter in the scope of the \verb+\dn+ delimiter. However,
-note that \verb+\arabic{page}+ is enclosed within angle brackets. This
-is required because the preprocessor does not recognize the counter
-as a command. The pagination for this page till the end of Chapter~\ref{spec}
-occurs in \devnag{} through
-the following redefintion of \verb+\thepage+:
+\subsection{\devnag{} and Arabic Numerals}
+Except when they are represented by commands, numerals are printed as Arabic
+numerals by default. The command \verb+\dnnum+ switches to \devnag{}
+numerals. The command \verb+\cmnum+ switches back to Arabic numerals.
+
+Numerals represented by commands are printed as \devnag{} numerals by
+default. If you want to use \verb+\cmnum+ or \verb+\dnnum+ to control whether
+numerals within commands are printed as Arabic or \devnag{}, use the command
+\verb+\rn+ around the numeral command. If the command contains a mix of
+letters and numerals, you may need to redefine the command with \verb+\rn+
+around the numeral part.
+
+Without \verb+\rn+, numerals in commands are always printed as \devnag{},
+even if \verb+\cmnum+ is in effect. For example, in Plain \TeX{}, the macro
+\verb+\folio+ contains the current page number. To make this respect
+\verb+\cmnum+, use a command such as \verb+{\dn p.r.s.tha \rn{\folio}}+.
+\LaTeX{} users can use the techniques described in the next section.
+
+Arabic numerals are printed in the font specified by the commands
+\verb+\rsize+ (Plain \TeX{}) or \verb+\NormalFont+ (\LaTeX{}). This font is
+also used for non-\devnag{} punctuation marks. By default, this is a Computer
+Modern font whose size matches the current \devnag{} font. To change this
+font, redefine the \verb+\rsize+ or \verb+\NormalFont+ command.
+
+\subsection{\devnag{} Page Numbers and Other Counters (\LaTeX{} only)}
+Changing page numbers and other counters to print \devnag{} numerals is
+possible with the \verb+devanagari+ numeral style. Page numbers can be
+set to \devnag{} with the following declaration:
+
+\begin{quote}
+\verb+\pagenumbering{devanagari}+
+\end{quote}
+
+The default is \verb+\pagenumbering{arabic}+.
+
+You can use the command \verb+\devanagari+ as an alternative to
+\verb+\arabic+ to control the style of a counter anywhere in the document.
+For example, \verb+\devanagari{page}+ prints the current page number in
+\devnag{} numerals, while \verb+\arabic{page}+ prints it in Arabic numerals.
+
+You can change the automatic display of other counters to \devnag{} by
+redefinition macros. For example, to change section numbering to \devnag{},
+redefine \verb+\thesection+:
+
+\begin{quote}
+\verb+\renewcommand\thesection{\devanagari{section}}+
+\end{quote}
+
+The macros \verb+\cmnum+ and \verb+\dnnum+ have no effect on counters, unless
+you also use the command \verb+\rn+. To make page numbering respect the
+settings of \verb+\cmnum+ and \verb+\dnnum+, use \verb+\rn+ as follows:
\begin{quote}
-\verb+\renewcommand\thepage{{\dn<\arabic{page}>}}+
+\verb+\renewcommand\thepage{\dn p.r.s.tha \rn{\arabic{<page>}}}+
\end{quote}
-Other counters can be printed in \devnag{} by redefinition macros. For
-example, to change section numbering to \devnag{}, redefine
-\verb+\thesection+ in a manner similar to \verb+\thepage+ above, using
-the \verb+section+ counter instead of \verb+page+:
+Note that \verb+page+ is enclosed within angle brackets. This is required
+because it is within the scope of the \verb+\dn+ command, and the
+preprocessor does not recognize counter names as commands.
+
+\ifbug
+\devnag\ page numbering unfortunatelly conflicts with some versions of the \textsc{hyperref}
+package. The source of the problem has not be resolved yet. Use this feature with caution.
+\else
+The pagination for this page until the end of Chapter~\ref{spec} occurs in
+\devnag{} through the command
\begin{quote}
-\verb+\renewcommand\thesection{{\dn<\arabic{section}>}}+
+\verb+\renewcommand\thepage{\devanagari{page}}+
\end{quote}
+and is reset to Arabic through
+
+\begin{quote}
+\verb+\renewcommand\thepage{\arabic{page}}+
+\end{quote}
+\fi
+
\subsection{Category Codes}
\label{catcodes}
\TeX{} assigns a category code (\verb+\catcode+) to each character. For
@@ -1191,11 +1286,162 @@ properly by \verb+\dn+, you can use the \textsf{compat} option. The
macro \verb+\UnDevCatcodes+ changes catcodes back to the normal values
within the \verb+\dn+ environment.
-\clearpage % forced page break, remove it if the next section does not start
- % at the same page as the previous subsection
-\section{Vedic Macros}
+%\clearpage % forced page break, remove it if the next section does not start
+ % at the same page as the previous subsection
+\section{Using \texorpdfstring{\devnag}{Devanagari} in \texorpdfstring{\XeLaTeX}{XeLaTeX}}
+
+\renewcommand\thepage{\arabic{page}}
-\renewcommand\thepage{{\arabic{page}}}
+This topic does not fully fit here but it is described in this manual because the module for
+\babel, which is also included in this package, can be used both in the traditional \TeX\ and
+\XeTeX.
+
+Using \devnag\ in \XeTeX\ does not require any preprocessor. Instead you should use a Unicode
+Open\-Type font and enter \devnag\ directly in your text editor. You do not install such fonts for
+\XeTeX, it takes the fonts installed in your operating system. Open\-Type fonts can have different
+features, the most important of them is ``Script''. You have to specify ``Script=Devanagari'' when
+loading the font so that conjuncts are properly formed and i-matras are moved before the consonant.
+In \XeLaTeX\ (the \LaTeX\ format in \XeTeX) you can easily achieve it by:
+
+\medskip
+\begin{verbatim}
+\usepackage{fontspec}
+...
+\fontspec[Script=Devanagari]{fontname}
+\end{verbatim}
+
+\medskip \noindent
+Replace ``fontname'' with the name of the font. You can query the font name in your operating
+system. The \textsc{fontspec} package maps the standard \LaTeX\ font switching commands to the \XeTeX\
+primitives. Look into its manual for more details.
+
+Unicode assigns special codes to \devnag\ numerals. Automatically created number, e.\,g.\@ the page
+number created by \verb;\thepage;, will be printed in Arabic numerals. \XeTeX\ contains the TECkit
+library for mapping characters. If you specify (as another option in the square brackets of the font
+switching command) ``Mapping=devanagarinumerals'', all Arabic numerals will be automatically
+converted to the corresponding \devnag\ numerals.
+
+Although the text may be entered directly in \devnag, it may be useful to process the source text
+in the Velthuis \devnag\ by \XeLaTeX. This can also be achieved by TECkit remapping. Two mapping
+files are available: Mapping=velthuis-sanskrit and Mapping=velthuis. The latter is intended for
+Hindi. They differ in the only feature that the Sanskrit map will append a virama if the word ends
+in a consonant while the Hindi map will not. Both maps convert numerals too. These maps are still
+rather experimental. Examples of their usage can be found in files \texttt{xetex-misspaal.tex} and
+\texttt{xetex-examples.tex} which are distributed in the document directory of this package. Under
+the \textsc{texmf} tree their directory should be \verb;doc/generic/velthuis;.
+
+Remember that Velthuis transliteration employs the tilde character which normally denotes a
+nonbreakable space. If you want to utilise TECkit maps, you have to change its \verb;\catcode; to
+12 inside the \devnag\ text, otherwise words like {\dn Ev\3E2wApn} will be printed
+incorrectly.
+
+\section{Using Hindi with \babel}\label{babel}
+Since the \textsc{devnag} package version~2.14.1 a new module for \babel\ is released. This unifies
+the interface for multiligual documents where Hindi is one of the languages. The module is
+available for use both in traditional \LaTeX\ and \XeLaTeX. Usage in plain \TeX\ is not yet
+supported but the module should work in plain \XeTeX. Usage with the traditional \LaTeX\ does
+require the full \textsc{devnag} package. The module is built upon its macros as well as the
+preprocessor and fonts.
+
+\subsection{Installation}
+The Hindi module is not yet included in the standard \babel\ distribution, you have to install it
+yourself. Fortunatelly installation is quite simple. It s not necessary to plug \texttt{hindi.dtx},
+which you find in the documentation directory, to \babel\ and generate all files. Instead the
+relevant files have been generated for you and are installed automatically with this package. The
+only thing you have to do is to inform \LaTeX\ and \XeLaTeX\ that the Hindi module is available. It
+is done in the \texttt{language.dat} file. Since we have no hyphenation patterns for
+Hindi\footnote{Some time ago hyphenation patterns for Sanskrit for \XeLaTeX\ have been released on
+CTAN. Their usability for Hindi in \XeLaTeX\ should be evaluated.}, just append the following line
+to the end of the file:
+
+\medskip
+\begin{verbatim}
+hindi zerohyph.tex
+\end{verbatim}
+
+If you do not have permission to edit this file, you can make its copy in directory
+\verb;tex/generic/config; under \verb;texmf-var; which is usually world writable. Save the file and
+generate the formats. Unofficial but tested installation script can be found at
+\url{http://icebearsoft.euweb.cz/tex/csh_babel.php}.
+
+\subsection{Usage}
+If you want to use Hindi as a \babel\ module, put the following command into the preamble of your
+document:
+
+\medskip
+\begin{verbatim}
+\usepackage[hindi]{babel}
+\end{verbatim}
+
+\medskip
+Do not load \texttt{devanagari.sty}. The above mentioned syntax is valid both for \LaTeX\ and
+\XeLaTeX. The \babel\ module knows that \texttt{devanagari.sty} is required in \LaTeX\ and will
+load it automatically. Moreover, \babel\ will not work correctly with older version of the
+\textsc{devnag} package. It therefore employs version checking.
+
+You may enter more comma separated languages in the square brackets. The last language will be the
+default. You can then switch languages by standard \babel\ commands as
+\verb;\selectlanguage{hindi}; and
+
+\begin{verbatim}
+\begin{otherlanguage}{hindi}
+...
+\end{otherlanguage}
+\end{verbatim}
+
+\medskip
+If traditional \LaTeX\ is used, you must still insert the source text inside the \verb;{\dn };
+group, otherwise the preprocessor will not recognize it.
+
+\subsection{Language attributes}
+Package \texttt{devanagari/sty} can be loaded with some options. When using the \babel\ module this
+functionality is available only indirectly by specifying these options in the \verb;documentclass;
+declaration. This is not preferred because these options should not be treated as document
+properties. Instead these options were reimplemented as \babel\ language attributes. The attributes
+are selected by invoking:
+
+\begin{quote}
+\verb;\languageattribute{hindi}{;$\langle$\itshape list of attributes$\rangle$\verb;};
+\end{quote}
+
+The command must appear after loading \babel.
+
+\subsubsection{Attribute modernhindi}
+This attribute switches to the Modern Hindi captions. Remember that the preprocessor does not
+understand the language attributes and \babel\ cannot read the preprocessor directives. You must
+therefore correctly insert either \texttt{@hindi} or \texttt{@modernhindi} directive in addition to
+the language attribute. The attribute has no effect in \XeLaTeX\ because conjunct building is
+defined in the tables inside the Open\-Type font.
+
+\subsubsection{Font style attributes}
+The module implements attributes \texttt{bombay}, \texttt{calcutta}, \texttt{nepali}, \texttt{pen},
+\texttt{penbombay}, \texttt{pencalcutta}, \texttt{pennepali} that serve the same purpose of the
+package options with the same name. These attributes are connected with the Velthuis fonts and are
+thus unavailable in \XeLaTeX.
+
+\subsection{Customizing captions}
+The \babel\ module makes use of the same definitions of date and captions as shown in
+tables~\ref{months} and~\ref{captions}. Their redefinition within the framework of \babel\ is easy.
+Suppose that we want to change the title of Index to {\dn a\7{n}\387wmEZkA} as we did in
+section~\ref{customizing}. We achieve it by placing the following command to the preamble after
+loading \babel:
+
+\medskip
+\begin{verbatim}
+\addto\captionshindi{\def\indexname{{\dn anukrama.nikaa}}}
+\end{verbatim}
+
+\medskip
+The same can be done for \verb;\cationsmodernhindi;. Notice that the command will be seen by the
+preprocessor.
+
+If you want to do the same in \XeLaTeX, enter the changed text directly in Unicode:
+
+\medskip
+\verb;\addto\captionshindi{\def\indexname{;{\dn a\7{n}\387wmEZkA}\verb;}};
+
+
+\section{Vedic Macros}
These macros put Vedic intonation marks above and below individual
Devanagari letters and construct other characters generally used only in
@@ -1539,6 +1785,8 @@ Nepali (\texttt{dvpnn}) & {\dn \dnnum \large \dnpennepali a \31Bw C f l \rn{5}
\label{specs}
\end{table}
\newpage
+\thispagestyle{empty}
+\enlargethispage{\footskip}
\begin{table}[pt]
@@ -1585,6 +1833,20 @@ to eEXkA\2g n\? {\itshape pFW pkw kr} u\306wh\?{\qva} DFr\? s\?
\bigskip
\begin{center}
+Devanagari Nepali
+\end{center}
+
+{\dn \dnnepali b\7{h}t s\? CoV\? CoV\? rAjAao\2 kF bol cAl kA Y\2g
+BF{\rs ,\re} {\itshape Ejs smy v\? vA{}isrAy} s\? Emln\? aAe T\?{\rs ,\re}
+{\bfseries s\2"\?p k\? sAT} ElKn\? k\? yo`y h\4. koI to
+\8{d}r hF s\? {\itshape hAT jow\?} aAe{\rs ,\re} {\bfseries aOr do ek e\?s\?
+T\? Ek} jb eEXkA\2g k\? bdn {\bfseries \itshape \7{J}kAkr
+ifArA krn\?} pr BF u\306who{\qva} n\? {\bfseries slAm n EkyA}
+to eEXkA\2g n\? {\itshape pFW pkw kr} u\306wh\?{\qva} DFr\? s\?
+\7{J}kA EdyA.\par}
+\bigskip
+
+\begin{center}
Devanagari Pen Regular
\end{center}