Questions tagged [lengths]

{lengths} is for questions dealing with measurements in TeX. If your question is about the spacing between document elements, use {spacing} instead.

Filter by
Sorted by
Tagged with
4
votes
1answer
211 views

How to know the line width of enumeration in two column document prior to entering the enumeration?

I want to populate the following lengths just once prior to entering the enumeration (or perhaps prior to entering the document environment) to free me from worrying whether or not the initialization ...
3
votes
2answers
1k views

Changing length of an arrows from a vertex to itself

I'm working with LyX. I would like to change the length of an arrow from a vertex to itself. I would like to make the arrow stretch longer up before returning down to the encircled vertex. The code I ...
12
votes
2answers
576 views

Compute remaining horizontal space in align environment

I use align* often and sometimes it is preferable to add text to the right hand side of an equation instead of using \intertext, or \shortintertext, which tends to interrupt the math flow. This is ...
3
votes
1answer
228 views

Is it at all possible to design a macro that expands to a length? [duplicate]

Possible Duplicate: Get width of a given text as length In an attempt to Compute the x distance between two nodes, the question arose whether it is at all possible to devise A macro that expands ...
10
votes
1answer
727 views

How to compute exact width added by \left. \right

I have defined macros to produce resizable brackets that also work across line breaks. This necessitated the use of and additional set of \left. and \right. which add a bit of horizontal space. Now,...
9
votes
3answers
685 views

Defining a Length that Scales with Fontsize Changes

I noticed a behavior regarding lengths under fonstsize changes, which I'm hoping there is a way to circumvent. Consider this MWE: \documentclass{article} \begin{document} \newlength\mylength \...
35
votes
3answers
2k views

Is there a picture showing all the lengths used in lists?

I want to adjust the length parameters in a list (happens to be to make it more condensed, but that's not relevant). I do this infrequently enough that I don't remember all the lengths that are ...
276
votes
2answers
294k views

Lengths and when to use them

There are many lengths in LaTeX. For instance, \enskip, \enspace, \quad, \parskip, \smallskip, ... Some of them are mostly used for vertical spacing, some others are mostly used for horizontal ...
7
votes
2answers
3k views

medskipamount, default value in article class

What is the default value of medskipamount in the article class? I have not been able to locate this information. Is there some database where default values of various parameters can be accessed?
5
votes
2answers
123 views

Splitting bibliography alphabetically: how to vertically align margin note?

Context: Since my bibliography is constituted of 200+ entries, I want to add margin-notes at each new letter to split the bibliography alphabetically. (I.e., print a "B" in the margin next to the ...
0
votes
1answer
74 views

How to parsing a length with skip/rubber/glue? [duplicate]

Others have asked about getting length as a number; the solutions there (using \strip@pt to remove the units, or using \number to convert to an integer number of sp units) work fine for a regular ...
4
votes
2answers
104 views

Wrapping a length

I've cobbled together the \basis macro which sets and gets a hidden/internal length \b@sis. It is meant to work as follows : Calling \basis returns the value of \b@sis Calling \basis{} sets \b@sis to ...
0
votes
1answer
776 views

Specifying the length of \hline

$\left[\begin{matrix} u(\lambda)\\\hline v(\lambda) \\ \end{matrix}\right]$ $\left[\begin{array}{c} u(\lambda)\\\hline v(\lambda) \\ \end{array}\right]$ In the first code ...
3
votes
0answers
153 views

Can one use the Potrzebie unit system in (La)TeX?

Inspired by a comment to this answer (and some wasted but entertaining time on the internet), I was wondering if somebody has implemented the use of the Potrzebie unit system in (La)TeX, as a tribute ...
3
votes
1answer
2k views

beamer: How to get height for frame content [duplicate]

I want to put a picture in a beamer slide and make it use all the available height of the frame. So I tried: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{graphicx} \begin{document} ...
6
votes
1answer
519 views

LuaLaTeX: Calculate length in Lua

I apologize if this a rookie question, but I find it extremely hard to find a solution to my Lua problem using online searches and browsing reference manuals. I would like to calculate a length: ...
45
votes
5answers
20k views

How can I change the indentation in quote and quotation environments and commands?

I need to change the indentation that the quote and quotation environments and commands employ. I assume that there is some length I need to set, but I've googled around, and cannot find what I am ...
3
votes
2answers
131 views

Using skip (glue) with pgfmath (truncating plus/minus parts from a glue length)?

Consider the following MWE: \documentclass{article} \usepackage{tikz} \newlength{\tlen} \newlength{\tlenB} \begin{document} \setlength{\tlen}{2cm} \typeout{check 1, tlen is: \the\tlen} \...
2
votes
1answer
89 views

Get pseudo-length value in scrlttr2

I am customizing a scrlttr2 template. I'd like to use some pseudo-length values to define other ones. For example, I defined \@setplength{firstheadhpos}{2.10cm} and I'd like to define the pseudo-...
2
votes
1answer
79 views

Decrease the length between title and content of resume

\documentclass[11.8pt,a4paper,sans]{moderncv} \usepackage{verbatim} % moderncv themes \moderncvstyle{classic} \moderncvcolor{blue} % character encoding \usepackage[utf8]{inputenc} % ...
2
votes
1answer
68 views

Framed minipage wrong size in PDF [duplicate]

I am trying to make a document containing a box with text that i want to appear a certain exact size when i print it. (Specifically I want to make a nametag that fits exactly inside a slot on my ...
3
votes
1answer
419 views

Change \topsep in a list without packages

Consider this code \documentclass{article} \usepackage{lipsum} \begin{document} \setlength{\topsep}{3\baselineskip} %\setlength{\partopsep}{3\baselineskip} \hrulefill \begin{enumerate} \itemsep=...
7
votes
4answers
253 views

How to link 2 lengths

I would really like to create a length \bar that defaults to having the same as the length \foo even if \foo gets changed, but I would also like the user to be able to set \bar to be whatever length ...
3
votes
1answer
77 views

TikZ: Using current length inside scope environment

Following this answer: Drawing on an image with TikZ, I'm using \begin{tikzpicture} \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{some_image.jpg}}; ...
3
votes
1answer
200 views

Remove stretch and shrink (glue) from existing length

Suppose I have a length \mylength, defined to be \setlength{\mylength}{5pt plus 1pt minus 2pt} I'd like to make \mylength a fixed length, but keep the default length. In this example, I'd like \...
1
vote
2answers
73 views

How to determine the partial heights of a font

I want to determine the heights of a font. \f@size gives me the total height of the line. This should be top line to bottom line. How can I determine the length between top and 2 (fat) and the length ...
7
votes
1answer
135 views

Notation for lengths

I've noticed that when you set length, you can not only write \setlength{X}{3.14cm} but \setlength{X}{=3.14cm} as well. It looks like there is not any difference between those notations but I'd like ...
1
vote
1answer
71 views

Stacking lengths and pop them off

I have an outstanding post about a TiKZ underliner (which has a bounty running for the TikZ 'pro' who find the solution). The only thing I need to solve is to add an xshifter of \@totalleftmargin to ...
29
votes
3answers
1k views

Make my infinite squares math-proof

I created a command that makes a square of text in ever-decreasing sizes to create the effect of infinite decrease. But if I increase the starting width, or change the scale factor, TeX has an ...
4
votes
2answers
780 views

Draw a line under a figure that match the figure lentgh

I am using a line under a figure to make it more aesthetic. I am having a problem with matching the line length with the figure length. Here's a MWE. \documentclass{article} \usepackage[utf8]{...
7
votes
1answer
139 views

create spacing command that eliminates extra spaces after

After a \section command, there is the same amount of space regardless of what follows. An itemize environment does not add extra space. How can I achieve the same behavior after a custom environment?...
3
votes
1answer
191 views

using \textheight and \baselineskip in scrartcl

I want to tell nomencl to print all items on a single page. If I use \documentclass{article} my code to let LaTeX compute the right length for nomitemsep itself works fine. But if I use \...
2
votes
1answer
47 views

How can i keep image sizes, defined by x\textwidth, after change of the textwidth?

i set up all image sizes by x\textwidth. Unfortunately i have to turn in the paper with another textwidth. Is there a possibility to keep the image sizes exactly like they are right now?
5
votes
1answer
169 views

If I need to set width to text width, how can I restore it later?

What is the syntax for storing some width in order to change it temporarily and then restore to the original? Example: %save length here \setlength\somewidth{\textwidth} some text \begin{...
1
vote
1answer
75 views

Difference of lengths

This should be a very basic problem, but I can't find it anywhere: \documentclass[tikz,border=1pt]{standalone} \usepackage{fp} \usetikzlibrary{fixedpointarithmetic} \newlength{\radiustai} \...
5
votes
1answer
1k views

em, ex, en? Which length units are font size dependent?

Length can be specified as 3em, or 3.5ex. What is required to make 4en also valid? Are there any other font related length units?
1
vote
1answer
153 views

changing \itemsep only at top level of list environment

I'm not a LaTeX programmer, but I have to deal with this bit. I have a class file defining a questionlist environmet. This is a list environment which can be nested. I want the \itemsep to be set ...
5
votes
1answer
5k views

How to set the radius of rounded corners relatively to default unit

Background: When I draw a tikzpicture, I use only the default units (i.e. I do not specify any unit, as in \draw (0,0) -- (1,1);). Issue: When no unit is given in the [rounded corners = <value>]...
1
vote
1answer
779 views

Remove vertical space between two includegraphics, without random negative vspaces

everyone. I've lost hours on this dumb problem: if I write something like this \includegraphics{img}\\* \includegraphics{img} a noticeable vertical space appears between the two images when I'm ...
2
votes
2answers
835 views

What is the difference between ‘truemm’ and ‘mm’ etc.? [duplicate]

Sometimes I see the use of truemm (or true mm) instead of mm (same for other units). So I’m wondering what is the difference between these? Or: Why are some units false?
36
votes
2answers
1k views

What is truecm?

In examples found around the web, some people specify lengths such as width=5truecm with \includegraphics or the geometry package. How is this different from regular 5cm?
10
votes
2answers
2k views

Decrease length of underscore character in normal text (gender_gap)

I use the underscore character _ in normal text mode (not typewriter). However, it is quite long. How can I decrease its length so that it is shorter? I followed the Tex FAQ on how to typeset an ...
3
votes
3answers
84 views

Disappearing custom length in enumitem

I am setting a custom length to equal the value of \leftmargin inside an enumitem list. Once I exit the list though the value disappears and my custom length reverts to zero. I have shown the ...
366
votes
4answers
248k views

Difference between \textwidth, \linewidth and \hsize

The three lengths \textwidth, \linewidth and \hsize seem to all hold the width of the current line. At least I never saw some real difference between \textwidth and \linewidth in my code. Both seem to ...
3
votes
1answer
489 views

Fancyhdr sets wrong headheight

I am having some issues with fancyhdr setting my \headheight. The package seems to add too much \headheight. This is my current set up: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[...
1
vote
3answers
479 views

How to convert \textwidth to mm and use the number as a command?

I am trying to convert \textwidth to other units I want and do calculations with the number (without the unit). How does one do this?
4
votes
1answer
222 views

Use temporary length \dimen255, temporary count \count255

This Question is mainly important for package writing: I read in the TeX-Book that \count255 and \dimen255 are traditionally used for temporary. Now the number of registers has risen (see this ...
1
vote
1answer
100 views

Convert count into length

I want to decrease a length by a number (count). I tried some variations with \newlength{\temp} and \addtolength but I got problems there with the minus. I also tried variants with \dimexpr. The ...
3
votes
2answers
467 views

How to use \beamer@frametitle value as an argument to \settowidth

I was customizing a beamer theme that have to be used by many people at my workplace. I want to show an error whenever frame-title takes more than two lines. Please don't ask why title is so long. So ...
1
vote
1answer
352 views

Is there a simple way to create a local length

I want to redefine \textheight and \textwidth inside a \parbox. \textwidth works pretty well so far. But the textheight-part works only with the help of a \newlength. Unfortunately the \newlength will ...