[XeTeX] horizontal alignment

Lucio Crusca lucio at sulweb.org
Mon Nov 19 16:46:44 CET 2012


Hello *,

I'm quite new here, I've been using LaTeX and XeTeX for a while but I'm no 
expert. I use texlive 2011 for linux/i386. I'm trying to obtain horizontal 
alignment of some words. Let's make an example (look at the following with a 
monospaced font):

TITLE1            WORD1
                  text in a minipage environment
          that spans exactly
          three rows 

TITLE2            WORD2
                  text in a minipage environment
          that spans exactly
          three rows

                  WORD3
                  text in a minipage environment
          that spans exactly
          three rows

 and so on...

Please note that the xetex code is being automatically generated and for this 
reason I need three distinct commands, one for the titles, one for the 
horizontally aligned words and one for the horizontally aligned minipages. In 
the xetex source below the three commands are: \sessoentry, \classeentry and 
\dogentrytrerighe (sorry for the mixup of italian and english word in the 
command names, but those are legacy names). In those commands I'm using 
\makebox[0pt] to make WORD1 and WORD2 alignment independent of the TITLEs on 
the left, but that does not seem to completely work: WORD1 and WORD2 are a few 
millimeters off their expected position.

I've tried \tabto, but it strangely makes the minipage slide up a bit and 
overlap WORDx. 

Any suggestion welcome, thanks in advance.

--- File halign.tex ---

\documentclass[10pt]{book}
\usepackage{fontspec}
\usepackage[italian]{babel}
\usepackage[twoside,dvips=false,pdftex=false,vtex=false,xetex=true]{geometry}

\newcommand{\sessoentry}[1]{\noindent\makebox[0pt][l]{\textbf{#1}}}

\newcommand{\classeentry}[1]{\noindent\makebox[0pt][l]{}\begin{minipage}
{\textwidth}\hspace{4.0cm}\textbf{#1}\par\end{minipage}}

\newcommand{\dogentrytrerighe}[3]{\noindent\begin{minipage}
{\textwidth}\hspace{4.0cm}#1\par#2\par#3\par\vspace{2mm}\end{minipage}}

\begin{document}
\sessoentry{MASCHI}
\classeentry{JUNIORES}
\dogentrytrerighe{1 - KIRIELEISON SUMMER SON}
{blu merle - L.O.I. 11/15... - nato il 10/08 - Tat. 33...}
{da Sunny... e da Kirie... All.re Giulia... - Propr. Coll...}
\dogentrytrerighe{2 - DIRIELEISON SUMMER SON}
{blu merle - L.O.I. 11/15... - nato il 10/08 - Tat. 33...}
{da Sunny... e da Kirie... All.re Giulia... - Propr. Coll...}
\sessoentry{FEMMINE}
\classeentry{GIOVANI}
\dogentrytrerighe{3 - WIRIELEISON SUMMER SON}
{blu merle - L.O.I. 11/15... - nato il 10/08 - Tat. 33...}
{da Sunny... e da Kirie... All.re Giulia... - Propr. Coll...}
\dogentrytrerighe{4 - RIRIELEISON SUMMER SON}
{blu merle - L.O.I. 11/15... - nato il 10/08 - Tat. 33...}
{da Sunny... e da Kirie... All.re Giulia... - Propr. Coll...}
\classeentry{CAMPIONI}
\dogentrytrerighe{5 - NIRIELEISON SUMMER SON}
{blu merle - L.O.I. 11/15... - nato il 10/08 - Tat. 33...}
{da Sunny... e da Kirie... All.re Giulia... - Propr. Coll...}
\dogentrytrerighe{6 - PIRIELEISON SUMMER SON}
{blu merle - L.O.I. 11/15... - nato il 10/08 - Tat. 33...}
{da Sunny... e da Kirie... All.re Giulia... - Propr. Coll...}
\end{document}

-- End of file halign.tex --

Lucio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20121119/477d697d/attachment-0001.html>


More information about the XeTeX mailing list