[NTG-context] new upload lmtx

2021-06-18 Thread Hans Hagen

Hi,

End of the week so time to wrap up.

(1) As follow up on the primt/quote discussions I played a bit with 
additional font features. We already had a partial case feature but that 
one is also better. The camelcaser is more an experiment (and example).


% \definefontfeature[primes] [primes=yes]
% \definefontfeature[uppercasing][uppercasing=yes]
% \definefontfeature[lowercasing][lowercasing=yes]
% \definefontfeature[camelcasing][camelcasing=yes]

\setupbodyfont[dejavu]

\starttext

\startTEXpage[align={tolerant,stretch},offset=1ex]
{\addff{camelcasing} \samplefile{tufte}\par}
{\addff{uppercasing} \samplefile{tufte}\par}
{\addff{lowercasing} \samplefile{tufte}\par}
{\addff{primes} 123'345''\par}
\stopTEXpage

\stoptext

(2) (Pablo:) There is some pogress with facing floats that Thomas will 
check out for real usage. So, still experimental.


(3) Already for some 'mails' I mention playing with modifiers in math. 
The openup varianst are now a bit more tolerant in the sense that they 
work for more classes.


For a while I hav ebeen wondering about the prescripts and to what 
extend they should be controlled independent. For instance, we can mess 
with \Umathsupshiftup and such to get some displacement and it can even 
be done local, but still ... these are normally kind of font drive. So I 
decided to add a few more parameters, like \Umathextrasupshift   for 
each of the four possible scripts. For convenience I added \supsubscr,

\subsupscr, \supscr, and \subscr commands with an optional argument.

Basically we can now control quite a lot also because all defaults can 
be also influenced with \Umath*variant if needed; I probably need to 
check again if there are any (traditional tex math) hardwired 
properties. I know that not all of that is really needed (also because 
much of tex math is chisseled in stone and not supposed to be controlled 
although in context i suppose we have a bit more freedom) but it simply 
fit in the luametatex effort to do so.


Of course there might be math fields that need such things (so I might 
add some more modifiers, also because it's kind of fun to do).


Hans

 test file for math stuff 

\setupbodyfont[newcomputermodern-book]

\enableexperiments[math.extensibles]

\starttext

% \displaylimits
% \limits
% \nolimits
% \ordlimits (maybe replace that one now or maybe no longer needed anyway)

% \Umathadapttoleft \Umathadapttoright
% \Umathaxis \Umathnoaxis
% \Umathphantom \Umathvoid
% \Umathopenupheight  \Umathopenupdepth  
% \Umathlimits \Umathnolimits

% we can influence the location of sript with the open up modifiers but
% how about a different pre/post scripts anchoring ... as a first step
% i added these \Umathextra..shift parameters but maybe we need some more
% (we have this script control mode already, so maybe we need one for the
% prescripts too .. next todo i guess) .. we need examples of usage (like
% chemistry) .. maybe we also need a way to set the whole lot of styles
% at once .. again user demand driven)

\startTEXpage
$
x^1_2^^3__4
  = \normalmathop{x}^1_2^^3__4
  = \normalmathop{x}\Umathopenupheight5mm^1_2^^3__4
  = x\Umathopenupheight5mm\Umathopenupdepth2mm^1_2^^3__4
  = {\frozen\Umathsupshiftup\textstyle10pt x^1}
  = {x\frozen\Umathsupshiftup\textstyle10pt^1}
  = {\frozen\Umathsupshiftup\textstyle12pt x^1_2^^3__4}
  = {\frozen\Umathsupshiftup\textstyle12pt 
x\Umathopenupheight5mm^1_2^^3__4}

$
\stopTEXpage

\startTEXpage
$
x^1_2^^3__4
  =
\frozen\Umathextrasupshift   \textstyle2pt
\frozen\Umathextrasubshift   \textstyle4pt
\frozen\Umathextrasuppreshift\textstyle6pt
\frozen\Umathextrasubpreshift\textstyle8pt
x^1_2^^3__4
\frozen\Umathextrasupshift   \textstyle\zeropoint
\frozen\Umathextrasubshift   \textstyle\zeropoint
\frozen\Umathextrasuppreshift\textstyle\zeropoint
\frozen\Umathextrasubpreshift\textstyle\zeropoint
  =
\mathord {
\frozen\Umathextrasupshift   \textstyle2pt
\frozen\Umathextrasubshift   \textstyle4pt
\frozen\Umathextrasuppreshift\textstyle6pt
\frozen\Umathextrasubpreshift\textstyle8pt
x^1_2^^3__4
}
  =
x^1_2^^3__4
$
\stopTEXpage

% a few helpers ... do we need more like that ... we realy want to avoid
% ugly low level messing around (these \, etc are also kind of ugly)

\startTEXpage
$
x\supscr   [2pt]{1}
 \subscr   [3pt]{2}
  = x\supsubscr[2pt]{1}{2}
  = x\supsubscr[2pt]{1}{2}\supsubprescr{1}{2}
  = x\supsubscr[2pt]{1}{2}\supsubprescr[5pt]{1}{2}
  = x\subsupscr[2pt]{2}{1}
  = x\supscr{1}
 \subscr   [2pt]{2}
  = x\supsubscr {1}{2}
  = x\subsupscr {2}{1}
$
\stopTEXpage

\startTEXpage[offset=5mm]
\startformula
x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm width 5mm} =
x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm width 5mm} =
x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm width 5mm} =
x = \integral^1_2 

Re: [NTG-context] Straight Quotes / Curly Quotes

2021-06-18 Thread Hans Hagen

On 6/18/2021 5:48 PM, Thangalin wrote:

The csquotes package can curl straight quotes:

https://ctan.org/pkg/csquotes 

I don't know how smart its smart quote feature is, though, with respect 
to apostrophes.


me neither and as we always had lots of quote related stuff on board i'm 
also not going to explore it ... when apostrophes get translated as you 
do but with active characters it's no fun (ok, we still have a few in 
context like ~ and |)


just for fun i made

   {\addff{primes} 123'345''\par}

use primes ... in a next upload

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


Re: [NTG-context] Straight Quotes / Curly Quotes

2021-06-18 Thread Hans Hagen

On 6/18/2021 6:05 PM, Thangalin wrote:
 > In HTML you should be able to use  – I know that doesn’t work 
reliably in browsers (some add straight quotes to my CSS-configured 
guillemets).


The Converter class maps token replacements:

https://github.com/DaveJarvis/keenquotes/blob/d6c9761f8fe1ae96391f25dc73be52050a148e37/src/main/java/com/whitemagicsoftware/keenquotes/Converter.java#L15 



It'd be trivial to use  and , instead. For my purposes, HTML 
entities work.


 > Using \quotation / \quote I avoid typing quotation marks in most cases.

When writing plain text documents, adding TeX code or HTML code to 
prescribe how the document should be presented is best avoided, so as to 
keep the document decoupled from a particular tool chain. YMMV. A deeper 
solution allows users to type the correctly curled quotes directly into 
the document.
As with may things today this quote is rather english language centered 
.. tex operates in a multi lingual domain and quotes have always been 
dealt with using macros so that we can be sure we get the right ones 
(left/right) with the right spacing.


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


Re: [NTG-context] Straight Quotes / Curly Quotes

2021-06-18 Thread Thangalin
> In HTML you should be able to use  – I know that doesn’t work reliably
in browsers (some add straight quotes to my CSS-configured guillemets).

The Converter class maps token replacements:

https://github.com/DaveJarvis/keenquotes/blob/d6c9761f8fe1ae96391f25dc73be52050a148e37/src/main/java/com/whitemagicsoftware/keenquotes/Converter.java#L15

It'd be trivial to use  and , instead. For my purposes, HTML
entities work.

> Using \quotation / \quote I avoid typing quotation marks in most cases.

When writing plain text documents, adding TeX code or HTML code to
prescribe how the document should be presented is best avoided, so as to
keep the document decoupled from a particular tool chain. YMMV. A deeper
solution allows users to type the correctly curled quotes directly into the
document.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Straight Quotes / Curly Quotes

2021-06-18 Thread Thangalin
The csquotes package can curl straight quotes:

https://ctan.org/pkg/csquotes

I don't know how smart its smart quote feature is, though, with respect to
apostrophes.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Fatal error: return code: 256 with documents in ConTeXt's distribution

2021-06-18 Thread Nicola
I am trying to typeset some documents under

tex/texmf-context/doc/context/sources

with mixed results. I am using ConTeXt from TeX Live 2021, and the latest
LMTX (just rsync'ed). Results vary:

1. Successful in both cases:

$ /Library/TeX/texbin/mtxrun --script context --autogenerate 
mag--mkiv.tex
[...]
system  | total runtime: 5.074 seconds

$ ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script context 
--autogenerate mag--mkiv.tex
[...
$ system  | total runtime: 3.323 seconds of 3.389 seconds

2. Fatal error with TeX Live vs apparently stuck with beta:

$ /Library/TeX/texbin/mtxrun --script context --autogenerate 
mag-1104-mkiv.tex
[...]
mtx-context | fatal error: return code: 256

$ ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script context 
--autogenerate mag-1104-mkiv.tex
[...]
pages   > flushing realpage 7, userpage 6, subpage 7
pages   > flushing realpage 8, userpage 7, subpage 8
pages   > flushing realpage 9, userpage 8, subpage 9
[Gets stuck at this point, with luametatex using 100% CPU]

3. Fatal error in both cases:

$ /Library/TeX/texbin/mtxrun --script context --autogenerate 
mag-1102-mkiv.tex
[...]
mtx-context | fatal error: return code: 256

$ ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script context 
--autogenerate mag-1102-mkiv.tex
[...]
mtx-context | fatal error: return code: 256

4.  Fatal error in TeX Live, successful with beta:

$ /Library/TeX/texbin/mtxrun --script context --autogenerate metafun.tex
[...]
mtx-context | fatal error: return code: 256

$ ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --script context 
--autogenerate metafun.tex
[...]
system  | total runtime: 10.509 seconds of 10.569 seconds

And so on.

The above tests were done in two different terminal windows, with $PATH
set accordingly. I have reported the full path to the executable for
clarity.

This is with Intel macOS. Is anyone able to reproduce these results? Or
should I search for something wrong with my setup?

Nicola


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

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


Re: [NTG-context] Functionnames disappearing (sometimes)

2021-06-18 Thread Mikael Sundqvist
Hi,

It seems that

\setupmathematics[
functionstyle=normal,
]

is the problematic one here (it is needed(?) in the Neo Euler case to
have function names set upright). The following file shows the problem
as well:

%%%
\setupmathematics[
functionstyle=normal,
]

\starttext
We have $\cos\alpha$, $\sin\alpha$, $\tan\alpha$,
\startformula
\cos\alpha=\frac{a}{c},\quad
\sin\alpha=\frac{b}{c},\quad
\tan\alpha=\frac{\sin\alpha}{\cos\alpha}=\frac{b}{a}.
\stopformula
\stoptext
%%%

I had a backup of the file I was working on, and the problem was not
present on june 13 (not sure I had a completely updated ConTeXt by
then).

/Mikael

On Fri, Jun 18, 2021 at 11:44 AM Mikael Sundqvist  wrote:
>
> Hi,
>
> I noticed something strange today. If I use computer modern unicode
> (the concrete font) together with Neo Euler math then sometimes
> function names (like \sin, \cos, \tan) disappear. Sometimes they show
> (in non-displayed math and in fractions(?)).
>
> Attached is a file showing the problem, together with the output and
> the typescript file. I use the latest ConTeXt version and I have
> cleared the cache, but no change. Maybe I'm overlooking something, but
> what?
>
> /Mikael
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Straight Quotes / Curly Quotes

2021-06-18 Thread Henning Hraban Ramm

> Am 18.06.2021 um 04:08 schrieb Thangalin :
> 
> Hraban,
> 
> > In what kind of workflows does your program make sense?
> 
> Have you looked around the web lately?
> 
> KeenWrite (https://github.com/DaveJarvis/keenwrite), my plain text editor, 
> can neither convert nor easily type curly quotes into the application. 
> Recently, I added ConTeXt integration for exporting to PDF files. ConTeXt 
> doesn't curl the quotes, which I found a little surprising (because LaTeX has 
> a quote curling package). Not seeing an obvious solution, I coded my own 
> library because all the other libraries I found were either not up to the 
> task or required a massive natural language parser dependency.
> 
> My workflow will be: Edit plain text in KeenWrite, export to XHTML, curl the 
> quotes, run ConTeXt to typeset XHTML.
> 
> Another workflow: Edit plain text in KeenWrite, export to XHTML, curl the 
> quotes, upload to CMS.
> 
> The problem is that when typewriters were invented, curly quotes didn't make 
> it onto the popular layouts. Then, after Unicode, curly closing single quotes 
> and curly apostrophes were not made unique. HTML entities get it right, 
> though, with l/rdquo, l/rsquo, and apos. C'est la vie.

I’m used to type special characters with key combinations, even use my own 
keyboard layout to access more accented characters via dead keys. (Nothing 
fancy like Neo, but just extensions to Apple’s German keyboard layout.) I 
always wanted to port that to my Linux machine, but even the default (German) 
keyboard layout for Linux lets me access curly quotes. And I didn’t find a 
handy keylayout editor like “Ukelele” for Linux. Anyway...

Using \quotation / \quote I avoid typing quotation marks in most cases.

There are exceptions – Hans mentioned missing or open-ended quotes, and 
sometimes the nesting of commands gets hairy (if quotations span paragraphs 
with additional markup), so that I manually type the quotation marks.

I regard it a bad idea to make straight quotation marks (inch marks) active to 
allow for “curling” them and would suggest the csquotes package with its 
\enquote command for LaTeX, even if it’s missing the setups for many languages.

In HTML you should be able to use  – I know that doesn’t work reliably in 
browsers (some add straight quotes to my CSS-configured guillemets).

Anyway, sorry for being negative on your project. It’s great if it helps you 
and others.

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

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


[NTG-context] Functionnames disappearing (sometimes)

2021-06-18 Thread Mikael Sundqvist
Hi,

I noticed something strange today. If I use computer modern unicode
(the concrete font) together with Neo Euler math then sometimes
function names (like \sin, \cos, \tan) disappear. Sometimes they show
(in non-displayed math and in fractions(?)).

Attached is a file showing the problem, together with the output and
the typescript file. I use the latest ConTeXt version and I have
cleared the cache, but no change. Maybe I'm overlooking something, but
what?

/Mikael


functions.pdf
Description: Adobe PDF document


type-imp-concrete-euler.mkxl
Description: Binary data


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


Re: [NTG-context] Straight Quotes / Curly Quotes

2021-06-18 Thread Hans Hagen

On 6/18/2021 4:08 AM, Thangalin wrote:

Hraban,

 > In what kind of workflows does your program make sense?

Have you looked around the web lately?

KeenWrite (https://github.com/DaveJarvis/keenwrite 
), my plain text editor, can 
neither convert nor easily type curly quotes into the application. 
Recently, I added ConTeXt integration for exporting to PDF files. 
ConTeXt doesn't curl the quotes, which I found a little surprising 
(because LaTeX has a quote curling package). Not seeing an obvious 
solution, I coded my own library because all the other libraries I found 
were either not up to the task or required a massive natural language 
parser dependency.


My workflow will be: Edit plain text in KeenWrite, export to XHTML, curl 
the quotes, run ConTeXt to typeset XHTML.


Another workflow: Edit plain text in KeenWrite, export to XHTML, curl 
the quotes, upload to CMS.


The problem is that when typewriters were invented, curly quotes didn't 
make it onto the popular layouts. Then, after Unicode, curly closing 
single quotes and curly apostrophes were not made unique. HTML entities 
get it right, though, with l/rdquo, l/rsquo, and apos. C'est la vie.

what do you mean with 'latex curls quotes' .. can you give an example

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