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

learn more… | top users | synonyms

47
votes
2answers
62k 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} ...
29
votes
2answers
14k 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 ...
14
votes
1answer
238 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 ...
14
votes
1answer
4k 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?
14
votes
1answer
302 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 ...
12
votes
1answer
3k 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 ...
9
votes
2answers
5k 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 ...
9
votes
2answers
455 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
1answer
86 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 ...
9
votes
1answer
247 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 ...
9
votes
2answers
210 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
3answers
126 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
2k 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 & ...
8
votes
2answers
305 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. ...
8
votes
1answer
1k 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 ...
8
votes
1answer
53 views

Minipage width not acurate

I have the following document, with several minipages of 12cm width. Each minipage contains a different number of minipages (with a sum of 12cm for all of them). So every *sub*minipages should fit ...
8
votes
1answer
221 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} ...
8
votes
2answers
71 views

How do I vary the height of braces without varying the width?

I am trying to highlight pieces of a formula with some text on the side, but one of those pieces is multiple lines. The solution that I came up with was to use braces in an array to highlight the ...
7
votes
3answers
7k 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 ...
7
votes
2answers
566 views

Macro for the average width of a character

How can i made a macro similar to \averagecharwidth of ConTeX in LaTeX, that calculates the average width of a character based on the frequency of that character into my document ? that macro is show ...
7
votes
1answer
1k 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 ...
7
votes
1answer
116 views

How to expand equation to textwidth?

I have an equation like so: \begin{equation} \label{eq:helper_params} \tilde{B} = \begin{bmatrix} CB\\B \end{bmatrix}, \tilde{I} = \begin{bmatrix} I_p\\0 \end{bmatrix}, \tilde{Q} = ...
7
votes
1answer
5k 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. ...
7
votes
1answer
112 views

Find out actual width of text in nested lists

I am trying to solve the following problem: In regular text, I can place two paragraphs of unequal width side by side using minipages, like so: \documentclass{article} \begin{document} Some text ...
6
votes
4answers
2k 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.
6
votes
3answers
184 views

How to conditionally control the width of a figure with minimal code duplication?

I am using \iftoggle to switch between a for-review (doublespaced, onecolumn) and photo-ready (singlespaced, twocolumn) layout. I want to change the width of figures to be optimal for both, depending ...
6
votes
2answers
201 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 ...
6
votes
1answer
3k 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 ...
6
votes
1answer
116 views

How to determine width of \textls? \settowidth doesn't work

Using microtype's \textls, how can I determine the width of the resulting text? Here is a MWE that does not work: \documentclass{article} \usepackage[log-functions=false]{expl3} ...
6
votes
1answer
725 views

How to move dark rectangle in headline of PaloAlto theme after changing the sidebar width?

I'm currently using the beamer PaloAlto theme with a headline and sidebar on each slide. I used the command \setbeamersize{sidebar width left=1.7cm} to fit the table of contents in the sidebar. The ...
6
votes
1answer
5k views

Auto-fit table column widths based on content

Is there any solution in LaTeX tables that implements similar functionality to MSWord's AutoFit?
6
votes
3answers
1k views

How do I set the minimum width of a subfigure?

I have: \subfigure[blah blah blah.] { \begin{tikzpicture}[/MyStyle] ... some stuff... \end{tikzpicture} } But "some stuff" is not that wide and the text in the subfigure produces a lot of ...
6
votes
1answer
229 views

set width of table column to whatever's left in page width

I have some columns with a very short entries on the first column and a rather long entry on the second column. \begin{ctabular}{\textwidth}{ll} \toprule Name & Recipe\\ \midrule Freezing ...
6
votes
2answers
1k views

Resize all images in Latex to a percentage width

I am auto-generating multiple tex files using pandoc (one tex file for each of my chapters). Pandoc generates this tex code for each image. \begin{figure}[htbp] \centering ...
6
votes
1answer
567 views

How do you get block dimensions in Beamer?

I'm using a block for emphasizing different pieces of information. I'd like those pieces to be constrained to the block dimensions and to use the columns environment, but I don't know how to get the ...
5
votes
3answers
951 views

Table exceeds page

I'm new to tex and got a problem with a table that exceeds the page, because the content is too wide. I'd expect the table to wrap the text into a new line / new lines, if the text is too long for the ...
5
votes
2answers
126 views

Setting widths in a longtable not working

I want to create a longtable that spans several pages, with column widths set to cms by me: \documentclass[12pt]{article} \usepackage{longtable} \usepackage{seqsplit} ...
5
votes
1answer
955 views

Scale an image where both width & height are off limits

When using images bigger than the text-area, I want to scale them but considering at the same time width and height. The problem happens to appear when both width and height are off limits. Here, I ...
5
votes
3answers
155 views

Troubles with column width in the tables headings

Well, we all know that compose tables in LaTeX is not easy, however, despite the large number of existing packages and options to facilitate this, I still have some problems I could not solve, and I ...
5
votes
2answers
52 views

How to use the width of some text in \dim_compare:nTF directly?

Is it possible to use the width of some text directly inside of a <dimension expression>. I found this way using a temporary box but it seems not very elegant … \documentclass{article} ...
5
votes
3answers
2k 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} ...
5
votes
1answer
295 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 ...
5
votes
2answers
331 views

Text over the overbrace beyond “scope”

does anyone know how can I avoid the free space between the sum sign and the indicator function. I guess it's caused by the width of the upper block above the overbrace. So is there a way to allow ...
5
votes
1answer
805 views

Different width for caption and floatfoot with floatrow

I am using the floatrow package. I would like to define a separate width for both the caption above and the \floatfoot below the floats. I want the caption to span the entire width of the page, but ...
5
votes
1answer
4k 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 ...
5
votes
2answers
1k views

\widthof within tikzpicture

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

Table width equal line width

I generated this table but it's width exceeds the line width as i am working in two column paper And i need it to fit only in one column, Any help ? \begin{table}[t] \centering ...
5
votes
1answer
5k views

Fitting tables into beamer

I have some tables in my presentations that are rather big. I found out how to use \resizebox to fit them into my page. Unfortunately this only works for tables that are wide. For long tables, my ...
5
votes
1answer
357 views

Modify width of main text block in tufte-handout

Is it possible to increase the size of the main text in the tufte-handout class to 80% of the paper width?
5
votes
1answer
270 views

Break box (a long caption) over pages

I want to have text of a certain width less than the page width, which goes across several pages. Normally you’d put text into a (\par)box to set its width but these boxes cannot be broken across ...