Re: [NTG-context] undefined control sequence c!symbolcolor in MkIV, was new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 7:34 PM, Rik Kabel via ntg-context wrote:

MWE:

\definelabel[xx][headcolor=red]
\starttext
ab\xx
\stoptext

fails, reporting in log:

tex error   > tex error on line 4 in file G:/Desktop/mwe.tex: !
Undefined control sequence

 \c!symbolcolor

\labelparameter #1->\csname \ifcsname \??labels \currentlabel :#1
\endcsname \??labels \currentlabel :#1\else \expandafter
\dolabelparentparameter \csname \??labels \currentlabel :\s!parent
\endcsname {#1}\fi \endcsname
\useconstructionstyleandcolor ...pty \else
\dousecurrentstyleparameter \fi \edef \currentcolorparameter
{\labelparameter {#2}

MkIV only, no problem in LMTX.

replace by \c!numbercolor and remake the format


-
  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] XML, dealing with whitespace

2022-01-15 Thread Wolfgang Schuster via ntg-context

Denis Maier via ntg-context schrieb am 15.01.2022 um 13:04:


Hi all,

I have sources that look like this:

%





   Bla Bla Bla



  

 Bla

  , Bla Bla.



%

Typesetting this with context gives me a spurious space after the 
underlined Bla in italics.




There is no spurious space, the line break is just converted to a space 
and I see no reason why this shouldn't happen. To remove space before or 
after certain parts of text within a paragraph you can use the 
\removeunwantedspace and \ignorespaces commands.


 begin example
\starttexdefinition RemovePreceding #1
    \removeunwantedspaces
    #1
\stoptexdefinition

\starttexdefinition RemoveFollowing #1
    #1
    \ignorespaces
\stoptexdefinition

\starttext

Bla \RemovePreceding{Bla} Bla

Bla \RemoveFollowing{Bla} Bla

\stoptext
 end example

When only  following spaces are a problem a better alternative to 
\ignorespace is \autoinsertnextspace which checks the following token 
which ensures there is space when the next character is punctuation.


 begin example
\starttexdefinition Italic #1
    \emphasized{#1}
    \autoinsertnextspace
\stoptexdefinition

\starttexdefinition Underbar #1
    \underbar{#1}
\stoptexdefinition

\starttext

Bla Bla Bla

\Underbar{\Italic{Bla} , Bla Bla.}

\stoptext
 end example

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] undefined control sequence c!symbolcolor in MkIV, was new upload

2022-01-15 Thread Rik Kabel via ntg-context

MWE:

   \definelabel[xx][headcolor=red]
   \starttext
   ab\xx
   \stoptext

fails, reporting in log:

   tex error   > tex error on line 4 in file G:/Desktop/mwe.tex: !
   Undefined control sequence

\c!symbolcolor

   \labelparameter #1->\csname \ifcsname \??labels \currentlabel :#1
   \endcsname \??labels \currentlabel :#1\else \expandafter
   \dolabelparentparameter \csname \??labels \currentlabel :\s!parent
   \endcsname {#1}\fi \endcsname
   \useconstructionstyleandcolor ...pty \else
   \dousecurrentstyleparameter \fi \edef \currentcolorparameter
   {\labelparameter {#2}

MkIV only, no problem in LMTX.

--
Rik
___
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] new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 3:52 PM, Alexandre Christe via ntg-context wrote:

Just came across a weird behavior with the latest upload.

The following doesn't print as it should
\startformula 4^{2x} - 4^x - 25 = 0 \stopformula

I don't think it's normal (I see the spacing to make room for anything 
that comes after the first character in the exposant, but it is not 
printed).


to get an idea about default and additional spacing in tex ...

\starttext

\startbuffer
\dontleavehmode\ruledhbox{$x^2 + x$}\par
\dontleavehmode\ruledhbox{$x_2 + x$}\par
\dontleavehmode\ruledhbox{$x^^2 + x$}\par
\dontleavehmode\ruledhbox{$x__2 + x$}\blank
\stopbuffer

\startTEXpage[offset=3pt]
\getbuffer
\Umathspaceafterscript \textstyle0pt
\Umathspacebeforescript\textstyle0pt
\getbuffer
\Umathextrasupspace\textstyle20pt
\Umathextrasubspace\textstyle40pt
\Umathextrasupprespace \textstyle10pt
\Umathextrasubprespace \textstyle30pt
\getbuffer
\stopTEXpage

\stoptext

so by default there is space added to scripts (more in latin modern than 
in cmr btw as it is font driven) but one can argue if that makes sense 
at all ... this is why we might default to zero font spacing and 
specific super/subscript spacing instead (just as in lmtx we have 
prescripts and related (fake opentype) spacing)


in a similar fashion there is built-in pre/post fraction spacing that 
makes that we cannot have tight fractions (by default) while in fact 
that has to be driven by proper fraction-class spacing so that's another 
thing that might happen: tight fractions + proper interclass spacing 
(because we have less memory constraints than when tex showed up we can 
add classes without overhead)


(i bet that due to a 'tex does perfect math syndrome' these thinsg go 
unnoticed (not by DEK himself, just look at the chapters on finetunign 
math) ... some of it is also compensate for the width-of-glyph cheating 
that goes on in the traditional engine but that is another matter


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] new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 4:16 PM, Fabrice Couvreur via ntg-context wrote:

Hi Hans
I just updated lmtx and this macro does not work although it did before. 
On the other hand, no problem with context.

Thanks.
Fabrice

  \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace}

\starttext
\startformula
\e{a+b}
\stopformula
\stoptext
if the test suite doesn't crash (i only test that) i'll upload ... it 
has to do with decoupling some in the engine: tex uses lots of shifting, 
cheating on dimensions and displacements that relate to (older) fonts 
and for the purpose of tracing i changed some ... so we're seeing a side 
effect of that


for a while we already have this:

\tracingmath2\tracingonline2

just to give an idea what enters tex's math machinery

5:7: > \inlinemath=
5:7: \displaystyle
5:7: \mathord
5:7: .\nucleus
5:7: ..\mathchar (fam="0,char="65)
5:7: .\superscript
5:7: ..\mathlist
5:7: ...\mathord
5:7: \nucleus
5:7: .\mathchar (fam="0,char="61)
5:7: ...\mathbin
5:7: \nucleus
5:7: .\mathchar (fam="0,char="2B)
5:7: ...\mathord
5:7: \nucleus
5:7: .\mathchar (fam="0,char="62)

i'll upload a fixed version

fwiw: \frac and friends are currently being redone; for that we now have 
a frac class (as well as rad), so


  \mathfrac{...}
  \mathrad{...}

in addition to \mathord etc other new things are

  \beginmathgroup ... \endmathgroup

that permits better local settings without messing up the spacing due to 
classes and we have dozens more spacing class variables ... all waiting 
to be used (some features are already there for more than a year but now 
get used in low level code, which is why we can expect some instabilities)


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] new upload

2022-01-15 Thread Fabrice Couvreur via ntg-context
Hi Hans
I just updated lmtx and this macro does not work although it did before. On
the other hand, no problem with context.
Thanks.
Fabrice

 \protected\def\e#1{\math{{\rm e}^{#1}}\autoinsertnextspace}

\starttext
\startformula
\e{a+b}
\stopformula
\stoptext


Le sam. 15 janv. 2022 à 16:14, Hans Hagen via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 1/15/2022 3:52 PM, Alexandre Christe via ntg-context wrote:
> > Just came across a weird behavior with the latest upload.
> >
> > The following doesn't print as it should
> > \startformula 4^{2x} - 4^x - 25 = 0 \stopformula
> >
> > I don't think it's normal (I see the spacing to make room for anything
> > that comes after the first character in the exposant, but it is not
> > printed).
> i'll fix it ...
>
>
>
> -
>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
>
> ___
>
___
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] new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 3:52 PM, Alexandre Christe via ntg-context wrote:

Just came across a weird behavior with the latest upload.

The following doesn't print as it should
\startformula 4^{2x} - 4^x - 25 = 0 \stopformula

I don't think it's normal (I see the spacing to make room for anything 
that comes after the first character in the exposant, but it is not 
printed).

i'll fix it ...



-
  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] new upload

2022-01-15 Thread Alexandre Christe via ntg-context
Just came across a weird behavior with the latest upload.

The following doesn't print as it should
\startformula 4^{2x} - 4^x - 25 = 0 \stopformula

I don't think it's normal (I see the spacing to make room for anything that
comes after the first character in the exposant, but it is not printed).

Le sam. 15 janv. 2022 à 13:31, Hans Hagen via ntg-context <
ntg-context@ntg.nl> a écrit :

> On 1/15/2022 12:33 PM, hanneder--- via ntg-context wrote:
> >> - We added indic language patterns ad well as defined the languages
> >> but labels are on the todo as are conversions; kauśika is working on
> >
> > Perhaps the following notes are useful.
> >
> > 1. The simplest way, and what I was talking about, is to write and print
> > Sanskrit in
> > transliteration.
> >
> > ānandaḥ -> ānandaḥ
> >
> > 2. Then we can of course write and print the same word in the usual
> > Indian Script (Devanāgarī)
> >
> > आनन्दः  ->  आनन्दः
> >
> > 3. But for academic use, one wants an input in roman (e-text are usually
> > in roman), and the option
> > to have an output in Devanāgarī)
> >
> > ānandaḥ ->  आनन्दः
> >
> > For this an option with the transliterator would be required, I guess(?)
> >
> > Theoretically one could write Sanskrit in many scripts -- it has been
> > written
> > with many Indian scripts in history --, but I am wondering about the
> > practical value of this.
> > For imitating historic prints it would no doubt be nice, but not urgent.
> >
> > I was not aware of the hyphenation patterns by Yves Codet, if they work,
> > they would cover case 1
> > and 2. And I just heard from a colleague that the latest babel version
> > is incorporating a Sanskrit option
> > that might cover the same ground (I am not sure whether this is useful).
> >
> > Thanks a lot! I just have to learn more about ConTeXt to able to use it:)
>
> does the attached sort of what you want
>
> 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
>
> ___
>
___
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 from \convertnumber{arabicdecimals}{..} as a textcommand for note

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 3:03 AM, musa furber via ntg-context wrote:
This week I updated ConTeXt minimals. Before then, I used the following 
code so that footnotes to Arabic passages would have parenthesis around 
them and use the digits used in Arabic texts in the Middle East (e.g. 
٠١٢٣٤٥٦٧٨٩).


\setupnote [arfootnote] [
   headstyle={\switchtobodyfont[kitab]},
   textcommand=\footnotenotenumbercommand,
   alternative=text,
   ]
\define[1]\footnotenotenumbercommand{{\high{(\convertnumber{arabicdecimals}{#1})}}}

Since the update, for the 123rd footnote, I now get `(123arabic)` 
instead of `(١٢٣)`.


Elsewhere, I do get the expected output (i.e. `١٢٣٢`) when calling
\convertnumber{arabicdecimals}{1232}

I'm still relatively new to ConTeXt, so I'm unsure if what used really 
is correct, or if it was wrong and I now need to find the right way to 
do it.


Any help would be greatly appreciated.

Next time give a complete MWE with useable fonts

  \setupnotation
[arfootnote]
 [numberconversion=arabicdecimals]

as in:

\setupbodyfont[dejavu]

\definenote
  [arfootnote]

\setupnotation
  [arfootnote]
  [numberconversion=arabicdecimals]

\setupnote
  [arfootnote]
  [headstyle={\switchtobodyfont[kitab]},
   textcommand=\footnotenotenumbercommand,
   alternative=text]

\protected\def\footnotenotenumbercommand#1{\high{(#1)}}

\starttext
x\arfootnote{x}
\stoptext

The #1 passed can be anything that renderes the note so the converters 
sees rubish. You can see details with you add


\detokenize{#1}

in your macro.

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] new upload

2022-01-15 Thread Hans Hagen via ntg-context

On 1/15/2022 12:33 PM, hanneder--- via ntg-context wrote:
- We added indic language patterns ad well as defined the languages 
but labels are on the todo as are conversions; kauśika is working on


Perhaps the following notes are useful.

1. The simplest way, and what I was talking about, is to write and print 
Sanskrit in

    transliteration.

ānandaḥ -> ānandaḥ

2. Then we can of course write and print the same word in the usual 
Indian Script (Devanāgarī)


आनन्दः  ->  आनन्दः

3. But for academic use, one wants an input in roman (e-text are usually 
in roman), and the option

    to have an output in Devanāgarī)

ānandaḥ ->  आनन्दः

For this an option with the transliterator would be required, I guess(?)

Theoretically one could write Sanskrit in many scripts -- it has been 
written
with many Indian scripts in history --, but I am wondering about the 
practical value of this.

For imitating historic prints it would no doubt be nice, but not urgent.

I was not aware of the hyphenation patterns by Yves Codet, if they work, 
they would cover case 1
and 2. And I just heard from a colleague that the latest babel version 
is incorporating a Sanskrit option

that might cover the same ground (I am not sure whether this is useful).

Thanks a lot! I just have to learn more about ConTeXt to able to use it:)


does the attached sort of what you want

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
-\startluacode
fonts.handlers.otf.addfeature {
name = "iast",
type = "ligature",
data = {
["ऐ"]  = { "a", "i" },
["औ"] = { "a", "u" },
["ख"] = { "k", "h" },
["छ"] = { "c", "h" },
["ठ"] = { "ṭ", "h" },
["थ"] = { "t", "h" },
["फ"] = { "p", "h" },
["घ"] = { "g", "h" },
["झ"] = { "j", "h" },
["ढ"] = { "ḍ", "h" },
["ध"] = { "d", "h" },
["भ"] = { "b", "h" },
}
}
fonts.handlers.otf.addfeature {
name = "iast",
type = "substitution",
data = {
["a"] = "अ",
["ā"] = "आ" ,
["i"] = "इ",
["ī"] = "ई",
["u"] = "उ",
["ū"] = "ऊ",
["ṛ"] = "ऋ",
["ṝ"] = "ॠ",
["ḷ"] = "ऌ",
["ḹ"] = "ॡ",
["e"] = "ए",
["o"] = "ओ",
["ṃ"] = "ं",
["ḥ"] = "ः",
["˜"] = "ँ",
["'"] = "ऽ",
["k"] = "क",
["c"] = "च",
["ṭ"] = "ट",
["t"] = "त",
["p"] = "प",
["g"] = "ग",
["j"] = "ज",
["ḍ"] = "ड",
["d"] = "द",
["b"] = "ब",
["ṅ"] = "ङ",
["ñ"] = "ञ",
["ṇ"] = "ण",
["n"] = "न",
["m"] = "म",
["h"] = "ह",
["y"] = "य",
["r"] = "र",
["l"] = "ल",
["v"] = "व",
["ś"] = "श",
["ṣ"] = "ष",
["s"] = "स",
}
}
\stopluacode

\starttext

\definefontfeature[iast][devanagari-two][iast=yes]
\definedfont[file:shobhika-regular.otf*iast at 18pt]

vid dhātorghañā vedaśabdo niṣpadyate.
vid jñāne vid vicāraṇe vidlṛ lābhe vid
sattāyām ityādidhātubhyo jñānaṃ sattā lābhaśceti trayo'pyarthāḥ siddhyanti. lāb­
haśabdena jīvanarūpā sthitirapi prahītuṃ śakyate sattāpadena cotpattiḥ. tena ut­
pattiḥ sthitiścetyubhayamapi vid dhātorarthe'ntarbhavati. ghañpratyayaścāpi 
bhāve
akartari ca kārake vidhīyate iti jñānam jñānasādhanam jñānakarma jñānādhikara­
ṇam sattā sattāsādhanam sattākarma sattādhikaraṇam sthiti sthitisādhanam sthi­
tikarma sthityadhikaraṇaścetyādi sarvaṃ vedaśabdārthatayā vyākhyātuṃ śakyate.
tatra granthātmakeṣu vedeṣu śābdajñānasādhanatvameva samanvāyayanti prāyeṇa
vidvāṃsaḥ.
anveṣaṇaprakriyayā pariśīlyamāne tu sarvavidhajñānasādhanam jñā­
narūpatvam sattāsādhanatvam sattārūpatvam sthitisādhanatvam sthitirūpatvam ce­
tyādyapi vedaśabdārthe samanvitaṃ bhavati.

\stoptext
___
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] XML, dealing with whitespace

2022-01-15 Thread Denis Maier via ntg-context
Hi all,

I have sources that look like this:

%


   Bla Bla Bla
   
  
 Bla
  , Bla Bla.

%

Typesetting this with context gives me a spurious space after the underlined 
Bla in italics. Complete MWE :

%
\startxmlsetups xml:test
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{article|p|italic|underline}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:test}

\startxmlsetups xml:article
\starttext
\xmlflush{#1}
\stoptext
\stopxmlsetups

\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:italic
\emph{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:underline
\underbar{\xmlflush{#1}}
\stopxmlsetups

\startbuffer[test]


   Bla Bla Bla
   
  
 Bla
  , Bla Bla.

\stopbuffer

\xmlprocessbuffer{test}{test}{}
%

How can I get rid off spurious leading and trailing whitespace. I've found 
\xmlstrip and \xmlstripped, but I don't really understand how they work. I've 
also found out about
\ignorespaces\xmlflush{#1}\removeunwantedspaces
but this has then to be added to every definition, which would be a bit 
tedious...
There have a been a couple of similar questions by Hans van der Meer about a 
decade ago, but I couldn't find the answer.

Then, \xmlstripanywhere is also mentioned in xml-mkiv.pdf, but it's not 
explained. I found one example in the sources 
(https://source.contextgarden.net/tex/context/modules/mkiv/x-html.mkiv?search=%5Cxmlstripanywhere#l50),
 but what does that do? Is that sort of need for \xmlstrip and friends to work?

So, what would be the best way to deal with that situation? (More details 
below, perhaps there's an easier solution outside of context, because the 
problem is actually caused by xslt...)

Best,
Denis


P.S. Background:

I convert docx files with pandoc to jats xml. Pandoc does quite a decent job, 
but I need to tweak a few things with xslt. The actual transformation that I 
need works ok, but the transformation also causes other problems.
This is the original markdown file :

%%%
Bla Bla Bla

[*Bla*]{.underline} Bla Bla.
%%%

Pandoc produces a jats xml file that looks like this (simplified, empty nodes 
deleted) :

%%%



Bla Bla Bla
Bla, Bla Bla.


%%%

I use this xsl for tweaking pandoc's output

%%%

http://www.w3.org/1999/XSL/Transform 
xmlns:fo=http://www.w3.org/1999/XSL/Format>







  
 




 
   
 



%%%

This is again much simplified, I've omitted the templates that do the actual 
tweaking.
Anyway, both versions of the identity transformation produce this (using Saxon):

%%%


   
  Bla Bla Bla
  
 
Bla
 , Bla Bla.
   

%%%

I can get rid off all whitespace with indent="no", but that produces a rather 
unreadable file.
xsl:strip-space has had no effect.

Maybe someone knows a solution how to improve that step? Is there a way to 
convince an xslt-processor not to introduce the newlines after certain tags? 
Something like, treat paragraphs as a single unit or so.
Am I missing something?
___
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] new upload

2022-01-15 Thread hanneder--- via ntg-context
- We added indic language patterns ad well as defined the languages  
but labels are on the todo as are conversions; kauśika is working on


Perhaps the following notes are useful.

1. The simplest way, and what I was talking about, is to write and  
print Sanskrit in

   transliteration.

ānandaḥ -> ānandaḥ

2. Then we can of course write and print the same word in the usual  
Indian Script (Devanāgarī)


आनन्दः  ->  आनन्दः

3. But for academic use, one wants an input in roman (e-text are  
usually in roman), and the option

   to have an output in Devanāgarī)

ānandaḥ ->  आनन्दः

For this an option with the transliterator would be required, I guess(?)

Theoretically one could write Sanskrit in many scripts -- it has been written
with many Indian scripts in history --, but I am wondering about the  
practical value of this.

For imitating historic prints it would no doubt be nice, but not urgent.

I was not aware of the hyphenation patterns by Yves Codet, if they  
work, they would cover case 1
and 2. And I just heard from a colleague that the latest babel version  
is incorporating a Sanskrit option

that might cover the same ground (I am not sure whether this is useful).

Thanks a lot! I just have to learn more about ConTeXt to able to use it:)




---

Prof. Dr. Juergen Hanneder
Philipps-Universitaet Marburg
FG Indologie u. Tibetologie
Deutschhausstr.12
35032 Marburg
Germany
Tel. 0049-6421-28-24930
hanne...@staff.uni-marburg.de

___
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] new upload

2022-01-15 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version but best first read this because some is 
experimental and i need to sycn with those involved, so thereofre the 
uplaod (too many files involved):


Indic:

- We added indic language patterns ad well as defined the languages but 
labels are on the todo as are conversions; kauśika is working on this


- We also added a tweak to deal with a certain class of indic fonts; 
there will be a more detailed report about the why and how by kauśika


- So, Indic should work as before but with more dedicated support coming.

Math:

- Mikael and I are stepwise going over the math machinery: constructs, 
spacing etc in the perspective of what luametatex provided.


- We think we can improve spacing (more consistent) but it needs some 
work and testing. Some gets shifted from engine heuristics to 
predictable control.


- There will be a 'traditional swedish' spacing variant, also as an 
exaple of how users can finetune and adapt to the math culture they 
like. (I will likely make one for educational purpose).


- All this is done by some fundamental extensions to the math engine (on 
top of all the already present configurability) but hopefully without 
side effects.


Rest:

- I added a few features discussed on the list (itemize and such) which 
I let others explain (omn the wiki).


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
___