Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm
Sorry, I took your message for irony.
Should have read your blog posts to know better.

Hraban

> Am 28.04.2020 um 18:07 schrieb Henning Hraban Ramm :
> 
> Don’t forget, what’s already included in ConTeXt:
> 
> \usemodule[visual]
> \useMPlibrary[dum]
> 
> \starttext
> \simplethesis
> \stoptext
> 
> 
> 
>> Am 28.04.2020 um 17:33 schrieb Thangalin :
>> 
>> Jan-Erik, after you have installed all the required software (and
>> fonts!) and unzipped the book.zip and themes.zip archives, you can
>> build a book using:
>> 
>> cd $HOME/dev/writing/book
>> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
>> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
>> 
>> This is noted at the bottom of the preamble section.
>> 
>> Enjoy!
>> 
>> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>>  wrote:
>>> 
>>> Is there a running example ? I’m not sure how to fill in the commandline
>>> 
>>> 
>>> 
>>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>>> 
>>> Yes, the naming is completely up to you.
>>> 
>>> I use:
>>> 
>>> project_something.tex
>>> env_something.tex
>>> prd_oneissue.tex
>>> c_onechapter.tex
>>> 
>>> That’s also what my script supports as default:
>>> https://github.com/fiee/tools/blob/master/contextproject.py
>>> 
> 
> ___
> 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] Typesetting Markdown - Part 8

2020-04-28 Thread Thangalin
Hi Jan,

> 1. Nameing and organizing the project, product and environments files. I
> am currently reorganising the files for my cooperative. I think that
> besides some nameing conventions it is more or less up to me how I
> organise our print work. Any recommendations welcome.

Download "themes.zip" from the blog post. It shows some naming
conventions and relationships between projects, products,
environments, and components.

> books. What I am looking for is a script to extract all XML tags/tokens
> from their files to have a complete list of things that should be
> handled in a ConTeXt style file. Five years ago I tried to create such a
> style file by hand, but I gave up.

XSL was designed specifically to parse XML. ConTeXt has facilities for
mapping XML tokens, as you've used. Depending on the complexity of
what you're trying to accomplish, take a look at "book.zip" from the
blog post. Inside you'll find "se2md.xsl"; a similar approach could
work for TEI: put the complexity of parsing TEI into XSL, then use
ConTeXt to typeset the resulting 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] Fwd: Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Joey McCollum
> > Unicode's canonical ordering of Hebrew marks is based on their combining
> > classes, with characters in higher combining classes being sorted after
> > those with lower combining classes in canonical order. The
> > typographically recommended ordering of certain characters is found in
> > Table 1 (p. 12) of
> > https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf. The

> So how official is that? Or is this something specific for this font?

Hebrew Layout Intelligence, which was developed by John Hudson of Tiro
Typeworks (who wrote this manual) and Ralph Hancock, is used for mark
positioning by a number of Hebrew fonts. Its guidelines govern their glyph
classes and chaining substitution rules. The fonts I know of that
explicitly implement it are SBL Hebrew, Ezra SIL, Keter YG, Keter Aram
Tsova.

On Tue, Apr 28, 2020 at 2:21 PM Hans Hagen  wrote:

> On 4/28/2020 6:16 PM, Joey McCollum wrote:
> >
> https://raw.githubusercontent.com/michal-h21/uninormalize/master/char-def-with-ccc.lua),
>
> looks like an ancient copy of char-def.lua
>
> (we actually do have a combining entry)
>
> 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] Fwd: Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Hans Hagen

On 4/28/2020 6:16 PM, Joey McCollum wrote:
https://raw.githubusercontent.com/michal-h21/uninormalize/master/char-def-with-ccc.lua), 

looks like an ancient copy of char-def.lua

(we actually do have a combining entry)

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] Fwd: Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Hans Hagen

On 4/28/2020 6:16 PM, Joey McCollum wrote:

Thank you for the prompt and thorough response!

If the reorderings have to be done for each pair of characters in 
different combining classes that are not in the expected typographical 
order, then there will be a lot (probably hundreds) of substitution 
rules. I am not very familiar with coding in Lua, but if there is a way 
to add substitution features for specific classes of points, then that 
would require a lot fewer cases.


don't worry about that now, the lua part is normally the easy part (a 
where-it-makes-most-sense-hooking-into could take more thinking)


(i have been thinking of some additional feature mechanisms but have to 
find back some code i played with long ago)


Unicode's canonical ordering of Hebrew marks is based on their combining 
classes, with characters in higher combining classes being sorted after 
those with lower combining classes in canonical order. The 
typographically recommended ordering of certain characters is found in 
Table 1 (p. 12) of 
https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf. The 


So how official is that? Or is this something specific for this font?

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] Blank page added after pagecolumns

2020-04-28 Thread Joey McCollum
I am typesetting a document using pagecolumns to ensure that my footnotes
are set ragged-bottom in columns. I have observed some unexpected behavior
whenever the last column on a page is left incomplete: a blank page is
added at the end of the document. A minimal working example follows:

```

\starttext

\startpagecolumns[n=2]

\dorecurse{3}{\par\input zapf}

\stoppagecolumns

\stoptext
```

I typeset this using ConTeXt version 2020.03.10, as released with TeXLive
2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or
\dorecurse{6} (so that the text ends in the first column of a page), then
there is no problem. I have tried to fix this by specifying page=no in the
\startpagecolumns arguments, but it did not change anything. Is there
something else I am missing?

Thank you,

Joey
___
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] Right-to-left pagecolumns and markings in ConTeXt

2020-04-28 Thread Joey McCollum
Thanks! Replacing "top" and "bottom" with "column:top" and "column:bottom"
didn't make the MWE work, but once you pointed out that the locations of
the marks to be fetched had to be column-specific, I started looking
through the mailing list and found something that worked. I just had to
change the \fetchmark calls in my MWE to \getmarking[TestMark][1][top] and
\getmarking[TestMark][2][bottom].

On Tue, Apr 28, 2020 at 10:32 AM Hans Hagen  wrote:

> On 4/28/2020 2:09 PM, Joey McCollum wrote:
>
> > Is there some way I can improve my syntax to avoid this issue, or is it
> > just a bug that needs to be fixed? I've tried fetching other marks
> > (e.g., first and last), but the only marks that ConTeXt seems to find
> > are the ones for the left column.
> column:top etc
>
> -
>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] contextproject script (was: Typesetting Markdown - Part 8)

2020-04-28 Thread Henning Hraban Ramm


> Am 28.04.2020 um 16:39 schrieb Henning Hraban Ramm :
> 
>>> https://github.com/fiee/tools/blob/master/contextproject.py
> 
> There are a few bugs in the output, e.g. in the first call you can’t set the 
> project name, and in the second it won’t create an environment if it’s 
> missing. If you leave out the project when you create a component, the name 
> gets an additional prefix.

Ok, new version: fixed the bugs, modernized the code and added a few more 
useless cryptic options for Thangalin.

Enjoy!
HR
___
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] Fwd: Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Joey McCollum
Thank you for the prompt and thorough response!

If the reorderings have to be done for each pair of characters in different
combining classes that are not in the expected typographical order, then
there will be a lot (probably hundreds) of substitution rules. I am not
very familiar with coding in Lua, but if there is a way to add substitution
features for specific classes of points, then that would require a lot
fewer cases.

Unicode's canonical ordering of Hebrew marks is based on their combining
classes, with characters in higher combining classes being sorted after
those with lower combining classes in canonical order. The typographically
recommended ordering of certain characters is found in Table 1 (p. 12) of
https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf. The following
list of character classes, with information about their Unicode combining
classes (which I retrieved from the Lua script
https://raw.githubusercontent.com/michal-h21/uninormalize/master/char-def-with-ccc.lua),
is indexed after the character classes described in that table:
1. The consonants (Unicode points 05D0-05EA) have no combining class and
are never reordered; this is typographically correct.
2. Shin dot and sin dot (05C1-05C2) should be next, but Unicode places them
in combining classes 24 and 25, after the characters in recommended classes
3-5 and many of the characters in recommended class 6.
3. Dagesh / mapiq (05BC) should be next, but Unicode assigns it a combining
class of 21. This means that it will be incorrectly ordered before
characters in recommended class 2 and after characters in recommended
classes 4-6 after Unicode normalization.
4. Rafe (05BF) should be next, but Unicode assigns it a combining class of
23. Thus, it will be correctly placed after characters in recommended class
3, but incorrectly placed before characters in recommended class 2 after
Unicode normalization.
5. The holam and holam haser vowel points (05B9-05BA) should be next, but
Unicode places them in combining class 19. This means that it will be
placed incorrectly before characters in recommended classes 2-4 and after
all characters in recommended class 6 except 05BB after Unicode
normalization.
6. The characters in 0591, 0596, 059B, 05A2-05A7, 05AA, 05B0-05B8, 05BB,
05BD, 05C5, 05C7 should be treated as being in the same class, but Unicode
places them in combining classes 10-18, 20, 22, and 220.
7. The prepositive marks yetiv and dehi (059A, 05AD) should be next;
Unicode places them in combining class 222, so they should correctly come
after all characters in recommended classes 1-6.
8. The characters 0307, 0593-0595, 0597-0598, 059C-05A1, 05A8, 05AB-05AC,
05AF, 05C4 should be treated as being in the same class; Unicode places
them in combining class 230, so they should correctly come after all
characters in recommended classes 1-7.
9. The postpositive marks segolta, pashta, telisha qetana, and zinor (0592,
0599, 05A9, 05AE) should be next; Unicode places them in combining class
230, so they will need to be reordered after the characters in recommended
class 8.

This a lot of information, and I've probably not presented it as clearly as
I could, so if there is any confusion, please let me know, and I can try to
explain better. If there is any other information you need, please let me
know.

Thanks again!

On Tue, Apr 28, 2020 at 9:17 AM Hans Hagen  wrote:

> On 4/28/2020 1:59 PM, Joey McCollum wrote:
> > \definefontfeature[f:pointedhebrew][default][
> >  ccmp=yes,
> >  mark=yes,
> >  script=hebr
> > ]
> > \definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]
> > %Set the body font:
> > \setupbodyfont[hebrew]
> > %Set up right-to-left alignment:
> > \setupalign[r2l]
> > \starttext
> >  %Characters after normalization, in Unicode canonical order (bet +
> > segol + dagesh + final nun):
> >  בֶּן
> >
> >  %A word with characters in typographically recommended order (bet +
> > dagesh + segol + final nun):
> >  בֶּן
> > \stoptext
>
> \startluacode
>  fonts.handlers.otf.addfeature {
>  name= "normalizehebrew",
>  type= "chainsubstitution",
>  prepend = 1,
>  lookups = {
>  {
>  type = "multiple",
>  data = {
>  [0x5B6] = { 0x5BC, 0x5B6 },
>  },
>  },
>  },
>  data = {
>  rules = {
>  {
>  current = { { 0x5B6 }, { 0x5BC } },
>  lookups = { 1, 0 },
>  },
>  },
>  },
>  }
> \stopluacode
>
> \definefontfeature
>[f:pointedhebrew]
>[hebrew]
>[normalizehebrew=yes]
>
> \definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]
>
> \setupbodyfont[hebrew]
>
> \setupalign[r2l]
>
> \starttext
>  בֶּן \quad בֶּן \par
> \stoptext
>
> How many such reorderings are there? (I saw some document about that
> font and it sounds like a

Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm
Don’t forget, what’s already included in ConTeXt:

\usemodule[visual]
\useMPlibrary[dum]

\starttext
\simplethesis
\stoptext



> Am 28.04.2020 um 17:33 schrieb Thangalin :
> 
> Jan-Erik, after you have installed all the required software (and
> fonts!) and unzipped the book.zip and themes.zip archives, you can
> build a book using:
> 
> cd $HOME/dev/writing/book
> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
> 
> This is noted at the bottom of the preamble section.
> 
> Enjoy!
> 
> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>  wrote:
>> 
>> Is there a running example ? I’m not sure how to fill in the commandline
>> 
>> 
>> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py
>> 

___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan-Erik Hägglöf
Perfect, I will get in to it.

Many thanks and Best wishes, Janne

> 28 apr. 2020 kl. 17:33 skrev Thangalin :
> 
> Jan-Erik, after you have installed all the required software (and
> fonts!) and unzipped the book.zip and themes.zip archives, you can
> build a book using:
> 
> cd $HOME/dev/writing/book
> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
> 
> This is noted at the bottom of the preamble section.
> 
> Enjoy!
> 
> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>  wrote:
>> 
>> Is there a running example ? I’m not sure how to fill in the commandline
>> 
>> 
>> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py
>> 
>> 
>> ___
>> 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
> ___

___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Thangalin
Jan-Erik, after you have installed all the required software (and
fonts!) and unzipped the book.zip and themes.zip archives, you can
build a book using:

cd $HOME/dev/writing/book
./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
-b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde

This is noted at the bottom of the preamble section.

Enjoy!

On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
 wrote:
>
> Is there a running example ? I’m not sure how to fill in the commandline
>
>
>
> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>
> Yes, the naming is completely up to you.
>
> I use:
>
> project_something.tex
> env_something.tex
> prd_oneissue.tex
> c_onechapter.tex
>
> That’s also what my script supports as default:
> https://github.com/fiee/tools/blob/master/contextproject.py
>
>
> ___
> 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] contextproject script (was: Typesetting Markdown - Part 8)

2020-04-28 Thread Jan-Erik Hägglöf
That was clarifying. Thanks a lot and good work done by you!

Take Care

Best wishes, Janne

> 28 apr. 2020 kl. 16:39 skrev Henning Hraban Ramm :
> 
> 
>> Am 28.04.2020 um 16:12 schrieb Jan-Erik Hägglöf :
>> 
>>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>>> 
>>> Yes, the naming is completely up to you.
>>> 
>>> I use:
>>> 
>>> project_something.tex
>>> env_something.tex
>>> prd_oneissue.tex
>>> c_onechapter.tex
>>> 
>>> That’s also what my script supports as default:
>>> https://github.com/fiee/tools/blob/master/contextproject.py
> 
>> Is there a running example ? I’m not sure how to fill in the commandline
> 
> 
> 1) Have a look at https://wiki.contextgarden.net/Project_structure
> 
> 2) To avoid the whole name, I set:
> alias mkprj='python3 ~/workspace/tools/contextproject.py'
> 
> 3) 
> $ mkprj --help
> Usage: contextproject.py [options]
> (env > prj > prd > cmp)
> Provide all names without prefix and suffix!
> 
> ConTeXt project management  (c) 2009-2019 by Henning Hraban Ramm, fiëé
> visuëlle
> 
> Options:
>  --version show program's version number and exit
>  -h, --helpshow this help message and exit
>  -m FILETYPE, --mode=FILETYPE
>create which type of file?
>  -c NAME, --component=NAME, --cmp=NAME
>create component file
>  -p NAME, --product=NAME, --prd=NAME
>create or set product file
>  -j NAME, --project=NAME, --prj=NAME
>create or set project file
>  -e NAME, --environment=NAME, --env=NAME
>create or set environment file
>  -i FILENAME, --template=FILENAME, --ini=FILENAME
>use non-default initial template file
>  -d DIRNAME, --directory=DIRNAME, --dir=DIRNAME
>project path
>  -C DIRNAME, --component_directory=DIRNAME, --cmpdir=DIRNAME
>path for component files below project path
> 
> 4) Create files in the order environment, project, product, component(s)
> i.e.
> # Create empty environment (it lacks the project name; I do this manually, 
> copying from another project):
> $ mkprj -e something
> # Create the project file:
> $ mkprj -e something -j something
> # Create a product and insert it in project:
> $ mkprj -j something -p first
> # Create a component dir for product "first" and add a component:
> $ mkprj -j something -p first -C first -c author
> 
> If there’s a component.ini, product.ini etc. it will get used as a template 
> for that level.
> 
> There are a few bugs in the output, e.g. in the first call you can’t set the 
> project name, and in the second it won’t create an environment if it’s 
> missing. If you leave out the project when you create a component, the name 
> gets an additional prefix. -m is mostly useless, and I never use -d.
> I should fix that, but these are just minor annoyances.
> 
> Have fun!
> 
> 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
> ___

___
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] contextproject script (was: Typesetting Markdown - Part 8)

2020-04-28 Thread Henning Hraban Ramm

> Am 28.04.2020 um 16:12 schrieb Jan-Erik Hägglöf :
> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py

> Is there a running example ? I’m not sure how to fill in the commandline


1) Have a look at https://wiki.contextgarden.net/Project_structure

2) To avoid the whole name, I set:
alias mkprj='python3 ~/workspace/tools/contextproject.py'

3) 
$ mkprj --help
Usage: contextproject.py [options]
(env > prj > prd > cmp)
Provide all names without prefix and suffix!

ConTeXt project management  (c) 2009-2019 by Henning Hraban Ramm, fiëé
visuëlle

Options:
  --version show program's version number and exit
  -h, --helpshow this help message and exit
  -m FILETYPE, --mode=FILETYPE
create which type of file?
  -c NAME, --component=NAME, --cmp=NAME
create component file
  -p NAME, --product=NAME, --prd=NAME
create or set product file
  -j NAME, --project=NAME, --prj=NAME
create or set project file
  -e NAME, --environment=NAME, --env=NAME
create or set environment file
  -i FILENAME, --template=FILENAME, --ini=FILENAME
use non-default initial template file
  -d DIRNAME, --directory=DIRNAME, --dir=DIRNAME
project path
  -C DIRNAME, --component_directory=DIRNAME, --cmpdir=DIRNAME
path for component files below project path

4) Create files in the order environment, project, product, component(s)
i.e.
# Create empty environment (it lacks the project name; I do this manually, 
copying from another project):
$ mkprj -e something
# Create the project file:
$ mkprj -e something -j something
# Create a product and insert it in project:
$ mkprj -j something -p first
# Create a component dir for product "first" and add a component:
$ mkprj -j something -p first -C first -c author

If there’s a component.ini, product.ini etc. it will get used as a template for 
that level.

There are a few bugs in the output, e.g. in the first call you can’t set the 
project name, and in the second it won’t create an environment if it’s missing. 
If you leave out the project when you create a component, the name gets an 
additional prefix. -m is mostly useless, and I never use -d.
I should fix that, but these are just minor annoyances.

Have fun!

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
___


Re: [NTG-context] Right-to-left pagecolumns and markings in ConTeXt

2020-04-28 Thread Hans Hagen

On 4/28/2020 2:09 PM, Joey McCollum wrote:

Is there some way I can improve my syntax to avoid this issue, or is it 
just a bug that needs to be fixed? I've tried fetching other marks 
(e.g., first and last), but the only marks that ConTeXt seems to find 
are the ones for the left column.

column:top etc

-
  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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan-Erik Hägglöf
Is there a running example ? I’m not sure how to fill in the commandline



> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
> 
> Yes, the naming is completely up to you.
> 
> I use:
> 
> project_something.tex
> env_something.tex
> prd_oneissue.tex
> c_onechapter.tex
> 
> That’s also what my script supports as default:
> https://github.com/fiee/tools/blob/master/contextproject.py 
> 
___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan U. Hasecke
Am 28.04.20 um 10:35 schrieb Saša Janiška:
> On Tue, 28 Apr 2020 08:32:57 +0200
> "Jan U. Hasecke"  wrote:
> 
>> 3. Being a writer I think that Markdown --> ConTeXt is the best way to
>> achieve what I want: easy writing and professional looking books. 
> 
> I've the same opinion!
> 
>> Up to now I used Pablos way via pandoc and XHTML described here:
>> http://www.from-pandoc-to-context.tk/
> 
> What do you use now?

Oh I still use it. But Daves posts might offer an alternative for me.

>> The problem with pandoc is that it does not generate a perfect ConTeXt
>> source to build the file as some things are missing.
> 
> You mean Pablos pandoc --> from-pandoc-to-context or

Yes.

juh


___
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] \setupinteraction [ ...] do not work

2020-04-28 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 28.04.2020 um 15:39:

Hi,
It seemed to me that it was necessary to proceed in this way to create a 
link in a pdf file; it does not work.

Thank you.
Fabrice

\setupinteraction[state=start,color=darkred]
\starttext
\goto{vecteur directeur}[https://www.youtube.com/watch?v=6VdSz-0QT4Y]
\stoptext



\goto{...}[url(...)]

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] \setupinteraction [ ...] do not work

2020-04-28 Thread Fabrice Couvreur
Hi,
It seemed to me that it was necessary to proceed in this way to create a
link in a pdf file; it does not work.
Thank you.
Fabrice

\setupinteraction[state=start,color=darkred]
\starttext
\goto{vecteur directeur}[https://www.youtube.com/watch?v=6VdSz-0QT4Y]
\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] Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Hans Hagen

On 4/28/2020 1:59 PM, Joey McCollum wrote:

\definefontfeature[f:pointedhebrew][default][
     ccmp=yes,
     mark=yes,
     script=hebr
]
\definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]
%Set the body font:
\setupbodyfont[hebrew]
%Set up right-to-left alignment:
\setupalign[r2l]
\starttext
     %Characters after normalization, in Unicode canonical order (bet + 
segol + dagesh + final nun):

     בֶּן

     %A word with characters in typographically recommended order (bet + 
dagesh + segol + final nun):

     בֶּן
\stoptext


\startluacode
fonts.handlers.otf.addfeature {
name= "normalizehebrew",
type= "chainsubstitution",
prepend = 1,
lookups = {
{
type = "multiple",
data = {
[0x5B6] = { 0x5BC, 0x5B6 },
},
},
},
data = {
rules = {
{
current = { { 0x5B6 }, { 0x5BC } },
lookups = { 1, 0 },
},
},
},
}
\stopluacode

\definefontfeature
  [f:pointedhebrew]
  [hebrew]
  [normalizehebrew=yes]

\definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]

\setupbodyfont[hebrew]

\setupalign[r2l]

\starttext
בֶּן \quad בֶּן \par
\stoptext

How many such reorderings are there? (I saw some document about that 
font and it sounds like a bit messy wrt all these input variants.)


(there are several mechanisms in context to deal with such issues, it's 
all about getting specs from users i.e. tex is all about control so in 
principle it should be doable)


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] Right-to-left pagecolumns and markings in ConTeXt

2020-04-28 Thread Joey McCollum
I am trying to typeset a two-column text in a right-to-left language using
ConTeXt. Because I want footnotes in this text to be set ragged-bottom, I
am using pagecolumns instead of standard columns. I also want to track the
first and last textual division markers on each page using markings.
Combining all of these ingredients seems to create a problem in ConTeXt:
when the pagecolumns are set in right-to-left order, the top and bottom
marks fetched are always the top and bottom marks in the left column, while
the true top mark should be the top mark of the right column. I've observed
this behavior using text in an actual right-to-left language, but the
following minimal (non-)working example with an English sample text
demonstrates the same behavior:

```
%Create a new markset to use:
\definemarking[TestMark]
%Setup header to reflect top and bottom marks:
\setupheadertexts[top: {\fetchmark[TestMark][top]}][bottom:
{\fetchmark[TestMark][bottom]}][top: {\fetchmark[TestMark][top]}][bottom:
{\fetchmark[TestMark][bottom]}] %even left, even right, odd left, odd right
%Setup the columns layout:
\definepagecolumns [example] [
n=2, %number of columns
direction=reverse, %does not work if ending comma is removed!
]
\starttext
\startpagecolumns[example]
\marking[TestMark]{1}(1) \input knuth\par
\marking[TestMark]{2}(2) \input knuth\par
\marking[TestMark]{3}(3) \input knuth\par
\marking[TestMark]{4}(4) \input knuth\par
\marking[TestMark]{5}(5) \input knuth\par
\marking[TestMark]{6}(6) \input knuth\par
\marking[TestMark]{7}(7) \input knuth\par
\marking[TestMark]{8}(8) \input knuth\par
\stoppagecolumns
\stoptext
```

I typeset this using ConTeXt version 2020.03.10, as released with TeXLive
2020. As my comment in the MWE points out, there also seems to be a bug in
the key-value parsing of \definepagecolumns that causes it not to parse the
direction=reverse input unless it is followed by a comma.

Is there some way I can improve my syntax to avoid this issue, or is it
just a bug that needs to be fixed? I've tried fetching other marks (e.g.,
first and last), but the only marks that ConTeXt seems to find are the ones
for the left column.

Thank you,

Joey
___
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] Unicode normalization and Hebrew in ConTeXt

2020-04-28 Thread Joey McCollum
I am typesetting a document in Hebrew that includes pointing (e.g., vowels,
shin and sin dots, dagesh, etc.) using ConTeXt. The Hebrew text that I want
to typeset has been normalized into Unicode's NFC canonical form. It is
well-known that the Unicode canonical ordering of Hebrew points conflicts
with the recommended mark ordering of specific points based on their
functions (see https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
for more on this topic). Thankfully, many typesetting engines automatically
reorder the points to ensure that they are combined according to the
specifications of many fonts. I'm pretty sure that XeLaTeX is one of these,
as it typesets Hebrew letters with multiple points correctly even when the
Hebrew text is in NFC form.

My question is, can ConTeXt with LuaTeX handle the same situation
correctly? In the following minimal example, ConTeXt typesets pointed
Hebrew correctly when the characters are in the typographically recommended
order, but not when they are in Unicode canonical order:

```
%Setup Hebrew text font:
\definefontfeature[f:pointedhebrew][default][
ccmp=yes,
mark=yes,
script=hebr
]
\definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew]
%Set the body font:
\setupbodyfont[hebrew]
%Set up right-to-left alignment:
\setupalign[r2l]
\starttext
%Characters after normalization, in Unicode canonical order (bet +
segol + dagesh + final nun):
בֶּן

%A word with characters in typographically recommended order (bet +
dagesh + segol + final nun):
בֶּן
\stoptext
```

I typeset this using ConTeXt version 2020.03.10, as released with TeXLive
2020. I got the SBL Hebrew font from
https://www.sbl-site.org/educational/BiblicalFonts_SBLHebrew.aspx.
According to the font's user manual (see the link above the MWE), the font
should be able to combine the marks to form the correct glyph regardless of
their order after the consonant, but that doesn't seem to be the case here.
I also tried using the predefined "hebrew" featureset, but that did not
change anything.

Is there some other OpenType feature or featureset I need to enable to fix
this, or is there some module or option I can include to get ConTeXt to
typeset Unicode-normalized Hebrew as if it were ordered in the recommended
way, like XeLaTeX does? I see that the uninormalize module is mentioned in
the thread "XeLaTeX, LuaLaTeX, fontspec, unicode and normalization" on TeX
Stack Exchange (
https://tex.stackexchange.com/questions/229044/xelatex-lualatex-fontspec-unicode-and-normalization);
can that be used with ConTeXt?

Thank you,

Joey
___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Saša Janiška
On Tue, 28 Apr 2020 08:32:57 +0200
"Jan U. Hasecke"  wrote:

> 3. Being a writer I think that Markdown --> ConTeXt is the best way to
> achieve what I want: easy writing and professional looking books. 

I've the same opinion!

> Up to now I used Pablos way via pandoc and XHTML described here:
> http://www.from-pandoc-to-context.tk/

What do you use now?

> The problem with pandoc is that it does not generate a perfect ConTeXt
> source to build the file as some things are missing.

You mean Pablos pandoc --> from-pandoc-to-context or

direct pandoc --> ConTeXt export ?


Sincerely,
Gour

-- 
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.


___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm


> Am 28.04.2020 um 08:32 schrieb Jan U. Hasecke :
> 
> 1. Nameing and organizing the project, product and environments files. I
> am currently reorganising the files for my cooperative. I think that
> besides some nameing conventions it is more or less up to me how I
> organise our print work. Any recommendations welcome.

Yes, the naming is completely up to you.

I use:

project_something.tex
env_something.tex
prd_oneissue.tex
c_onechapter.tex

That’s also what my script supports as default:
https://github.com/fiee/tools/blob/master/contextproject.py

Probably I should switch to .mkiv extensions, since I also have LaTeX projects 
now.


> 2. The "Deutsches Text Archiv" has prepared a text corpus of German
> texts up to 1900 in TEI PS XML, so we could use them directly to typeset
> books.
...
> The tokens/tags differ from text to text and I think the structure too
> so that it was beyond my knowledge to generate a general style file for
> all texts.

And it’s probably impossible. Like with HTML and ePub export, the mapping of 
structures is very individual.


Best, 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
___