As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [baseline]

{baseline] is about questions relating to the shifting of or the alignment relative to the baseline of text, which is the line upon which most letters sit and below which descenders extend.

Filter by
Sorted by
Tagged with
1 vote
1 answer
34 views

how do I space things in a node in tikz?

I want to be able to add more space between the z and w in their node. I tried bigskip and other things (including redefining baselineskip), and the two words (in the original document) still seem ...
kloop's user avatar
  • 9,386
1 vote
2 answers
67 views

A square root sign starting at the baseline

When typing a square root sign sometimes it looks a little bit ugly when the lower part reaches beyond the baseline: \documentclass{standalone} \begin{document} The expression \( \sqrt{x} \) is ...
Andreas Knobloch's user avatar
0 votes
1 answer
37 views

Spacing between parboxes distributed unevenly

I'm fairly new to Latex and not sure, if the solution to my problem is an obvious one. I'm trying to get the spacing between the lines of those parboxes to be distributed evenly; the same distance ...
melodyscat's user avatar
1 vote
1 answer
40 views

How to determine the space between a `hrule` and the next baseline?

I would like to draw a hrule and have a precise control on the vertical space bewteen the line and the baseline of the text under the line. On the following image, one can see that the space between ...
Colas's user avatar
  • 6,516
3 votes
4 answers
264 views

Problem with a TikZcd between curly braces

I was trying to answer a question but the TikZcd I would like to typeset is not well vertically positioned between the curly braces (the red lines are drawn to better show the problem): \documentclass{...
CarLaTeX's user avatar
  • 60.5k
2 votes
1 answer
61 views

Reducing the Amount of Vertical Space Between the Lines of a TOC Subsection Entry

Consider the code \documentclass[12pt]{book} \usepackage[showframe,paperwidth=5.5in,paperheight=8.25in]{geometry} \textwidth=4in \textheight=6.40in \voffset -7pt \usepackage{tocloft} \renewcommand{\...
mlchristians's user avatar
  • 7,552
1 vote
2 answers
79 views

Positioning a horizontal rule with respect to baselines

I am implementing a document design and I noticed that I am struggling to get the right distance between a rule and two test paragraphs. I have created a document class based on on article class, but ...
Robert Manson-Sawko's user avatar
2 votes
1 answer
38 views

Draw connected boxes with common height around letters/words in text

(There are a few related questions, e.g. this and this.) I want to accomplish the following: enclose some words of the text into boxes, with all those words vertically aligned as they were truly just ...
Enlico's user avatar
  • 2,497
1 vote
0 answers
51 views

Text alignment in minipage with tikzpicture

Using 3 minipages, while in the second one is a tikz, will produce the text part not aligned to each other (see red line). Is there o solution without vspace/tabular/multicols etc. to align the ...
Bilal Yilmaz's user avatar
0 votes
1 answer
45 views

So what's the right way to set the preferred line spacing? Changing default line spacing in Book returns underfull \vbox warnings

Simple task: book-class document, 12pt font size, 6x9 page size. With the default book settings (I don't really know what's the default line spacing in book-class document) the document is typeset ...
tryingout's user avatar
  • 115
0 votes
2 answers
46 views

TikZ: Draw under base line and keep the normal spacing between lines

Problem I want to achieve a command for tied lyrics like in lilypond. Now I have it nearly working, but the downside is, that the tikz picture effects the spacing between the lines, which adds too ...
Guest's user avatar
  • 101
1 vote
1 answer
38 views

Maximum height of inline object that does not alter interline

I would like to know what's the maximum height of an object that does not mess with the interline. I naively thought that if my object height is \baselineskip everything would have looked alright, but ...
Atcold's user avatar
  • 1,633
0 votes
0 answers
23 views

How can I match every paragraph from two columns into the same line vertical height or space? [duplicate]

I'm writing a memoir that is mostly doubled column. The left column, is in one language (source) and the right column (target) the translation of the left's into some other language. I need to be ...
Thesevs's user avatar
  • 13
1 vote
3 answers
94 views

Adjusting tikzpicture baseline to be flush

I have two minipages one which encloses a tikz picture. I'd like these to have the same baseline. i.e. I would like the minipages to be flush at the top. By default this doesn't happen: \...
Sriotchilism O'Zaic's user avatar
0 votes
0 answers
71 views

Inferring the baseline height and bounding box widths of characters/text/equations in the 'standalone' environment

I am writing a mathematics visualisation tool using C++ and OpenGL, and want to incorporate LaTeX text and equations. I was initially looking for a C++ library to directly render LaTeX text/equations ...
niran90's user avatar
  • 204
1 vote
2 answers
392 views

How to make acmart stop complaining about \baselinestretch?

I have a document in acmart style, which uses some old package. This package modifies baselinestretch somehow. In the end, I see this in the log: Class acmart Error: An attempt to redefine \...
yegor256's user avatar
  • 11.2k
0 votes
1 answer
484 views

\setlength{\belowcaptionskip} is not the same as \vspace

Following my previous question, I noticed that adding \vspace{-0.5\baselineskip} right after the graphics insertion, does not gives the same exact result when comparing the output with \setlength{\...
tush's user avatar
  • 1,034
2 votes
0 answers
83 views

Raise baseline for English in XeLaTeX in a bilingual document

Please see the MWE given below. \documentclass{article} % For bilingual document \usepackage{polyglossia} \usepackage{fontspec} % Bangla \setmainlanguage[numerals=Devanagari]{bengali} \newfontfamily\...
Masroor's user avatar
  • 17.5k
28 votes
3 answers
2k views

Why is the 7 (Computer Modern italic) jumping out of the baseline in this code?

I have an issue I cannot explain to myself. Here is the code: \documentclass{scrartcl} \usepackage{tikz} \begin{document} \newcommand{\tikzmark}[4][]{\begin{tikzpicture}\node[inner sep=1pt,outer sep=...
TobiBS's user avatar
  • 5,002
1 vote
1 answer
128 views

How to keep base-line based distance before (tikz) environment?

I have an environment (tikzpicture) that tries to occupy a height equal to the multiple of the current line height / baselineskip (I need this to be pixel-perfect, so in a multicol-setup the baselines ...
TeXter's user avatar
  • 1,882
0 votes
2 answers
25 views

Why does the linespacing apply only to the first line?

I am making my own title page(there are better ways), what I don't understand is for the line: {\fontsize{18pt}{25pt}\selectfont FOooo\\COOoooo\\Fooooo} Why only the first line respects the ...
Dhruv Thakkar's user avatar
0 votes
2 answers
85 views

TikZ redefined \xrightarrow causes unequal line skip around the equation

I recently encountered some code redefining \xrightarrow etc. with tikz-cd to avoid possible issue with unicode-math. The code looks like this: \RequirePackage{tikz-cd} \newbox\xratbelow \newbox\...
Jinwen's user avatar
  • 7,472
7 votes
3 answers
754 views

How to align TikZ inline node's label with text outside?

(Once upon a time I knew this stuff, just a few years ago, but now...) How do I make node a and node b aligned with Text? Oh, and the rectangle should actuallybe filled and be "behind" the ...
Enlico's user avatar
  • 2,497
3 votes
2 answers
226 views

Vertical align of fractions inline and display mode (baseline?)

I was checking the solution here for make a small fraction. I get the fraction but I noticed that there is a variation in the vertical alignment in display mode and inline mode: \documentclass[12pt]{...
juanuni's user avatar
  • 1,869
2 votes
0 answers
94 views

Two different fonts with two different baselines

I am mixing two (really, three) fonts together to get as close to a 'natural writing' experience for my students in slides that I produce. There are good reasons to have the writing be as natural as ...
Rob Niemeyer's user avatar
1 vote
1 answer
41 views

Aligning nodes in different tikzpictures

It is possible to align the baseline of two nodes in different tikzpictures. I have a tikz in an align environment as in the following example code \begin{align} &\tikz[remember picture]{\node(I){}...
Luca Benatti's user avatar
1 vote
1 answer
152 views

How to make baselines visible?

I want to show all baselines in all pages of my documentation. This question has been discussed in here, but the solutions provided don't work at all. I'm using pdflatex. Thank you very much!
belmont richter's user avatar
1 vote
1 answer
56 views

Inconsistent paragraph spacing with \parbox for custom design

I am working on a project that requires generating latex code programmatically from a JSON file, which contains a transcribed conversation. The design of the final goal is non-standard. It requires ...
Darien Brito's user avatar
2 votes
2 answers
378 views

Tikz draw at (baseline + south west) combined

If i run \test{ap} and \test{ap} i get Here is the code \newcommand{\test}[1]{ \tikz[baseline=(arced node.base)]{ \node [inner sep=0pt, outer sep=0pt] (arced node) {#1}; \draw ...
Bilal Yilmaz's user avatar
0 votes
1 answer
267 views

How to make vertical space in subscript the same for lower case letter and upper case letter?

In this example \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \[ t_{0} = k r_N + \frac{ (N-1)\phi }{2} \] \[ t_{0} = k r_n + \frac{ (N-1)\phi }{2} \] \end{document} ...
Nasser's user avatar
  • 19.7k
0 votes
1 answer
125 views

Height/vertical distance between baseline and descenderline: how to measure?

Do someone know, how to measure the space between the baseline and descender line? And in general, is there a list with all those kind of measurements?
Bilal Yilmaz's user avatar
0 votes
1 answer
53 views

Baseline Problem with zref & textblock (north west vs baseline)

Zref does calculate the coordinate of north west of P1 (= baseline of "some text"), which in my case is approx (50mm, 274mm) so if i make "uuuuuu" in Textblock with the same ...
Bilal Yilmaz's user avatar
1 vote
1 answer
124 views

Adding Text on includepdf - margin/baseline problem!

If i put a short text it works fine. \put(200,300){short text}% If i put a long text it goes out of boundary. \put(200,200){long long long long long long long long long long long long text}% goes out ...
Bilal Yilmaz's user avatar
7 votes
2 answers
314 views

Positioning punctuation to the bottom right of an equation

I'm writing a paper with tikz-based equations that look like this: I like to have punctuation after equations, but I think it would look better and be less confusing if the punctuation was at the ...
N. Virgo's user avatar
  • 3,835
1 vote
1 answer
147 views

Dealing with variable-height fonts

I'm having problems using LaTeX to deal with a certain font that I'd like to use for an art project. I'm writing a basic document, but when I use this font to write normal text, the baseline ends up ...
user119767's user avatar
1 vote
1 answer
178 views

How can I automatically check, that \baselineskip is large enough?

When I set a font size and baselineskip, I have to take care, that the baselineskip is large enough for my font. Is there an automatic way to check this in LaTeX? Given the following example: \...
TobiBS's user avatar
  • 5,002
2 votes
1 answer
201 views

How can I adjust the baseline alignment of the tensor package?

I have a few issues with the alignment of the baselines when using the tensor package. Here is a MWE: \documentclass[12pt, a4paper]{book} \usepackage{tensor} \begin{document} \begin{equation} \...
Pxx's user avatar
  • 179
2 votes
1 answer
1k views

\baselineskip for 10pt, 11pt and 12pt fonts

There looks like a mismatch between font height and \baselineskip: 10pt - 12.0pt (12.0pt) 11pt - 13.6pt (13.2pt) 12pt - 14.5pt (14.4pt) For example, if font height is 12pt, then \baselineskip should ...
Cyker's user avatar
  • 647
0 votes
1 answer
175 views

Lined-paper line spacing, and redefining the math environment

(The description is kind of long, questions are at bottom) I'm currently using a lined-paper style, thus need all the contents to be strictly sticking to the line. I've changed the \baselineskip, have ...
Jinwen's user avatar
  • 7,472
2 votes
1 answer
87 views

Centering plots with baseline

Code: \documentclass[12pt]{article} \usepackage{pgfplots} \usepackage{float} \pgfplotsset{compat=1.17} \usepackage{tikz} \usepackage{siunitx} \usepackage{caption} \usetikzlibrary{shapes, arrows.meta, ...
Superman's user avatar
  • 1,561
2 votes
1 answer
194 views

What is the behaviour of \fontsize if baselineskip is below a certain value?

during my optimization process I found something spurious I cannot explain to myself and which I would like to understand. So with \fontsize you set the fontsize and the baselineskip. However the ...
TobiBS's user avatar
  • 5,002
4 votes
2 answers
301 views

Fixed vertical spacing between items

Is there a way to ensure that the vertical spacing between every item (line) in a list is exactly the same? I tried specifying the "itemsep", but the resulting spacing still depends on what characters ...
ferdymercury's user avatar
0 votes
1 answer
93 views

Aligning minipages in lstlisting

I'm trying to use two minipages inside an lstnewenvironment and I'm struggling with top- aligning the two minipages. \lstnewenvironment{code} { \lstset{ language=Python, ...
hbot's user avatar
  • 117
1 vote
0 answers
357 views

LuaLaTeX: Align baselines in two column document (grid typesetting)

I'm typesetting a scientific book with a lot of sections, tables, figures and equations. The book is in two columns. My client asked me to ensure baselines of the text in both columns are aligned ...
edison23's user avatar
  • 136
0 votes
1 answer
269 views

Text baseline alignment in filled boxes using tikz

How do I align text in individual boxes to avoid getting results like the following where the second word is shifted up due to parts of the characters stretching below the baseline? Here's my MWE: \...
Hansel's user avatar
  • 397
2 votes
1 answer
186 views

fontspec: how to keep baselineskip stable

Compare these two images:      On the left you have correct baselineskip on all line. On the right you have larger baselineskip for line 5 because of the acute accent on É (in Études). Looking into ...
yannis's user avatar
  • 1,932
1 vote
2 answers
184 views

Section heading with shaded background spanning \textwidth, with uniform baseline

I’m trying to adapt one of the answers to this question so that only the section text, and not the section number, has a coloured background. Unfortunately the use of \parbox seems to result in a non-...
Roly's user avatar
  • 4,060
0 votes
1 answer
309 views

How to set a fixed baseline that doesn't stretch for ascenders or descenders?

Given many lines of text from a parameter or \input file, that contain end-of-line tags, ascenders and descenders: \documentclass{minimal} \begin{document} % Some Code <Here> to disable TeX ...
elika kohen's user avatar
0 votes
0 answers
214 views

Problem with linespace and parskip and font size

I am writing a thesis template with properties like word template. in MS Wors: Font size=14pt, linespace=1.2, space before chapter/section/subsection title = 30pt/27pt/20pt. What I have done so far ...
user avatar
1 vote
1 answer
121 views

Snapping back to baseline in documents with facing pages

Usually the baseline in LaTeX's output is exactly continuous across pages, so that lines on the following pages appear as printed "on top" of each other when a page is turned. But that behaviour can ...
Felix Emanuel's user avatar