Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

4
votes
1answer
53 views

Removing characters from already built hboxes

Section 5.9.6 of TeX by Topic shows an algorithm for dissecting a vbox into the individual lines in form of hboxes by repeatedly removing the last line with \lastbox. Similar commands exist for ...
4
votes
2answers
74 views

Truncating multi-line text

We can use the truncate package to truncate a piece of text so that it fits e.g. in a 5cm wide box. However, the package can only handle one line of text. What if I have got a (possibly long) text ...
7
votes
3answers
876 views

Creating a nice-looking box without using minipage

I would like to create the following box and title without using minipage With : small box before Title Title with counter \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{...
2
votes
0answers
59 views

How to see the box to debug or learn LaTeX?

For example, I want to see the boxes implicitly generated by alignedat. I want to see how \lineskiplimit and \lineskip work and also the particular spacing between the current row and the previous one....
3
votes
1answer
38 views

\comment (verbatim-package) inside \parbox throws errors - What is the problem?

I have defined my own environment - lets call it 'myenv' - which shows and hides its content based on some global settings. I'm using the \comment and \endcomment commands from the verbatim package, ...
4
votes
1answer
152 views

Vary transparency of colorbox in a sentence

I have a long sentence, where I want different parts of the sentence to have different transparency. The entire sentence should, however, be wrappen within a colorbox: \documentclass{article} \...
0
votes
1answer
49 views

LaTeX/plain TeX macro: style a box with custom borders and padding

I'd like to make a LaTeX environment for a styled box without using any additional packages, just defining some lines and spaces. I have already come far, but failing with the last line I imagined in ...
1
vote
1answer
51 views

Boxing The Entire Align Environment

Here's my code : \documentclass[12pt,a4paper]{report} \usepackage{multicol} \usepackage{enumitem} \usepackage{amsmath} \begin{document} \section{New Section} \begin{multicols}{2} \begin{enumerate}[...
10
votes
2answers
150 views

How to align consecutive \leaders properly?

I’m trying to build a construct with a box of a fixed filled with \leaders followed by \leaders with \hfill. However at the moment there is a little gap between these two making the pattern irregular, ...
0
votes
1answer
46 views

How to prevent reference to enumeration inside new environment?

I defined a guidancebox envirenment, which is similar to the longtable environment, only with a different counter/ caption tag and reference label. This works fine, except if I use enumerate inside ...
5
votes
1answer
102 views

How to create a (colored) box that hangs into the left margin?

I'm trying to highlight some parts (paragraphs) in a document. For this I want to use a box, with the paragraph number hanging out into the left margin. However, I don't really know how to pull this ...
1
vote
1answer
48 views

How can I get all box of a vertical list?

I know \lastbox is the last box in current list. Now my questuin is how can I access all boxes in current list. Thanks in advance.
1
vote
1answer
47 views

Insert paragraph that takes no vertical space aligning at normal text baseline

I want to insert a block of text (could contain anything) that takes up no vertical space, but also aligns with the normal text baseline. (I feel like this is probably a duplicate, but I can't it.) \...
2
votes
0answers
27 views

Remove ugly borders around clickable cross-references for Equations and Footnotes but keep them for figures, table and citation

I know that hyperref can make cross-references and hyperlinks clickable and I know how to get rid of all the border(the little green boxes around the clickable area) from this post, but I would like ...
6
votes
1answer
148 views

What is difference between \box and \unvbox or between \box and \unhbox

What is difference between \box and \unvbox or between \box and \unhbox.
0
votes
0answers
48 views

space between two vbox

I have two vboxes and I want space between two vbox be exactly same as space between two line of paragraph. \documentclass{report} \usepackage{lipsum} \setlength\parindent{0pt} \linespread{2} \begin{...
0
votes
1answer
33 views

Draw boxes with text inside [duplicate]

Can anybody show me how to do the boxes in the image attached in latex. Thanks ahead
0
votes
1answer
15 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 ...
0
votes
0answers
16 views

making a framed box full of numbered text (with caption) in TeX?

I am looking for a way to make a box that has a frame and can be given a caption in a TeX article. I would like the text inside the box to be line numbered. Is there a simple way to achieve this? What ...
0
votes
1answer
36 views

Corrupted nfss table, overfull hbox and undefined control sequence when testing fonts

I just installed texlive and I am running a series of tests recommended in section 3.5 of the official documentation. The tests are working as expected but when I get to testfont.tex I am getting !...
6
votes
1answer
148 views

Using \color inside a \parbox causes vertical displacement

When modifying my answer to this question I came across some odd behaviour. If \color{<color>} is used at the start of a top-aligned \parbox, then the entire box is moved downwards, like this: \...
2
votes
2answers
127 views

How to force the extended line in Tikz picture stay in the box

\documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections,calc} \usepackage{tcolorbox} \tcbuselibrary{most} \newtcolorbox{mybox}{% colback=yellow, hbox } \begin{document} ...
3
votes
2answers
163 views

How to use silence package to silence “underfull” and “overfull” warnings?

I can't figure out how to get rid of the "underfull" and "overfull" warnings using the silence package (I am able to use it to hide some other warnings, but not these). What should be the correct ...
3
votes
1answer
40 views

How to `ignore' space demands in math mode

Sorry for the title, I couldn't come up with a better one. I need to typeset an integral like this. \int\limits_{f(x) < g(x)} \mathrm{d}x\,F(x) The point is that the condition for the domain of ...
0
votes
0answers
24 views

Make border for title of section and subsection

Hello how can i make border to the title of section and subsection. \documentclass[12pt]{report} \usepackage[francais]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{...
1
vote
1answer
56 views

Figure Border and title

Hello how can i do lik this border and title to the figure. \begin{figure}[h] \begin{center} %% Ici je « lis » LogoMinesNancy.jpg \includegraphics[height=9.5cm,width=16cm]{oragni} \end{center} \...
1
vote
1answer
41 views

How can I get the max height of a group boxes in an environment without incrementing a counter?

Here I use three macros \a, \b, \c which are captured into \BODY. I measure the height of \BODY and set the height \nodeboxht register to its result. This ensure the height of all boxes match the ...
2
votes
3answers
227 views

Boxing a component of multi-aligned equation

Suppose I have a multiply-aligned equation. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{3} A &= B &&= C \\ D &= E &&= F \\ G &= ...
2
votes
1answer
27 views

Bounding boxes for each column of a 2-column algorithm & align them flush with page margins

I have two sub-algorithms for side-by-side placement using the algpseudocode layout from the algorithmicx package. Since each sub-algorithm needs to be individually referred in text, I chose the ...
2
votes
1answer
19 views

Algorithmicx - caption alignment of 2-column sub-algorithms of different height

I have 2 sub-algorithms that need to be placed side-by-side (2 columns) using the algpseduocode layout from the algorithmicx package. Since I need to refer to each of them individually in the ...
0
votes
1answer
48 views

what is the correct value to move horizontal rule and join it with vertical rule between minipage?

I am redoing the logos (in word) used by my school, I have managed to align the images and the text, but, I can not find the correct value to move the horizontal rule and join it with the vertical ...
1
vote
1answer
43 views

adaptive alignment

I'm creating .tex file for batch creating visit cards. There is a logo in the top left corner and the baseline for the holder's is above the logo bottom edge. In 90 % of cases, the name and titles ...
3
votes
1answer
68 views

create Inline Boxes

I would like to create two boxes next to each other horizontally, each containing text. I'd like the border to be black and the background white. Here's my attempt at reproducing it \documentclass{...
1
vote
2answers
154 views

tcolorbox with title on the left side

How can I put the title of a box (with tcolorbox) on the left side (text rotated by 90°), like this? _______________________________ | | | | T | Lorem ipsum ...
4
votes
2answers
193 views

Attractive chapter titles and sections styles

I came across a website where i found this attractive design for chapter titles and sections. https://webusers.imj-prg.fr/~leonardo.zapponi/leo_divers/Agreg/Matrices_normales.pdf Here's my attempt ...
4
votes
1answer
83 views

Color bottom of the page starting from footnote

Is this a realistic request? \documentclass{article} \usepackage[ paperwidth=32pc,% paperheight=48pc,% margin=5pc,% ]{geometry} \usepackage{libertine} \usepackage[T1]{fontenc} \usepackage[...
3
votes
2answers
177 views

Creating Beautiful box

I would like to create (blue!70) box contains method of how I use geogebra \documentclass{article} \usepackage{tikz,lipsum,lmodern} \usepackage[most]{tcolorbox} \usepackage{wrapfig} \usepackage{...
11
votes
1answer
300 views

TeXbook - Chapter 12: Glue - Exercise 12.8

Exercise 12.8 Assume that \box1 is 1 pt high, 1 pt deep, and 1 pt wide; \box2 is 2 pt high, 2 pt deep, and 2 pt wide. A third box is formed by saying \setbox3=\hbox to3pt{\hfil\lower3pt\box1\hskip-...
4
votes
2answers
72 views

How can I dynamically set the box height to the max height of a group of boxes?

What is a technique I might use to have TeX calculate the max height of a group of boxes and then typeset all boxes using that height? I'd like to automatically have TeX detect the middle box and set ...
1
vote
2answers
55 views

How do I draw a box with these exact dimensions?

I'd like a box that looks exactly like this, width 5 units, height 7 units, each dot measuring 1 by 1 unit: I've tried the following (including fiddling with the numbers): \begin{tikzpicture} \...
1
vote
1answer
44 views

LaTeX break before box

I have a document involving multiple colorboxes containing 1-3 words each in a single line, separated by ,. Imagine typesetting a couple of boxes in a line, so that there's only 3cm of space to the ...
0
votes
0answers
22 views

empheq equation flows out of column bounds [duplicate]

I am using the boxed equation format shown here. However, it flows out of column bounds when following the IEEE journal format as shown in image. \documentclass{article} \usepackage{color} \...
3
votes
2answers
132 views

Boxed and colored a two-line equation

I have the following mwe. I want to color and box only the equation except the equation number. I tried using {\color{} } and \mybox{} but they didn't work. Any help is much appreciated. \...
5
votes
1answer
102 views

how can we get all these parboxes to align?

I have been reading Leslie Lamport's book on LaTeX and he discusses parboxes. He notes: Many LaTeX users fail to realize how much they can do with the box-making commands described above. I will ...
4
votes
1answer
59 views

Box several arrows in different levels

So I've drawn this diagram \begin{tikzcd} & & & 0 & \\ 0\arrow[r] & \ker{d^i}\arrow[d]\arrow[r] & A^i\arrow[d]\arrow[r] & \Ima{d^{i-1}}\arrow[r]\arrow[u] & 0\\ 0 ...
2
votes
1answer
37 views

How to resize different blocks in latex

I am trying to create a template like in this image. And for this i have this code: \documentclass{article} \usepackage[landscape]{geometry} \newcommand\Block[2]{% \setlength\fboxsep{0pt}\...
13
votes
0answers
157 views

What explains this discrepancy between LuaTeX and other engines?

I answered a question about hyphenating already-hyphenated words (like “already-hyphenated”, or “often-hungry”), and this came up. Consider the following input file (uncomment the first three lines if ...
3
votes
1answer
39 views

Centered text results in underfull \hbox

\documentclass[version=last, paper=A4, DIV=12]{scrartcl} \directlua{pdf.setminorversion(7)} % % Packages % \usepackage{fontspec} \usepackage{fontawesome5} \usepackage[english]{babel} \usepackage[...
1
vote
1answer
57 views

Overlaying xsavebox with qrcode

As a continuation of the question Producing a document with a lot of almost identical pages in the most efficient way I am trying to overlay my xsavebox with a qrcode. However, something fails: qrcode ...
1
vote
1answer
80 views

Beamer: Make logo from headline overlap into frametitle

Goal I'm trying to create a beamer theme where in the top we have the following layout: ________________________________________ | | | | Author & Insitute ...