{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

9
votes
2answers
105 views

Is \c_empty_box intended to be used instead of \mbox{}

At a first glance, I understood \c_empty_box as a replacement of \mbox{} but the following MWE (that points out a weird behavior of \c_empty_box: it is replaced by "æ") gives me serious doubts. ...
5
votes
3answers
102 views

How to make a fixed height-width box with custom padding

I am new to latex, I am trying to include output of TI84 calculator in my document. It is supposed to look like this: Following is what I am able to make. My output's height and width arrange ...
4
votes
2answers
42 views

Uneven spacing between parbox

I have uneven vertical space between two parboxes and between a parbox and beginning of a new text paragraph. How to fix these? Here is a minimum working example. \documentclass{article} ...
2
votes
1answer
97 views

Measure distance from text to bottom margin

I'm making some boxes for providing answers. The box macro takes the height of the box as an argument. I need to measure the remaining space from the line the box starts at, to the bottom of the page. ...
7
votes
1answer
83 views

how to use fbox in align mode

I'm trying to highlight the diagonal elements of a matrix by using fbox but I failed. I've searched for the problem, some ppl suggest using tikz. I don't want to use it, so I decided to use fbox{}. ...
8
votes
2answers
92 views

Is there a way to set a parbox to a minimum height?

I'm looking for a way to make it so that my \parboxes keep a minimum height, similar to CSS min-height, e.g. \mhparbox{\textwidth}{3cm}{...} would ensure that whatever text appears in place of ..., ...
2
votes
1answer
42 views

TikZ mdframed environment: close box at end of page and continue on next

I used the Excursus environment as a template to create my own box like this: \usepackage[style=1,leftmargin=0pt,rightmargin=0pt,framemethod=TikZ]{mdframed} \newenvironment{boxtype1}{% ...
0
votes
1answer
36 views

Boxes within boxes and line numbering

How can I create framed boxes with two columns, where there is a line numbering on every row where there is something written? (if hard or possible then a number for every line in general) Something ...
2
votes
1answer
38 views

How to make gradient ellipse title box with border?

I am using the tcolorbox package, and I want to use a gradient ellipse title box with border on the titlepage. It is possible somehow or I have to use another package to manage this?
4
votes
1answer
148 views

Homework Problem Sheet Template

Could someone make this picture of Homework Problem Sheet Template in sample code in LaTeX with the same font size by the way i already add tow pictures in the front of document to make it more cute ...
5
votes
1answer
66 views

Accessing child contents of LaTeX boxes (append/concatenate TeX box material)?

This is somewhat similar to Reading the contents of a box, but with a specifically plain Latex example; I somewhat solved the question while writing the post, so I'll formulate the question like this: ...
6
votes
1answer
100 views

box all equations of align environment, but not the equation numbers

I want to box (like \boxed{} of package amsmath or \Aboxed{} of package mathtools) the entire block of equations from an align (or eqnarray) environment, but not the equation labels. How can I do ...
1
vote
1answer
54 views

Make box in math mode with current math font

The commands $\mathcal{\mbox{$M$}}$ and \mbox{$\mathcal{M}$} produce different output. I would like a replacement for \mbox that creates a box preserving all features of the current font in math ...
4
votes
1answer
68 views

How to modify colbacktitle, coltext in a tcolorbox with AAUsidebar theme?

I'd like to produce a presentation with beamer. I use the AAUsidebar theme. I want to use my own boxes that I defined with \newtcolorbox. But, I can't not modify the background colour of the title ...
4
votes
2answers
175 views

How can I draw a box around this?

MWE: \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{amsmath} \usepackage[margin=3cm]{geometry} \begin{document} \paragraph*{Problem 1} This ...
1
vote
1answer
35 views

Boxed equation on the right and its verbatim on the left

How to write a verbatim form of an equation on the left and its output form on the right inside a box?
6
votes
1answer
51 views

Why hyperref's \url may be used in preamble within a macro but not within a box?

The following MWE, where a macro involving hyperref's \url is defined in the preamble, works like a charm: \documentclass{article} \usepackage{hyperref} % ...
3
votes
1answer
39 views

Create page break for entire frame without breaking the text flow

I'm including a large, one page box using framed package, with simplest example being: \documentclass{report} \usepackage{framed} \begin{document} Some text ...
2
votes
1answer
23 views

longtabu and rotatebox resulting on too wide table

I'm trying to produce a fixed full-width table, that can potentially span multiple pages. I found that rotating headers with \rotatebox messes up the dimension computation, but I can't find a way to ...
2
votes
1answer
42 views

Building a box for side calculations

I am doing a math assignment, and want to place a box next to my calculations for side calculations. I tried to use the tabular environment, but then there is a huge space besides the box, and the ...
3
votes
1answer
48 views

Boxes with two different border widths

I'm making a box with text inside. For it I use the package mdframed. Essentially I want a box with the left border width 2pt and the rest of the borders width 1pt. What I've got so far: ...
3
votes
2answers
53 views

Automatically add \vfill for breakable tcolorbox

I'm using tcolorbox with nested tcolorboxes, the upper level ones being breakable. Here is an example. \documentclass{article} \usepackage{lipsum} \usepackage{tcolorbox} ...
3
votes
1answer
174 views

How to make an empty box

I am making a sheet where people can fill in answers of various types. For this I would like to make some boxes of certain width and height. How can this best be done? I use \fbox when I want to box a ...
4
votes
1answer
104 views

Print immediately before first word of paragraph, without altering its first line indentation?

Although my case can be generalised, perhaps it would be clearer if I describe a specific example. I need to print a digit as a subscript, immediately to the left of the first line of each paragraph, ...
1
vote
0answers
39 views

Split page first vertically, then horizontal, and finally vertical again, for folding into eighths. Reflow?

I would like to make a letter sized document for folding into eighths for a pocket size pad to take notes and include references, for instance tasks for the day. I may use org-mode exporting ...
2
votes
1answer
121 views

Background colors with mdframed: is this behavior normal?

Introduction With the help of this answer, I tried to define a semi-transparent background for a theorem-like environment. Here is my solution: \documentclass{article} ...
6
votes
1answer
58 views

Unboxing \hrule's?

How do you unbox \hrules such as in this code sample: \setbox0=\vbox{1\hrule2\hfil\break3} \unvbox0 \setbox0=\lastbox % line 3 \unskip % \baselineskip \unpenalty % \break ...
3
votes
1answer
74 views

Unwanted title box on first page of a part

I used the code provided by Gonzalo here Chapter Title in rotated vertical box at the margin The problem I have are: I am using \parts also to divide my document and the box appear in the part ...
2
votes
1answer
74 views

Beamer-Using resizebox changes the position of an item in itemize

I am creating a presentation using beamer. In an itemize environment, I am using resizebox in particular item. When I use it, the position of the bullet changes, as seen in the next image My code ...
9
votes
1answer
92 views

Measuring a part of the page

I'm trying to measure the height of a part of my page. The complete titlepage, along with the part of the page I'm trying to measure is outlined in red, and the code to compile the page is shown ...
4
votes
1answer
66 views

How to skip \newsavebox?

I frequently try out stuff and do a little introspection to find out why things (don't) work the way they do. Using boxes and obtaining their width, height and depth is an integral part of this. As ...
4
votes
3answers
81 views

Newline is not working with parbox and usebox

I would like to save data to a savebox (or any other storage element) in iterations. At the end I would like to put each datapoint in a framebox and then in a frambox container with a given width. ...
0
votes
1answer
40 views

How to keep increasing counters for content that is (optionally) hidden?

I have a framework for creating exercises, where the content of the solution to each subproblem is fed into a \solution-macro, which only displays its content if a global boolean is set to true. What ...
1
vote
1answer
133 views

(color-) Box spanning two out of three columns

I desire a layout that has, say, an "info-box" (for the lack of better wording). The main layout of my document uses a three column layout. I intend to place a colorbox (two columns in width) in such ...
7
votes
2answers
129 views

\hbox spread in plain TeX

I want to learn Plain TeX to understand the underlying mechanics of TeX and friends. I am trying to reproduce the spacing of this dedication from the Spanish music-theory treatise, El porque de la ...
4
votes
2answers
54 views

Line breaks in \fbox

I sometimes have bits of text I want to emphasize. My idea is to change the margin with changepage's adjustwidth and then frame the text with \fbox. The problem is this prevents linebreaks. For now, ...
3
votes
4answers
224 views

Fitting fancyhdr's chead in a colorbox

I am trying to create a header using fancyhdr in which the rhead and lhead parts are two images, of the same and known size. In the center, I would like to put some text (perhaps the document's ...
4
votes
3answers
111 views

Restrict text to box without linebreak

This: \fbox{\makebox[3cm][l]{long text long text long text long text}} results into this: I want it to stop right at the end of the box. No line-wrapping. So the text, which is 'too much', ...
16
votes
4answers
901 views

How to draw the following box using TikZ?

How to draw the following boxes using TikZ? EDIT (22.09.)
5
votes
3answers
176 views

How to make more than two fancy gradient stripes in tcolorbox?

I use the following fancy tcolorbox definition: \newtcolorbox{mybox}{colframe=black!80,colback=black!10,sharpish corners, skin=bicolor,interior style={left color=black!5,right ...
5
votes
1answer
68 views

move text box outside the textwidth

I used tcolorbox to make a semi-transparent box as explained in this link. What I need is to offset this box from the center of the texwidth, this means crossing a bit the border of the textwidth. Is ...
4
votes
1answer
192 views

text with semi-transparent color filled box

I have this text: \begin{flushleft} \fontsize{16pt}{16pt}\selectfont\textit{some text}\\ \fontsize{16pt}{16pt}\selectfont\textit{some text} \end{flushleft} and I would like to have a filled ...
4
votes
2answers
100 views

How to relax the horizontal spacing rules for one line?

I have a line that happens to end in a non-breakable code-fragment This is a long line that ends in a \pre{std::ostream} long word. When printed the line is too full. The spaces between the words ...
5
votes
1answer
104 views

How to use wider and higher margins in a beamerboxesrounded box?

I love beamerboxesrounded boxes in Beamer presentations, but the text fits too tightly into the box. So I would like to use equal but wider and higher margins (left, right, top, bottom) around the ...
5
votes
3answers
133 views

Long list of tabular figures inside minipage goes off page

Using the follow MWE, I'm able to create a beautiful lists of photos on the left and a caption on the right (similarly, I could also use the sidecaption package or floats directly). MWE [LuaLaTeX]: ...
5
votes
1answer
64 views

\vbox and vertical spacing between lines

When I put a text in a \vbox and \unvbox it, I have extra space between line. Why? See the MWE: \documentclass{article} \begin{document} \newbox\titi ...
0
votes
3answers
73 views

header rule margin with boxes

I'm creating a document with a box in the header and an other one in the footer. But I would like to have the same space between the bottom of the top box and header rule and between the top of the ...
0
votes
2answers
70 views

Ignore particular tabular cell height and simple overflow its content (like \multirow)

I want latex to ignore the height of a tabular cell and to overflow its content to the above and below tabular cell (see image - red arrows). First I tried \multirow but this doesn't align the text on ...
1
vote
0answers
19 views

\parboxes with facing pages in `eledmac`/`eledpar`

Currently I'm trying to typeset a document with facing pages using eledpar and eledmac. On some pages I'd like to fill in images between paragraphs. In order to have a predictable height for these ...
2
votes
1answer
98 views

Rescale paragraph to fit margins or detect used width of paragraph

I want to write a command or similar that allows me to rescale a given paragraph to fit a given frame, keeping the aspect ratio. The problem is that the paragraph is usually manually set and not ...