Questions tagged [textwidth]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

figure could not be the expected height

I am using latex to write a document, and I need to insert a figure in a whole single page, the code is as follows. \documentclass[10pt]{book} \usepackage{pgfplotstable} \begin{document} \par text 1 \...
wxwuse's user avatar
  • 87
5 votes
3 answers
219 views

Change text width for parts of the page

Is it possible to change text width in the middle of a page? If I use \newgeometry and \restoregeometry this forces a page break. The package changepage and the command \adjustwidth work for the MWE ...
Haim's user avatar
  • 457
1 vote
1 answer
59 views

Wrap text in table column with \textwidth, \multicolumn and \multirow in LaTeX

I'm looking to wrap the text in the 3rd column, so that the table doesn't render too small (and disproportionate) on my document. Here is my code: \begin{table}[] \resizebox{\textwidth}{!}{\begin{...
mk123's user avatar
  • 13
0 votes
1 answer
31 views

Despite layout change (without geometry package) `multicols` still use former textwidth

For testing purposes, I'm trying to reproduce my geometry/layout without using geometry package (It is only loaded to use the showframe option). So far, it works fine. But in my main document I use a ...
lukeflo's user avatar
  • 1,108
0 votes
1 answer
22 views

Centering the text in table columns

I can't figure out why the text in the second and third column of my table isn't centered. I tried using \usepackage{array} with |>{\centering\arraybackslash}c| for the columns but it didn't work ...
Schneggl's user avatar
0 votes
1 answer
92 views

How to apply hrule at bottom of each page's text body

I am working on a twosided article layout where the footnotes are enclosed by two \textwidth lines above and below and on pages without a footnote a single h-line is spanning across \textwidth at the ...
lukeflo's user avatar
  • 1,108
2 votes
1 answer
77 views

TikZ: Pgf Plot not taking desired width

I want to have two 3D plots next to each other, one showing the 3D view of the plot, the other showing the top view. I pulled out the pictures to put them in a MWE that gives me the same wrong result (...
AcademicCoder's user avatar
1 vote
1 answer
144 views

How to get the absolute value of \textwidth in Latex? [duplicate]

I'm working with the IEEE conference teamplate on Overleaf, a two-collumn teamplate. I used the tool Diagram to draw figure and now I'm exporting the figure to pdf and then will import to the paper ...
Tien PHAM's user avatar
  • 123
2 votes
1 answer
47 views

Discrepancy between typearea defaults for different paper sizes

Looking at the log outputs of \documentclass[a4paper]{scrartcl} \begin{document} ~ \end{document} and \documentclass[letterpaper]{scrartcl} \begin{document} ~ \end{document} (note: results are the ...
Socob's user avatar
  • 1,671
0 votes
0 answers
26 views

\documentclass{article} change text width [duplicate]

The default margins of this document class are too big, or the textwidth is not wide enough by default. I prefer having ~80 char per line. I really don't know how to widen this. Which command and how ...
hal3m's user avatar
  • 33
0 votes
1 answer
77 views

Illegal Unit of Measure with \textwidth using VS Code Extension

This causes the error: \begin{figure} \includegraphics[width= 0.4/textwidth]{Bilder/Hochsetzsteller.PNG} \end{figure} I'm using the following settings to compile: [{ "resource": xxx&...
pb44's user avatar
  • 11
0 votes
1 answer
29 views

How to evenly spread some floats in a line using floatrow package?

I am trying to spread evenly in a line three floats (tikzpictures) with captions so they will have equal distances along the line: the first should be at far left the second exactly at the midpoint of ...
miltos's user avatar
  • 2,450
1 vote
2 answers
56 views

Latex table fit page without changing text size

I already search for some solutions to fit this simple table to page size but whenever I use resizebox or adjustbox the text size becomes too small. So I'm trying to solve this problem with tabular ...
Fagner Fernandes's user avatar
1 vote
1 answer
136 views

Width border problem tabularray environment

after I got great help the last time, I´m new to latex and already tried to figure it out for some time... I hope you can help me with my problem. I try to design a table in a style like that (white ...
Sam R's user avatar
  • 45
0 votes
0 answers
24 views

Courier and \textwidth [duplicate]

I am using \fontfamily{pcr}\selectfont, which is Courier, and \setlength{\textwidth}{6in}, but several lines of text are longer than 6in. Is there a remedy?
Vince Matsko's user avatar
0 votes
1 answer
94 views

Preparing two side page layout

My university provided me with a LaTeX template to prepare my thesis but they didn't update the class file although they have changed the rules. In the image, you will see the current rules. Also, the ...
Emr's user avatar
  • 3
0 votes
1 answer
38 views

Word with accent does not respect text width [closed]

I have a word with accent: "Kleinekathöfer", also tried with: Kleinekath"{o}fer, and this word is going above the defined text width. Any insights? Thanks for you help.
jeremy's user avatar
  • 103
0 votes
2 answers
71 views

Draw nodes distributed on a full line width with the middle one filling the remaining space

I am trying to achieve the following result: which is: a tikzpicture that fills the entire textwidth a Node A of 4cm on the left with the text aligned on the left a Node B of 5cm on the right with ...
Vincent's user avatar
  • 4,683
2 votes
3 answers
124 views

How to place adjacent Tikz-Nodes with the same (dynamic) height and combined width of the usual text width?

I have a command \entry which places two tikz-nodes next to each other. How can I make sure both nodes always have the same height (while also keeping the vertical centering of the text inside)? Also, ...
Hanns's user avatar
  • 33
0 votes
3 answers
41 views

why table width not adhered to sometimes?

I can not figure this one. I have 3 small tables. All set using \begin{tabular}{|p{.6in}|p{5.5in}|}\hline So one would expect each table to be same width, right? regardless of how wide its content is....
Nasser's user avatar
  • 20.2k
2 votes
1 answer
55 views

Textwide/Linewide (Regression) Table with dcolumn decimal alignment

I have quite fine and automated (50+) tables with one problem: they do not span linewidth or textwidth respectively. I am aware of resizebox but I do not want the font size to change (it should be ...
Magasinus's user avatar
1 vote
1 answer
46 views

Table is not perfect

\begin{frame} \frametitle{Methodology} \documentclass[a4paper, 8pt]{article} \usepackage{multirow} \begin{document} \begin{table} \centering \begin{tabular}{|l|l|} \cline{2-2} \multicolumn{1}{l|}{\...
Rupok Chowdhury's user avatar
0 votes
0 answers
46 views

Changing margin used \addtolength with a document class "Book" applied only to header

I'm using a documentclass "book" (\documentclass[11pt,a4paper,twoside]{book}) and I want to increase the margin to be able to reduce the text width. I've tried geometry but when using \...
Jerome's user avatar
  • 1
0 votes
0 answers
34 views

Setting table textwidth with \pgfplotstable

I am trying to fit a table into textwidth using pgfplotstable. The code I found in this forum (here) somehow produces red lines and I do not know why this is the case. This is how the results looks ...
Leslie's user avatar
  • 11
1 vote
2 answers
131 views

box TikZ of the same width as textwidth

\documentclass{minimal} \usepackage{tikz} \usepackage{lipsum} \begin{document} \noindent \begin{tikzpicture}[trim left = (box.west)] \node[draw = red] (box) {% \begin{minipage}{\textwidth} ...
Clairon's user avatar
  • 353
3 votes
2 answers
84 views

Textwidth and TikZ [duplicate]

\documentclass{article} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{lipsum} \begin{document} \lipsum[2] \noindent \begin{tikzpicture} \draw[red, line width=.2cm] (...
Clairon's user avatar
  • 353
2 votes
1 answer
95 views

Column set to `\textwidth` is wider than general text on the page

In the following example, I'm dumping some lorem ipsum text into the output to have some sense of the \textwidth. Then I create a simple table, and set its first column equal to \textwidth. \...
user32882's user avatar
  • 1,574
0 votes
3 answers
103 views

Text width inside a table

I'm using tables to format pages for a book with 6 chess positions for page. I'd like the positions to be aligned and it works fine if the text is short, but for positions where I have a longer ...
Nate's user avatar
  • 103
0 votes
1 answer
230 views

How to adjust a box position with tcolorbox

I would like to adjust the position of a box created with tcolorbox by respecting the values of the horizontal margin on each of the two sides. For instance : I would like to avoid the box to appear ...
Wiss's user avatar
  • 515
3 votes
3 answers
1k views

Fit minted environment to textwidth

I can't get minted environments to fit into linewidth: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{minted} \begin{document} \begin{listing} \begin{minted}{python} from foo import ...
jeandut's user avatar
  • 185
1 vote
2 answers
164 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@{}} ...
Matej Minarik's user avatar
3 votes
2 answers
555 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 ...
Sulfat's user avatar
  • 33
0 votes
2 answers
61 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} ...
Papayapap's user avatar
  • 399
3 votes
1 answer
386 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*}[...
Heiko's user avatar
  • 33
4 votes
1 answer
202 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 ...
RajinCoding2007's user avatar
2 votes
1 answer
102 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 \...
mlchristians's user avatar
  • 7,756
2 votes
2 answers
497 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 ...
Case Msee's user avatar
  • 219
0 votes
1 answer
42 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 ...
happy's user avatar
  • 149
1 vote
2 answers
123 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 ...
Garen Mossoyan's user avatar
2 votes
1 answer
86 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 ...
refresh's user avatar
  • 125
5 votes
4 answers
366 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{...
mlchristians's user avatar
  • 7,756
1 vote
0 answers
277 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 ...
jeiglsperger's user avatar
0 votes
0 answers
21 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} \...
Ritesh Singh's user avatar
3 votes
2 answers
81 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 ...
TheGreatJRB's user avatar
0 votes
1 answer
394 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 ...
Peter Grill's user avatar
5 votes
2 answers
245 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 ...
Sam's user avatar
  • 107
0 votes
0 answers
188 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]{...
Paul's user avatar
  • 47
2 votes
1 answer
181 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% }% ...
Yuchen Zhang's user avatar
4 votes
3 answers
244 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 ...
Schubladenzieher's user avatar
0 votes
1 answer
60 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{...
Catarella's user avatar
  • 351