7
votes
3answers
88 views

How to align text in title with \fcolorbox

I have defined a new command to make some titles for a newsletter. I'm using the article class for the document. The command is defined with the following code: \definecolor{myblue}{rgb}{0.16, 0.32, ...
5
votes
2answers
105 views

Bump right-aligned text to next line iff no room within a \savebox

This is a follow up to my earlier question Bump right-aligned text to next line iff no room. The difference now is that I need to place this formatted text within a \savebox. In my actual use case, ...
3
votes
3answers
100 views

Centering two images but aligning them left

How would I place two images below each other so that their left sides are aligned and the whole construction is centered? I tried like this: ...
6
votes
1answer
116 views

boxed verbatim environment disappears

I want to center a box containing a verbatim environment. The (almost)MWE below is my attempt to use the answer at center /verbatim text in /figure . \documentclass{article} \usepackage{verbatimbox} ...
2
votes
1answer
127 views

Use a box to fill text to right margin

I often use an eqnarray (I know it's better to use align, but let's not worry about that for this question unless it changes the answer) as a way to list a bunch of definitions or descriptions of ...
8
votes
3answers
185 views

box the size of A containing B

A thing I'd often like to do is put in my document a box the size of some text A and containing some other text B. For instance, I have two tikz nodes, one containing $n$ and one containing $n+1$, and ...
6
votes
1answer
2k views

Centering a \framebox

Before asking, I have checked Centered box, text inside it flushed right?, Questions about \fbox, and Any way to center text within a \parbox?. Here I have tested various centering methods (my ...
8
votes
2answers
198 views

Better way to center text below overline with given length

I need to create lines for signatures. I need 3 of them with different texts below them, but i want all lines to have the same length and the texts centered below them. Tables with \hlines made the ...
6
votes
4answers
202 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 ...
1
vote
2answers
204 views

Need to left align referenced image in mdframed Info box

I have been successful at creating a set of Warning, Note, and Info boxes using mdframed package, and they look very good. However, I need to left align an inserted image rather than have it on its ...
3
votes
1answer
117 views

Globally set the justification in a framed box

I want to show the text from a Python Interpreter in a Windows console. This should be plain text (like you see in a command line terminal). I also want to show Python code snippets with highlighting. ...
1
vote
2answers
538 views

How to right align content of pbox?

Lets have simple \pbox example like this: \documentclass[twoside]{book} \usepackage{pbox, calc} \begin{document} \noindent\fbox{\pbox{\textwidth}{Some text\\Text}} \end{document} Here is printed ...
5
votes
1answer
286 views

LaTeX align/distribute objects à la InDesign?

I'm trying to replicate, in LaTeX, InDesign's align and distribute tools. This is a snapshot of ID's toolbar: Say I want first to align vertically two objects (texts, graphics, boxes,...), and ...
3
votes
1answer
179 views

Aligning three small box together with a text

I made through creating the boxes inside a box with help of an expert by this link Is three boxes inside a box posibble in latex Now im being troubled on how will i put into command to align this ...
3
votes
2answers
84 views

How can I produce 3 centered columns, with the middle one fitting the width of its content?

How can I produce a document similar to this, but cause the middle column to take up only as much space as it needs (rather than explicitly specifying a width), such that as much space as possible is ...
13
votes
3answers
3k views

How do I (temporarily) cancel centering?

There I was, a-merrily tracing through the depths of beamer's code on the trail of the Dreaded Overprint Hurler of Bexhill-on-Sea, when I came across Something Completely Different. It looked like a ...
18
votes
2answers
10k views

Any way to center text within a \parbox?

Probably I'm missing something, but I'm really struggling to find an answer to this simple question: How to center text within a \parbox? Side note: I don't want to switch to any other environment ...
17
votes
4answers
4k views

Horizontal equivalent to \raisebox?

Is there a horizontal equivalent to \raisebox? I'd like to shift some content horizontally without altering the layout of surrounding content. Edit: I feel bad because my question wasn't precise ...
14
votes
6answers
1k views

How to stack boxes like a vertical version of \mbox?

I would like a vertical equivalent to \mbox{} that somehow takes a sequence of boxes and stacks them on top of each other. I'd like the resulting width to be the width of the widest box, and I'd like ...
3
votes
2answers
697 views

How can I insert address blocks on the left and right side of the page?

I want to insert my local address on the left side of the page and my permanent address on the right side of the page. However, I want both address blocks to be left-aligned. Basically, I want ...
6
votes
2answers
1k views

Positioning of text (box) relative to other text

I'm looking at the first, 'letter class' example in LaTeX/Letters - Wikibooks, open books for an open world. What I'd like to do is to use a \newcommand - say, \insertbox - which would be inserted ...
2
votes
2answers
544 views

Multi horizontal alignment in mathmode

I would like to realize an alignment like the following: formulaformula1 formulaformulaformula2 formula3 formula4 So I would like formulaformula1 and formulaformulaformula2 to ...
3
votes
2answers
725 views

Centering contents after \unvbox

Trying to build a complex macro, I managed to compute what I need in a vbox. Now, I want to \unvbox this box to allow page breaks, and would like each element it contains to be centered. I can't find ...
3
votes
1answer
286 views

Problem with babel, ragged2e and parbox

I have the following code: \documentclass{minimal} \usepackage[french]{babel} \usepackage[newcommands]{ragged2e} \begin{document} \begin{center} \parbox{9cm}{ \textsc{ Jesus a dit~: \og ...
6
votes
2answers
887 views

Underfull hbox with \hbox to <dimen> but not with \halign

When using the \halign primitive, cells in the same column all have the same width. Hence, if one entry is very large (abcdefg below), the others will be stretched to the same size. If an entry ...
4
votes
3answers
3k views

Flush a left-flushed box right

I would like to put an address in my document as follows: | | | Name | | Street #| | City | | ...
8
votes
1answer
684 views

How to centre my display math overfull hboxes?

I have an overfull hbox which I've decided to live with. Actually, several. However, since they're in \[…\], it would look better if they could remain centered, i.e. overflowing the margins equally ...