Questions tagged [box]
The box tag has no usage guidance.
214
questions
0
votes
1
answer
36
views
Latex: auxiliary calculation
when I make auxiliary calculations using pen and paper, I make some sort of extra "box", which is open on one side and has some wave-like left side. For me, this is a clear and easy way to ...
0
votes
0
answers
29
views
How to create a similar box to be inserted in side notes?
I want to create some side notes similar to this one, but I have no idea what package should I use to design it ?
-1
votes
2
answers
67
views
How to box math in text without it going to display style while in the inline math environment?
So I'm trying to box something like $\frac{1}{10}$, but when I do $\boxed{1}{10}$, it puts the fraction in display style. However, this is not ideal for the formatting of my paper. How do I avoid this?...
0
votes
2
answers
61
views
drawing colored balls in urn
I want to draw and add these two boxes in my latex code
my code is
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,amsfonts,tikz}
\usepackage[paperheight=...
7
votes
2
answers
236
views
How to Specify Outline Thickness and Fill/Outline Colors?
This question asks for an extension of this answer. Consider the code:
\documentclass[12pt]{book}
\usepackage{xcolor}
\usepackage{cabin}
\usepackage{scalefnt}
\input pdf-trans
\font\f=qx-lmr10 at ...
0
votes
1
answer
85
views
Change text box to single column in a multicolumn document
I am trying to change a text box present within a multicolumn to onecolumn. But when I add \begin{multicols}{1} within box it doesn't change to one column. For instance, for figures one could use \...
0
votes
1
answer
71
views
Creating a box surrounded by text in Tcolorbox
How is it possible for me to put a box of adjustable size surrounded by a text in a latex document ?
For instance : my inspiration is from the yellow boxes in this image :
\documentclass{article}
\...
0
votes
1
answer
35
views
How to position multiple objects inside a fbox by relative X/Y position
I'm very new to LaTeX would like to ask some advice on how to position elements inside a fixed size box. Fox each element I know the X/Y relative position to a box corner.
When I try to use spacing to ...
0
votes
1
answer
50
views
Problem with Poker packages
I want to display playing cards in my document, but none of the poker packages I've tried are working (\usepackage{poker} nor \usepackage{pst-poker}). I am, in fact, able to compile (using XeLaTeX) ...
0
votes
1
answer
43
views
How to put a box around a single page? [duplicate]
I used nomencl and created a page of nomenclatures in my paper, I want to put this page and this page only into a box, while everything else are to remain the same.
I tried the following code I found ...
0
votes
1
answer
26
views
fcolorbox not wrapping text
I'm trying to get an fcolorbox to wrap my text according to the standard paragraph width. Here's what I have so far:
\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}
\begin{document}
...
1
vote
1
answer
43
views
Aligning boxed equations in a specific way within subequations and rounding corners
I have the following code which uses code from online sources
\documentclass[]{article}
\usepackage{mathtools}
\usepackage{fancyhdr}
\usepackage{amssymb}
\usepackage{extramarks}
\usepackage{amsmath}
\...
3
votes
1
answer
90
views
Box repeat shape of word
Hi, is there any way how to make "box" follow shape of words?
1
vote
1
answer
42
views
Boxes side by side with gray background
I'd like to create boxes (it may also be two columns) side by side such as in the following image. Also, in order to "highlight" the content, I'd like to add some gray background into it.
2
votes
4
answers
170
views
How to vertically align text and equations
How could I vertically move the third line on the left upward so that it doesn't appear broken with the two lines above?
I'd like to obtain this.
I have used this code.
\documentclass{article}
\...
0
votes
3
answers
68
views
Why RaggedRight and RaggedLeft don't work inside a box in this case?
I'm trying to align the minipage with the supervisor information on the left, and the minipage with the candidate information on the right. But the \RaggedRight and \RaggedLeft commands seem to have ...
0
votes
1
answer
48
views
How to create a box around text and formulas via tikz and minipages, but it doesn't break over pages
I'd like to create a box \mybox with tikz, to highlight environments, mathematical
formulas etc. Below is a MWE based on minipage (to have the flexibility to put
pretty much anything in the box). It ...
0
votes
1
answer
25
views
How do I make a custom node using the height of the bounding box?
I've been playing around with custom arcs, but I can't seem to figure out how to set the arc radius automatically. Goal is to create a node that bounds two semi-circles and gets wider as needed
Links ...
1
vote
1
answer
42
views
How to get the height of a minipage right?
I am trying to get the height of a minipage by using a box. I have found several threads where they solve it this way. However, if I use the height to draw a vertical line (the vertical line is just ...
1
vote
1
answer
59
views
How to measure precisely the height of a figure and its caption?
I would like to create a command that calculates the maximum size of a figure so that the figure and its caption do not overflow into the margins.
To do this, I save the caption in a box (\boxcaption),...
4
votes
3
answers
241
views
How to create numbered-named saveboxes in a foreach-loop?
Is there a principally way to create numbered saveboxes?
For a usage like: \usebox{box-1}, \usebox{box-2}, \usebox{box-3}
The follwing MWE gives no error, but no output.
PS: It seems to be clear why ...
3
votes
2
answers
82
views
right alignment of hboxes inside \vbox
I would like to produce a layout as follows:
| |
|first text ...left first text ...right|
|second text ... left second text... ...
0
votes
1
answer
59
views
How to store/append code for later use
To store some code for later use, I can think of two ways: \appto from etoolbox and \sbox.
They both have some problems in use.
For \appto, later invoke of a macro will cover the value of the former, ...
4
votes
1
answer
92
views
boxes around parts of equations
I am looking for a way to draw a box around a part of an equation.
Ideally this would be something similar to \underbrace{}_{} or \overbrace{}^{} but instead of only a single bracket it's like a small ...
0
votes
1
answer
35
views
How to create a form with a text field where characters are in separated boxes?
I would like to create a form (at least printable) containing a field where each character is separated from the previous one.
Something similar to the field A in this picture :
What is the name of ...
3
votes
1
answer
129
views
Display math in \savebox?
As per the title, I'm trying to utilize display math in a savebox to get the width of the display math:
\documentclass{minimal}
\newsavebox{\mybox}
\sbox{\mybox}{\[ 2 + 2 \]}
\begin{document}
\...
0
votes
0
answers
43
views
Boxed multi-line equations with equation numbers outside the box
How to combine the following two equations both being inside a single box and the equation numbers outside the box. Thanks
\documentclass{report}
\usepackage{amsmath}
\begin{document}
\begin{...
0
votes
1
answer
124
views
sub sub figure frame or box in latex
I have two subfigures with common captions and the other two subfigures with common captions. I need something like the attached. where "abc" and "time(s)" are labels. Please help ...
0
votes
1
answer
49
views
Footnote number in a box
I'm wondering if there is a built-in command which allows me to get the footnote number in a box.
E. g. the number 1 of the first footnote should be inside a square box.
0
votes
0
answers
67
views
Distance between a box and another box?
i am working on a file which is made up of the columns and each column contains boxes, but i have a problem with alignment or quite large vertical distance between the boxes and sometimes it jumps ...
0
votes
1
answer
46
views
Some problem about the frame
I have made a box and I have a few problems. The first one is that, no matter how I change the toptitle or the bottomtitle, the spacing between the box and the article below is still unchanged.
How ...
9
votes
3
answers
591
views
How can I put a grid/squared paper behind a single formula?
Sadly I didn't found any source showing this. I just need a grid behind some math. Usually I box equations using:
\documentclass[preview]{standalone}
\usepackage[most]{tcolorbox}
\begin{document}
\...
0
votes
1
answer
148
views
How to create a frame in a Latex document?
I am having a problem with creating a frame that looks like the picture. Somebody could show me how to do it? Thank you guys so much.
0
votes
0
answers
161
views
latex hbt! not working, jumping to next page
I'm using overleaf as my latex editor. I'm using hbt! for here, below the page, top of the page. But my page jumps to another page. My code looks something like this:
\chapter{Train and Comparison}
\...
2
votes
1
answer
57
views
How to make StackExchange-esque quotation block in LaTeX?
I mean this one:
looks quite pretty. Optionally with a background.
Thanks in advance
Edit This may be a good way to start:
\documentclass[preview]{standalone}
\usepackage[most]{tcolorbox}
\...
2
votes
1
answer
49
views
How TeX places text horizontally and vertically?
Am I right that TeX processes text in a manner like this? Since the very first character it is forming an hbox of textwidth width. When the first hbox is filled in its width, TeX makes a hyphenation, ...
2
votes
1
answer
43
views
Vertical spacing of description environment of enumitem
I use an description environment defined in enumitem. First, my code is:
\documentclass{article}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{environ}
\usepackage{lipsum}
\newlist{descleft}...
0
votes
2
answers
136
views
Placing a Colored Text Box within a Sentence
Consider the code
\documentclass{book}
\usepackage{xcolor}
\usepackage{tcolorbox}
\usepackage[tikz]{bclogo}
\usetikzlibrary{calc,shapes.callouts,shapes.arrows}
\newtcbox{\logo}{nobeforeafter, notitle,...
0
votes
1
answer
69
views
\hbox containing an equation environment
I have the code in which an equation environment is in \hbox:
\documentclass{article}
\begin{document}
\hbox{
\begin{equation}
F=ma
\end{equation}
}
\end{document}
But it throws multiple ...
4
votes
1
answer
75
views
Why does TeX stretch more than the plus component and it's OK?
The code is as follows:
\newlength{\stretchable}
\newlength{\fixed}
\setlength{\stretchable}{2cm plus 6cm}
\setlength{\fixed}{8cm}
\hbox to 10cm{|\hfil|} % the sample of a 10cm hspace
\...
0
votes
1
answer
57
views
Automatically add symbol at end of tcolorbox [duplicate]
I'm trying to rebuild the proof environment using a tcolorbox. The design of the box is pretty simple. My problem is adding a square (or something else notating QED) at the end of the box. Obviously ...
7
votes
1
answer
201
views
The concept of boxes in TeX
Am I right that TeX considers a text in terms of boxes (rectangles) where each character (char) is in a rectangle with three dimensions (height, width and depth (hwd)) and the origin point?
And that ...
3
votes
1
answer
610
views
Document header with tikz
Until now I had been using drawio to do the header's of some of my documents. I would like to shift to tikz, could anyone help me to do so ?
Below what I have done. It's not perfect but it's a start. ...
1
vote
1
answer
39
views
\hbox plus-minus behaviour
I write \hbox to 10cm{P\hspace{2cm plus 5mm}Q}. Why does TeX put 'P' to the left and 'Q' to the very right of the box? I thought the horizontal space was 2cm itself and (2+.5)cm at maximum. Moreover, ...
2
votes
2
answers
133
views
Draw a box with a number ins
I am whole new to LaTeX, and everything keep mess up when I tried drawing this thing. Can you guys help me out. Thank you so much.
0
votes
0
answers
28
views
Well coded framed Boxes
I wanted to define a simple box using the thmtools package. This box should have a name (e.g. Framedbox), a title and then the text inside a top and bottom line. This is the basic (messy) code I have ...
1
vote
2
answers
70
views
Creating exam answers with check marks
I am trying to put an example of an exam key in the main body of an article. Because of this I am using the document style "article" (maybe it is not good idea but I am not sure how to use ...
6
votes
3
answers
155
views
Using \boxed{} in \newenvironment{envname}{here}{and here}
There's a type of environment (shown below) which I'm using very frequently. I would like to define a new environment to begin it and end it with single commands.
\begin{equation}\boxed{\boxed{
\begin{...
5
votes
1
answer
286
views
Adding a Letter to an Image in a Do-It-Yourself Lettrine
Consider the code
\documentclass{book}
\usepackage{lettrine}
\usepackage{tikz}
\setlength{\textwidth}{5.25in}
\begin{document}
\thispagestyle{empty}
\LARGE
\lettrine[nindent = .4em]{\tikz\fill[black] (...
1
vote
1
answer
48
views
Splitting page with lines
I'm trying to do two things and I feel like I'm using wrong tools for both of these things... :)
I need a line exactly at top margin, the next paragraph should start below as it would normally
I want ...