diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledmac.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/reledmac/reledmac.dtx | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx index feab9ddca38..5ee3c68d709 100644 --- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx +++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx @@ -482,6 +482,8 @@ % \changes{v2.22.1}{2017/07/07}{Compatibility with new version of \protect\reledpar.} % \changes{v2.22.1}{2017/07/07}{Fix bug with some commands inside \protect\cs{sameword}.} % \changes{v2.22.2}{2017/07/17}{Do not print footnotes at the first run.} +% \changes{v2.23.0}{2017/07/31}{Add \protect\option{swcaseinsensitive} option} +% \changes{v2.23.0}{2017/07/31}{Optimisation of the code added on v2.22.2 to not print footnotes at the first run.} % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} % @@ -770,6 +772,7 @@ % \item The option does not change the default \LaTeX auxiliary files (.aux, .toc, \ldots). % \end{enumerate} % \item[eledmac-compat] help to migrate from \eledmac to \reledmac (see \reff{eledmac-compat}). +% \item[swcaseinsensitive] make \cs{sameword} command case insensitive. % \item[nopenalties] must be called in some cases when using paragraphed endnotes (\reff{nopenalties)} % \item[nopbinverse] prevents page break within verse environment. % \item[noquotation] by default, the quotation environment is redefined within numbered text. You can disable this redefinition with \verb|noquotation| (see \reff{noquotation}). @@ -1541,6 +1544,12 @@ % \end{verbatim} % In this example, \verb+aut+ will be followed, in the critical note, by the exponent \verb+2+ if it is printed in the same line as the first \verb+aut+, but it will not if it is printed in a different line. The number is printed only after the second run. % +% \subsubsection{Case setting} +% By default, \cs{sameword} is sensitive to the case. E.g. \enquote{foo} is considered as a different word to \enquote{Foo}. +% +% You can use the \option{swcaseinsensitive} when loading the package to make \cs{sameword} insensitive to the case, i.e. +% to consider \enquote{foo} as identical \enquote{Foo}. +% % \subsubsection{Notes about input encoding with UTF-8 processor} % % If you use UTF-8 processor, like \XeLaTeX\ or \LuaLaTeX, there should not be any glitches. @@ -4021,7 +4030,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2017/07/07 v2.22.1 typesetting critical editions]% +\ProvidesPackage{reledmac}[2017/07/31 v2.23.0 typesetting critical editions]% % \end{macrocode} % % \subsection{Package options} @@ -4123,6 +4132,11 @@ \DeclareOptionX{auxdir}{% \xdef\l@auxdir{#1/}% }% + +\newif\ifsw@caseinsensitive% +\DeclareOptionX{swcaseinsensitive}{% + \sw@caseinsensitivetrue% +}% % \end{macrocode} % We use the starred form of \protect\cs{ProcessOptionsX} which executes options in % the order listed in the source file: class options, then listed package @@ -6764,7 +6778,7 @@ % It is written in the file list. % If we process a line-list file which used a older version, that means the commands used inside are deprecated, and we can't use them. % \begin{macrocode} -\newcommand{\this@line@list@version}{6}% +\newcommand{\this@line@list@version}{7}% % \end{macrocode} % \end{macro} % \begin{macro}{\line@list@stuff} @@ -6776,8 +6790,11 @@ \newcommand*{\line@list@stuff}[1]{% % \end{macrocode} % First, define a toggle set to true when we are not in the first run. - \global\newtoggle{notfirstrun@#1}% % \begin{macrocode} + \global\newtoggle{notfirstrun@#1}% + \IfFileExists{\l@auxdir#1}% + {\global\toggletrue{notfirstrun@#1}}% + {\global\togglefalse{notfirstrun@#1}}% % \end{macrocode} % Use the commands of the previous section to interpret the % line-list file from the last run. @@ -6798,7 +6815,6 @@ \global\first@linenum@out@false% \immediate\openout\linenum@out=\l@auxdir#1\relax% \immediate\write\linenum@out{\string\line@list@version{\this@line@list@version}}% - \immediate\write\linenum@out{\string\global\string\toggletrue{notfirstrun@#1}}% \ifl@dpaging% \immediate\write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}% \fi% @@ -6814,7 +6830,6 @@ \closeout\linenum@out% \openout\linenum@out=\l@auxdir#1\relax% \write\linenum@out{\string\line@list@version{\this@line@list@version}}% - \protected@write\linenum@out{}{\string\global\string\toggletrue{notfirstrun@#1}}% \ifl@dpaging% \write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}% \fi% @@ -7800,11 +7815,20 @@ \let\textsc\@firstofone% \let\framebox\@firstofone% % \end{macrocode} -%. \begin{macrocode} +% Using case sensibility option. +% \begin{macrocode} + \ifsw@caseinsensitive% + \def\@tmpa##1{\lowercase{##1}}% + \else% + \def\@tmpa##1{##1}% + \fi% +% \end{macrocode} +% And now, define \cs{sw@txt}. +% \begin{macrocode} \ifxetex% - \xdef\sw@txt{#1}% + \@tmpa{\xdef\sw@txt{#1}}% \else% - \expandafter\xdef\expandafter\sw@txt\expandafter{\detokenize{#1}}% + \@tmpa{\expandafter\xdef\expandafter\sw@txt\expandafter{\detokenize{#1}}}% \fi% \endgroup% }% |