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

learn more… | top users | synonyms

58
votes
2answers
80k 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
18k 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 ...
4
votes
6answers
3k 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, ...
15
votes
1answer
440 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 ...
10
votes
3answers
6k 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 ...
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};}} ...
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 ...
4
votes
4answers
1k views

How to obtain width of longtable?

I need to create multiple tables of the same width, one of them needs to be a longtable due to spanning multiple pages. I could set the width of all of them to a predefined value. However, I would ...
5
votes
3answers
192 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 ...
14
votes
1answer
5k 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?
6
votes
1answer
7k 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 ...
6
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 ...
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 ...
9
votes
2answers
508 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 ...
2
votes
1answer
1k views

How to align table or figure caption where the table starts?

HI How can I start the caption where table starts or figure starts? \captionsetup{justification=justified, singlelinecheck=false} does not work for me because it places the caption at the ...
5
votes
1answer
981 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 ...
4
votes
2answers
1k views

\parbox “textwidth” for the combined width of a subset of table cells

I would like the parbox width of the text in a multicolumn to be calculated automatically from the combined width of the cells that the multicolumn spans. (Their width will vary in different copies of ...
2
votes
1answer
187 views

Automatically set the figure width depending on whether the layout is one or two column

I am wondering how do you usually deal with figure width when you are writing a paper. (use \linewidth, \textwidth ? others?) Maybe we can just define a "switch" and use it with ifelse package? ...
1
vote
3answers
443 views

Change linewidth for the whole document, while keeping fancyhdr wide?

Somebody noticed that \abstract changes the linewidth for the whole document (here). The problem was the syntax: with correct syntax as below this is avoided. \begin{abstract} This is an abstract. ...
9
votes
1answer
304 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 ...
3
votes
2answers
8k views

latex how to make table as the same width as the textwidth?

I have used \begin{tabularx} or \begin{tabular*} but neither of these two work, these two environment managed to increase the width of the table as the same as the text, while they cannot let the ...
5
votes
2answers
148 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] ...
3
votes
4answers
5k 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.
2
votes
1answer
1k views

Setting subcaption width for specific subcaptions

In the subfig packge, the command \captionsetup[subfigure]{width=<length>} can set the width of all subcaptions within a figure. How can the width of just a single subcaption in a figure be ...
8
votes
2answers
354 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. ...
7
votes
3answers
225 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
588 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 ...
6
votes
1answer
661 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
2answers
70 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
1answer
5k 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
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 ...
4
votes
2answers
99 views

Can I change the overall width of the invoice package's table?

I'm using \usepackage{invoice}, and I'm wondering if I can adjust the width of the table? \documentclass{article} \usepackage{invoice} \date{September 1994} \begin{document} \begin{invoice}{USD}{0} ...
4
votes
3answers
451 views

Restricting the length of a line of text while allowing line breaks

While attempting to answer this question, I re-read Chapter 14 of The TeX Book (on how TeX breaks paragraphs into lines). It got me thinking: Is there a way to restrict the length of a string of text ...
3
votes
1answer
138 views

ConTeXt: Scale font for text based on maximum width

Background Looking to devise a scaling factor for two fonts such that the text, when added to the final document, fits on one line. Example In the images below, the two fonts are the first ...
3
votes
1answer
21k 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 ...
3
votes
1answer
2k views

Glossary term list width

I am using glossaries package in my document and I have some long term names. This breaks my layout. I tried to apply: \setlength{\glspagelistwidth}{0.3\linewidth} And it did not work at all. If I ...
2
votes
1answer
92 views

How to indent long comment continuation in the algorithmicx pseudocode

In the MWE, I try to add line continuation indent to the answer given in Properly indent comments with no line-numbering in algorithmicx E.g. I am trying to write the \LineCommentCont . I am using ...
2
votes
2answers
622 views

(Framed) Boxes are too long / Textwidth doesn't work

I want to create a box/frame (in math mode) with its content centered horizontally and vertically such that I can adjust the height of the box and such the width of the box automatically (!) is the ...
2
votes
1answer
876 views

Center subfloat above extended subcaption in subfig package

In the subfig package, the command \captionsetup[subfigure]{width=<length>} extends the width of a subcaption. Now how can the subfloats be centered above their enlarged subcaptions? The ...
0
votes
1answer
650 views

Creating multiple columns of different width

I'm pretty new to LaTeX and am using it to write an exam. I'm using the geometry package to create two columns. I'd like one column to be 5" and the second column to be 1" with 0.5" separating the ...