[XeTeX] Large brace in multiline table cell
mskala at ansuz.sooke.bc.ca
mskala at ansuz.sooke.bc.ca
Sat Oct 12 16:23:07 CEST 2013
On Sat, 12 Oct 2013, BPJ wrote:
> Can somebody help me on how to do the following with XeLaTeX,
> or, if this is not the right place to ask this, where I should
> ask this question?
A LaTeX-related mailing list might be better, since this question's answer
is unlikely to be specifically related to XeLaTeX. However, I don't know
off the top of my head which would be better.
> I need to set a text (not math) table with two
> columns where the left column contains linebreaks
> and a 'stretchy' right brace along the right edge of the cell,
> i.e. like so:
>
> line 1 \
> line 2 | General description of what
> line 3 > kind of things the lines
> line 4 | in the left cell represent
> line 5 /
>
> More such rows with different numbers of lines
> in the left cell.
Even though you say you want it to be text and not math, I think the
easiest way to do something like what you describe might be to start in
math mode. At the very least: you just can't have a stretchy brace as a
text mode glyph, they don't exist, so you have to set that one glyph as
math, manually scale a text-mode glyph, or use a graphics package like
TikZ to draw it, even if everything else is true text.
Try making the left column a table in itself, wrapped in \left. and
\right\} , something like this:
\[
\left.
\begin{tabular}{l}
line 1 \\
line 2 \\
line 3 \\
line 4 \\
line 5
\end{tabular}
\right\}
\parbox{2in}{General description of what kind of things the
lines in the left cell represent}
\]
Note that both "tabular" and "parbox" switch their contents into text
mode, which is what you want, even if the commands are used in
display-math mode. Having the outer level be display-math gives you the
centre-to-centre vertical alignment for free.
If it's important that the left column should be the same width for
several of these structures so that they line up, you could use an
appropriate p{} column specifier in the tabular instead of "l". You could
also wrap this whole thing (possibly requiring some care in how you switch
to math mode, and the widths of the columns) inside a single multi-column
cell of a larger table, if you want to mix it with other more
straightforward constructions in a single larger table.
> cells is set in the same fonts as the rest of the text. I doubt
> that the braces are really needed for clarity, but it's in my
> source so I have to reproduce it.
There is a package called "schemata" at
http://www.tex.ac.uk/ctan/macros/generic/schemata/
which is specifically designed for typesetting diagrams sort of like what
you describe, but potentially much more complicated, in historical
documents on Scholastic theology. I wonder if that's what you're doing?
Even if not, you may want to look at it. The schemata package doesn't
seem easy to use, and it's mostly but not entirely designed to put the
braces on the left instead of the right, but at the very least, the
examples in the documentation look cool.
--
Matthew Skala
mskala at ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/
More information about the XeTeX
mailing list