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
1
vote
2answers
257 views

\foreach and \StrLen

I don´t know how to make a foreach with a StrLen inside it, is it possible? \documentclass[a4paper,12pt,hidelinks]{article} \usepackage[utf8]{inputenc} \usepackage[brazil]{babel} \usepackage[T1]{...
1
vote
1answer
135 views

Is it possible to use mylatex or mylatexformat for documents with preambles almost the same?

I have documents of this form: \documentclass{article} \newlength{\variableLength} \setlength{\variableLength}{xxxx cm} \usepackage{package1} \usepackage{package2} \usepackage{package3} \...
1
vote
1answer
1k views

Calculating with different types of variables

Is there any way to calculate the height of a node in a tikz pictures and to divide a length by an another length to get a counter and to round it up? If yes where could i read after the subject of ...
1
vote
2answers
671 views

Table title to match table body (in terms of length)

I have a table with 4 columns and my title seems to be far bigger than the main body of the table. This does not look quite good. Is there anyway to have the length of those two be the same, or at ...
1
vote
1answer
281 views

How should I express my length calculation to minimize rounding errors?

I have an input file as follows. % Test.tex \documentclass{article} \usepackage{pstricks} \psset { linewidth=0.01 } \newcommand\All{0.1} \newcommand\Left{-\All} \newcommand\Right{\All} \newcommand\...
1
vote
0answers
36 views

calculate the title height and if the title height is above some number then add some space

calculate the title height and if the title height is above some number then add some space. when I use the code get the title, but when I use code like this \settoheight{\heightoftitle}{\vbox{\...
1
vote
0answers
46 views

showframe package exceeds few points in right side

My tags are follows: \documentclass{book} \usepackage{lipsum} \usepackage{showframe} \makeatletter \renewcommand\normalsize{% \@setfontsize\normalsize{10.9}{14}% \abovedisplayskip 7\p@ plus2\...
1
vote
1answer
77 views

Standalone build command does not capture all length

I am working with standalone sub-file in build mode. I would like to pass lengths from the main file to the sub-file. To do so, according to this answer , I put it in the command used by standalone to ...
1
vote
0answers
63 views

Adjust longtable length to caption length and vice versa

Is there any way to adjust the longtable length to the caption length and vice versa?
1
vote
0answers
93 views

Exact spacing between lines

Is there a way to get the exact spacing between different parts of a document? I know the question may sound a bit vague, so here's the context in which the question arose. Here there is a code ...
1
vote
0answers
64 views

How to find the length of a remaining line? [duplicate]

I'd like to put some lines on a page where a student can answer a question, and I'd like that line to go from the prompt to the right edge of the text. The most simpleminded and (therefore?) ...
1
vote
0answers
405 views

geometry's bindingoffset seems to be ignored

The geometry's documentation tells: page 9: "bindingoffset removes a specified space from the lefthand-side of the page for oneside or the inner-side for twoside.", page 10 (caption of Figure 6): "...
1
vote
1answer
225 views

Trim size as fundamental TeX value

What are the fundamental TeX length names, corresponding to trim size and offsets? I already know that \pdfpagewidth and \pdfpageheight will grab enough information to calculate the PDF MediaBox (in ...
1
vote
0answers
43 views

Maximum length of last line in paragraph [duplicate]

Is there a LaTeX parameter (e.g., a penalty parameter) or any complex solution that can be setup maximum length of the last line in the all paragraphs throughout the text? Let's say, 2 em horizontal ...
1
vote
0answers
126 views

What are skip values? [duplicate]

On page 5 of the titlesec manual (released on June 14, 2000), it is written that full skip values, including the plus and minus parameters can be abbreviated as * n. The example on page 24-25 (the ...
1
vote
2answers
65 views

Why is the width in nwu-lecture-style not working? [closed]

It seems that the code in nwu-lecture-style: \insertshortauthor[width=2cm-2pt,center,respectlinebreaks]\par% is not working? I tried: \insertshortauthor[width=2cm minus 2pt,center,respectlinebreaks]...
1
vote
0answers
29 views

Behavior of \global when used with xifthen package [duplicate]

I'm trying to calculate the sum of some numbers in my document. I want to allow non-integer values, so I'm using lengths, which works just fine. In my document it's often necessary to specify the ...
0
votes
1answer
692 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 ...
0
votes
2answers
136 views

Can't properly calculate column width

Please consider this MWE: \documentclass[11pt, a4paper]{article} \begin{document} \begin{table}[h] \begin{tabular}{|p{40mm}|p{100mm}|} Company & Head Quarters\\ \hline Foo Bar ...
0
votes
1answer
34 views

Cannot give length variable to crop package?

I don't understand why, but the following code fails with the error ! Missing \endcsname inserted. <to be read again> \myStock l.607 \AtBeginDocument {...
0
votes
3answers
39 views

Is there a way to update a length which has been computed from other lengths?

If I define a length by using others lengths, is there a way to update this length at a later point without giving the definition again? Let's say I define a few lengths as follows \newlength{\Test}\...
0
votes
2answers
171 views

Accuracy of distance measures in geometry

In the following MWE, I set the distance from the edge of the paper to the body text to be 25mm. \documentclass[a4paper]{article} \usepackage[showframe, paper = a4paper, tmargin = 25mm]{geometry} \...
0
votes
1answer
35 views

Is it possible to have a stretchable \parindent?

I thought that maybe some stretchability in the paragraph indentation may give TeX more freedom and help it at better typesetting some tough paragraphs. However, the following does not work. \...
0
votes
1answer
27 views

Format issues in longtable (left alignment of cells plus different cell lenght)

I got a longtable with rows containing more or less information. I want to achieve a left alignment because of justification errors plus different lengths in row size (horizontally). My current ...
0
votes
1answer
62 views

text justification/comments filling the space left from equation - flalign and paragraph mode

I have equations in a flalign environment and comments that may need to be multi-liner. \parbox seems fine except I can't tell it to automatically stretch in order to fill the space from the right-end ...
0
votes
1answer
97 views

\hrule length inconsistent

I'm using the tufte-book document class. When I use \hrule, sometimes it extends the text width (which I want), and other times it extends the full page width, apparently randomly. How can I get it ...
0
votes
1answer
49 views

Moving a TikZ drawn `mdframed` `frametitle` box vertically by a real amount?

Consider the following MWE: \documentclass{article} \usepackage[framemethod=TikZ]{mdframed} % noteboxes, boxes, etc. \usepackage{calc} \newcommand{\definebox}[2]{% \newcounter{#1} \...
0
votes
1answer
39 views

What is the rubber length of a float in the float package?

I try to place images with a fixed width from the section title. My question somehow is close to this one, though not covered in the response: How do I remove white space before or after the figures ...
0
votes
1answer
420 views

How to set \topsep=0pt on the latex standard list implementation inside an environment?

Two attempts which not worked Herein there are 2 examples which did not work. Each attempt has written over it % Not works: \PassOptionsToPackage{brazil,main=english}{babel} \documentclass[10pt,...
0
votes
1answer
93 views

Distances in TOC entry of section with mark

I try to customize TOC entry of section via redefining \l@section and defining \@section macros. My purpose was to add different mark (\sectiontitlemark) before section counter in main text as well ...
0
votes
1answer
71 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 ...
0
votes
0answers
19 views

Measure the remainder of a page if it has a title and inserting that into a dynamic command

Okay, so I'm currently writing a report (in the article class) which has a section full of chemical spectra. I figured that two spectra per page is a good number, so I write \RequirePackage{calc} \...
0
votes
0answers
35 views

How to set white space under figure to specific figure?

I don't want to do this in the preamble to set it for all figures. I want to have this for one specific image / figure. Is this possible? If so, how can I do this? \setlength{\belowcaptionskip}{2ex} ...
0
votes
0answers
38 views

Evaluate combinations of page dimensions [duplicate]

For any given class and its specified page layout, I'd like to be able to combine (sum or subtract) a subset of the page dimensions, to obtain a length to work with, without specifying absolute values....
0
votes
0answers
303 views

How can I change the length of footnote line? [duplicate]

I need to change the length of the horizontal line that separates text body from footnotes. I want length of footnote line is as much as width of footnote text. I can the following codes: \def\...
0
votes
1answer
170 views

Text overflows into graphics at bottom of page

I want to include graphics on every page after the title page but on the 2nd page the text flows into the graphics and I also loose the page number on that page. Subsequent pages are fine. Here is my ...
0
votes
0answers
290 views

Geometry package: Lengths saved by default. Options for save/load/restore

The geometry package: Package lengths are not saved as lengths. Examples: layoutheight, tmargin The following only affect the complete layout: \savegeometry \loadgeometry \restoregeometry ...
0
votes
0answers
48 views

Length of horizontal footnote separator [duplicate]

I need to reduce the length of the horizontal line that separates text body from footnotes. I am a beginner, using report document class.