| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% File: linguistix-english.dtx |
| 4 |
% |
| 5 |
% ---------------------------------------------------------- |
| 6 |
% The LaTeX bundle LinguisTiX v1.0 |
| 7 |
% Copyright © 2025, 2026 निरंजन |
| 8 |
% |
| 9 |
% This program is free software: you can redistribute it |
| 10 |
% and/or modify it under the terms of the GNU General Public |
| 11 |
% License as published by the Free Software Foundation, |
| 12 |
% either version 3 of the License, or (at your option) any |
| 13 |
% later version. |
| 14 |
% |
| 15 |
% This program is distributed in the hope that it will be |
| 16 |
% useful, but WITHOUT ANY WARRANTY; without even the implied |
| 17 |
% warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 18 |
% PURPOSE. See the GNU General Public License for more |
| 19 |
% details. |
| 20 |
% |
| 21 |
% You should have received a copy of the GNU General Public |
| 22 |
% License along with this program. If not, see |
| 23 |
% <https://www.gnu.org/licenses/>. |
| 24 |
% ---------------------------------------------------------- |
| 25 |
% |
| 26 |
% \fi |
| 27 |
% \iffalse |
| 28 |
%<*driver> |
| 29 |
\documentclass{l3doc} |
| 30 |
\usepackage{linguistix} |
| 31 |
\usepackage{xcolor} |
| 32 |
\usepackage{fontawesome5} |
| 33 |
\usepackage{hyperxmp} |
| 34 |
\usepackage[verbose=silent]{microtype} |
| 35 |
\usepackage{cleveref} |
| 36 |
\linguistix{old style one,languages={english,marathi}} |
| 37 |
|
| 38 |
\setquotestyle{english} |
| 39 |
|
| 40 |
\colorlet{lngxredcolor}{red!50!black} |
| 41 |
\colorlet{lngxgreencolor}{green!50!black} |
| 42 |
\colorlet{lngxbluecolor}{blue!50!black} |
| 43 |
|
| 44 |
\urlstyle{tt} |
| 45 |
|
| 46 |
\hypersetup{% |
| 47 |
unicode,% |
| 48 |
colorlinks,% |
| 49 |
linkcolor = {lngxredcolor}, |
| 50 |
citecolor = {lngxgreencolor}, |
| 51 |
urlcolor = {lngxbluecolor}, |
| 52 |
pdftitle = {linguistix-english},% |
| 53 |
pdfauthor = {निरंजन},% |
| 54 |
pdfsubject = {% |
| 55 |
English with LinguisTiX.% |
| 56 |
},% |
| 57 |
pdfcreator = {निरंजन},% |
| 58 |
pdfkeywords = {Linguistics, LaTeX},% |
| 59 |
pdfcopyright = {% |
| 60 |
The LaTeX bundle LinguisTiX\textLF |
| 61 |
Copyright © 2025, 2026 निरंजन\textLF |
| 62 |
This program is free software: you can redistribute it |
| 63 |
and/or modify it under the terms of the GNU General |
| 64 |
Public License as published by the Free Software |
| 65 |
Foundation, either version 3 of the License, or (at your |
| 66 |
option) any later version.% |
| 67 |
},% |
| 68 |
pdflicenseurl = {gnu.org/licenses/gpl-3.0.html}% |
| 69 |
}% |
| 70 |
|
| 71 |
\makeatletter |
| 72 |
|
| 73 |
\setlength{\columnsep}{2pc} |
| 74 |
\setlength{\columnseprule}{0.2pt} |
| 75 |
|
| 76 |
\makeatother |
| 77 |
|
| 78 |
\colorlet{lngxpurplecolor}{blue!50!red} |
| 79 |
|
| 80 |
\def\lngxtval{% |
| 81 |
\begingroup |
| 82 |
\color{lngxredcolor} |
| 83 |
true% |
| 84 |
\endgroup |
| 85 |
\,|\,false% |
| 86 |
} |
| 87 |
|
| 88 |
\def\lngxfval{% |
| 89 |
true% |
| 90 |
\begingroup |
| 91 |
\color{lngxredcolor} |
| 92 |
\,|\,false% |
| 93 |
\endgroup |
| 94 |
} |
| 95 |
|
| 96 |
\ExplSyntaxOn |
| 97 |
\msg_redirect_name:nnn { l3doc } |
| 98 |
{ foreign-internal } |
| 99 |
{ none } |
| 100 |
\ExplSyntaxOff |
| 101 |
|
| 102 |
\makeatletter |
| 103 |
\NewDocumentCommand \supportfootnote { +m } {% |
| 104 |
\begingroup |
| 105 |
\def\thefootnote{}% |
| 106 |
\let\@makefntext\relax |
| 107 |
\def\Hy@Warning##1{}% |
| 108 |
\footnotetext{% |
| 109 |
\hspace*{-\parindent}% |
| 110 |
#1% |
| 111 |
}% |
| 112 |
\endgroup |
| 113 |
} |
| 114 |
\makeatother |
| 115 |
|
| 116 |
\begin{document} |
| 117 |
\DocInput{\jobname.dtx} |
| 118 |
\end{document} |
| 119 |
%</driver> |
| 120 |
% \fi |
| 121 |
% \title{\lngxenglishlogo} |
| 122 |
% \author{निरंजन} |
| 123 |
% \date{^^A |
| 124 |
% \today\ (v1.0)\\[1ex]^^A |
| 125 |
% {^^A |
| 126 |
% \small\faIcon{home}\quad |
| 127 |
% \url{^^A |
| 128 |
% https://ctan.org/pkg/linguistix^^A |
| 129 |
% }\\[0.5ex]^^A |
| 130 |
% \small\faIcon{git-alt}\quad |
| 131 |
% \url{^^A |
| 132 |
% https://puszcza.gnu.org.ua/projects/linguistix^^A |
| 133 |
% }\\[0.5ex]^^A |
| 134 |
% \small\faIcon[regular]{comments}\quad |
| 135 |
% \url{^^A |
| 136 |
% https://matrix.to/\#/\#linguistix:matrix.org^^A |
| 137 |
% }^^A |
| 138 |
% }^^A |
| 139 |
% } |
| 140 |
% |
| 141 |
% \maketitle |
| 142 |
% |
| 143 |
% \supportfootnote{^^A |
| 144 |
% The \lngxpkg\ bundle |
| 145 |
% |
| 146 |
% \noindent |
| 147 |
% Copyright © 2025, 2026 निरंजन |
| 148 |
% |
| 149 |
% This program is free software: you can redistribute it |
| 150 |
% and/or modify it under the terms of the \textsc{gnu} |
| 151 |
% General Public License as published by the Free Software |
| 152 |
% Foundation, either version 3 of the License, or (at your |
| 153 |
% option) any later version. |
| 154 |
% |
| 155 |
% This program is distributed in the hope that it will be |
| 156 |
% useful, but \emph{\textbf{without any warranty}}; |
| 157 |
% without even the implied warranty of |
| 158 |
% \emph{\textbf{merchantability}} or \emph{\textbf{fitness |
| 159 |
% for a particular purpose}}. See the \textsc{gnu} General |
| 160 |
% Public License for more details. |
| 161 |
% |
| 162 |
% You should have received a copy of the \textsc{gnu} |
| 163 |
% General Public License along with this program. If not, |
| 164 |
% see \url{https://www.gnu.org/licenses/}.^^A |
| 165 |
% } |
| 166 |
% |
| 167 |
% \section*{English} |
| 168 |
% |
| 169 |
% \begin{macrocode} |
| 170 |
%<*english> |
| 171 |
\ProvidesExplPackage{linguistix-english} |
| 172 |
{2026-05-15} |
| 173 |
{v1.0} |
| 174 |
{English} |
| 175 |
% \end{macrocode} |
| 176 |
% When English language is active, it should not replace the |
| 177 |
% set of characters that are categorized as |
| 178 |
% \enquote{letters} by \TeX. Thus I load |letters| as an |
| 179 |
% additional parameter to the option |onchar|. |
| 180 |
% \begin{macrocode} |
| 181 |
|
| 182 |
\babelprovide [ |
| 183 |
onchar = { ids~ fonts~ letters } |
| 184 |
] { english } |
| 185 |
% \end{macrocode} |
| 186 |
% Here I will add the code that is executed whenever |
| 187 |
% \cs{selectlanguage}\marg{english} is issued. The socket |
| 188 |
% for native numbering is used here. |
| 189 |
% \begin{macrocode} |
| 190 |
|
| 191 |
\addto { \extrasenglish } { |
| 192 |
\socket_use:n { lngx / native-numbering } |
| 193 |
% \end{macrocode} |
| 194 |
% \cs{lngx_misc_reset:} is used in order to reset the |
| 195 |
% changes made by other languages. |
| 196 |
% \begin{macrocode} |
| 197 |
\lngx_misc_reset: |
| 198 |
} |
| 199 |
% \end{macrocode} |
| 200 |
% I test if “english” is the main language of the document. |
| 201 |
% If no, then it needs to set the suitable fonts using the |
| 202 |
% \pkg{babel}-macros that set fonts for other languages. I |
| 203 |
% load the identical fonts that are loaded if it was the |
| 204 |
% default language. In fact, that is why if it is the |
| 205 |
% default language, no changes are made, because the |
| 206 |
% necessary settings are already done by \lngxfontslogo. |
| 207 |
% \begin{macrocode} |
| 208 |
|
| 209 |
\tl_if_eq:NnTF \g_lngx_main_language_tl { english } { |
| 210 |
\lngx_set_keys:n { old~ style~ numbers } |
| 211 |
} { |
| 212 |
\lngx_other_main_font:nnn { english } { |
| 213 |
\bool_if:NT \g_lngx_old_style_bool { |
| 214 |
Numbers = { OldStyle }, |
| 215 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 216 |
CharacterVariant = { 6 } |
| 217 |
} |
| 218 |
} |
| 219 |
} { NewCM10-Book.otf } |
| 220 |
\lngx_other_sans_font:nnn { english } { |
| 221 |
\bool_if:NT \g_lngx_old_style_bool { |
| 222 |
Numbers = { OldStyle }, |
| 223 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 224 |
CharacterVariant = { 6 } |
| 225 |
} |
| 226 |
} |
| 227 |
} { NewCMSans10-Book.otf } |
| 228 |
\lngx_other_mono_font:nnn { english } { |
| 229 |
\bool_if:NT \g_lngx_old_style_bool { |
| 230 |
Numbers = { OldStyle }, |
| 231 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 232 |
CharacterVariant = { 6 } |
| 233 |
} |
| 234 |
} |
| 235 |
} { NewCMMono10-Book.otf } |
| 236 |
} |
| 237 |
%</english> |
| 238 |
% \end{macrocode} |
| 239 |
% |
| 240 |
% \section*{British English} |
| 241 |
% |
| 242 |
% \begin{macrocode} |
| 243 |
%<*british> |
| 244 |
\ProvidesExplPackage{linguistix-british} |
| 245 |
{2026-05-15} |
| 246 |
{v1.0} |
| 247 |
{British English} |
| 248 |
% \end{macrocode} |
| 249 |
% When English language is active, it should not replace the |
| 250 |
% set of characters that are categorised as |
| 251 |
% \enquote{letters} by \TeX. Thus I load |letters| as an |
| 252 |
% additional parameter to the option |onchar|. |
| 253 |
% \begin{macrocode} |
| 254 |
|
| 255 |
\babelprovide [ |
| 256 |
onchar = { ids~ fonts~ letters } |
| 257 |
] { british } |
| 258 |
% \end{macrocode} |
| 259 |
% Here I will add the code that is executed whenever |
| 260 |
% \cs{selectlanguage}\marg{british} is issued. The socket |
| 261 |
% for native numbering is used here. |
| 262 |
% \begin{macrocode} |
| 263 |
|
| 264 |
\addto { \extrasbritish } { |
| 265 |
\socket_use:n { lngx / native-numbering } |
| 266 |
% \end{macrocode} |
| 267 |
% \cs{lngx_misc_reset:} is used in order to reset the |
| 268 |
% changes made by other languages. |
| 269 |
% \begin{macrocode} |
| 270 |
\lngx_misc_reset: |
| 271 |
} |
| 272 |
% \end{macrocode} |
| 273 |
% I test if ‘british’ is the main language of the document. |
| 274 |
% If no, then it needs to set the suitable fonts using the |
| 275 |
% \pkg{babel}-macros that set fonts for other languages. I |
| 276 |
% load the identical fonts that are loaded if it was the |
| 277 |
% default language. In fact, that is why if it is the |
| 278 |
% default language, no changes are made, because the |
| 279 |
% necessary settings are already done by \lngxfontslogo. |
| 280 |
% \begin{macrocode} |
| 281 |
|
| 282 |
\tl_if_eq:NnTF \g_lngx_main_language_tl { british } { |
| 283 |
\lngx_set_keys:n { old~ style~ numbers } |
| 284 |
} { |
| 285 |
\lngx_other_main_font:nnn { british } { |
| 286 |
\bool_if:NT \g_lngx_old_style_bool { |
| 287 |
Numbers = { OldStyle }, |
| 288 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 289 |
CharacterVariant = { 6 } |
| 290 |
} |
| 291 |
} |
| 292 |
} { NewCM10-Book.otf } |
| 293 |
\lngx_other_sans_font:nnn { british } { |
| 294 |
\bool_if:NT \g_lngx_old_style_bool { |
| 295 |
Numbers = { OldStyle }, |
| 296 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 297 |
CharacterVariant = { 6 } |
| 298 |
} |
| 299 |
} |
| 300 |
} { NewCMSans10-Book.otf } |
| 301 |
\lngx_other_mono_font:nnn { british } { |
| 302 |
\bool_if:NT \g_lngx_old_style_bool { |
| 303 |
Numbers = { OldStyle }, |
| 304 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 305 |
CharacterVariant = { 6 } |
| 306 |
} |
| 307 |
} |
| 308 |
} { NewCMMono10-Book.otf } |
| 309 |
} |
| 310 |
%</british> |
| 311 |
% \end{macrocode} |
| 312 |
% |
| 313 |
% \section{American English} |
| 314 |
% |
| 315 |
% \begin{macrocode} |
| 316 |
%<*american> |
| 317 |
\ProvidesExplPackage{linguistix-american} |
| 318 |
{2026-05-15} |
| 319 |
{v1.0} |
| 320 |
{American English} |
| 321 |
% \end{macrocode} |
| 322 |
% When English language is active, it should not replace the |
| 323 |
% set of characters that are categorized as |
| 324 |
% \enquote{letters} by \TeX. Thus I load |letters| as an |
| 325 |
% additional parameter to the option |onchar|. |
| 326 |
% \begin{macrocode} |
| 327 |
|
| 328 |
\babelprovide [ |
| 329 |
onchar = { ids~ fonts~ letters } |
| 330 |
] { american } |
| 331 |
% \end{macrocode} |
| 332 |
% Here I will add the code that is executed whenever |
| 333 |
% \cs{selectlanguage}\marg{american} is issued. The socket |
| 334 |
% for native numbering is used here. |
| 335 |
% \begin{macrocode} |
| 336 |
|
| 337 |
\addto { \extrasamerican } { |
| 338 |
\socket_use:n { lngx / native-numbering } |
| 339 |
% \end{macrocode} |
| 340 |
% \cs{lngx_misc_reset:} is used in order to reset the |
| 341 |
% changes made by other languages. |
| 342 |
% \begin{macrocode} |
| 343 |
\lngx_misc_reset: |
| 344 |
} |
| 345 |
% \end{macrocode} |
| 346 |
% I test if “american” is the main language of the document. |
| 347 |
% If no, then it needs to set the suitable fonts using the |
| 348 |
% \pkg{babel}-macros that set fonts for other languages. I |
| 349 |
% load the identical fonts that are loaded if it was the |
| 350 |
% default language. In fact, that is why if it is the |
| 351 |
% default language, no changes are made, because the |
| 352 |
% necessary settings are already done by \lngxfontslogo. |
| 353 |
% \begin{macrocode} |
| 354 |
|
| 355 |
\tl_if_eq:NnF \g_lngx_main_language_tl { american } { |
| 356 |
\lngx_other_main_font:nee { american } { |
| 357 |
\bool_if:NT \g_lngx_old_style_bool { |
| 358 |
Numbers = { OldStyle }, |
| 359 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 360 |
CharacterVariant = { 6 } |
| 361 |
} |
| 362 |
} |
| 363 |
} { NewCM10-Book.otf } |
| 364 |
\lngx_other_sans_font:nee { american } { |
| 365 |
\bool_if:NT \g_lngx_old_style_bool { |
| 366 |
Numbers = { OldStyle }, |
| 367 |
\bool_if:NT \g_lngx_old_style_one_bool { |
| 368 |
CharacterVariant = { 6 } |
| 369 |
} |
| 370 |
} |
| 371 |
} { NewCMSans10-Book.otf } |
| 372 |
\lngx_other_mono_font:nnn { american } { } { |
| 373 |
NewCMMono10-Book.otf |
| 374 |
} |
| 375 |
} |
| 376 |
%</american> |
| 377 |
% \end{macrocode} |
| 378 |
% \Finale |