Questions tagged [textwidth]
The textwidth tag has no usage guidance.
114
questions
1
vote
2
answers
32
views
longtable and adjustbox/textwidth
Can this table be put on the width of the text ? I have tried many things but they didn't work.
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}[c]{@{\extracolsep{\fill}}cccccccccc@{}}
...
3
votes
2
answers
97
views
Fit equation with \cases in page width using \resizebox
I'm trying to fit an equation with several cases into my page width. The pain is that one case is awfully long. I used the \resizebox{} approach (see solution here), which would work, if there would ...
0
votes
2
answers
42
views
Fitting table to textwidth without packages and keeping centered text alignment
I am working on a machine where I currently cannot import packages. I want to fit a table into textwidth without the usual package. I managed to do this fixing the column width manually using p{2cm} ...
3
votes
1
answer
78
views
Use resizebox with math mode; Missing } inserted
I have some problem with my table: I want to resize it to \textwidth using \resizebox.
The error-message says: "! Missing } inserted."
This is a reproducable minimal example:
\begin{table*}[...
4
votes
1
answer
168
views
When is textwidth 4.5in in latex?
In latex documentation, I found this:
Then I searched that what does bk mean, and I found this:
After seeing this I thought that bk means book. And textwidth equals to 4.5in in book class (font size ...
2
votes
1
answer
72
views
A Simple Alternative to Geometry for Changing textwidth within a Document for a Single Page Only
The following code produces three pages of output, wherein the textwidth of each page is 6 inches.
\documentclass{book}
\oddsidemargin -8pt \evensidemargin -15pt \topmargin -25pt
\headheight 25pt \...
2
votes
2
answers
90
views
Text overflows in multirow table
I have a table with four columns. The problem is:
The text overflows in the third and fourth column as shown in below image. These columns contains dense text.
The text should be within table.
I ...
0
votes
0
answers
34
views
Adjusting tcolorbox according to both text width and title width
So, thanks to all the wonderful posts here, I was able to get tcolorbox to mostly do what I want it to do. However, one thing is still giving me trouble.
I want the boxes to size automatically to the ...
0
votes
1
answer
25
views
Save position information of all existing floats
The question is a follow-up to this one.
Background color for all existing floats
I hope to save the generated yellow background box location information to a new TXT file, as the floating element ...
0
votes
0
answers
20
views
How to output the start position coordinates and end position coordinates of the underline generated using fancypar or underline
For example, in the picture below, I want to know the start and end coordinates of the underline in each line
\documentclass{article}
\usepackage{zref-savepos}
\usepackage{zref-user}
\usepackage{zref-...
1
vote
2
answers
39
views
How to force a minimum width for a snippet in "standalone"
My question is very similar to this one. However, my request is for a minimum width, instead of a minimum height.
I need to create little snippets of formulas with LaTeX. I'm using TexMaker to write ...
1
vote
1
answer
41
views
tabularx table not taking page width after importing ltablex
I want some tables to take up the page width. I was able to do this using the tabularx package and the X parameter.
Here is an example of what a table looks like:
However, I need to use captions but ...
5
votes
4
answers
330
views
How to Make a One-Time Adjustment to the Textwidth
I would like to be able to make a one-time adjustment to the textwidth in order to have a title (or subtitle) appear entirely on one line.
Consider the MWE
\documentclass[12pt]{article}
\usepackage{...
0
votes
0
answers
83
views
Elegant way to auto-adjust column width
I am asking myself if there is not a more convenient, elegant way to automatically adjust every column in a table to fit into the page and to have perfect enough way for the containing text without ...
0
votes
0
answers
20
views
Overfull \hbox when \textwidth exceeds \columnwidth while using \includegraphics in a 2 column template [duplicate]
I have a 2 column template in Overleaf.
I would like the figure to span both the columns (otherwise the text in the figure becomes too small).
I tried the following script:
\begin{figure}
\...
3
votes
2
answers
47
views
Uniform cell length with centered text in a table where L is the line width, K is the number of cells, and each cell is L/K long
I'm trying to recreate this table. I would brute force the width with p{kcm} where k is just some number. But the text is not centered. I have tried many other solutions. But none of the work. And ...
0
votes
1
answer
84
views
Text of full \textwidth inside nested minipage
Within nested minipages, I would like to place text that occupies the full \textwidth of the document indpendent of the current \linewidth. The obvious solution of using a minipage of width \textwidth ...
5
votes
2
answers
118
views
Strange interaction of caption and textwidth
I am trying to create some nice-looking captions for some photos. I do not want to adjust the aspect ratio of these photos, so I am including the keepaspectratio option in \includegraphics.
Inspired ...
0
votes
0
answers
66
views
Table in Two Column - Linewidth
I would like to set the width of this table to textwidth or linewidth. Ho would I do that in this two column template?
Any idea?
\documentclass[11pt,twocolumn,conference]{IEEEtran}
\usepackage[T1]{...
2
votes
1
answer
79
views
How to draw \hrule based on text width?
I have a \divider command where it draws a thick hrule and a thin hrule to achieve the style I want:
\newcommand{\divider}[1]{%
\vskip-2pt %
{%
\color{black}%
\hrule%
}%
...
4
votes
3
answers
190
views
Adjust chemical names to the width of the text
I have several little questions:
How do I get the names of the chemical compounds to adapt to the
width of the text? The problem occurs with propyl 4-hydroxybenzoate.
Is the code okay, or could ...
0
votes
1
answer
48
views
Tabularx: columns do not adapt to width
I have the following table, written with tabularx environment:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{...
0
votes
1
answer
53
views
\Wrapfigure problem
When I am using the command \begin{wrapfigure}{r}{0.3\textwidth}, the column to the right appears white and all paragraphs aligned to left except the width of this figure. How to solve this issue?
the ...
6
votes
3
answers
129
views
LaTeX dynamic \rule width depending on text length with titleformat
I have a section divider as below:
\documentclass[a4paper,11pt]{article}
\usepackage{xcolor}
\usepackage{titlesec}
\definecolor{pink}{HTML}{F8CBAD}
\definecolor{grey}{HTML}{D9D9D9}
\titleformat{\...
1
vote
0
answers
49
views
pgfgantt: why is the figure shorter than \textwidth on the right?
I am no Latex Pro and trying to get the chart below to be exactly \textwidth wide, but somehow it is displayed shorter than the text on the right side. I don't understand why the expand chart=\...
2
votes
3
answers
239
views
Properly adjust pgfplot group plot to \textwidth
I am having trouble in setting the width of a pgfplot to the page width. I found this post where the issue is discussed in detail, but the provided answer does not work with external and the other ...
2
votes
1
answer
110
views
How to Specify the Width of a Bclogo Box
QUESTION: Can anyone show me how to specify the width of a bclogo box? I have not found an answer to this nor have I been able to figure out how to do it.
Consider, for example,
\documentclass[...
1
vote
1
answer
135
views
Combine \rule and \fbox to fill the width of a page
I'm trying to build a date separator, which spans the entire width of the page and has a boxed date on the right. This is what I've written so far:
Test test test.
\par\noindent\hfill\rule[3.4pt]{0.7\...
1
vote
2
answers
148
views
Adjust table column widths to table width
I am using tabularx to fit the table to textwidth
\begin{table}[ht!]
\centering
\caption{Nice Title}
\scriptsize
\begin{threeparttable}[b]
\begin{tabularx}{\textwidth}{@{}l cccc cccc@{}}
\hline\hline
...
0
votes
3
answers
42
views
How to align text like math formula?
Code is here:
\noindent
\textit{Pf} Let $G(x)=\displaystyle\int_{a}^{x} f(t) d t$.
By (1), $G^{\prime}(x)=f(x)$, therefore $(G-F)^{\prime}(x)=0 $ $\forall x \in[a, b]$.
$\Rightarrow$ $(G-F)(x)=...
1
vote
3
answers
64
views
Centering only part of a sentence and ignoring the rest
Say I have some text that I want to center while the text that follows (in the same line) should be ignored for centering purposes. How do I achieve this in latex?
The second line in the image above ...
0
votes
1
answer
91
views
Long (2 Pages) and Wide Table: Use longtable and adjustbox package in Latex
I have to create a long and wide table for my note. I plan to divide the table into two pages: so I use longtable package. And because it is wide, I tried to keep it as text width and for this I use ...
2
votes
2
answers
92
views
Wrong calculation of Length of Text if its at the end of the sentence. (shrinking problem)
My goal: I need the exact length of the printed text
The default width is 345 pt as you see.
But if I calculate
the textwidth of "some text .... some" I get 347.069 pt and
if I calculate &...
0
votes
0
answers
82
views
Set long table automatically to textwidth by changing font size
I have a 4 column Table that spans several pages. Thus, I use longtable as follows:
\documentclass[12pt]{article}
\usepackage{longtable}
\usepackage{a4wide}
\usepackage{setspace}
\usepackage{geometry}
...
1
vote
1
answer
39
views
Align font size for tables with different number of columns
I am fairly new to LaTeX and I have a quite basic question. I create tables like this:
\begin{table}[H]
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{\extracolsep{5pt}}lD{.}{.}{-2} D{.}{.}{...
0
votes
1
answer
49
views
For double column format paper, should we use .5\textwidth or a slightly smaller textwidth for a table?
This is a double-column format paper, and I am using \adjustbox to resize my table.
The question is that if I resize my table to .5\textwidth, the table is a little bit beyond the text, so should I ...
1
vote
1
answer
47
views
How to close the tikz group plot inserted in a box and minipage environment?
Dear all I'm trying to insert a tikz picture (a group plot) in a box with a minipage environment but the node called mybox is not ended or closed properly. I tried to set the textwidth parameter and ...
0
votes
1
answer
152
views
\textwidth is not recognized, causes illegal unit error
I switched computers, reinstalled R, and am now getting an "Illegal unit of measure" error when I run the following code. I've narrowed it down to the "\textwidth" portion - when I ...
0
votes
0
answers
31
views
Problem with of alignment with 4 tikzpictures in a figure environment
Good afternoon,
I just to need to shift all of these for graphs a little bit more to the left, and spacing (vertically) the former two with respect to the latter. I tried with \hspace, but it produces ...
1
vote
1
answer
157
views
Desired page Geometry
I would like help setting up the geometry of a page that looks like this:
Specifications:
page geometry is 8 in by 8 in
images on odd page need to be no larger than 2 inches wide
paragraph text ...
2
votes
1
answer
114
views
Use width of certain block of text as parameter
I wonder if it's possible to get the width of a certain block of text, passed as an argument in \newcommand and use it numerically inside a conditional.
For example, defining a \newcommand which ...
0
votes
1
answer
38
views
How to align text vertically with fixed textwidth?
I'm lost on how to align text properly. Anything I search up with respect to textwidth only gives results on how formatting tables work, but I'm just trying to work with plain text here. Any idea what ...
2
votes
1
answer
189
views
Increase text width in KOMA scrartcl landscape
I have a KOMA scrartcl landscape document and would like to change/increase the textwidth. How do I do this? All the solutions I found only affect a single page or a page range. I want to do it for ...
1
vote
1
answer
124
views
How to fit the text into a large table? [duplicate]
I'm working on a large table and I use some tools to fit it into the default width text. However, one of its columns doesn't fit into the table's measures. How can I do this?
\documentclass[
% -- ...
2
votes
0
answers
70
views
How to set a width measurement to be the width of some string of text in ConTeXt?
I have some code like this:
\setupfield[cloze][width=]
I need to set width to be the width of some text given to it, such as "hello this is some text" or even just "#1" if it is ...
1
vote
1
answer
86
views
Increase the textwidth for figures in latex
I want to make my subfigures bigger and keep them on the same line. Is there any way to increase the textwidth for the figure? Or are there any other ways to do this? Thanks in advance.
\begin{figure}[...
1
vote
2
answers
347
views
How to fix the width of a tabular column by using weights in latex and active the auto-break lines?
I have created a table. I used template of springer. I want to fix the width of my table by using the weights option, but I don't know how to do that. I used textwidth but no positive results.
This is ...
3
votes
2
answers
1k
views
Tabular - columns wider than \textwidth
I am trying to have table exactly between margins using \textwidth. Unfortunately, when I am using \textwidth my table is too large and I do not know why. (my code is for django template, but I was ...
1
vote
2
answers
57
views
Display three listings side-by-side (consider that the page size might change)
The context
I want to display 3 listings side-by-side. I've managed to display 2 listings side-by-side with the following minimal working example
\documentclass{article}
\usepackage{listings, lipsum}
...
0
votes
0
answers
59
views
"Monowidth" underline
I was trying to find an answer here, but to no avail (sorry if duplicate). This refers rather to thickness than width.
Is there some way how to underline things of the same type (in math mode) with ...