Instructions: blah blah blah
Material allowed: Closed book. Math tables are
allowed. One formula sheet.
It is the second paragraph, following "Material allowed:" which I want
to ask about. I want to have it formatted neatly, but also indented
as illustrated (I've intentionally made the paragraph very narrow
here for illustration purposes, in the hopes of avoiding wrapping
problems with various newsreaders). For years I've been doing this
with a tabbing environment, but today I wanted to add some extra info
to this paragraph and was annoyed by the (apparent?) need to manually
insert the line breaks. I thought there must be a better way.
My first effort to improve on tabbing alone involved a combination
of tabbing and minipage, but I couldn't get anything sensible. The
second try seems more hopeful, though awfully inelegant. It consists
of something like this (my \textwidth is set to 7in and I'm using 12pt
article style):
\begin{minipage}{1.5in}
{\bf Materials allowed:}
\end{minipage}\hfill
\begin{minipage}[t]{5.5in}
Closed book. Handout sheets with vector identities, basic
equations, and constants.\\
\end{minipage}
My question is: do people think I'm on the right track, or is there a
much better way to accomplish this? I expect that people with a better
ingrained sense than I for how to build boxes and paragraphs, and using
parindent, etc. will probably scorn my minipage stuff, but that's why
I'm asking... please don't be too severe :-) and especially please no
plonking!
John
What's wrong with '\begin{description} ...' ?
--
William Park, Open Geometry Consulting, <openge...@yahoo.ca>
8 CPU cluster, NAS, (Slackware) Linux, Python, LaTeX, Vim, Mutt, Tin
Thanks for the suggestion. The example of the description environment
in my old (2nd ed.) Kopka & Daly shows the description paragraph not
fully indented, i.e. it looks something like this:
purpose This environment is appropriate when ...
expressions to be defined.
BTW, my best effort with the multiple minipage approach now looks like
this:
{\noindent\bf Instructions:} Do all 3 questions. They are of equal
value.\\[.1in]
\begin{minipage}{1.55in}
{\bf Materials allowed:}
\end{minipage}\hfill
\begin{minipage}[t]{4.4in}\raggedright
Closed book. Handout sheets with vector identities, basic equations,
and constants.\\
Some formulas are also given on the last page of the paper.
\end{minipage}\hfill
\begin{minipage}[s]{1.8in}
\phantom{blah blah blah}
\end{minipage}
It really is what I was after, but I would have thought there would be
an easier (better?) way to achieve it. I have trouble understanding the
(to me) peculiar horizontal shifts which take place on changing some of
the minipage widths. E.g. changing the 4.4in in the middle minipage to
4.5in results in a significant shift to the right.
John
Again apologies for continuing to followup to my own post (is this a
very bad thing to do?). It seems that the \hangindent command offers a
simpler solution:
{\noindent\bf Instructions:} Do all 3 questions. They are of equal
value.\\[-.1in]\par
\setlength{\hangindent}{23ex}
\noindent
{\bf Materials allowed:} Closed book. Handout sheets with
vector identities, basic equations, and constants.\\
Some formulas are also given on the last page of the paper
This is much shorter and tidier, and appears to accomplish almost the
same thing (excepting possibly control over the width of the middle
minipage).
John
> \begin{minipage}[t]{4.4in}\raggedright
> \begin{minipage}[s]{1.8in}
> It really is what I was after, but I would have thought there would be
> an easier (better?) way to achieve it. I have trouble understanding the
> (to me) peculiar horizontal shifts which take place on changing some of
> the minipage widths. E.g. changing the 4.4in in the middle minipage to
> 4.5in results in a significant shift to the right.
Perhaps, you should use MS-Word or WordPerfect? They are better suited
for this kind of manual adjustment for 3 unequal columns.
Or, you can try '\begin{tabular}...' with hard-coded lengths.
Thanks, that seems like a good suggestion (and I should have thought
of it).
I actually like the \hangindent solution I posted previously. The
idea for that came while I was browsing in Gratzer's 'Math into
LaTeX'. It seems surprising that Gratzer didn't mention that
hangindent comes from plain TeX - presumably that's why it's not
indexed in any (other) of my LaTeX books. It is, of course, in the
TeXBook; I think Knuth used it to make the dangerous bend notes.
John
Sorry, but I meant to specify that I was thanking you for the tabular
suggestion. I certainly hope you were joking about the other
suggestions... J
There is the hanging package on CTAN which does hanging paragraph(s).
Peter W.
JC> I actually like the \hangindent solution I posted previously. The
JC> idea for that came while I was browsing in Gratzer's 'Math into
JC> LaTeX'. It seems surprising that Gratzer didn't mention that
JC> hangindent comes from plain TeX - presumably that's why it's not
JC> indexed in any (other) of my LaTeX books. It is, of course, in the
JC> TeXBook; I think Knuth used it to make the dangerous bend notes.
\parshape, which is a generalized form of \hangindent, is heavily used in
LaTeX's internals. Therefore you risk messing up things if you use it in an
uncontrolled way, and so it isn't mentioned in LaTeX books.
--
Piet van Oostrum <pi...@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van....@hccnet.nl