Skip to main content

Questions tagged [textwidth]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
4 answers
270 views

Reduce the column padding in tabular environment

I've tried nearly everything with no success and I don't know why... I have a tablular with 9 columns and the only solution I found for fitting it into textwidth is using adjustbox, which I don't like ...
Peybol's user avatar
  • 33
1 vote
0 answers
31 views

\begin{listing} environment taking full page width when used inside of \begin{itemize} environment

I am using \begin{listing} environment inside of \begin{itemize} environment. But the listing output is taking full page width instead of the itemize environment width. Here is the complete example: ...
AKASH YADAV's user avatar
0 votes
2 answers
69 views

0.5\textwidth + 0.5\textwidth is longer than \textwidth

Consider the following MWE: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \begin{tabular}{p{\textwidth} } \toprule Column1 \\ ...
lukygee's user avatar
  • 59
2 votes
1 answer
98 views

Width of tcolorbox and resizebox. Prevent boxes to appear in line [duplicate]

As soon as I use resizebox around a few tcolorbox, they all appear in the same line. I want to create a nice layout, with linebreaks, between some of these tcolorboxes, and then just shrink it to fit ...
Albercoc's user avatar
  • 161
0 votes
1 answer
37 views

Set a fixed width for footer/header with fancyhdr

I'm using the geometry package for settings like textwidth and margins. fancyhdr uses the initial text geometry setting. Through my document I also change the geometry of the text layout (i.e. not the ...
telephone's user avatar
  • 127
0 votes
0 answers
25 views

Repeat characters n times to fill the current line [duplicate]

In this answer, someone provides a macro for repeating a string a given number of times. Here's a minimal working example of that macro: \documentclass{article} \makeatletter \newcount\my@repeat@...
Rodrigo Morales's user avatar
0 votes
1 answer
44 views

Adjusting Table Widths

Quick question: how do I make sure that all three tables have the same width? Ideally the entire page with, without modifying the content of the input files: \begin{table}[!tbp] \begin{center} \...
James_'s user avatar
  • 3
0 votes
0 answers
40 views

Geometry package page dimensions do not scale properly

I am trying to create a latex document on overleaf web editor, there are fixed requirements for the dimensions of the document and when I use the geometry package and set those dimensions and then ...
jones871's user avatar
0 votes
1 answer
42 views

Image in footnote too wide, although set width=textwidth

If I put a graphic in a footnote and apply width=\textwidth to it, it will be wider than the actual text width (see MWE below). (The same holds true for \linewidth.) Apparently includegraphics ...
dia's user avatar
  • 143
2 votes
1 answer
73 views

How to put frame around each page with white space buffer so that text are do not touch the frame?

I like to put frame around each page. Only around the text area of the page. Not including the header and footer. I am also using fancyhdr. After some struggle, I got the following. But the frame ...
Nasser's user avatar
  • 20.3k
2 votes
2 answers
44 views

Length and align left margin of longtable

I am using longtable to present the list of Notations, and the codes are as follows. \documentclass[10pt]{book} \usepackage{newpxtext,newpxmath} \linespread{1.05} \usepackage{tabularx} \usepackage{...
wxwuse's user avatar
  • 149
3 votes
1 answer
136 views

Which fontsize does "em" refer to in Tikz?

With tikz, I set font size to \footnotesize, but text width=5em is not as wide as 5 times width of one character from \footnotesize. \documentclass{article} \usepackage{tikz,lipsum} \begin{document} \...
Y. zeng's user avatar
  • 2,105
0 votes
1 answer
43 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
  • 149
5 votes
3 answers
805 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
  • 539
1 vote
1 answer
186 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
38 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,597
0 votes
1 answer
46 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
195 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,597
2 votes
1 answer
97 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
378 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 ...
pvti's user avatar
  • 135
2 votes
1 answer
89 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,703
0 votes
0 answers
29 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
178 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
38 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,637
1 vote
2 answers
83 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
223 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
1 answer
124 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
43 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
142 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
  • 5,327
2 votes
3 answers
154 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
44 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.3k
2 votes
1 answer
72 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
47 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
89 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
43 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
  • 21
1 vote
2 answers
170 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
  • 407
3 votes
2 answers
104 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
  • 407
2 votes
1 answer
140 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,594
0 votes
3 answers
122 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
614 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 ...
Waxler's user avatar
  • 860
5 votes
3 answers
3k 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
  • 235
1 vote
2 answers
241 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
808 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
83 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
  • 421
3 votes
1 answer
682 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
208 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
145 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 \...
DDS's user avatar
  • 9,768
2 votes
2 answers
639 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
  • 229
0 votes
1 answer
56 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
  • 159
1 vote
2 answers
251 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