The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [strut]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

Longtabu produces strange row heights

I would like to create a longtable using the longtabu environment from the tabu package. However, if the text in a column needs more than one line, the height of the corresponding row gets too small ...
6
votes
2answers
150 views

Relationship between strut and baselineskip

Here, it is said that a strut is defined as: \rule[-.3\baselineskip]{0pt}{\baselineskip} However, if I do: \newlength{\strutheight} \settoheight{\strutheight}{\strut}\printlength{\strutheight} \...
0
votes
1answer
42 views

Align left margin note with displaystyle math

For one of the packages I'm making, I want to denote part problems in the left margin. I don't want to use e.g. \reversemarginpar since this is up to the user to define. Exercises are always going to ...
1
vote
1answer
146 views

Vertical alignment of pgfgantt calendar

The pgfgantt package is generally pretty good about vertically aligning labels, but its \gantttitlecalendar[options]{calendar lines} command doesn't seem to do this automatically. This is easily seen ...
3
votes
1answer
347 views

Adjusting vertical space in tables with brackets, braces or other delimiters

This question is based on a problem that arises in a solution to Inserting a small vertical space in a table. The spacing between rows in a table is often too small. A good way to fix this is using ...
2
votes
1answer
53 views

Reserving space to find out whether a tabular will end up on odd or even page

I have a large number (~1200) of single-row tabular environments which include figures. Depending on odd or even page, I want to change the order of the columns. I'm now using \Needspace{value}\...
3
votes
1answer
266 views

First word hyphenation in parbox with strut

I've a problem with parbox spacing in combination with hyphenation. What I like to achieve is setting parboxes in a tabular-like way as key value pairs. So I have two parboxes with a given width per ...
6
votes
1answer
388 views

aligning several trees to the baseline

I want to have the following trees aligned to the baseline. There is a problem which is probably due to the "g" in some of the trees. How do I get these trees aligned? I tried \strut, but this somehow ...
3
votes
1answer
508 views

tabu: adding struts before and after cell content

I am using tabu package to easily typeset my tables. So, there are few problems that i have solved: vertical spacing (from cell content to borders) is less than line height and line depth, so i use \...
9
votes
4answers
2k views

Why is `\strut` working in these scenarios?

\strut seems to be a powerful command to get the interlinear spacing correct; particularly, when working with text in \parboxs or minipages. But it's also nice in contexts in which LaTeX is setting ...
8
votes
2answers
968 views

Ensuring a paragraph uses at least a given height?

I'm making a custom document class based on memoir, and I don't know how to implement the chapter precis so that it does what I want (the chapter precis is a small optional paragraph that follows ...
10
votes
1answer
875 views

Can I assume that the \ht+\dp of a strutbox == \baselineskip?

In Context, as long as the interline space is set through the proper interface, it is safe to assume that (tex.box.strutbox.height + tex.box.strutbox.depth) == tex.baselineskip.width. This relation is ...
54
votes
2answers
21k views

Strutting around: What's the difference between \strut, \mathstrut and \vphantom?

What's the difference between \strut, \mathstrut and \vphantom? When would I prefer one of them to the others, and why?
49
votes
5answers
7k views

Confused with TeX terminology: height, depth, width

The LaTeX reference card states for example \strut box w/ ht and depth of “(”, zero width I came to see text as a two dimensional feature, but I must be missing out on something... (following was ...
6
votes
1answer
6k views

Invisible character equal to the height of capital letters [duplicate]

Possible Duplicate: How do I create an invisible character? How can I insert an invisible character (similar to \strut) which has a width of zero (won't impact word or letter spacing) and has a ...
34
votes
1answer
4k views

Definition of \strut explained

Can anyone explain me the fine details of the \strut macro. Why is the box \copyied in mathmode but \unhcopyied otherwise? % latex.ltx, line 484, but identical in plainTeX \def\strut{\relax\ifmmode\...
12
votes
6answers
5k views

Set \strut height

I'm using quite a few \colorbox and \colorfbox in a document but they weren't sitting at the same heights (because some words contained g and this seemed to push the box down. The solution I found (...
9
votes
1answer
3k views

strut and strutbox

The definition of a \strut in LaTeX is given in the source as: 211 \newbox\strutbox 212 \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi} Shoudn't a \strutbox, give an empty box? AS ...