Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Raising a colon to center

1 view
Skip to first unread message

Maximus_Rumpas

unread,
Nov 21, 2009, 6:03:31 AM11/21/09
to
Hi All,

I am writing some Latin text within a document:

MARIA STVARTA SCOT : ET GALL : REG : IACO : MAG : BRITA : REG : MATER

I need to raise the colon between the abbreviated text to the centre
of the text line, rather as normal, aligned at the bottom of the text.

I use \textperiodcentered for a single period but I can't find
anything similar to fix the above problem.

Thanks for your time
Max

Philipp Stephani

unread,
Nov 21, 2009, 8:30:14 AM11/21/09
to
Maximus_Rumpas <pmken...@gmail.com> writes:

You can move things around with the \raisebox command:

\documentclass{minimal}
\newcommand*{\raisedcolon}{\raisebox{0.3ex}{:}}
\begin{document}
MARIA STVARTA SCOT \raisedcolon\ ET GALL \raisedcolon\ REG \raisedcolon\ IACO \raisedcolon\ MAG \raisedcolon\ BRITA \raisedcolon\ REG \raisedcolon\ MATER
\end{document}

--
Change “LookInSig” to “tcalveu” to answer by mail.

Maximus_Rumpas

unread,
Nov 21, 2009, 8:41:49 AM11/21/09
to
On 21 Nov, 13:30, Philipp Stephani <LookIn...@arcor.de> wrote:
> Maximus_Rumpas <pmkench...@gmail.com> writes:


> You can move things around with the \raisebox command:
>
> \documentclass{minimal}
> \newcommand*{\raisedcolon}{\raisebox{0.3ex}{:}}
> \begin{document}
> MARIA STVARTA SCOT \raisedcolon\ ET GALL \raisedcolon\ REG \raisedcolon\ IACO \raisedcolon\ MAG \raisedcolon\ BRITA \raisedcolon\ REG \raisedcolon\ MATER
> \end{document}
>
> --
> Change “LookInSig” to “tcalveu” to answer by mail.

Thank you Philipp, both for a quick reply and a simple solution.
Your help is much appreciated.
Kind regards
Max

Heiko Oberdiek

unread,
Nov 21, 2009, 11:27:10 AM11/21/09
to
Maximus_Rumpas <pmken...@gmail.com> wrote:

There are many ways. The following solution centers the colon
using an uppercase letter for comparison. Also it makes the
colon active inside an environment for easier writing.

\documentclass[12pt,a4paper]{article}

\begingroup
\lccode`\~=`\:%
\lowercase{\endgroup
\newenvironment{vccolon}{%
\catcode`\:=\active
\let~\textcoloncentered
\ignorespaces
}{%
\ifhmode\unskip\fi
}%
}
\newcommand{\textcoloncentered}{}
\DeclareRobustCommand*{\textcoloncentered}{%
\begingroup
\sbox0{T}%
\sbox2{:}%
\dimen0=\ht0 %
\advance\dimen0 by -\ht2 %
\dimen0=.5\dimen0 %
\raisebox{\dimen0}{:}%
\endgroup
}

\begin{document}
\begin{vccolon}


MARIA STVARTA SCOT : ET GALL : REG : IACO : MAG : BRITA : REG : MATER

\end{vccolon}
\end{document}

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Dan Luecking

unread,
Nov 23, 2009, 12:39:06 PM11/23/09
to

This looks like a job for \valign!

\def\textcoloncentered{%
\valign{&##\cr\vphantom{T}\cr\vfil\hbox{:}\vfil\cr}}

One disadvantage is it has the height and depth of the
uppercase T.

Probably one should just \raisebox by some carefully
chosen multiple of ex. Exact centering is less important
than a well designed appearance.


Dan
To reply by email, change LookInSig to luecking

0 new messages