* [NTG-context] Inline math spacing
[not found] <a58461bc-75c6-4a25-965d-a47662a0d2ce@Spark>
@ 2023-12-03 21:31 ` Alexandre Christe
2023-12-03 21:41 ` [NTG-context] " Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Christe @ 2023-12-03 21:31 UTC (permalink / raw)
To: Hans Hagen via ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 241 bytes --]
Dear list,
I’m facing some strange spacing with inline maths. Sometimes the space is ok (like around the first two fractions), but sometimes it is way too little. Do I miss to configure something?
Thanks in advance,
A. Christe
[-- Attachment #1.2.1: Type: text/html, Size: 697 bytes --]
[-- Attachment #1.2.2: Capture d’écran 2023-12-03 à 22.29.44.png --]
[-- Type: image/png, Size: 34777 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Inline math spacing
2023-12-03 21:31 ` [NTG-context] Inline math spacing Alexandre Christe
@ 2023-12-03 21:41 ` Hans Hagen
2023-12-04 5:43 ` Alexandre Christe
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2023-12-03 21:41 UTC (permalink / raw)
To: ntg-context
On 12/3/2023 10:31 PM, Alexandre Christe wrote:
> Dear list,
>
> I’m facing some strange spacing with inline maths. Sometimes the space
> is ok (like around the first two fractions), but sometimes it is way too
> little. Do I miss to configure something?
your spacing is little between words too .. hard to tell without MWE
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Inline math spacing
2023-12-03 21:41 ` [NTG-context] " Hans Hagen
@ 2023-12-04 5:43 ` Alexandre Christe
2023-12-04 13:08 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Christe @ 2023-12-04 5:43 UTC (permalink / raw)
To: ntg-context, mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1777 bytes --]
Hi,
Here’s a MWE:
\setupinterlinespace[line=3ex]
\definefontfeature[default][default][lnum=yes,tnum=yes]
\usetypescriptfile[alegreya_libertinus]
\setupbodyfont[alegreya-light,ss,10pt]
\setupmathematics[autopunctuation={all}]
% math definitions
\enablemathautospacing % more global
% \enablemathautofencing % more global
\enablemathautonumbers % more global
% \autofences % more local
\usemodule[ipsum]
\starttext
\ipsum
\stoptext
And I attach the two files to setup the font.
A. Christe
Le 3 déc. 2023 à 22:44 +0100, Hans Hagen <j.hagen@xs4all.nl>, a écrit :
> On 12/3/2023 10:31 PM, Alexandre Christe wrote:
> > Dear list,
> >
> > I’m facing some strange spacing with inline maths. Sometimes the space
> > is ok (like around the first two fractions), but sometimes it is way too
> > little. Do I miss to configure something?
> your spacing is little between words too .. hard to tell without MWE
>
> Hans
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 2605 bytes --]
[-- Attachment #2: libertinus-with-alegreya-math.lfg --]
[-- Type: application/octet-stream, Size: 8376 bytes --]
local common = fonts.goodies.load("common-math.lfg")
local presets = common.mathematics.tweaks.presets
return {
name = "libertinus-with-alegreya-math",
version = "1.00",
comment = "Goodies that complement libertinus.",
author = "Hans Hagen & Mikael Sundqvist",
copyright = "ConTeXt development team",
mathematics = {
parameters = {
FractionRuleThickness = 50,
OverbarRuleThickness = 50,
UnderbarRuleThickness = 50,
AccentTopShiftUp = -35,
FlattenedAccentTopShiftUp = -35,
AccentBaseDepth = 10,
DelimiterPercent = 90,
DelimiterShortfall = 400,
PrimeShiftUp = "1.2*SuperscriptShiftUp",
PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
{
tweak = "version",
expected = "Version 7.040",
},
{
tweak = "addmirrors",
},
-- we have a weird middle integral piece
{
tweak = "dimensions",
list = {
[0x23AE] = { xoffset = -.19 },
},
},
{
tweak = "fixintegrals",
},
presets.scripttocalligraphic { },
presets.rsfstoscript { rscale = 0.97 },
presets.rsfsuprighttoscript { rscale = 0.97 },
presets.moderntocalligraphic { rscale = 0.97 },
presets.eulertocalligraphic { rscale = 0.97 },
presets.xitsarabic { rscale = 0.85 },
presets.fallbacks { },
presets.moveitalics { correct = true },
presets.moveitalics { correct = true, letters = true },
presets.moveintegrals { factor = 1.5 },
presets.wipeitalics { },
{
tweak = "simplifykerns",
},
{
tweak = "kerns",
list = {
[0x002F] = { topleft = -0.15, bottomright = -0.15 },
["0x7D.parts.top"] = { topright = -0.2, }, -- right brace top
["0x7D.parts.bottom"] = { bottomright = -0.2 }, -- right brace bottom
["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top
["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x221A.parts.top"] = { topright = 0.2, }, -- right radical top
["0x221A.parts.bottom"] = { bottomright = 0.2 }, -- right radical bottom
["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 }, -- right radical variants
[0x27E9] = { topright = -0.1, bottomright = -0.1 }, -- angle
["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
[0x27EB] = { topright = -0.1, bottomright = -0.1 },
["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
--
[0x00393] = { bottomright = -0.30, }, -- upright Gamma
},
},
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
-- and then need to tweak the width (which is auto set because it was zero with a large
-- accent anchor offset). First we copy and fix.
{
tweak = "extendaccents",
},
{
tweak = "fixaccents",
},
-- First we set the dimensions of the initial accent which started out as zero but we want
-- a proper width.
-- {
-- tweak = "dimensions",
-- list = {
-- [0x00302] = { width = 1.8, anchor = 1.40, xoffset = .20 }, -- widehat
-- [0x00303] = { width = 2.0, anchor = 1.50, xoffset = .30 }, -- widetilde
-- [0x00306] = { width = 1.6, anchor = 1.30, xoffset = .15 }, -- widebreve
-- [0x0030C] = { width = 1.3, anchor = 1.15, xoffset = .075 }, -- widecheck
-- },
-- },
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
-- as well as the variants here. None in libertinus.
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
tweak = "copyaccents",
},
-- So far for the accents.
{
tweak = "radicaldegreeanchors",
list = {
[0x221A] = { location = "left", hfactor = .0, vfactor = .625 },
["0x221A.variants.*"] = { location = "left", hfactor = .0, vfactor = .5 },
["0x221A.variants.1"] = { location = "left", hfactor = .0, vfactor = .55 },
["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.15 },
}
},
{
tweak = "fixprimes",
scale = 1.5,
-- smaller = true,
factor = 0.9,
fake = 0.8,
},
{
tweak = "checkspacing",
},
{
tweak = "addscripts",
},
{
tweak = "accentdimensions",
},
{
tweak = "addrules",
},
{
tweak = "addbars",
advance = 0.5,
},
{
tweak = "replacerules",
minus = {
height = .176,
yoffset = .825,
leftoffset = .065,
rightoffset = .065,
},
fraction = {
height = .176,
yoffset = .825,
},
radical = {
height = .140,
yoffset = .800,
leftoffset = .075,
yscale = .950,
},
stacker = {
height = .176,
yoffset = .825,
},
},
{
tweak = "addactuarian",
},
{
tweak = "addequals",
},
{
tweak = "addfourier",
variant = 1,
},
{
tweak = "addprimed",
},
{
-- needed for integrals (bad axis) and (less prominent) fences
tweak = "setoptions",
set = { "ignorekerndimensions" }
},
-- this is the mkiv section
{
tweak = "emulatelmtx",
feature = "emulatelmtx",
comment = "this is for mkiv",
},
},
},
bigslots = {
1, 3, 5, 7
},
},
}
[-- Attachment #3: type-imp-alegreya_libertinus.mkiv --]
[-- Type: application/octet-stream, Size: 12574 bytes --]
\starttypescriptcollection [alegreya_libertinus]
\usetypescriptfile[libertinus]
\loadfontgoodies[libertinus-with-alegreya-math]
\definefontfeature[alefeatures][
mode=node,
liga=yes,
kern=yes,
tlig=yes,
ccmp=yes,
language=dflt,
protrusion=quality,
expansion=quality
]
\starttypescript [sans] [alegreya,alegreya-light,alegreya-medium]
\definefontsynonym[AlegreyaSans-Thin] [file:AlegreyaSans-Thin]
\definefontsynonym[AlegreyaSans-ThinItalic] [file:AlegreyaSans-ThinItalic]
\definefontsynonym[AlegreyaSans-ThinCaps] [file:AlegreyaSansSC-Thin]
\definefontsynonym[AlegreyaSans-ThinItalicCaps] [file:AlegreyaSansSC-ThinItalic]
\definefontsynonym[AlegreyaSans-Light] [file:AlegreyaSans-Light]
\definefontsynonym[AlegreyaSans-LightItalic] [file:AlegreyaSans-LightItalic]
\definefontsynonym[AlegreyaSans-LightCaps] [file:AlegreyaSansSC-Light]
\definefontsynonym[AlegreyaSans-LightItalicCaps] [file:AlegreyaSansSC-LightItalic]
\definefontsynonym[AlegreyaSans-Regular] [file:AlegreyaSans-Regular]
\definefontsynonym[AlegreyaSans-Italic] [file:AlegreyaSans-Italic]
\definefontsynonym[AlegreyaSans-Caps] [file:AlegreyaSansSC-Regular]
\definefontsynonym[AlegreyaSans-ItalicCaps] [file:AlegreyaSansSC-Italic]
\definefontsynonym[AlegreyaSans-Medium] [file:AlegreyaSans-Medium]
\definefontsynonym[AlegreyaSans-MediumItalic] [file:AlegreyaSans-MediumItalic]
\definefontsynonym[AlegreyaSans-MediumCaps] [file:AlegreyaSansSC-Medium]
\definefontsynonym[AlegreyaSans-MediumItalicCaps] [file:AlegreyaSansSC-MediumItalic]
\definefontsynonym[AlegreyaSans-Bold] [file:AlegreyaSans-Bold]
\definefontsynonym[AlegreyaSans-BoldItalic] [file:AlegreyaSans-BoldItalic]
\definefontsynonym[AlegreyaSans-BoldCaps] [file:AlegreyaSansSC-Bold]
\definefontsynonym[AlegreyaSans-BoldItalicCaps] [file:AlegreyaSansSC-BoldItalic]
\definefontsynonym[AlegreyaSans-ExtraBold] [file:AlegreyaSans-ExtraBold]
\definefontsynonym[AlegreyaSans-ExtraBoldItalic] [file:AlegreyaSans-ExtraBoldItalic]
\definefontsynonym[AlegreyaSans-ExtraBoldCaps] [file:AlegreyaSansSC-ExtraBold]
\definefontsynonym[AlegreyaSans-ExtraBoldItalicCaps][file:AlegreyaSansSC-ExtraBoldItalic]
\definefontsynonym[AlegreyaSans-Black] [file:AlegreyaSans-Black]
\definefontsynonym[AlegreyaSans-BlackItalic] [file:AlegreyaSans-BlackItalic]
\definefontsynonym[AlegreyaSans-BlackCaps] [file:AlegreyaSansSC-Black]
\definefontsynonym[AlegreyaSans-BlackItalicCaps] [file:AlegreyaSansSC-BlackItalic]
\stoptypescript
\starttypescript [serif] [alegreya]
\definefontsynonym[AlegreyaSerif-Regular] [file:Alegreya-Regular]
\definefontsynonym[AlegreyaSerif-Italic] [file:Alegreya-Italic]
\definefontsynonym[AlegreyaSerif-Caps] [file:AlegreyaSC-Regular]
\definefontsynonym[AlegreyaSerif-Bold] [file:Alegreya-Bold]
\definefontsynonym[AlegreyaSerif-BoldItalic] [file:Alegreya-BoldItalic]
\definefontsynonym[AlegreyaSerif-BoldCaps] [file:AlegreyaSC-Bold]
\definefontsynonym[AlegreyaSerif-Black] [file:Alegreya-Black]
\definefontsynonym[AlegreyaSerif-BlackItalic] [file:Alegreya-BlackItalic]
\definefontsynonym[AlegreyaSerif-BlackCaps] [file:AlegreyaSC-Black]
\stoptypescript
\starttypescript [sans] [alegreya,alegreya-light,alegreya-medium] [name]
\definefontsynonym [Sans] [AlegreyaSans-Regular] [features=alefeatures]
\definefontsynonym [SansItalic] [AlegreyaSans-Italic] [features=alefeatures]
\definefontsynonym [SansSlanted] [AlegreyaSans-Italic] [features=alefeatures]
\definefontsynonym [SansBold] [AlegreyaSans-Bold] [features=alefeatures]
\definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic] [features=alefeatures]
\definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic] [features=alefeatures]
\definefontsynonym [SansCaps] [AlegreyaSans-Caps] [features=alefeatures]
\definefontsynonym [SansThin] [AlegreyaSans-Thin] [features=alefeatures]
\definefontsynonym [SansThinItalic] [AlegreyaSans-ThinItalic][features=alefeatures]
\definefontsynonym [SansThinSlanted] [AlegreyaSans-ThinItalic][features=alefeatures]
\definefontsynonym [SansThinCaps] [AlegreyaSans-ThinCaps] [features=alefeatures]
\definefontsynonym [SansLight] [AlegreyaSans-Light] [features=alefeatures]
\definefontsynonym [SansLightItalic] [AlegreyaSans-LightItalic][features=alefeatures]
\definefontsynonym [SansLightSlanted] [AlegreyaSans-LightItalic][features=alefeatures]
\definefontsynonym [SansLightCaps] [AlegreyaSans-LightCaps] [features=alefeatures]
\definefontsynonym [SansMedium] [AlegreyaSans-Medium] [features=alefeatures]
\definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][features=alefeatures]
\definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][features=alefeatures]
\stoptypescript
\starttypescript [sans] [alegreya-light] [name]
\definefontsynonym [Sans] [AlegreyaSans-Light] [features=alefeatures]
\definefontsynonym [SansItalic] [AlegreyaSans-LightItalic] [features=alefeatures]
\definefontsynonym [SansSlanted] [AlegreyaSans-LightItalic] [features=alefeatures]
\definefontsynonym [SansCaps] [AlegreyaSans-LightCaps] [features=alefeatures]
\definefontsynonym [SansBold] [AlegreyaSans-Medium] [features=alefeatures]
\definefontsynonym [SansBoldItalic] [AlegreyaSans-MediumItalic] [features=alefeatures]
\definefontsynonym [SansBoldSlanted][AlegreyaSans-MediumItalic] [features=alefeatures]
\stoptypescript
\starttypescript [sans] [alegreya-medium] [name]
\definefontsynonym [Sans] [AlegreyaSans-Medium] [features=alefeatures]
\definefontsynonym [SansItalic] [AlegreyaSans-MediumItalic] [features=alefeatures]
\definefontsynonym [SansSlanted] [AlegreyaSans-MediumItalic] [features=alefeatures]
\definefontsynonym [SansCaps] [AlegreyaSans-MediumCaps] [features=alefeatures]
\definefontsynonym [SansBold] [AlegreyaSans-ExtraBold] [features=alefeatures]
\definefontsynonym [SansBoldItalic] [AlegreyaSans-ExtraBoldItalic] [features=alefeatures]
\definefontsynonym [SansBoldSlanted][AlegreyaSans-ExtraBoldItalic] [features=alefeatures]
\stoptypescript
\starttypescript [serif] [alegreya] [name]
\definefontsynonym [Serif] [AlegreyaSerif-Regular] [features=alefeatures]
\definefontsynonym [SerifItalic] [AlegreyaSerif-Italic] [features=alefeatures]
\definefontsynonym [SerifSlanted] [AlegreyaSerif-Italic] [features=alefeatures]
\definefontsynonym [SerifBold] [AlegreyaSerif-Bold] [features=alefeatures]
\definefontsynonym [SerifBoldItalic] [AlegreyaSerif-BoldItalic] [features=alefeatures]
\definefontsynonym [SerifBoldSlanted][AlegreyaSerif-BoldItalic] [features=alefeatures]
\definefontsynonym [SerifCaps] [AlegreyaSerif-Caps] [features=alefeatures]
\stoptypescript
\starttypescript [mono] [overpass]
\definefontsynonym[OverpassMono-Regular] [file:overpass-mono-regular]
\definefontsynonym[OverpassMono-Light] [file:overpass-mono-light]
\stoptypescript
\starttypescript [mono] [overpass] [name]
\definefontsynonym [Mono] [OverpassMono-Regular] [features=]
\stoptypescript
\starttypescript [mono] [overpass-light] [name]
\definefontsynonym [Mono] [OverpassMono-Light] [features=]
\stoptypescript
\starttypescript [alegreya]
\definetypeface [alegreya] [rm] [serif] [alegreya] [default]
\definetypeface [alegreya] [ss] [sans] [alegreya] [default]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercaseitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercaseitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercasenormal,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercasenormal,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercasegreekitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercasegreekitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercasegreeknormal,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercasegreeknormal,force=yes]
\definefontfeature[inlinemath][lnum=yes,pnum=yes]
\definefallbackfamily [alegreya] [math] [Alegreya]
[preset=math:digitsnormal,features=inlinemath,force=yes]
\definefallbackfamily [alegreya] [math] [Alegreya]
[preset=math:digitsbold,features=inlinemath,force=yes]
\definefallbackfamily [alegreya] [math] [Alegreya]
[range=superscriptsandsubscripts,force=yes]
\definefontfamily [alegreya] [math] [LibertinusMath] [goodies=libertinus-with-alegreya-math.lfg]
\definefontfamily [alegreya] [tt] [overpass] [scale=0.9]
\stoptypescript
\starttypescript [alegreya-light]
\definetypeface [alegreya-light] [rm] [serif] [alegreya] [default]
\definetypeface [alegreya-light] [ss] [sans] [alegreya-light] [default]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:lowercaseitalic,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:uppercaseitalic,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:lowercasenormal,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:uppercasenormal,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:lowercasegreekitalic,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:uppercasegreekitalic,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:lowercasegreeknormal,force=yes]
\definefallbackfamily
[alegreya-light] [math] [Alegreya]
[preset=math:uppercasegreeknormal,force=yes]
\definefontfeature[inlinemath][lnum=yes,pnum=yes]
\definefallbackfamily [alegreya-light] [math] [Alegreya]
[preset=math:digitsnormal,features=inlinemath,force=yes]
\definefallbackfamily [alegreya-light] [math] [Alegreya]
[preset=math:digitsbold,features=inlinemath,force=yes]
\definefallbackfamily [alegreya-light] [math] [Alegreya]
[range=superscriptsandsubscripts,force=yes]
\definefontfamily [alegreya-light] [math] [LibertinusMath] [goodies=libertinus-with-alegreya-math.lfg]
\definefontfamily [alegreya-light] [tt] [overpass-light] [scale=0.9]
\stoptypescript
\starttypescript [alegreya-medium]
\definetypeface [alegreya] [rm] [serif] [alegreya] [default]
\definetypeface [alegreya] [ss] [sans] [alegreya-medium] [default]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercaseitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercaseitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercasenormal,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercasenormal,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercasegreekitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercasegreekitalic,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:lowercasegreeknormal,force=yes]
\definefallbackfamily
[alegreya] [math] [Alegreya]
[preset=math:uppercasegreeknormal,force=yes]
\definefontfeature[inlinemath][lnum=yes,pnum=yes]
\definefallbackfamily [alegreya] [math] [Alegreya]
[preset=math:digitsnormal,features=inlinemath,force=yes]
\definefallbackfamily [alegreya] [math] [Alegreya]
[preset=math:digitsbold,features=inlinemath,force=yes]
\definefallbackfamily [alegreya] [math] [Alegreya]
[range=superscriptsandsubscripts,force=yes]
\definefontfamily [alegreya] [math] [LibertinusMath] [goodies=libertinus-with-alegreya-math.lfg]
\definefontfamily [alegreya] [tt] [overpass] [scale=0.9]
\stoptypescript
\stoptypescriptcollection
[-- Attachment #4: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Inline math spacing
2023-12-04 5:43 ` Alexandre Christe
@ 2023-12-04 13:08 ` Hans Hagen via ntg-context
2023-12-04 13:42 ` Alexandre Christe
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2023-12-04 13:08 UTC (permalink / raw)
To: Alexandre Christe, mailing list for ConTeXt users; +Cc: Hans Hagen
On 12/4/2023 6:43 AM, Alexandre Christe wrote:
> Hi,
>
> Here’s a MWE:
>
> \setupinterlinespace[line=3ex]
>
> \definefontfeature[default][default][lnum=yes,tnum=yes]
> \usetypescriptfile[alegreya_libertinus]
> \setupbodyfont[alegreya-light,ss,10pt]
> \setupmathematics[autopunctuation={all}]
>
> % math definitions
> \enablemathautospacing % more global
> % \enablemathautofencing % more global
> \enablemathautonumbers % more global
> % \autofences % more local
>
> \usemodule[ipsum]
>
> \starttext
>
> \ipsum
>
> \stoptext
>
> And I attach the two files to setup the font.
no math ... anyway
\showglyphs
\dorecurse{100}{test \im{\frac{#1}{3}} test }
\setupmathematics[textdistance=.25em plus .1em minus .1em]
\dorecurse{100}{test \im{\frac{#1}{3}} test }
will give more space but it's mostly optical that the math related
spacing looks doferent from regular spaces.
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Inline math spacing
2023-12-04 13:08 ` Hans Hagen via ntg-context
@ 2023-12-04 13:42 ` Alexandre Christe
2023-12-04 19:45 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Christe @ 2023-12-04 13:42 UTC (permalink / raw)
To: mailing list for ConTeXt users, Hans Hagen
[-- Attachment #1.1: Type: text/plain, Size: 346 bytes --]
Hi Hans,
Thanks for your answer. It helps a lot. Would there be a way to only add space when inline math is not followed by punctuation, i.e., when inline math is followed by a space?
A. Christe
Le 4 déc. 2023 à 14:08 +0100, Hans Hagen <j.hagen@freedom.nl>, a écrit :
>
> \setupmathematics[textdistance=.25em plus .1em minus .1em]
[-- Attachment #1.2.1: Type: text/html, Size: 1023 bytes --]
[-- Attachment #1.2.2: Capture d’écran 2023-12-04 à 14.41.31.png --]
[-- Type: image/png, Size: 50374 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Inline math spacing
2023-12-04 13:42 ` Alexandre Christe
@ 2023-12-04 19:45 ` Hans Hagen via ntg-context
0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2023-12-04 19:45 UTC (permalink / raw)
To: Alexandre Christe, mailing list for ConTeXt users; +Cc: Hans Hagen
On 12/4/2023 2:42 PM, Alexandre Christe wrote:
> Hi Hans,
>
> Thanks for your answer. It helps a lot. Would there be a way to only add
> space when inline math is not followed by punctuation, i.e., when inline
> math is followed by a space?
>
>
> A. Christe
> Le 4 déc. 2023 à 14:08 +0100, Hans Hagen <j.hagen@freedom.nl>, a écrit :
>>
>> \setupmathematics[textdistance=.25em plus .1em minus .1em]
Hm, I can make it optional (engine feature then) but will discuss it
with Mikael first.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-04 19:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <a58461bc-75c6-4a25-965d-a47662a0d2ce@Spark>
2023-12-03 21:31 ` [NTG-context] Inline math spacing Alexandre Christe
2023-12-03 21:41 ` [NTG-context] " Hans Hagen
2023-12-04 5:43 ` Alexandre Christe
2023-12-04 13:08 ` Hans Hagen via ntg-context
2023-12-04 13:42 ` Alexandre Christe
2023-12-04 19:45 ` Hans Hagen via ntg-context
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).