The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [width]

{width} is the measurement of the extent of something from side to side.

Filter by
Sorted by
Tagged with
241
votes
3answers
456k views

How to create fixed width table columns with text raggedright/centered/raggedleft?

I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that \usepackage{array} \begin{...
72
votes
2answers
94k views

Center column with specifying width in table (tabular enviroment)? [duplicate]

I have table that has long headers and I would like to specify width of the column, but also be able to remain it's centred position. Something like |c{0.30\textwidth}|. It is possible? How to ...
68
votes
1answer
10k views

My table doesn't fit; what are my options?

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met: The table is too wide to fit within the text block or page. That is, I'm exceeding ...
61
votes
1answer
54k views

Different column widths using multicol

Is it possible to specify different column widths in a multicol environment? For example, in a two column layout, can the left column be set to twice the width of the right column?
27
votes
3answers
51k views

Width of the caption of a figure

I am having trouble making the caption beneath a figure to be of same width of the figure (less than the width of the paragraphs in the same page). How can I force the caption width to be the same as ...
26
votes
3answers
55k views

Tabular with p type columns to fill page width

I wish to be able to have a table (using tabular) that fills the page horizontally with each column using a fraction of that space, for now assume that they are equally sized. I wish to be able to ...
23
votes
4answers
1k views

Draw TikZ circles with a specific outer radius

For an archery target I need to draw (and fill) a circle which is e.g. exactly 10cm in diameter including its line. However, when using TikZs circle path command the given radius is the middle of the ...
21
votes
2answers
14k views

How to restrict width of tcolorbox according to the length of the text it contains

I have created a tcolorbox (as given in tcolorbox version 3.40 manual - page 155) LaTeX Code: \tcbset{ enhanced, colback=red!5!white, boxrule=0.1pt, colframe=red!75!...
20
votes
3answers
42k views

Set longtable to fit the page-width

I would like to set a longtable to fit correctly the page-witdh. From now, I've this situation: and the related tex code is: \usepackage{array} \usepackage{multirow} \usepackage{longtable} \...
20
votes
1answer
13k views

Extending arrows with overset text

I'd like to extend an arrow to allow better readability of characters which are overset using \overset{}{}. Right now I have \overset{k_1}{\rightleftharpoons} which produces: and this leaves the ...
19
votes
5answers
6k views

In LaTeX, make a box with the width of another text

I am looking for a command like \makebox{text to set width}[c]{new text} which would make a box with the width of text to set width containing ____new text____ centered.
18
votes
1answer
4k views

More condensed version of \parshape

\parshape can handle arbitrary paragraph shapes. One extreme is contained within How to layout irregular paragraph shape, where it can handle setting paragraphs like this: However, a simplified (and ...
16
votes
1answer
22k views

Two-column list: different column widths

I wish to create a two-column list. One side of the list will contain relatively short items (1-2 short words) and the other side will have longer items (4-5 short-to-long words). For example: 1. ...
16
votes
1answer
24k views

Auto-fit table column widths based on content

Is there any solution in LaTeX tables that implements similar functionality to MSWord's AutoFit?
15
votes
1answer
740 views

Expanding a Tikz rectangle to fill remaining text width

I would like to place a shaded rectangle between the left and right footers, which fills the space in-between. The left footer can be of variable width, so I would like the rectangle to automatically ...
12
votes
3answers
5k views

How can I make an algorithm environment wider than \linewidth or \textwidth?

I have already tried two things: \makebox[1.2\textwidth][c]{...} which did not work (perhaps missing \item). \redefinegeometry does not work well in this case beacause it’s not on a single page. MWE: ...
12
votes
1answer
68k views

LaTeX split long table in multiple pages and resize the width

I am trying to find a way to fix the width of my table to the margin of a portrait page (not landscape) while continuing the table in another page since it is very long. I can adjust the width by ...
12
votes
1answer
25k views

pgfplots: changing line axis and plotting lines width

I have some problems with the width of the lines in my graph. When I try to change the width of the plot lines, straight lines remain in the default width whereas the non-straight lines are shown in ...
11
votes
3answers
44k views

matrices too big to fit the width of a page

When I type matrices in beamer class, they are often too big to fit the width of a page. What is the way to make the matrices smaller? I also want to make the font of the entries of these matrices ...
11
votes
2answers
2k views

How to make underbrace label text wrap at brace width?

Is there a way to make underbrace label text automatically wrap at the underbraces width, preferably even with automatic syllabication? Example where brace label text exceeds underbrace width: $\...
11
votes
1answer
3k views

How can I express \begin{minipage}{\linewidth-2ex}?

I am working on a poster template with a not so easy to reproduce style with nested blocks. To that end, I have to create a minipage whose width depends on \linewidth minus some fixed value. In a ...
11
votes
1answer
2k views

I need a customized verbatim environment

I would need a verbatim environment with the following behaviour: It is centered (left and right distance to the page edge should be equal). It can be much wider than the regular text, almost using ...
10
votes
2answers
459 views

How to make \cdot operator same width as / (division slash) operator and vice versa

This is the code I use: \begin{aligned} &a\cdot{}a\\ &a/a \end{aligned} this is the output I get (red line is to emphasize unequal alignment): How can I make cdot's and slash's widths match?...
10
votes
2answers
15k views

Changing width of table lines

We know that by adding \setlength\arrayrulewidth{xpt} changes the thickness of all the table lines. If I wanted to change specific table lines, how to do it? \documentclass[11pt]{article} \...
10
votes
1answer
2k views

Shrinking text to the width of a node within a tikzpicture

I would like to be able to scale text to the width of a TikZ node. Using \widthof within tikzpicture as a starting point, I've arrived at somewhat of a solution, except it has incorrect spacing, and ...
10
votes
1answer
15k views

Columns width of array environment

I'm using the array environment and have something like this: \begin{array}{|c|c|} \hline \textbf{x} & \textbf{y} \\ \hline \hline t_1 & lon_1 \\ \hline \end{array} I ...
9
votes
4answers
13k views

Set width of text in list

I am attempting to produce a list that has a width of (say) 5cm, as opposed to going to the far right of the page. Any advice is appreciated.
9
votes
3answers
2k views

How to have a node's width match another's height?

I have the following situation: Here, I would like the rotated node to automatically match the height of the text node to its left, automatically growing or shrinking depending on the amount of text/...
9
votes
2answers
6k views

How to make really wide tables narrower

Is there a way to fix extremely wide tables? I have the following table: \begin{tabular}{lllll} \toprule & Manual Tests & Randoop 2.5 Minutes With GUI Code & ...
9
votes
1answer
42k views

Setting table-width exactly to linewidth

I'm trying to create a table with exactly the same width as the surronding text. I would expect that the command \resizebox{\linewidth}{!}{..table..} should do the job. However, the tables width is ...
9
votes
4answers
14k views

Table caption Width

We have table caption background image. We put this as image. But we need the table caption and images exactly same width as table body.
9
votes
2answers
1k views

Why is my tabular wider than the sum of its columns’ widths?

It's simple to create the tabular with columns of fix width, e.g. \begin{tabular}{|p{95mm}|p{95mm}|} \hline a & b \\ \hline b & b \\ \hline c & b \\ \hline \end{tabular} However, the ...
9
votes
2answers
3k views

\widthof within tikzpicture

In this minimal example \documentclass{scrartcl} \usepackage{calc} \usepackage{tikz} \newlength{\TestLength} \begin{document} \setlength{\TestLength}{\widthof{\tikz \node {bla};}} \...
9
votes
2answers
622 views

How to do \widthof with a symbol

I have the following code: \begin{align*} c_s &\equiv b_s^2\\ &\equiv (c_{s-1}^{(2^{k_{s-1}-k_s-1})})^2 \\ &\equiv c_{s-1}^{(2^{k_{s-1}-k_s})} \\ &\equiv c_{s-2}^{(2^{k_{s-2}-k_{s-1}} ...
9
votes
2answers
1k views

Average width of popular TeX fonts

I know I have seen a table of average font widths. I am not sure whether this was for popular LaTeX fonts such as Computer Modern and I can not remember where it was. Does anyone know of such a ...
9
votes
5answers
2k views

Boxes automatically sized to reach end of line?

I'm setting up a little test, which includes empty boxes for students to write their answers. The boxes start at different places on the page, but I'd like - for neatness - each box to reach to the ...
9
votes
1answer
598 views

What is the cleanest way to adjust the dimensions (height, depth, width to the left and right) of a symbol?

Every once in a while the nominal (i.e. declared) dimensions of a symbol are not identical to the actual ones. This can be intentional or not, but sometimes it is inconvenient. The dimensions of the ...
9
votes
3answers
696 views

How to use fontawesome with fixed width?

I'm using XeLaTeX and fontawesome package. This is my MWE: \documentclass[]{article} \RequirePackage{fontspec} \RequirePackage{fontawesome} \begin{document} \section{\faGraduationCap \...
9
votes
2answers
757 views

minipage is wider than I wanted

Occasionally, the width of a minipage environment seems to be ignored. I've not kept accurate records of when this has happened. But below is purely illustrative code that shows the issue. \...
9
votes
1answer
410 views

pgfplots: non uniform line width for interrupted plot

I draw a graph, but the red line does not appear to have the same width everywhere. For instance, between [a,b] it looks like it's thicker. \documentclass{beamer} \usetheme{CambridgeUS} \usepackage{...
9
votes
1answer
8k views

How to know the column width of a two column article?

I'm writing an article with 2 columns. If my document is this: \documentclass[10pt,a4paper, twocolumn]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ left=2.00cm, right=2....
9
votes
1answer
4k views

Text not spanning full page after wraptable

I wonder why latex doesn't go back to full textwidth after a table that was added in a wraptable? The actual code where I experience this problem is here: http://pastebin.com/CRjHMZdT I would expect,...
8
votes
6answers
46k views

How can I auto adjust a equation to appear in the entire page? (Scale to equations, is this exist?)

If I have a document like this: \documentclass[landscape, 12pt]{report} \usepackage[landscape]{geometry} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath, amssymb, ...
8
votes
2answers
376 views

TikZ: How to set width of complicated TikZ-image to \textwidth?

I have one a bit complicated TikZ-image: As you can see, I want to put one single border around this TikZ-image. Due to optical harmony the border should have the exactly same outside dimension like \...
8
votes
3answers
294 views

Box with adaptive length

When I want to put formulas into boxes, I like the box to adapt to the length of my formula. For example, I don't want to put $1+1=2$ in a very large box. To address this, I use the command \encadrer (...
8
votes
2answers
367 views

Auto width tcolorbox around equation

I am using tcolorbox to draw boxes around equations. Since the box widths are equal to the equation widths, long titles are often shrunk, hence looking ugly, as shown here: Is there any way to draw a ...
8
votes
1answer
7k views

how to resize the width of subcaption

I have two pictures and I'm using \usepackage{subcaption} to place them beside each other. The output might look like the following . The problem in the above picture is that it is difficult to ...
8
votes
1answer
763 views

Determine width of verbatim characters

I would like to determine how many characters of the verbatim font that fits on a text line. Consider: \documentclass{article} \usepackage{fancyvrb} \begin{document} \noindent\hrulefill \begin{...
8
votes
2answers
640 views

Multicolumn block is narrower than the surrounding text

I need to typeset blocks of text in a multicolumn environment, with a title above, and framed with full line width. I'm using the multicol package for that. The issue I face is that the block of text ...
8
votes
1answer
10k views

Set width of algorithm environment (preferably document wide)

Looking for a way to set the width of an algorithm environment, preferably document wide (as opposed to per-algorithm). Thought it should be fairly easy, but couldn't find a particularly good solution....