Questions tagged [boxes]

{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.

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

Relative height in bc-logo box

I use boxes defined with the bc-logo environment. I would like my boxes to reach the end of the page independently of the text length. For this, I use the \vspace command, but I have to adjust the ...
1
vote
1answer
34 views

How do I make sections with different sizes in a rectangle/box?

I was inspired by how HAL is shown in this picture and would like to make something that is more or less the same in latex. This is my current code: \documentclass{article} \usepackage[utf8]{...
2
votes
2answers
136 views

Typesetting a fancy grid of figures

So, I need TeX to arrange the page as can be seen below. More specifically, to arrange vector graphics .pdf figures in a rectangular grid, with strict fixed boundaries, captions below and possibly ...
1
vote
0answers
32 views

How to offset and fill extra tick labels with same size boxes

in the code provided below, I wanted the extra x tick labels to show up better by including an opacity filled box around the text so that the text shows up better with the boxes above the x-axis and ...
2
votes
1answer
32 views

Remove all elements that are not inside a specific command

I want to typese a document so that all words/elements that are not inside a certain command are swallowed. I.e. I want the following code: \documentclass{article} \newcommand{\mycommand}[1]{...} ......
1
vote
1answer
82 views

Multiple choice questions with proposed answers in random order — addition of automatic correction (cross mark)

Considering my two previous questions: Squares for answer choice options and perfect alignment to mathematical answers First @egreg's code \documentclass{article} \newcommand{\squarecap}[1]{\fbox{\...
4
votes
1answer
83 views

How to put a vbox in hbox?

I tried this but it does not work: \vbox{ \hbox{ {top-left} {top-right} } \hbox{ \vbox{ {bottom-left-top} {bottom-left-down} } \vbox{ {bottom-right-top} ...
0
votes
0answers
44 views

How do I display a character in a box sized by its sidebearings?

I'm trying to make a font specimen, and want to show each glyph within its bounding box. \framebox{} looks like the right thing to use, but the box it prints doesn't accurately reflect the actual ...
0
votes
1answer
21 views

Strange line break in tablenotes (of ThreePartTable)

I'm using the threeparttable and tablenotes packages to create footnotes for tables. I've found that to get the design I want (hanging symbols, not superscript), I can simply use the para option and ...
1
vote
0answers
68 views

Ideas for presenting the research question?

I know this is a very open questions, however I am looking for some impressions as I am totally unsure in what style I can do this. I am writing m bachelor thesis right now and want to present my ...
0
votes
0answers
50 views

Text goes outside of colored box - how to fix?

My coloured box should look like this: but here's how it looks: So the fonts are different and the colours are also a bit different. It is described by this LaTeX code. I would appreciate some ...
2
votes
1answer
36 views

Avoid empty first slide with xsavebox in beamer

The following code, where I want to define some saved boxes I refer to throughout the document, produces an empty slide before the title slide (compiled with mklatex -pdfxe, it works fine with ...
1
vote
3answers
61 views

How to prevent forced line break between vbox and text when vbox starts a line and precedes text?

I was surprised to copy a character (I'd spent so much time to trim whitespace around) from a \vbox just to discover that it forces a line break whenever it precedes text (on the same line). Below is ...
2
votes
2answers
80 views

How to move \fbox vertically, or how to frame \vbox or \vtop and move it vertically (through the baseline) without changing the size of the box?

I need to be able to move a \vtop or \vbox vertically without changing the box size, but it gets stuck at the baseline (you can pad the contents of the box up or down but you can't seem to move the ...
2
votes
1answer
78 views

What does \leavevmode do?

Based on this question and the amazing @egreg's answer, I decided to make some tests to study and learn some boxes behavior. More precisely, to understand the \leavevmode. In the first example, one ...
0
votes
1answer
58 views

how to see the layout boxes in a math formula? [duplicate]

Let's try a standard calculus formula, here the code \documentclass[12pt]{article} \begin{document} $$ \int_0^\infty \frac{dx}{1+x^2} = \frac{\pi}{2} $$ \end{document} Here is the result of the ...
0
votes
1answer
50 views

How to create a two by two matrix box

I want to create a two- by-two matrix box like the one in the picture. Do you have any idea how to do that?
0
votes
1answer
64 views

How to calculate the size of a tikz node

I'm trying to customize a template, in which the following snipet generates a "mini table of contents" respect to the book's part which is created. \node[anchor=south east,inner xsep=1.7cm,inner ysep=...
2
votes
0answers
34 views

How can I tell how big a minipage is?

I'm debugging a document layout that uses a minipage, and I've seen somewhere where you can turn on an option to draw rectangles around the various boxes for debugging. However, I tried searching and ...
1
vote
0answers
78 views

Printing numbers in tcolorbox

I was able to solve a significant part of the problem, trying to alter the game header in this manner. The last problem is the handling number. How can I alter the header below to transform it the ...
1
vote
1answer
46 views

Making a restatable boxed theorem

This is probably very simple to do, but I am trying to write restatable theorems with boxes around them. Looking at this answer, box around theorem statement, I get a way to put boxes around a theorem,...
2
votes
0answers
122 views

Get next chunk of text (of specified size) contained in a macro

Let's say we have a lot of text to be typeset contained in a single macro, let's call it \myverylongtext \newcommand{\myverylongtext}{ This is some really long text: \blindtext[4]. And it ...
4
votes
1answer
208 views

When should I use a \box register rather than \def? [duplicate]

\def is sometimes used as an abbreviation of a box construction, then its output is sometimes the same as the output with a \box register instead of \def. Here is the question. When should I use a \...
0
votes
0answers
67 views

Can we make a better shaded/framed/boxed environment?

I have grown quite fond of Donald Arseneau's framed package. However, there are a few tweaks I would like to add, but not sure how. Whether to merge the two environments framed and shaded, or modify ...
3
votes
1answer
253 views

How to \copy contents of a box without copying the box itself?

Self-describing sample % pdfTeX \newbox\thbx \newbox\thhbx \setbox\thbx\hbox{abc} % HOW TO COPY THE CONTENTS OF THE BOX % WITHOUT ACTUALLY COPYING THE BOX % ITSELF ALONG WITH THOSE CONTENTS? \...
2
votes
1answer
34 views

Why is etc. added at the end of a \vbox, and what does it mean?

A short sample code % pdfTeX \newbox\thbx \setbox\thbx\hbox{abc} \newbox\tvbx \setbox\tvbx\vbox{\unhbox\thbx} \showbox\tvbx \bye would output \thbx=\box16 \tvbx=\box17 > \box17= \vbox(6.94444+0....
0
votes
0answers
12 views

Overfull \hbox while using the “quotation” environment in a beamer document

Why is is that I get a Overfull \hbox warning whenever I use a quotation environment within a list in Beamer? Take, for instance, this file: \documentclass{beamer} \usepackage{lipsum} \begin{document}...
0
votes
0answers
37 views

How to display the index-number of the current box

In LaTeX (or maybe in TeX), how one can get notified about the "index" to the current LaTeX or TeX-box? For example, say an empty page is created in LaTeX; we firstly add a paragraph and then a ...
0
votes
1answer
178 views

How to stop \newsavebox giving me bad boxes warnings or how to use better names with \setbox?

The original answer from list of figures and tables when there are no figures or tables?, does not give me any bad box warnings: \def\wheninteresting#1{% \setbox0\vbox{#1}% \ifdim\ht0>35pt \...
0
votes
1answer
43 views

How memoir prints the titles of the content pages?

On the question How to dynamically calculate the height of an empty list of things?, I learned I am required to now how my class calculates its contents page title in order to make the answer to works....
0
votes
0answers
37 views

Why \pdfbookmark keeps adding to the PDF bookmarks while \addcontentsline{toc} does not add the table of contents?

Following the answer of David Carlisle on list of figures and tables when there are no figures or tables? \documentclass[10pt,twocolumn]{article} \usepackage{lipsum} \def\wheninteresting#1{% \...
1
vote
1answer
72 views

How to make a custom requirement card like Volere's?

I need to create a simplier version of the Volere's Requirement card. Here it is: Since I only know the very basics of LaTeX, I don't know how to create a template for this from scratch. My idea was ...
6
votes
2answers
62 views

How can I hide the source code that overflows a listing's frame?

I've two side-by-side listing boxes that compare input and ouput code. How can I tell LaTeX to hide the code that is printed outside the listing boxes? Here is the LaTeX code: \documentclass[...
0
votes
0answers
25 views

Making a breakable empty box in exam class

In the following MWE, the empty box appears in the second page because it doesn't fit the first one: \documentclass[11pt,a4paper]{exam} \begin{document} \begin{questions} \question Text ...
0
votes
0answers
14 views

How do you adjust the transparency/opacity of active and non-active sections in the beamer footer?

I'm using pdflatex, beamer class, boxes theme. I have a footline with the sections of my document listed there. It slightly grays out the non-active section titles in the footer, but not enough. How ...
6
votes
3answers
138 views

Wrapping tikz environment with savebox

I wanted to build an environment that allows to save tikz pictures as boxes. This is the code that I tried: \documentclass{standalone} \usepackage{tikz} \begin{document} \newenvironment{...
0
votes
2answers
104 views

Typeset glyph boxes from The TeXbook, chapter 11

I've tried an example from The TeXbook but I do not get what Knuth says: see the snippet below. I should have got some rectangles but instead I've got the aligned text which has letters exactly as ...
1
vote
2answers
70 views

How to draw a box around some text?

I'm new to LaTeX, so please excuse me if this is something basic, but I've been reading the "Not So Short Introduction to LaTeX", and Googling this with no success. I have larger chunks of text I ...
2
votes
2answers
34 views

Same text alignment inside a parbox as the environment where it is

How \parbox could "inherit" the "alignment mode" used in the environment where it is called? In other words, how can I automate the text alignment setting into a \parbox, in order to take the same ...
2
votes
1answer
118 views

Show Bounding Box for Any Object

This seems like such a simple problem but I cannot seem to find an answer mixed in all the questions about drawing boxes. I want to be able to draw a bounding, not a frame, but a bounding box. One ...
0
votes
1answer
54 views

Interactive rectangles when clicking or hovering

This is my bibliography: When you click the link, it makes this color: The table of contents also does this. What is this functionality? How can I change the colors?
1
vote
1answer
52 views

Box spanning multiple pages as a float

I am trying to create boxes spanning over multiple pages considered as floats. I defined boxes as floats which I can refer to using a \DeclareFloatingEnvironment. It works well. I find a way to ...
0
votes
0answers
42 views

Are underlines obtained using boxes?

Can I have different kinds of lines actually drawn using LaTeX boxes? I was curious to know about the definition of \underline{}. I am sure it uses boxes, because If I type something like this - \...
1
vote
1answer
86 views

tcolorbox is not breakable with fix height

I create the following "empty box" with predefined height. I use the command \emptybox defined below \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{skins,breakable} \newcommand{\...
1
vote
1answer
66 views

e-TeX \hbox to size of glue

I have a piece of glue (\hskip 2.4in plus 2fil specifically) that's flexible, and I want to create an \hbox to the same length, but \hbox to 2.4in plus 2fil doesn't work. Is there a way to achieve a ...
0
votes
1answer
64 views

How can I use \dbox in a caption? [duplicate]

I’m trying to use a \dbox from the dashbox package in the caption of a figure, like this: \documentclass{article} \usepackage{dashbox} \begin{document} \begin{figure} \centering Imagine ...
4
votes
2answers
84 views

Overful hbox (How to make the sentence in a table into 2 line?)

\begin{table}[h!] \centering \begin{tabular}{l|c |c |c |c |c |c} 1 & 2 & 3 & 4jkjhkjkhjhkjkjkjl & 5fsdsadsadasdsadsadasdsadsa & 6dasdsadasdasdasdasdsadasdsa \\ ...
2
votes
2answers
56 views

How to align vertical lines of two back-to-back longtables?

The result of the following MWE \documentclass[letter,10pt]{article} \usepackage{makecell} \renewcommand{\cellalign}{tl} \usepackage{longtable} \usepackage{fontspec} \usepackage [ left=1.5cm, right=...
0
votes
0answers
30 views

How can I put all examples and theorems into boxes with different shaded in Lyx?

I am in the middle of writing a book with Lyx. I have definitions, theorems, examples, and solutions. Is there a way to put all definitions, theorems, examples, and solutions into boxes with ...
5
votes
1answer
160 views

Question about exercise 17.16 in TeXbook

The answer to the exercise is: \def\sqr#1#2{{\vcenter{\vbox{ \hrule height.#2pt \hbox{\vrule width.#2pt height#1pt \kern#1pt \vrule width.#2pt} \hrule height.#2pt}}}} \def\square{\mathchoice\...

1 2 3 4 5 27