[NTG-context] Formula has excess vertical spacing when in two column itemize

2022-10-21 Thread Gavin via ntg-context
Hi List,

I am getting better at adjusting the space in enumerations, but I just put a 
formula inside an enumeration, and the formula’s vertical spacing became 
excessive. I’m not sure how the enumeration caused this problem.


\starttext

Evaluate the following derivatives.

\startitemize[n, columns, two, nowhite, after]

\item\hspace[big] $\frac{d}{dx} x^2$

This is where the solution should be. Text answers look fine, but formulas have 
too much space above, below and between lines\dots.

\item\hspace[big] $\frac{d}{dx}\left( x^3 + 2x \right)$

\item\hspace[big] $\frac{d}{dx}\left( x^{-2} \right)$

\item\hspace[big] $\frac{d}{dt}\left( 4t^4 - 3t^{\onehalf} \right) $

\item\hspace[big] $\frac{d}{dt}( 9 - 3t )$

\startformula\startmathalignment
\NC \frac{d}{dt}( 9 - 3t ) \NC= \frac{d}{dt} 9 - \frac{d}{dt} 3t \NR
\NC  \NC= 0 - 3\frac{d}{dt} t \NR
\NC  \NC= -3\cdot 1t^0 \NR
\NC  \NC= -3 \NR
\stopmathalignment\stopformula

\item\hspace[big] $\frac{d}{dp}\left( p^3 - 2p \right)$

\stopitemize

\stoptext


I’m also attaching a file with the above issue followed by the correct spacing 
in one-column for comparison.

I’m using LMTX (today’s upload, ver: 2022.10.21 21:13 LMTX  fmt: 2022.10.21) on 
an M1 Mac.

Any ideas?
Gavin



TwoColumnProblems.pdf
Description: Adobe PDF document


TwoColumnProblems.tex
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-10-21 Thread Cron Daemon via ntg-context
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 show-fil.pdf
 context/latest/
 context/latest/cont-mpd.zip
 context/latest/cont-ppc.zip
 context/latest/cont-sci.zip
 context/latest/cont-tmf.zip
 context/latest/cont-tst.7z
 context/latest/cont-tst.tar.xz
 context/latest/cont-tst.zip
 
 sent 101,243 bytes  received 20,853,195 bytes  3,809,897.82 bytes/sec
 total size is 448,906,849  speedup is 21.42


Running archiver:

New dir: /var/www/aanhet.net/context//htdocs/archives/context-2022-10-21.22
172030585   
/var/www/aanhet.net/context//htdocs/archives/context-2022-10-21.22/latest
126745317   
/var/www/aanhet.net/context//htdocs/archives/context-2022-10-21.22/current
18956262
/var/www/aanhet.net/context//htdocs/archives/context-2022-10-21.22/alpha
126707516   
/var/www/aanhet.net/context//htdocs/archives/context-2022-10-21.22/beta
43776   
/var/www/aanhet.net/context//htdocs/archives/context-2022-10-21.22
43776   total
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] upload

2022-10-21 Thread Hans Hagen via ntg-context

Hi,

I updated lmtx ... there are a few fixes for issues reported on the 
list. In the perspective of updating math the - otherwise unchanged - 
mkiv variant has also been updated a little. No new commands, just some 
(already old) experimental font related features gone and replaced by a 
combined one inspired by what we do in lmtx. In our opinion on the 
average it should not come out worse.


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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Spacing in \unit - SOLVED

2022-10-21 Thread Gavin via ntg-context
Hans,

I made a small mistake in the phys-dim.mkxl file I sent you. I removed a % at 
the end of lines 469 and 485. Without the %, using alternative=text causes 
extra space before the unit. A corrected phys-dim.mkxl is attached.

Gavin



phys-dim.mkxl
Description: application/applefile
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Spacing in \unit - SOLVED

2022-10-21 Thread Gavin via ntg-context
Hi Hans,

> I'll look into it (with Mikael as some relates to math) once you're done 
> playing and provide suggestions and tests.

I’m done playing. Below are tests and suggestions. Sorry it has taken so long 
for me to put this together.


Tests
I attached two test files. The first, units-spacing.tex, is for testing spacing 
for \unit used in text, inline math, and display math. The second, 
units-linebreaks.tex, tests line breaks when \unit. is used in text or in 
inline math. Line breaks were not my primary interest, but Max and Alan were 
quite interested. My proposed fixes for spacing also fix their concerns about 
line breaks.I tried to make these tests match the style of the Test Suite. They 
could be included there if they are useful.


Suggestions
I attached my my modified phys-dim.mkxl. All of my changes are commented and 
signed with -GP to make them easy to find. Below are comments on the five 
issues I addressed (not including line breaks). The first four of these are 
fixes.I don’t think any of these fixes are controversial or require new 
options. The fifth, regarding the space around the \times in scientific 
notation, might be an appropriate option, rather than a universal fix.


1. The \cdot in units should not have space around it.
These lines produce the \cdot between units, one is for the default \cdot, the 
other when the separator=cdot option is used. I’m not entirely sure why they 
are separate. Now, in math mode, the \cdot is changed to an ord. (ll. 392-393)

\protected\def\phys_units_separator
 
{\ifcsname\??unitseparator\unitparameter\c!separator\endcsname\lastnamedcs\else\ifmmode\mathord\cdot\else\cdot\fi\fi}
 % Made \cdot an "ord" in math mode -GP

\installunitsseparator\v!normal{\ifmmode\mathord\cdot\else\cdot\fi}  % Made 
\cdot an "ord" in math mode -GP


2. Space is needed between number and units
To get the thin space between the number and the units (ll.412-418)

\protected\def\phys_units_space
 {\ifmmode
\thinspace % let the atoms do the work. Right now atoms aren't doing the 
work, so I put in a \thinspace -GP
  \else
\unskip % weird, why is unskip needed

\ifcsname\??unitspace\unitparameter\c!space\endcsname\lastnamedcs\else\unitsmediumspace\fi
  \fi}


3. Space is needed after the units, before the next relation, binary operator, 
etc. Right now there seems to be no space added between the new dimension class 
and the relation and binary operator class. Until the space around the 
dimension class is fixed, The units should not be assigned to the dimension 
class, which means removing the code that sets units to this class. (ll. 
618-623)

\def\phys_units_start
 {\ifmmode
\dostarttagged\t!maction\t!unit
% \mathatom % I removed this because the correct spaces after dim haven't 
been set (e.g. dimbin, dimrel) -GP
%\s!leftclass  \mathdimensioncode
%\s!rightclass \mathdimensioncode
\bgroup
  \else
\dostarttagged\t!unit\empty
  \fi
  \let\phys_units_finish\phys_units_stop
  \let\phys_units_start\relax}


4. Remove hardcoded backspace before the solidus in units. (If this space 
should be tighter, it probably should be dealt with for every solidus, not just 
the solidus in \unit the unit command.) (ll.412-418)

\permanent\protected\def\unitsSOLIDUS
 {%\ifnum\c_phys_units_state=\plusone % suffix  % Removed three lines to 
eliminate backspace before / -GP
  %  \unitsbackspace
  %\fi
  {/}%
  }%\unitsbackspace}


5. I think the \times in scientific notation should not have extra space. 
Everyone who commented on the mailing list agreed. However, I’m not sure that 
this is a universal desire, so it might be good to add an options, like 
scispace=normal for the usual binop space around the \times and scispace=tight 
for no extra space around \times. The changed line in phys-dime.mkxl used to 
add space around the \times in text. Now, instead, it removes the space around 
the \times in math by making the \times an ord. (ll. 170-172)

\permanent\protected\def\digitstextbinop#1% assumes preceding
 {\ifmmode\mathord#1\else\nobreak#1\fi} % Removed space around binop (\times or 
\cdot) in \units -GP
 %{\ifmmode#1\else\fourperemspace\nobreak#1\fourperemspace\fi} % This is the 
old line with spaces -GP


Those are my five suggestions. Thanks for looking at spacing in \units!

Gavin




units-spacing.tex
Description: Binary data


units-linebreaks.tex
Description: Binary data


phys-dim.mkxl
Description: Binary data


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Setting the size of \small

2022-10-21 Thread Leah Neukirchen via ntg-context
Hans Hagen via ntg-context  writes:

> I'll add
>
> \setupbodyfontenvironment
>   [all]
>   [12pt]
>   [x=4pt,
>small=4pt]
>
> as option (assuming we have no performance hit).

It would also be nice to be able to

\setupbodyfontenvironment[all][default][x=0.8]

(I solved my actual problem by adding a new custom fontsize with
\definefontsize, as it's not really \small but something else.)

-- 
Leah Neukirchenhttps://leahneukirchen.org/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Setting the size of \small

2022-10-21 Thread Hans Hagen via ntg-context

On 10/21/2022 12:59 AM, Leah Neukirchen via ntg-context wrote:

Hi,

playing around with \definebodyfontenvironment with latest LMTX,
I found this possibly buggy behavior:

\definebodyfontenvironment[12pt][small=6pt] % x=6pt works here
\setupbodyfont[12pt]
\starttext
normal {\tx tx} {\small small}
\stoptext

With \definebodyfontenvironment[12pt][x=6pt] I can resize \tx fine,
but for \small it doesn't work.
it has to do with the fact that we have font clases and some parameters 
are bound to it.


\setupbodyfontenvironment
  [pagella]
  [12pt]
  [x=4pt,
   small=4pt]

\setupbodyfont[pagella,12pt]

\starttext
normal {\tx tx} {\small small}
\stoptext

that will work. You can say \fontclass to see what you got after a 
\setupbodyfont.


I'll add

\setupbodyfontenvironment
  [all]
  [12pt]
  [x=4pt,
   small=4pt]

as option (assuming we have no performance hit).

x xx  : dynamic
small big : more static (trigger some definitions)

when we decide to go 'compact fonts' we can review this. We can then 
also decide to get rid of the old design size subsystem (only lm uses it 
unless one does 'modern' and there are other ways.)


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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Setting the size of \small

2022-10-21 Thread Pablo Rodriguez via ntg-context
On 10/21/22 00:59, Leah Neukirchen via ntg-context wrote:
> Hi,
>
> playing around with \definebodyfontenvironment with latest LMTX,
> I found this possibly buggy behavior:
>
> \definebodyfontenvironment[12pt][small=6pt] % x=6pt works here
> \setupbodyfont[12pt]
> \starttext
> normal {\tx tx} {\small small}
> \stoptext
>
> With \definebodyfontenvironment[12pt][x=6pt] I can resize \tx fine,
> but for \small it doesn't work.

Hi Leah,

I don’t know whether it may be a bug, but this works:

  \definebodyfont[12pt]
  \definebodyfontenvironment[12pt][small=100pt, x=100pt]
  \setupbodyfont[12pt]
  \starttext
  normal {\tx tx} {\small small}
  \stoptext

It might be that \small could be hardcoded by default.

Sorry for changing sizes, but I wanted to know for sure it was working.

Just in case it might help,

Pablo
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Backgrounds has changed in latest lmtx

2022-10-21 Thread Otared Kavian via ntg-context
Hi Thomas,

Your example does indeed show the issue I had reported on with Simpleslides: 
the backgrounds of the slides are not as expected.
So it seems that beginning with version 2022-10-15 something has changed with 
Metapost or the background mechanism.

Best regards: Otared

> On 21 Oct 2022, at 11:32, Thomas A. Schmitz via ntg-context 
>  wrote:
> 
> Hi everybody,
> 
> With the latest lmtx, my page backgrounds don’t work any more. I think Otared 
> mentioned that the simpleslides module is having problems. I’m trying to 
> figure out what is happening, but I don’t see any warnings or errors, just 
> unexpected results (which is not a good thing). I’m starting with the 
> fundamentals. Here is a fairly minimal example: compile with context --luatex 
> to see the expected result and with lmtx to see what is wrong.
> 
> All best
> 
> Thomas
> 
> \setuppapersize[A6,landscape][A6,landscape]
> 
> \setuplayout[backspace=1cm,
> topspace=0.4cm,
> marking=off,
> width=13cm,
> height=9.7cm,
> header=0.6cm,
> footer=0cm,
> ]
> 
> \startreusableMPgraphic{card}
> StartPage ;
> save p ; path p[] ;
> p[0] = ulcorner Page -- urcorner Page ;
> p[0] := p[0] shifted (0, -0.97cm) ;
> for i = 1 upto 18 :
>   p[i] = p[i-1] shifted (0, -14.42pt) ;
>   draw p[i] withcolor (0.5,0.5,0.5) ;
> endfor ;
> pickup pencircle scaled 2pt ;
> draw p[0] withcolor red ;
> StopPage ;
> \stopreusableMPgraphic
> 
> \defineoverlay[Card][\reuseMPgraphic{card}]
> 
> \setupbackgrounds[page]
>[state=repeat,
> background={Card}]
> 
> \starttext
> 
> Test
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Backgrounds has changed in latest lmtx

2022-10-21 Thread Thomas A. Schmitz via ntg-context
Hi everybody,

With the latest lmtx, my page backgrounds don’t work any more. I think Otared 
mentioned that the simpleslides module is having problems. I’m trying to figure 
out what is happening, but I don’t see any warnings or errors, just unexpected 
results (which is not a good thing). I’m starting with the fundamentals. Here 
is a fairly minimal example: compile with context --luatex to see the expected 
result and with lmtx to see what is wrong.

All best

Thomas

\setuppapersize[A6,landscape][A6,landscape]

\setuplayout[backspace=1cm,
 topspace=0.4cm,
 marking=off,
 width=13cm,
 height=9.7cm,
 header=0.6cm,
 footer=0cm,
]

\startreusableMPgraphic{card}
StartPage ;
save p ; path p[] ;
p[0] = ulcorner Page -- urcorner Page ;
p[0] := p[0] shifted (0, -0.97cm) ;
for i = 1 upto 18 :
p[i] = p[i-1] shifted (0, -14.42pt) ;
draw p[i] withcolor (0.5,0.5,0.5) ;
endfor ;
pickup pencircle scaled 2pt ;
draw p[0] withcolor red ;
StopPage ;
\stopreusableMPgraphic

\defineoverlay[Card][\reuseMPgraphic{card}]

\setupbackgrounds[page]
 [state=repeat,
  background={Card}]

\starttext

Test

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___