|
103 | 103 | \DeclareTranslation{English}{cnltx-introduced}{since} |
104 | 104 | \DeclareTranslation{english}{cnltx-default}{Initial} |
105 | 105 |
|
| 106 | +\patchcmd\cnltx@tableofcontents{\RaggedRight}{\raggedright}{}{} |
| 107 | + |
106 | 108 | \renewcommand*\arg[1]{\textcolor{argument}{\code{#1}}} |
107 | 109 | \renewcommand*\meta[1]{% |
108 | 110 | $\langle$\textcolor{meta}{{\argumentformat#1\/}}$\rangle$% |
|
119 | 121 | \endgroup |
120 | 122 | } |
121 | 123 |
|
| 124 | +\colorlet{module}{cnltxred} |
122 | 125 | \colorlet{property}{cnltxblue} |
123 | 126 | \newidxcmd\property{\code{\textcolor{property}{#1}}}[ (property)] |
124 | 127 | \newrobustcmd*\prop{\@ifstar{\cnltx@prop@star}{\cnltx@prop@nostar}} |
|
272 | 275 | #1% |
273 | 276 | } |
274 | 277 |
|
275 | | -\newcommand*\acroman@readoptions[1]{% |
276 | | - \catcode`\^^M=13 |
277 | | - \acroman@read@options{#1}% |
278 | | -} |
279 | | - |
280 | | -\begingroup |
281 | | -\catcode`\^^M=13 |
282 | | -\gdef\acroman@read@options#1#2^^M{% |
283 | | - \endgroup |
284 | | - \ifblank{#2}{}{\acroman@read@options@#2}% |
285 | | - #1% |
286 | | - \XSIMfilewritestart*{\jobname.tmp}% |
287 | | -}% |
288 | | -\endgroup |
289 | | -\def\acroman@read@options@[#1]{\pgfqkeys{/cnltx}{#1}} |
290 | | - |
291 | | -\RenewDocumentEnvironment{sourcecode}{} |
292 | | - {% |
293 | | - \begingroup |
294 | | - \acroman@readoptions{% |
295 | | - \setlength\cnltx@sidebysidewidth |
296 | | - {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}% |
297 | | - \expanded{% |
298 | | - \noexpand\lstset{ |
299 | | - style=cnltx, |
300 | | - \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} } |
301 | | - {linewidth=\cnltx@sidebysidewidth,}{}% |
302 | | - \expandonce\cnltx@local@listings@options |
303 | | - }% |
304 | | - }% |
305 | | - \XSIMgobblechars{2}% |
| 278 | +\RenewDocumentEnvironment{sourcecode}{!o}{% |
| 279 | + \setlength\cnltx@sidebysidewidth |
| 280 | + {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}% |
| 281 | + \expanded{% |
| 282 | + \noexpand\lstset{ |
| 283 | + style=cnltx, |
| 284 | + \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} } |
| 285 | + {linewidth=\cnltx@sidebysidewidth,}{}% |
| 286 | + \expandonce\cnltx@local@listings@options |
306 | 287 | }% |
307 | | - } |
308 | | - {% |
309 | | - \XSIMfilewritestop |
310 | | - \cnltxcode[breakable]% |
311 | | - \lstinputlisting[style=cnltx]{\jobname.tmp}% |
312 | | - \endcnltxcode |
313 | | - } |
| 288 | + }% |
| 289 | + \XSIMgobblechars{2}% |
| 290 | + \IfValueT{#1}{\pgfqkeys{/cnltx}{#1}}% |
| 291 | + \IfNoValueTF{#1} |
| 292 | + {\XSIMfilewritestart*{\jobname.tmp}} |
| 293 | + {\XSIMfilewritestart{\jobname.tmp}}% |
| 294 | +}{% |
| 295 | + \XSIMfilewritestop |
| 296 | + \cnltxcode[breakable]% |
| 297 | + \lstinputlisting[style=cnltx]{\jobname.tmp}% |
| 298 | + \endcnltxcode |
| 299 | +} |
314 | 300 |
|
315 | 301 | \RenewDocumentEnvironment{example}{!o}{% |
316 | 302 | \setlength\cnltx@sidebysidewidth |
|
329 | 315 | {\XSIMfilewritestart*{\jobname.tmp}} |
330 | 316 | {\XSIMfilewritestart{\jobname.tmp}}% |
331 | 317 | }{% |
332 | | - \XSIMfilewritestop |
333 | | - \ifbool{cnltx@sidebyside} |
334 | | - {% |
335 | | - \cnltxcode |
336 | | - \noindent |
337 | | - \minipage[c]{\cnltx@sidebysidewidth}% |
338 | | - \cnltx@pre@source@hook |
339 | | - \lstinputlisting[style=cnltx] {\jobname.tmp}% |
340 | | - \cnltx@after@source@hook |
341 | | - \endminipage\hfill |
342 | | - \minipage[c]{\cnltx@sidebysidewidth}% |
343 | | - \cnltx@pre@example@hook |
344 | | - \input {\jobname.tmp}% |
345 | | - \cnltx@after@example@hook |
346 | | - \endminipage |
347 | | - } |
348 | | - {% |
349 | | - \cnltxcode[breakable]% |
350 | | - \cnltx@pre@source@hook |
351 | | - \lstinputlisting{\jobname.tmp}% |
352 | | - \cnltx@after@source@hook |
353 | | - \tcblower |
354 | | - \cnltx@pre@example@hook |
355 | | - \input {\jobname.tmp}% |
356 | | - \cnltx@after@example@hook |
357 | | - }% |
358 | | - \endcnltxcode |
359 | | - } |
| 318 | + \XSIMfilewritestop |
| 319 | + \ifbool{cnltx@sidebyside}{% |
| 320 | + \cnltxcode |
| 321 | + \noindent |
| 322 | + \minipage[c]{\cnltx@sidebysidewidth}% |
| 323 | + \cnltx@pre@source@hook |
| 324 | + \lstinputlisting[style=cnltx] {\jobname.tmp}% |
| 325 | + \cnltx@after@source@hook |
| 326 | + \endminipage\hfill |
| 327 | + \minipage[c]{\cnltx@sidebysidewidth}% |
| 328 | + \cnltx@pre@example@hook |
| 329 | + \input {\jobname.tmp}% |
| 330 | + \cnltx@after@example@hook |
| 331 | + \endminipage |
| 332 | + }{% |
| 333 | + \cnltxcode[breakable]% |
| 334 | + \cnltx@pre@source@hook |
| 335 | + \lstinputlisting{\jobname.tmp}% |
| 336 | + \cnltx@after@source@hook |
| 337 | + \tcblower |
| 338 | + \cnltx@pre@example@hook |
| 339 | + \input {\jobname.tmp}% |
| 340 | + \cnltx@after@example@hook |
| 341 | + }% |
| 342 | + \endcnltxcode |
| 343 | +} |
360 | 344 |
|
361 | 345 | \RequirePackage[ |
362 | 346 | backend=biber, |
|
430 | 414 | } |
431 | 415 |
|
432 | 416 | \NewAcroTemplate[list]{glossary}{% |
| 417 | + \acropreamble |
433 | 418 | \begin{description} |
434 | 419 | \acronymsmapF{% |
435 | 420 | \item[\sffamily\acrowrite{short}] \acrowrite{long}% |
436 | 421 | }% |
437 | 422 | { \item \AcroRerun }% |
438 | | - \end {description} |
| 423 | + \end{description} |
439 | 424 | } |
440 | 425 |
|
441 | 426 | % ---------------------------------------------------------------------------- |
|
540 | 525 |
|
541 | 526 | \pdfstringdefDisableCommands{% |
542 | 527 | \pdfdisable\template{#1}% |
543 | | - \pdfdisable\property{#1} |
| 528 | + \pdfdisable\property{#1}% |
| 529 | + \pdfdisable\module{#1}% |
544 | 530 | \pdfdisable\cs{\string\\#1}% |
545 | 531 | \pdfdisable\cmd{\string\\#1}% |
546 | 532 | \pdfdisable\option{#1}% |
|
0 commit comments