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
3
votes
1answer
93 views

Powerpoint-like animations with beamer and the animate package

I want to achieve a simple "fly-in"-animation with LaTeX by utilizing the animate-package. My idea was to insert an \hspace with decreasing length-argument. However, there is no animation at all. MWE ...
3
votes
1answer
72 views

Setspace package changes behavior of \abovedisplayskip

When using the spacing environment from the setspace package, it appears that rubber lengths in \abovedisplayskip and \belowdisplayskip are being ignored. \documentclass{article} \usepackage[nopar]{...
3
votes
3answers
99 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 ...
3
votes
1answer
456 views

Texts, lines and length

It is possible to set the width of the lines depending to text length (text aab's in MWE). Total length text aab's + line should be an equal. And I need also the "Text inside" on the same height as "...
3
votes
1answer
424 views

Get the width of a picture with Tikz

I 'm trying to make a presentation with beamer and I use Tikz to incorporate pictures at some places in my frames. For some reasons, I would like to fixe the heigth of a picture (contained in a node) ...
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 ...
3
votes
1answer
191 views

Printing all predefined variables and or values

So, whenever you begin a document by giving it some class (article, memoir, etc), there are many default lengths and heights being used. What I am looking for is a way to see these without explicitly ...
3
votes
1answer
3k 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} ...
3
votes
1answer
440 views

Why the measurement of vertical distance between two points is wrong?

Please, consider the following (not so minimal) MWE. Why the distance between points named a3 and b3 is not the same as the vertical distance between points a2 and b2 (it is about 30% larger)? From ...
3
votes
1answer
1k views

dotfill for length of text

I am trying to make some small dotted lines for the signature of different persons, with their printed names just below. I thought it would look great if the width and horizontal placement of the ...
3
votes
1answer
808 views

Dynamic length variable with argument? (like “\setlength{\foo}[1]{0.5+#1*0.5}”)

Is there a way to define some kind of a length function that takes an argument, sort of a mixture between \newcommand and \setlength? The following example should illustrate what I want. (I'm using a ...
3
votes
1answer
373 views

Measure distance from text to bottom margin

I'm making some boxes for providing answers. The box macro takes the height of the box as an argument. I need to measure the remaining space from the line the box starts at, to the bottom of the page. ...
3
votes
1answer
168 views

Distinction between number and dimension in tikz key-value interface

When declaring shapes, I usually define the desired shape width with: minimum width = <number> <measure units> However, sometimes, I calculate calculate the shape's width separately. In ...
3
votes
1answer
54 views

tikz arithmetic with numbers and lengths

Consider this example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \def\starty{3} \def\length{1}; \coordinate(a1) at (1, \starty); \...
3
votes
1answer
114 views

Custom error message for bad length value?

Using LuaLaTeX in texlive2017, but I assume that this would apply generally. Question: Is it possible to set a custom error message, that will be shown when a bad value is used as the argument to a ...
3
votes
1answer
460 views

\setlength{pdfpagewidth}{8.5in} not working in sharelatex

I am writing a paper for AAAI-18, which requires the following commands to be pasted near the top of the document: \setlength{pdfpagewidth}{8.5in} \setlength{pdfpageheight}{11in}\\ Neither of these ...
3
votes
1answer
219 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 \...
3
votes
1answer
201 views

Computation of size in titlespacing

Consider the following example: \documentclass[11pt,a4paper]{book} \usepackage{lipsum} \usepackage{titlesec} \newlength{\textsize} \makeatletter \setlength{\textsize}{\f@size pt} \makeatother \...
3
votes
1answer
350 views

Using \textwidth via strip@pt with beamer and the picture environment

OK, I admit I haven't tried my MWE without Beamer. My goal is to use e.g \textwidth with the picture environment, and my overall goal is to include several rectangular portions of an .eps file within ...
3
votes
1answer
219 views

How to get the available space for an image

I want to design a figure (in a external graphics editor, e.g, Illustrator) to exactly fit (without scaling!) the whole available space on an empty page of my document minus the caption of the figure. ...
3
votes
1answer
238 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 ...
3
votes
1answer
2k views

Trouble setting a length [closed]

I'm starting with LaTeX, and there are things that puzzle me. I'm trying to set a length that's the \textwidth minus (let's say for example) two inches. In the preamble, I wrote: \newlength{\bplen} \...
3
votes
1answer
49 views

Printed length in Layouts package inaccurate?

From the layouts package manual (page 3 and 4): The textwidth is \printinunitsof{pt}\prntlen{\textwidth} which is also \printinunitsof{in}\prntlen{\textwidth} or \printinunitsof{mm}\prntlen{\...
3
votes
1answer
180 views

get width and height of character in the power

I want to create a "minus-sign" in a superscript of a letter in math mode using \rule{width}{height} to get control over the look of it. In principle, I get something to my liking, but I fail to make ...
3
votes
1answer
258 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 \...
3
votes
1answer
142 views

Automatically calculate width

This is a question to Werner's answer to the question "How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)?". Consider the following code: \...
3
votes
1answer
243 views

Changing options based on generated document length

I am creating lots of letters using the scrlttr2 package and some variables that change per letter. The contents of these variables might cause the letter to take up an additional page that I would ...
3
votes
1answer
79 views

How align paragraph with labels before resume enumitem list

I have an enumerate list created with enumitem that I interrupt and then resume. Between the last item before the interruption and the first after the resumption, I insert a text paragraph. How can I ...
3
votes
1answer
92 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
648 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[...
3
votes
2answers
140 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} \...
3
votes
0answers
179 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 ...
2
votes
3answers
913 views

Make a length negative

I was wondering if there is a way to have a \negate command which makes lengths negative. So you could do things like: \newlength{\negativeabovecaptionskip} \setlength\negativeabovecaptionskip{\...
2
votes
2answers
176 views

Store result of \ratio calculation for repeated use

I am using pdflatex with the beamer package to create a presentation template that is similar to the PowerPoint template provided by my company. I want the company logo to have the same size in my ...
2
votes
2answers
1k 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?
2
votes
2answers
261 views

How can I print a length in centimeters in VTEX?

\documentclass{article} \begin{document} \newdimen\mylength \mylength=1in \the\mylength \end{document} Output is: 72.27 pt But i want to show output in centimeter using VTeX.
2
votes
2answers
60 views

Using \setlength inside \mathchoice

I've written some somewhat complex tikz macros which use a length to set their scale. I've realised I want them to have a different scale when used inside display math versus inline math mode, and I ...
2
votes
2answers
111 views

Calculate metric length in LaTeX (e.g. for TikZ)

I would like to calculate the length of elements on a LaTeX beamer frame (128mm*96mm) equivalent to those on a PowerPoint slide (254mm*190.5mm), i.e. apply the factor 128/254 to a value given in mm. ...
2
votes
1answer
175 views

Resetting \parskip to 0pt “seems” to be ignored by \par

I was revisiting old code and rewriting things in what I thought was a more elegant manner, but I got unexpected results. I have the following code which seems to do exactly what I want it to do ...
2
votes
2answers
6k views

\leftskip, \linewidth and minipage

I have an environment with a minipageof the length \linewidth-\parindent (using the calc package). When I stick this in a place where \leftskip=\parindent it protrudes in the margin. Shouldn't \...
2
votes
1answer
64 views

What units are \pgfphysicalheight and \pgfphysicalwidth defined in?

I often use \pgfphysicalheight and \pgfphysicalwidth from the pgfpages package to define sizes dynamically based on the dimensions of my page (which vary). For example, here's a "dynamic" vertical ...
2
votes
2answers
769 views

Make a variable length horizontal rule depending on the text width of the title

I have the following custom environment for examples: \documentclass{article} \usepackage{lipsum} \usepackage{amsmath, mathtools, amsthm} \usepackage{graphicx, xcolor} \usepackage[top=1in, bottom=...
2
votes
1answer
483 views

\settolength issue

I want a horizontal length to have the same length as the word "physique". This is what I have tried: \documentclass{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[...
2
votes
1answer
55 views

How to get the font size parameter passed to the main standard classes?

For complex length manipulation (see here), I would need to get the font size that was passed as an option to the document class: \documentclass[12pt]{article} \newlength{\mainfontsize} \setlength{\...
2
votes
2answers
539 views

Math operations on lengths

I have a table with three columns and I want the table to be distributed on \textwidth of the page. I tried: \documentclass{article} \usepackage{tabularx} \begin{document} \begin{tabularx}{\...
2
votes
1answer
330 views

Passing length in form of a string instead of measure [duplicate]

I'd like to pass a measure of length in form of a string, i.e. \setlength{string} or \setlength{'string'} instead of \setlength{2.5cm} I seem to remember seeing something like that somewhere in ...
2
votes
1answer
739 views

Difference between length and number (in the draftwatermark package)

I am using the draftwatermark package. According to the documentation, it is possible to set the horizental position of a watermark with the command \SetWatermarkHorCenter{⟨length⟩}. They say that <...
2
votes
1answer
185 views

Why is \glueexpr used in etoolbox's \deflength instead of \dimexpr

Consider the following snippet from etoolbox: \newrobustcmd*{\deflength}[2]{% \ifundef{#1} {\etb@noglobal\etb@err@nolen{#1}}% {#1\glueexpr#2\relax}} Maybe I do not understand the ...
2
votes
1answer
267 views

Why are the skip lengths ignored in align?

I created a new command \mathloose that stretches the spacing in an equation by suitably adjusting \thinmuskip \medmuskip and \thickmuskip lengths. The command works just fine in \[ \] and \( \) but ...
2
votes
1answer
1k views

Different behavior of setlength and settowidth

In this example, I would expect all "MMM" to be well-aligned to each other. But they aren't: \documentclass{article}% \usepackage{amsmath}% \newcommand{\before}{mmm}% \newcommand{\after}{MMM}% \...

1
4
5
6 7 8