🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #2327

Re: latex align questions

#2327
From: David Carlisle
Date: Mon, 07 Sep 1992 10:08
92 lines
3103 bytes
>>>>> On 6 Sep 92 21:11:47 GMT, llew@coal.WPI.EDU (Lok C. Lew Yan Voon) said:

Lok> Nntp-Posting-Host: coal.wpi.edu

Lok> A couple of latex (alignment) questions:

Lok> 1. Can I get latex to skip some horizontal space (e.g. like
Lok>    using \hspace), and where the width is not specified numerically
Lok>    but by a string of characters for their actual widths.

Lok> 2. Can I align the dashes in the foll:

Lok> \begin{itemize}
Lok> \item Group IV --- Si.
Lok> \item Group III-V --- GaAs.
Lok> \end{itemize}

Lok> 3. How to align the decimal point in the foll:

Lok> \begin{tabular}
Lok> a & $-1.71$ \\
Lok> b &  $0.123$ \\

The latex file at the end of this message has examples of these.

I give two versions of (2) one using a list, the other, tabular.

For (3) I have used dcolumn.sty, dcolumn is available from:


If you would like to retrieve the file, include the command:
 SENDME STY.DCOLUMN
in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). 
If you would like an overview of FILESERV, include the command HELP in your
message.  For anonymous ftp access, use Niord.SHSU.edu (192.92.115.8) and
look in the directory [FILESERV.STY].

It also requires the following files if you have not got them, listed
with the SHSU FILESERV command.

newarray.sty:    SENDME STY.DCOLUMN
array.sty:       SENDME ARRAY
multicol.sty     SENDME MULTICOL

Note this is rather a lot of files, so you may prefer to use ftp
rather than the mail server.

Also hopefully there will be new versions of all these files out soon,
so you may want to wait, (but don't hold your breath).

David.


\documentstyle[dcolumn]{article}

\newlength{\foo}
\newcolumn{d}{D{.}{.}{3}}

\begin{document}
Do you mean that you want a space this wide!

\settowidth{\foo}{this wide}
Do you mean that you want a space \hspace{\foo}!

\settowidth{\foo}{Group III-V}
\begin{itemize}
\item \makebox[\foo][l]{Group IV}--- Si.
\item \makebox[\foo][l]{Group III-V}--- GaAs.
\end{itemize}

\begin{tabular}{@{$\bullet$ }r@{---}l}
 Group IV&Si\\
 Group III-V&GaAs
\end{tabular}


\begin{tabular}{ld}
a & -1.71 \\
b &  0.123 \\
\end{tabular}

\end{document}
--
                           David Carlisle
                                    JANET: carlisle@uk.ac.man.cs

                                    Computer Science Department
                                    Manchester University
                                    Oxford Road
                                    Manchester
                                    England
                                    M13 9PL
Technical Details
Message-ID: <CARLISLE.92Sep7110833@r8d.cs.man.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!mucs!m1!carlisle
References: <Bu6DJn.3qq@wpi.WPI.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!mucs!m1!carlisle
From: carlisle@cs.man.ac.uk (David Carlisle)
Newsgroups: comp.text.tex
Subject: Re: latex align questions
Message-ID: <CARLISLE.92Sep7110833@r8d.cs.man.ac.uk>
Date: 7 Sep 92 10:08:33 GMT
References: <Bu6DJn.3qq@wpi.WPI.EDU>
Sender: news@cs.man.ac.uk
Organization: Department of Computer Science, University of Manchester
Lines: 92
In-reply-to: llew@coal.WPI.EDU's message of 6 Sep 92 21:11:47 GMT