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

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.

1
vote
1answer
34 views

How to make this rectangle with an image on the left?

Here are two examples of the formatting I'm trying to recreate: I'm trying to recreate this style as closely as possible (including the slight shadow), but I don't know the font. I'd also like the ...
0
votes
0answers
23 views

How to make a box fill the whole line?

I would like to add a title that takes up the whole width of the page before a paragraph, similar to the way the \section command works, but with the regular font size and without incrementing ...
15
votes
3answers
1k views

How to make boxes like these?

I'd like to have custom commands for making boxes that look like the Wolfram|Alpha entities in Mathematica notebooks: \LinguisticAssistant{france} \Entity{France}{country} I've done the work of ...
1
vote
2answers
34 views

How do I get tikzpictures to overlap on the same page?

I have two complex TikZ drawings that need to overlap (appear on the same page). I can't put them into one tikzpicture, because different scale parameters need to be applied to them. Minimal example: ...
2
votes
1answer
35 views

How to create empty boxes at right page margin in exam class

I want to create exams. Therefore I will use the exam package. How can I create emtpy boxes at the right page margin? I need this for adding up the earned points of each question. My current ...
0
votes
1answer
21 views

Why are my boxes not the same height when specifying height as a function of width and content?

I save a box containing a \parbox. I set height of other \parboxes to the height of my saved box using TeX \the\ht\box Code For some reason, not all boxes are of the same size. \documentclass{...
1
vote
0answers
41 views

Using boxed with newline in it [duplicate]

I am new to LaTeX, cant figure out this issue. I want a box around the following equation. \begin{equation} A State S_{t} is Markov if and only if : \newline P [ S_{t+1} | S_{t} ] = P [ S_{...
6
votes
1answer
124 views

draw the container box of a glyph

I'm doing a practical job and I need to place the glyphs of some typographies inside the box that contains them. I do not mean a box in common, but the box that contains the glyph and allows you to ...
3
votes
2answers
110 views

Getting errors while trying to box a colored text + math with less than 6 lines of code

First time Latex user here I am trying to box a text plus math using the following code \documentclass[]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{xcolor} \begin{document} \...
0
votes
0answers
11 views

Box Multiple Lines in Align Environment [duplicate]

I have been searching through this StackExchange for a while and have not yet come to a question like the one I am trying to solve. I have one align* environment and I am trying to box two lines. Here ...
2
votes
1answer
47 views

Nested boxes around a few items in an itemize environment

this is kind of a follow up of this question, where someone asked how to create a box around a few items in an itemize environment. I'm facing a similar issue, but my case is a little bit more complex,...
2
votes
1answer
44 views

How to set different length for different borderline of a box using tcolorbox?

I would like to create box of example using tcolorbox as the picture below: and so far this what i got Here is my code : \documentclass[justified]{tufte-book} \usepackage[most]{tcolorbox} \...
2
votes
0answers
35 views

\savebox doesn't work inside tikz foreach loop [duplicate]

I need to process listed content passed to a \foreach loop inside a tikz environment. But \savebox seems not to behave the same as outside tikz. In particular, the following code: \documentclass{...
5
votes
1answer
60 views

Tikz node not showing saved box

I have a series of complicated content I'm trying to present using TikZ. The code is highly regular, so I wanted to write a simple command to handle everything. In the following code, \aelabelA and ...
5
votes
1answer
59 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
95 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
917 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
61 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
50 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
175 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
54 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
63 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
165 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
53 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
108 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
50 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
56 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
29 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 ...
7
votes
1answer
177 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
56 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
37 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
23 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
19 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
53 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
171 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
147 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
220 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
43 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
32 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
64 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
43 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
232 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
29 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
25 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
50 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
44 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
72 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{...
2
votes
2answers
316 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
229 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[...