\centering\textbf{Questions For Future Genealogists} \\
\fbox{ \begin{Bitemize}[t]
\item Who were John Smith's parents?
\item Presuming Andrew's father was John, was he married to
Elizabeth~Jones, \\
Helen~Wright, both, or neither?
\end{Bitemize}}
\raggedright
> I am using MacTex with memoir class to write a genealogy book. I want
> to make a box
> at the end of each chapter itemizing the open questions. The
> following code works, but I
> want the "Questions For Future Genealogists" inside the box. I
> haven't been able to get
> that to work. Any ideas?
I'm surprised your code works at all, since you can't put paragraphs
into an fbox. But Memoir offers a 'framed' environment. So wrap your
whole text (including the title) inside \begin{framed} ... \end{framed}.
>
> \centering\textbf{Questions For Future Genealogists} \\
> \fbox{ \begin{Bitemize}[t]
> \item Who were John Smith's parents?
> \item Presuming Andrew's father was John, was he married to
> Elizabeth~Jones, \\
> Helen~Wright, both, or neither?
> \end{Bitemize}}
> \raggedright
Don't post fragments like this in the future, since then people won't be
able to help you without guessing. (For example, we have no idea what
the Bitemize environment is.) Post minimal examples complete with
\begin{document} ... \end{document} and the minimal preamble needed to
show your problem.
Alan
Bitemize is part of fancybox. It works more or less as a boxed
itemize. It is based on tabular so it will have the width of the
longest line.
I would use a minipage to frame a list and its title. Something like
\fbox{%
\begin{minipage}{1.0\linewidth}
\centerline{\textbf{Questions For Future Genealogists}}
\begin{itemize}
\item Who were John Smith's parents?
\item Presuming Andrew's father was John, was he married to
Elizabeth~Jones,\\
Helen~Wright, both, or neither?
\end{itemize}
\end{minipage}
}
Here you need to set a fixed width. On the other hand it will have the
same width in all chapters.
You can use Bitemize and cheat with the label to get the title inside
the frame (but it is not very nice):
\fbox{%
\begin{Bitemize}
\item[\rlap{\hspace*{-1ex}\textbf{Questions For Future
Genealogists}}]
\item Who were John Smith's parents?
\item Presuming Andrew's father was John, was he married to
Elizabeth~Jones,\\
Helen~Wright, both, or neither?
\end{Bitemize}
}
Since the title now does not occupy any horizontal space you need at
least one other line that is longer. The title is not centered either.
The spacing of 1ex is just to start the line at the right place (and
right now I am not sure why it is needed).
/Stefan
Use the fancybox package for its Sbox tool and the alternative boxes.
--------------------------------------------------------------------------
\documentclass{book}
\usepackage{fancybox}
\usepackage[svgnames]{xcolor}
\newenvironment{qbox}[1]{%
\begin{Sbox}%
\begin{minipage}{.666\columnwidth}\raggedright\sffamily
\subsubsection*{\sffamily#1}%
\begin{itemize}}{%
\end{itemize}%
\end{minipage}%
\end{Sbox}
\begin{flushright}% or center, or whatever
\setlength{\fboxsep}{0pt}
\bigskip
\shadowbox{\setlength{\fboxsep}{1em}\colorbox{LightGray}{\TheSbox}}%
\end{flushright}%
}
\begin{document}
\chapter{fbox usage}
I am using MacTex with memoir class to write a genealogy book. I want
to make a box at the end of each chapter itemizing the open questions.
The following code works, but I want the ``Questions For Future
Genealogists'' inside the box. I haven't been able to get that to
work. Any ideas?
\begin{qbox}{Questions For Future Genealogists}
\item Who were John Smith's parents?
\item Presuming Andrew's father was John, was he married to
Elizabeth~Jones, Helen~Wright, both, or neither?
\end{qbox}
\chapter{more}
\end{document}
--------------------------------------------------------------------------
///Peter
I only just noticed that. I don't know if you can do what I wrote with
memoir or if there is some conflict.
///Peter
This looks nice.
But how can I achieve page breaks within such boxes? How can I
distribute a box over many pages?
Thanks
Konrad
tex can't do such things (it can split vboxes to fit a page, which is
how the output routine works, but it can't split vboxes in the text
stream.
or rather, it might be able, but it would require a serious project to
deliver something that might work sometimes.
start again from scratch, considering the packages listed in
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=breakbox
at a guess, i would think that framed would get somewhere near to what
you want, but it won't be the same sort of animal.
--
Robin Fairbairns, Cambridge
> at a guess, i would think that framed would get somewhere near to what
> you want, but it won't be the same sort of animal.
As Robin says, framed.sty, framed environment, answers the original
question. If you are using shadowbox, you can easily define a new
version
that breaks over pages, like
\newenvironment{shadowframe}{%
\def\FrameCommand{\fboxsep=\FrameSep \shadowbox}%
\MakeFramed {\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}
I don't recognize "Bitemize" , but I guess it is a boxed itemize.
You can just use itemize.
Donald Arseneau
You can't. They're *boxes*.
> How can I distribute a box over many pages?
That would be a very bad practice from the point of view of readability
and usability.
However, I know that I was once surprised when the Verbatim environment
from the fancyvrb package did exactly this, preserving the top and side
rules on the first page, and the side and bottom rules on the second page.
But that was (a) in verbatim mode (monospace) and (b) with the text
given literally between the \begin{Verbatim} and \end{Verbatim}, without
it being preformatted in an additional environment as in my previous
example.
FWIW here is an example of it at work. The incantation required to
coerce this into the body font, with relevant formatting, is left as an
exercise to the reader :-)
///Peter
\documentclass{article}
\usepackage{fancyvrb,lipsum}
\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus
elit, vestibulum ut, placerat ac, adipiscing vitae,
felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy
eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu
neque. Pellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra
metus rhoncus sem. Nulla et lectus vestibulum urna fringilla
ultrices. Phasellus eu tellus sit amet tortor gravida
placerat. Integer sapien est, iaculis in, pretium quis, viverra
ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean
faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac,
nulla. Curabitur auctor semper nulla. Donec varius orci eget
risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis,
diam. Duis eget orci sit amet orci dignissim rutrum. Nam dui
ligula, fringilla a, euismod sodales, sollicitudin vel,
wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
accumsan bibendum, erat ligula aliquet magna, vitae ornare odio
metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut
massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque
penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum
turpis. Pellentesque cursus luctus mauris.
\begin{Verbatim}[frame=single]
Nulla malesuada porttitor diam. Donec felis erat, congue
non, volutpat at, tincidunt tristique, libero. Vivamus
viverra fermentum felis. Donec nonummy pellentesque
ante. Phasellus adipiscing semper elit. Proin fermentum
massa ac quam. Sed diam turpis, molestie vitae, placerat
a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula,
eleifend at, accumsan nec, suscipit a, ipsum. Morbi
blandit ligula feugiat magna. Nunc eleifend consequat
lorem. Sed lacinia nulla vitae enim. Pellentesque
tincidunt purus vel magna. Integer non enim. Praesent
euismod nunc eu purus. Donec bibendum quam in
tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam
vulputate metus eu enim. Vestibulum pellentesque felis eu
massa. Quisque ullamcorper placerat ipsum. Cras
nibh. Morbi vel justo vitae lacus tincidunt
ultrices. Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. In hac habitasse platea dictumst. Integer
tempus convallis augue. Etiam facilisis. Nunc elementum
fermentum wisi. Aenean placerat. Ut imperdiet, enim sed
gravida sollicitudin, felis odio placerat quam, ac
pulvinar elit purus eget enim. Nunc vitae tortor. Proin
tempus nibh sit amet nisl. Vivamus quis tortor vitae risus
porta vehicula. Fusce mauris. Vestibulum luctus nibh at
lectus. Sed bibendum, nulla a faucibus semper, leo velit
ultricies tellus, ac venenatis arcu wisi vel
nisl. Vestibulum diam. Aliquam pellentesque, augue quis
sagittis posuere, turpis lacus congue quam, in hendrerit
risus eros eget felis. Maecenas eget erat in sapien mattis
porttitor. Vestibulum porttitor. Nulla facilisi. Sed a
turpis eu lacus commodo facilisis. Morbi fringilla, wisi
in dignissim interdum, justo lectus sagittis dui, et
vehicula libero dui cursus dui. Mauris tempor ligula sed
lacus. Duis cursus enim ut augue. Cras ac magna. Cras
nulla. Nulla egestas. Curabitur a leo. Quisque egestas
wisi eget nunc. Nam feugiat lacus vel est. Curabitur
consectetuer. Suspendisse vel felis. Ut lorem lorem,
interdum eu, tincidunt sit amet,
\end{Verbatim}
laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim
elit, rutrum at, molestie non, nonummy vel, nisl. Ut lectus eros,
malesuada sit amet, fermentum eu, sodales cursus, magna. Donec eu
purus. Quisque vehicula, urna sed ultricies auctor, pede lorem
egestas dui, et convallis elit erat sed nulla. Donec
luctus. Curabitur et nunc. Aliquam dolor odio, commodo pretium,
ultricies non, pharetra in, velit. Integer arcu est, nonummy in,
fermentum faucibus, egestas vel, odio. Sed commodo posuere
pede. Mauris ut est. Ut quis purus. Sed ac odio. Sed vehicula
hendrerit sem. Duis non odio. Morbi ut dui. Sed accumsan risus
eget odio. In hac habitasse platea dictumst. Pellentesque non
elit. Fusce sed justo eu urna porta tincidunt. Mauris felis odio,
sollicitudin sed, volutpat a, ornare ac, erat. Morbi quis
dolor. Donec pellentesque, erat ac sagittis semper, nunc dui
lobortis purus, quis congue purus metus ultricies tellus. Proin et
quam. Class aptent taciti sociosqu ad litora torquent per conubia
nostra, per inceptos hymenaeos. Praesent sapien turpis, fermentum
vel, eleifend faucibus, vehicula eu, lacus. Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,
placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate
a, magna. Donec vehicula augue eu neque. Pellentesque habitant
morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et
lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit
amet tortor gravida placerat. Integer sapien est, iaculis in,
pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices
bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu,
pulvinar at, mollis ac, nulla. Curabitur auctor semper
nulla. Donec varius orci eget risus. Duis nibh mi, congue eu,
accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet
orci dignissim rutrum. Nam dui ligula, fringilla a, euismod
sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam
lacus libero, pretium at, lobortis vitae, ultricies et,
tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula
aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl
hendrerit mollis. Suspendisse ut massa. Cras nec
ante. Pellentesque a nulla. Cum sociis natoque penatibus et magnis
dis parturient montes, nascetur ridiculus mus. Aliquam tincidunt
urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus
luctus mauris. Nulla malesuada porttitor diam. Donec felis erat,
congue non, volutpat at, tincidunt tristique, libero. Vivamus
viverra fermentum felis. Donec nonummy pellentesque
ante. Phasellus adipiscing semper elit. Proin fermentum massa ac
quam. Sed diam turpis, molestie vitae, placerat a, molestie nec,
leo. Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan
nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc
eleifend consequat lorem. Sed lacinia nulla vitae
enim. Pellentesque tincidunt purus vel magna. Integer non
enim. Praesent euismod nunc eu purus. Donec bibendum quam in
tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate
metus eu enim. Vestibulum pellentesque felis eu massa. Quisque
ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus
\end{document}