[NTG-context] How to setupbtx to get short citations?

2022-01-09 Thread Mikael Sundqvist via ntg-context
Hi,

In the example below I can do \cite[short][hh2010] to get the citation
in the short format. But I thought that would also be the standard
with \setupbtx[aps][alternative=short] (so that I can write
\cite[hh2010] instead). What do I miss? (Except for the fact that I
should probably define my own btx style as a copy of aps instead of
setting the aps up...)

/Mikael

\startbuffer[bib]
@ELECTRONIC{hh2010,
  author = {Hans Hagen},
  year = {2010},
  title = {Metafun. \CONTEXT\ mkiv},
  url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf},
}
\stopbuffer

\usebtxdataset[bib.buffer]

\usebtxdefinitions[aps]

\setupbtxrendering[aps][
sorttype=short,
numbering=short,
]

\setupbtxlist[aps][
  width=fit,
  distance=0.5em,
  interaction=start,
]

\setupbtx[aps][
  alternative=short,
]


\starttext

\cite[hh2010]

\placelistofpublications

\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
___


Re: [NTG-context] Critical Editions?

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

On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:

1. In Sanskrit prose it is possible to produce compounds that span a few 
lines. The concept of

    "word" or "word division" fails here, as are the TeX mechanisms.

    What we need in practice would be a "hyphenation" for the language 
Sanskrit that hyphenates
    after all Sanskrit vowels (in transcription this would be a, ā, i, 
ī, u, ū, ṛ, ḷ, e, o, ai, au. The
    last two cannot be split, "au" is one vowel with one vowel sign in 
the original script). Of
    course, we want to improve this automatic spelling occasionally, so 
we need to be able to insert

    a \- without thereby disabling the hyphenation for this compound.

    I think in critical editions the problem of the disabled hyphenation 
also arises when a variant
    is added inside a word. In any case hyphenation is a real nuisance 
in critical editions.

two things here:

transliterations ... do we need a mechanism for that ? latin in -> 
something else out (if so i need specs)


hypenation ... so no patterns, just injecting discretionaries after 
specific vowels ... doable but it has to happen a some specific moment 
because when language bound it's too soon, and the font handler does 
some reshuffling; it can probabloy best be done after fonts have been 
done ... given specs a typical rainy weekend activity


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] Critical Editions?

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

On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:

2. Fonts that contain all necessary diacritics have become sparse. (This 
is more a lamentation, not

    much one can do about it, I guess).

    When I started TeXing people were used to writing aṭavī as 
a\d{t}av{\=\i}. Not user friendly,
    but it worked with many fonts. With each new font regime 
Sanskritists had to search for new
    fonts, invent work-arounds etc. Even the most promising attempts (I 
spent a lot of time with
    OmegaTeX) eventually disappeared. Now we are dependent on whether an 
otf font has the underdot
    characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial 
fonts, I found only one
    "Brotschrift" that worked, which is Adobe Text Pro. I really like 
Minion, for instance, but the

    latest otf Version has no ṭ etc.

    Thank god, we have many TeX fonts derived from older ones that still 
work, but many entries in

    the TeX Font Catalogue do not!

Because minion has no bottom accent ... in a next version you can try this:

\starttext

\definefontfeature[default][default][fakecombining=yes,compose=yes]

\setupbodyfont[minion]

[x][\char"2D9][x][\char"323] ṭḍṃḥ

\stoptext

there are more such accents but i have no time not to collect them 
(maybe we need a mechanism for missing / patching characters in lfg 
files like we have for math) because in the end 'generic' heuristics 
might fails us


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] Radius attribute and scaling in lmt_shade[ ]

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

On 1/9/2022 4:53 PM, Keith McKay via ntg-context wrote:
Since "a picture paints a thousand words", I attach a pdf showing the 
results of the execution of the code.


Are these bugs or... ?

more interplay between parameters ...

draw lmt_shade [
trace   = true,
path= r shifted - center r,
direction   = "up",
alternative = "circular",
radius  = k*cm,
colors  = { "MyColor1", "MyColor2" },
] scaled 4 shifted((k *12)*cm,12*cm);



-
  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] Get Current Section Number

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

Michael Urban via ntg-context schrieb am 09.01.2022 um 17:25:

I want to put a book title above the Chapter title for the first chapter of a 
book.  I suppose that this can be accomplished with a 'before=' clause that 
checks to see if it is the first chapter... but how do I look at the chapter 
number in order to set up the conditional?


Can you show a example of your document, maybe there is a better way to 
produce the desired result.


\startsetups [document:start]
    \startalignment[middle]
    {\ssd\documentparameter{title}}
    \stopalignment
\stopsetups

\setuphead [chapter] [page=no]

\startdocument [title={Dummy title}]

\dorecurse{5}
  {\startchapter[title={Chapter \convertnumber{word}{#1}}]
   \samplefile{lorem}
   \stopchapter}

\stopdocument

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
___


Re: [NTG-context] Get Current Section Number

2022-01-09 Thread Pablo Rodriguez via ntg-context
On 1/9/22 5:25 PM, Michael Urban via ntg-context wrote:
> I want to put a book title above the Chapter title for the first
> chapter of a book.  I suppose that this can be accomplished with a
> 'before=' clause that checks to see if it is the first chapter... but
> how do I look at the chapter number in order to set up the
> conditional?

Hi MIchael,

this might do the trick:

  \starttext
  \dorecurse{5}
   {\chapter{Chapter \structurenumber}
\dorecurse{5}
 {\section{Section \structurenumber}
  \doifelse{\somenamedheadnumber{chapter}{current}}{1}
   {This is the first chapter.}
   {This is not the first chapter.}
  }}
  \stoptext

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 / 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] Get Current Section Number

2022-01-09 Thread Michael Urban via ntg-context
I want to put a book title above the Chapter title for the first chapter of a 
book.  I suppose that this can be accomplished with a 'before=' clause that 
checks to see if it is the first chapter... but how do I look at the chapter 
number in order to set up the conditional?

Mike

___
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] Fonts for transliteration (was: Critical Editions?)

2022-01-09 Thread BPJ via ntg-context
Den sön 9 jan. 2022 13:22Robert via ntg-context  skrev:

> Dear list,
>
> I am currently working on a critical edition as well, and follow the
> discussion with interest. For the time being, I prefer Latex over Context
> for this project.
>
> In addition to Jürgen's remarks on transcription fonts, a small
> contribution:
>
> Arabists and turcologists working with transcriptions used to have similar
> problems. In the nineties I adapted existing postscript fonts with
> Fontographer. I also made sure to copy kerning information from extant
> letters (e.g. a) to new ones (e.g. ā) with the required diacritic (usually
> dots, dashes and haceks). This was in the pre-unicode era.
>
> Today there is the Brill font which is quite extended, yet I am not sure
> if it can be used freely in other publications.
>
> Adapations to extant fonts can still be made with the open source app
> FontForge. Do not hesitate to contact me offline if you need help on this.
>

The technically excellent free Google Noto Serif/Sans/Sans Mono fonts have
quite extensive coverage of Latin/Greek/Cyrillic scripts. As an
Indo-Europeanist turned programmer/editor/translator doing frequent forays
into Uralic and Afroasiatic when wearing a more general historical
linguistics hat I have found nothing missing.
(If you need a Mono Font make sure to use Noto Sans Mono which has better
coverage than Noto Mono!)

https://fonts.google.com/noto

Much the same can be said of the Charis SIL font from SIL International,
although the current release lags behind Noto when it comes to coverage.

https://software.sil.org/charis/

(Make sure to look at the downloads page for info on downloadable
customized fonts!)

There is also the Gentium SIL font with Greek and Cyrillic coverage as well
as Latin, although its design may be a bit too swashy for academic work.

If something *is* missing these are all licensed under the quite permissive
Open Font License

https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=OFL-FAQ_web

Publishers may have their own (ideas about) fonts but for course materials,
handouts, manuscripts, databases and the like these are excellent. I do all
my work in the Vim text editor (with Noto Sans Mono) and *TeX/Pandoc.

Regards,

/Benct



> Regards,
>
> Robert
>
> i...@mo-perspectief.nl
>
>
> > Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context <
> ntg-context@ntg.nl> het volgende geschreven:
> >
> > I was just writing a mail (below) and saw:
> >
> >> They do indic scripts and Kai made the first version of the devanagari
> code for the context fontloader code that I then optimized.
> >
> > Fascinating. Where can I learn more about that or is that
> > user-unfriendly (my technical knowledge is rather limited).
> >
> >
> > Dear Hans,
> >
> > two recurring problems are rather specifically Indological and they
> concern hyphenation and
> > font.
> >
> > 1. In Sanskrit prose it is possible to produce compounds that span a few
> lines. The concept of
> >   "word" or "word division" fails here, as are the TeX mechanisms.
> >
> >   What we need in practice would be a "hyphenation" for the language
> Sanskrit that hyphenates
> >   after all Sanskrit vowels (in transcription this would be a, ā, i, ī,
> u, ū, ṛ, ḷ, e, o, ai, au. The
> >   last two cannot be split, "au" is one vowel with one vowel sign in the
> original script). Of
> >   course, we want to improve this automatic spelling occasionally, so we
> need to be able to insert
> >   a \- without thereby disabling the hyphenation for this compound.
> >
> >   I think in critical editions the problem of the disabled hyphenation
> also arises when a variant
> >   is added inside a word. In any case hyphenation is a real nuisance in
> critical editions.
> >
> > 2. Fonts that contain all necessary diacritics have become sparse. (This
> is more a lamentation, not
> >   much one can do about it, I guess).
> >
> >   When I started TeXing people were used to writing aṭavī as
> a\d{t}av{\=\i}. Not user friendly,
> >   but it worked with many fonts. With each new font regime Sanskritists
> had to search for new
> >   fonts, invent work-arounds etc. Even the most promising attempts (I
> spent a lot of time with
> >   OmegaTeX) eventually disappeared. Now we are dependent on whether an
> otf font has the underdot
> >   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial fonts,
> I found only one
> >   "Brotschrift" that worked, which is Adobe Text Pro. I really like
> Minion, for instance, but the
> >   latest otf Version has no ṭ etc.
> >
> >   Thank god, we have many TeX fonts derived from older ones that still
> work, but many entries in
> >   the TeX Font Catalogue do not!
> >
> >
> > Jürgen
> >
> >
> >
> >
> > ---
> >
> > 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
> >
> >
> 

Re: [NTG-context] Radius attribute and scaling in lmt_shade[ ]

2022-01-09 Thread Keith McKay via ntg-context
Since "a picture paints a thousand words", I attach a pdf showing the 
results of the execution of the code.


Are these bugs or... ?

Best Wishes

Keith

On 06/01/2022 15:57, Keith McKay wrote:


Hi

In the code below you will see that I have created a closed path and 
performed scaling, and shading on the path with lmt_shade [ ]. I have 
noticed a few features which may or may not be bugs depending on 
whether scaled is applied to the path within the square brackets or 
outside.


1) Applying scaled to the path within the square brackets and 
incrementing the radius key I can see the shaded areas changing, 
however the first two shapes show incorrect scaling and have ragged edges.


2) When scaled is applied outside the square brackets all shapes are 
the same size and no ragged edges, however the shading is not showing 
correctly with increasing radius.


Am I missing something?

Best Wishes

Keith McKay

***MWE*

\setuppapersize[A4, landscape]

\starttext

\dorecurse{10}{

\startMPpage

StartPage;

width := 27; height := 18;

path r;

r := (0.25cm,0cm)--(0cm,1.5cm)..(0.25cm,1.75cm)..(0.5cm,1.5cm) -- cycle;

definecolor [ name = "MyColor1", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;


definecolor [ name = "MyColor2", r = uniformdeviate(1), g = 
uniformdeviate(1), b = uniformdeviate(1) ] ;


    for k = 0.5 step 0.25 until 2:

        draw lmt_shade [

            path = r ,

            direction = "up",

            alternative = "circular",

            radius = k*cm,

            colors = { "MyColor1", "MyColor2" },

            ] scaled 4.5 shifted((k *12)*cm,12*cm);

        draw lmt_shade [

            path = r scaled 4.5,

            direction = "up",

            alternative = "circular",

            radius = k*cm,

            colors = { "MyColor1", "MyColor2" },

            ] shifted((k *12)*cm,1cm);

endfor;

StopPage;

\stopMPpage

}

\stoptext


RS4 copy.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] How to let a macro check the previous value of #1 the last time the same macro was called?

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

Joel via ntg-context schrieb am 09.01.2022 um 15:16:
Is there a way for a macro to check the previous value of #1, the last 
time that same macro was called?


Here is a minimum working example, pretending that `\previousvalue` is 
equal to #1 from the last time the same macro was called:


[...]


To check is the current value differs from the last one you need a temp 
macro where you store the current value at the end of your command to 
check it in the next call.


\let\previousmymacro\empty

\define[1]\mymacro
  {\edef\currentmymacro{#1}%
   \ifx\previousmymacro\currentmymacro
 same as last time
   \else
 it is different from last time
   \fi
   \let\previousmymacro\currentmymacro}

\starttext

\startlines
cat: \mymacro{cat}
cat: \mymacro{cat}
mouse: \mymacro{mouse}
mouse: \mymacro{mouse}
cat: \mymacro{cat}
\stoplines

\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] How to let a macro check the previous value of #1 the last time the same macro was called?

2022-01-09 Thread Joel via ntg-context
Is there a way for a macro to check the previous value of #1, the last time 
that same macro was called?

Here is a minimum working example, pretending that `\previousvalue` is equal to 
#1 from the last time the same macro was called:

    \define[1]\mymacro{
    \if\previousvalue=#1
        same as last time
    \else
        it is different from last time
    \fi
    }

\starttext

    \mymacro{cat}
    \mymacro{cat}
    \mymacro{mouse}
    \mymacro{mouse}
    \mymacro{cat}

\stoptext

This would print:

    it is different from last time <--it was never called previously
    same as last time
    it is different from last time
    same as last time
    it is different from last time

--Joel
___
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] Critical Editions?

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

On 1/9/2022 11:23 AM, hanneder--- via ntg-context wrote:

    Thank god, we have many TeX fonts derived from older ones that still 
work, but many entries in

    the TeX Font Catalogue do not!


It's often not that bad when you use context ...

% \enabletrackers[*comp*]

\definefontfeature[default][default][compose=yes]

\starttext
ṥ
\stoptext

this feature has been there quite from the start of mkiv because 
otherwise mojca couldn't deal with her language


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] Critical Editions?

2022-01-09 Thread Robert via ntg-context
Dear list,

I am currently working on a critical edition as well, and follow the discussion 
with interest. For the time being, I prefer Latex over Context for this project.

In addition to Jürgen's remarks on transcription fonts, a small contribution:

Arabists and turcologists working with transcriptions used to have similar 
problems. In the nineties I adapted existing postscript fonts with 
Fontographer. I also made sure to copy kerning information from extant letters 
(e.g. a) to new ones (e.g. ā) with the required diacritic (usually dots, dashes 
and haceks). This was in the pre-unicode era.

Today there is the Brill font which is quite extended, yet I am not sure if it 
can be used freely in other publications.

Adapations to extant fonts can still be made with the open source app 
FontForge. Do not hesitate to contact me offline if you need help on this.

Regards,

Robert

i...@mo-perspectief.nl


> Op 9 jan. 2022, om 11:23 heeft hanneder--- via ntg-context 
>  het volgende geschreven:
> 
> I was just writing a mail (below) and saw:
> 
>> They do indic scripts and Kai made the first version of the devanagari code 
>> for the context fontloader code that I then optimized.
> 
> Fascinating. Where can I learn more about that or is that
> user-unfriendly (my technical knowledge is rather limited).
> 
> 
> Dear Hans,
> 
> two recurring problems are rather specifically Indological and they concern 
> hyphenation and
> font.
> 
> 1. In Sanskrit prose it is possible to produce compounds that span a few 
> lines. The concept of
>   "word" or "word division" fails here, as are the TeX mechanisms.
> 
>   What we need in practice would be a "hyphenation" for the language Sanskrit 
> that hyphenates
>   after all Sanskrit vowels (in transcription this would be a, ā, i, ī, u, ū, 
> ṛ, ḷ, e, o, ai, au. The
>   last two cannot be split, "au" is one vowel with one vowel sign in the 
> original script). Of
>   course, we want to improve this automatic spelling occasionally, so we need 
> to be able to insert
>   a \- without thereby disabling the hyphenation for this compound.
> 
>   I think in critical editions the problem of the disabled hyphenation also 
> arises when a variant
>   is added inside a word. In any case hyphenation is a real nuisance in 
> critical editions.
> 
> 2. Fonts that contain all necessary diacritics have become sparse. (This is 
> more a lamentation, not
>   much one can do about it, I guess).
> 
>   When I started TeXing people were used to writing aṭavī as a\d{t}av{\=\i}. 
> Not user friendly,
>   but it worked with many fonts. With each new font regime Sanskritists had 
> to search for new
>   fonts, invent work-arounds etc. Even the most promising attempts (I spent a 
> lot of time with
>   OmegaTeX) eventually disappeared. Now we are dependent on whether an otf 
> font has the underdot
>   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial fonts, I 
> found only one
>   "Brotschrift" that worked, which is Adobe Text Pro. I really like Minion, 
> for instance, but the
>   latest otf Version has no ṭ etc.
> 
>   Thank god, we have many TeX fonts derived from older ones that still work, 
> but many entries in
>   the TeX Font Catalogue do not!
> 
> 
> Jürgen
> 
> 
> 
> 
> ---
> 
> 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
> ___

___
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] How to create cell data that spans four rows in a table?

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

Willi Egger via ntg-context schrieb am 08.01.2022 um 23:57:

I would suggest not to use \starttable at all.

To me the most suitable table environment for such a table is \bTABLE \eTABLE. 
It gives you all kind of control over layout, dimensions, frames on and off etc.



I agree natural tables or extreme tables are the better choice for this 
table layout but it can be improved.



1. Keep the layout/settings local.

To ensure the \setupTABLE settings don't affect other tables you can 
either put \start and \stop at the begin and end of the table, e.g.


\start
\setupTABLE[...]
\bTABLE
...
\eTABLE
\stop

or put the settings in a setup-environment and load them on a pertable 
basis, e.g.


\startsetups[fancytable]
\setupTABLE[...]
\stopsetups
\bTABLE[setups=fancytable]
...
\eTABLE


2. Font changes are local to cells

When you apply a font switch to the whole content of a table cell there 
is no need to put braces around the text, e.g.


\bTD \bf ... \eTD

can be used without problem. When you make this change for a table 
header and the result is bold text there is a even simpler method 
because a special cell type exists here, e.g.


\bTH ... \eTH

creates bold text.


3. Simple markup

For natural tables with short texts in each cell there exists a simple 
mode which uses \starttable inspired markup with the short \NC and \NR 
commands to mark the start of each cell and row.


The example table of the OP can be written like below.

\starttext

\startsetups [tableframe]
\setupTABLE [c] [1][leftframe=off,width=40mm]
\setupTABLE [c] [2][rightframe=off, width=60mm]
\setupTABLE [c] [each] [align={lohi,center}]
\stopsetups

\startTABLE[setups=tableframe]
\NC \bf Eons  \NC \bf Eras \NC\NR
\NC Hadeon Eon\NC  \NC\NR
\NC[ny=4] Archanon Eon\NC Eoarchean Era\NC\NR
\NC   Paleoarchean Era \NC\NR
\NC   Mesoarchean Era  \NC\NR
\NC   Neoarchean Era   \NC\NR
\NC[ny=3] Proterozoic Eon \NC Paleoproterozoic Era \NC\NR
\NC   Mesoproterozoic Era  \NC\NR
\NC   Neoproterozoic Era   \NC\NR
\NC[ny=3] Phanerozoic Eon \NC Paleozoic Era\NC\NR
\NC   Mesozoic Era \NC\NR
\NC   Cenozoic Era \NC\NR
\stopTABLE

\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
___


Re: [NTG-context] Critical Editions?

2022-01-09 Thread hanneder--- via ntg-context

I was just writing a mail (below) and saw:

They do indic scripts and Kai made the first version of the  
devanagari code for the context fontloader code that I then optimized.


Fascinating. Where can I learn more about that or is that
user-unfriendly (my technical knowledge is rather limited).


Dear Hans,

two recurring problems are rather specifically Indological and they  
concern hyphenation and

font.

1. In Sanskrit prose it is possible to produce compounds that span a  
few lines. The concept of

   "word" or "word division" fails here, as are the TeX mechanisms.

   What we need in practice would be a "hyphenation" for the language  
Sanskrit that hyphenates
   after all Sanskrit vowels (in transcription this would be a, ā, i,  
ī, u, ū, ṛ, ḷ, e, o, ai, au. The
   last two cannot be split, "au" is one vowel with one vowel sign in  
the original script). Of
   course, we want to improve this automatic spelling occasionally,  
so we need to be able to insert

   a \- without thereby disabling the hyphenation for this compound.

   I think in critical editions the problem of the disabled  
hyphenation also arises when a variant
   is added inside a word. In any case hyphenation is a real nuisance  
in critical editions.


2. Fonts that contain all necessary diacritics have become sparse.  
(This is more a lamentation, not

   much one can do about it, I guess).

   When I started TeXing people were used to writing aṭavī as  
a\d{t}av{\=\i}. Not user friendly,
   but it worked with many fonts. With each new font regime  
Sanskritists had to search for new
   fonts, invent work-arounds etc. Even the most promising attempts  
(I spent a lot of time with
   OmegaTeX) eventually disappeared. Now we are dependent on whether  
an otf font has the underdot
   characters (ṭḍṃḥ) and the vowels (āīūṛ). Within the commercial  
fonts, I found only one
   "Brotschrift" that worked, which is Adobe Text Pro. I really like  
Minion, for instance, but the

   latest otf Version has no ṭ etc.

   Thank god, we have many TeX fonts derived from older ones that  
still work, but many entries in

   the TeX Font Catalogue do not!


Jürgen




---

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
___