#How to mimic Latex mathscr

26 messages · Page 1 of 1 (latest)

old rock
#

Good morning, I want to mimic mathscr. At the moment I got this workaround:

#let mathscr = (it) => { set text(size: 1em, font: "OPTIOriginal", fallback: false) place(dx: 0.05em, dy: -0.7em, it) h(0.85em) }

First picture is Typst, second is Latex.
Do you have any advice to make it more simple? The font that I have used was extracted from a CTAN package.
Thanks

drowsy lion
#

If I remember correctly, the default math font has script calligraphics hidden behind a flag

#

On further reflection, I think it doesn't

#

But stix two math does

#

You need to enable ss01

old rock
#

Hi, do you have an example or some hint about how to enable ss01? Thanks!

drowsy lion
#

See #discussions message

#

Note that stylistic set 1 is specifically for stix two math

#

Its very likely something else in other fonts

#

@austere tusk considering how often this comes up, would there be a more ergonomic way of handling it? Maintaining a list of fonts with (possibly optional) roundhand calligraphics? The problem here is that unicode doesn't distinguish between the two, but using \mathcal and \mathscr in the same document is relatively common.

frank monolith
tranquil frostBOT
#

couldn't find a valid code block
Render the given code as an image.

Syntax: ?render [pagesize=<page size>] [theme=<theme>] <code block>

Flags

  • pagesize can be auto (default) or default.

  • theme can be dark (default), light, or transparent.

To be clear, the full default preamble is:

// Begin preamble
// Page size:
#set page(width: auto, height: auto, margin: 10pt)
// Theme:
#set page(fill: rgb(49, 51, 56))
#set text(fill: rgb(219, 222, 225))
// End preamble

To remove the preamble entirely, use pagesize=default theme=transparent.

Examples

?render `hello, world!`

?render pagesize=default theme=light ``‌`
= Heading!

And some text.

#lorem(100)
``‌`
drowsy lion
#

The bot doesn't have the font @frank monolith

#

(But you also forgot to add backticks)

frank monolith
#

ah, I see, OK

old rock
#

Thanks a lot, it seems to work!

left olive
#

?render
$bb(L)= cal(L)$

tranquil frostBOT
#

couldn't find a valid code block
Render the given code as an image.

Syntax: ?render [pagesize=<page size>] [theme=<theme>] <code block>

Flags

  • pagesize can be auto (default) or default.

  • theme can be dark (default), light, or transparent.

To be clear, the full default preamble is:

// Begin preamble
// Page size:
#set page(width: auto, height: auto, margin: 10pt)
// Theme:
#set page(fill: rgb(49, 51, 56))
#set text(fill: rgb(219, 222, 225))
// End preamble

To remove the preamble entirely, use pagesize=default theme=transparent.

Examples

?render `hello, world!`

?render pagesize=default theme=light ``‌`
= Heading!

And some text.

#lorem(100)
``‌`
left olive
#

?render

$bb(L)= cal(L)$
tranquil frostBOT
#

Too many arguments were passed
Render the given code as an image.

Syntax: ?render [pagesize=<page size>] [theme=<theme>] <code block>

Flags

  • pagesize can be auto (default) or default.

  • theme can be dark (default), light, or transparent.

To be clear, the full default preamble is:

// Begin preamble
// Page size:
#set page(width: auto, height: auto, margin: 10pt)
// Theme:
#set page(fill: rgb(49, 51, 56))
#set text(fill: rgb(219, 222, 225))
// End preamble

To remove the preamble entirely, use pagesize=default theme=transparent.

Examples

?render `hello, world!`

?render pagesize=default theme=light ``‌`
= Heading!

And some text.

#lorem(100)
``‌`
austere tusk
#

you can also edit your messages to the bot :)

left olive
#

thanks... first time trying to render

gaunt hedge
#

well there is ell

#

?render $ ell $

tranquil frostBOT