Thanks very much.
Very clear answer.
I am talking about HTML, indeed.
I certainly will try your code.
Thanks again, Jos
-Original Message-
From: Dupéron Georges [mailto:jahvascriptman...@gmail.com]
Sent: martes, 23 de agosto de 2016 12:56
To: Racket Users
Cc: jos.k...@gmail.com
Subject: Re: linespacing in scribble with superscripts
Le jeudi 18 août 2016 22:21:37 UTC+2, jos.koot a écrit :
> #lang scribble/manual
> bla blah blah@(linebreak)
> blah blah bla @superscript{blah blah bah}@(linebreak)
> bla blah blah
>
> the linespacing between the first 2 lines is larger
> than between the last 2 lines.
I suppose you are talking about the HTML output, as LaTeX (used for the PDF
output) handles this correctly, unless you start
stacking many superscripts, as you noted.
I used a quick hack to collapse the element's vertical height in HTML, with
`margin-top` and `margin-bottom` set to an arbitrary,
large, negative value, and `display: inline-block;` so that the margin is taken
into account.
Unfortunately, scribble doesn't apply a CSS class to superscript elements, and
instead it uses some hard-coded `style="…"` attribute
on the element. I therefore suggest overriding the `superscript` function with
your own definition. The code below renders as the
attached screenshot, and allows you to use the `@original-superscript{…}` if
you need.
#lang scribble/manual
@(require scribble/core
scribble/html-properties
scribble/latex-properties
(only-in scribble/manual
[superscript original-superscript]))
@(define thin-superscript-css
(string->bytes/utf-8 #