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
2
votes
1answer
68 views

\box_new:N for use with \hbox_set:Nn

My question is regarding \l_tmpa_box. Consider the following code: \ExplSyntaxOn \hbox_set:Nn \l_tmpa_box { \includegraphics[scale=0.125]{images/shc_logo.pdf} } \dim_new:N \l__shc_logo_dim \dim_set:...
4
votes
2answers
52 views

Boxing Multiple Lines in Split

I want to put a box around the final two lines in this \begin{equation} \begin{split} \left\langle\vec{u}\right\rangle&=\frac{1}{4}\Re\left(\epsilon_0\vec{\overset{\sim}{E}}\cdot\vec{\overset{\sim}...
0
votes
1answer
44 views

\hbox issue in RTL context (vmode)

Consedering this example \hbox in RTL context appears on the left isn't it supposed to appear on the right side with \pardir TRT!? \documentclass{article} \usepackage[showframe]{geometry} \...
3
votes
0answers
149 views

LuaHBTeX: \copy contents behave differently from \box for copy-paste — by making contents tofu 􀈽 for reordered glyphs or by adding spurious space

Here's an example of a tex \vbox with some devanagari text in it. My code adds contents of \vbox to document twice, first its copy (using \copy), and later itself (using \box). Both copies look ...
3
votes
2answers
46 views

removing spaces between shaded frames and within it

I have written a a few latex lines to mimic the shaded boxes shown in the below picture: However, my result so far looks like the following: which doesn't look completely like the above image. My ...
0
votes
1answer
17 views

how to add separate text boxes with different background colors and titles

Here a phd thesis can be found which that has a feature shown in the below picture: where two separate boxes with different colors are shown to include a title and some paragraphs in them. Does ...
0
votes
2answers
25 views

Frame two picture (subfloat) and its caption

I am looking for a way to add a box / frame around two figures and their caption. I am using subfloat for the sub-figures as it was the simple way to have two figures together under 1 caption. Does ...
0
votes
0answers
23 views

tikz \savebox only showing part of image

I can't get tikz to show the whole image created by using \showbox. I think it is a node issue and have tried using a scope and using local bounding box but that doesn't work either. I have posted the ...
0
votes
0answers
14 views

Positioning minipages vertically and horizontally

I am trying to put different minipages (boxes) of different length and height to fit the empty spaces best, however I have no idea how to solve the problem: Here's my code and here's what I want to do:...
0
votes
0answers
21 views

Setting width in makebox

So no matter how narrow I set the box the text still runs off the page e.g. \makebox[0.2\width][t] Also, I could not find how to set the length in the documentation. p.s. I assume that boxes behave ...
2
votes
3answers
34 views

Issue using resizebox within equation and split environments

I have an equation below that is wrapped in an equation and split environment. Because the equation is long, it will run over the margins, so I used resizebox. According to this SO question I need to ...
1
vote
1answer
52 views

plot block matrix with braces inside the matrix

how could I plot this block matrix? I tried to plot it with this code but braces is still remained. ` \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{nicematrix} \usepackage{amscd} \...
0
votes
1answer
21 views

How to use multi-line text in fcolorbox

I wanted to use multiline with \fcolorbox. I have tried using // but it is not working. Code: \documentclass[12 pt, a4paper]{book} \usepackage{multicol} \usepackage{geometry} \geometry{ a4paper, ...
0
votes
1answer
41 views

How to ignore bad boxes with ieeecolor?

I am using ieeecolor.cls for the first time - get it from https://www.embs.org/tmi/authors-instructions/, namely, https://www.embs.org/wp-content/uploads/2020/04/TMI-Template-LaTeX-2020.zip What ...
2
votes
1answer
21 views

Tabularx and colortbl conflict inside a savebox

My overall goal is to build a table inside a savebox so I can easily fill the page with multiple copies. Someone recommended using tabularx, which worked well until I also tried to use the colortbl ...
2
votes
1answer
53 views

Wrapping text around a figure (under the hood)

I have a question about some of the packages out there that are used to wrap text around figures. Not looking for help with code or anything, just want to understand how TeX can be told to do this, ...
0
votes
1answer
70 views

How do I create diagrams with boxes and arrows in LaTeX using TikZ?

I would like to create a diagram like the picture above using TikZ. I have very little idea about TikZ since I have never used it before. I would like to create a diagram to demonstrate shallow copy ...
1
vote
2answers
38 views

Justify box at the left margin while keeping \parindent glue/obeying \noindent if present

How to define a command which takes two arguments and from the first argument makes a new paragraph where the right margin of a box containing the second argument is justified at the left margin of ...
1
vote
1answer
40 views

Why does unhboxing seem to ignore vertical mode and why does unvboxing seem to ignore horizontal mode?

First question Why does unhboxing seem to ignore vertical mode and why does unvboxing seem to ignore horizontal mode? The MWE after the next two pictures both delivers the text of the first question ...
0
votes
0answers
16 views

\includepdf position

I'm writing a report including some pdf cropped cause the rest of the page is blank, but neither with a minipage I can put it between the sentences. Here is the code: \section{prova} \lipsum[2]...
1
vote
1answer
52 views

How to add signs next to a figure?

I want to decorate the side of a figure with signs. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{float} \usepackage{graphicx} \begin{document} \begin{figure}[H] \centering ...
1
vote
0answers
17 views

Change global settings on framebox, margin above [closed]

How do I change the global settings of framebox so that I don’t have to write \vspace{2mm} above every framebox I use. \vspace{2mm} \framebox(380,200){\textit{To be completed}}
0
votes
0answers
38 views

Moving the picture in moderncv

I use moderncv with theme classic for my CV and I want to move down photo and contact to the info section. It should be moved between two brown lines and aligned right. Rest the same as now. Is it ...
1
vote
0answers
26 views

Labeling the thequestion and the parts in a storing box

I'm a typesetting tests with key answers. The questions have parts. What I want is to make \thequestion appear only once and the \thepartno follow without the question label. For example: Question 1 - ...
0
votes
0answers
21 views

What is wrong with this ToC and all the overfull boxes?

This code gives me a lot of Overfull \hbox messages in the console, and I'm wondering why: \documentclass[11pt,twoside]{book} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{microtype} \...
0
votes
0answers
32 views

Yellow colored LaTeX boxes [duplicate]

Can someone tell me how to replicate this style of boxes in LaTeX, that is, to make a box of that color and style? I do not want the Remark command too. I just want a code that makes a box of that ...
0
votes
1answer
38 views

How to make a box with a tex at the corner of it?

How can i do following boxed text and also a boxed text with a text at the corner it ? Please consider "lecture 1" is also a text. I want to write there my lecture number. That's why i keep ...
1
vote
0answers
15 views

Controlling bounding boxes of a \rotatebox

I tried defining a nicer \emptyset using the following: \documentclass{article} \usepackage{amsmath, amssymb} \usepackage{mathtools} \usepackage{graphics} \renewcommand{\emptyset}{ \makebox[1em][...
0
votes
1answer
69 views

How to make \newbox respect margin page ends

I'm writing math practicing textbooks to students and I intend to provide an answer key at the end of them. I'm trying to implement the answer key using a storing box with all solutions. But I can't ...
1
vote
1answer
82 views

How to make a framebox to override marginnote

I'm working on a book where I have to have marginnote's throughout the whole text but I also would like to include some tcolorboxand mdframedenvironments which override this margin. In the image below,...
0
votes
1answer
89 views

How to write Bootstrap-like badges in LaTeX?

I need in-line pills like the ones Bootstrap has: https://getbootstrap.com/docs/4.0/components/badge/ How do I go about achieving this in LaTeX/XeTeX?
0
votes
2answers
40 views

Complex model with arrows and boxes

I hope, anyone could help me with the following. For my thesis I need two models as you see in the screenshots. The two models should be horizontally aligned with the text. Thank you in advance!!!
0
votes
1answer
34 views

\newline in \vbox in heading

I have this heading \def\@oddhead{\vbox{\vss\centerline{\color{gray}\small { \bf \texttt{Article published in \textit{\thejournalname}. doi: 10.1029/2019False1234 \newline \textcopyright 2020 ...
1
vote
1answer
43 views

How can I set the width of `lrbox` in latex?

I need to set the width of lrbox to a particular size. I am trying with the following code: \begin{lrbox}[width=.5\linewidth] ... \end{lrbox} However, it is throwing error. Any idea how can I set ...
2
votes
2answers
90 views

Understanding TeX and LaTeX horizontal rules

I just want to have a horizontal rule at the top of the text frame, closed to the top margin. I am trying to know why this is not a trivial issue. As I understand, LaTeX \rule command makes a filled ...
2
votes
3answers
95 views

exam/tcolorbx: Calculate the header height then pass it to geometry

For the following, I need to make the two approaches work in order to pass the exact header height to geometry package. I would be happy if other approaches are proposed. Using savebox \...
0
votes
0answers
23 views

Rounded Boxes using x11names package

I was wondering if I could make an empty rounded box with x11names package with math environment. Thank you!
1
vote
1answer
34 views

How to remove: footer's bottom-margin and fancyhdr's auto-displayed line?

I use a header (blue rule and image) and a footer (blue rule). I have 2 issues that I'm trying to solve: 1. I want my footer rule to touch the very bottom of the page (there is some bottom-margin ...
0
votes
1answer
61 views

Underfull and Overfull \hbox(xxxxpt too wide) detected at line

I get a lot of warning message: Underfull and Overfull \hbox(xxxpt too wide) detected at line xxx I am using \documentclass[12pt,oneside]{book} as my document class. (I am not sure I am correct) I ...
0
votes
0answers
19 views

How can I implement this kind of resolution grey boxes? [duplicate]

I wanna make a kind of a question/answer thing, so I wanna split the answer from the question by "boxing" my resolution with a kind of a grey box like that in the picture below. The image is just an ...
0
votes
0answers
16 views

Boxes of the same high

When using boxes, one by the other, how can I decide the high? The latex decides by itself and the highs are different. I use \framebox
1
vote
1answer
42 views

hrulefill center text

So I am trying to center my text across the center of the \makebox. Code: \documentclass[12pt]{article} \begin{document} \makebox[2in]{\hrulefill\rlap{John Doe}\hrulefill} \end{document} Right ...
2
votes
2answers
42 views

How to get the height of lrbox

I need to know the height of lrbox before I will be using it in my code. For some reason, my code is getting me odd non-correct value. \documentclass{article} \usepackage[utf8]{inputenc} \begin{...
0
votes
0answers
32 views

A breakable box inside an other breakable box is not any more breakable

I use the code below to have some fancy boxes. \documentclass[a4paper]{article} \usepackage{tikz} \usepackage[most]{tcolorbox} \usepackage{lipsum} \newcommand{\mytitlegen}{ \...
1
vote
1answer
111 views

Cartouche textbox

How can I draw the "Cartouche" textbox shape provided in the "hieroglf" package through the use of the "Tikz package" or any other means (If there is a more simple way than using the Tikz package, ...
0
votes
1answer
56 views

How to make two boxes 'sit on top' of each other?

I'm struggling to find a way to recreate the following image. Any tips or advice would be great.
1
vote
1answer
42 views

White box behind page numbers in beamer

I lost the codes for a beamer that I previously prepared. Now I am creating a new presentation with exactly the same style, and I am using the pdfpages package the include some pages of the pdf. ...
0
votes
0answers
65 views

vbox: splittable aligned equations? measuring true height after vsplit

I am learning low-level tex to write my own custom *latex macros. As an experiment I tried to put math equations (multiline or not) inside \vbox/ \hbox, measure their dimensions, and tried to split ...
2
votes
1answer
51 views

Re-use part of tabular as a (smaller) tabular

Based on this tabular-environment-created-in-tikz, I was looking to wrap a simple tabular with TikZ (probably tcolorbox could be used, but the documentation looks like an Everest to climb for me). My ...
0
votes
0answers
39 views

Graphics with fixed size boxes around formulas in HTML slides

I'm writing reveal.js slides using pandoc, and I need to include some simple graphics involving formulas within boxes of fixed size. Something like this, or just slightly more involved: \begin{split} ...

1
2 3 4 5
28