From db59eb5468832e628e40ca12d4ad23ee6b16f4fc Mon Sep 17 00:00:00 2001 From: Chris Spiel Date: Sat, 21 Mar 2026 15:25:28 +0100 Subject: [PATCH 1/2] Implement \capitalcolon via \textcolon. --- typog.dtx | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/typog.dtx b/typog.dtx index 58729d6..60a4174 100644 --- a/typog.dtx +++ b/typog.dtx @@ -1408,6 +1408,10 @@ end % \endqritem % % \heading{C} +% \qritem{syn:capitalcolon}{\cs{capitalcolon}} +% Alias for \cs{capitalencolon}. +% \endqritem +% % \qritem{syn:capitaldash}{\cs{capitaldash*}} % Alias for \cs{capitalendash*}. % \endqritem @@ -2166,7 +2170,8 @@ end % \item[|raisefiguredash=|\meta{dim}]\label{item:raisefiguredash} % \indexpackageoptiondefinition{raisefiguredash} % Set the length that the \cs{textendash} is raised in -% \hyperref[syn:figuredash]{\cs{figuredash}}. See \cref{sec:number-dash}. Default +% \hyperref[syn:figuredash]{\cs{figuredash}} and +% \hyperref[syn:capitalcolon]{\cs{capitalcolon}}. See \cref{sec:number-dash}. Default % value: \milliem{\the\typogget{raisefiguredash}}. % % \item[|raiseguillemets=|\meta{dim}]\label{item:raiseguillemets} @@ -3915,7 +3920,30 @@ end % \end{usecase} % % -% \newpagetofixtoc +% \subsubsection{Colon} +% \index{raised character>colon|userman} +% +% \DescribeMacro{\capitalcolon} +% The \cs{capitalcolon}~macro is a variation of the +% \hyperref[syn:figuredash]{\cs{figuredash}}~theme. +% +% \begin{synopsis}\label{syn:capitalcolon} +% \cs{capitalcolon} +% \end{synopsis} +% +% Expands to a raised colon. More exactly it expands to a raised \cs{textcolon} and the latter +% by default expands to \sample{:}. Macro~\cs{textcolon} can be overridden by the user to +% substitute different colons. +% \indexpackageoption{raisefiguredash} +% The raise amount is the same as for \hyperref[sec:number-dash]{\cs{figuredash}}, i.\,e., +% \hyperref[item:raisefiguredash]{|raisefiguredash|}. +% +% \begin{usecase} +% Ratios, like, e.\,g.~1\capitalcolon2 when using lining numerals.\visualpar +% Time of day e.\,g.~9\capitalcolon00\figuredash5\capitalcolon00 again with lining numerals. +% \end{usecase} +% +% % \subsubsection[Multiplication Sign]% % {Multiplication Sign -- Times~\sample{\texttimes}}\label{sec:mult-sign} % \index{raised character>multiplication sign|userman} @@ -6765,6 +6793,7 @@ end % \item \cs{adjustedlabelitemiii}\synpageref{syn:adjustedlabelitem} % \item \cs{adjustedlabelitemiv}\synpageref{syn:adjustedlabelitem} % \item \cs{breakpoint}\synpageref{syn:breakpoint} +% \item \cs{capitalcolon}\synpageref{syn:capitalcolon} % \item \cs{capitalemdash}\synpageref{syn:capitalemdash} % \item \cs{capitalendash}\synpageref{syn:capitalendash} % \item \cs{capitalhyphen}\synpageref{syn:capitalhyphen} @@ -7292,7 +7321,7 @@ end %<*package> \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{typog} - [2026/01/03 v0.6 TypoGraphic extensions] + [2026/03/21 v0.6 TypoGraphic extensions] \RequirePackage{etoolbox} \RequirePackage{everyhook} @@ -8868,6 +8897,26 @@ end % \begin{macrocode} \typog@register@pdfsubstitute{\let\figuredash=\capitaldash} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\textcolon} +% We introduce a macro for the plain colon to allow the user to override it +% in \cs{capitalcolon}. +% +% \changes{v0.6}{2026-03-21}{New macro.} +% \begin{macrocode} +\ProvideDocumentCommand{\textcolon}{}{\char`\:} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\capitalcolon} +% \changes{v0.6}{2026-03-21}{New macro.} +% \begin{macrocode} +\NewDocumentCommand{\capitalcolon}{} + {\raisebox{\typog@config@raisefiguredash}{\textcolon}} + % \end{macrocode} % \end{macro} % @@ -12186,6 +12235,22 @@ Compare the result of plain~\code{\string\textendash} \noindent Starred form eats spaces? 44\figuredash* 55. +\subsection{Colon} + +\noindent Uncorrected + +\begin{quote} + A 1:2 ratio. Open from 9:00 to 5:00. +\end{quote} + +\noindent and corrected + +\begin{quote} + \typogsetup{raisefiguredash=\exemplaryraisefiguredash} + A 1\capitalcolon2 ratio. Open from 9\capitalcolon00 to 5\capitalcolon00. +\end{quote} + + \subsection{Multiplication Sign \capitaldash{} Times~``\texttimes''} \newlength{\exemplaryraisetimes} From a715d324ceab377351cb7276be2f7289a44b9467 Mon Sep 17 00:00:00 2001 From: Chris Spiel Date: Mon, 23 Mar 2026 09:28:59 +0100 Subject: [PATCH 2/2] Polish changes. --- typog.dtx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/typog.dtx b/typog.dtx index 60a4174..ed78b0c 100644 --- a/typog.dtx +++ b/typog.dtx @@ -1409,7 +1409,7 @@ end % % \heading{C} % \qritem{syn:capitalcolon}{\cs{capitalcolon}} -% Alias for \cs{capitalencolon}. +% Typeset a vertically adjusted colon. % \endqritem % % \qritem{syn:capitaldash}{\cs{capitaldash*}} @@ -3924,6 +3924,7 @@ end % \index{raised character>colon|userman} % % \DescribeMacro{\capitalcolon} +% \sinceversion{Since v0.6} % The \cs{capitalcolon}~macro is a variation of the % \hyperref[syn:figuredash]{\cs{figuredash}}~theme. % @@ -3931,16 +3932,16 @@ end % \cs{capitalcolon} % \end{synopsis} % -% Expands to a raised colon. More exactly it expands to a raised \cs{textcolon} and the latter -% by default expands to \sample{:}. Macro~\cs{textcolon} can be overridden by the user to -% substitute different colons. +% Expands to a raised colon. More exactly, it expands to a raised \cs{textcolon} and the +% latter by default expands to \sample{:}. Macro~\cs{textcolon} can be overridden by the user +% to substitute different colons. % \indexpackageoption{raisefiguredash} % The raise amount is the same as for \hyperref[sec:number-dash]{\cs{figuredash}}, i.\,e., % \hyperref[item:raisefiguredash]{|raisefiguredash|}. % % \begin{usecase} % Ratios, like, e.\,g.~1\capitalcolon2 when using lining numerals.\visualpar -% Time of day e.\,g.~9\capitalcolon00\figuredash5\capitalcolon00 again with lining numerals. +% Time of day e.\,g.~9\capitalcolon00\figuredash5\capitalcolon00, again with lining numerals. % \end{usecase} % % @@ -8913,6 +8914,11 @@ end % % \begin{macro}{\capitalcolon} % \changes{v0.6}{2026-03-21}{New macro.} +% The raise-action of this macro actually is run-of-the-mill. However, two things have to be +% pointed out: Firstly, the amount to raise it is determined by a length with a different +% name. In particular, \cs{capitalcolon} does not have its own length associated to it. +% Secondly, the box raised is not a plain colon but the expansion of \cs{textcolon}. +% % \begin{macrocode} \NewDocumentCommand{\capitalcolon}{} {\raisebox{\typog@config@raisefiguredash}{\textcolon}}