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
6 votes
1 answer
226 views

Would it make sense to use the "plus" and "minus" components of \baselineskip?

According to latexref.xyz: The \baselineskip is a rubber length but also The \baselineskip’s value is reset every time a font change happens and so any direct change to \baselineskip would vanish ...
Keelan's user avatar
  • 5,373
3 votes
1 answer
44 views

Accessing indent length with enumitem

For a package I'm writing, I need to access the actual amount a list item is indented. Here's a minimal example showing what lengths are available to me, but they don't seem to give me what I need. ...
Alan Munn's user avatar
  • 213k
8 votes
2 answers
270 views

Why would I use \dimexpr .. \relax in \setlength?

I read somewhere that you should use \dimexpr ... \relax when defining lengths. Is that really the case? There seems to be no difference between using it or not: \documentclass{article} \newlength{\...
mrCarnivore's user avatar
  • 1,367
0 votes
2 answers
186 views

How to manage rectangles and lengths with TikZ package?

I have been customizing a CV template but having some trouble with the TikZ package; indeed I'm a novice and it's a little bit difficult for me to find the solution by using the official documentation....
g_don's user avatar
  • 779
3 votes
2 answers
106 views

Control the distance between table of contents elements

I want to understand what are the lengths dimension #1 and #2 in the following example. Moreover, is the blue dimension in the picture equals the length of \parskip? How can I control the dimensions #...
tush's user avatar
  • 1,093
1 vote
1 answer
52 views

How to horizontally center an A4 paper inside an A3 paper?

I'd like to embed an A4 paper inside an A3 paper in such a way that the A4 paper be horizontally centered inside the A3 paper. (The relative vertical alignment is immaterial.) I tried to use the ...
Evan Aad's user avatar
  • 10.8k
0 votes
1 answer
54 views

Specifying the Length of a Bclogo without Enclosing It in a Minipage

Consider the code \documentclass[12pt]{book} \usepackage{xcolor} \usepackage[tikz]{bclogo} %\usepackage{lipsum} \definecolor{bulgarianrose}{rgb}{0.28, 0.02, 0.03} \begin{document} \thispagestyle{...
mlchristians's user avatar
  • 7,724
0 votes
1 answer
22 views

Columns odd vertical alignment in multicol

This code \documentclass[12pt]{article} \usepackage[parfill]{parskip} \usepackage{multicol} \widowpenalties 2 9999 9999 \begin{document} \setlength\baselineskip{4ex plus 2ex minus 2ex} \begin{...
Raphael's user avatar
  • 554
2 votes
1 answer
78 views

Increasing natural height of minipage / fbox

I would like to define an environment encapsulated by a box where I am able to insert unspecified content (text, equations etc.), but where I can increase the natural height of the box. A minimum ...
DavidH's user avatar
  • 77
1 vote
0 answers
84 views

Beamer - Fitting multiline title into a single one

I am trying to adjust a multiline title into a single line. I found the length of the text and check if it is larger than \linewidth or \textwidth. Both dimensions gave larger values than expected. ...
M. Al Jumaily's user avatar
2 votes
2 answers
104 views

expl3 / set length to average charwidth

I have a function that calculates the average character width. The function calculates the width as expected, but I can't use it in setlength. I've tried around and tried solutions I've googled, but I ...
alexBer's user avatar
  • 33
6 votes
3 answers
145 views

Wrong length (or \parbox)

Let's say I want a perfect alignment of these two equations (an OCD I have). The red line is just for comparison: This is my MWE: \documentclass{article} \usepackage {amsmath} \begin{document} \...
Juan Castaño's user avatar
0 votes
1 answer
112 views

How to get precise lengths (e.g., 5 cm) on the screen with tikz, pstricks, evince, and gv?

Let's feed the file mwe.tex containing \documentclass[a4paper]{article} \pagestyle{empty} \usepackage{pstricks,tikz} \begin{document}\noindent \begin{pspicture}(-1,0)(1,5) \psline(0,0)(0,5) \end{...
user avatar
5 votes
1 answer
145 views

Problem with \pagegoal

At the beginning of page, \pagegoal=\maxdimen and therefore \pagegoal-\pagetotal=0pt or sometimes \maxdimen. So I tested for \maxdimen, but got strange results (see MWE). Is there a good way to get ...
John Kormylo's user avatar
  • 77.4k
0 votes
1 answer
86 views

expl3 multiply length by a dimensionless factor

In the following code, i would like to print the value of \baselinestretch * \baselineskip instead of \baselineskip only. I tried with \fp_eval:n but that did not work. \documentclass[a4paper]{article}...
user1850133's user avatar
2 votes
1 answer
129 views

Conversion of "scaled points" (TeX lengths) to "PDF points"

If I'm not mistaken, sometime within the last two years the conversion factor has changed from 65,536 (2^16) to 65,782. (At least in LuaLaTeX for the lengths in "pdf literals"). Why the ...
keth-tex's user avatar
  • 454
1 vote
1 answer
62 views

Footnote index size and position

Is there a way to drop the footnote index below? I looked away https://www.ctan.org/pkg/footmisc But I didn't find anything there to help me \hangfootparskip \hangfootparindent \footnotemargin \...
Igor Yukhimenko's user avatar
1 vote
1 answer
104 views

Change Units in Calculation

Quick question. I'm looking for a way to change the units of a length while performing a calculation. I'm currently using the ragged2e package and trying to adjust \setlength{\RaggedRightRightskip}{...
User23456234's user avatar
  • 1,475
0 votes
1 answer
65 views

Get the height and depth of Hebrew letters

I have seen here the use of adding and subtracting the height and depth of the letter X and the letter p when defining vertical distances between objects on the document. My document is in Hebrew and ...
tush's user avatar
  • 1,093
5 votes
3 answers
634 views

Are the widths of 𝐿, 𝑌, and 𝑍 in TeX Gyre Termes Math really equal?

It was a surprise to me when feeding lualatex with \documentclass{standalone} \usepackage{unicode-math} \setmathfont{TeX Gyre Termes Math}% or \setmathfont{texgyretermes-math.otf} \begin{document} ...
user avatar
0 votes
1 answer
164 views

How can I use \if to enter a new line automatically when my text is too long?

I have a section in my document where writing space is limited and when there's a text entry that's too long, it does not look great because the points span two lines as shown in the first image below....
inot12's user avatar
  • 3
5 votes
2 answers
109 views

Determine the length of the rest of a math display line for multlined

\documentclass{article} \pagestyle{empty} \usepackage{mathtools} \usepackage{lipsum} \begin{document} \lipsum[1] \[ \text{beginning}\land \begin{multlined}[t][\linewidth] (\text{extremely long ...
user avatar
1 vote
3 answers
101 views

Defining an Em Dash with Length Greater Than the Cabin Default

I have noticed that the length of an em dash is not always uniform, depending upon the font being used. Consider the following code which defines an em dash: \documentclass{book} \usepackage[T1]{...
mlchristians's user avatar
  • 7,724
0 votes
1 answer
28 views

assign length units after number defined

I have a latex which which does some calculations, but the functions are not available for Lengths. I would like to be able to assign the unit to the output of the math. The following succeeds without ...
cdickstein's user avatar
0 votes
1 answer
51 views

Illegal unit of measure produced by a LaTeX3 function

I used the function \cs_new:Npn\宽度{168/(1+\thecnt)} to compute length, where cnt is a counter and 168 actually is the width of a4paper in millimeters times 0.8. Now \setlength{\tabcolsep}{\宽度 mm}{\...
youthdoo's user avatar
  • 779
3 votes
2 answers
124 views

Difference between \skipeval and \dimeval

What is the difference between \skipeval and \dimeval? They appear to produce the same result, but perhaps \dimeval removes the glue? \rule{\dimeval{ \linewidth plus 1cm minus 1cm - 1cm}}{1pt} a\\ \...
likethevegetable's user avatar
3 votes
1 answer
79 views

Over height dashed line with kpfonts-otf

Consider the following example, when using kpfonts-otf, the vertical dashed line becomes over height: \documentclass{article} \usepackage{kpfonts-otf} \usepackage{arydshln} \begin{document} \[\def\...
Jinwen's user avatar
  • 7,808
2 votes
1 answer
65 views

Variable containing the total horizontal length of a table

I am trying to put a minipage inmediately below a table, the minipage will be scaled X.Y times the total horizontal length of the previous table. Since I have several tables with variable cells' ...
wdsgn's user avatar
  • 161
0 votes
0 answers
21 views

Is there a possibility of writing length or width of measurements in latex as a sum or difference of 2 or more values

I wish to know if there exist a way in latex of writing the length or width of something as a sum or difference of 2 or more measurements e.g \parskip + \baselineskip, and/or \textheight - 5\parskip?
itc's user avatar
  • 600
2 votes
2 answers
135 views

How to get width of parameter in plain TeX?

I am trying to get the width of a macro parameter using \def\getwidthof#1{% \newdimen\myl% \settowidth\myl{#1}% \the\myl% } where \settowidth is defined as \catcode`\@=11 \newbox\@...
btshepard's user avatar
  • 670
1 vote
0 answers
37 views

How to trim (adjust) a coloured box to a text? [duplicate]

I have a coloured box that i use, and it always takes up the whole line no matter the texts length. I would like it to stop with the text. \usepackage[table,xcdraw]{xcolor} \usepackage{tcolorbox} \...
Yafiet Yohannes's user avatar
2 votes
1 answer
85 views

Calculate ratio between lengths/scale

I would like to calculate the the ratio between two lengths in order to automatically get the scale for a map included using the mercatormap package. For instance, I want the map to show 1km in the ...
Ninoett's user avatar
  • 179
1 vote
0 answers
46 views

How to make the flexible space discrete?

When typesetting Eastern Asian materials, positions of characters are normally relatively rigid. But there are unavoidable situations in which flexible spaces are needed, which are typically defined ...
Chih-See Hsie's user avatar
1 vote
2 answers
97 views

Calculate a floating point value to scale a length

As background, I was trying to write a macro that divides a page into columns given just a decimal scale factor. For example, given an input of .7 it should create columns of width .7*\textwidth and ....
Kenneth Hanson's user avatar
0 votes
1 answer
166 views

How to make \rightarrowtail and \twoheadrightarrow longer?

I am typing out short exact sequences and want to use \rightarrowtail and \twoheadrightarrow, but they have symbols above them so they need to be a lot longer, like \longrightarrow. Yet there does not ...
Very Forgetful Functor's user avatar
1 vote
1 answer
94 views

memoir.cls: struggling with lengths

dear texperts (peter?): I am still struggling with memoir lengths. I decided I need to understand the basic accounting identities here. So I wrote a simple tabular display helper --- not very ...
ivo Welch's user avatar
  • 3,643
0 votes
0 answers
28 views

avoid squeezing of line distance [duplicate]

This is probably a trivial question, but I can't find an answer: In some circumstances (large verbatim environments between paragraphs, many empty sections), LaTeX squeezes the line distance within ...
Ralf's user avatar
  • 145
4 votes
1 answer
308 views

How to Automatically Center Verse

Consider the following code: \documentclass{book} \textwidth 5.75in \usepackage{verse} \begin{document} \thispagestyle{empty} \LARGE \vskip 25pt \begin{center} \textbf{Casey at the Bat} \end{center}...
mlchristians's user avatar
  • 7,724
3 votes
1 answer
139 views

Changing the default length unit in tikz

Is there a way to change the default length unit in tikz to the ex unit? I have trouble while calculating complicated coordinates in tikz when I'm using the ex unit (I always get an error or a wrong ...
Master.AKA's user avatar
0 votes
2 answers
257 views

calculate length in \newlength with \dimexpr

\documentclass[a4paper]{article} \usepackage{geometry} \geometry{showframe} \geometry{left=1cm,right=1cm,top=1cm,bottom=1cm} \begin{document} (1) \newlength{\ccc}{\dimexpr\textwidth-100pt} % ...
lyl's user avatar
  • 2,677
3 votes
2 answers
212 views

How to get length from glue

The objective of the following code is to occupy the rest of a line with a parbox. I know this is a wrong way. So, how to get length from glue? \documentclass{article} \usepackage{geometry} \geometry{...
lyl's user avatar
  • 2,677
3 votes
1 answer
63 views

How do I get the rubber components of an l3skip?

Related to my question on l3skip to \setlength. \ExplSyntaxOn \skip_const:Nn \c__par_skip { 1ex plus 0.2ex plus 0.1ex } \skip_gimme_the_stretch:NN \g__par_stretch_fp \c__par_skip % 0.2ex \...
Douglas Myers-Turnbull's user avatar
3 votes
3 answers
322 views

Passing a length as an argument to raisebox

To summarize it: I think \depth is losing its information somehow and I was not able to fix it. I am trying to place an image inline and to adjust its vertical position with \raisebox, like so: \...
Leone's user avatar
  • 556
3 votes
2 answers
172 views

Which length still creates the distance between the 2 boxes

I try to place 2 boxes on top of each other. I would like to define the height of the lower box and a potential gap between the boxes and the top box should use the remaining space. As you can see in ...
thothal's user avatar
  • 279
3 votes
1 answer
124 views

How to make the value of a lengh macro change with another

\documentclass[a4paper]{article} \usepackage{xcolor,pgf,etoolbox} \usepackage{geometry} \geometry{showframe} \geometry{left=1cm,right=1cm,top=1cm,bottom=1cm} \parindent0pt \begin{document} \newdimen\...
lyl's user avatar
  • 2,677
1 vote
1 answer
176 views

What is the unit of width and height in circuitikz?

\ctikzset{quadpoles/transformer core/inner=1,quadpoles/transformer core/height=2, quadpoles/transformer core/width=0.6} What are the units of the 2 and 0.6 here?
Ulysses Zhan's user avatar
3 votes
1 answer
157 views

Enlarging the Length of a Particular Page in the TOC to Accommodate an Additional Entry

I would like to selectively enlarge the vertical length of a particular page in the TOC to accommodate, say, a "widowed" entry. Consider the code \documentclass[openany]{book} \newcommand*{\...
mlchristians's user avatar
  • 7,724
1 vote
2 answers
365 views

How to make all \parbox with same height

Running the following MWE will get an ugly typeset which I think is for the reason of different heights of all thees\parboxs. My question is: As the contents of all \parbox cannot be foreseen, how to ...
lyl's user avatar
  • 2,677
-1 votes
4 answers
260 views

How to \read inside a command and return the result?

As a followup of How to use file content as a numeric value for a length?, I'm trying to do this (I really need to read the data.txt file inside this new command and use the value later, when the ...
yegor256's user avatar
  • 11.5k
0 votes
1 answer
134 views

Parametrization of the column width in the tabular environment

I want to set the parameter \xx to define the tabular below. However, I do not know how to expand the term (1-\xx) so the code below does not compile. I would appreciate your help. \documentclass[12pt,...
Chilote's user avatar
  • 189

1
2 3 4 5
10