Debian Codegraph @

texmf-dist/doc/fonts/rit-fonts/rit-doc.sty

raw
1 %% File: 'rit-doc.sty'
2 %% (c) 2023-2025, CV Radhakrishnan <[email protected]> and
3 %% Rachana Inst Typography <[email protected]>
4 %%
5 %% This file has the LPPL maintenance status "maintained".
6 %%
7 %% The Current Maintainer of this work is the CV Radhakrishnan
8 %% ([email protected]).
9 %%
10 %% The list of all files belonging to the distribution is given in
11 %% the file `manifest.txt'.
12 %%
13 %%
14 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
15 \ProvidesPackage{rit-doc}[2023-06-01 v0.2
16 Extra definitions for TUGboat journal class (CVR)]
17 \newif\ifprint \printfalse
18 \newif\ifweb \webfalse
19 \newif\ifdoc \docfalse
20 \newif\ifcmr \cmrfalse
21 \newif\iflibertine \libertinefalse
22 \DeclareOption{print}{\global\printtrue\global\webfalse}
23 \DeclareOption{web}{\global\printfalse\global\webtrue}
24 \DeclareOption{doc}{\global\doctrue}
25 \DeclareOption{p}{\global\printtrue\global\webfalse}
26 \DeclareOption{w}{\global\printfalse\global\webtrue}
27 \DeclareOption{cmr}{\global\cmrtrue\global\libertinefalse}
28 \DeclareOption{lin}{\global\libertinetrue\global\cmrfalse}
29 \ExecuteOptions{web}
30 \ProcessOptions
31 %
32 \RequirePackage{acro}
33 \DeclareRobustCommand\myacro[1]{\FindAcFont\ac{#1}}
34 \DeclareAcronym{jwra}{short=JWRA,
35 long=JWRA,short-format=\small}
36 \DeclareAcronym{xml}{short=XML,
37 long=Extensible Markup Language,short-format=\small}
38 \DeclareAcronym{pdf}{short=PDF,
39 long=Portable Document Format,short-format=\small}
40 \DeclareAcronym{ctan}{short=CTAN,
41 long=Comprehensive \TeX{} Archive Network,short-format=\small}
42
43 %\RequirePackage[numbers,sort&compress]{natbib}
44 \RequirePackage{xspace}
45 \RequirePackage{enumitem,amsfonts}
46 \RequirePackage{etoolbox,expl3,xparse}
47 %
48 % luatexrenderer=none needed, if not characters
49 % in the upper planes will not be listed in fonttable
50 % using unicodefonttable.sty
51 \RequirePackage[luatexrenderer=none]{polyglossia}
52 \RequirePackage{xltxtra}
53 \RequirePackage[svgnames,dvipsnames]{xcolor}
54 \RequirePackage{booktabs,adjustbox}
55 %\RequirePackage{tcolobox}
56 %\tcbuselibrary{listings}
57 %\tcbset{listing engine=listings}
58 \ifprint
59 \colorlet{urlcolor}{black}
60 \colorlet{filecolor}{black}
61 \colorlet{linkcolor}{black}
62 \colorlet{citecolor}{black}
63 \colorlet{mla}{black}
64 \colorlet{mlb}{black}
65 \colorlet{itemcolor}{black}
66 \colorlet{scolor}{black}
67 \colorlet{cscolor1}{black}
68 \colorlet{cscolor2}{black}
69 \colorlet{cscolor3}{black}
70 \colorlet{cscolor4}{black}
71 \colorlet{stringcolor}{black}
72 \colorlet{idcolor}{black}
73 \colorlet{commentcolor}{black}
74 \colorlet{numcolor}{black}
75 \colorlet{rulecolor}{black}
76 \colorlet{lstcolor}{black}
77 \colorlet{lstbgcolor}{white}
78 \colorlet{strcolor}{black}
79 \colorlet{kwdcolor1}{black}
80 \colorlet{kwdcolor2}{black}
81 \colorlet{verbcolor}{black}
82 \colorlet{Mahogany}{black}
83 \colorlet{Blue}{black}
84 \colorlet{DarkBlue}{black}
85 \colorlet{black!20!cyan}{black}
86 \colorlet{blue!70}{black}
87 \colorlet{ForestGreen}{black}
88 \colorlet{BrickRed}{black}
89 \colorlet{DarkSlateGray}{black}
90 \colorlet{black!50}{black}
91 \colorlet{magenta}{black}
92 \colorlet{DarkViolet}{black}
93 \colorlet{DarkCyan}{black}
94 \colorlet{DarkGreen}{black}
95 \else
96 \colorlet{scolor}{black!60}
97 \colorlet{urlcolor}{blue!80}
98 \colorlet{filecolor}{black!70}
99 \colorlet{linkcolor}{blue!80}
100 \colorlet{citecolor}{ForestGreen}
101 \colorlet{mla}{DarkSlateGrey}
102 \colorlet{mlb}{LightSlateGrey}
103 \colorlet{itemcolor}{DarkSlateGrey}
104 \colorlet{cscolor1}{ForestGreen}
105 \colorlet{cscolor2}{Red!80}
106 \colorlet{cscolor3}{blue!80}
107 \colorlet{cscolor4}{black}
108 \colorlet{strcolor}{black}
109 \colorlet{idcolor}{brown}
110 \colorlet{commentcolor}{black!40}
111 \colorlet{numcolor}{black!80}
112 \colorlet{rulecolor}{black!30}
113 \colorlet{lstcolor}{DarkSlateGrey}
114 \colorlet{lstbgcolor}{white}
115 \colorlet{stringcolor}{orange}
116 \colorlet{kwdcolor1}{DarkGreen}
117 \colorlet{kwdcolor2}{violet}
118 \colorlet{verbcolor}{violet}
119 %
120 \fi
121 \RequirePackage[colorlinks=true]{hyperref}
122 \AtBeginDocument{\hypersetup{%xetex,
123 pdftitle={Fonts in Malayalam script by Rachana Institute of Typography},
124 pdfauthor={CV Radhakrishnan, KV Rajeesh and KH Hussain},
125 pdfsubject={Font development},
126 pdfkeywords={RIT; Font; Indic Scripts; Malayalam; MetaPost; FontForge},
127 bookmarksopen=true,
128 urlcolor={urlcolor},
129 citecolor={citecolor},
130 linkcolor={linkcolor},
131 filecolor={filecolor},
132 pdfcreator={LaTeX, ltugboat, hyperref and fontspec},
133 pdfproducer={XeTeX 0.99995 (TeX Live 2025)}}}
134 \ifprint
135 \setmonofont[Scale=.85]{LMMono10-Regular}
136 \tolerance=1000
137 \emergencystretch=1em
138 \hbadness=3500
139 \def\lstfont{\ttfamily\fontsize{8.6}{10.0}\selectfont}
140 \else
141 \defaultfontfeatures{Extension=.ttf,Path={./fonts/},}
142 \setmainfont[Script=Latin,Mapping=tex-text,
143 Ligatures=TeX,Numbers=OldStyle]{Linux-Libertine}[%
144 BoldFont={*-Bold},
145 ItalicFont={*-Italic},
146 BoldItalicFont={*-Bold-Italic},
147 SmallCapsFont={*},
148 UprightFont={*}]
149 \setmonofont[Ligatures=TeX,Scale=0.85]{MPLUSCodeLatin-Regular}
150 \newfontfamily\lstfont[Scale=.8]{MPLUSCodeLatin-Regular}
151 \tolerance=1000
152 \emergencystretch=1em
153 \fi
154
155 \newfontfamily\mlfont[Script=Malayalam,Mapping=tex-text,Color={mla},
156 HyphenChar="0000,Numbers=OldStyle]{RIT-Rachana-Regular}
157 [Extension=.ttf,Path={./fonts/}]
158 \let\rachana=\mlfont
159
160 \def\pbrk{\ifprint\linebreak\fi}
161 \def\wbrk{\ifweb\linebreak\fi}
162 \def\pkg#1{\texttt{#1}\xspace}
163 \def\verbatim@font{\normalfont\ttfamily\color{verbcolor}}
164
165 % do not use horribly squashed Unicode ellipses.
166 \ifx\tubdots\undefined \else \let\dots\tubdots \let\ldots\tubdots \fi
167
168 \RequirePackage[procnames]{listings}
169 \lstdefinestyle{inlinecode}{
170 basicstyle=\ttfamily\normalsize,
171 identifierstyle=\ttfamily\normalsize,
172 stringstyle=\ttfamily\normalsize,
173 commentstyle=\ttfamily\normalsize,
174 numberstyle=\ttfamily\normalsize,
175 keywordstyle={[0]\ttfamily\normalsize},
176 keywordstyle={[1]\ttfamily\normalsize},
177 keywordstyle={[2]\ttfamily\normalsize},
178 keywordstyle={[3]\ttfamily\normalsize},
179 keywordstyle={[4]\ttfamily\normalsize},
180 keywordstyle={[5]\ttfamily\normalsize},
181 }
182 \newcommand\inlinecode{\lstinline[style=inlinecode]}
183
184 \def\lstlistingnamestyle{\bfseries} % bold for "Listing 1".
185
186 \lstset{columns={flexible},
187 language={[LaTeX]TeX},
188 basicstyle=\lstfont\color{lstcolor},
189 %
190 moretexcs=[1]{bkauthor,bktitle,bktype,cpyear,bkcpright,%
191 bktitlebgcolor,bktitlefont,bktitleattrib,bktitlecolor,%
192 bktitlesep,bkauthorfont,bkauthorattrib,bkauthorcolor},
193 texcsstyle=[1]\lstfont\color{cscolor1},
194 %
195 moretexcs=[2]{section,remark,proof,begin,end,%
196 email,title,keywords,xmlpi,eqef,neqef,cite},
197 texcsstyle=[2]\lstfont\color{cscolor2},
198 %
199 moretexcs=[3]{colorlet,graphcoor,printcover,printimgcover,printgraphics},
200 texcsstyle=[3]\lstfont\color{cscolor3},
201 %
202 identifierstyle=\lstfont\color{idcolor},
203 stringstyle=\lstfont\color{strcolor},
204 commentstyle=\lstfont\color{commentcolor},
205 %
206 keywordstyle=[1]\lstfont\color{kwdcolor1},
207 morekeywords=[1]{document,frontmatter,abstract,keywords,keyword,%
208 equation,eqnarray,array,defn,thebibliography,}
209 keywordstyle=[2]{\lstfont\color{kwdcolor2}},
210 morekeywords=[2]{},
211 %
212 showstringspaces=false,
213 backgroundcolor=\color{lstbgcolor},
214 frame=single,
215 framerule=0pt,
216 framesep=0pt,
217 belowcaptionskip=12pt,
218 rulecolor=\color{rulecolor},
219 frame=leftline,
220 stepnumber=1,
221 numbersep=6pt,
222 % framesep=8pt,
223 % numbers=left,
224 numberstyle=\tiny\selectfont\color{numcolor},
225 % frameround=tttt,
226 % procnamekeys=[1]{},
227 % procnamestyle=[1]{\color{Maroon}\small},
228 % %
229 % procnamekeys=[2]{},
230 % procnamestyle={\color{blue}\bfseries\small},
231 xleftmargin=0pt,
232 xrightmargin=0in,
233 }
234
235 \ExplSyntaxOn
236 \RenewDocumentCommand \descriptionlabel { m }
237 {
238 \skip_horizontal:N \labelsep
239 \normalfont\normalsize\ttfamily\selectfont
240 \color{itemcolor} #1:
241 }
242 \def\tubsechook{\normalsize\color{scolor}}
243 \ExplSyntaxOff
244
245 % Dependent vowel signs of Malayalam
246 \def\vlA{\kern1pt\char "0D3E}
247 \def\vli{\char "0D3F}
248 \def\vlI{\char "0D40}
249 \def\vlu{\kern.1pt\char "0D41}
250 \def\vlU{\char "0D42}
251 \def\vlr{\char "0D43}
252 \def\vlR{\char "0D44}
253 \def\vle{\char "0D46}
254 \def\vlE{\char "0D47}
255 \def\vlau{\char "0D57}
256 \def\mlxx{\char "0D4D}
257 \def\mlya{\char "0D2F}
258 \def\mlra{\char "0D30}
259 \def\mlla{\char "0D32}
260 \def\mlva{\char "0D35}
261 \def\zwnj{\char "200C}
262 \def\zwj{\char "200D}
263 \def\nbsp{\char "00A0}
264 \def\dottc{\char "25CC}
265
266 \def\theorgname{Rachana Institute of Typography}
267 \def\theshortorg{\href{https://rachana.org.in}{rachana.org.in}}
268 \def\theshortpkg{\url{rachana.org.in}}
269 \def\orgname#1{\gdef\theorgname{#1}}
270 \def\shortorg#1{\gdef\theshortorg{#1}}
271 \def\shortpkg#1{\gdef\theshortpkg{#1}}
272
273 \ifdoc
274 \let\rtitlenexttopage\theorgname
275 \let\rtitlex\theshortorg
276 \let\midrititle\theshortpkg
277 \fi
278
279 \endinput
280
281 %
282 % End of file rit-doc.sty'
283 %