Re: [NTG-context] Extra space when \setcharacterkerning is used in enumeration

2020-06-12 Thread Mikael Sundqvist
On Fri, Jun 12, 2020 at 9:35 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Mikael Sundqvist schrieb am 12.06.2020 um 20:55:
> > Hi,
> >
> > I noticed an extra space in an enumeration when
> > using \setcharacterkerning in the \headstyle parameter. The extra space
> > appears before the first word "Sats", and in my case it is unwanted (In
> > the example I want the word Sats to align with a), b), ...).
> >
> > The space was not there a year ago, with the same code.
> >
> > In the test file below (sorry for its length), the environment sats is
> > having the problem, while SATS does not. The only difference is in the
> > \headstyle parameter.
>
> Is the delab environment necessary for the example?
>
> > Am I missing something obvious?
>
> I have no old installation to compare the example below but the problem
> is the \hskip\measure{...} in your code which is stretched as well.
>
> \starttext
>
> text
>
> \kerncharacters{text}
>
> \dontleavehmode\hskip\emwidth text
>
> \dontleavehmode\kerncharacters{\hskip\emwidth text}
>
> \dontleavehmode\kern\emwidth text
>
> \dontleavehmode\kerncharacters{\kern\emwidth text}
>
> \stoptext
>
> Wolfgang
>
> ___
> 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
>
> ___
>

Oh, many thanks for the quick fix, Wolfgang! Now it looks as intended.

/Mikael

PS 1: No, the delab was there for me to check which one was the "wrong"
one. There are probably better ways to do that, but this is how it popped
up in my document.

PS 2: I have to take back what I said about last year. I see now that this
particular setup in my document actually has changed since then. Sorry for
being unclear about that.
___
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] Extra space when \setcharacterkerning is used in enumeration

2020-06-12 Thread Wolfgang Schuster

Mikael Sundqvist schrieb am 12.06.2020 um 20:55:

Hi,

I noticed an extra space in an enumeration when 
using \setcharacterkerning in the \headstyle parameter. The extra space 
appears before the first word "Sats", and in my case it is unwanted (In 
the example I want the word Sats to align with a), b), ...).


The space was not there a year ago, with the same code.

In the test file below (sorry for its length), the environment sats is 
having the problem, while SATS does not. The only difference is in the 
\headstyle parameter.


Is the delab environment necessary for the example?


Am I missing something obvious?


I have no old installation to compare the example below but the problem 
is the \hskip\measure{...} in your code which is stretched as well.


\starttext

text

\kerncharacters{text}

\dontleavehmode\hskip\emwidth text

\dontleavehmode\kerncharacters{\hskip\emwidth text}

\dontleavehmode\kern\emwidth text

\dontleavehmode\kerncharacters{\kern\emwidth text}

\stoptext

Wolfgang
___
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] Extra space when \setcharacterkerning is used in enumeration

2020-06-12 Thread Mikael Sundqvist
Hi,

I noticed an extra space in an enumeration when
using \setcharacterkerning in the \headstyle parameter. The extra space
appears before the first word "Sats", and in my case it is unwanted (In the
example I want the word Sats to align with a), b), ...).

The space was not there a year ago, with the same code.

In the test file below (sorry for its length), the environment sats is
having the problem, while SATS does not. The only difference is in the
\headstyle parameter.

Am I missing something obvious?

/Mikael

PS I use the version of today, where the curious problems with sizes inside
square roots and fractions seem to be gone.



% Testfile starts here
\setupbodyfont[stixtwo,10bp]

\definemeasure[myitemwidth][26bp]
\definemeasure[myindent][12bp]
\setupindenting[yes,\measure{myindent}]

\definecharacterkerning[sats][factor=0.1]

\define[1]\vakuum{\hskip\measure{myindent}#1.}

\defineenumeration[sats][
text={Sats},
style={\em},
title=yes,
titlestyle=,
width=fit,
headstyle={\smallcaps\setcharacterkerning[sats]},
headcommand={\vakuum},
number=yes,
alternative=serried,
indenting={yes,\measure{myindent}},
]

\defineenumeration[SATS][sats][
headstyle=\smallcaps,%It is this setting that kills the space.
]

\defineitemgroup[delab]
\setupitemgroup[delab][each][a,intro,intext][
stopper=,
right=),
left={\hskip\measure{myindent}},
width=\measure{myitemwidth},
inbetween=,
before={\blank[none,samepage]},
after=,
style={\tf},
]

\starttext
\startTEXpage[offset=3bp]
\samplefile{ward}
\startsats[title={Räkneregler för gränsvärden}]
Antag att $c$ är ett tal, och att $a_k\to A$ och $b_k\to B$ då
$k\to+\infty$.  Då gäller det, när $k\to+\infty$, att
\startdelab
\item $a_k+b_k\to A+B$,
\item $c\cdot a_k\to cA$,
\item $a_kb_k\to AB$,
\item $1/a_k\to 1/A$ (om $a_k\neq 0$ för alla $k$ och $A\neq 0$).
\stopdelab
\stopsats

\samplefile{ward}

\startSATS[title={Räkneregler för gränsvärden}]
Antag att $c$ är ett tal, och att $a_k\to A$ och $b_k\to B$ då
$k\to+\infty$.  Då gäller det, när $k\to+\infty$, att
\startdelab
\item $a_k+b_k\to A+B$,
\item $c\cdot a_k\to cA$,
\item $a_kb_k\to AB$,
\item $1/a_k\to 1/A$ (om $a_k\neq 0$ för alla $k$ och $A\neq 0$).
\stopdelab
\stopSATS

\samplefile{ward}
\stopTEXpage
\stoptext
%%%


spaceprob.pdf
Description: Adobe PDF 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] Changed behavior of ^^ in csname

2020-06-12 Thread Marcel Fabian Krüger
Hi,

thank you for fixing this in the latest version.
I found another problem with ^^, this time when followed by hexadecimal
digits:

\starttext
\normalsupmarkmode\zerocount
\catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes

\let\ß\relax
\show\ß % Shows "> \ß=\relax", no surprise here
\show\^^df % Should be the same, but actually shows "> \� %=undefined"
\show ß % Shows "> the letter ß"
\show ^^df % Should be the same, but actually shows "> the character "
   % and "luatex warning  > print: bad string offset"
\showthe\numexpr`\ß % Shows "> 223"
\showthe\numexpr`\^^df % Gives an error "! Improper alphabetic constant"

\stoptext


Best regards,
Marcel
___
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] bug with \hyphenatedurl in latest?

2020-06-12 Thread Pablo Rodriguez
On 6/12/20 2:26 PM, Pablo Rodriguez wrote:
> [...]
> I’m afraid I’m experiencing a problem with \hyphenatedurl:
>
> \starttext
> \hyphenatedurl{}
> \stoptext
>
> The sample above outuputs "tterhat".

Many thanks for your fast fix in latest, Hans.

Pablo
--
http://www.ousia.tk
___
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] More funny numbers

2020-06-12 Thread Hans Hagen

On 6/12/2020 4:35 AM, Jairo A. del Rio wrote:
Hi everyone! The following example shows that numerators of fractions 
inside math alignment environments appear with a funny size:


\startTEXpage
\startformula
\startmathalignment[n=1,align=middle]
\NC \frac{1351}{780}>\sqrt{3}>\frac{265}{153},  3013 
\frac{3}{4}>\sqrt{9082321}, \quad 1838 \frac{9}{17}>\sqrt{3380929} \NR
\NC 1009 \frac{1}{6}>\sqrt{1018405}, \quad 2017 
\frac{1}{4}>\sqrt{4069284}  \frac{1}{38}, \quad 591 
\frac{1}{8}<\sqrt{349450} \NR
\NC 1172 \frac{1}{8}<\sqrt{1373943\frac{84}{33}},  2339 
\frac{1}{4}<\sqrt{5472132 \frac{1}{16}} \NR

\stopmathalignment
\stopformula
\stopTEXpage

It's actually nice to find those bugs when one makes heavy use of math 
environments. For comparison, LuaTeX prints the correct output.

i uploaded a new version that should fix the spacing

-
  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] About Mongolian script

2020-06-12 Thread Hans Hagen

On 6/11/2020 2:38 PM, Jairo A. del Rio wrote:


\definefontfeature[fea][default]
[mode=base,language=dflt,script=mong,
ccmp=yes,stch=yes,locl=yes,isol=yes,fina=yes,
medi=yes,init=yes,rlig=yes,rclt=yes,calt=yes,
liga=yes,dlig=yes,cswh=yes,mset=yes,
curs=yes,kern=yes,mark=yes,mkmk=yes,
]
\definefontfamily[main][serif][notosansmongolian][features=fea]
\setupbodyfont[main]
\startTEXpage
ᠮᠠᠨᠵᡠ
\stopTEXpage

in the last upload(s) it should work with feature set 'mongolian'

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
___


[NTG-context] bug with \hyphenatedurl in latest?

2020-06-12 Thread Pablo Rodriguez
Hans,

many thanks for the new latest.

I’m afraid I’m experiencing a problem with \hyphenatedurl:

\starttext
\hyphenatedurl{}
\stoptext

The sample above outuputs "tterhat".

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] using modeset

2020-06-12 Thread Jan Willem Flamma
Thank you Wolfgang, BPJ and Robert for your answers and feedback. Much appreciated.  I will explorer the solutions that have been offered to extend my knowledge on using ConTeXt but at the same time I value the advice of not going down that route for large document. In any case, I have learned something! Kind regards,Jan Willem Flamma  From: r.erm...@hccnet.nlSent: Friday, 12 June 2020 07:56To: mailing list for ConTeXt usersSubject: Re: [NTG-context] using modeset I tried this too, a number of times. For lengthy texts it makes little sense. One important thing is that, as BPJ says, you loose the flow during writing. When the document is finished, it is difficult to get an overview. If you consider it using for lengthy documents, I would consider to set up an xml file. You can then have the overview via scripts. Yet for short texts it can be a solution. I have case material for my trainings in both English and Dutch in the same file. Instead of modes, I use blocks. Like this: \defineblock[ENblok]\defineblock[NLblok] \setupblock[NLblok][before={\mainlanguage[nl]},after=]\setupblock[ENblok][before={\mainlanguage[en]},after=] Then, determine which blocks you want to use in your file: \hideblocks[NLblok]%\hideblocks[ENblok] For the titles I use another method: %\def\NL#1{#1}\def\NL#1{{}}%\def\EN#1{}\def\EN#1{#1} You have to comment and uncomment, depending on the language, but I think you can put them in the NLblok or ENbloks instead. \definecomplexenumeration[Casus]… definition \def\refno#1{{\em{(no. \small #1})}} My files look like this: \starttext \startCasus[casus-349][\NL{Een moeilijke zaak}\EN{A complicated case}] \refno{casus-349}\crlf The casus-349 element is used as a label. After the text I have a list of questions for this case in a separate block for questions, introduced by \in[casus-349]). You can probably also use something like \section[\NL{Een moeilijke zaak}\EN{A complicated case}]{} \begin[NLblok]\startlinenumberingtext ... \stoplinenumbering\end[NLblok] \begin[Enblok]\startlinenumberingtext... \stoplinenumbering\end[Enblok]\stoptext I hope this helps finding a solution. Robert  Op 11 jun. 2020, om 20:53 heeft BPJ  het volgende geschreven: Den tors 11 juni 2020 10:45Jan Willem Flamma  skrev: Dear list members, I write training manuals and use the Modes mechanism a lot to create documents at various competency levels using a single set of source files. So far the manuals have been written in English but now a separate Dutch translation has to be created. It is important that the two manuals are setup similarly so the section/subsection numbers and question numbers are the same in the English manual and the Dutch manual. Note: I do not intend to create a manual that has the English and Dutch text at opposite sides (as can be done using streams) I’m keen to continue using a single set of source files and thought it would be best to simply type the translated sections and subsections just below the original English sections and subsections using modeset. This gives me the option of creating an English case and a Dutch case. Within this two cases I would still apply all sorts of other modes using \startmode and \doifmode. I have done that with LaTeX and IMHO that way lies madness. It may work for shorter text but for text(s) of any length it gets messy. You lose the "flow"  in both texts, and it shows when you read the typeset text, and the source becomes hard to navigate. You are probably better off using an editor which allows you to have the two versions open side by side in their own viewports (I use what Vim calls "windows").  If each section heading is on its own line you might try something like a Perl script to loop over the lines in the English version and print only the section headings to a new file, where you translate them and build up the Dutch version around them. It's even better if the editor has the capacity to show an outline pane for each version — if there is an outline mode which understands ConTeXt. I'm sorry to discourage you but chances are that you end up with an intractable mess which you will have to spend much time disentangling later.___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net___  
___
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

Re: [NTG-context] More funny numbers

2020-06-12 Thread Hans Hagen

On 6/12/2020 4:35 AM, Jairo A. del Rio wrote:

It's actually nice to find those bugs when one makes heavy use of math 
environments. For comparison, LuaTeX prints the correct output.
Well, thanks for finding them! Normnally those bugs are easy to fix. 
Concerning math, there are no real fundamental changes under the hood, 
but in the process of adding some more control there can be side 
effects. For instance:


-- In order to make a bit nicer token interface (from the lua end) there 
has been a bit more abstraction and some internal quantities sit in 
better defined slots with zero based indices not, but in order to do 
that I need to adapt some references and might overlook some ... no big 
deal as there are not that many.


-- Some math rendering is quite hard codes wrt style and already much 
has been made configurable (either controlled by keywords or by 
additional parameters, think of \mathfoomode like ones). But it's easy 
to overlook something there. This is why user testing helps.


-- Some new features (like prescripts that are handy for proper 
chemistry as well as (i still have to adapt some code) mathml) but those 
will go unnoticed / not impact regular math.


-- New (often already old by now) trickery like local math parameters, 
which at some point wil be better interfaced.


-- Actually plenty more is possible but not yet used / done. It will 
happen when I run into the code / have a reason, but the mechanisms are 
there.


In general, not all that is there is yet used. I often do that stepwise 
(just try it out someplace), also because sometimes we need to split 
mkiv and lmtx sources then. Stepwise changes are easier because all kind 
of things can interfere.


Wrt non-math i.e. general new features in the engine, these can for 
instance involve more robust macro coding, full expansion, less horrific 
tracing, future possibilities.


Users are welcome to suggest additional low level context macros that 
they're missing. We're also wondering if some low level macros can go 
away or maybe some 'raw' ones can be aliased to regular ones as 
performance issues matter less nowadays.


There are for instance a few new tricks with macros but I'm not sure how 
many users really define there own, and if so they never asked for those 
specific things.


I'm anyway more or less through my list of engine related todo's (that 
accumulated over years).


All that said, I really appreciate the patience that users have with 
testing,


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] Changed behavior of ^^ in csname

2020-06-12 Thread Hans Hagen

On 6/11/2020 10:47 PM, Marcel Fabian Krüger wrote:


The following document:

\starttext
\def\mymacro#1 bc{}
{\mymacro a b bc}
\stoptext

used to work and lead to no output. But in the new luametatex version,
it complains about "! Argument of \mymacro has an extra }" as if it
doesn't see the " bc" argument delimiter.

ah, i see, i forget to update a variable

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
___