[XeTeX] horizontal alignment

Tobias Schoel liesdiedatei at googlemail.com
Mon Nov 19 18:39:55 CET 2012


Hello,

I'm not sure if I understood you correctly, but what you want to do 
seems to me to structurally be a table, so you should also tex it that way:
\begin{tabular}{@{}l@{\hspace{5cm}}p{2cm}@{}l@{}}
Title1&&WORD 1\\
&&text in a minipage environment\\
&\multicolumn{2}{l@{}}{that spans exactly}\\
&\multicolumn{2}{l@{}}{three rows}\\
\end{tabular}

Bye

Toscho

On 19.11.2012 17:46, Lucio Crusca wrote:
> 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.
>
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>    http://tug.org/mailman/listinfo/xetex
>


More information about the XeTeX mailing list