[NTG-context] Linespacing modified across document

2022-01-22 Thread Alexandre Christe via ntg-context
Dear list,

I've noticed that in my document the linespacing (verified
with \the\baselineskip) is not consistent across the whole document.

In the first section, it's fine (no maths). Later on, it gets increased by
some amount, which tends to depend on what kind of mathematics are in
between, so it's not constant.

Has anyone else noticed this too?

BR
Alex
___
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] Counter names

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

On 1/20/2022 2:24 PM, Joaquín Ataz López via ntg-context wrote:
Good morning to all. I would like to ask where I can find information 
about the name of the different counters that are handled in ConTeXt, in 
order to manipulate them manually.


I guess the number of internal ConTeXt counters will be tremendous. But 
I would like to know what the "most common" counters are called, for 
example the ones that control the different structural units (chapter, 
section...) or the elements of a structured list, etc.


I have tried to apply \incrementcounter or \decrementcounter to some 
counters that also exist in TeX as, for example, chapter, section... but 
I don't get any result.


most counters are 'protected' from messing them up and section related 
counters are kind of grouped anyway and have their own system


other counters, like those for floats are more directly accessible

\starttext

\chapter{test}

\setupheadnumber[chapter][+5]

\placefigure{}{}

\chapter{test}

\placefigure{}{}

\setcounter[figure][4]

\placefigure{}{}

\stoptext

chemical combination endnote figure footnote formula graphic
intermezzo itemgroup:itemize itemgroup:itemize:note linenote
paragraph realpage subpage table textnote:note userpage

otherw will be defined when you create instances

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] Counter names

2022-01-20 Thread Joaquín Ataz López via ntg-context
Good morning to all. I would like to ask where I can find information 
about the name of the different counters that are handled in ConTeXt, in 
order to manipulate them manually.


I guess the number of internal ConTeXt counters will be tremendous. But 
I would like to know what the "most common" counters are called, for 
example the ones that control the different structural units (chapter, 
section...) or the elements of a structured list, etc.


I have tried to apply \incrementcounter or \decrementcounter to some 
counters that also exist in TeX as, for example, chapter, section... but 
I don't get any result.



Thanks in advance for your answers

Joaquín

___
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] (again) diferent prefixsegments for different references

2022-01-16 Thread Pablo Rodriguez via ntg-context
Dear list,

I asked this some time ago
(https://mailman.ntg.nl/pipermail/ntg-context/2021/102394.html).

Using the following sample:

  \starttext
  \definereferenceformat[itsc][in]
  \setupreferencestructureprefix[itsc][default]
[prefixsegments=section]
  \chapter{Chapter}
  \section[b]{Section}
  \itsc[b] and \in[b]
  \stoptext

Is there a way that the prefixsegments for \itsc is only section,
without modifying it for \in?

Many thanks for your 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
___


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
___


Re: [NTG-context] context manuals -- absence of \definefontfamily

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

On 1/4/2022 11:07 PM, Arthur Rosendahl wrote:

On Mon, Jan 03, 2022 at 11:16:46PM +0100, Hans Hagen via ntg-context wrote:

Because Wolfgang has to write a chapter (or a MyWay document) and we're all
mostly volunteers so ...


   Youssef has got a point, though: \definefontfamily should perhaps be
given a tiny bit better treatment on the wiki.  I agree with him that
https://wiki.contextgarden.net/Use_the_fonts_you_want seems like the
best place to mention it, and even think that all of the last section
could be rewritten using \definefontfamily instead of a typescript
definition (which can be moved elsewhere, it obviously doesn’t need to
be deleted from the wiki entirely).  But I wouldn’t like to disturb the
good work that Garulfo did when he overhauled the wiki, hence if you’re
around, Garulfo, perhaps you could comment on that?

a note:

basically we have 3 ways to define a font (collection):

- selectfont: works find when fonts have 'correct' names and come in 
consistent 'sets' (which is not always the case)


- typescripts: for long term stable style usage this is best because one 
uses filenames and can even rename font files then so that updates don't 
clash (typescripts can be in styles or in separate files)


- single font: for specific usage, like special fonts or titling; 
definition by name or file or spec but probably most oiften by file 
(just to be sure); although one can use abstraction by name this methoid 
is not used for collections


mechanisms like fallbacks work for all but may need additional definitions

design siszes can complicate matters but there are no many

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] context manuals -- absence of \definefontfamily

2022-01-04 Thread Arthur Rosendahl via ntg-context
On Mon, Jan 03, 2022 at 11:16:46PM +0100, Hans Hagen via ntg-context wrote:
> Because Wolfgang has to write a chapter (or a MyWay document) and we're all
> mostly volunteers so ...

  Youssef has got a point, though: \definefontfamily should perhaps be
given a tiny bit better treatment on the wiki.  I agree with him that
https://wiki.contextgarden.net/Use_the_fonts_you_want seems like the
best place to mention it, and even think that all of the last section
could be rewritten using \definefontfamily instead of a typescript
definition (which can be moved elsewhere, it obviously doesn’t need to
be deleted from the wiki entirely).  But I wouldn’t like to disturb the
good work that Garulfo did when he overhauled the wiki, hence if you’re
around, Garulfo, perhaps you could comment on that?

Best,

Arthur
___
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-03 Thread Jean-Pierre Delange via ntg-context

Hello dear "critical edition" scholars !

I do remember who was the French geek on reledmac and reledpar (LaTeX) : 
he is Maieul Rouquette (please read this page 
https://github.com/maieul/ledmac).


We (Pablo Rodriguez mainly and I) have tried few years ago to somehow 
follow a possible path within CTX in order to clarify what was possible 
with critical edition, which means : 1) a main text with 2) several 
levels of footnotes showing different version of this text (mainly 
differences or alterations of the main text, mainly in  words 
occurences, specially within Medieval copies of the same text). It may 
be useful to have the original text (say : Ancient Greek or whatever) on 
the left column, with the translation on the right column (say : Latin 
or whatever), and the 'criticus apparatus' in the different level of 
footnotes. This kind of page suppose to have under the hand 
(zuhandenheit or vorhandenheit ?) some tools/commands in order to deal 
with the text extension in the column at right ...


Pablo has proposed a MWE, but since I made previously a mistake among 
files I have send to the list, I am going back with a MWE as attached 
file (I send the *.tex & *.pdf files), produced under mtx-context | 
current version: 2020.01.30 (!).


I hope this may give some help to those who want to clarify how CTX/LMTX 
may be useful in such topic.


JP

Le 03/01/2022 à 10:43, hanneder--- via ntg-context a écrit :


Dear Bruce and Hans,

thanks for you responses and I apologize for the lengthy post, which 
is just to give you an
impression of the current practice in my field (Sanskrit Studies, 
Indology).


For the last two decades edmac and its further developments (now 
reledmac) have become the standard
for critical editions. In my experience the basic requirements for 
typesetting critical editions

were and are:

- footnotes have to be formatted in paragraphs
- multiple footnotes layers stacked below the critical text must be 
possible

- automatic reference to linenumbers
- or: manual references to verse numbers
- language specific requirements (more complicated, see below)

In the last years new requirements have been added:

- some funding institutions in the academic world practically enforce 
online editions

- data have to be made available in TEI xml format

This is where a new (LuaTeX) package called ekdosis, currently being 
developed by Robert Alessi,
comes in. It produces a printed version and in the same TeX run an xml 
file. In an ongoing
editorial project we are using this method and it works very well. 
While the system is ingenious
and a great relief (for we do not have to work with xml directly), I 
am also critical about these
new demands, because they force us to use a fairly complex system for 
sometimes quite simple tasks.
I am a Sanskritist, we do not have huge budgets or a large staff, so 
efficiency is an issue. We
also do not have the resources for the long-term care for data such as 
online editions, but this is

another problem.

In a previous project, a large edition (3 verses, 15 years), I 
tried to use the easiest
method. It turned out that edmac was not even necessary and not using 
it made the main file from
which we are working very readable and greatly simplified daily work. 
Just to give you an
impression from our input file: The first two lines in the next 
paragraph are the Sanskrit text in
transcription, \var produces a variant with reference to the verse 
number and verse quarter
(a-d). So no line numbering was even necessary. The \lem produces the 
sign that divides the
critical text and its witnesses from the variants, usually "]", the 
rest are sigla, like S1, S3

etc.

mumukṣuvyavahāroktimayāt prakaraṇād anu   \danda
athotpattiprakaraṇaṃ mayedaṃ parikathyate  \sloka{1.5}
   \var{5b}{anu \Sseven \Sft \lem \emph{param} \Sone \Sthree \Snine 
\Ntwelve \Ntw}


I used pdflatex and memoir, which has paragraphed footnotes. Here is 
the relevant section from the

preamble:

\renewcommand*{\@makefnmark}{}
\newfootnoteseries{P}
\paragraphfootstyle{P}
\renewcommand{\thefootnoteP}{}
\footmarkstyleP{}
\renewcommand{\@makefnmarkP}{\hskip-2.2pt}
\renewcommand{\footnoterule}{}
\setlength{\stockheight}{6in}
\renewcommand{\linenumberfont}{\normalfont\tiny}
\setlength{\linenumbersep}{0pt}\setlength{\linenumberwidth}{0pt}\modulolinenumbers[2] 


\setlength{\footmarkwidth}{0em}
\setlength{\footmarksep}{-\footmarkwidth}
\addtolength{\skip\footins}{2mm plus 1mm}
\leftskip=.2cm    % indent of the verses
\def\var#1#2{\footnoteP{#1 #2}}  % footnotes


This is what I compiled from different examples (I am not a 
programmer), but it worked -- the

edition has produced quite a few volumes and is almost finished!

Working with this file was easy, because one could easily read the 
text.  The usual edmac code
would have required us to identify an lemma with \edtext and then 
write the variant directly into
the text. This may not matter in 

Re: [NTG-context] Critical Editions?

2022-01-03 Thread Jean-Pierre Delange via ntg-context
I remember some discussions years ago with Pablo Rodriguez on this topic, and I 
have some previous discussions with a reledmac LaTeX French expert, about 
critical edition in the Medieval and/or Latin/Ancient Greek studies … Maybe 
Pablo has preserved some CTX samples ? I need to dig in my ‘archeological’ 
ConTeXt MWE ! But here is what would be clever to achieve with Context/Luame

ConTeXt_FootNote-CriticusApparatus_2Columns_Pablo-Hans-03.tex
Description: Binary data


LaTeX-reledmac_footnote_spacing.pdf
Description: Adobe PDF document
tatex (see attached files)

> Le 3 janv. 2022 à 10:43, hanneder--- via ntg-context  a 
> écrit :
> 
> 
> Dear Bruce and Hans,
> 
> thanks for you responses and I apologize for the lengthy post, which is just 
> to give you an
> impression of the current practice in my field (Sanskrit Studies, Indology).
> 
> For the last two decades edmac and its further developments (now reledmac) 
> have become the standard
> for critical editions. In my experience the basic requirements for 
> typesetting critical editions
> were and are:
> 
> - footnotes have to be formatted in paragraphs
> - multiple footnotes layers stacked below the critical text must be possible
> - automatic reference to linenumbers
> - or: manual references to verse numbers
> - language specific requirements (more complicated, see below)
> 
> In the last years new requirements have been added:
> 
> - some funding institutions in the academic world practically enforce online 
> editions
> - data have to be made available in TEI xml format
> 
> This is where a new (LuaTeX) package called ekdosis, currently being 
> developed by Robert Alessi,
> comes in. It produces a printed version and in the same TeX run an xml file. 
> In an ongoing
> editorial project we are using this method and it works very well. While the 
> system is ingenious
> and a great relief (for we do not have to work with xml directly), I am also 
> critical about these
> new demands, because they force us to use a fairly complex system for 
> sometimes quite simple tasks.
> I am a Sanskritist, we do not have huge budgets or a large staff, so 
> efficiency is an issue. We
> also do not have the resources for the long-term care for data such as online 
> editions, but this is
> another problem.
> 
> In a previous project, a large edition (3 verses, 15 years), I tried to 
> use the easiest
> method. It turned out that edmac was not even necessary and not using it made 
> the main file from
> which we are working very readable and greatly simplified daily work. Just to 
> give you an
> impression from our input file: The first two lines in the next paragraph are 
> the Sanskrit text in
> transcription, \var produces a variant with reference to the verse number and 
> verse quarter
> (a-d). So no line numbering was even necessary. The \lem produces the sign 
> that divides the
> critical text and its witnesses from the variants, usually "]", the rest are 
> sigla, like S1, S3
> etc.
> 
> mumukṣuvyavahāroktimayāt prakaraṇād anu   \danda
> athotpattiprakaraṇaṃ mayedaṃ parikathyate  \sloka{1.5}
>   \var{5b}{anu \Sseven \Sft \lem \emph{param} \Sone \Sthree \Snine \Ntwelve 
> \Ntw}
> 
> I used pdflatex and memoir, which has paragraphed footnotes. Here is the 
> relevant section from the
> preamble:
> 
> \renewcommand*{\@makefnmark}{}
> \newfootnoteseries{P}
> \paragraphfootstyle{P}
> \renewcommand{\thefootnoteP}{}
> \footmarkstyleP{}
> \renewcommand{\@makefnmarkP}{\hskip-2.2pt}
> \renewcommand{\footnoterule}{}
> \setlength{\stockheight}{6in}
> \renewcommand{\linenumberfont}{\normalfont\tiny}
> \setlength{\linenumbersep}{0pt}\setlength{\linenumberwidth}{0pt}\modulolinenumbers[2]
> \setlength{\footmarkwidth}{0em}
> \setlength{\footmarksep}{-\footmarkwidth}
> \addtolength{\skip\footins}{2mm plus 1mm}
> \leftskip=.2cm% indent of the verses
> \def\var#1#2{\footnoteP{#1 #2}}  % footnotes
> 
> 
> This is what I compiled from different examples (I am not a programmer), but 
> it worked -- the
> edition has produced quite a few volumes and is almost finished!
> 
> Working with this file was easy, because one could easily read the text.  The 
> usual edmac code
> would have required us to identify an lemma with \edtext and then write the 
> variant directly into
> the text. This may not matter in the case of few variants, but with many 
> variants the text is
> quickly rendered unreadable -- even with all tricks to make footnotes 
> invisible (I use folding in
> emacs). The following would be a single example verse (32 syllables, same 
> size as the one quoted
> above), encoded in ekdosis and with lots of manuscripts:
> 
> \begin{tlg}[h

Re: [NTG-context] Critical Editions?

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


Dear Bruce and Hans,

thanks for you responses and I apologize for the lengthy post, which  
is just to give you an

impression of the current practice in my field (Sanskrit Studies, Indology).

For the last two decades edmac and its further developments (now  
reledmac) have become the standard
for critical editions. In my experience the basic requirements for  
typesetting critical editions

were and are:

- footnotes have to be formatted in paragraphs
- multiple footnotes layers stacked below the critical text must be possible
- automatic reference to linenumbers
- or: manual references to verse numbers
- language specific requirements (more complicated, see below)

In the last years new requirements have been added:

- some funding institutions in the academic world practically enforce  
online editions

- data have to be made available in TEI xml format

This is where a new (LuaTeX) package called ekdosis, currently being  
developed by Robert Alessi,
comes in. It produces a printed version and in the same TeX run an xml  
file. In an ongoing
editorial project we are using this method and it works very well.  
While the system is ingenious
and a great relief (for we do not have to work with xml directly), I  
am also critical about these
new demands, because they force us to use a fairly complex system for  
sometimes quite simple tasks.
I am a Sanskritist, we do not have huge budgets or a large staff, so  
efficiency is an issue. We
also do not have the resources for the long-term care for data such as  
online editions, but this is

another problem.

In a previous project, a large edition (3 verses, 15 years), I  
tried to use the easiest
method. It turned out that edmac was not even necessary and not using  
it made the main file from
which we are working very readable and greatly simplified daily work.  
Just to give you an
impression from our input file: The first two lines in the next  
paragraph are the Sanskrit text in
transcription, \var produces a variant with reference to the verse  
number and verse quarter
(a-d). So no line numbering was even necessary. The \lem produces the  
sign that divides the
critical text and its witnesses from the variants, usually "]", the  
rest are sigla, like S1, S3

etc.

mumukṣuvyavahāroktimayāt prakaraṇād anu   \danda
athotpattiprakaraṇaṃ mayedaṃ parikathyate  \sloka{1.5}
   \var{5b}{anu \Sseven \Sft \lem \emph{param} \Sone \Sthree \Snine  
\Ntwelve \Ntw}


I used pdflatex and memoir, which has paragraphed footnotes. Here is  
the relevant section from the

preamble:

\renewcommand*{\@makefnmark}{}
\newfootnoteseries{P}
\paragraphfootstyle{P}
\renewcommand{\thefootnoteP}{}
\footmarkstyleP{}
\renewcommand{\@makefnmarkP}{\hskip-2.2pt}
\renewcommand{\footnoterule}{}
\setlength{\stockheight}{6in}
\renewcommand{\linenumberfont}{\normalfont\tiny}
\setlength{\linenumbersep}{0pt}\setlength{\linenumberwidth}{0pt}\modulolinenumbers[2]
\setlength{\footmarkwidth}{0em}
\setlength{\footmarksep}{-\footmarkwidth}
\addtolength{\skip\footins}{2mm plus 1mm}
\leftskip=.2cm% indent of the verses
\def\var#1#2{\footnoteP{#1 #2}}  % footnotes


This is what I compiled from different examples (I am not a  
programmer), but it worked -- the

edition has produced quite a few volumes and is almost finished!

Working with this file was easy, because one could easily read the  
text.  The usual edmac code
would have required us to identify an lemma with \edtext and then  
write the variant directly into
the text. This may not matter in the case of few variants, but with  
many variants the text is
quickly rendered unreadable -- even with all tricks to make footnotes  
invisible (I use folding in
emacs). The following would be a single example verse (32 syllables,  
same size as the one quoted

above), encoded in ekdosis and with lots of manuscripts:

\begin{tlg}[hp16][]
\tl{
\app{\lem[wit={ceteri}]{manthāna}
 \rdg[type=stemmaerror,wit={B2}]{\unm śrīmanthāna} % stemma error
 \rdg[wit={C4,L1,N5}]{manthāra}
 \rdg[wit={N13,Tü,V1,V22,Vu}]{manthāno\skp{-}}
 \rdg[wit={J2}]{mandāra}}%
\app{\lem[wit={ceteri}]{bhairavo}
 \rdg[wit={N20}]{mairavo}
 \rdg[wit={N23}]{bhairavā}
 \rdg[wit={V26}]{bhaivarau}}
\app{\lem[wit={ceteri}]{yogī}
 \rdg[wit={J2}]{jogī}
 \rdg[wit={C1}]{siddha}
 \rdg[wit={V5}]{siddhe}
 \rdg[wit={J15,V8}]{yogi}}
\app{\lem[wit={ceteri}]{siddha}
  
\rdg[type=stemmapoint,wit={B1,B3,C2,C3,C4pc,C6,N1,J10,J13,J17,N6,N10,N13,N17,Tü,V4,V11,V22,V26}]{śuddha} %stemma  
point

 \rdg[wit={J15}]{śruddha}
 \rdg[wit={B2,N19,V6}]{siddho\skp{-}}
 \rdg[wit={C1,V5}]{yogī} %s
 \rdg[wit={V1}]{suddha}
 \rdg[wit={J1,J3,J14,N2,N16}]{siddhi}
 \rdg[wit={J2}]{sandhi}
 \rdg[wit={N20}]{viddha}
 \rdg[wit={N22}]{sidha}
 \rdg[wit={N24}]{siddhar\skp{-}}
 \rdg[wit={V8}]{suddho}}\app{\lem[wit={ceteri},alt={buddhaś  
ca}]{buddha\skp{ś-ca}}

 \rdg[wit={J2}]{tudhiś ca}
 \rdg[wit={C7}]{pādaś ca}
 

Re: [NTG-context] \thanks inside author in section

2022-01-01 Thread Youssef Cherem via ntg-context
Wolfgang,

Thank you! Removing the auxiliary file solved the problem.

lør. 1. jan. 2022 kl. 09:32 skrev Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com>:

> Youssef Cherem via ntg-context schrieb am 01.01.2022 um 13:10:
> > I've tried to implement a journal-like footnote with the authors'
> > affiliation for each section/chapter, by adapting things from the wiki
> > (https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and
> > https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that
> > bugs me is that any note name I choose other than "thanks" does not
> > work, and I have no clue why. Am I missing something, or is there a more
> > elegant way to implement this?
> >
> > As an aside, I'd rather have the footnotes below the "thanks" notes. Is
> > there any option that does this?
> >
> > [...]
>
> Do you have a example where anything besides \thanks fails. I changed
> \thanks to another commands in the example below and there was no
> problem to do so. The only thing you *have* to do when you change the
> command is to remove the auxiliary file (context --purge) because the
> old (non existing) command is otherwise used in the next run which
> results then in an error message.
>
> \setuplist
>[section]
>[textcommand=\SectionTocEntry,
>   after=\blank]
>
> \define[1]\SectionTocEntry
>{\doifsomething{\rawstructurelistuservariable{author}}
>   {{\it\structurelistuservariable{author}} --\crlf}%
> #1%
> \doifsomething{\rawstructurelistuservariable{subtitle}}
>   {\crlf\structurelistuservariable{subtitle}}}
>
> \setuphead
>[section]
>[ after=\directsetup{section},
>  align=center,
> number=no,
>  style=bold]
>
> \startsetups [section]
>  \blank
>  \midaligned{\it\structureuservariable{author}}
>  \blank
> \stopsetups
>
> \setuphead
>[subject]
>[align=flushleft,
> style=\bfb]
>
> \definenote[someothername]
>
> \setupnote
>[someothername]
>[rule=off]
>
> \setupnotation
>[someothername]
>[numberconversion=set 2]
>
> \setupnotation
>[alternative=left,
>hang=fit,
>   indenting={yes,small},
>  indentnext=yes]
>
> \setupinteraction
>[state=start,
> color=,
> contrastcolor=]
>
> \starttext
>
> \subject{Grande lista de autores}
>
> \placecontent[alternative=c]
>
> \startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to
> say}]
> This is a section.
> \stopsection
>
> \startsection[title={Segunda seção}][author={Fulano de
> Tal},subtitle={Uma segunda seção de teste}]
> This is a section.
> \stopsection
>
> \startsection[title={Terceira seção}][author={Alberto de
> Paiva\someothername{asdf}},subtitle={Uma terceira seção de teste}]
> This is a section.
> \stopsection
>
> \startsection[title={Três autores}][author={Sicrano de
> Tal\someothername{Universidade de Tangerinas} e Alberto
> Steinenberg\someothername{Universidade de Nilfgaard}},
> subtitle={Uma seção de teste com dois autores e comentário}]
> This is a section.\footnote{Só de teste.}
> \stopsection
>
> \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] \thanks inside author in section

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

Youssef Cherem via ntg-context schrieb am 01.01.2022 um 13:10:
I've tried to implement a journal-like footnote with the authors' 
affiliation for each section/chapter, by adapting things from the wiki 
(https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and 
https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that 
bugs me is that any note name I choose other than "thanks" does not 
work, and I have no clue why. Am I missing something, or is there a more 
elegant way to implement this?


As an aside, I'd rather have the footnotes below the "thanks" notes. Is 
there any option that does this?


[...]


Do you have a example where anything besides \thanks fails. I changed 
\thanks to another commands in the example below and there was no 
problem to do so. The only thing you *have* to do when you change the 
command is to remove the auxiliary file (context --purge) because the 
old (non existing) command is otherwise used in the next run which 
results then in an error message.


\setuplist
  [section]
  [textcommand=\SectionTocEntry,
 after=\blank]

\define[1]\SectionTocEntry
  {\doifsomething{\rawstructurelistuservariable{author}}
 {{\it\structurelistuservariable{author}} --\crlf}%
   #1%
   \doifsomething{\rawstructurelistuservariable{subtitle}}
 {\crlf\structurelistuservariable{subtitle}}}

\setuphead
  [section]
  [ after=\directsetup{section},
align=center,
   number=no,
style=bold]

\startsetups [section]
\blank
\midaligned{\it\structureuservariable{author}}
\blank
\stopsetups

\setuphead
  [subject]
  [align=flushleft,
   style=\bfb]

\definenote[someothername]

\setupnote
  [someothername]
  [rule=off]

\setupnotation
  [someothername]
  [numberconversion=set 2]

\setupnotation
  [alternative=left,
  hang=fit,
 indenting={yes,small},
indentnext=yes]

\setupinteraction
  [state=start,
   color=,
   contrastcolor=]

\starttext

\subject{Grande lista de autores}

\placecontent[alternative=c]

\startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to 
say}]

This is a section.
\stopsection

\startsection[title={Segunda seção}][author={Fulano de 
Tal},subtitle={Uma segunda seção de teste}]

This is a section.
\stopsection

\startsection[title={Terceira seção}][author={Alberto de 
Paiva\someothername{asdf}},subtitle={Uma terceira seção de teste}]

This is a section.
\stopsection

\startsection[title={Três autores}][author={Sicrano de 
Tal\someothername{Universidade de Tangerinas} e Alberto 
Steinenberg\someothername{Universidade de Nilfgaard}},

subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}
\stopsection

\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] \thanks inside author in section

2022-01-01 Thread Youssef Cherem via ntg-context
I've tried to implement a journal-like footnote with the authors'
affiliation for each section/chapter, by adapting things from the wiki (
https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and
https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that bugs
me is that any note name I choose other than "thanks" does not work, and I
have no clue why. Am I missing something, or is there a more elegant way to
implement this?

As an aside, I'd rather have the footnotes below the "thanks" notes. Is
there any option that does this?

\setuplist[section][
 textcommand=\SectionTocEntry,
 after=\blank,
]

\define[1]\SectionTocEntry{%
 \doifnot{\rawstructurelistuservariable{author}}{}
{\start \it  \structurelistuservariable{author}\stop\space-- \crlf}%
 #1% title
 \doifnot{\rawstructurelistuservariable{subtitle}}{}
{\crlf\structurelistuservariable{subtitle}}}

\setuphead[section][
 after=\setup{section},
 align=center,
 number=no,
 style=\bold
]

\startsetups section
 \blank
 \midaligned{\it \structureuservariable{author}}
 \blank
\stopsetups

%\foonote{\structureuservariable{affiliation}}

%only "thanks" seems to work.
\definenote[thanks]%[numberconversion=set 2]
\setupnote[thanks][rule=off]
\setupnotation[thanks][numberconversion=set 2] % or set 1

%\setupnote[footnote][location=bottom] % does not work

%% all notes, footnotes etc.
\setupnotation[
 alternative={left,bottom},
 hang=fit, % if commented, hanging is larger
 indenting={yes,small},indentnext=yes, % please, indent everything, should
be default
]

\setupinteraction[state=start,color=black,contrastcolor=black]

\setuphead[subject][align=flushleft,style=\bfb]

\starttext

\subject{Grande lista de autores}

\placecontent[alternative=c]

\startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to
say}]
This is a section.
\stopsection

\startsection[title={Segunda seção}][author={Fulano de Tal},subtitle={Uma
segunda seção de teste}]
This is a section.
\stopsection

\startsection[title={Terceira seção}][author={Alberto de
Paiva\thanks{asdf}},subtitle={Uma terceira seção de teste}]
This is a section.
\stopsection

\startsection[title={Três autores}][author={Sicrano de
Tal\thanks{Universidade de Tangerinas} e Alberto
Steinenberg\thanks{Universidade de Nilfgaard}},
subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}
\stopsection

\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] footnotes not aligned if tabulate cell is centered.

2021-12-31 Thread Wolfgang Schuster via ntg-context

Ajith R via ntg-context schrieb am 31.12.2021 um 14:04:

Hi,
I am trying to prepare a moderate sized document in Malayalam using
Context. Overall I have been successful. However, there are a few rough
edges for which I need help. This is the seventh (and the last one for
now) problem I face.

When I use local footnotes within a tabulate section, the foot notes
gets placed unevenly. If I remove the "c" from
\starttabulate[|p(3cm)c|p|], then the footnotes are aligned. Is it a
bug? If not, how can I correct it?


1. Provide the correct number of columns in your table because in the 
preamble you specify two columns but each row in your table contains 
only a single row.


2. Drop the \JustLeft command which works only with the \starttable 
environment.


3. To change the alignment for the footnote entries add \raggedright 
before you flush them, e.g.


    \NC \raggedright \placelocalfootnotes \NC\NR

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] footnotes not aligned if tabulate cell is centered.

2021-12-31 Thread Ajith R via ntg-context
Hi,
I am trying to prepare a moderate sized document in Malayalam using
Context. Overall I have been successful. However, there are a few rough
edges for which I need help. This is the seventh (and the last one for
now) problem I face.

When I use local footnotes within a tabulate section, the foot notes
gets placed unevenly. If I remove the "c" from
\starttabulate[|p(3cm)c|p|], then the footnotes are aligned. Is it a
bug? If not, how can I correct it? 

\starttext \startlocalfootnotes
\starttabulate[|p(10cm)c|p|]

\NC  [f]\footnote[f]{first foot note} first sentence\NC \NR 
\NC [s]\footnote[f]{second foot note} second sentence\NC \NR 


\NC \JustLeft{\placelocalfootnotes} \NC\FR
\stoptabulate
\stoplocalfootnotes
\stoptext

Thanks,
ajith
___
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] \thanks inside author in section

2021-12-29 Thread Youssef Cherem via ntg-context
I've tried to implement a journal-like footnote with the authors'
affiliation for each section/chapter, by adapting things from the wiki here
<https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC> and here
<https://wiki.contextgarden.net/LaTeX_Thanks>. However, one thing that bugs
me is that any note name I choose other than "thanks" does not work, and I
have no clue why. Am I missing something, or is there a more elegant way to
implement this?

As an aside, I'd rather have the footnotes below the "thanks" notes. Is
there any option that does this?

\setuplist[section][
 textcommand=\SectionTocEntry,
 after=\blank,
]
\define[1]\SectionTocEntry{%
 \doifnot{\rawstructurelistuservariable{author}}{}
{\start \it  \structurelistuservariable{author}\stop\space-- \crlf}%
 #1% title
 \doifnot{\rawstructurelistuservariable{subtitle}}{}
{\crlf\structurelistuservariable{subtitle}}}
\setuphead[section][
 after=\setup{section},
 align=center,
 number=no,
 style=\bold
]
\startsetups section
 \blank
 \midaligned{\it \structureuservariable{author}}
 \blank\stopsetups
%\foonote{\structureuservariable{affiliation}}
\definenote[thanks]%[numberconversion=set
2]\setupnote[thanks][rule=off]\setupnotation[thanks][numberconversion=set
2] % or set 1
%\setupnote[footnote][location=bottom] % does not work
%% all notes, footnotes etc.\setupnotation[
 alternative={left,bottom},
 hang=fit, % if commented, hanging is larger
 indenting={yes,small},indentnext=yes, % please, indent everything,
should be default
]
\setupinteraction[state=start,color=black,contrastcolor=black]
\setuphead[subject][align=flushleft,style=\bfb]
\starttext
\subject{Grande lista de autores}
\placecontent[alternative=c]
  \startsection[title={Whatever}][author={A. Uthor},subtitle={I’d
like to say}]
This is a section.\stopsection
\startsection[title={Segunda seção}][author={Fulano de
Tal},subtitle={Uma segunda seção de teste}]
This is a section.\stopsection
\startsection[title={Terceira seção}][author={Alberto de
Paiva\thanks{asdf}},subtitle={Uma terceira seção de teste}]
This is a section.\stopsection
\startsection[title={Três autores}][author={Sicrano de
Tal\thanks{Universidade de Tangerinas} e Alberto
Steinenberg\thanks{Universidade de Nilfgaard}},
subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}\stopsection
\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] Contextual removal of some ligatures using fonts.handlers.otf.addfeature (LuaTeX 1.13.2)

2021-12-25 Thread Thomas Savary via ntg-context
Hi Bruce and Hans !

Thank you very much for your answers, that helped me a lot.

In fact, though I would love to switch to ConTeXt one day, I am still using 
LuaLaTeX — I am a slow 
learner and I know it will take me months to be able to achieve what I need for 
my job with 
ConTeXt and can do with LuaLaTeX and the Memoir class for the time being 
(despite sometimes 
being irritated by LaTeX limitations or oddities).

I need the EB Garamond variable font for future jobs, but this font, provided 
by Google Fonts, is 
such a mess : kerning problems, unusable OpenType features that have to be 
rewritten from 
scratch, shifts in glyphs table… For sure, the original font by Georg Duffner 
was much better, but I 
need the variable version. Lots of fixing necessary, but thanks to 
fonts.handlers.otf.addfeature I 
have almost succeeded to make it a usable Garamond.

Of course, it would be best to help Google improving this font, but I don’t 
have time yet.

The actual problem was with the italic ligatures "a_s", "e_s", "é_s", "i_s" and 
"u_s", that should occur 
only at the end of words and not everywhere. Instead of removing the unwanted 
ligatures, I chose 
another way as soon as I understood how to fully use “current” to describe not 
only a single glyph, 
but a string if necessary — for instance, current={ { "a", "e", "eacute", "i", 
"u"}, {"s"} }

Thanks for this wonderful tool !

Thomas Savary
1 le Grand-Plessis
F-85340 L’Île-d’Olonne
Tél. 06 22 82 61 34
https://compo85.fr/
Le samedi 25 décembre 2021, 00:04:51 CET Bruce Horrocks a écrit :
> > On 24 Dec 2021, at 18:34, Thomas Savary via ntg-context
> >  wrote:
> > 
> > Hello, dear list !
> > 
> > In order to fix a few bugs in some OpenType features included in EB
> > Garamond font provided by Google Fonts, I am trying to remove some
> > ligatures (erroneous in some contexts) with
> > fonts.handlers.otf.addfeature.
> > 
> > I must be missing something, because I can't get it to work.
> > 
> > Here is a minimal —non working—example :-)
> > (The attempted removal (“f_i” → “fi” only before “o”) is of course
> > irrelevant. I chose it just for the sole purpose of this test, to
> > provide a simple example. What I am trying to achieve is more
> > complex, with other ligatures.)
> > 
> > fonts.handlers.otf.addfeature{
> > 
> > name = "unfio",
> > type = "chainsubstitution",
> > lookups = {
> > 
> > { type = "multiple",
> > data = { [ "f_i" ] = { "f", "i" } }
> > }
> > 
> > }
> > rules = {
> > 
> > { after = { { "o" } },
> > current = { { "f_i" } },
> > lookups = { 1 } }
> > 
> > }
> > 
> > }
> > 
> > }
> > 
> > Could someone please explain to me what I did wrong ?
> 
> Firstly, you have an extra } in the example above.
> 
> Secondly, rules need to come inside a data section. Thus (untested):
> 
> fonts.handlers.otf.addfeature{
> name = "unfio",
> type = "chainsubstitution",
> lookups = {
> {
> type = "substitution",
> data = {
> [ "f_i" ] = { "f", "i" }
> }
> }
> },
> data = {
> rules = {
> {
> after = { { "o" } },___
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] upload

2021-12-25 Thread Hans Hagen via ntg-context

On 12/25/2021 12:22 PM, Marco Patzer via ntg-context wrote:

On Sat, 25 Dec 2021 11:55:31 +0100
Hans Hagen  wrote:


  >mtxrun --autogenerate --script context --autopdf "oeps.tex"



mkiv lua stats  > runtime: 0.485 seconds, 1 processed pages, 1
shipped pages, 2.062 pages/second
mtx-context | fatal error: return code: 1

so ... an error ... that's the most i can do


I did some more checking. It seems to return 1 on *some* errors, but
not on all the ones supported by --errors. This example e.g.
compiles with return code 0:

%% enables logging of errors
\enabledirectives [logs.errors]

%% missing font
\definefontfamily [foo] [serif] [no font here really]
\setupbodyfont [foo]

\starttext
   %% missing characters
   풜

   %% missing figure
   \externalfigure [foo]

   %% missing references
   See \in{section}[sec:none].
\stoptext
because these are not errors in the sense of 'quit' ... for instance 
missing references can be resolved in a second run


you need to be explicit:

\enabledirectives [logs.errors={missing references,missing characters}]


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] Contextual removal of some ligatures using fonts.handlers.otf.addfeature (LuaTeX 1.13.2)

2021-12-25 Thread Hans Hagen via ntg-context

On 12/25/2021 12:04 AM, Bruce Horrocks via ntg-context wrote:




On 24 Dec 2021, at 18:34, Thomas Savary via ntg-context  
wrote:

Hello, dear list !

In order to fix a few bugs in some OpenType features included in EB Garamond 
font provided by Google Fonts, I am trying to remove some ligatures (erroneous 
in some contexts) with fonts.handlers.otf.addfeature.

I must be missing something, because I can't get it to work.

Here is a minimal —non working—example :-)
(The attempted removal (“f_i” → “fi” only before “o”) is of course irrelevant. 
I chose it just for the sole purpose of this test, to provide a simple example. 
What I am trying to achieve is more complex, with other ligatures.)

fonts.handlers.otf.addfeature{
 name = "unfio",
 type = "chainsubstitution",
 lookups = {
 { type = "multiple",
 data = { [ "f_i" ] = { "f", "i" } }
 }
 }
 rules = {
 { after = { { "o" } },
 current = { { "f_i" } },
 lookups = { 1 } }
 }
 }
}

Could someone please explain to me what I did wrong ?


Firstly, you have an extra } in the example above.

Secondly, rules need to come inside a data section. Thus (untested):

fonts.handlers.otf.addfeature{
 name = "unfio",
 type = "chainsubstitution",
 lookups = {
 {
 type = "substitution",
 data = {
 [ "f_i" ] = { "f", "i" }
 }
 }
 },
 data = {
 rules = {
 {
 after = { { "o" } },
 current = { { "f_i" } },
 lookups = { 1 }
 }
 }
 }
}

A better an dmore reliable approach is this:

\startluacode
local demo = {
name= "demo",
options = {
{
patterns = {
fio  = "f|io",
},
words = [[ fioot fiots ]],
},
},
}
table.save("oeps-fixes.llg",demo)
\stopluacode

\setuplanguage[en][goodies={oeps-fixes.llg}]

\setupbodyfont[ebgaramond]

\starttext
fiets fiots fiats fioot
\stoptext

because you want to block certain ligatures but keep kerning etc (see 
older posts for more extensive examples)


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

2021-12-25 Thread Marco Patzer via ntg-context
On Sat, 25 Dec 2021 11:55:31 +0100
Hans Hagen  wrote:

>  >mtxrun --autogenerate --script context --autopdf "oeps.tex"  
> 
> 
> 
> mkiv lua stats  > runtime: 0.485 seconds, 1 processed pages, 1
> shipped pages, 2.062 pages/second
> mtx-context | fatal error: return code: 1
> 
> so ... an error ... that's the most i can do

I did some more checking. It seems to return 1 on *some* errors, but
not on all the ones supported by --errors. This example e.g.
compiles with return code 0:

%% enables logging of errors
\enabledirectives [logs.errors]

%% missing font
\definefontfamily [foo] [serif] [no font here really]
\setupbodyfont [foo]

\starttext
  %% missing characters
  풜

  %% missing figure
  \externalfigure [foo]

  %% missing references
  See \in{section}[sec:none].
\stoptext

Marco
___
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] Contextual removal of some ligatures using fonts.handlers.otf.addfeature (LuaTeX 1.13.2)

2021-12-25 Thread Hans Hagen via ntg-context

On 12/25/2021 12:04 AM, Bruce Horrocks via ntg-context wrote:




On 24 Dec 2021, at 18:34, Thomas Savary via ntg-context  
wrote:

Hello, dear list !

In order to fix a few bugs in some OpenType features included in EB Garamond 
font provided by Google Fonts, I am trying to remove some ligatures (erroneous 
in some contexts) with fonts.handlers.otf.addfeature.

I must be missing something, because I can't get it to work.

Here is a minimal —non working—example :-)
(The attempted removal (“f_i” → “fi” only before “o”) is of course irrelevant. 
I chose it just for the sole purpose of this test, to provide a simple example. 
What I am trying to achieve is more complex, with other ligatures.)

fonts.handlers.otf.addfeature{
 name = "unfio",
 type = "chainsubstitution",
 lookups = {
 { type = "multiple",
 data = { [ "f_i" ] = { "f", "i" } }
 }
 }
 rules = {
 { after = { { "o" } },
 current = { { "f_i" } },
 lookups = { 1 } }
 }
 }
}

Could someone please explain to me what I did wrong ?


Firstly, you have an extra } in the example above.

Secondly, rules need to come inside a data section. Thus (untested):

fonts.handlers.otf.addfeature{
 name = "unfio",
 type = "chainsubstitution",
 lookups = {
 {
 type = "substitution",
 data = {
 [ "f_i" ] = { "f", "i" }
 }
 }
 },
 data = {
 rules = {
 {
 after = { { "o" } },
 current = { { "f_i" } },
 lookups = { 1 }
 }
 }
 }
}
the problem with this approach is that in a feature rich font like eb 
you never know where to kick this into the sequence and you even don't 
know how many variants of fi ligatures are there


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

2021-12-25 Thread Marco Patzer via ntg-context
On Fri, 24 Dec 2021 19:45:05 +0100
Hans Hagen via ntg-context  wrote:

> When wrapping up before the weekend I uploaded a new lmtx (bottom
> floats fixed afaiks

If you mean the issue I posted on 2021-11-30, then no. It still
throws an error here on my end.

> exit codes more reliable

The example I posted on 2021-12-15 still returns success when it
should fail. So regarding the exit codes I see no change here.

> side float coming loose from section head issue solved; ...).

That's fixed indeed. Thanks for looking into that.

Marco

LMTX 2021.12.25 00:55
___
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 table of contents depth by number rather than by list

2021-12-24 Thread Hans Hagen via ntg-context

On 12/24/2021 5:45 PM, Jason Ross via ntg-context wrote:

Dear list,

Is it possible to set the maximum table of contents depth to a number 
rather than providing an explicit list of section names?



Background:

I am developing an exporter for Org mode. In Org, users can specify the 
number of levels they want in the table of contents with a number. I 
currently do this by having the sectioning commands be known to the 
exporter so I can generate a command like

     \setupcombinedlist
   [content]
   [list={section,subsection}]
for n=2.

I'm considering using  \start/stopsectionlevel for sectioning commands 
instead. That way, users could add \definesectionlevels to the document 
preamble to use whatever sectioning scheme they wanted. However, this 
would mean that the exporter wouldn't know what sectioning commands to 
use the TOC setup.
given the amount of reactions i added a simple levels feature ... the 
best i can do for now is:


\placelist[chapter,section,subsection][levels=2]

keep in mind that all should work with the already present selective 
placement and filtering (criterium)


uploaded

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

2021-12-24 Thread Rik Kabel via ntg-context

Same with W64 on W11.

On 2021-12-24 17:08, Jairo A. del Rio via ntg-context wrote:

Hi, Hans. In Ubuntu 20.04:

resolvers       > lua > loading file 
'/home/coragyps/lmtx/tex/texmf-context/tex/context/base/mkxl/node-cmp.lmt' 
succeeded


fatal error: storage cannot be marked

Jairo


El vie, 24 dic 2021 a la(s) 13:45, Hans Hagen via ntg-context 
(ntg-context@ntg.nl) escribió:


Hi,

When wrapping up before the weekend I uploaded a new lmtx (bottom
floats
fixed afaiks, but hat mechanism might see some improvements anyway
next
year; exit codes more reliable; some low level tracing; side float
coming loose from section head issue solved; ...).

I'm experimenting with some more efficient low level state info
and in
the process ran into an issue / interference with (also low level)
attributes. I'm not sure if I solved it (work in progress, i need
to run
into another border case first which may take ages) but the test
suite
runs ok so ...

Hans

-
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl
<http://www.pragma-ade.nl> | www.pragma-pod.nl
<http://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
__
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 table of contents depth by number rather than by list

2021-12-24 Thread Bruce Horrocks via ntg-context


> On 24 Dec 2021, at 16:45, Jason Ross via ntg-context  
> wrote:
> 
> Dear list,
> 
> Is it possible to set the maximum table of contents depth to a number rather 
> than providing an explicit list of section names?
> 
> 
> Background:
> 
> I am developing an exporter for Org mode. In Org, users can specify the 
> number of levels they want in the table of contents with a number. I 
> currently do this by having the sectioning commands be known to the exporter 
> so I can generate a command like
>\setupcombinedlist
>  [content]
>  [list={section,subsection}]
> for n=2.
> 
> I'm considering using  \start/stopsectionlevel for sectioning commands 
> instead. That way, users could add \definesectionlevels to the document 
> preamble to use whatever sectioning scheme they wanted. However, this would 
> mean that the exporter wouldn't know what sectioning commands to use the TOC 
> setup.

Can you not specify a full list of sections in your exporter code and then 
truncate that list to the appropriate value of n before generating the ConTeXt 
source from the truncated list?

Assuming you are using an Emacs macro to do the export then the following code 
will return the first 2 from the list of section types:

(let ((list '("part" "chapter" "section" "subsection" "subsubsection" 
"subsubsubsection" "subsubsubsubsection")))
  (butlast list (- (length list) 2)))

I stole that from StackOverflow so I'll leave it to you work out how to get 
your depth variable substituted for the 2. :-)

Note that you probably don't want "part" but I include it for completeness. 
Best to start with "chapter".
—
Bruce Horrocks
Hampshire, UK

___
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] Contextual removal of some ligatures using fonts.handlers.otf.addfeature (LuaTeX 1.13.2)

2021-12-24 Thread Bruce Horrocks via ntg-context


> On 24 Dec 2021, at 18:34, Thomas Savary via ntg-context  
> wrote:
> 
> Hello, dear list !
> 
> In order to fix a few bugs in some OpenType features included in EB Garamond 
> font provided by Google Fonts, I am trying to remove some ligatures 
> (erroneous in some contexts) with fonts.handlers.otf.addfeature.
> 
> I must be missing something, because I can't get it to work.
> 
> Here is a minimal —non working—example :-)
> (The attempted removal (“f_i” → “fi” only before “o”) is of course 
> irrelevant. I chose it just for the sole purpose of this test, to provide a 
> simple example. What I am trying to achieve is more complex, with other 
> ligatures.)
> 
> fonts.handlers.otf.addfeature{
> name = "unfio",
> type = "chainsubstitution",
> lookups = {
> { type = "multiple",
> data = { [ "f_i" ] = { "f", "i" } }
> }
> }
> rules = {
> { after = { { "o" } },
> current = { { "f_i" } },
> lookups = { 1 } }
> }
> }
> }
> 
> Could someone please explain to me what I did wrong ?

Firstly, you have an extra } in the example above.

Secondly, rules need to come inside a data section. Thus (untested):

fonts.handlers.otf.addfeature{
name = "unfio",
type = "chainsubstitution",
lookups = {
{
type = "substitution",
data = {
[ "f_i" ] = { "f", "i" }
}
}
},
data = {
rules = {
{
after = { { "o" } },
current = { { "f_i" } },
lookups = { 1 }
}
}
}
}

Regards,
—
Bruce Horrocks
Hampshire, UK

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

2021-12-24 Thread Jairo A. del Rio via ntg-context
Hi, Hans. In Ubuntu 20.04:

resolvers   > lua > loading file
'/home/coragyps/lmtx/tex/texmf-context/tex/context/base/mkxl/node-cmp.lmt'
succeeded

fatal error: storage cannot be marked

Jairo


El vie, 24 dic 2021 a la(s) 13:45, Hans Hagen via ntg-context (
ntg-context@ntg.nl) escribió:

> Hi,
>
> When wrapping up before the weekend I uploaded a new lmtx (bottom floats
> fixed afaiks, but hat mechanism might see some improvements anyway next
> year; exit codes more reliable; some low level tracing; side float
> coming loose from section head issue solved; ...).
>
> I'm experimenting with some more efficient low level state info and in
> the process ran into an issue / interference with (also low level)
> attributes. I'm not sure if I solved it (work in progress, i need to run
> into another border case first which may take ages) but the test suite
> runs ok so ...
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Setting table of contents depth by number rather than by list

2021-12-24 Thread Jason Ross via ntg-context

On 12/24/21 1:48 PM, Denis Maier via ntg-context wrote:

Anyway, I agree that a solution via hierarchy levels would be nice.


That's what I'm hoping to achieve. I'm not familiar enough with 
low-level ConTeXt to do something like this but it seems like it ought 
to be possible.



You don't do that. If you provide default a default sectionlevel 
scheme, you'll know what toc:2 means.
If a user uses a different scheme provided via 
#+Context_Section_Levels you can use that to adjust the meaning of 
toc:2. But if a user uses the default setting toc:2 should be fine. 
Does that make sense?


I understand. The issue I see is that this introduces a coupling between 
section structure and table of contents that could be confusing for 
users, and also makes the interface more complicated by adding another 
keyword.


I am trying to take advantage of the flexibility of ConTeXt for most of 
the configuration, because a user is more likely to be familiar with 
ConTeXt than with my specific elisp module.



Jason
___
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 table of contents depth by number rather than by list

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   Anyway, I agree that a solution via hierarchy levels would be nice.
   
  
  
   
Denis Maier via ntg-context  hat am 24.12.2021 22:43 geschrieben:
   
   

   
   

   
   

   
   

 Jason Ross <jasonross1...@gmail.com> hat am 24.12.2021 22:37 geschrieben:


 


 


 On 12/24/21 1:29 PM, Denis Maier wrote:


 


 
  I probably wasn't clear. You will support toc:2.
 
 
  This:
 
 
  #+Context_Section_Levels: '(chapter section subsection)
 
 
  will translate into a definesectionlevels command and inform your
 
 
  exporter about the used sectionlevels. Once the used commands are known
 
 
  it should be possible to map toc:2 to a combinedlist definition.
 


 I can't require the user to use more document keywords to get the same


 functionality they already have with the other exporters by default.

   
   
You don't do that. If you provide default a default sectionlevel scheme, you'll know what toc:2 means. 

   
   
If a user uses a different scheme provided via #+Context_Section_Levels you can use that to adjust the meaning of toc:2. But if a user uses the default setting toc:2 should be fine. Does that make sense? 

   
   

   
   
Denis 

   
   

 


 I am really specifically looking for a way _in ConTeXt_ to create a


 table of contents with depth `n` regardless of the sectioning used.


 


 Jason

   
  
 

___
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 table of contents depth by number rather than by list

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   
  
  
   
Jason Ross <jasonross1...@gmail.com> hat am 24.12.2021 22:37 geschrieben:
   
   

   
   

   
   
On 12/24/21 1:29 PM, Denis Maier wrote:
   
   

   
   

 I probably wasn't clear. You will support toc:2.


 This:


 #+Context_Section_Levels: '(chapter section subsection)


 will translate into a definesectionlevels command and inform your


 exporter about the used sectionlevels. Once the used commands are known


 it should be possible to map toc:2 to a combinedlist definition.

   
   
I can't require the user to use more document keywords to get the same
   
   
functionality they already have with the other exporters by default.
   
  
  
   You don't do that. If you provide default a default sectionlevel scheme, you'll know what toc:2 means.
   
  
  
   If a user uses a different scheme provided via #+Context_Section_Levels you can use that to adjust the meaning of toc:2. But if a user uses the default setting toc:2 should be fine. Does that make sense?
   
  
  
   
  
  
   Denis
   
  
  
   
   
I am really specifically looking for a way _in ConTeXt_ to create a
   
   
table of contents with depth `n` regardless of the sectioning used.
   
   

   
   
Jason
   
  
 

___
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 table of contents depth by number rather than by list

2021-12-24 Thread Jason Ross via ntg-context



On 12/24/21 1:29 PM, Denis Maier wrote:


I probably wasn't clear. You will support toc:2.
This:
#+Context_Section_Levels: '(chapter section subsection)
will translate into a definesectionlevels command and inform your 
exporter about the used sectionlevels. Once the used commands are known 
it should be possible to map toc:2 to a combinedlist definition.


I can't require the user to use more document keywords to get the same 
functionality they already have with the other exporters by default.


I am really specifically looking for a way _in ConTeXt_ to create a 
table of contents with depth `n` regardless of the sectioning used.


Jason
___
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 table of contents depth by number rather than by list

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   
  
  
   
Jason Ross via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021 22:22 geschrieben:
   
   

   
   

   
   
On 12/24/21 1:20 PM, Denis Maier via ntg-context wrote:
   
   

   
   
>>
   
   
>> I see.
   
   
>>
   
   
>> Next try: add a new option
   
   
>>
   
   
>> "#+Context_Section_Levels:
   
   
>>
   
   
>> Thus will take an alist. Now you'll know about the user defined
   
   
>> structure levels and the toc option can be translated to the
   
   
>> corresponding setting. (Here again, you can if course define
   
   
>> reasonable defaults.)
   
   

 


 Actually,  you don't need an alist. A simple quotes list should be enough:


 


 #+Context_Section_Levels: '(chapter section subsection)


 >


 
  Denis
 

   
   

   
   

   
   
That isn't going to work. The interface needs to be the same as for the
   
   
other exporters for TOC control. I need to support "toc:2".
   
   
  
  
   I probably wasn't clear. You will support toc:2. 
   
  
  
   This:
   
  
  
   #+Context_Section_Levels: '(chapter section subsection)
  
  
   will translate into a definesectionlevels command and inform your exporter about the used sectionlevels. Once the used commands are known it should be possible to map toc:2 to a combinedlist definition.
   
  
  
   
Jason
   
   
___
   
   
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] Setting table of contents depth by number rather than by list

2021-12-24 Thread Jason Ross via ntg-context



On 12/24/21 1:20 PM, Denis Maier via ntg-context wrote:



I see.

Next try: add a new option

"#+Context_Section_Levels:

Thus will take an alist. Now you'll know about the user defined 
structure levels and the toc option can be translated to the 
corresponding setting. (Here again, you can if course define 
reasonable defaults.)


Actually,  you don't need an alist. A simple quotes list should be enough:

#+Context_Section_Levels: '(chapter section subsection)


Denis



That isn't going to work. The interface needs to be the same as for the 
other exporters for TOC control. I need to support "toc:2".


Jason
___
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 table of contents depth by number rather than by list

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   
  
  
   
Denis Maier via ntg-context  hat am 24.12.2021 22:13 geschrieben:
   
   

   
   

   
   

   
   

 Jason Ross via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021 18:53 geschrieben:


 


 


 On 12/24/21 9:49 AM, Denis Maier via ntg-context wrote:


 
  For the six = for the toc...
 
 
  
   Denis Maier via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021
  
  
   18:42 geschrieben:
  
  
   
  
  
   
  
  
   Can't you just define a default structurelevel scheme and a default
  
  
   combined list for the six. If a user redefines the structure level
  
  
   scheme, they will just redefine the combined list as well. Would that
  
  
   work?
  
  
   
  
  
   Denis
  
 


 


 The way the user specifies TOC depth in Org is e.g. "#+OPTIONS: toc:2".


 All exporters support that method.

   
   

   
   
I see. 

   
   

   
   
Next try: add a new option 

   
   

   
   
"#+Context_Section_Levels:
   
   

   
   
Thus will take an alist. Now you'll know about the user defined structure levels and the toc option can be translated to the corresponding setting. (Here again, you can if course define reasonable defaults.)
   
  
  
   
  
  
   Actually,  you don't need an alist. A simple quotes list should be enough:
   
  
  
   
  
  
   #+Context_Section_Levels: '(chapter section subsection) 
   
  
  

   
   

   
   
Denis 

   
   

 


 Jason


 ___


 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
___


[NTG-context] upload

2021-12-24 Thread Hans Hagen via ntg-context

Hi,

When wrapping up before the weekend I uploaded a new lmtx (bottom floats 
fixed afaiks, but hat mechanism might see some improvements anyway next 
year; exit codes more reliable; some low level tracing; side float 
coming loose from section head issue solved; ...).


I'm experimenting with some more efficient low level state info and in 
the process ran into an issue / interference with (also low level) 
attributes. I'm not sure if I solved it (work in progress, i need to run 
into another border case first which may take ages) but the test suite 
runs ok so ...


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] Why are back-to-back \autocite commands not working in ConTeXt-SBL?

2021-12-24 Thread Joey McCollum via ntg-context
That may work with something like

```
\cite[loctext={{2},{2}}][{na2006,clark1989}]
```

or

```
\autocite[{{\loc[2]},{\loc[2]}}]{{na2006,clark1989}}
```

(I know that the ConTeXt \cite command supports multicites with
comma-separated entries, but I forget exactly what the expected syntax
looks like.)

Joey

On Fri, Dec 24, 2021 at 10:14 AM Denis Maier via ntg-context <
ntg-context@ntg.nl> wrote:

> biblatex has special multicite commands=> e.g. autocites. could that be
> used in that case?
>
> Denis
>
> Joey McCollum via ntg-context  hat am 24.12.2021
> 15:43 geschrieben:
>
>
> Joel,
>
> Thanks for mentioning this! I think I've run into the same issue before,
> but I wasn't sure how I should go about fixing it, so this might be a good
> place to get suggestions from others.
>
> The \autocite, \inlinecite, \parencite, and \footcite helper commands are
> intended to handle trailing punctuation intelligently (in order to do
> things like move punctuation after a footnote citation before the footnote
> marker), so they treat the next character after the command as a "hidden"
> parameter. This works as expected if the next character is a punctuation
> character or something like a \blank command, but if it's something like a
> \section command (or another \autocite command, as you've discovered), then
> this causes problems.
>
> That said, I think you should be able to get your ConTeXt to compile if
> you follow your \autocite command with punctuation or some form of
> whitespace (which is why a double newline works, as you've discovered,
> while a single newline does not).
>
> I'd like to keep the intelligent trailing punctuation adjustment feature
> if possible, but this problem definitely needs to be fixed. If anyone has
> any suggestions, I welcome them! My hope is that this can be resolved with
> a simple check.
>
> Joey
>
> On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context 
> wrote:
>
> I am using the ConTeXt-SBL module to handle the citations in my article.
> Using the plain \cite[na2006] command has worked fine.
>
> But there are some situations where I want the footnote to include page
> number details. I tried using \cite[extra=2][na2006], but that doesn't seem
> compatible with ConTeXt-SBL. I checked the documentation, and if I
> understand correctly, I should use the autocite command to add page numbers
> to my citation? Like this:
>
> \autocite[{\loc[2]}][]{na2006}
>
> This solution works in 95% of cases, but when I need to cite another book
> immediately after that, it throws up errors:
>
>
> This won't compile:
>
> \autocite[{\loc[2]}][]{na2006}
> \autocite[{\loc[2]}][]{clark1989}
>
> This won't compile:
>
> \autocite[{\loc[2]}][]{na2006}%
> %
>\autocite[{\loc[2]}][]{clark1989}
>
> This also won't compile:
>
> \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989}
>
> After much trial and error, I found this will compile:
>
> \autocite[{\loc[2]}][]{na2006}
>
> \autocite[{\loc[2]}][]{clark1989}
>
> The problem with this last example, is if my citations appear within the
> paragraph, then I end up with a paragraph break in the wrong place!
>
> Here is my minimum working example, which won't compile unless I add a
> blank line between the two citations.
>
> \usemodule[publ-imp-sbl]
> \startbuffer [bib]
>
> @Article{na2006,
> title={Volcanoes \word{of} New Mexico},
> year={2006},
> journal={New Mexico Earth Matters},
> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral
> Resources},
> volume={6},
> number={1},
> location={Socorro, New Mexico}
> }
>
> @Book{clark1989,
> author = {Clark, William},
> title = {Railroads \word{and} railroad towns \word{in} New Mexico},
> publisher = {New Mexico Magazine},
> year = {1989},
> address = {Albuquerque, New Mexico},
> isbn = {9780937206126}
> }
>
> \stopbuffer
>
> \usebtxdataset[bib.buffer]
>
> \setupbtx[dataset=default]
> \usebtxdefinitions[sbl]
> \setupbtx[sbl]
>
> \starttext
>
> \autocite[{\loc[2]}][]{na2006}
> \autocite[{\loc[3]}][]{clark1989}
>
>
> \startchapter[title=Bibliography]
> \placelistofpublications
> \stopchapter
>
> \stoptext
>
> Is the autocite command the wrong tool for what I need? How can I place
> citations right next to each other, but also include page number
> information with ConTeXt-SBL?
>
> --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.nt

Re: [NTG-context] Setting table of contents depth by number rather than by list

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   For the six = for the toc...
   
  
  
   
Denis Maier via ntg-context  hat am 24.12.2021 18:42 geschrieben:
   
   

   
   

   
   
Can't you just define a default structurelevel scheme and a default combined list for the six. If a user redefines the structure level scheme, they will just redefine the combined list as well. Would that work? 

   
   

   
   
Denis 

   
   

 Jason Ross via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021 17:45 geschrieben:


 


 


 Dear list,


 


 Is it possible to set the maximum table of contents depth to a number


 rather than providing an explicit list of section names?


 


 


 Background:


 


 I am developing an exporter for Org mode. In Org, users can specify the


 number of levels they want in the table of contents with a number. I


 currently do this by having the sectioning commands be known to the


 exporter so I can generate a command like


 \setupcombinedlist


 [content]


 [list={section,subsection}]


 for n=2.


 


 I'm considering using \start/stopsectionlevel for sectioning commands


 instead. That way, users could add \definesectionlevels to the document


 preamble to use whatever sectioning scheme they wanted. However, this


 would mean that the exporter wouldn't know what sectioning commands to


 use the TOC setup.


 


 


 Thanks,


 


 Jason


 ___


 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] Setting table of contents depth by number rather than by list

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   Can't you just define a default structurelevel scheme and a default combined list for the six. If a user redefines the structure level scheme, they will just redefine the combined list as well. Would that work?
   
  
  
   
  
  
   Denis
   
  
  
   
Jason Ross via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021 17:45 geschrieben:
   
   

   
   

   
   
Dear list,
   
   

   
   
Is it possible to set the maximum table of contents depth to a number
   
   
rather than providing an explicit list of section names?
   
   

   
   

   
   
Background:
   
   

   
   
I am developing an exporter for Org mode. In Org, users can specify the
   
   
number of levels they want in the table of contents with a number. I
   
   
currently do this by having the sectioning commands be known to the
   
   
exporter so I can generate a command like
   
   
\setupcombinedlist
   
   
[content]
   
   
[list={section,subsection}]
   
   
for n=2.
   
   

   
   
I'm considering using \start/stopsectionlevel for sectioning commands
   
   
instead. That way, users could add \definesectionlevels to the document
   
   
preamble to use whatever sectioning scheme they wanted. However, this
   
   
would mean that the exporter wouldn't know what sectioning commands to
   
   
use the TOC setup.
   
   

   
   

   
   
Thanks,
   
   

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


[NTG-context] Setting table of contents depth by number rather than by list

2021-12-24 Thread Jason Ross via ntg-context

Dear list,

Is it possible to set the maximum table of contents depth to a number 
rather than providing an explicit list of section names?



Background:

I am developing an exporter for Org mode. In Org, users can specify the 
number of levels they want in the table of contents with a number. I 
currently do this by having the sectioning commands be known to the 
exporter so I can generate a command like

\setupcombinedlist
  [content]
  [list={section,subsection}]
for n=2.

I'm considering using  \start/stopsectionlevel for sectioning commands 
instead. That way, users could add \definesectionlevels to the document 
preamble to use whatever sectioning scheme they wanted. However, this 
would mean that the exporter wouldn't know what sectioning commands to 
use the TOC setup.



Thanks,

Jason
___
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] Why are back-to-back \autocite commands not working in ConTeXt-SBL?

2021-12-24 Thread Denis Maier via ntg-context


 
 
  
   biblatex has special multicite commands=> e.g. autocites. could that be used in that case?
   
  
  
   
  
  
   Denis
   
  
  
   
Joey McCollum via ntg-context  hat am 24.12.2021 15:43 geschrieben:
   
   

   
   

   
   
Joel,

 


 Thanks for mentioning this! I think I've run into the same issue before, but I wasn't sure how I should go about fixing it, so this might be a good place to get suggestions from others.
 
 The \autocite, \inlinecite, \parencite, and \footcite helper commands are intended to handle trailing punctuation intelligently (in order to do things like move punctuation after a footnote citation before the footnote marker), so they treat the next character after the command as a "hidden" parameter. This works as expected if the next character is a punctuation character or something like a \blank command, but if it's something like a \section command (or another \autocite command, as you've discovered), then this causes problems.
 
 That said, I think you should be able to get your ConTeXt to compile if you follow your \autocite command with punctuation or some form of whitespace (which is why a double newline works, as you've discovered, while a single newline does not).


 


 I'd like to keep the intelligent trailing punctuation adjustment feature if possible, but this problem definitely needs to be fixed. If anyone has any suggestions, I welcome them! My hope is that this can be resolved with a simple check.


 


 Joey

   
   
   

 On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context <ntg-context@ntg.nl> wrote:
 


 
  
   
I am using the ConTeXt-SBL module to handle the citations in my article. Using the plain \cite[na2006] command has worked fine.
   
   

   
   
But there are some situations where I want the footnote to include page number details. I tried using \cite[extra=2][na2006], but that doesn't seem compatible with ConTeXt-SBL. I checked the documentation, and if I understand correctly, I should use the autocite command to add page numbers to my citation? Like this:

   
   

   
   
    \autocite[{\loc[2]}][]{na2006}
   
   

   
   
This solution works in 95% of cases, but when I need to cite another book immediately after that, it throws up errors:
   
   

   
   

   
   

 This won't compile:


 


     \autocite[{\loc[2]}][]{na2006}
 
  
       \autocite[{\loc[2]}][]{clark1989}
  
 
 
     
  
   
This won't compile:
   
   

   
   

     \autocite[{\loc[2]}][]{na2006}%


 %
 


 
     \autocite[{\loc[2]}][]{clark1989}
 

   
  
 
 
  
 
 
  This also won't compile:
  
   

   
   

 
  
       \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989}
  
 


 
  
 

   
  
 
 
  After much trial and error, I found this will compile:
  
 
 
  
   

   
   

     \autocite[{\loc[2]}][]{na2006}


 


 
  
       \autocite[{\loc[2]}][]{clark1989}
  
  
   
  
 
 
  The problem with this last example, is if my citations appear within the paragraph, then I end up with a paragraph break in the wrong place!
  
 
 
  
 


 Here is my minimum working example, which won't compile unless I add a blank line between the two citations.
 

   
  
  
   
  
  
   \usemodule[publ-imp-sbl]
   \startbuffer [bib]
   
   @Article{na2006,
   title={Volcanoes \word{of} New Mexico},
   year={2006},
   journal={New Mexico Earth Matters},
   publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
   volume={6},
   number={1},
   location={Socorro, New Mexico}
   }
   
   

Re: [NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?

2021-12-24 Thread Joey McCollum via ntg-context
Additionally, if you want to cite page numbers, the key to use in
ConTeXt-SBL is "loctext". (I was not aware of an "extra" key when I was
developing the module.) So, you should be able to make the ConTeXt-style
\cite command work as follows:

```
\cite[loctext=2][na2006]
```

I hope this helps, too!

Joey

On Fri, Dec 24, 2021 at 9:43 AM Joey McCollum 
wrote:

> Joel,
>
> Thanks for mentioning this! I think I've run into the same issue before,
> but I wasn't sure how I should go about fixing it, so this might be a good
> place to get suggestions from others.
>
> The \autocite, \inlinecite, \parencite, and \footcite helper commands are
> intended to handle trailing punctuation intelligently (in order to do
> things like move punctuation after a footnote citation before the footnote
> marker), so they treat the next character after the command as a "hidden"
> parameter. This works as expected if the next character is a punctuation
> character or something like a \blank command, but if it's something like a
> \section command (or another \autocite command, as you've discovered), then
> this causes problems.
>
> That said, I think you should be able to get your ConTeXt to compile if
> you follow your \autocite command with punctuation or some form of
> whitespace (which is why a double newline works, as you've discovered,
> while a single newline does not).
>
> I'd like to keep the intelligent trailing punctuation adjustment feature
> if possible, but this problem definitely needs to be fixed. If anyone has
> any suggestions, I welcome them! My hope is that this can be resolved with
> a simple check.
>
> Joey
>
> On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context 
> wrote:
>
>> I am using the ConTeXt-SBL module to handle the citations in my article.
>> Using the plain \cite[na2006] command has worked fine.
>>
>> But there are some situations where I want the footnote to include page
>> number details. I tried using \cite[extra=2][na2006], but that doesn't seem
>> compatible with ConTeXt-SBL. I checked the documentation, and if I
>> understand correctly, I should use the autocite command to add page numbers
>> to my citation? Like this:
>>
>> \autocite[{\loc[2]}][]{na2006}
>>
>> This solution works in 95% of cases, but when I need to cite another book
>> immediately after that, it throws up errors:
>>
>>
>> This won't compile:
>>
>> \autocite[{\loc[2]}][]{na2006}
>> \autocite[{\loc[2]}][]{clark1989}
>>
>> This won't compile:
>>
>> \autocite[{\loc[2]}][]{na2006}%
>> %
>>\autocite[{\loc[2]}][]{clark1989}
>>
>> This also won't compile:
>>
>> \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989}
>>
>> After much trial and error, I found this will compile:
>>
>> \autocite[{\loc[2]}][]{na2006}
>>
>> \autocite[{\loc[2]}][]{clark1989}
>>
>> The problem with this last example, is if my citations appear within the
>> paragraph, then I end up with a paragraph break in the wrong place!
>>
>> Here is my minimum working example, which won't compile unless I add a
>> blank line between the two citations.
>>
>> \usemodule[publ-imp-sbl]
>> \startbuffer [bib]
>>
>> @Article{na2006,
>> title={Volcanoes \word{of} New Mexico},
>> year={2006},
>> journal={New Mexico Earth Matters},
>> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral
>> Resources},
>> volume={6},
>> number={1},
>> location={Socorro, New Mexico}
>> }
>>
>> @Book{clark1989,
>> author = {Clark, William},
>> title = {Railroads \word{and} railroad towns \word{in} New Mexico},
>> publisher = {New Mexico Magazine},
>> year = {1989},
>> address = {Albuquerque, New Mexico},
>> isbn = {9780937206126}
>> }
>>
>> \stopbuffer
>>
>> \usebtxdataset[bib.buffer]
>>
>> \setupbtx[dataset=default]
>> \usebtxdefinitions[sbl]
>> \setupbtx[sbl]
>>
>> \starttext
>>
>> \autocite[{\loc[2]}][]{na2006}
>> \autocite[{\loc[3]}][]{clark1989}
>>
>>
>> \startchapter[title=Bibliography]
>> \placelistofpublications
>> \stopchapter
>>
>> \stoptext
>>
>> Is the autocite command the wrong tool for what I need? How can I place
>> citations right next to each other, but also include page number
>> information with ConTeXt-SBL?
>>
>> --Joel
>>
>>
>> ___
>> If your ques

Re: [NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?

2021-12-24 Thread Joey McCollum via ntg-context
Joel,

Thanks for mentioning this! I think I've run into the same issue before,
but I wasn't sure how I should go about fixing it, so this might be a good
place to get suggestions from others.

The \autocite, \inlinecite, \parencite, and \footcite helper commands are
intended to handle trailing punctuation intelligently (in order to do
things like move punctuation after a footnote citation before the footnote
marker), so they treat the next character after the command as a "hidden"
parameter. This works as expected if the next character is a punctuation
character or something like a \blank command, but if it's something like a
\section command (or another \autocite command, as you've discovered), then
this causes problems.

That said, I think you should be able to get your ConTeXt to compile if you
follow your \autocite command with punctuation or some form of whitespace
(which is why a double newline works, as you've discovered, while a single
newline does not).

I'd like to keep the intelligent trailing punctuation adjustment feature if
possible, but this problem definitely needs to be fixed. If anyone has any
suggestions, I welcome them! My hope is that this can be resolved with a
simple check.

Joey

On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context 
wrote:

> I am using the ConTeXt-SBL module to handle the citations in my article.
> Using the plain \cite[na2006] command has worked fine.
>
> But there are some situations where I want the footnote to include page
> number details. I tried using \cite[extra=2][na2006], but that doesn't seem
> compatible with ConTeXt-SBL. I checked the documentation, and if I
> understand correctly, I should use the autocite command to add page numbers
> to my citation? Like this:
>
> \autocite[{\loc[2]}][]{na2006}
>
> This solution works in 95% of cases, but when I need to cite another book
> immediately after that, it throws up errors:
>
>
> This won't compile:
>
> \autocite[{\loc[2]}][]{na2006}
> \autocite[{\loc[2]}][]{clark1989}
>
> This won't compile:
>
> \autocite[{\loc[2]}][]{na2006}%
> %
>\autocite[{\loc[2]}][]{clark1989}
>
> This also won't compile:
>
> \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989}
>
> After much trial and error, I found this will compile:
>
> \autocite[{\loc[2]}][]{na2006}
>
> \autocite[{\loc[2]}][]{clark1989}
>
> The problem with this last example, is if my citations appear within the
> paragraph, then I end up with a paragraph break in the wrong place!
>
> Here is my minimum working example, which won't compile unless I add a
> blank line between the two citations.
>
> \usemodule[publ-imp-sbl]
> \startbuffer [bib]
>
> @Article{na2006,
> title={Volcanoes \word{of} New Mexico},
> year={2006},
> journal={New Mexico Earth Matters},
> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral
> Resources},
> volume={6},
> number={1},
> location={Socorro, New Mexico}
> }
>
> @Book{clark1989,
> author = {Clark, William},
> title = {Railroads \word{and} railroad towns \word{in} New Mexico},
> publisher = {New Mexico Magazine},
> year = {1989},
> address = {Albuquerque, New Mexico},
> isbn = {9780937206126}
> }
>
> \stopbuffer
>
> \usebtxdataset[bib.buffer]
>
> \setupbtx[dataset=default]
> \usebtxdefinitions[sbl]
> \setupbtx[sbl]
>
> \starttext
>
> \autocite[{\loc[2]}][]{na2006}
> \autocite[{\loc[3]}][]{clark1989}
>
>
> \startchapter[title=Bibliography]
> \placelistofpublications
> \stopchapter
>
> \stoptext
>
> Is the autocite command the wrong tool for what I need? How can I place
> citations right next to each other, but also include page number
> information with ConTeXt-SBL?
>
> --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
>
> ___
>
___
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] No pagebreak before chapter

2021-12-23 Thread Rik Kabel via ntg-context


On 2021-12-23 14:15, juh via ntg-context wrote:

Dear all,

if I don't want pagebreaks before a chapter, I can do this:

\setuphead
 [chapter,title]
 [style=\tfb,
  align=center,
  number=no,
  after=,
  page=no,
  sectionsegments=chapter,
  header=empty]


In my project this does not work. All chapters start on a new page.

What can I do to debug my code?

I search for "page=" or "pagebreak" but found no configuration that can
cause chapters to insert a pagebreak before.

Merry Chrismas to all of you!
juh

Pagebreak before chapter heading is the default behavior, so you are not 
likely to find an explicit instance of it being set.


Do the other settings in your \setuphead come through (align, style, 
number? What is the scope of the \setuphead command -- is it restricted 
to a particular section block (frontpart, bodypart, backpart, appendix)? 
Is this command overridden by a later \setuphead command within the same 
scope?


--
Rik


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

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


Re: [NTG-context] Title for tabulate

2021-12-17 Thread Hans Hagen via ntg-context

On 12/17/2021 8:25 AM, Benjamin Buchmuller wrote:

Yes, this works! Thanks!

I'll try to add a section on the Wiki. Is there a reason why the second 
approach works while the other doesn't?


expansion etc so just stick to what works

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] Title for tabulate

2021-12-16 Thread Benjamin Buchmuller via ntg-context
Yes, this works! Thanks!

I'll try to add a section on the Wiki. Is there a reason why the second 
approach works while the other doesn't?

> On Dec 16, 2021, at 12:46, Hans Hagen  wrote:
> 
> On 12/16/2021 11:39 AM, Benjamin Buchmuller wrote:
>> Thanks again, Hans, for all the different approaches, very instructive!
>> However, after playing around a bit, I do have a question that I can't work 
>> out:
>> \getdummyparameters[headtitle=,#1]
>> \ifempty{\dummyparameter{headtitle}}
> can you try
> 
> \ifcstok{\dummyparameter{headtitle}}\emptytoks
> 
> instead
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

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

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


Re: [NTG-context] About "clearpage"

2021-12-16 Thread Wolfgang Schuster via ntg-context

MANUEL GONZALEZ SUAREZ via ntg-context schrieb am 16.12.2021 um 20:15:

Hi all:

In the example below:

[...]

\newdimen\Margin
\Margin=2cm
\newdimen\MarginRaise
\MarginRaise=56ex

[...]

\startsetups[text a]
\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
\startalignment[right]
\getmarking[chapter]
\stopalignment
}}
\stopsetups

\startsetups[text b]
\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
\startalignment[left]
\getmarking[section]
\stopalignment
}}
\stopsetups



\definemeasure [MarginWidth] [2cm]
\definemeasure [MarginRaise] [56ex]

\defineframed
  [MarginBlock]
  [frame=off,
   width=\measure{MarginWidth},
   height=max,
   offset=0pt,
   boffset=\measure{MarginRaise},
   align={inner,lohi}]

\startsetups[text a]
\startframed[MarginBlock]
\getmarking[chapter]
\stopframed
\stopsetups

\startsetups[text b]
\startframed[MarginBlock]
\getmarking[section]
\stopframed
\stopsetups


How can I avoid the last page of the first chapter that appears in the 
PDF (page 4 in my output) before starting the new chapter?



Chapters start by default on a right page when you use a doublesided 
layout, to change this behavior set a different value to the page key.


\setuphead [chapter] [page=yes]


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] About "clearpage"

2021-12-16 Thread MANUEL GONZALEZ SUAREZ via ntg-context
Hi all:

In the example below:


\setuppagenumbering[alternative=doublesided, location={footer,right},page=no]


\newdimen\Margin

\Margin=2cm

\newdimen\MarginRaise

\MarginRaise=56ex

\setuptexttexts[margin][][\setups{text a}][\setups{text b}][]

\setuptext[leftstyle=\sc,rightstyle=\em]

\startsetups[text a]

\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%

  \startalignment[right]

  \getmarking[chapter]

  \stopalignment

}}

\stopsetups


\startsetups[text b]

\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%

  \startalignment[left]

  \getmarking[section]

  \stopalignment

}}

\stopsetups


\starttext

\chapter{First}

\section{first}

\dorecurse{6}{\input tufte}


\input tufte


\input tufte


\input tufte


\input tufte

\chapter{Second}

\section{second}

\dorecurse{6}{\input tufte}

\chapter{Third}

\section{third}

\dorecurse{6}{\input tufte}

\stoptext


How can I avoid the last page of the first chapter that appears in the PDF 
(page 4 in my output) before starting the new chapter?

Thank you

M. González.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] About margin notes

2021-12-14 Thread Hans Hagen via ntg-context

On 12/14/2021 11:58 AM, MANUEL GONZALEZ SUAREZ via ntg-context wrote:

Hi all:
I send this minimal example:

\mainlanguage [es]
\definefontfamily [mainface] [serif] [Gentium]
\setupbodyfont[mainface]
\setuppagenumbering[alternative=doublesided, location={footer,right}]

\setuplayout[textwidth=12cm,margin=2.5cm]
\setupmargindata[inmargin][style={\tfx\em}, location=outer,align=flushouter]


just use \inouter or define a new margindata class (see typo-mar.mkxl 
line 360 etc to see what is defined in what way)




\starttext

\chapter{Introduction}
\input{tufte}
\input{tufte}\inmargin{This is the first margin note}
\input{tufte}
\input{tufte}
\section{Whe start here}
\input{knuth}\inmargin{This is another margin note}
\input{tufte}\inmargin{This is another note in margin}
\input tufte
\chapter{Second chapter}
\section{First section}
\input{tufte}

\stoptext

Notes that appear in the right margin are justified, aligned with the 
text, but not the note in the left margin.How could I do this?

Thanks.
M. González.

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



--

-
  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] About margin notes

2021-12-14 Thread MANUEL GONZALEZ SUAREZ via ntg-context
Hi all:
I send this minimal example:

\mainlanguage [es]
\definefontfamily [mainface] [serif] [Gentium]
\setupbodyfont[mainface]
\setuppagenumbering[alternative=doublesided, location={footer,right}]

\setuplayout[textwidth=12cm,margin=2.5cm]
\setupmargindata[inmargin][style={\tfx\em}, location=outer,align=flushouter]


\starttext

\chapter{Introduction}
\input{tufte}
\input{tufte}\inmargin{This is the first margin note}
\input{tufte}
\input{tufte}
\section{Whe start here}
\input{knuth}\inmargin{This is another margin note}
\input{tufte}\inmargin{This is another note in margin}
\input tufte
\chapter{Second chapter}
\section{First section}
\input{tufte}

\stoptext

Notes that appear in the right margin are justified, aligned with the text, but 
not the note in the left margin. How could I do this?
Thanks.
M. González.
___
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] Initial release of SBL bibliographic rendering and biblio wishlist

2021-12-10 Thread J Huisman via ntg-context
t rules (detailed at 
> https://docs.citationstyles.org/en/stable/specification.html#disambiguation) 
> would be ideal.
> General support for ibidem (same entry), idem (same author), and op. cit. 
> (same title) tracking in the publ-ini module. These could be implemented with 
> default settings that could be overridden as needed in individual 
> specifications. Following biblatex, the user should be able to specify yes/no 
> "ibidtracker", "idemtracker", and "opcittracker" options via \setupbtx. The 
> publ-ini.mkiv file already defines macros like 
> \btxdoifsameaspreviouscheckedelse, \btxdoifsameaspreviouselse, and 
> \btxdoifcombiinlistelse to help with this sort of thing in the bibliographic 
> list, but we'd like something analogous for inline citations. Specifically, 
> we'd like a way to retrieve (or compare) the tag, author, and title of the 
> last entry cited in the current mode (where the mode may be in the main 
> document or a footnote/endnote). A further \btxsetup option could control how 
> locally the tracking should be done (i.e., if the trackers should reset at 
> the start of a new chapter, new section, new page, etc.). In addition, it 
> would also be good to copy the \mancite command from biblatex, which manually 
> resets these trackers when it is invoked.
> General support for CSL locator macros, whose basic usage is described in 
> https://pandoc.org/MANUAL.html#citation-syntax. The citation style locales 
> defined at https://github.com/citation-style-language/locales have been 
> defined for various languages already, and their printed renderings can be 
> implemented according to individual specifications (perhaps using the 
> language-dependent \setupbtxlabeltext macro). A template for this can be 
> found in the SBL rendering at https://github.com/jjmccollum/context-sbl.
> ConTeXt might benefit from a predefined parenthetical delimitedtext 
> environment similar to "quotation" and "quote". Currently, I define such an 
> environment in publ-imp-sbl.mkvi as follows:
>
> ```
> % Nested parentheses (used for things like publisher and institution blocks) 
> should alternate between proper parentheses and brackets
> \definedelimitedtext[paren][quotation][location=text,left={(},right={)}]
> \setupdelimitedtext[paren:1][left={(},right={)}]
> \setupdelimitedtext[paren:2][left={[}, right={]}]
> \setupdelimitedtext[paren:3][left={(},right={)}]
> \setupdelimitedtext[paren:4][left={[}, right={]}]
> ```
>
> But a general environment of this nature (perhaps supporting alternating 
> parentheses/brackets to arbitrary depth?) may be useful for other citations 
> styles and more general typesetting purposes, as well.
> Per a discussion I had earlier with Hans, a language-specific mechanism for 
> moving trailing punctuation after a \quotation or \quote block so that it is 
> inside that block (in accordance with "American" punctuation rules) would be 
> helpful.
> The ConTeXt distribution should be updated to include the authortitle sort 
> method in publ-aut.lua and the invertedfirst authorconversion setups in 
> publ-imp-author.mkvi. These are already defined in the copies of these files 
> in the sbl-context GitHub repo.
> Optimized implementations in the ConTeXt core for the following macros, some 
> unoptimized versions of which are defined in publ-imp-sbl.mkvi (at 
> https://github.com/jjmccollum/context-sbl):
>
> \doifprefix, \doifprefixelse, and \doifnotprefix
> \doifsuffix, \doifsuffixelse, and \doifnotsuffix (the 
> \btx_sbl_doifendswithpunct macro is a more specific template for this; if you 
> think the punctuation-specific macros would also be useful in general, then 
> they could be implemented in the core, as well)
>
> The "\clf_" macros mentioned in the "NOTE FOR HANS" near the start of 
> publ-imp-sbl.mkvi should be accessible through exposed helper functions.
>
> Many of these features (and some others that are specific to the SBL 
> rendering) are marked with "TODO" notes in publ-imp-sbl.mkvi.
>
> I'm getting ready to start my PhD research in a few months, so I don't expect 
> to have as much time to develop the SBL rendering in the near future, but I 
> can try to patch things up as needed if anyone runs into any problems in the 
> near-term.
>
> Thanks to everyone on the mailing list who answered my questions throughout 
> this process and for your continuing help in the future!
>
> 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
> ___
___
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] Initial release of SBL bibliographic rendering and biblio wishlist

2021-12-08 Thread Joey McCollum via ntg-context
;idemtracker", and "opcittracker" options via
   \setupbtx. The publ-ini.mkiv file already defines macros like
   \btxdoifsameaspreviouscheckedelse, \btxdoifsameaspreviouselse, and
   \btxdoifcombiinlistelse to help with this sort of thing in the
   bibliographic list, but we'd like something analogous for inline citations.
   Specifically, we'd like a way to retrieve (or compare) the tag, author, and
   title of the last entry cited in the current mode (where the mode may be in
   the main document or a footnote/endnote). A further \btxsetup option could
   control how locally the tracking should be done (i.e., if the trackers
   should reset at the start of a new chapter, new section, new page, etc.).
   In addition, it would also be good to copy the \mancite command from
   biblatex, which manually resets these trackers when it is invoked.
   - General support for CSL locator macros, whose basic usage is described
   in https://pandoc.org/MANUAL.html#citation-syntax. The citation style
   locales defined at https://github.com/citation-style-language/locales
   have been defined for various languages already, and their
   printed renderings can be implemented according to individual
   specifications (perhaps using the language-dependent \setupbtxlabeltext
   macro). A template for this can be found in the SBL rendering at
   https://github.com/jjmccollum/context-sbl.
   - ConTeXt might benefit from a predefined parenthetical delimitedtext
   environment similar to "quotation" and "quote". Currently, I define such an
   environment in publ-imp-sbl.mkvi as follows:

   ```
   % Nested parentheses (used for things like publisher and institution
   blocks) should alternate between proper parentheses and brackets
   \definedelimitedtext[paren][quotation][location=text,left={(},right={)}]
   \setupdelimitedtext[paren:1][left={(},right={)}]
   \setupdelimitedtext[paren:2][left={[}, right={]}]
   \setupdelimitedtext[paren:3][left={(},right={)}]
   \setupdelimitedtext[paren:4][left={[}, right={]}]
   ```

   But a general environment of this nature (perhaps supporting alternating
   parentheses/brackets to arbitrary depth?) may be useful for other citations
   styles and more general typesetting purposes, as well.
   - Per a discussion I had earlier with Hans, a language-specific
   mechanism for moving trailing punctuation after a \quotation or \quote
   block so that it is inside that block (in accordance with "American"
   punctuation rules) would be helpful.
   - The ConTeXt distribution should be updated to include the authortitle
   sort method in publ-aut.lua and the invertedfirst authorconversion setups
   in publ-imp-author.mkvi. These are already defined in the copies of these
   files in the sbl-context GitHub repo.
   - Optimized implementations in the ConTeXt core for the following
   macros, some unoptimized versions of which are defined in publ-imp-sbl.mkvi
   (at https://github.com/jjmccollum/context-sbl):
  - \doifprefix, \doifprefixelse, and \doifnotprefix
  - \doifsuffix, \doifsuffixelse, and \doifnotsuffix (the
  \btx_sbl_doifendswithpunct macro is a more specific template for this; if
  you think the punctuation-specific macros would also be useful
in general,
  then they could be implemented in the core, as well)
   - The "\clf_" macros mentioned in the "NOTE FOR HANS" near the start
   of publ-imp-sbl.mkvi should be accessible through exposed helper functions.

Many of these features (and some others that are specific to the SBL
rendering) are marked with "TODO" notes in publ-imp-sbl.mkvi.

I'm getting ready to start my PhD research in a few months, so I don't
expect to have as much time to develop the SBL rendering in the near
future, but I can try to patch things up as needed if anyone runs into any
problems in the near-term.

Thanks to everyone on the mailing list who answered my questions throughout
this process and for your continuing help in the future!

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] [DKIM] Re: [DKIM] Re: [DKIM] circuitikz module seems broken

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

On 12/6/2021 9:49 PM, Jan-Erik Hägglöf via ntg-context wrote:

Ok, so if I understand this correctly, you recommend install directly from ctan.

The question is, I’m not sure how, but is it the tds arcive?


i'm not sure how that gets updated but as tikz is a constantly moving i 
just got it from ctan (for testing, i don't depend on it so it's not 
critital what i install)



If I test it under mkiv do I need a separate install?


no, the lmtx installer also installs mkiv but you can try the garden 
mkiv installation and then just replace tikz and circuitikz in the 
modules section with the latest from ctan



The wiki seems to indicate that the mkiv version is included in the LMTX 
installation, if so it doesn’t work but I give it a second try.


indeed, but you need to make

tex/texmf-modules/tex

and then unzip the (circuit)tikz zips from ctan there and run "mtxrun 
--generate" afterwards


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] Title for tabulate

2021-11-30 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Hans Hagen 
> Gesendet: Sonntag, 28. November 2021 14:26
> An: Maier, Denis Christian (UB) ; ntg-
> cont...@ntg.nl
> Betreff: Re: AW: [NTG-context] Title for tabulate
> 
> On 11/28/2021 1:22 PM, denis.ma...@unibe.ch wrote:
> >
> >> -Ursprüngliche Nachricht-
> >> Von: ntg-context  Im Auftrag von Hans
> >> Hagen via ntg-context
> >> Gesendet: Sonntag, 28. November 2021 12:40
> >> An: Denis Maier via ntg-context 
> >> Cc: Hans Hagen 
> >> Betreff: Re: [NTG-context] Title for tabulate
> >>
> >> On 11/28/2021 9:15 AM, Denis Maier via ntg-context wrote:
> >>
> >>> A couple of questions :
> >>>
> >>> - Is it possible to have the title be typeset only once? I.e., it
> >>> should not repeat on each page.
> >> why not just use
> >>
> >> \subsubsubject{xxxx}
> >
> > That sounds like a neat solution. I'll investigate.
> > Does that play nicely with structurelevels? I mean, let's say I'm somewhere
> higher, e.g. on chapter, the next level would be section. If I now invoke this
> subsubsubject manually, does that break the levels structure?
> often it's ok as subjects are unnumbered but you can play safe:
> 
> \definehead[myownhead][subsubsubsubsubsubject]
> 
> \myownhead
> 
> you can then always go lower (more sub) if needed
> 
> and using dedicated head commands is also cleaner

Ok, that's what I've done now, and doesn't seem to create any problems.

Thanks for pointing me in the right direction.

Denis
___
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] Title for tabulate

2021-11-28 Thread Hans Hagen via ntg-context

On 11/28/2021 1:22 PM, denis.ma...@unibe.ch wrote:



-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Hans Hagen
via ntg-context
Gesendet: Sonntag, 28. November 2021 12:40
An: Denis Maier via ntg-context 
Cc: Hans Hagen 
Betreff: Re: [NTG-context] Title for tabulate

On 11/28/2021 9:15 AM, Denis Maier via ntg-context wrote:


A couple of questions :

- Is it possible to have the title be typeset only once? I.e., it
should not repeat on each page.

why not just use

\subsubsubject{}


That sounds like a neat solution. I'll investigate.
Does that play nicely with structurelevels? I mean, let's say I'm somewhere 
higher, e.g. on chapter, the next level would be section. If I now invoke this 
subsubsubject manually, does that break the levels structure?

often it's ok as subjects are unnumbered but you can play safe:

\definehead[myownhead][subsubsubsubsubsubject]

\myownhead

you can then always go lower (more sub) if needed

and using dedicated head commands is also cleaner

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] Title for tabulate

2021-11-28 Thread Denis Maier via ntg-context

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Sonntag, 28. November 2021 12:40
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] Title for tabulate
> 
> On 11/28/2021 9:15 AM, Denis Maier via ntg-context wrote:
> 
> > A couple of questions :
> >
> > - Is it possible to have the title be typeset only once? I.e., it
> > should not repeat on each page.
> why not just use
> 
> \subsubsubject{}

That sounds like a neat solution. I'll investigate.
Does that play nicely with structurelevels? I mean, let's say I'm somewhere 
higher, e.g. on chapter, the next level would be section. If I now invoke this 
subsubsubject manually, does that break the levels structure?

Best,
Denis

> 
> -
>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] Checking for a Unicode prefix of a Unicode string

2021-11-27 Thread Joey McCollum via ntg-context
I was afraid that might be the problem. I've described some of the intended
purpose of this code near the end of the "Checking for a macro in a string
without expanding it" thread on the mailing list, but I will get into more
detail here. I'm working on a ConTeXt implementation of citation style
language (CSL) locators, particularly for the SBL citation rendering
(although the code could easily be adapted for use in general or with other
bibliographic renderings). This would allow for a consistent,
language-sensitive syntax that could be used within citations or in any
part of a text and could accommodate changes in bibliographic style without
requiring the user to reformat all their page number citations. In SBL
style, for instance, volume, part, and page numbers are not prefixed by
abbreviations like "vol.", "pt." and "p.", but in other styles, they might
be. The locator syntax

```
\loc[vol=33,pt=1,p=86]
```

would be defined in the SBL rendering file to output

```
33.1:86
```

while in some other style, it might be defined to output

```
vol. 33, pt. 1, p. 86
```

To accommodate the use of these macros within citations, I've added
"loctext" (locator text) and "altloctext" (alternate locator text)
arguments to the set of parameters used by the \cite macro, because in some
bibliographic categories, different locators can be specified for different
parts of a citation (e.g., one for a passage in an ancient text and another
for the book reproducing it), and therefore cannot just be specified in the
"righttext" parameter. So now we can do something like

```
\cite[lefttext={See},altloctext={1.3},loctext={8:223},righttext={for
further details}][clementinehomilies]
```

to get

See *The Clementine Homilies* 1.3 (*ANF *8:223) for further details.

or

```
\cite[lefttext={See},loctext={\loc[p=8]},righttext={; but there are also
contradictory statements, e.g. \loc[p=12].}][Doe:Title]
```

to get

See Doe, *Title*, 8; but there are also contradictory statements, e.g. 12.


The main problem is determining when to include a comma before printing the
"loctext" and when not to include one. In the first example above, we don't
want a comma between *ANF* and 8:223 (SBL style does not add a comma
between a multivolume set abbreviation and a volume number), but in the
second example, we do want one between *Title *and 8. Similarly, we want to
remove the comma if the first locator in the loctext is a section marker
(§) or paragraph marker (¶). This is why I want to check the beginning of
the \currentloctext macro for the presence of a volume number (a number
followed by a colon), a section mark, or a paragraph mark.

While storing the locator parameters as btx parameters would allow for
another solution to this problem, it would complicate defining the \loc
macro in a way that would be suitable outside of citations or for multiple
uses in the same citation (notice how a second \loc invocation occurs in
the righttext of the second example above). Parsing the output of \loc
seemed like the simplest solution, but as you've pointed out, it has its
own difficulties. I'm inclined to try one of the TeX-based solutions you
describe above to avoid complicating other things, but if my description of
the intended use gives you any better ideas, please suggest them!

Thanks again!

Joey

On Sat, Nov 27, 2021 at 1:44 PM Hans Hagen  wrote:

> On 11/27/2021 6:13 PM, Joey McCollum wrote:
> > All right, I think I've solved the expansion problem I described before:
> > to ensure that the first input is expanded when it is passed to Lua, I
> > have to pass it as [==[#1]==], not "#1". But the updated MWE below still
> > does not seem to work, as the \DoIfPrefixElse macro is printing "NOP"
> > instead of "YES":
> >
> > ```
> >
> > \starttexdefinition loc [#1]
> >
> > \doifassignmentelse{#1} {
> >
> > % if an assignment, then parse and format accordingly
> >
> > \getparameters[loc][#1]
> >
> > % Was a section number specified?
> >
> > \doifdefined{locsec} {
> >
> > § \locsec
> >
> > }
> >
> > } {
> >
> > % otherwise, just print the input as-is
> >
> > #1
> >
> > }
> >
> > \stoptexdefinition
> >
> >
> >
> \def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find([==[#2]==],"^"..[==[#1]==]))}}
> >
> >
> > \def\currentbtxloctext{\loc[sec=31]}
> >
> >
> > \starttext
> >
> > \currentbtxloctext\blank
> >
> > \DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}
> >
> > \stoptext
> >
> > ```
> >
> > Indeed, if I add a simple \doifelse equality check, it looks like the
> > value I expect is not th

Re: [NTG-context] Checking for a Unicode prefix of a Unicode string

2021-11-27 Thread Hans Hagen via ntg-context

On 11/27/2021 6:13 PM, Joey McCollum wrote:
All right, I think I've solved the expansion problem I described before: 
to ensure that the first input is expanded when it is passed to Lua, I 
have to pass it as [==[#1]==], not "#1". But the updated MWE below still 
does not seem to work, as the \DoIfPrefixElse macro is printing "NOP" 
instead of "YES":


```

\starttexdefinition loc [#1]

\doifassignmentelse{#1} {

% if an assignment, then parse and format accordingly

\getparameters[loc][#1]

% Was a section number specified?

\doifdefined{locsec} {

§ \locsec

}

} {

% otherwise, just print the input as-is

#1

}

\stoptexdefinition


\def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find([==[#2]==],"^"..[==[#1]==]))}}


\def\currentbtxloctext{\loc[sec=31]}


\starttext

\currentbtxloctext\blank

\DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}

\stoptext

```

Indeed, if I add a simple \doifelse equality check, it looks like the 
value I expect is not the same as what the macro produces, even though 
they look identical:


```

\starttexdefinition loc [#1]
     \doifassignmentelse{#1} {
         % if an assignment, then parse and format accordingly
         \getparameters[loc][#1]
         % Was a section number specified?
         \doifdefined{locsec} {
             § \locsec
         }
     } {
         % otherwise, just print the input as-is
         #1
     }
\stoptexdefinition

\def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find([==[#2]==],"^"..[==[#1]==]))}}

\def\currentbtxloctext{\loc[sec=31]}

\starttext
     § 31\blank%the raw text we expect
     \currentbtxloctext\blank%the text as produced by the macro
     \doifelse{\currentbtxloctext}{§ 31}{YES}{NOP}\blank% should output 
YES, but doesn't
     \DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}\blank% should 
output YES, but doesn't

\stoptext

```

What am I missing here?
Expansion hell ... and i fear that you draw yourself into more and more 
trouble with this approach (which is why you don't find that kind of 
hackery in the core unless we're real desperate) so maybe try to explain 
what the real problem is that needs to be solved. Parsing tex is seldom 
a solution (at least not in context).


You can add:

\edef\Whatever{\currentbtxloctext}\meaning\Whatever
\doifelse{\currentbtxloctext}{§ 31}{YES}{NOP}\blank

and see what comes back. Now, as always in tex, there's of course a 
solution because after all it's a programming language too (and at some 
point these solutions start looking so complex that one enters guru state)


\starttexdefinition loc [#1]
\beginlocalcontrol
\doifassignmentelse{#1} {
\getparameters[loc][#1]
\doifdefinedelse{locsec} {
\endlocalcontrol
§ \locsec
} {
\endlocalcontrol
}
} {
\endlocalcontrol
#1
}
\stoptexdefinition

a curious mix between a fully expanded result, using protected macros 
and hiding what tex does but hard to explain


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] Checking for a Unicode prefix of a Unicode string

2021-11-27 Thread Joey McCollum via ntg-context
All right, I think I've solved the expansion problem I described before: to
ensure that the first input is expanded when it is passed to Lua, I have to
pass it as [==[#1]==], not "#1". But the updated MWE below still does not
seem to work, as the \DoIfPrefixElse macro is printing "NOP" instead of
"YES":

```

\starttexdefinition loc [#1]

\doifassignmentelse{#1} {

% if an assignment, then parse and format accordingly

\getparameters[loc][#1]

% Was a section number specified?

\doifdefined{locsec} {

§ \locsec

}

} {

% otherwise, just print the input as-is

#1

}

\stoptexdefinition


\def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find([==[#2]==],"^"..[==[#1]==]))}}


\def\currentbtxloctext{\loc[sec=31]}


\starttext

\currentbtxloctext\blank

\DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}

\stoptext
```

Indeed, if I add a simple \doifelse equality check, it looks like the value
I expect is not the same as what the macro produces, even though they look
identical:

```

\starttexdefinition loc [#1]
\doifassignmentelse{#1} {
% if an assignment, then parse and format accordingly
\getparameters[loc][#1]
% Was a section number specified?
\doifdefined{locsec} {
§ \locsec
}
} {
% otherwise, just print the input as-is
#1
}
\stoptexdefinition

\def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find([==[#2]==],"^"..[==[#1]==]))}}

\def\currentbtxloctext{\loc[sec=31]}

\starttext
§ 31\blank%the raw text we expect
\currentbtxloctext\blank%the text as produced by the macro
\doifelse{\currentbtxloctext}{§ 31}{YES}{NOP}\blank% should output YES,
but doesn't
\DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}\blank% should output
YES, but doesn't
\stoptext
```

What am I missing here?

Joey

On Fri, Nov 26, 2021 at 11:57 AM Joey McCollum 
wrote:

> Thanks! Invoking string.find(str,"^"..pre) is certainly much easier. This
> sort of thing would be a nice general-purpose helper function. Denis Maier
> and I should have a "wish list" of desired helpers and features (mostly
> related to bibliographies/publication support) ready for you (and Alan)
> sometime soon.
>
> But for now, it looks like I still need to work out errors that arise when
> I pass a macro as the "str" input to be searched. I've defined a \loc macro
> that accepts an assignment and outputs a formatted string, and later, I
> want to check if this macro (after it has been fully expanded) starts with
> a certain prefix. A minimal (non-)working example follows:
>
> ```
>
> \starttexdefinition loc [#1]
>
> \doifassignmentelse{#1} {
>
> % if an assignment, then parse and format accordingly
>
> \getparameters[loc][#1]
>
> % Was a section number specified?
>
> \doifdefined{locsec} {
>
> § \locsec\btxcomma
>
> }
>
> } {
>
> % otherwise, just print the input as-is
>
> #1
>
> }
>
> \stoptexdefinition
>
>
>
> \def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find("#2","^".."#1"))}}
>
>
> \def\currentbtxloctext{\loc[sec=31]}
>
>
> \starttext
>
> \DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}
>
> \stoptext
> ```
>
> Lua is throwing an "invalid escape sequence near '"\l'" error, which is
> presumably because the macro \loc[sec=31] is not being expanded. How do I
> fix this?
>
> Thanks!
>
> Joey
>
> On Fri, Nov 26, 2021 at 3:46 AM Hans Hagen via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>> On 11/26/2021 7:42 AM, Joey McCollum via ntg-context wrote:
>> > I wasn't aware of a general-purpose "doifstartswith" macro in ConTeXt
>> > (the \doifnextcharelse macro only works one character at a time, and
>> the
>> > \doifinstring macros may capture substrings that are not prefixes), and
>> > I'd like to develop one for something I'm working on. I've been trying
>> > to do this in Lua, as that seemed like the most natural approach.
>> > Normally, something like this would work fine as a foundation:
>> >
>> > ```
>> >function isprefix(prefix, str)
>> >  if string.sub(str, 1, string.len(prefix)) == prefix then
>> >return true
>> >  end
>> >  return false
>> >end
>> > ```
>>
>> how about
>>
>> if string.find(str,"^"..prefix) then
>>
>> in:
>>
>> \starttext
>>
>>
>> \def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find("#2","^".."#1"))}}
>>
>> \DoIfPrefixElse{pre}{prefix}{YES}{NOP}
>> \DoIfPrefixElse{pre}{suffix}{YES}{NOP}
>>

Re: [NTG-context] Checking for a Unicode prefix of a Unicode string

2021-11-26 Thread Joey McCollum via ntg-context
Thanks! Invoking string.find(str,"^"..pre) is certainly much easier. This
sort of thing would be a nice general-purpose helper function. Denis Maier
and I should have a "wish list" of desired helpers and features (mostly
related to bibliographies/publication support) ready for you (and Alan)
sometime soon.

But for now, it looks like I still need to work out errors that arise when
I pass a macro as the "str" input to be searched. I've defined a \loc macro
that accepts an assignment and outputs a formatted string, and later, I
want to check if this macro (after it has been fully expanded) starts with
a certain prefix. A minimal (non-)working example follows:

```

\starttexdefinition loc [#1]

\doifassignmentelse{#1} {

% if an assignment, then parse and format accordingly

\getparameters[loc][#1]

% Was a section number specified?

\doifdefined{locsec} {

§ \locsec\btxcomma

}

} {

% otherwise, just print the input as-is

#1

}

\stoptexdefinition


\def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find("#2","^".."#1"))}}


\def\currentbtxloctext{\loc[sec=31]}


\starttext

\DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP}

\stoptext
```

Lua is throwing an "invalid escape sequence near '"\l'" error, which is
presumably because the macro \loc[sec=31] is not being expanded. How do I
fix this?

Thanks!

Joey

On Fri, Nov 26, 2021 at 3:46 AM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 11/26/2021 7:42 AM, Joey McCollum via ntg-context wrote:
> > I wasn't aware of a general-purpose "doifstartswith" macro in ConTeXt
> > (the \doifnextcharelse macro only works one character at a time, and the
> > \doifinstring macros may capture substrings that are not prefixes), and
> > I'd like to develop one for something I'm working on. I've been trying
> > to do this in Lua, as that seemed like the most natural approach.
> > Normally, something like this would work fine as a foundation:
> >
> > ```
> >function isprefix(prefix, str)
> >  if string.sub(str, 1, string.len(prefix)) == prefix then
> >return true
> >  end
> >  return false
> >end
> > ```
>
> how about
>
> if string.find(str,"^"..prefix) then
>
> in:
>
> \starttext
>
>
> \def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find("#2","^".."#1"))}}
>
> \DoIfPrefixElse{pre}{prefix}{YES}{NOP}
> \DoIfPrefixElse{pre}{suffix}{YES}{NOP}
>
> \stoptext
>
> utf strings are just sequences of bytes so matching works
>
> when you want to do more in lua you can decide for
>
> \startluacode
> interfaces.implement {
>  name  = "DoIfPrefixElse",
>  arguments = { "argument", "argument" },
>  actions   = function(pre,str)
>  commands.doifelse(string.find(str,"^"..pre))
>  end
> }
> \stopluacode
>
> \DoIfPrefixElse{pre}{prefix}{YES}{NOP}
> \DoIfPrefixElse{pre}{suffix}{YES}{NOP}
>
> but in any case: make sure that you don't clash with built in ...
>
> if needed i can make a set of fast(er) ones but someone has to collect a
> list of 'handy helpers' first
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Backmatter preventing section numbers from appearing

2021-11-25 Thread Hans Hagen via ntg-context

On 11/25/2021 10:50 AM, A A via ntg-context wrote:

Dear All,

I've noticed that the mere presence of backmatter prevents my sections 
from being numbered. Consider the following:


/\starttext
\startsection[
   title={Create Serverless Applications},
]
blablabla
\stopsection

%\startbackmatter % comment out
%\stopbackmatter % comment out
\stoptext/
/
/
Uncommenting lines 8 and 9 causes the section numbers to disappear.

Is this normal behavior? Why does the presence of backmatter affect my 
sections like this?
technically there can be many so called sectionblocks in any order and 
as one is chosen and no previous one has been set, all preceding sec 
tions will end up in that first block (kind of fix the structure) .. 
this is needed to get things like bookmarks right


so ... when you use sectionblocks used them consistently i.e. use 
bodymatter wrapping for the preceding sections



-
  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] Backmatter preventing section numbers from appearing

2021-11-25 Thread A A via ntg-context
Dear All,

I've noticed that the mere presence of backmatter prevents my sections from
being numbered. Consider the following:










*\starttext\startsection[  title={Create Serverless
Applications},]blablabla\stopsection%\startbackmatter % comment
out%\stopbackmatter % comment out\stoptext*

Uncommenting lines 8 and 9 causes the section numbers to disappear.

Is this normal behavior? Why does the presence of backmatter affect my
sections like this?

Regards,

Amine
___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread Musa Furber via ntg-context
On 22 November 2021 at 18:28:44, Hans Hagen via ntg-context (
ntg-context@ntg.nl) wrote:

On 11/22/2021 10:49 AM, musa furber via ntg-context wrote:
> I am relatively new to ConTeXt and have encountered something that does
> not work as I expected it to based on various documentation and examples.
>
> My book design requires the front matter to contain an abridged table of
> contents just for chapters, and a detailed table of contents in the back
> matter.
>
> Everything worked fine -- including the PDF bookmarks and table of
> contents -- until I started using \writetolist to manually inject
> additional sections and subsections into their respective lists. The
> manually injected entries do show up (as I expected), but their
> corresponding PDF bookmarks get repeated (not what I expected).
you can probably best use

\startsection[title={...},list={...},bookmark={...}]
...
\stopsection


I do not think that is an option for me.

The book is bilingual, with Arabic and English. There are places where I
want the chapter, section, and subsection titles to be bilingual as well,
with English on the left and Arabic on the right. I accomplish this using
the following…


\defineparagraphs[BilingualTitle][n=3,before={\blank[2*line]},after=,]

\setupparagraphs[BilingualTitle][1][width=.4\textwidth]

\setupparagraphs[BilingualTitle][2][width=.12\textwidth]

\setupparagraphs[BilingualTitle][3][width=.4\textwidth]


\define[2]\BilingualChapter

   {\expanded{\writetolist[chapter]{}{#1}}

   \startBilingualTitle


 
\noindentation\setlatin{}\tfd\setupinterlinespace\feature[+][smallcaps]\word{#1}\feature[<]

   \nextBilingualTitle

   \hfill\nextBilingualTitle

   \noindentation\setarabic{}\tfd\setupinterlinespace{#2}

   \stopBilingualTitle

  }


…with variants for section, subsection, and subsection.


Regards,

Musa
___
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] Confusing interaction between \writetolist and bookmarks (bug?)

2021-11-22 Thread musa furber via ntg-context
I am relatively new to ConTeXt and have encountered something that does not
work as I expected it to based on various documentation and examples.

My book design requires the front matter to contain an abridged table of
contents just for chapters, and a detailed table of contents in the back
matter.

Everything worked fine -- including the PDF bookmarks and table of contents
-- until I started using \writetolist to manually inject additional
sections and subsections into their respective lists. The manually injected
entries do show up (as I expected), but their corresponding PDF bookmarks
get repeated (not what I expected).

Here is a M(not)WD:

###begin
\setupinteraction[state=start]
\placebookmarks[chapter, section][chapter, section]
\setupinteractionscreen[option=bookmark]

\starttext

  \startfrontmatter
\title{Contents}
\placelist[chapter]
  \stopfrontmatter

  \startbodymatter
\chapter{Chapter ONE}
\section{Section ONE}
\writetolist[section]{}{Section via writetolist ONE}
\chapter{Chapter TWO}
  \stopbodymatter

  \startbackmatter
\chapter{Detailed Table of Contents}
\placecontent[criterium=all]
  \stopbackmatter

\stoptext
###end

The repetitions go away when any one of the following is done:
-- commenting out the front/body/back commands
-- commenting out both contents at front and back
-- commenting out just back contents
-- commenting out the \writetolist

Have I misunderstood something?

Many thanks,
Musa
___
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] Errors in source files return success

2021-11-18 Thread Marco Patzer via ntg-context
Hi!

ConTeXt can detect issues in the sources and report them on the
console with the argument --errors or with \enabledirectives
[logs.errors]. The return value is still “0” (=success) even with
errors present.

Right now I use a script that parses the log file and lets me know
if a run has issues. However, it would be great if context could
return a non-zero value if errors are present. I've found that

  \enabledirectives
[logs.errors=missing characters]

returns “1” if characters are missing. Lovely!

Undefined control sequences always return 1 (a TeX thing I believe
and not related to the macro package). But undefined control
sequences don't show up on the console as the other errors do if
general output (except errors) is silenced e.g. with

  context --silent --noconsole --nostatistics --errors 

The question is, what other directives can be enabled that make
context return a failure? Is there a way to return failure if *any*
error is encountered or do they need to be enabled each
individually? And is there a way to show hard TeX errors as
undefined control sequences as a “possible issue” if output is
silenced?

MWE:

%% enables logging of errors same as --errors AFAIK
\enabledirectives
  [logs.errors]

%% makes context return 1 on missing chars, great!
%% \enabledirectives
%%   [logs.errors=missing characters]

\starttext

%% missing characters
풜

%% missing figure
\externalfigure [foo]

%% \end occurred inside a group at level 1
%% ### semi simple group … entered at line
\startalignment [middle]
  foo

%% missing references
See \in{section}[sec:none].

%% undefined control sequence
%% \undefined

\stoptext

Marco
___
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] Can modes be used for content control?

2021-11-17 Thread Taco Hoekwater via ntg-context
Hi Idris,

I think Hans was trying to point you to the blocks mechanism. Blocks *do* nest:

\defineblock[sectionblock]
\defineblock[myblock]

\startmode[variantone]
\keepblocks[sectionblock]
\keepblocks[myblock]
\stopmode

\startmode[varianttwo]
\keepblocks[sectionblock]
\stopmode

\starttext
\beginsectionblock
\section{A to B}
\beginmyblock
A is for Amy, who fell down the stairs.
\endmyblock
\beginmyblock
B is for Basil, assaulted by bears.
\endmyblock
\endsectionblock

\stoptext



— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] Can't replicate a simple example in the wikipage

2021-11-15 Thread Wolfgang Schuster via ntg-context

A A via ntg-context schrieb am 15.11.2021 um 17:15:

Dear All,

I'm trying to run one of the examples in the ConTeXt wiki page 
https://wiki.contextgarden.net/Titles


Here's the code:
*
*
*\setuppapersize[A5]

\section[sec:old]{Old Section}

This is an old-style \ConTeXt\ section.

\startsection
[
    title={New Section}
    reference=sec:new,
  ]
This is a new-style section.
\stopsection*
*
*
However, my compiled pdf looks nothing like the example on the wiki. 
What am I doing wrong? Is there anything wrong with my ConTeXt settings?


1. You need \starttext at the begin and \stoptext at the end of your 
document.


2. You forgot a comma after the title entry.

\starttext

\section[sec:old]{Old Section}

This is an old-style \ConTeXt\ section.

\startsection
  [title={New Section},
   reference=sec:new]

This is a new-style section.

\stopsection

\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] Can't replicate a simple example in the wikipage

2021-11-15 Thread A A via ntg-context
Dear All,

I'm trying to run one of the examples in the ConTeXt wiki page
https://wiki.contextgarden.net/Titles

Here's the code:













*\setuppapersize[A5]\section[sec:old]{Old Section}This is an old-style
\ConTeXt\ section.\startsection  [title={New Section}
reference=sec:new,  ]This is a new-style section.\stopsection*

However, my compiled pdf looks nothing like the example on the wiki. What
am I doing wrong? Is there anything wrong with my ConTeXt settings?

Regards,

Amine


start_stop_sectioning.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] Synonyms feature request

2021-11-12 Thread Hans Hagen via ntg-context

On 11/12/2021 4:22 AM, Rik Kabel via ntg-context wrote:

Hello developers,

Is it possible to get a mechanism to reset and setup synonyms by way 
(page, part, chapter, section, ...)?


This is not a high-priority request.

I currently accomplish this in the after key of chapter setuphead 
definitions. However, it seems cleaner to define it when the synonym 
list is defined instead of adding a resetshownsynonyms and setsynonyms 
to the chapter definition for every new synonym list.

I'll send you something to test (these are the relative easy things ...)


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] Synonyms feature request

2021-11-11 Thread Rik Kabel via ntg-context

Hello developers,

Is it possible to get a mechanism to reset and setup synonyms by way 
(page, part, chapter, section, ...)?


This is not a high-priority request.

I currently accomplish this in the after key of chapter setuphead 
definitions. However, it seems cleaner to define it when the synonym 
list is defined instead of adding a resetshownsynonyms and setsynonyms 
to the chapter definition for every new synonym list.


--
Rik

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

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


Re: [NTG-context] A book with sections

2021-10-23 Thread Pablo Rodriguez via ntg-context
On 10/23/21 3:51 PM, Gerben Wierda via ntg-context wrote:
>> On 23 Oct 2021, at 15:34, Wolfgang Schuster wrote:
>> [...]
>> You can use \part.
>
> Yes. Thanks. But that leads to additional questions:
> - how do I get the parts to show up in the table of contents? Because
> I tried \part but it did not show up
> - how do I let chapters number on (not restart in each part, and not
> a x.y number but simply ‘2. Chapter’
> - what is a good way to create actual RHS ‘title’ pages for each
> chapter?
> - how do I get parts to number with Roman numerals?
Hi Gerben,

I don’t know what actual RHS title pages are:

  \definestructureresetset[default][0,1,1][1]
  \definestructureconversionset[sectionnumbers][R,n][n]
  \setupheads[sectionconversionset=sectionnumbers,
sectionresetset=default]
  \setuphead[part][placehead=yes]
  \setuphead[chapter][sectionsegments=chapter]
  \setuphead[section][sectionsegments=chapter:section]
  \starttext
  \completecontent
  \dorecurse{25}{\part{Part}
  \chapter{Chapter}
  \section{Section}
  \section{Section}}
  \stoptext

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] A book with sections

2021-10-23 Thread Wolfgang Schuster via ntg-context

Gerben Wierda schrieb am 23.10.2021 um 15:51:

On 23 Oct 2021, at 15:34, Wolfgang Schuster  
wrote:

 Gerben Wierda via ntg-context schrieb am 23.10.2021 um 15:20:

I’d like a book with chapters to have sections/parts, e.g. something that 
groups a few \chapter elements together. Is there support for this in LMTX? 
I.e. in such a way that it also shows up in the table of contents?

You can use \part.

Yes. Thanks. But that leads to additional questions:
- how do I get the parts to show up in the table of contents? Because I tried 
\part but it did not show up

I can't reproduce the problem, do you have a example.

- how do I let chapters number on (not restart in each part, and not a x.y 
number but simply ‘2. Chapter’

Use \defineresetset as shown below.

- what is a good way to create actual RHS ‘title’ pages for each chapter?

Use a doublesided layout.

- how do I get parts to number with Roman numerals?

See below.


% Change the number conversion for section titles

\defineconversionset [section] [Romannumerals] [numbers]

\setuphead
  [sectionconversionset=section]

% Show only the chapter value for chapter

\setuphead
  [chapter]
  [sectionsegments=chapter]

% Don't reset the counter for parts and chapters

\defineresetset [default] [0,0] [1]

\starttext

\completecontent

\dorecurse{4}
  {\expanded{\part{Part \recurselevel}}
   \dorecurse{5}{\expanded{\chapter{Chapter \recurselevel

\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] Compilation error with the new version of lmtx

2021-10-17 Thread Hans Hagen via ntg-context

On 10/16/2021 7:34 PM, Fabrice Couvreur via ntg-context wrote:

Hi,
The latest version of lmtx does not allow me to compile the following 
file although there was no problem before.

Thank you
Fabrice

\startproduct[expertes-manual]

   \startfrontmatter

     \setuppagenumbering
        [location=]

     \definefont
       [ChapterTextStyle]
       [SansBold*default sa 2.2]

     \setuphead
       [title]
       [style=ChapterTextStyle,
        align=flushright]

     \setuplist
        [chapter]
        [style=bold,
         alternative=b,
         width=1em]

     \setuplist
        [section]
        [margin=1em,
         width=1.75em]

     \setuplist
        [subsection]
        [margin=2.75em,
         width=2em,
         distance=\spaceamount]


     \starttitle[title=Table des matières]

          \placelist
            [chapter,section,subsection]
            [criterium=all,
            interaction=all,
             alternative=c]

       \stoptitle

     \stopfrontmatter

     \startbodymatter
         \component[chapter_1]
         \component[chapter_2]
     \stopbodymatter


\stopproduct

##
tex error       > tex error on line 1 in file ./expertes.tex: Undefined 
control sequence \undefined


i need a better example

-
  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] Compilation error with the new version of lmtx

2021-10-16 Thread Fabrice Couvreur via ntg-context
Hi,
The latest version of lmtx does not allow me to compile the following file
although there was no problem before.
Thank you
Fabrice

\startproduct[expertes-manual]

  \startfrontmatter

\setuppagenumbering
   [location=]

\definefont
  [ChapterTextStyle]
  [SansBold*default sa 2.2]

\setuphead
  [title]
  [style=ChapterTextStyle,
   align=flushright]

\setuplist
   [chapter]
   [style=bold,
alternative=b,
width=1em]

\setuplist
   [section]
   [margin=1em,
width=1.75em]

\setuplist
   [subsection]
   [margin=2.75em,
width=2em,
distance=\spaceamount]


\starttitle[title=Table des matières]

 \placelist
   [chapter,section,subsection]
   [criterium=all,
   interaction=all,
alternative=c]

  \stoptitle

\stopfrontmatter

\startbodymatter
\component[chapter_1]
\component[chapter_2]
\stopbodymatter


\stopproduct

##
tex error   > tex error on line 1 in file ./expertes.tex: Undefined
control sequence \undefined




\relax
 \p_maxwidth
\dostarttagged \t!listcontent \empty \clf_listtitle {\currentlist
}\currentlistindex \relax
\dostoptagged
 \strc_lists_limitated_text
#1->\edef \p_maxwidth {\listparameter \c!maxwidth }\ifempty \p_maxwidth
\listparameter \c!textcommand {#1}
\else \listparameter \c!textcommand {\limitatetext {#1}\p_maxwidth
{\splitsymbol {\listparameter \c!limittext }}}\fi
 \22>:140>:abc
...rence_attribute \v!text \strc_lists_set_style_color \c!textstyle
\c!textcolor \v!text \the \t_lists_every_renderingtext \the
\t_lists_every_renderingsynchronize \setstrut \begstrut
\strc_lists_limitated_text \currentlistentrytitle
\endstrut \en ...
 \currentlistextra
...\begingroup \ifempty \m_strc_list_alternative \edef
\currentlistalternative {\listparameter \c!alternative }\else \let
\currentlistalternative \m_strc_list_alternative \fi \directsetup
{\listalternativeparameter \c!renderingsetup }
\relax \endgr ...
 ...


alternative=c]

 1 >>  \startproduct[expertes-manual]
 2
 3   \startfrontmatter
 4
 5 \setuppagenumbering
 6[location=]
 7
 8 \definefont
 9   [ChapterTextStyle]
10   [SansBold*default sa 2.2]
11
The control sequence at the end of the top line of your error message was
never
\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context | fatal error: return code: 256

TeX Output exited abnormally with code 1 at Sat Oct 16 19:28:21
___
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] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context

On 10/5/2021 4:58 PM, Thomas A. Schmitz via ntg-context wrote:


Hi all,

I hope the following example is not too convoluted:

\useMPlibrary [txt]

\define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}}

\setupbodyfont [ss,9pt]

\starttext

\startuseMPgraphic{empedocles}
%numeric a ; a = 6.56cm ;
%numeric b ; b = 1.1 ;
save S; path S[] ;
S[1] = fullcircle scaled 8cm rotated 306 ;
S[2] = S[1] scaled 1.1 ;
S[3] = S[1] scaled 1.23 ;
S[4] = S[1] scaled 1.3 ;
S[5] = S[1] scaled 1.43 ;
S[6] = S[1] scaled 1.5 ;
S[7] = S[1] scaled 1.6 ;
z[1] = point 1 along S[7] ;
z[2] = point 1 along S[1] ;
z[3] = point 0.1 along S[7] ;
z[4] = point 0.1 along S[1] ;
z[5] = point 0.2 along S[7] ;
z[6] = point 0.2 along S[1] ;
z[7] = point 0.3 along S[7] ;
z[8] = point 0.3 along S[1] ;
z[9] = point 0.4 along S[7] ;
z[10] = point 0.4 along S[1] ;
z[11] = point 0.5 along S[7] ;
z[12] = point 0.5 along S[1] ;
z[13] = point 0.6 along S[7] ;
z[14] = point 0.6 along S[1] ;
z[15] = point 0.7 along S[7] ;
z[16] = point 0.7 along S[1] ;
z[17] = point 0.8 along S[7] ;
z[18] = point 0.8 along S[1] ;
S[8] = z[1] -- z[2] ;
S[9] = z[3] -- z[4] ;
S[10] = z[5] -- z[6] ;
S[11] = z[7] -- z[8] ;
S[12] = z[9] -- z[10] ;
S[13] = z[11] -- z[12] ;
S[14] = z[13] -- z[14] ;
S[15] = z[15] -- z[16] ;
S[16] = z[17] -- z[18] ;
z[19] = S[3] intersection_point S[8] ;
z[20] = S[3] intersection_point S[16] ;
S[18] = S[3] cutbefore z[20] cutafter z[19] ;
z[21] = S[5] intersection_point S[8] ;
z[22] = S[5] intersection_point S[16] ;
S[19] = S[5] cutbefore z[22] cutafter z[21] ;
z[23] = S[12] intersection_point S[3] ;
S[20] = S[3] cutbefore z[20] cutafter z[23] ;
for i = 1 upto 16:
 draw S[i] withcolor 0.7white ;
endfor ;
draw z[23] -- z[20] withcolor red ;
draw S[20] withcolor blue ;
label.bot(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
20.000 = 0}"), z[10]) ;
label.llft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
2.000}"), z[8]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
4.000}"), z[6]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
6.000}"), z[4]) ;
label.ulft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
8.000}"), z[2]) ;
label.urt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
12.000}"), z[18]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
14.000}"), z[16]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
16.000}"), z[14]) ;
label.lrt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
18.000}"), z[12]) ;
draw followtext(S[18], "\strut\hbox to 2em{\EmpArrow}\hskip2em 
RUHEPAUSE\hskip4em\strut") ;
draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT 
(SPHAIROS)\hskip2em\strut") ;

\stopuseMPgraphic

\useMPgraphic{empedocles}

\stoptext

I have a big problem and some smaller questions, for those who are 
better at math and at metafun than I am:


1. The big problem: for the next followtext, I need the circular arc 
between points z[23] and z[20]. But however I place the cutbefore and 
cutafter, I don't get the proper part of the circle. I'm looking at the 
right intersection points, as the red line shows, but the blue line 
shows that I'm not getting the right section of the circle. How can I 
get this section into the path S[20]?


2. Math... :-) Is there a better way to define three circles that are at 
exactly the same distance than my naive "scaled 1.3" and "scaled 1.5"?


3. TeX and metafun: is there a better way to have the followtext exactly 
centered between the two circles rather than just fiddle with the scale 
factor?


4. Or is there a better approach to my problem altogether? I'm trying to 
reproduce an illustration from a book, so I'm very open to suggestions 
here. I looked at the example in the metafun manual chapter 10.4, but 
I'm not sure if using an overlay and multiple \followtokens would be 
easier. Especially since there is the scary remark "This definition is 
not the right one!" in this chapter without any further explanation.


I hope you all had a wonderful meeting last week. I was sad I couldn't 
come, I was in Paris for a conference, the first after 18 months, so I 
couldn't skip this one.

Because you know how to rotate and scale:

\startuseMPgraphic{empedocless}
path p, q, r ;
pair a ;

p := fullcircle scaled 10cm ;
drawarrow p  withpen pencircle scaled 1mm withcolor red ;
drawpoint 0 of p withpen pencircle scaled 1mm withcolor blue ;
q := p cutafter (point .4 along p) ;
drawarrow q  withpen pencircle scaled .5mm withcolor green ;
draw followtext(q, "\strut TEXT ONE") ;

p := fullcircle scaled 8cm ;
drawarrow p  withpen pencircle scaled 1mm withcolor cyan ;
drawpoint 0 of p withpen pencircle scaled 1mm withcolor mage

[NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context


Hi all,

I hope the following example is not too convoluted:

\useMPlibrary [txt]

\define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}}

\setupbodyfont [ss,9pt]

\starttext

\startuseMPgraphic{empedocles}
%numeric a ; a = 6.56cm ;
%numeric b ; b = 1.1 ;
save S; path S[] ;
S[1] = fullcircle scaled 8cm rotated 306 ;
S[2] = S[1] scaled 1.1 ;
S[3] = S[1] scaled 1.23 ;
S[4] = S[1] scaled 1.3 ;
S[5] = S[1] scaled 1.43 ;
S[6] = S[1] scaled 1.5 ;
S[7] = S[1] scaled 1.6 ;
z[1] = point 1 along S[7] ;
z[2] = point 1 along S[1] ;
z[3] = point 0.1 along S[7] ;
z[4] = point 0.1 along S[1] ;
z[5] = point 0.2 along S[7] ;
z[6] = point 0.2 along S[1] ;
z[7] = point 0.3 along S[7] ;
z[8] = point 0.3 along S[1] ;
z[9] = point 0.4 along S[7] ;
z[10] = point 0.4 along S[1] ;
z[11] = point 0.5 along S[7] ;
z[12] = point 0.5 along S[1] ;
z[13] = point 0.6 along S[7] ;
z[14] = point 0.6 along S[1] ;
z[15] = point 0.7 along S[7] ;
z[16] = point 0.7 along S[1] ;
z[17] = point 0.8 along S[7] ;
z[18] = point 0.8 along S[1] ;
S[8] = z[1] -- z[2] ;
S[9] = z[3] -- z[4] ;
S[10] = z[5] -- z[6] ;
S[11] = z[7] -- z[8] ;
S[12] = z[9] -- z[10] ;
S[13] = z[11] -- z[12] ;
S[14] = z[13] -- z[14] ;
S[15] = z[15] -- z[16] ;
S[16] = z[17] -- z[18] ;
z[19] = S[3] intersection_point S[8] ;
z[20] = S[3] intersection_point S[16] ;
S[18] = S[3] cutbefore z[20] cutafter z[19] ;
z[21] = S[5] intersection_point S[8] ;
z[22] = S[5] intersection_point S[16] ;
S[19] = S[5] cutbefore z[22] cutafter z[21] ;
z[23] = S[12] intersection_point S[3] ;
S[20] = S[3] cutbefore z[20] cutafter z[23] ;
for i = 1 upto 16:
draw S[i] withcolor 0.7white ;
endfor ;
draw z[23] -- z[20] withcolor red ;
draw S[20] withcolor blue ;
label.bot(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
20.000 = 0}"), z[10]) ;
label.llft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
2.000}"), z[8]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
4.000}"), z[6]) ;
label.lft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
6.000}"), z[4]) ;
label.ulft(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
8.000}"), z[2]) ;
label.urt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
12.000}"), z[18]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
14.000}"), z[16]) ;
label.rt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
16.000}"), z[14]) ;
label.lrt(textext("\noexpand\framed[align=middle,frame=off]{Jahr \crlf 
18.000}"), z[12]) ;
draw followtext(S[18], "\strut\hbox to 2em{\EmpArrow}\hskip2em 
RUHEPAUSE\hskip4em\strut") ;
draw followtext(S[19], "\strut\hbox to 2em{\EmpArrow}EINHEIT 
(SPHAIROS)\hskip2em\strut") ;

\stopuseMPgraphic

\useMPgraphic{empedocles}

\stoptext

I have a big problem and some smaller questions, for those who are 
better at math and at metafun than I am:


1. The big problem: for the next followtext, I need the circular arc 
between points z[23] and z[20]. But however I place the cutbefore and 
cutafter, I don't get the proper part of the circle. I'm looking at the 
right intersection points, as the red line shows, but the blue line 
shows that I'm not getting the right section of the circle. How can I 
get this section into the path S[20]?


2. Math... :-) Is there a better way to define three circles that are at 
exactly the same distance than my naive "scaled 1.3" and "scaled 1.5"?


3. TeX and metafun: is there a better way to have the followtext exactly 
centered between the two circles rather than just fiddle with the scale 
factor?


4. Or is there a better approach to my problem altogether? I'm trying to 
reproduce an illustration from a book, so I'm very open to suggestions 
here. I looked at the example in the metafun manual chapter 10.4, but 
I'm not sure if using an overlay and multiple \followtokens would be 
easier. Especially since there is the scary remark "This definition is 
not the right one!" in this chapter without any further explanation.


I hope you all had a wonderful meeting last week. I was sad I couldn't 
come, I was in Paris for a conference, the first after 18 months, so I 
couldn't skip this one.


Thanks and best wishes

Thomas
___
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] Addition of authortitle sorttype for bibliographies

2021-10-04 Thread Joey McCollum via ntg-context
I'm not sure if this thread got lost back when I sent it, but I just wanted
to bump this thread again. The authortitle sort sequence detailed in the
previous e-mail is working as expected, and it may be a helpful addition to
the publ-aut.lua file for general use. In case the last e-mail was lost,
I've repeated the code below:

```
publications.sortmethods.authortitle = {
sequence = {
{ field = "author",default = "",   unknown = "" },
{ field = "title", default = "",   unknown = "" },
{ field = "booktitle", default = "",   unknown = "" }, --
if this is an untitled section (e.g., introduction, foreword, preface) of a
book or a review of a book
    { field = "maintitle", default = "",   unknown = "" }, --
if this is an untitled section or volume in a multivolume collection
{ field = "volume",default = "",   unknown = "" },
{ field = "part",  default = "",   unknown = "" },
{ field = "date",  default = "9998-13-32", unknown =
"-14-33" }, -- some specifications allow date instead of year, month,
day
{ field = "year",  default = "9998",   unknown = "" },
{ field = "month", default = "13", unknown = "14" },
{ field = "day",   default = "32", unknown = "33" },
{ field = "index", default = "",   unknown = "" },
},
}
```

Joey

On Sun, Sep 19, 2021 at 10:57 PM Joey McCollum 
wrote:

> Actually, since some categories (such as @review and @suppbook from
> biblatex) do not necessarily have titles of their own, it may be best to
> include a few other fields in the sort sequence to accommodate them. The
> following sequence may be better:
>
> ```
> publications.sortmethods.authortitle = {
> sequence = {
> { field = "author",default = "",   unknown = "" },
> { field = "title", default = "",   unknown = "" },
> { field = "booktitle", default = "",   unknown = "" }, --
> if this is an untitled section (e.g., introduction, foreword, preface) of a
> book or a review of a book
> { field = "maintitle", default = "",   unknown = "" }, --
> if this is an untitled section or volume in a multivolume collection
> { field = "volume",default = "",   unknown = "" },
> { field = "part",  default = "",   unknown = "" },
> { field = "date",  default = "9998-13-32", unknown =
> "-14-33" }, -- some specifications allow date instead of year, month,
> day
> { field = "year",  default = "9998",   unknown = "" },
> { field = "month", default = "13", unknown = "14" },
> { field = "day",   default = "32", unknown = "33" },
> { field = "index", default = "",   unknown = "" },
> },
> }
> ```
>
> It is also worth noting that in order for the volume field to sort
> properly, its values will have to be padded with leading zeroes; otherwise,
> an entry with volume = {2} will be sorted after one with volume = {10}. To
> accommodate this, specifications would need to remove the leading zeroes
> when they typeset volume and part numbers.
>
> Joey
>
> On Sun, Sep 19, 2021 at 2:02 PM Joey McCollum 
> wrote:
>
>> Hi,
>>
>> I've had to make another update to the general publications support code
>> in order to implement a feature of the SBL rendering. Denis Maier has
>> opened some issues on the context-sbl GitHub repo (
>> https://github.com/jjmccollum/context-sbl) to offer some helpful
>> suggestions about needed features and bug fixes. One issue was that SBL
>> should order list entries by author and title. Thankfully, there is already
>> an authordate sortmethod defined in publ-aut.lua (probably to support the
>> Chicago rendering), so I was able to use it as a template for the
>> following authortitle sort sequence:
>>
>> ```
>> publications.sortmethods.authortitle = {
>> sequence = {
>> { field

Re: [NTG-context] changes of color

2021-09-21 Thread fv leung via ntg-context
\starttext

It seems that the problem comes up when the same color as the surrounding
text is used in MPcode.\par
{
  \red
  text red\par
  \startMPcode
drawoptions(withcolor blue);
label("text blue in MPcode", origin);
  \stopMPcode
  \par
  text still red\par
  But\par
  text red\par
  \startMPcode
drawoptions(withcolor red);
label("text red in MPcode", origin);
  \stopMPcode
  \par
  text turns black\par
  Can get over with this:\par
  text red\par
  \startMPcode
drawoptions(withcolor red);
label("text red in MPcode", origin);
label("\null", origin); % add this seems to solve the problem
  \stopMPcode
  \par
  text still red\par
  Don't know why. Just an observation.
}

\stoptext

Thierry Horsin via ntg-context  於 2021年9月21日 週二
下午8:00寫道:

> Hi everybody
>
> After some part of a tex file where there is some startMPcode section the
> color of the text (e.g. blue) changes to black up until the next page in
> the pdf.
>
> Is there something I am missing ?
> Thank you.
> Thierry
>
> ___
> 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
___


[NTG-context] changes of color

2021-09-21 Thread Thierry Horsin via ntg-context
Hi everybody

After some part of a tex file where there is some startMPcode section the color 
of the text (e.g. blue) changes to black up until the next page in the pdf.

Is there something I am missing ?
Thank you.
Thierry
___
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] Addition of authortitle sorttype for bibliographies

2021-09-19 Thread Joey McCollum via ntg-context
Actually, since some categories (such as @review and @suppbook from
biblatex) do not necessarily have titles of their own, it may be best to
include a few other fields in the sort sequence to accommodate them. The
following sequence may be better:

```
publications.sortmethods.authortitle = {
sequence = {
{ field = "author",default = "",   unknown = "" },
{ field = "title", default = "",   unknown = "" },
{ field = "booktitle", default = "",   unknown = "" }, --
if this is an untitled section (e.g., introduction, foreword, preface) of a
book or a review of a book
    { field = "maintitle", default = "",   unknown = "" }, --
if this is an untitled section or volume in a multivolume collection
{ field = "volume",default = "",   unknown = "" },
{ field = "part",  default = "",   unknown = "" },
{ field = "date",  default = "9998-13-32", unknown =
"-14-33" }, -- some specifications allow date instead of year, month,
day
{ field = "year",  default = "9998",   unknown = "" },
{ field = "month", default = "13", unknown = "14" },
{ field = "day",   default = "32", unknown = "33" },
{ field = "index", default = "",   unknown = "" },
},
}
```

It is also worth noting that in order for the volume field to sort
properly, its values will have to be padded with leading zeroes; otherwise,
an entry with volume = {2} will be sorted after one with volume = {10}. To
accommodate this, specifications would need to remove the leading zeroes
when they typeset volume and part numbers.

Joey

On Sun, Sep 19, 2021 at 2:02 PM Joey McCollum 
wrote:

> Hi,
>
> I've had to make another update to the general publications support code
> in order to implement a feature of the SBL rendering. Denis Maier has
> opened some issues on the context-sbl GitHub repo (
> https://github.com/jjmccollum/context-sbl) to offer some helpful
> suggestions about needed features and bug fixes. One issue was that SBL
> should order list entries by author and title. Thankfully, there is already
> an authordate sortmethod defined in publ-aut.lua (probably to support the
> Chicago rendering), so I was able to use it as a template for the
> following authortitle sort sequence:
>
> ```
> publications.sortmethods.authortitle = {
> sequence = {
> { field = "author",  default = "", unknown = "" },
> { field = "title",   default = "", unknown = "" },
> { field = "date",  default = "9998-13-32", unknown =
> "-14-33" }, -- some specifications allow date instead of year, month,
> day
> { field = "year",default = "9998", unknown = "" },
> { field = "month",   default = "13",   unknown = "14" },
> { field = "day", default = "32",   unknown = "33" },
> { field = "index",   default = "", unknown = "" },
> },
> }
> ```
>
> I added this to publ-aut.lua because publications.sortmethods.authoryear
> is defined in that file, but if another location is more appropriate, then
> feel free to let me know, and I can move it! Otherwise, if this looks okay
> to include in a future update, then feel free to incorporate it!
>
> 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] improve bad habits deduplicate redundant defined values

2021-09-17 Thread Jan Ulrich Hasecke via ntg-context
Am Thu, Sep 16, 2021 at 08:09:50AM + schrieb denis.ma...@unibe.ch:
> Hi Jan Ulrich,
> 
> I have not much to contribute, but I'd be very happy to learn more about your 
> setup. 

You asked for it. ;-)

I started more than two years ago, with some documents for my
cooperative. I blogged about it: 
https://www.hasecke.eu/post/werbemittel-mit-context-gestalten/

Step by step I modularized my setup to reuse as many definitions as
possible in other documents. I started with our corporate colors and
fonts and then added page sizes, headlines etc.

This is an ongoing process as I have no overall plan to structure my
setup. It is work in progress. And the tendency is to split up
environment files into smaller ones.

When I see that I need another numbering system for legal texts like
bylaws I create an environment for legal numbering and for normal
numbering. 

I think that all this will end up in 20-30 environment files going from
general things like colors, fonts, page sizes to more specific things
like doubleside-headers-footers, singleside-headers-footers to product
specific things like env-factsheet for things that are special to
factsheets only.

Here are some of my environment files:

hs.env-2-seiter-din-lang-hoch.tex
hs.env-2-seiter-din-lang-quer.tex
hs.env-6-seiter-din-lang.tex
hs.env-bleed.tex
hs.env-chapter-section-subsection-toc.tex
hs.env-chapter-section-toc.tex
hs.env-chapter-toc.tex
hs.env-colors.tex
hs.env-coverpages.tex
hs.env-din-a4.tex
hs.env-din-brief-footer.tex
hs.env-din-lang-hoch.tex
hs.env-din-lang-quer.tex
hs.env-doubleside-formal-header-footer.tex
hs.env-doubleside-header-footer.bak
hs.env-elemente.tex
hs.env-factsheet.tex
hs.env-flyer.tex
hs.env-fonts.tex
hs.env-handout.tex
hs.env-headlines.tex
hs.env-kapitelnummerierung-gemeinwohl.tex
hs.env-kapitelnummerierung-satzung.tex
hs.env-lists-legal.tex
hs.env-lists.tex
hs.env-makeups.tex
hs.env-paragraphs.tex
hs.env-singleside-formal-header-footer.tex
hs.env-singleside-header-footer.tex
hs.env-tabellen.tex

It took a long time until I realized that these files are best stored in
texmf-project. I use namespaces like hs. and juh. to separate the
environment files of my cooperative and my own files. 

Our editors are using Markdown so we are currently creating a process to
go from Markdown via Pandoc to ConTeXT. We heavily use custom pandoc templates, 
where the used environment files are listed.

For each project we have such a directory structure:

build.sh # the build script

source/  # here are markdown files in their project directory
 #  (source/foo/foo.md)

control/ # here we story YAML-files for the pandoc options
 # and the ConTeXt templates.

The pdf is built with:

./build foo

A project can have multiple documents. A project eg. are business
reports or factsheets.

As we use Pandoc we could create HTML and EPUB files as well, but
currently we use Hugo to create HTML files.

As I am not a programmer the biggest task are lua scripts which alters
the output of Pandoc when we need something special. 

Eg. we managed to insert \startstopparagraph[foo] command into the
ConTeXt source by this simple markdown code:

normal paragraph

:::foo
special foo paragraph
yet special paragraph
:::

normal paragraph

Often I simply insert raw context code into the markdown source if I
want something special, but all this finally should go into ::: directives.

Mit freundlichen Grüßen
Jan Ulrich Hasecke

-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
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] Number conversion in btxlist and citations

2021-09-16 Thread kauśika cittūr via ntg-context
On Wednesday, September 15, 2021 8:08:59 PM IST kauśika cittūr wrote:
> Dear all,
> 
> I have a simple btx definition 'mylist' for which I have written a simple
> publ-imp-mylist.lua and publ-imp-mylist-mkvi. In that latter I have
> 
> ⋮
> \definebtx
>   [mylist]
>   [default=default,specification=mylist]
> \definebtxrendering
>[mylist]
>[specification=mylist]
> \setupbtxlist
>   [mylist]
>   [numberconversion=myconv]
> ⋮
> 
> I have define the required setups for every category entry as well. I have
> verified that this btxrendering works. I have also verified that my
> conversion set 'myconv' is functional (I am using it for page numbers and
> section headings).
> 
> However, the numbers used in the citation are not converted. That is,
> 'numberconversion=myconv' seems to have no effect. What am I doing wrong?
> 
> Please advise.
> 
> Thanks,
> kauśika

Dear all,

After looking through publ-imp-cite.mkvi I was able to piece together the 
following setup for my cite command

\definecounter
  [mycitecntr]
  [counter=mycitecntr]

\startsetups btx:mylist:cite:num
  \goto{\getnumber[mycitecntr]}[\s!internal(\currentbtxinternal)]
  \incrementnumber[mycitecntr]
\stopsetups

along with

\setupbtxlist
  [mylist]
  [counter=mycitecounter]

With this the citations numbers are converted properly, they do not start at 1 
but instead are offset from 1 by the total number of citations. Moreover, the 
list placed by \placelistofpublications still uses the regular numbers (i.e 
conversion does not occur).

Clearly I am doing something wrong. I am very grateful for any guidance.

Thanks,
kauśika


___
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] Number conversion in btxlist and citations

2021-09-16 Thread kauśika cittūr via ntg-context
On Wednesday, September 15, 2021 8:08:59 PM IST kauśika cittūr wrote:
> Dear all,
> 
> I have a simple btx definition 'mylist' for which I have written a simple
> publ-imp-mylist.lua and publ-imp-mylist-mkvi. In that latter I have
> 
> ⋮
> \definebtx
>   [mylist]
>   [default=default,specification=mylist]
> \definebtxrendering
>[mylist]
>[specification=mylist]
> \setupbtxlist
>   [mylist]
>   [numberconversion=myconv]
> ⋮
> 
> I have define the required setups for every category entry as well. I have
> verified that this btxrendering works. I have also verified that my
> conversion set 'myconv' is functional (I am using it for page numbers and
> section headings).
> 
> However, the numbers used in the citation are not converted. That is,
> 'numberconversion=myconv' seems to have no effect. What am I doing wrong?
> 
> Please advise.
> 
> Thanks,
> kauśika

Dear all,

I have also tried this with the available 'words' conversion set. Even in that 
case, the conversion is not performed.

Please help. I would gladly share more information if required. I am using the 
latest LMTX.

Thank you,
kauśika



___
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] Number conversion in btxlist and citations

2021-09-15 Thread kauśika cittūr via ntg-context
Dear all,

I have a simple btx definition 'mylist' for which I have written a simple 
publ-imp-mylist.lua and publ-imp-mylist-mkvi. In that latter I have

⋮
\definebtx
  [mylist]
  [default=default,specification=mylist]
\definebtxrendering
   [mylist]
   [specification=mylist]
\setupbtxlist
  [mylist]
  [numberconversion=myconv]
⋮

I have define the required setups for every category entry as well. I have 
verified that this btxrendering works. I have also verified that my conversion 
set 'myconv' is functional (I am using it for page numbers and section 
headings). 

However, the numbers used in the citation are not converted. That is, 
'numberconversion=myconv' seems to have no effect. What am I doing wrong?

Please advise.

Thanks,
kauśika


___
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] update

2021-09-13 Thread Hans Hagen via ntg-context

On 9/13/2021 10:14 PM, Henning Hraban Ramm wrote:



Am 13.09.2021 um 11:12 schrieb Hans Hagen :

On 9/13/2021 10:37 AM, Henning Hraban Ramm wrote:

Am 13.09.2021 um 10:07 schrieb Hans Hagen via ntg-context :

Hi,

I uploaded a new lmtx (had forgotten to to it friday) . There are not that many 
visible changes but on is that i'm playing with some 'improvements' to inserts. 
Hopefully there are no side effects but the idea is to have somewhat better 
(more robust and predictable) support for e.g. footnotes in situations that are 
not natural to tex (like columns). The first mechanism to benefit from that is 
page columns but all that is a stepwise process. I keep track of that in yet 
another lowlevel manual. These column things are on the agenda for next month 
and beyond.

(In a next upload the new marking and tabulate optimization might become 
default but for now i test that locally.)

Hi, thank you!
I’m looking forward to these improvements, even if they won’t be in effect for 
my talk in Bassenge.
Running a project with this version, I get tons of messages like:
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
4:10:  
\glue[userskip][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 0.0pt 
plus 0.83287pt minus 0.41644pt
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
4:10:  \glyph[32768][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1], hyphenationmode 
"79F3F, options "80, font <36: lmmono10-regular @ 10.0pt>, glyph U+70 p
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
Is this some debugging leftover or am I supposed to understand what’s wrong? ;)

hm, what command triggers that?


I don’t know yet. It seems to start in the middle of a section title in the 
first chapter of my book.


Oveefull boxes?


The footnotes unfortunately became only worse so far – often they’re 
overprinted by the running text, even without columns or grid.

I’ll try to come up with good examples, but this week is quite stuffed.

Ok.

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] Setting up the double pages of part beginnings

2021-09-13 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 13.09.2021 um 22:18:

In the absence of any other replies I think...

(a) your example is a good one. The only improvement would be to turn it into a 
2 across, 3 or 4 down set of mini pages imposed onto a larger one so that it 
can be rendered on the Wiki page without taking too much space. (I don't know 
how to do that - my experiments didn't go well!)

(b) the Titles page seems to be the right place for it, but that page is 
already quite long. Maybe your example could be put into its own page with a 
link from the Titles page examples section?


In the past the titles page was spread over many smaller pages with 
AFAIR a separate page for each layout.


Going to back to this doesn't seem to be the best idea but creating a 
new page for all examples can be useful.


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] Setting up the double pages of part beginnings

2021-09-13 Thread Bruce Horrocks via ntg-context
In the absence of any other replies I think...

(a) your example is a good one. The only improvement would be to turn it into a 
2 across, 3 or 4 down set of mini pages imposed onto a larger one so that it 
can be rendered on the Wiki page without taking too much space. (I don't know 
how to do that - my experiments didn't go well!)

(b) the Titles page seems to be the right place for it, but that page is 
already quite long. Maybe your example could be put into its own page with a 
link from the Titles page examples section?


> On 12 Sep 2021, at 19:58, Christian Dekant via ntg-context 
>  wrote:
> 
> Thank you, this works nicely. I put up a (minimal) working example of the 
> adapted code (it inserts an empty page, if the peceding chapter ends on an 
> even page) on the wiki, see
> 
> https://wiki.contextgarden.net/User_talk:Christian.Dekant
> 
> Is this interesting for other users as well? (Maybe on 
> https://wiki.contextgarden.net/Titles?) If not ... I guess it will do no harm 
> on my discussion page.
> 
> All the best
> Christian
> 
> Am 11.09.21 um 13:25 schrieb Wolfgang Schuster:
>> Christian Dekant via ntg-context schrieb am 10.09.2021 um 19:25:
>>> Dear List,
>>> 
>>> I am trying to set up double pages at the beginning of a new part in such a 
>>> way that:
>>> - on an odd/right-hand page there will be number and the title typeset in 
>>> some fashion, and
>>> - on the even/left-hand page there should be a full (printpaper)size image.
>> 
>> https://www.mail-archive.com/ntg-context@ntg.nl/msg94581.html
>> 
>> 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
> ___

—
Bruce Horrocks
Hampshire, UK

___
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] update

2021-09-13 Thread Henning Hraban Ramm via ntg-context

> Am 13.09.2021 um 11:12 schrieb Hans Hagen :
> 
> On 9/13/2021 10:37 AM, Henning Hraban Ramm wrote:
>>> Am 13.09.2021 um 10:07 schrieb Hans Hagen via ntg-context 
>>> :
>>> 
>>> Hi,
>>> 
>>> I uploaded a new lmtx (had forgotten to to it friday) . There are not that 
>>> many visible changes but on is that i'm playing with some 'improvements' to 
>>> inserts. Hopefully there are no side effects but the idea is to have 
>>> somewhat better (more robust and predictable) support for e.g. footnotes in 
>>> situations that are not natural to tex (like columns). The first mechanism 
>>> to benefit from that is page columns but all that is a stepwise process. I 
>>> keep track of that in yet another lowlevel manual. These column things are 
>>> on the agenda for next month and beyond.
>>> 
>>> (In a next upload the new marking and tabulate optimization might become 
>>> default but for now i test that locally.)
>> Hi, thank you!
>> I’m looking forward to these improvements, even if they won’t be in effect 
>> for my talk in Bassenge.
>> Running a project with this version, I get tons of messages like:
>> 4:10:  
>> \penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1]
>>  1
>> 4:10:  
>> \glue[userskip][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
>> 0.0pt plus 0.83287pt minus 0.41644pt
>> 4:10:  
>> \penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1]
>>  1
>> 4:10:  
>> \glyph[32768][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1], 
>> hyphenationmode "79F3F, options "80, font <36: lmmono10-regular @ 10.0pt>, 
>> glyph U+70 p
>> 4:10:  
>> \penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1]
>>  1
>> Is this some debugging leftover or am I supposed to understand what’s wrong? 
>> ;)
> hm, what command triggers that?

I don’t know yet. It seems to start in the middle of a section title in the 
first chapter of my book.

The footnotes unfortunately became only worse so far – often they’re 
overprinted by the running text, even without columns or grid.

I’ll try to come up with good examples, but this week is quite stuffed.

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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 9:45 AM, Wolfgang Schuster via ntg-context wrote:

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
    [default:test]
    [default]
    [cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka

With fonts like that we might end up in issues anyway:

\definefontfeature[default:test][default][mlxx=yes,wflm=yes]
\definedfont[file:iosevka.ttc(Iosevka)*default:test] :> <>

e.g.

WFLMWolfram Language (Mathematica)

so we get font specific 4 char feature names that themselves have script 
/ language specifications (like latin default and cyrillic serbian 
wolfram) ... these could have been ss* features (after all, cv and ss 
are wildcards and opentype has never been that consistent), not that it 
matters much because it gets processed anyway, but it's a clear signal 
that anyone can roll out adn use any feature name


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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 9:45 AM, Wolfgang Schuster via ntg-context wrote:

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
    [default:test]
    [default]
    [cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka


  \definefont
    [SomeFont]
    [name:iosevka*default:test]


@Marcel: I suggest to load ttc fonts with the file option.

\starttext
\definedfont[file:iosevka.ttc(Iosevka)*none]Iosevka
\stoptext

as it experimental anyway, i changed this trick to

\definefontfeature[default:test][default][cvxx={repeatlast:3}]

repeatmiddle and repeatfirst also supported (it also permits context 
users to play with runtime feature definitions using multiples that act 
as extensibles)


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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Wolfgang Schuster via ntg-context

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
[default:test]
[default]
[cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka


  \definefont
[SomeFont]
[name:iosevka*default:test]


@Marcel: I suggest to load ttc fonts with the file option.

\starttext
\definedfont[file:iosevka.ttc(Iosevka)*none]Iosevka
\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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Denis Maier via ntg-context
Oh, as a a more general response I can only reiterate what has been said 
already: Depending on your particular needs it might be better to start with 
some neutral input and generate output formats from there. There are plenty of 
options each with particular up- and downsides, e.g. markdown via pandoc, or 
asciidoc., or XML with XSLT. In the Racket ecosystem there's also 
scribble/pollen which looks quite interesting. I have never used that though.

Denis


> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Denis Maier via
> ntg-context
> Gesendet: Freitag, 10. September 2021 17:35
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) ;
> hugo.fis...@gmail.com
> Betreff: Re: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> 
> You may want to have a look at the lwarp package as an alternative to tex4ht.
> 
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: ntg-context  Im Auftrag von Hugh
> > Fisher via ntg-context
> > Gesendet: Freitag, 10. September 2021 13:14
> > An: ntg-context@ntg.nl
> > Cc: Hugh Fisher 
> > Betreff: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> >
> > I have documents in LaTeX, and would like to generate XHTML (ePub)
> > output without going through an intermediate DVI or PDF step.
> > Markup to markup, translating or transpiling rather than typesetting.
> >
> > My use case is that I have two tabletop gaming books, 60 - 80 pages of
> > text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very
> > happy with LaTeX and the wonderful PDF output for print.
> >
> > But now I also want to create ePub/XHTML as well as print versions.
> > So far I've tried tex4ebook and tex4ht and neither works for me.
> > Firstly, some of the LaTeX commands are not recognised or causing errors.
> >
> > And secondly, when I managed to get a small test section to work, the
> > generated XHTML/HTML is very large, full of tiny s. The problem
> > seems to be that tex4ht runs TeX which typesets everything into DVI
> > with every element carefully placed on a page, and then tex4ht tries
> > to reverse that back into HTML. All this extra HTML will slow down /
> > interfere with the ebook reader which is doing the final page layout at
> runtime on a particular device.
> >
> > How I would like it to work is directly from LaTeX to HTML without any
> > low level typesetting. If I have a LaTex source paragraph
> >
> > This is some text with \textbf{some parts} in bold.
> >
> > The TEX will copy the source text to the destination. If
> > there's a TeX command, here \textbf, it looks for a Lua function with
> > that name and invokes it with whatever argument text is present.
> > The Lua function emits , then recursively processes the argument
> > text, then emits . Similarly there would be an implied lookup of
> > \beginParagraph and \endParagraph which would emit  and .
> > Plain text just gets copied through unchanged.
> >
> >
> > So (finally) my question: is LuaMetaTEX what I'm looking for?
> >
> > Yes is the answer I'm hoping for. And any guidance would be much
> > appreciated.
> >
> > No, but best starting point? I've never tried modifying TeX code
> > itself, but I am an experienced and sometimes competent programmer.
> > who has written a compiler parser and a high level code generator.
> >
> > No and not a good idea to try?
> >
> > Any other responses?
> >
> >
> > --
> >
> > cheers,
> > Hugh Fisher
> >
> 
> > ___
> > 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Denis Maier via ntg-context
You may want to have a look at the lwarp package as an alternative to tex4ht.

Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hugh Fisher via
> ntg-context
> Gesendet: Freitag, 10. September 2021 13:14
> An: ntg-context@ntg.nl
> Cc: Hugh Fisher 
> Betreff: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
> 
> I have documents in LaTeX, and would like to generate XHTML (ePub) output
> without going through an intermediate DVI or PDF step.
> Markup to markup, translating or transpiling rather than typesetting.
> 
> My use case is that I have two tabletop gaming books, 60 - 80 pages of text 
> and
> diagrams, written for pdfLaTeX and now with XeLaTeX. I'm very happy with
> LaTeX and the wonderful PDF output for print.
> 
> But now I also want to create ePub/XHTML as well as print versions.
> So far I've tried tex4ebook and tex4ht and neither works for me.
> Firstly, some of the LaTeX commands are not recognised or causing errors.
> 
> And secondly, when I managed to get a small test section to work, the
> generated XHTML/HTML is very large, full of tiny s. The problem seems
> to be that tex4ht runs TeX which typesets everything into DVI with every
> element carefully placed on a page, and then tex4ht tries to reverse that back
> into HTML. All this extra HTML will slow down / interfere with the ebook
> reader which is doing the final page layout at runtime on a particular device.
> 
> How I would like it to work is directly from LaTeX to HTML without any low
> level typesetting. If I have a LaTex source paragraph
> 
> This is some text with \textbf{some parts} in bold.
> 
> The TEX will copy the source text to the destination. If there's a 
> TeX
> command, here \textbf, it looks for a Lua function with that name and invokes
> it with whatever argument text is present.
> The Lua function emits , then recursively processes the argument text, then
> emits . Similarly there would be an implied lookup of \beginParagraph and
> \endParagraph which would emit  and .
> Plain text just gets copied through unchanged.
> 
> 
> So (finally) my question: is LuaMetaTEX what I'm looking for?
> 
> Yes is the answer I'm hoping for. And any guidance would be much
> appreciated.
> 
> No, but best starting point? I've never tried modifying TeX code itself, but 
> I am
> an experienced and sometimes competent programmer.
> who has written a compiler parser and a high level code generator.
> 
> No and not a good idea to try?
> 
> Any other responses?
> 
> 
> --
> 
> cheers,
> Hugh Fisher
> 
> ___
> 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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Hans Hagen via ntg-context

On 9/10/2021 1:13 PM, Hugh Fisher via ntg-context wrote:


I have documents in LaTeX, and would like to generate XHTML (ePub)
output without going through an intermediate DVI or PDF step.
Markup to markup, translating or transpiling rather than typesetting.

My use case is that I have two tabletop gaming books, 60 - 80 pages
of text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm
very happy with LaTeX and the wonderful PDF output for print.


indeed, stay with what you're happy working with


But now I also want to create ePub/XHTML as well as print versions.
So far I've tried tex4ebook and tex4ht and neither works for me.
Firstly, some of the LaTeX commands are not recognised or causing
errors.


i suppose that you can define commands that somehow make your own 
commands export something; i have no experience with latex or tex4ht



And secondly, when I managed to get a small test section to work,
the generated XHTML/HTML is very large, full of tiny s. The
problem seems to be that tex4ht runs TeX which typesets everything
into DVI with every element carefully placed on a page, and then
tex4ht tries to reverse that back into HTML. All this extra HTML
will slow down / interfere with the ebook reader which is doing the
final page layout at runtime on a particular device.


that's probbaly because there is not enough info in the dvi file ... 
maybe you can use xslt to sanitize the spans?



How I would like it to work is directly from LaTeX to HTML without
any low level typesetting. If I have a LaTex source paragraph

 This is some text with \textbf{some parts} in bold.


so kind of interpreting


The TEX will copy the source text to the destination. If
there's a TeX command, here \textbf, it looks for a Lua function
with that name and invokes it with whatever argument text is present.
The Lua function emits , then recursively processes the argument
text, then emits . Similarly there would be an implied lookup
of \beginParagraph and \endParagraph which would emit  and .
Plain text just gets copied through unchanged.


i once played with this (context speak):

\def\textbf#1{\type{}#1\type{}}

so, you define all the commands that you use (normally a subset of what 
a macro package provides, you just ignore what doesn't make sense)


then you define a very large page (say A1) that you use completely

then you typeset the document in verbatim (nil headers and footers)

the resulting pdf can then be converted to html with pdftotex or 
something like that


so, basically, you just typeset the html


So (finally) my question: is LuaMetaTEX what I'm looking for?


in this area there is nothing in luametatex that luatex can't do


Yes is the answer I'm hoping for. And any guidance would be much
appreciated.


as said, i don't know latex but context has an xml export option
 > No, but best starting point? I've never tried modifying TeX code

itself, but I am an experienced and sometimes competent programmer.
who has written a compiler parser and a high level code generator.


so, if your source uses a limited set of commands you can write a parser 
(in any language)



No and not a good idea to try?

Any other responses?
you can consider coding your documents in xml and convert them to latex 
and html .. neutral input so to say


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] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?

2021-09-10 Thread Hugh Fisher via ntg-context
I have documents in LaTeX, and would like to generate XHTML (ePub)
output without going through an intermediate DVI or PDF step.
Markup to markup, translating or transpiling rather than typesetting.

My use case is that I have two tabletop gaming books, 60 - 80 pages
of text and diagrams, written for pdfLaTeX and now with XeLaTeX. I'm
very happy with LaTeX and the wonderful PDF output for print.

But now I also want to create ePub/XHTML as well as print versions.
So far I've tried tex4ebook and tex4ht and neither works for me.
Firstly, some of the LaTeX commands are not recognised or causing
errors.

And secondly, when I managed to get a small test section to work,
the generated XHTML/HTML is very large, full of tiny s. The
problem seems to be that tex4ht runs TeX which typesets everything
into DVI with every element carefully placed on a page, and then
tex4ht tries to reverse that back into HTML. All this extra HTML
will slow down / interfere with the ebook reader which is doing the
final page layout at runtime on a particular device.

How I would like it to work is directly from LaTeX to HTML without
any low level typesetting. If I have a LaTex source paragraph

This is some text with \textbf{some parts} in bold.

The TEX will copy the source text to the destination. If
there's a TeX command, here \textbf, it looks for a Lua function
with that name and invokes it with whatever argument text is present.
The Lua function emits , then recursively processes the argument
text, then emits . Similarly there would be an implied lookup
of \beginParagraph and \endParagraph which would emit  and .
Plain text just gets copied through unchanged.


So (finally) my question: is LuaMetaTEX what I'm looking for?

Yes is the answer I'm hoping for. And any guidance would be much
appreciated.

No, but best starting point? I've never tried modifying TeX code
itself, but I am an experienced and sometimes competent programmer.
who has written a compiler parser and a high level code generator.

No and not a good idea to try?

Any other responses?


-- 

cheers,
Hugh Fisher
___
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] TOC labeltext and no partlabel

2021-08-24 Thread Adam Reviczky via ntg-context
Hi,

I have asked this question before, but now I cannot get it working again.
https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc

I want to set partlabels in my TOC but not in the document itself.

The desired output would be:
---
Contents
Chapter 1 Bodypart
Appendix A Appendix

1 Bodypart
A Appendix
---

Based on Wolfgang's example, I am trying this MWE:

\setuplabeltext[en][chapter=Chapter~]
\setuplabeltext[en][appendix=Appendix~]

\setuplist[chapter][label=yes,width=fit,stopper=~]
\setuphead[chapter][bodypartlabel=,appendixlabel=]

\starttext

\startfrontmatter
\completecontent[label=section]
\stopfrontmatter

\startbodymatter
\chapter{Bodypart}
\stopbodymatter

\startappendices
\chapter{Appendix}
\stopappendices

\stoptext

But that does not show the labels in the TOC (trying it with LMTX and MKIV).

I must be doing something wrong.
Any hints?

Thanks,
Adam
___
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] numbered exercises

2021-08-24 Thread Henning Hraban Ramm via ntg-context
Hi, I’m typesetting a textbook that contains numbered and indented exercises. 
They must not float.

Which structure should I use for them? There must be an easy answer, but I draw 
a blank.

At the moment I’m using heads, derived from 'section', but the exercises should 
have independent numbers, and I’m unsure how I should setup the indentation. 
With 'narrower' the numbered titles would be difficult.


\setuplabeltext[en][Exercise=Exercise~]

\definehead[Exercise][section]
\setuphead[Exercise][
  bodypartlabel=Exercise,
  number=yes,
  ownnumber=yes, % ??
  way=bytext, % ??
]

\starttext

\startExercise[title={Something to do},reference=ex:something]

This can have several paragraphs and maybe images etc.

\stopExercise

\stoptext



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] different preffixsegments for different reference formats

2021-08-21 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \starttext
  \definereferenceformat[itsc][in]
  \setupreferencestructureprefix[itsc][default]
[prefixsegments=section]
  \chapter{Chapter}
  \section[b]{Section}
  \itsc[b] and \in[b]
  \stoptext

How can I get that \itsc gets "prefixsegments=section" without affecting
to \in?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Using Lua to format lecture titles

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

noib3 via ntg-context schrieb am 17.08.2021 um 16:43:
I'm trying to create a new lecture environment starting from the base 
section.


I'd like its title to be `Lecture : ` if a title is 
provided, and `Lecture ` if it isn't. This title should also be 
reported in the left footer and in the table of contents.


This is the code I have so far:

[...]

Unfortunately none of them are reported correctly. The title in the body 
is formatted simply as `Lecture`, the one in the left footer is 
formatted as `Lecture`, and the one in the table of 
contents isn't affected at all.


Why do you need Lua to format the list entries and section titles?

\definehead
  [lecture]
  [section]

\define[1]\LectureTextCommand
  {\doiftext{#1}{: #1}}

\setuphead
  [lecture]
  [bodypartlabel=lecture,
   distance=0pt,
   textcommand=\LectureTextCommand,
   style=\bfc]

\setuplabeltext
  [en]
  [lecture={Lecture }]

\setupcombinedlist
  [content]
  [list={lecture}]

\define[3]\LectureListCommand
  {\labeltext{lecture}#1\doiftext{#2}{: #2}\filler[dotfill]#3\par}

\setuplist
  [lecture]
  [alternative=command,
   command=\LectureListCommand]

\startsetups [footer:left]
\labeltext{lecture} \getmarking[lecturenumber]
\doiftext{\getmarking[lecture]}{: \getmarking[lecture]}
\stopsetups

\setupfootertexts
  [\directsetup{footer:left}] []

\starttext

\completecontent

\startlecture [title={Foo}]
Foo bar baz
\stoplecture

\page

\startlecture
Foo bar baz
\stoplecture

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


<    1   2   3   4   5   6   7   8   9   10   >