{boxes} are the units used by (La)TeX to construct a page by pasting them together horizontally or vertically. A single character from a font is a box, as are the lines of type and the eventual page.

learn more… | top users | synonyms

5
votes
1answer
35 views

Strange behavior of smart diagram with \resizebox

I'm working with package smartdiagram. Since I can't specify the width of the diagram (or can I...?), I'm using \resizebox as a workaround. This strategy works fine EXCEPT when I set custom colors ...
37
votes
3answers
4k views

How to create Highlight Boxes in LaTeX?

I am writing an Article in LaTeX. Please suggest me how to create a highlight boxes like the ones shown below in LaTeX:
4
votes
1answer
55 views

Convert a latex command with parameter into a two begin end commands without parameter

I have defined a command \newcommand{\CV}[1]{\parbox[c]{0.2\textwidth}{\begin{flushleft}#1\end{flushleft}}} which I obviously have to call like \CV{My text} However I rather would like to use ...
4
votes
3answers
33 views

Set default width of \shadowbox to line, not column, width

When I insert a shadowbox using Lyx (Insert>Box>Drop Shadow) the width is specified as 100% of column width (1\columnwidth). This is the source code it generates: ...
7
votes
1answer
55 views

How to make a dynamic comment box next to \address cluster?

I'm sure you're aware what \address{blah} is. Well, I'd like to make a boxed comment that's just as high as my address and stretches from the left margin of the document to 3cm to the left of the ...
5
votes
1answer
63 views

Box or [ around multiple lines inside align

I have the following code \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4} \begin{minipage}[h!]{0\linewidth} \text{Let:} \end{minipage} ...
22
votes
3answers
267 views

What are the ways to position things absolutely on the page?

I know that there is tikz, but also eso-pic and textpos. I'd like to see a list of possible ways (not necessarily packages) for absolute positioning of things (which I believe amounts to "boxes") on ...
0
votes
0answers
28 views

Rounded corner box with shading [duplicate]

I wish to draw a rounded corner box (top-left side as a square, top-right side with 6pt radius curve and the bottom of two sides also with radius curve), in addition to that there should be shading, ...
0
votes
2answers
48 views

Problem with boxes and paragraphs

I am trying to create a form for my company. I am new to Latex and based on some tutorials i was able to get to a certain point. But as you can see The fbox is starting from a different margin I am ...
1
vote
1answer
32 views

Adding a “box” to latex document with different style than the rest

I have my CV written using Latex, using moderncv document class. I really like the output, but at the bottom of the CV I need to put a disclaimer (required in Poland), which doesn't really fit into ...
10
votes
5answers
850 views

A \boxed alternative with nicer spacing?

I like using \boxed to emphasize my answers in homework problem sets. However, whenever I use superscripts/exponents inside the box, the box becomes taller than it seems it should. This causes two ...
5
votes
2answers
85 views

How can I add lists and similar in a savebox?

I'd like to have a savebox (or savebox-like functionality) that contains some 'simple' formatting, for example lists. \documentclass{article} \begin{document} This is a sentence \begin{itemize} ...
205
votes
7answers
47k views

Remove ugly borders around clickable cross-references and hyperlinks

I know that I can use hyperref to make cross-references and hyperlinks clickable. That makes the clickable areas outlined in fluorescent green, however. How can I make the green boxes go away?
0
votes
0answers
48 views

How to export a box to a standalone images?

I'm writing a report now, in which I have several tikz figures. How could I export these figures (or as boxes) into separated image files (with exactly the same format as in the report)?
7
votes
2answers
103 views

How do I get consistent spacing around an mbox?

I am trying to typeset a formula in LaTeX with a rule name beneath it, such as the following: The code for the rule an automatically-generated mess (not necessarily using maths mode), output from ...
0
votes
1answer
35 views

Framed float Box, Spanning Two Columns in {paracol}

I'm looking for a simple, framed, float box-environment that has (or can have by construction) a star equivalent (like figure* or table*) so that it may span both columns in the {paracol} ...
4
votes
1answer
59 views

Xelatex polyglossia hyphenation

Is there a way to make the polyglossia package solve the hyphenation problem that presents itself in the log as "Overfull \hbox" automatically? (Note: I find that having shorter lines—even for the ...
4
votes
3answers
52 views

Floats Analogue of framed

I have very little experience with LaTeX. So, pardon my ignorance, but is there a float equivalent of \framebox? Ideally, I'd like a simple construct for framed text that I can position at the top ...
2
votes
1answer
380 views

Background color of breakable box with thin blank lines

The purpose of the mybox environment in the following document is to typeset a box in a blue background. The box may be split by page breaks. The algorithm used is similar to the one found in the ...
2
votes
1answer
26 views

Temporary removal of `\ChapFrame` used in 'Chapter Title in rotated vertical box at the margin'

I would like to, temporarely, not assign new coloured boxes for some chapters. Is that possible, e.g. using or resetting the \ChapFrame command?
5
votes
1answer
55 views

Fitting text to exact specific size

I would like to make my text fit a certain size "box" at a specific location. The two problems I am encountering are as follows: This long string should wrap when it hits the 4.5 inch limit but it ...
11
votes
2answers
938 views

Breakable vboxes

In Plain TeX how can I make vboxes breakable, and can I handle/measure them separately? What I'm trying to do, is that I have a portion of text, that is treated separately (no indention, narrower, ...
2
votes
2answers
70 views

\usebox with tikz-uml

I would like to be able to reuse components in a state diagram using TikZ-UML. I created a savebox called \giraffe with two components inside and I would like to place these above the initial node and ...
4
votes
2answers
106 views

Is there any easy way to put boxes around text of selected pages with the page number below the box?

I'd like to be able to create boxes around a whole page or selection of pages with the box extending the full length of the page but with the bottom edge of the box above the page number as in the ...
4
votes
0answers
117 views

Reuse an image resp. a box in TikZ but have side-effects only once

I have a huge document (a pool of exercise problems) with lots of \input statements (one file per subexercise). In order to not get lost in this mess and easily open files from the PDF, I include a ...
9
votes
1answer
82 views

\hbox_overlap_right:n{} vs. \makebox[0pt][l]{}

I stumbled about some, to my understanding, unexpected behaviour of the expl3 command \hbox_overlap_right:n. I was expecting all examples below to produce the same result, that is, the frame box ...
14
votes
4answers
4k views

Make an Example and shaded box like in the book

I want to make Examples in the book as in the following book http://www.analogmachine.org/Books/Chapter1.pdf See Page 2... Also shaded box as in the page 3... Pictures can be seen below. ...
9
votes
6answers
4k views

Dashed box environment

I am new to LaTeX and I'm having a hard time trying to create a dashed box environment without success. Can someone please share a code for a dashed box environment such as the one in the image? I ...
7
votes
2answers
244 views

title of a colored box

In an another post, beamer style text box, I've seen a box that I'm interested in making it. However, I would like to use it in a book, and I would like before the title to write: Definition (or ...
14
votes
4answers
6k views

How to draw a square of 1cm in LaTeX filled with color?

How to draw a square of 1cm in LaTeX filled with colour? I found mdframed and framebox does this, but there need to write text inside it. I just need to draw a box.
5
votes
2answers
79 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, ...
16
votes
2answers
350 views

TikZ -The pretty boxes to frame the theorems-lemma-proposition-etc

I came across a website which provides examples of pretty boxes to frame theorems in LaTeX with extension bioboite and not with TikZ. Here is code with: \documentclass{article} ...
1
vote
0answers
47 views

boxed text between pages in arabic, rightmargin with tikz

First, I want to thank the members of the discussion of the message Boxed text between pages which was very interesting for my use, so I got a macro in arabic for my examples (which is ...
2
votes
1answer
84 views

Breaking pages with boxes in boiboites-like

I want to find a method for breaking boxes of my environments of examples (in arabic, with polyglossia.. see ECM below) I saw that mdframed do something like this, but I'm using my own package ...
5
votes
1answer
82 views

Create box around text without creating a paragraph and with line breaking

I want to draw a box (no rounded corners, keep it simple ^^) around one or multiple words. There are two special things: 1) the box should support line break and 2) the box should not cover multiple ...
10
votes
1answer
5k views

Relative padding of a minipage's paragraph

Background Created a custom command for rendering quotations (epigraphs). Problem The text in the following image has no space at the border: The word "and" is flush with the right margin. Code ...
3
votes
1answer
42 views

\scalebox doesnt compile

I want to scale down an equation and after trying lots of examples found on the internet I still cannot compile or see what is wrong. My code looks like: \usepackage{graphicx} .... \scalebox{0.7}{ ...
4
votes
3answers
151 views

specific Box Diagram with multiple arrows

I never did a box diagram before. I tried to build this diagram, but couldn't find a solution for these kind of arrows: Could someone tell me, how to perform this? Thank you in advance. \tikzset{ ...
21
votes
1answer
504 views

Box that behaves like vbox but its width is that of its content?

I need a box that fulfils these conditions: It can contain multiple lines (and paragraphs) of text (unlike \hbox) A line that is longer then \textwidth is split to the next line (like \parbox, \vbox ...
5
votes
5answers
11k views

How can I insert a newline in a framebox?

I have several frameboxes in my document, using the following command: \framebox(115,115){ R-Sq: \newline For example} I want to force a new line, but neither \newline or \\ appear to work. Is ...
2
votes
1answer
244 views

How to scale a dirtree inside a figure?

I drew a tree structure with \dirtree. This tree is located in a {figure} environment. It is possible to adjust the size of the figure? With \includegraphics one can do it with scale. Is there a ...
4
votes
3answers
92 views

parbox + itemize = empty space

Consider the following MWE \documentclass[12pt,a4paper]{article} \begin{document} Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text: ...
15
votes
2answers
573 views

Package for game/playing cards (not only poker)

Is there a package to design playing cards (NOT ONLY POKER and similar card games, but board games like this and that) in TeX (and friends)? I'm well aware of this one and a half years old topic ...
8
votes
1answer
53 views

Minipage width not acurate

I have the following document, with several minipages of 12cm width. Each minipage contains a different number of minipages (with a sum of 12cm for all of them). So every *sub*minipages should fit ...
8
votes
3answers
199 views

Listing background broken by \colorbox and \framebox

I am using listing environment (listings package) with the background parameter. I want to highlight some lines of code and I am using the \colorbox, \makebox and \framebox to achieve this. However, a ...
4
votes
1answer
53 views

Multiply defined labels with \usebox

I want to duplicate some content without re-defining its labels. For example, \newbox{\foobox} \sbox{\foobox}{\vbox{\section{Foo}\label{sec:foo}} \usebox{\foobox} \usebox{\foobox} will emit a ...
3
votes
1answer
57 views

Ignoring actual height and width of box

I would like the following TikZ qtree to come out symmetric: \documentclass{article} \usepackage{tikz-qtree} \begin{document} \Tree[.O [.N O R ] [.O N \fbox R ] [.R N O ]] \end{document} (so that, ...
5
votes
1answer
65 views

\savebox in page header with redefinable commands

I'm making a document class with some redefinable commands for page headers. However, I'm running into the following issue: \documentclass{article} \usepackage{fancyhdr} % In custom document class ...
28
votes
3answers
8k views

How to highlight an entire paragraph?

I'd like to highlight paragraphs such that the highlight color appears as one whole rectangle underlying the entire paragraph. I have looked around but nothing gives me the desired effect so far. For ...
6
votes
1answer
44 views

Vertical alignment of lrbox with minipage inside

I'm trying to make an environment that prints highlighted notes, and I can't get the vertical alignment right. Here's a minimal example: \documentclass{article} \usepackage{xcolor} ...