1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
% ITRANS Devanagari Header for TeX/LaTeX.
% using either Devnac or Devnag font
% Defines devanagari fonts in various sizes
% Also includes some macros for the ITRANS song book....
%-----
% Copy this file to someplace where TeX can find it, the best place
% is usually the ITRANS lib/ directory. Make sure to add that directory
% to the TEXINPUTS environment variable.
%-----
% created: avinash chopde, february 1994
% avinash@acm.org
% modified: may 2001
% $Header:$
% -----------------------------------------------------------------
%% Usage:
%% Include this file somewhere in the beginning of your input file.
% \input <thisfilename>
%% Then, if you are using Frans's font, add these lines (uncommented):
% #indianifm=dvng_is.ifm % ITRANS command
% #indianfont=\fransdvng
%% If you are using the PostScript Devnac font that came with ITRANS, add
%% these lines (uncommented):
% #indianifm=dvnc.ifm % ITRANS command
% #indianfont=\postdvng
%% Then, whenever you need to use some particular size of the font,
%% use the following command:
% \let\usedvng=\largedvng % usedvng is used by \fransdvng or \avidvng
%% sizes available: normaldvng < largedvng < LARGEdvng < hugedvng
% see the file ../doc/sample.itx for an example.
% -----------------------------------------------------------------
\newif\iffrans
% -----------------------------------------------------------------
% Page commands (for LaTeX ONLY, use one of these commands in preamble)
\def\portraitpage{%
\setlength{\topmargin}{-0.50in} % real margin == this + 1in
\setlength{\oddsidemargin}{-0.0in} % real margin == this + 1in
\setlength{\evensidemargin}{-0.0in} % real margin == this + 1in
\setlength{\columnsep}{20pt}
\setlength{\columnseprule}{0.4pt}
% Use Portrait Size Page
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.0in}%
}
\def\landscapepage{%
\typeout{Landscape Mode: be sure to print in landscape format}
\typeout{ (for dvips, use -t landscape option)}
\setlength{\topmargin}{-0.75in} % real margin == this + 1in
\setlength{\oddsidemargin}{-0.0in} % real margin == this + 1in
\setlength{\evensidemargin}{-0.0in} % real margin == this + 1in
\setlength{\columnsep}{20pt}
\setlength{\columnseprule}{0.4pt}
% Use Landscape Size Page
\setlength{\textwidth}{9.5in}
\setlength{\textheight}{7in}%
}
% -----------------------------------------------------------------
% Font Stuff
\font\sixrm=cmr6
\font\sevenrm=cmr7
\font\eightrm=cmr8
\font\ninerm=cmr9
\font\tenrm=cmr10
\let\smallcmr=\sixrm
\let\titlefont=\eightrm
\def\devnmode{
\tolerance=10000
\pretolerance=10000
\normalbaselines
\hyphenchar\devnfont=-1 % do not hyphenate words using this font
%
% If using Frans's font, need to make punctuation chars active.
\iffrans
\specialsforfrans % turn this on for Frans' font only.
\fi
% \englfont % default font is english font.
\devnfont % default font is devanagari font.
}
% ------------------------------------------------------------------------
% Devanagari font macros
% sizes: normal < large < Large < LARGE < huge < Huge
% 10pt text
\def\normaldvng{
\iffrans
\font\devnfont=dvng10
\font\englfont=cmr10
\else
\font\devnfont=dnh at 12pt % size looks like 10pt
\font\englfont=cmbx10
\fi
\normalbaselineskip=15pt \devnmode}
% 10.95pt text
\def\largedvng{\iffrans \font\devnfont=dvng10 scaled\magstephalf
\font\englfont=cmr10 scaled\magstephalf
\else \font\devnfont=dnh at 14pt % size looks like 11pt
\font\englfont=cmbx10 scaled\magstephalf
\fi
\normalbaselineskip=16pt \devnmode}
% 12pt text
\def\Largedvng{\iffrans \font\devnfont=dvng10 scaled\magstep1
\font\englfont=cmr10 scaled\magstep1
\else \font\devnfont=dnh at 16pt % size looks like 12pt
\font\englfont=cmbx10 scaled\magstep1
\fi
\normalbaselineskip=18pt \devnmode}
% 14.4pt text
\def\LARGEdvng{\iffrans \font\devnfont=dvng10 scaled\magstep2 % 14.4pt
\font\englfont=cmr10 scaled\magstep2
\else \font\devnfont=dnh at 19pt % size looks like 14.4 pt
\font\englfont=cmbx10 scaled\magstep2
\fi
\normalbaselineskip=21pt minus2pt \devnmode}
% 17.28pt text
\def\hugedvng{\iffrans \font\devnfont=dvng10 scaled\magstep3 % 17.28pt
\font\englfont=cmr10 scaled\magstep3
\else \font\devnfont=dnh at 22pt % size looks like 17.28 pt
\font\englfont=cmbx10 scaled\magstep3
\fi
\normalbaselineskip=25pt \devnmode}
% 20.74pt text
\def\Hugedvng{\iffrans \font\devnfont=dvng10 scaled\magstep4 % 20.74
\font\englfont=cmr10 scaled\magstep4
\else \font\devnfont=dnh at 25pt % size looks like 20.74 pt
\font\englfont=cmbx10 scaled\magstep4
\fi
\normalbaselineskip=28pt \devnmode}
% ------------------------------------------------------------------------
% (Must do \let\usedvng after normaldvng is defined...)
%
\let\usedvng=\normaldvng % default font size definition
\def\fransdvng{\franstrue\usedvng}
\def\postdvng{\fransfalse\usedvng}
% ------------------------------------------------------------------------
% Macro for song listings (verbatim mode---see page 381 of the TeXbook)
\def\obeyspaceslines{\def\par{\leavevmode\null\endgraf\penalty-500\relax}%
\obeylines \obeyspaces}
% actually, the TeXbook defn has problems -- according to comp.text.tex
% readers, I needed to add the \null and \relax above to make it correct!
% otherwise TeX will eat up any number that starts a line!!!!!
%{\obeyspaces\global\let =\ } % TeX sets space = "\space", change it to "\ "
{\obeyspaces\global\let =~} % use this for a non-breaking space
\def\threedots{{\englfont%
\leavevmode\hbox{\hskip2pt .\hskip2pt .\hskip2pt .\hskip2pt}}}
% For Frans's devanagari font, make punctuation chars that are absent from
% the font active characters, and define them to use the roman font punctuation.
% These characters have to be made special
% NO NEED TO DO THIS FOR THE PostScript Devnac font...
\def\specialsforfrans{%
\catcode`\(=\active
\catcode`\,=\active
\catcode`\)=\active
\catcode`\:=\active
\catcode`\;=\active
\catcode`\!=\active
\catcode`\?=\active
\catcode`\'=\active
\catcode`\"=\active
\catcode`\/=\active
\catcode`\|=\active%
}
% define the commands for the punctuations
{\specialsforfrans
\gdef,{{\englfont\char`\,}}
\gdef({{\englfont\char`\(}}
\gdef){{\englfont\char`\)}}
\gdef:{{\englfont\char`\:}}
\gdef;{{\englfont\char`\;}}
\gdef!{{\englfont\char`\!}}
\gdef?{{\englfont\char`\?}}
\gdef'{{\englfont\char`\'}}
\gdef"{{\englfont\char`\"}}
\gdef/{{\englfont\char`\/}}
\gdef|{.}
% CANNOT do the same for - (numbers like kern-0.3 get screwed up!)
% \catcode`\-=\active % NOTE: this implies that minus cannot be used (no numbers)!
% \def-{{\englfont\char`\-}} % DONT EVER TURN THIS ON!
% Therefore, have to use \- in the input song
% Similarly, cannot use . in input text (to get roman period)
% Use \. instead.
}
% Frans's Font does not have -, but cannot make - an active character,
% so you must use \- to get a dash (same goes for . (dot) use \. instead).
% For PostScript out, the hdr.ips defines a \- procedure, so all works
% there too..... (IF your PostScript intepretor accepts \ in a name!)
% See the comments regarding "specialsforfrans" in this file to see how
% other punctuation characters are handled for Frans's devnag font...
% ------------------
%
% ------ definitions for song headings, etc ------
\def\fileinfo{%
\ifx\songfile\undefined % songfile is defined when multiple
% .s files are combined by "isongcat" program.
\ifx\jobname\undefined
\rightline{\hbox to 120pt{\hfill\smallcmr ITRANS Song Book}}%
\else
\rightline{\hbox to 120pt{\smallcmr ITRANS Song Book:\hfill{\jobname}.s}}%
\fi
\else
\rightline{\hbox to 120pt{\smallcmr ITRANS Song Book:\hfill{\songfile}}}%
\fi
}
% songtitle - use if needed. Invoke this after a \startsong statement
% Assumes that both \startsong and \songtitle lines in the input text
% do not contain a % at the end....
\def\stitle#1{} % unused today...
\def\film#1{\def\vvfilm{#1}}
\def\starring#1{}
\def\singer#1{\def\vvsinger{#1}}
\def\lyrics#1{\def\vvlyrics{#1}}
\def\music#1{\def\vvmusic{#1}}
\def\printtitle{{% print out vvfilm, vvsinger, vvlyrics, vvmusic
\ifx\vvfilm\undefined \def\vvfilm{} \fi
\ifx\vvsinger\undefined \def\vvsinger{} \fi
\ifx\vvlyrics\undefined \def\vvlyrics{} \fi
\ifx\vvmusic\undefined \def\vvmusic{} \fi
\vskip3pt
\baselineskip=0pt% local def only, using 2 {'s to define \printtitle..
%
% Now, print out legend only if atleast one of the args is non-{}
\def\vvnonempty{1} % initialize non-empty to TRUE
\ifx\vvfilm\empty \else\def\vvnonempty{0}\fi % check film non-empty
\ifx\vvsinger\empty \else\def\vvnonempty{0}\fi % check singers
\ifx\vvlyrics\empty \else\def\vvnonempty{0}\fi % check lyrics
\ifx\vvmusic\empty \else\def\vvnonempty{0}\fi % check music
% if any args present, print out legend:
\nobreak
\if0\vvnonempty
\setbox0=\hbox{\titlefont {\smallcmr film:} \vvfilm%
\quad{\smallcmr singer:} \vvsinger%
\quad{\smallcmr lyrics:} \vvlyrics%
\quad{\smallcmr music:} \vvmusic}%
\ifdim\wd0>\hsize
% too large, split into two lines
\hbox to\hsize{\titlefont {\smallcmr film:} \vvfilm%
\quad{\smallcmr singer:} \vvsinger\hfill}%
\vskip2pt
\hbox to\hsize{\titlefont {\smallcmr lyrics:} \vvlyrics%
\quad{\smallcmr music:} \vvmusic\hfill}%
\else
\hbox to\hsize{\titlefont {\smallcmr film:} \vvfilm%
\hfill{\smallcmr singer:} \vvsinger%
\hfill{\smallcmr lyrics:} \vvlyrics%
\hfill{\smallcmr music:} \vvmusic\hfill}%
\fi
\fi
\nobreak
}}% printtitle
% ------------------------------------------------
%%%%%%%%%%%%% Shrisha Rao's macros %%%%%%%%%%%%%%
\def\ldq{{\englfont ``\hskip+0.1em}} % Avinash Chopde's definitions
\def\rdq{{\englfont ''}} % to make quotes possible.
\def\ast{{\englfont *}} % defined to use an asterisk
\def\dash{{\englfont ---}} % defined to use a long dash
\def\spl{{\englfont \S}} % defined to use a special symbol
\def\lsq{{\englfont `\hskip+0.1em}} % single open-quote
\def\rsq{{\englfont '}} % single close-quote
\def\?{{\englfont ?}} % defined to use a question-mark
%%%%%%%%%%%%% End of Shrisha Rao's macros %%%%%%%%%%%%%%
% ------------------------------------------------
\def\startsong{\bgroup
\def\-{{\englfont -}}%
\def\.{{\englfont .}}%
\usedvng % use whatever font the user wants...default normaldvng
\englfont % usedvng makes default font indian, restore english font
\parindent=7pt%
\obeyspaceslines}
\def\endsong{%
\nobreak
\vskip 9pt plus1fill % fill this page if no more material available
\fileinfo\smallskip
\hrule height0.4pt%
\egroup
}
% ----------------------- End of idevn.tex ------------------------
|