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

learn more… | top users | synonyms

62
votes
2answers
83k 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
19k 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 ...
15
votes
1answer
464 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 ...
14
votes
1answer
331 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
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 ...
14
votes
1answer
6k 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?
10
votes
3answers
7k 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
3answers
148 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 ...
9
votes
2answers
525 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
115 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
319 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
240 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
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
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 ...
8
votes
2answers
365 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
85 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
245 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
1answer
6k 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. ...
8
votes
2answers
91 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
9k 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
3answers
252 views

Make box with minimum width (in math mode)

How can I give a box a minimal width, in math mode? That is, I would like a command something like \minwidth{exp}{width}, which will always typeset exp, but additionally, if the natural length of exp ...
7
votes
2answers
229 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 ...
7
votes
2answers
592 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
4k 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 ...
7
votes
2answers
89 views

How to achieve same table width with different column numbers

I have to print several tables with distinct number of columns. I'm using lingtable because sometimes these tables contains over 300 rows each. Here's the problem. Even defining a fixed width in cm, ...
7
votes
1answer
136 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
8k 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 ...
7
votes
1answer
132 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
195 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
3answers
4k 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} ...
6
votes
2answers
2k 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 ...
6
votes
1answer
133 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
2answers
95 views

Do I really have to specify the width of my wrapfigure twice?

I'm trying to add a figure to my document. Because I want text to wrap around it, I use the wrapfigure environment: \begin{wrapfigure}{r}{1cm} \begin{center} \includegraphics[width=1cm]{"My ...
6
votes
1answer
816 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
6k 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
310 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
2k 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
675 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
1k 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
163 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
1k 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
2answers
73 views

Problem with subcaptions in subtables

I am trying to implement a table with several subtables, but working with subcaption does not work neither when I try tabularx. This subtables have different number of columns. with the following code ...
5
votes
2answers
222 views

How to calculate the width for placing 2 big images side by side?

I'm trying to put 2 images in a row with this code, and runs well, but... don't adapt the size of the last 2 images in a row. \documentclass[12pt,a4paper]{article} \usepackage{graphicx} ...
5
votes
2answers
9k views

How to set table size to \linewidth without using a package such as tabularx?

PLOS journals provide the following instructions for preparing a LaTeX manuscript: Do NOT use any other packages than those specified in the template. If you use any other packages, your ...
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
152 views

In a table: Problem equalling the width of only three columns

I am writing a thesis in a large .tex file in Vim. As I show in this image, the first, second and third column have different spacing (width): This is the code for the table: \begin{table}[h] ...
5
votes
3answers
198 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 ...