Re: [NTG-context] new upload

2021-08-07 Thread Aditya Mahajan via ntg-context
On Sat, 7 Aug 2021, Hans Hagen via ntg-context wrote:

> Hi,
> 
> I did a new upload. Attached is a document describing a new cheap (lmtx only)
> feature. It's probably not that useful for most users, because it is meant for
> somewhat extreme situations. but you never know.

How is this different from reading files from a zip file?

Aditya
___
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] Problem with colored font

2021-08-07 Thread Marcus Vinicius Mesquita via ntg-context
Thank you for the last update. It works perfectly.

Marcus Vinicius

On Sat, Aug 7, 2021 at 10:23 AM Marcus Vinicius Mesquita <
marcusvinicius.mesqu...@gmail.com> wrote:

> Thank you, Hans. I'll wait then for the next upload.
>
> Have a nice weekend.
>
> Marcus Vinicius
>
>
> On Sat, Aug 7, 2021 at 10:14 AM Hans Hagen  wrote:
>
>> On 8/7/2021 1:09 PM, Marcus Vinicius Mesquita via ntg-context wrote:
>> > Dear list,
>> >
>> > I'm trying to use the BabelStone Flags font, with colored flags of many
>> > countries,available freely under the SIL Open Font License 1.1 at:
>> > https://babelstone.co.uk/Fonts/Download/BabelStoneFlagsDual.ttf
>> > 
>> >
>> > In the MWE below, there is a spurious “at” in the first time that the
>> > definition of the symbol for the Brazilian flag is used, but no problem
>> > when the definition for the flag of Portugal is used or even when the
>> > symbol for the Brazilian flag is used a second time. How to correct
>> this
>> > behavior?
>> >
>> > MWE:
>> >
>> > \definefontfeature[colored][colr=yes]
>> > \definefontsynonym[flags][file:BabelStoneFlagsDual.ttf*colored at 7pt]
>> > \definesymbol[BR][\getglyphdirect{flags}{\char"F0023}]
>> > \definesymbol[PT][\getglyphdirect{flags}{\char"F00A1}]
>> >
>> > \starttext
>> >
>> > Brasil \symbol[BR]
>> >
>> > Portugal \symbol[PT]
>> >
>> > Brasil \symbol[BR]
>> >
>> > \stoptext
>> the fontsize is automatic so the "at .." interferes
>>
>> here is an alternative (call by name):
>>
>>\definesymbol[BR][{\getnamedglyphdirect{flags}{br}}]
>>\definesymbol[PT][{\getnamedglyphdirect{flags}{pt}}]
>>
>> now, because you want it smaller i'll add this
>>
>>\definesymbol[BR][{\getnamedglyphdirectscaled{.7}{flags}{br}}]
>>\definesymbol[PT][{\getnamedglyphdirectscaled{.7}{flags}{pt}}]
>>
>> in the next upload
>>
>> Hans
>>
>> -
>>Hans Hagen | PRAGMA ADE
>>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -
>>
>
>
> --
> Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
> corpo nem seus membros, por ser descanso da alma, primavera do coração,
> distração do aflito, entretenimento do solitário, e viático do viajante.
>
> Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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

2021-08-07 Thread Hans Hagen via ntg-context

Hi,

I did a new upload. Attached is a document describing a new cheap (lmtx 
only) feature. It's probably not that useful for most users, because it 
is meant for somewhat extreme situations. but you never know.


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
-


workflows-hashed.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] Referencing fonts by path within ConTeXt

2021-08-07 Thread Wolfgang Schuster via ntg-context

Joey McCollum via ntg-context schrieb am 07.08.2021 um 22:29:

Hi,

I'm interested in packaging a ConTeXt project in a self-contained way, 
so that the environment/component/project .tex files, the bibliography 
.bib file(s), and fonts used for typesetting are all provided in one 
place. (The goal is that others can generate the PDFs themselves from 
the source files as long as they have a sufficiently recent version of 
ConTeXt installed.) The usual ConTeXt directory structure makes sense 
for most of this, but it doesn't address the possibility of accessing 
fonts locally. I think I could do this with a script that temporarily 
sets the OSFONTDIR variable to the local fonts directory and then 
invokes ConTeXt to typeset the project-level file, but I was wondering 
if there is an easier way to do this from within ConTeXt. 
Specifically, is there a way to specify a font via a local path with 
font setup commands in an environment file?


You can use

    \usefontpath[...]

to set a directory where ConTeXt searches for fonts but this works only 
when you use a typescript and not for \definefontfamily.


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] Referencing fonts by path within ConTeXt

2021-08-07 Thread Henning Hraban Ramm via ntg-context


> Am 07.08.2021 um 22:29 schrieb Joey McCollum via ntg-context 
> :
> 
> Hi,
> 
> I'm interested in packaging a ConTeXt project in a self-contained way, so 
> that the environment/component/project .tex files, the bibliography .bib 
> file(s), and fonts used for typesetting are all provided in one place. (The 
> goal is that others can generate the PDFs themselves from the source files as 
> long as they have a sufficiently recent version of ConTeXt installed.) The 
> usual ConTeXt directory structure makes sense for most of this, but it 
> doesn't address the possibility of accessing fonts locally. I think I could 
> do this with a script that temporarily sets the OSFONTDIR variable to the 
> local fonts directory and then invokes ConTeXt to typeset the project-level 
> file, but I was wondering if there is an easier way to do this from within 
> ConTeXt. Specifically, is there a way to specify a font via a local path with 
> font setup commands in an environment file?

You can just specify your fonts in the typescript as 
[file:relative_path/fontname.otf].

OSFONTDIR isn’t as reliable as you need "mtxrun --script fonts --reload" after 
changing it (and sometimes "mtxrun --generate" before).

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] Short forms and abbreviations in bibliography

2021-08-07 Thread Henning Hraban Ramm via ntg-context


> Am 07.08.2021 um 21:53 schrieb Joey McCollum via ntg-context 
> :
> 
> A separate list of abbreviations would then list "LSAWS" alongside 
> "Linguistic Studies in Ancient West Semitic" (and likewise for other 
> journal/series abbreviations).

Regarding abbreviations have a look at 
https://wiki.contextgarden.net/Command/definesynonyms

It should be as easy as

\abbreviation{LSAWS}{Linguistic Studies in Ancient West Semitic}

The full name of \quote{LSAWS} is \infull{LSAWS}.

\placelistofabbreviations


I had a case where mostly abbreviations were used in the text but the full name 
should appear in the index.
I can provide the setup (including Lua functions), if it might help you.


Can’t help with bibliographies, sorry.

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

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


[NTG-context] Referencing fonts by path within ConTeXt

2021-08-07 Thread Joey McCollum via ntg-context
Hi,

I'm interested in packaging a ConTeXt project in a self-contained way, so
that the environment/component/project .tex files, the bibliography .bib
file(s), and fonts used for typesetting are all provided in one place. (The
goal is that others can generate the PDFs themselves from the source files
as long as they have a sufficiently recent version of ConTeXt installed.)
The usual ConTeXt directory structure makes sense for most of this, but it
doesn't address the possibility of accessing fonts locally. I think I could
do this with a script that temporarily sets the OSFONTDIR variable to the
local fonts directory and then invokes ConTeXt to typeset the project-level
file, but I was wondering if there is an easier way to do this from within
ConTeXt. Specifically, is there a way to specify a font via a local path
with font setup commands in an environment file?

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] Short forms and abbreviations in bibliography

2021-08-07 Thread Joey McCollum via ntg-context
Hi,

It is a common practice to use short forms of titles for bibliographic
entries after they are cited the first time. Another practice is to use
abbreviations for journal names and book series (generally for citations in
the text, but possibly also in the references list), with a separate "List
of Abbreviations" provided to cross-reference the abbreviations and full
names. I think that these practices could be accommodated with multiple
bibliographies that contain short and long forms for corresponding entries,
but I wanted to ask: is there a simpler or preferred way to do this in
ConTeXt?

To illustrate what I mean, the biblatex-sbl package (
https://github.com/dcpurton/biblatex-sbl), which implements the SBL
citation style for (Xe)LaTeX, handles this using additional fields like
"shorttitle," "shortjournal," and "shortseries," so for the BibTeX-style
bibliographic entry

@book{Blau2010,
author = {Joshua Blau},
title = {Phonology and Morphology of Biblical Hebrew},
shorttitle = {Phonology},
series = {Linguistic Studies in Ancient West Semitic},
shortseries = {LSAWS},
volume = {2},
location = {Winona Lake, IN},
publisher = {Eisenbrauns},
year = {2010}
}

the initial in-text citation (in SBL style) would look something like

Joshua Blau, *Phonology and Morphology of Biblical Hebrew*, LSAWS 2 (Winona
Lake, IN: Eisenbrauns, 2010),

while subsequent in-text citations would look like

Blau, *Phonology*.

A separate list of abbreviations would then list "LSAWS" alongside
"Linguistic Studies in Ancient West Semitic" (and likewise for other
journal/series abbreviations).

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] Setting a heading text on its own page with \setuphead

2021-08-07 Thread Joey McCollum via ntg-context
Beautiful! This makes things even more succinct. I notice that if I try to
prevent paragraph indentation after a MyPart heading with the
"indentnext=no" argument, it doesn't work. Is this because of the
\page[blankpagebreak] command in the "after" argument? (In any case, I can
just change the "after" argument to
"after=\page[blankpagebreak]\noindentation" and things work as expected, so
this isn't a real problem. I'm just curious.)

Thanks!

Joey

On Sat, Aug 7, 2021 at 5:20 AM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Joey McCollum via ntg-context schrieb am 06.08.2021 um 19:12:
> > Hi,
> >
> > I'd like to define my own class of heading derived from the "part"
> > heading; in the MWE below, it's called "MyPart". I'd like this heading
> > to have the following features:
> >
> >   * Its title should appear in the ToC, but its number should never be
> > printed in the ToC or in the text.
> >   * It should always start on an odd page.
> >   * Its text should be in a larger size than the text of the body, set
> > in all caps, and set with extra letterspacing.
> >   * Most importantly, the title of the heading should appear on its own
> > page without a header or footer. The text of the body should begin
> > on the next odd page.
> >
> > I was hoping to accomplish all of this within the \setuphead command,
> > and it seems like this should be possible, but in the following example,
> > I'm not getting the text of the header at all:
> >
> > [...]
> >
> > I expect there's something obvious that I'm missing, but any help is
> > appreciated.
>
> Most of the stuff was already answered by Pablo. Below is my version how
> to set the layout to fit the requirements.
>
> \definefontfamily
>[garamond]
>[rm]
>[EBGaramond]
>
> \setupbodyfont
>[garamond,12pt]
>
> \definefont
>[MyPartFont]
>[Serif at 24pt]
>[line=36pt]
>
> \setuppagenumbering
>[alternative=doublesided,
> location=]
>
> \setupinterlinespace
>[line=18pt]
>
> \definepagebreak
>[blankpagebreak]
>[yes,header,footer,right]
>
> \definehead
>[MyPart]
>[part]
>
> \definecharacterkerning
>[mypartkerning]
>[factor=0.,
> features=letterspacing]
>
> \setuphead
>[MyPart]
>[placehead=yes,
> number=no,
> page=blankpagebreak,
> header=empty,
> footer=empty,
> align={flushleft,nothyphenated},
> style=MyPartFont,
>
> textstyle={\setcharacterkerning[mypartkerning]\setcharactercasing[WORD]},
> after={\page[blankpagebreak]}]
>
> \setupheadertexts
>[\structureuservariable{booktitle}] []
>[] [\structureuservariable{booktitle}]
>
> \setupfootertexts
>[pagenumber] []
>[] [pagenumber]
>
> \setupblank
>[line,fixed]
>
> \starttext
>
> \startMyPart [title={Title for Title Page}] [booktitle={Title for Header}]
> \dorecurse{6}{\input knuth\par}
> \stopMyPart
>
> \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] ECMAscript

2021-08-07 Thread Henning Hraban Ramm via ntg-context


> Am 07.08.2021 um 15:02 schrieb Michal Vlasák :
> 
> On Sat Aug 7, 2021 at 9:57 AM CEST, Henning Hraban Ramm via ntg-context wrote:
>> for running the ECMAscript part of the CG journal, I cloned the repo
>> from https://github.com/ccxvii/mujs/ and executed "make release".
>> 
>> But apparently I need a libmujs.so – how do I make this?
> 
> Try `make shared` to make a shared library (.so file).

Thank you, that works!

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] Problem with colored font

2021-08-07 Thread Marcus Vinicius Mesquita via ntg-context
Thank you, Hans. I'll wait then for the next upload.

Have a nice weekend.

Marcus Vinicius


On Sat, Aug 7, 2021 at 10:14 AM Hans Hagen  wrote:

> On 8/7/2021 1:09 PM, Marcus Vinicius Mesquita via ntg-context wrote:
> > Dear list,
> >
> > I'm trying to use the BabelStone Flags font, with colored flags of many
> > countries,available freely under the SIL Open Font License 1.1 at:
> > https://babelstone.co.uk/Fonts/Download/BabelStoneFlagsDual.ttf
> > 
> >
> > In the MWE below, there is a spurious “at” in the first time that the
> > definition of the symbol for the Brazilian flag is used, but no problem
> > when the definition for the flag of Portugal is used or even when the
> > symbol for the Brazilian flag is used a second time. How to correct this
> > behavior?
> >
> > MWE:
> >
> > \definefontfeature[colored][colr=yes]
> > \definefontsynonym[flags][file:BabelStoneFlagsDual.ttf*colored at 7pt]
> > \definesymbol[BR][\getglyphdirect{flags}{\char"F0023}]
> > \definesymbol[PT][\getglyphdirect{flags}{\char"F00A1}]
> >
> > \starttext
> >
> > Brasil \symbol[BR]
> >
> > Portugal \symbol[PT]
> >
> > Brasil \symbol[BR]
> >
> > \stoptext
> the fontsize is automatic so the "at .." interferes
>
> here is an alternative (call by name):
>
>\definesymbol[BR][{\getnamedglyphdirect{flags}{br}}]
>\definesymbol[PT][{\getnamedglyphdirect{flags}{pt}}]
>
> now, because you want it smaller i'll add this
>
>\definesymbol[BR][{\getnamedglyphdirectscaled{.7}{flags}{br}}]
>\definesymbol[PT][{\getnamedglyphdirectscaled{.7}{flags}{pt}}]
>
> in the next upload
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] Problem with colored font

2021-08-07 Thread Hans Hagen via ntg-context

On 8/7/2021 1:09 PM, Marcus Vinicius Mesquita via ntg-context wrote:

Dear list,

I'm trying to use the BabelStone Flags font, with colored flags of many 
countries,available freely under the SIL Open Font License 1.1 at:
https://babelstone.co.uk/Fonts/Download/BabelStoneFlagsDual.ttf 



In the MWE below, there is a spurious “at” in the first time that the 
definition of the symbol for the Brazilian flag is used, but no problem 
when the definition for the flag of Portugal is used or even when the 
symbol for the Brazilian flag is used a second time. How to correct this 
behavior?


MWE:

\definefontfeature[colored][colr=yes]
\definefontsynonym[flags][file:BabelStoneFlagsDual.ttf*colored at 7pt]
\definesymbol[BR][\getglyphdirect{flags}{\char"F0023}]
\definesymbol[PT][\getglyphdirect{flags}{\char"F00A1}]

\starttext

Brasil \symbol[BR]

Portugal \symbol[PT]

Brasil \symbol[BR]

\stoptext

the fontsize is automatic so the "at .." interferes

here is an alternative (call by name):

  \definesymbol[BR][{\getnamedglyphdirect{flags}{br}}]
  \definesymbol[PT][{\getnamedglyphdirect{flags}{pt}}]

now, because you want it smaller i'll add this

  \definesymbol[BR][{\getnamedglyphdirectscaled{.7}{flags}{br}}]
  \definesymbol[PT][{\getnamedglyphdirectscaled{.7}{flags}{pt}}]

in the next upload

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] ECMAscript

2021-08-07 Thread Michal Vlasák via ntg-context
On Sat Aug 7, 2021 at 9:57 AM CEST, Henning Hraban Ramm via ntg-context wrote:
> for running the ECMAscript part of the CG journal, I cloned the repo
> from https://github.com/ccxvii/mujs/ and executed "make release".
> I copied the resulting files to my TeX tree:
>
> ll ~/lmtx/tex/texmf-osx-64/bin/lib/luametatex/mujs/
> total 2832
> -rw-r--r-- 1 hraban staff 517K 7 Aug 09:49 libmujs.o
> -rw-r--r-- 1 hraban staff 9,2K 7 Aug 09:49 main.o
> -rwxr-xr-x 1 hraban staff 413K 7 Aug 09:49 mujs*
> -rwxr-xr-x 1 hraban staff 408K 7 Aug 09:49 mujs-pp*
> -rw-r--r-- 1 hraban staff 2,9K 7 Aug 09:49 pp.o
>
> But apparently I need a libmujs.so – how do I make this?

Try `make shared` to make a shared library (.so file).

`make release` compiles the "shell" executable.

Michal Vlasák
___
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] Rotating pages

2021-08-07 Thread Wolfgang Schuster via ntg-context

Jeroen via ntg-context schrieb am 07.08.2021 um 13:56:
For the following document, the last 3 pages are landscape, but I 
would like to have the pdf-ed rotated so they are in the pdf document 
portrait, ie rotated 90 degree to the left but leave the page as how 
they are now. Is there an easy way to achieve this?


\startbuffer[apx]

\setuppapersize[


\setuppapersize[%


  \dorecurse{\noffigurepages}
      {\startTEXpage
\externalfigure[\jobname-apx.pdf][page=\recurselevel]
 \stopTEXpage}


\externalfigure [...] [page=\recurselevel,orientation=90]

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] Rotating pages

2021-08-07 Thread Jeroen via ntg-context
For the following document, the last 3 pages are landscape, but I would
like to have the pdf-ed rotated so they are in the pdf document portrait,
ie rotated 90 degree to the left but leave the page as how they are now. Is
there an easy way to achieve this?





\startbuffer[apx]

\setuppapersize[
  A4,landscape]

\setuppagenumbering[
  location={footer,center}]

\setbreakpoints[compound]

\starttext

\startsection[title={MyTitle},ref={apx}]

  \dorecurse{10}{\input zapf\par}

\stopsection

\stoptext

\stopbuffer

  \savebuffer[list=apx, file=apx.tex]

  \starttext
  \startbodymatter
  \dorecurse{10}{\input zapf\par}
  \typesetfile[\jobname-apx.tex][--purgeall][object=no, width=0pt]
  \stopbodymatter
  \startappendices
  \getfiguredimensions[\jobname-apx.pdf]
  \dorecurse{\noffigurepages}
  {\startTEXpage
\externalfigure[\jobname-apx.pdf][page=\recurselevel]
   \stopTEXpage}
  \stopappendices
  \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] Problem with colored font

2021-08-07 Thread Marcus Vinicius Mesquita via ntg-context
Dear list,

I'm trying to use the BabelStone Flags font, with colored flags of many
countries, available freely under the SIL Open Font License 1.1 at:
https://babelstone.co.uk/Fonts/Download/BabelStoneFlagsDual.ttf

In the MWE below, there is a spurious “at” in the first time that the
definition of the symbol for the Brazilian flag is used, but no problem
when the definition for the flag of Portugal is used or even when the
symbol for the Brazilian flag is used a second time. How to correct this
behavior?

MWE:

\definefontfeature[colored][colr=yes]
\definefontsynonym[flags][file:BabelStoneFlagsDual.ttf*colored at 7pt]
\definesymbol[BR][\getglyphdirect{flags}{\char"F0023}]
\definesymbol[PT][\getglyphdirect{flags}{\char"F00A1}]

\starttext

Brasil \symbol[BR]

Portugal \symbol[PT]

Brasil \symbol[BR]

\stoptext

-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] lpeg pattern in function

2021-08-07 Thread Marcus Vinicius Mesquita via ntg-context
Thank you, Hans. Very nice indeed your solutions.

Marcus Vinicius

On Sat, Aug 7, 2021 at 5:37 AM Hans Hagen  wrote:

> On 8/6/2021 10:58 PM, Marcus Vinicius Mesquita via ntg-context wrote:
> > Dear list,
> > in the mwe below, the expected result is ok for most entries but fails
> > when the word contains the letters ó or ô.
> > We get zoolco instead of zoológico, and termtro instead of termômetro.
> > What am I doing wrong?
> >
> > mwe:
> >
> > \def\stripnumber#1%
> >  {\cldcontext{lpeg.match(lpeg.stripper("[¹²³⁴⁵⁶⁷⁸⁹⁰]"),
> > [==[#1]==])}}
> >
> > \starttext
> >
> > \stripnumber{árbitro⁶}
> > \stripnumber{ébano¹}
> > \stripnumber{ícone⁸}
> > \stripnumber{zoológico⁰}
> > \stripnumber{eletroacústico⁹}
> > \stripnumber{trânsfuga⁷}
> > \stripnumber{farmacêutico¹}
> > \stripnumber{maître²}
> > \stripnumber{termômetro³}
> > \stripnumber{noûs⁴}
> >
> > \stoptext
>
>
> \def\stripnumber#1%
>{\cldcontext{lpeg.match(lpeg.stripper(lpeg.US("¹²³⁴⁵⁶⁷⁸⁹⁰")),
> [==[#1]==])}}
>
> (US -> utf set)
>
> or
>
> \startluacode
>  local s = lpeg.stripper(lpeg.US("¹²³⁴⁵⁶⁷⁸⁹⁰"))
>  function document.StripNumber(str)
>  context(lpeg.match(s, str))
>  end
> \stopluacode
>
> \def\stripnumber#1{\ctxlua{document.StripNumber([==[#1]==])}}
>
> or you can go fancy:
>
> \startluacode
>  local p_strip = lpeg.stripper(lpeg.US("¹²³⁴⁵⁶⁷⁸⁹⁰"))
>
>  interfaces.implement {
>  name  = "StripNumber",
>  public= true,
>  arguments = "string",
>  actions   = function(str)
>  context(lpeg.match(p_strip, str))
>  end
>  }
> \stopluacode
>
> \StripNumber{zoológico⁰}
>
> There are more efficient variants but i guess it's good enough.
>
> 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
> -
>


-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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] Setting a heading text on its own page with \setuphead

2021-08-07 Thread Wolfgang Schuster via ntg-context

Joey McCollum via ntg-context schrieb am 06.08.2021 um 19:12:

Hi,

I'd like to define my own class of heading derived from the "part" 
heading; in the MWE below, it's called "MyPart". I'd like this heading 
to have the following features:


  * Its title should appear in the ToC, but its number should never be
printed in the ToC or in the text.
  * It should always start on an odd page.
  * Its text should be in a larger size than the text of the body, set
in all caps, and set with extra letterspacing.
  * Most importantly, the title of the heading should appear on its own
page without a header or footer. The text of the body should begin
on the next odd page.

I was hoping to accomplish all of this within the \setuphead command, 
and it seems like this should be possible, but in the following example, 
I'm not getting the text of the header at all:


[...]

I expect there's something obvious that I'm missing, but any help is 
appreciated.


Most of the stuff was already answered by Pablo. Below is my version how 
to set the layout to fit the requirements.


\definefontfamily
  [garamond]
  [rm]
  [EBGaramond]

\setupbodyfont
  [garamond,12pt]

\definefont
  [MyPartFont]
  [Serif at 24pt]
  [line=36pt]

\setuppagenumbering
  [alternative=doublesided,
   location=]

\setupinterlinespace
  [line=18pt]

\definepagebreak
  [blankpagebreak]
  [yes,header,footer,right]

\definehead
  [MyPart]
  [part]

\definecharacterkerning
  [mypartkerning]
  [factor=0.,
   features=letterspacing]

\setuphead
  [MyPart]
  [placehead=yes,
   number=no,
   page=blankpagebreak,
   header=empty,
   footer=empty,
   align={flushleft,nothyphenated},
   style=MyPartFont,

textstyle={\setcharacterkerning[mypartkerning]\setcharactercasing[WORD]},
   after={\page[blankpagebreak]}]

\setupheadertexts
  [\structureuservariable{booktitle}] []
  [] [\structureuservariable{booktitle}]

\setupfootertexts
  [pagenumber] []
  [] [pagenumber]

\setupblank
  [line,fixed]

\starttext

\startMyPart [title={Title for Title Page}] [booktitle={Title for Header}]
\dorecurse{6}{\input knuth\par}
\stopMyPart

\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] ECMAscript

2021-08-07 Thread Hans Hagen via ntg-context

On 8/7/2021 9:57 AM, Henning Hraban Ramm via ntg-context wrote:

Hi Taco (et al.),

for running the ECMAscript part of the CG journal, I cloned the repo from 
https://github.com/ccxvii/mujs/ and executed "make release".
I copied the resulting files to my TeX tree:

ll ~/lmtx/tex/texmf-osx-64/bin/lib/luametatex/mujs/
total 2832
-rw-r--r--  1 hraban  staff   517K  7 Aug 09:49 libmujs.o
-rw-r--r--  1 hraban  staff   9,2K  7 Aug 09:49 main.o
-rwxr-xr-x  1 hraban  staff   413K  7 Aug 09:49 mujs*
-rwxr-xr-x  1 hraban  staff   408K  7 Aug 09:49 mujs-pp*
-rw-r--r--  1 hraban  staff   2,9K  7 Aug 09:49 pp.o

But apparently I need a libmujs.so – how do I make this?
looks like there are packages for linux but I don't know about osx 
(maybe mojca has is or can make it with one of these these port-to-osx 
kits)


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 error "page order problem in tree at page"

2021-08-07 Thread Hans Hagen via ntg-context

On 8/6/2021 5:26 AM, Rik Kabel wrote:


On 8/5/2021 18:04, Hans Hagen wrote:

On 8/4/2021 9:26 PM, Rik Kabel via ntg-context wrote:

With today's LMTX release I see the warning:

    backend > tags > beware: page order problem in tree at 
page 1


This appears to be recently introduced to the code.

Should it be a concern? If so, where should I look to remedy it?


mwe ...


Here it is:

\setuptagging [state=start]
\starttext
  The problem involves tagging.
\stoptext
i'll comment the message ... some synchronization is tricky so when 
there is a real issue we'll deal with it at that time


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] lpeg pattern in function

2021-08-07 Thread Hans Hagen via ntg-context

On 8/6/2021 10:58 PM, Marcus Vinicius Mesquita via ntg-context wrote:

Dear list,
in the mwe below, the expected result is ok for most entries but fails 
when the word contains the letters ó or ô.
We get zoolco instead of zoológico, and termtro instead of termômetro. 
What am I doing wrong?


mwe:

\def\stripnumber#1%
         {\cldcontext{lpeg.match(lpeg.stripper("[¹²³⁴⁵⁶⁷⁸⁹⁰]"), 
[==[#1]==])}}


\starttext

\stripnumber{árbitro⁶}
\stripnumber{ébano¹}
\stripnumber{ícone⁸}
\stripnumber{zoológico⁰}
\stripnumber{eletroacústico⁹}
\stripnumber{trânsfuga⁷}
\stripnumber{farmacêutico¹}
\stripnumber{maître²}
\stripnumber{termômetro³}
\stripnumber{noûs⁴}

\stoptext



\def\stripnumber#1%
  {\cldcontext{lpeg.match(lpeg.stripper(lpeg.US("¹²³⁴⁵⁶⁷⁸⁹⁰")), 
[==[#1]==])}}


(US -> utf set)  

or

\startluacode
local s = lpeg.stripper(lpeg.US("¹²³⁴⁵⁶⁷⁸⁹⁰"))
function document.StripNumber(str)
context(lpeg.match(s, str))
end
\stopluacode

\def\stripnumber#1{\ctxlua{document.StripNumber([==[#1]==])}}

or you can go fancy:

\startluacode
local p_strip = lpeg.stripper(lpeg.US("¹²³⁴⁵⁶⁷⁸⁹⁰"))

interfaces.implement {
name  = "StripNumber",
public= true,
arguments = "string",
actions   = function(str)
context(lpeg.match(p_strip, str))
end
}
\stopluacode

\StripNumber{zoológico⁰}

There are more efficient variants but i guess it's good enough.

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] ECMAscript

2021-08-07 Thread Henning Hraban Ramm via ntg-context
Hi Taco (et al.),

for running the ECMAscript part of the CG journal, I cloned the repo from 
https://github.com/ccxvii/mujs/ and executed "make release".
I copied the resulting files to my TeX tree:

ll ~/lmtx/tex/texmf-osx-64/bin/lib/luametatex/mujs/
total 2832
-rw-r--r--  1 hraban  staff   517K  7 Aug 09:49 libmujs.o
-rw-r--r--  1 hraban  staff   9,2K  7 Aug 09:49 main.o
-rwxr-xr-x  1 hraban  staff   413K  7 Aug 09:49 mujs*
-rwxr-xr-x  1 hraban  staff   408K  7 Aug 09:49 mujs-pp*
-rw-r--r--  1 hraban  staff   2,9K  7 Aug 09:49 pp.o

But apparently I need a libmujs.so – how do I make this?

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
___