Skip to content

Commit

Permalink
Add \addcolonnonfrench to produce colon without leading space (#925)
Browse files Browse the repository at this point in the history
moewew committed Dec 21, 2019
1 parent 98acb26 commit f6b0817
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/latex/biblatex/CHANGES.md
Original file line number Diff line number Diff line change
@@ -21,6 +21,9 @@
`\printunit` is needed instead of `\setunit` to stop subsequent
`\setunit`s from overriding `\intitlepunct` in case of missing
fields.
- Added `\addcolonnonfrench` to produce a colon without leading
space that might be added by `babel` or `polyglossia`'s French
language modules.
- Added `\mautocite` and `\Mautocite`.

# RELEASE NOTES FOR VERSION 3.14
5 changes: 5 additions & 0 deletions doc/latex/biblatex/biblatex.tex
Original file line number Diff line number Diff line change
@@ -10910,6 +10910,10 @@ \subsubsection{Adding Punctuation}

Adds a colon unless it is preceded by a comma, a semicolon, another colon, or a period.

\csitem{addcolonnonfrench}

Like \cmd{addcolon}, but the command tries to suppress the space that might be added before the colon by \sty{babel}/\sty{polyglossia}.

\csitem{addperiod}

Adds a period unless it is preceded by an abbreviation dot or any other punctuation mark. This command may also be used to turn a previously inserted abbreviation dot into a period, for example at the end of a sentence.
@@ -14141,6 +14145,7 @@ \section{Revision History}

\begin{changelog}
\begin{release}{3.15}{20??-??-??}
\item Added \cmd{addcolonnonfrench}\see{aut:pct:pct}
\item Added \cmd{mautocite} and \cmd{Mautocite}\see{use:cit:mct}
\end{release}
\begin{release}{3.14}{2019-12-01}
12 changes: 11 additions & 1 deletion tex/latex/biblatex/biblatex.sty
Original file line number Diff line number Diff line change
@@ -1759,12 +1759,14 @@
\csdef{blx@qp@comma}{\blx@postpunct}%
\csdef{blx@qp@semicolon}{\blx@postpunct}%
\csdef{blx@qp@colon}{\blx@postpunct}%
\csdef{blx@qp@colonnonfrench}{\blx@postpunct}%
\csdef{blx@qp@period}{\blx@postpunct}%
\csdef{blx@qp@exclam}{\blx@postpunct}%
\csdef{blx@qp@question}{\blx@postpunct}%
\cslet{blx@pq@comma}\@empty
\cslet{blx@pq@semicolon}\@empty
\cslet{blx@pq@colon}\@empty
\cslet{blx@pq@colonnonfrench}\@empty
\cslet{blx@pq@period}\@empty
\cslet{blx@pq@exclam}\@empty
\cslet{blx@pq@question}\@empty
@@ -1853,6 +1855,13 @@
\def\abx@comma{\ifdim\lastkern>\z@\unkern\fi\abx@puncthook{,}}%
\def\abx@semicolon{\abx@puncthook{;}}%
\def\abx@colon{\abx@puncthook{:}}%
\def\abx@colonnonfrench{%
\abx@puncthook{%
\begingroup
\csuse{NoAutoSpacing}%
\string:%
\endgroup
}}%
\def\abx@period{\ifdim\lastkern>\z@\unkern\fi\abx@puncthook{.}}%
\def\abx@exclam{\abx@puncthook{!}}%
\def\abx@question{\abx@puncthook{?}}%
@@ -1934,6 +1943,7 @@
\protected\def\blx@imc@addcomma{\blx@addpunct{comma}}
\protected\def\blx@imc@addsemicolon{\blx@addpunct{semicolon}}
\protected\def\blx@imc@addcolon{\blx@addpunct{colon}}
\protected\def\blx@imc@addcolonnonfrench{\blx@addpunct{colonnonfrench}}
\protected\def\blx@imc@addexclam{\blx@addpunct{exclam}}
\protected\def\blx@imc@addquestion{\blx@addpunct{question}}
@@ -2061,7 +2071,7 @@
\blx@regimcs{%
\setpunctfont \resetpunctfont \ifcapital \autocap \ifpunctmark
\ifpunct \ifterm \nopunct \isdot \adddot \addperiod \addcomma
\addsemicolon \addcolon \addexclam \addquestion}
\addsemicolon \addcolon \addcolonnonfrench \addexclam \addquestion}
\appto\blx@blxinit{%
\appto\nocorrlist{\isdot\adddot\addperiod\addcomma}}

0 comments on commit f6b0817

Please sign in to comment.