[NTG-context] Re: Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 14.04.2024 um 14:53:

Am 14.04.24 um 14:46 schrieb Wolfgang Schuster:

garu...@azules.eu schrieb am 14.04.2024 um 12:41:

Hi all,

Is it on purpose that 128 pages 
"https://wiki.contextgarden.net/Command/ " start with a 
space character ?

I didn't find an explanation in https://wiki.contextgarden.net/Command

For example, these two pages exist :
- https://wiki.contextgarden.net/Command/startbuffer
- https://wiki.contextgarden.net/Command/_startbuffer

If it is on purpose:
- What is the purpose, and which page should contain which 
documentation?


The command pages which start with an underscore are probably leftovers
when Taco changed a page from manual command descriptions to auto
generated tables.

In the process to change the page he makes a copy of the current page
with an underscore at the beginning which is deleted after the change
but it's possible he forgot to delete a few of them.

When you notice no difference between both versions of a command page
you can delete all of the forgotten pages.


No!

These are the general pages in opposite to instance pages, e.g. 
"startsection" and "startchapter" are instances of "_startsection"?


https://wiki.contextgarden.net/Command/_placefloat is the general page 
for the instances placefigure, placetable etc.


My bad, thank you for the correction!

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread Henning Hraban Ramm

Am 14.04.24 um 14:46 schrieb Wolfgang Schuster:

garu...@azules.eu schrieb am 14.04.2024 um 12:41:

Hi all,

Is it on purpose that 128 pages 
"https://wiki.contextgarden.net/Command/ " start with a space 
character ?

I didn't find an explanation in https://wiki.contextgarden.net/Command

For example, these two pages exist :
- https://wiki.contextgarden.net/Command/startbuffer
- https://wiki.contextgarden.net/Command/_startbuffer

If it is on purpose:
- What is the purpose, and which page should contain which documentation?


The command pages which start with an underscore are probably leftovers
when Taco changed a page from manual command descriptions to auto
generated tables.

In the process to change the page he makes a copy of the current page
with an underscore at the beginning which is deleted after the change
but it's possible he forgot to delete a few of them.

When you notice no difference between both versions of a command page
you can delete all of the forgotten pages.


No!

These are the general pages in opposite to instance pages, e.g. 
"startsection" and "startchapter" are instances of "_startsection"?


https://wiki.contextgarden.net/Command/_placefloat is the general page 
for the instances placefigure, placetable etc.


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread garulfo
Hi all,

Is it on purpose that 128 pages "https://wiki.contextgarden.net/Command/ 
" start with a space character ?
I didn't find an explanation in https://wiki.contextgarden.net/Command

For example, these two pages exist :
- https://wiki.contextgarden.net/Command/startbuffer
- https://wiki.contextgarden.net/Command/_startbuffer

If it is on purpose: 
- What is the purpose, and which page should contain which documentation?

If it is not: 
- Is there a way to automatically merge the content of the couple of pages, and 
to remove the "wrong" pages, or should it be done manually ?

Thanks for your help.

List :
Command/ attachment
Command/ background
Command/ bar
Command/ beginblock
Command/ button
Command/ characterkerning
Command/ comment
Command/ completecombinedlist
Command/ completelistoffloats
Command/ completelistofsorts
Command/ completelistofsynonyms
Command/ completeregister
Command/ copylabeltext
Command/ ctxfunction
Command/ ctxfunctiondefinition
Command/ currentlabel
Command/ delimitedtext
Command/ description
Command/ enumeration
Command/ fence
Command/ fraction
Command/ framed
Command/ framedtext
Command/ getbuffer
Command/ hbox
Command/ help
Command/ high
Command/ highlight
Command/ label
Command/ labellanguage
Command/ labeltext
Command/ labeltexts
Command/ language
Command/ leftlabeltext
Command/ linenote
Command/ low
Command/ lowhigh
Command/ lowmidhigh
Command/ margindata
Command/ mathcommand
Command/ mathdoubleextensible
Command/ mathextensible
Command/ mathframed
Command/ mathmatrix
Command/ mathornament
Command/ mathoverextensible
Command/ mathovertextextensible
Command/ mathradical
Command/ mathtriplet
Command/ mathunderextensible
Command/ mathundertextextensible
Command/ mathunstacked
Command/ nextparagraphs
Command/ note
Command/ ornament
Command/ paragraphs
Command/ placecombinedlist
Command/ placefloat
Command/ placelistoffloats
Command/ placelistofsorts
Command/ placelistofsynonyms
Command/ placement
Command/ placepairedbox
Command/ placeregister
Command/ presetlabeltext
Command/ referenceformat
Command/ register
Command/ rightlabeltext
Command/ script
Command/ section
Command/ seeregister
Command/ setupcombinedlist
Command/ setupitemgroup
Command/ setuplabeltext
Command/ setuppairedbox
Command/ setupregister
Command/ shift
Command/ sorting
Command/ startattachment
Command/ startbackground
Command/ startbuffer
Command/ startcolumnset
Command/ startcomment
Command/ startdelimitedtext
Command/ startdescription
Command/ starteffect
Command/ startenumeration
Command/ startfittingpage
Command/ startfloattext
Command/ startformula
Command/ startframedtext
Command/ starthelp
Command/ startindentedtext
Command/ startitemgroup
Command/ startlabeltext
Command/ startlinenote
Command/ startlines
Command/ startmakeup
Command/ startmathalignment
Command/ startmathcases
Command/ startmathmatrix
Command/ startmixedcolumns
Command/ startnarrower
Command/ startnote
Command/ startpagecolumns
Command/ startparagraphs
Command/ startparallel
Command/ startplacefloat
Command/ startplacepairedbox
Command/ startsection
Command/ startsectionblock
Command/ startstartstop
Command/ startstop
Command/ startstyle
Command/ starttabulate
Command/ starttextbackground
Command/ starttyping
Command/ startviewerlayer
Command/ startxtable
Command/ stoplinenote
Command/ style
Command/ synonym
Command/ textbackground
Command/ textnote
Command/ tooltip
Command/ type
Command/ typebuffer
Command/ unit
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: how to apply metapost effects to section title?

2024-04-09 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 09.04.2024 um 14:53:

i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
   style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext


You can't use commands with parameters as argument for the style key.

To format single parts (number or title) of a section title you have to 
apply a command to the "deep...command" key but even then you have to 
make manual changes to the vertical alignment of the text.


 begin example
\starttexdefinition spaces Mystyle #1
  \setbox\scratchboxone\hbox{#1}%
  \setbox\scratchboxtwo\hbox\bgroup
\startMPcode
  picture tt ; tt := lmt_outline [
kind = "path",
text = "#1",
  ];
fill
  for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
  \egroup
  \boxyoffset\scratchboxtwo-\dp\scratchboxone
  \box\scratchboxtwo
\stoptexdefinition

\starttext

\setuphead
  [section]
  [
 deeptextcommand=\Mystyle,
%  deepnumbercommand=\Mystyle,
  ]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\stoptext
 end example


and the code below works but does not colorize numbers of this heads:
\starttext
 
\def\Mystyle#1{\startMPcode

   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}
 
\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}
 
\startMysection{hello}

what is best method?
\stopMysection
 
\stoptext


what is your suggestion?


To apply the format the the complete section title you have to create 
your own style and apply it with the "command" key, to get the number 
and title for the current section use the \structurenumber and 
\structuretitle macros.


 begin example
\starttexdefinition spaces protected Mystyle #1#2
  \startMPcode
picture tt ; tt := lmt_outline [
  kind = "path",
  text = "\structurenumber\space\structuretitle",
];
  fill
for i within tt : pathpart i && endfor cycle
withshademethod "linear"
withshadedirection up
withshadecolors (red, blue) ;
  \stopMPcode
\stoptexdefinition

\starttext

\setuphead
  [section]
  [command=\Mystyle]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\stoptext
 end example

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] how to apply metapost effects to section title?

2024-04-09 Thread seyal . zavira
i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
  picture tt ; tt := lmt_outline [
  kind = "path",
  text = "#1",
  ] ;
  fill
  for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
  style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext

and the code below works but does not colorize numbers of this heads:
\starttext  



\def\Mystyle#1{\startMPcode 

  picture tt ; tt := lmt_outline [  

  kind = "path",

  text = "#1",  

  ] ;   

  fill  

  for i within tt : pathpart i && endfor cycle  

 withshademethod "linear"   

 withshadedirection up  

 withshadecolors (red, blue) ;  

\stopMPcode 

}   



\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}



\startMysection{hello}  

what is best method?

\stopMysection  



\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Use of marking

2024-03-21 Thread Thomas Meyer

Hi Pablo and Bruce,

thank you very much for your two solutions. That helps me enormously now.

Greetings
Thomas

Am 21.03.24 um 16:34 schrieb Bruce Horrocks:

\startsetups[doc:header]
   \getmarking[chapternumber] \space - \space \getmarking[chapter]
   \space :: \space
   \getmarking[sectionnumber] \space - \space \getmarking[section]
\stopsetups
\setupheadertexts[\setup{doc:header}]

\starttext
\dorecurse{10}{
   \startchapter[title={This is my chapter}]
   This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv

   \startsection[title={This is my section}]
This is a section\par \dorecurse{6}{\input knuth }\input math-kontinuitet-sv
   \stopsection
   \stopchapter
}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Use of marking

2024-03-21 Thread Bruce Horrocks


> On 20 Mar 2024, at 18:45, Andres Conrado Montoya  
> wrote:
> 
> 2. As far as I have found, including the chapter/section number in the 
> marking is not really a trivial task. I usually hack something using 
> \headnumber and \getmarking, like so: 

You can do the following:

\startsetups[doc:header]
  \getmarking[chapternumber] \space - \space \getmarking[chapter]
  \space :: \space
  \getmarking[sectionnumber] \space - \space \getmarking[section]
\stopsetups
\setupheadertexts[\setup{doc:header}]

\starttext
\dorecurse{10}{
  \startchapter[title={This is my chapter}]
  This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv

  \startsection[title={This is my section}]
   This is a section\par \dorecurse{6}{\input knuth }\input math-kontinuitet-sv
  \stopsection
  \stopchapter
}
\stoptext

Caveat: it needs an if...then test around the section number for when a section 
hasn't started.
—
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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Use of marking

2024-03-20 Thread Andres Conrado Montoya
As I understand, Thomas needs a layout in which the header shows something
like

1. Chapter title -- 1.1. Section title (including the numbers! *This is the
important bit!*)

There are a couple things about this:

1. In a section (part, chapter, section, etc.) you can introduce three
versions of the title for that section. title= is the general one and if
nothing else is specified, this will be used in markings (headers or footer
or wherever you want to put therm) and in listings (contents). If you give
those arguments, marking= and listing=, you will get those texts in those
places: marking= on markings (you can call them with \getmarking) and
listing= in the table of contents.

2. As far as I have found, including the chapter/section number in the
marking is *not really a trivial task*. I usually hack something using
\headnumber and \getmarking, like so:

\setuppagenumbering[alternative=doublesided,location=,]

\setupheadertexts[{\headnumber[section].~\getmarking[section]}---{\headnumber[chapter].~\getmarking[chapter]}]
\setupfootertexts[][pagenumber][pagenumber][]
\setuphead[chapter][header=high]

\starttext
\dorecurse{10}{
  \startchapter[title={This is my chapter}]
  This is a chapter\par \dorecurse{6}{\input knuth } \input
math-kontinuitet-sv

  \startsection[title={This is my section}]
   This is a section\par \dorecurse{6}{\input knuth }\input
math-kontinuitet-sv
  \stopsection
  \stopchapter
}
\stoptext

But with a caveat: the `header=high` setting in setuphead for the chapter
needs to be included, or you will get a section number in the first page,
even if there is no section. I have not found a better mechanism yet, but
I'm quite sure there is a correct solution for this... I just haven't found
it yet. Checking for the presence of \getmarking[section] with
\doifsomething does not work, or I could not make it work.

A little bit more info here:
https://wiki.contextgarden.net/Command/getmarking
https://wiki.contextgarden.net/Command/headnumber


El mié, 20 mar 2024 a las 9:23, Hraban Ramm () escribió:

> \setupheadtext[de][section=Aufgabe]
> Rename the section, then you don’t need marking.
>
> Sorry, I'm in a hurry and must look up how to get the number…
>
>
> Am 20.03.24 um 12:18 schrieb Thomas Meyer:
>
> Hi Hraban,
>
> and thanks.
>
> setuphead[chapter,section][numberwidth=2em] or "fit"
> works!
>
> I know \setupheadertexts, but do not know what shall I write here:
> \startsection[titel=Aufgabe, marking=?]
> If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same.
>
> \setupheadertexts
>[] [{\getmarking[chapter]} - {\getmarking[section]}]
> [{\getmarking[chapter]} - {\getmarking[section]}] []
> > Kapitel - Aufgabe
>
>
> Thanks in advance
> Greetings
> Thomas
>
>
> Am 20.03.24 um 09:09 schrieb Hraban Ramm:
>
>
> Am 20.03.24 um 08:18 schrieb Thomas Meyer:
>
> HI folks,
>
> yesterday while reading along I learned how to suppress the chapter
> numbers in sections. That was something I was looking for myself.
>
> But how do you use marking correctly in startsection? I would like to see
> "1. Kapitel - 1. Aufgabe" in the header on the right. How can I automate
> this with marking?
> And how can I reduce the space between the number (1.) and the title
> (Kapitel or Aufgabe)?
>
> Thanks for your help
> Thomas
>
> Hi Thomas,
>
> do you know how to use \setupheadertexts?
>
> https://wiki.contextgarden.net/Command/setupheadertexts
>
> I guess you're using the section level for "Aufgabe"?
>
> Then something like {\getmarking{chapter} – \getmarking{section}} might
> fit your request.
>
> The formatting should be possible with
> \setuphead[chapter,section][numberwidth=2em] or "fit".
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___
>
>
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>

[NTG-context] Re: Use of marking

2024-03-20 Thread Hraban Ramm

\setupheadtext[de][section=Aufgabe]
Rename the section, then you don’t need marking.

Sorry, I'm in a hurry and must look up how to get the number…

Am 20.03.24 um 12:18 schrieb Thomas Meyer:

Hi Hraban,

and thanks.

setuphead[chapter,section][numberwidth=2em] or "fit"
works!

I know \setupheadertexts, but do not know what shall I write here:
\startsection[titel=Aufgabe, marking=?]
If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same.

\setupheadertexts
   [] [{\getmarking[chapter]} - {\getmarking[section]}] 
[{\getmarking[chapter]} - {\getmarking[section]}] []

> Kapitel - Aufgabe


Thanks in advance
Greetings
Thomas


Am 20.03.24 um 09:09 schrieb Hraban Ramm:



Am 20.03.24 um 08:18 schrieb Thomas Meyer:

HI folks,

yesterday while reading along I learned how to suppress the chapter 
numbers in sections. That was something I was looking for myself.


But how do you use marking correctly in startsection? I would like 
to see "1. Kapitel - 1. Aufgabe" in the header on the right. How can 
I automate this with marking?
And how can I reduce the space between the number (1.) and the title 
(Kapitel or Aufgabe)?


Thanks for your help
Thomas


Hi Thomas,

do you know how to use \setupheadertexts?

https://wiki.contextgarden.net/Command/setupheadertexts

I guess you're using the section level for "Aufgabe"?

Then something like {\getmarking{chapter} – \getmarking{section}} 
might fit your request.


The formatting should be possible with 
\setuphead[chapter,section][numberwidth=2em] or "fit".


Hraban


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

maillist :ntg-context@ntg.nl  
/https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  :https://www.pragma-ade.nl  /https://context.aanhet.net  (mirror)
archive  :https://github.com/contextgarden/context
wiki :https://wiki.contextgarden.net
___



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

maillist :ntg-context@ntg.nl  
/https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  :https://www.pragma-ade.nl  /https://context.aanhet.net  (mirror)
archive  :https://github.com/contextgarden/context
wiki :https://wiki.contextgarden.net
__
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Use of marking

2024-03-20 Thread Thomas Meyer

Hi Hraban,

and thanks.

setuphead[chapter,section][numberwidth=2em] or "fit"
works!

I know \setupheadertexts, but do not know what shall I write here:
\startsection[titel=Aufgabe, marking=?]
If I write marking=Aufgabe I get Aufgabe, no number! For chapter the same.

\setupheadertexts
   [] [{\getmarking[chapter]} - {\getmarking[section]}] 
[{\getmarking[chapter]} - {\getmarking[section]}] []

> Kapitel - Aufgabe


Thanks in advance
Greetings
Thomas


Am 20.03.24 um 09:09 schrieb Hraban Ramm:



Am 20.03.24 um 08:18 schrieb Thomas Meyer:

HI folks,

yesterday while reading along I learned how to suppress the chapter 
numbers in sections. That was something I was looking for myself.


But how do you use marking correctly in startsection? I would like to 
see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I 
automate this with marking?
And how can I reduce the space between the number (1.) and the title 
(Kapitel or Aufgabe)?


Thanks for your help
Thomas


Hi Thomas,

do you know how to use \setupheadertexts?

https://wiki.contextgarden.net/Command/setupheadertexts

I guess you're using the section level for "Aufgabe"?

Then something like {\getmarking{chapter} – \getmarking{section}} 
might fit your request.


The formatting should be possible with 
\setuphead[chapter,section][numberwidth=2em] or "fit".


Hraban


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

maillist :ntg-context@ntg.nl  
/https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  :https://www.pragma-ade.nl  /https://context.aanhet.net  (mirror)
archive  :https://github.com/contextgarden/context
wiki :https://wiki.contextgarden.net
___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Use of marking

2024-03-20 Thread Hraban Ramm


Am 20.03.24 um 08:18 schrieb Thomas Meyer:

HI folks,

yesterday while reading along I learned how to suppress the chapter 
numbers in sections. That was something I was looking for myself.


But how do you use marking correctly in startsection? I would like to 
see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I 
automate this with marking?
And how can I reduce the space between the number (1.) and the title 
(Kapitel or Aufgabe)?


Thanks for your help
Thomas


Hi Thomas,

do you know how to use \setupheadertexts?

https://wiki.contextgarden.net/Command/setupheadertexts

I guess you're using the section level for "Aufgabe"?

Then something like {\getmarking{chapter} – \getmarking{section}} might 
fit your request.


The formatting should be possible with 
\setuphead[chapter,section][numberwidth=2em] or "fit".


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Use of marking

2024-03-20 Thread Thomas Meyer

HI folks,

yesterday while reading along I learned how to suppress the chapter 
numbers in sections. That was something I was looking for myself.


But how do you use marking correctly in startsection? I would like to 
see "1. Kapitel - 1. Aufgabe" in the header on the right. How can I 
automate this with marking?
And how can I reduce the space between the number (1.) and the title 
(Kapitel or Aufgabe)?


Thanks for your help
Thomas

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Mikael’s missing math manual

2024-03-18 Thread Hraban Ramm

Am 18.03.24 um 07:36 schrieb Mikael Sundqvist:

Hi,

On Sun, Mar 17, 2024 at 10:57 PM Hraban Ramm  wrote:

… and another thing that came up in my workshops and in discussions at
our booth: the math manual is eagerly awaited! (My book too, but I can’t
answer most questions about math.)

Oh, I see. So, I should really try to get something out. It is
difficult to find enough time working on it, in particular since Hans
is always adding new (not only math) stuff, but I will try. It is fun
to participate in the development, and I do not want to delay it
(somebody has to push him and test, and so on...)

But I should probably get something out, even if that is not really
finished/polished. All the basics are there. Then it can be a
work-in-progress document, adding/modifying new stuff.


Yes, please! The version that you gave me a year ago is already really 
interesting and helpful, and Hans’ manuals are also often "in progress". 
A visible TODO marker might help – I’m using the following in my book to 
keep track of incomplete sections:


\defineregister[todos]
\define[1]\TODO{\inouter{\tt\color[red]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[red]{\bf
 #1}\autoinsertnextspace}

…
\startsection[title=Lists]
\TODO{Research the options of \tex{setupitemgroup}!}
\stopsection
…

\startchapter[title=Work list]
  Sections that still need work.\blank

  \placetodos
\stopchapter

So I get a prominent marker in the content and the title of the affected 
section as an index.



There have been many changes along the way, and maybe at some time
some things were not really working, but later fixed.


I thought so, too.

For promotion I’d like to have a few examples where the difference 
between TeX/LaTeX default rendering and new ConTeXt rendering is visible.


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: How to set section title based on section content?

2024-03-09 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 09.03.2024 um 16:01:

How to set section title based on section content?

I have a document that has some structures like this:

\starttext

\startsection[title={Animals}]

\event{\input knuth }

\stopsection

\startsection[title={Books}]

\event{\input knuth }

\stopsection

\stoptext

The event macro runs a bunch of conditionals, deciding which content to 
place inside the section. It places any one of neary 200 possible 
different types of content there.


Sadly when I wrote the code, I thought generic titles would be okay. Now 
I realize I need to be more specific, giving titles that match the 
content inside. I could move the section titles inside the \event macro, 
but it means rewriting ~200 other macros.


In other words, how do I define a section title by defining it somewhere 
in the content of the \event macro?


\starttext

\startsection[\whatistitle] %<-- would display "Neon Tetras"

\event{\thetitleis{Neon Tetras}\input knuth }

\stopsection

\startsection[\whatistitle] %<-- would display "Detective Stories"

\event{\thetitleis{Detective Stories}\input knuth }

\stopsection

\stoptext


When each section contains nothing except the \event command I would 
remove the section titles from the document itself and place them as 
part of the \event command.


\define[1]\Event
  {\startsection[title={#1}]
   \input{knuth}
   \stopsection}

\starttext

\Event{Neon Tetras}

\Event{Detective Stories}

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] How to set section title based on section content?

2024-03-09 Thread Joel via ntg-context
How to set section title based on section content?

I have a document that has some structures like this:

\starttext

\startsection[title={Animals}]

\event{\input knuth }

\stopsection

\startsection[title={Books}]

\event{\input knuth }

\stopsection

\stoptext

The event macro runs a bunch of conditionals, deciding which content to place 
inside the section. It places any one of neary 200 possible different types of 
content there.

Sadly when I wrote the code, I thought generic titles would be okay. Now I 
realize I need to be more specific, giving titles that match the content 
inside. I could move the section titles inside the \event macro, but it means 
rewriting ~200 other macros.

In other words, how do I define a section title by defining it somewhere in the 
content of the \event macro?

\starttext

\startsection[\whatistitle] %<-- would display "Neon Tetras"

\event{\thetitleis{Neon Tetras}\input knuth }

\stopsection

\startsection[\whatistitle] %<-- would display "Detective Stories"

\event{\thetitleis{Detective Stories}\input knuth }

\stopsection

\stoptext





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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Suggestions and problems of the manuals

2024-01-17 Thread Gerion Entrup
ollected, 0 deltas, 0 shared partials, 
0 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.10.11, 
functionality level: 20231231, format id: 698, compiler: gcc
mkiv lua stats  > tex properties: 807097 hash slots used of 2097152, 
50666 control sequences, approximate memory usage: 49 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 84 MB, 
ctx: 80 MB, max: 80 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.528 seconds, 1 processed pages, 1 shipped 
pages, 1.895 pages/second
mtx-context | purged files: 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.log, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tmp, 
math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tuc
system  | total runtime: 1.044 seconds of 1.071 seconds

buffers > typeset > no changes in 'demo-4', processing skipped
floatblocks > '3' limited
floatblocks > 3 saved
pages   > flushing realpage 14, userpage 12, subpage 14
floatblocks > 1 moved
floatblocks > 2 moved
floatblocks > 3 moved
pages   > flushing realpage 15, userpage 13, subpage 15
pages   > flushing realpage 16, userpage 14, subpage 16
pages   > flushing realpage 17, userpage 15, subpage 17
pages   > flushing realpage 18, userpage 16, subpage 18
pages   > flushing realpage 19, userpage 17, subpage 19
structure   > sectioning > section @ level 3 : 0.3.1 -> Scripts
tex error   > tex error on line 370 in file 
/home/gerion/src/context/doc/context/sources/general/manuals/math/math-spacing.tex:
 Math error: parameter 'subshiftdown' with id 49 in style 2 is not set

 \math_m_nop
#1->\relax \ifmmode #1\else \normalstartimath 
\usemathstyleparameter \mathematicsparameter \c!mathstyle \expand 
\everyinsidemathematics \relax \begingroup #1\endgroup \normalstopimath
\fi

{\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b}
} {Cambria}

360 font can be very detailed in where italic correction is to be 
applied and how
361 advanced stepwise kerns are used, but not many fonts have 
extensive information.
362 Here are some differences in rendering. In \OPENTYPE\ the 
super- and subscript of
363 an integral are moved right and left half of the italic 
correction.
364
365 \startlinecorrection
366 \startcombination[6*1]
367 {\switchtobodyfont  [modern]\math{F_j = \int\nolimits 
_a^b}} {Latin Modern}
368 {\switchtobodyfont [pagella]\math{F_j = \int\nolimits 
_a^b}} {Pagella}
369 {\switchtobodyfont  [dejavu]\math{F_j = \int\nolimits 
_a^b}} {Dejavu}
370 >>  {\switchtobodyfont [cambria]\math{F_j = \int\nolimits 
_a^b}} {Cambria}
371 {\switchtobodyfont[lucidaot]\math{F_j = \int\nolimits 
_a^b}} {Lucida OT}
372 {\switchtobodyfont[xits]\math{F_j = \int\nolimits 
_a^b}} {Xits}
373 \stopcombination
374 \stoplinecorrection
375
376 \stopsection
377
378 \startsection[title=Bad fonts]
379
380 There might be fonts out there where the italic correction is 
supposed to be
Sorry, but I can't typeset math unless various parameters have been 
set. This is
normally done by loading special math fonts into the math family slots. 
Your font
set is lacking at least the parameter mentioned earlier.
mtx-context | fatal error: return code: 1
- I tried to find a prebuild version and found 
https://mirror.contextgarden.net/general/manuals/math-mkiv.pdf.
  However, this document seems to be from 2021 and has a kind of wobbly
  rendering in Okular/Poppler (I remember the same phenomena with early
  LMTX). See the screenshot attached (math-mkiv-online.png). Is there a
  newer version somewhere? Maybe it is meaningful to delete the old
  version.


Best
Gerion
From 187f2bf0901d414bf55869054d29ee2c4bec1a64 Mon Sep 17 00:00:00 2001
From: Gerion Entrup 
Date: Tue, 16 Jan 2024 23:40:40 +0100
Subject: [PATCH] units-mkiv: improve

- typos
- remove getbuffer without context
- demonstrate usage of pm and to
---
 doc/context/sources/general/manuals/units/units-mkiv.tex | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/doc/context/sources/general/manuals/units/units-mkiv.tex b/doc/context/sources/general/manuals/units/units-mkiv.tex
index d70c7221f..a1631aadb 100644
--- a/doc/context/sources/general/manuals/units/units-mkiv.tex
+++ b/doc/context/sources/general/manu

[NTG-context] Re: Better option for a macro with lots of arguments

2023-08-23 Thread Hans Hagen via ntg-context

On 8/23/2023 4:12 AM, Andres Conrado Montoya wrote:

I have been using the following macro to add a bunch of sections to the
start of chapters in a book, it works but I think is kind of weak:

%%%

\define[7]\metadatos{
   \startsection[title={Resumen}] #1 \stopsection
   \startsection[title={Palabras clave}] #2 \stopsection
   \start
   \language[en]
   \startsection[title={Abstract}] #3  \stopsection
   \startsection[title={Keywords}] #4 \stopsection
   \stop
   \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}]
 \startsubsection[title={Apa}] #5 \stopsubsection
 \startsubsection[title={Chicago}] #6 \stopsubsection
 \startsubsection[title={MLA}] #7 \stopsubsection
\stopsection
}

\starttext
% Then I call the macro like this:
\metadatos{spanish abstract \input knuth}{some, comma, separated, keywords,
in, spanish}{english abstract \input knuth}{same, comma, separated,
keywords, in, english}{Apa citation style for this article}{Chicago
citation style for this article}{MLA citation style for this article}
\stoptext
%%%

I've been exploring different ways to do it better, but with not much luck,
I was thinking something based in key=value assignments? setups? datasets?
Not really sure, but If you know a better solution or point me in the
direction of something I can use to replace that macro, it would be greatly
appreciated.

\startsetups [document:start]
   \doifdocumentvariable {englishabstract} {
 \startsection[title={Resumen}]
   \documentvariable{englishabstract}
 \stopsection
   }
   \doifdocumentvariable {spanisabstract} {
 \startsection[title={Palabras clave}]
   \documentvariable{spanishabstract}
 \stopsection
   }
   ...
\stopsetups

\startbuffer english
   ...
\stopbuffer

\startbuffer spanish
   ...
\stopbuffer


\startsetups [document:stop]
   ...
\stopsetups


\startdocument
  [spanisabstract={\getbuffer[spanish]},
   ]

...

\stopdocument

untested, just keyed in


-
  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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Better option for a macro with lots of arguments

2023-08-22 Thread Andres Conrado Montoya
I have been using the following macro to add a bunch of sections to the
start of chapters in a book, it works but I think is kind of weak:

%%%

\define[7]\metadatos{
  \startsection[title={Resumen}] #1 \stopsection
  \startsection[title={Palabras clave}] #2 \stopsection
  \start
  \language[en]
  \startsection[title={Abstract}] #3  \stopsection
  \startsection[title={Keywords}] #4 \stopsection
  \stop
  \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}]
\startsubsection[title={Apa}] #5 \stopsubsection
\startsubsection[title={Chicago}] #6 \stopsubsection
\startsubsection[title={MLA}] #7 \stopsubsection
   \stopsection
}

\starttext
% Then I call the macro like this:
\metadatos{spanish abstract \input knuth}{some, comma, separated, keywords,
in, spanish}{english abstract \input knuth}{same, comma, separated,
keywords, in, english}{Apa citation style for this article}{Chicago
citation style for this article}{MLA citation style for this article}
\stoptext
%%%

I've been exploring different ways to do it better, but with not much luck,
I was thinking something based in key=value assignments? setups? datasets?
Not really sure, but If you know a better solution or point me in the
direction of something I can use to replace that macro, it would be greatly
appreciated.

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: An strange error with section and page

2023-08-22 Thread Wolfgang Schuster

Xavier B. schrieb am 22.08.2023 um 19:32:

Hi,

I have a long document 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-exercicis.conTeXt.pdf]
 which I migrated from MKIV to LMTX version of ConTeXt. As Wolfgang recommened. 
I migrated old syntax to new one and replace \page[yes] before each section to

\setupheads[section][style={\bf \ssc}, alternative=margin, page=yes]

but now after each section there is a new page.

Why? I don't know.
Can someone help me to see what happens?

The source code is here [https://repo.or.cz/apunts-espa-matematiques.git]


You're using the structure for section of the following example in your 
document. This is a problem
because subjects are the same level as section or to be precise, 
subjects are unnumbered versions

of sections and inherit all settings from them unless configured otherwise.

While the solution here is to convert all subject headings to subsubject 
(be sure to also take care
of even lower section) a quick way to fix the page break is to disable 
the page-value for subject,

look at the commented line in the example how this can be done.

 begin example
\setuphead[section][page=yes]
%\setuphead[subject][page=no]

\starttext

\startsection[title=Section]

\startsubject [title=Subject]

\stopsubject

\stopsection

\stoptext
 end example

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

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


[NTG-context] Re: An error which is not in .log file

2023-08-15 Thread Xavier B.
Thanks.

After some work on it, following your advice, I reduce the compilation problem 
to several "wrong" files.
One was trivialy fixed because I did not close one environment, but other 
don't. Please help:

The error is here and I attach file.

modules > 'pgfmath' is not found
structure   > sectioning > section @ level 3 : 0.0.1 -> Problemes de 
fraccions
structure   > sectioning > subject @ level 3 : 0.0.1 -> Preguntes
tex error   > tex error on line 25 in file ./dev.tex: \textfont0 is 
undefined in ordinal, font id 0, character 63)


\startexercici[reference=exercici:problemes-de-fraccions-1, title={oli}] 
Calculeu quina part del dipòsit queda buida, sabent que l'aigua ocupa $2/5$
 del recipient i l'oli, $1/4$ (vegeu figura~\in[fig:oli-aigua-diposit]).

15 \usetikzlibrary[trees]
16 \usetikzlibrary[calc, intersections, through, backgrounds, arrows, 
shapes.geometric, fadings, decorations.pathreplacing, shadings, 
shapes.geometric, patterns, fit, positioning, shapes.symbols, chains]
17 \usemodule[pgfmath]
18 %\usemodule[filter]
19
20
21 \startsection[title={Problemes de fraccions}, 
reference={seccio:problemes-de-fraccions}]
22
23 \subject{Preguntes}
24
25 >>  \startexercici[reference=exercici:problemes-de-fraccions-1, title={oli}] 
Calculeu quina part del dipòsit queda buida, sabent que l'aigua ocupa $2/5$ del 
recipient i l'oli, $1/4$ (vegeu figura~\in[fig:oli-aigua-diposit]).
26
27 \startplacefigure[reference=fig:oli-aigua-diposit, location=force, 
title={Dipòsit omplit amb aigua i oli}]
28 \bTABLE[frame=off,align={middle,lohi},width=fit]
29   \bTR
30 \bTD
31  \starttikzpicture[scale=0.75]
32  % recipient
33  \draw (0,0) -- (0,10) -- (2,10) -- (2,0) -- cycle;
34
35  % aigua
Somewhere in the math formula just ended, you used the stated character from an
undefined font family. For example, plain TeX doesn't allow \it or \sl in
subscripts. Proceed, and I'll try to forget that I needed that character.
mtx-context | fatal error: return code: 1


Thanks in advance,

On Tue, 15 Aug 2023 21:44:53 +0200
Wolfgang Schuster  ha escrit:

> Xavier B. schrieb am 15.08.2023 um 21:36:
> > On Tue, 15 Aug 2023 21:13:54 +0200
> > Wolfgang Schuster  ha escrit:
> >
> >> There is also something wrong with the structure of your document when
> >> need \page[yes] after each file.
> > Why is it trouble?
> 
> When you start each subfile with \section or \subject you can use 
> \setuphead to force a pagebreak at the start of each new section and not 
> with a \page command in the document.
> 
> Wolfgang
> 
system  > 
system  > ConTeXt  ver: 2023.08.15 18:48 LMTX  fmt: 2023.8.15  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './dev', input './dev.tex', result './dev'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './dev.tex'
modules > 'tikz' is loaded
open source > level 2, order 3, name 
'/home/xan/bin/context-current/tex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl'
open source > level 3, order 4, name 'pgfutil-common.tex'
close source> level 3, order 4, name 'pgfutil-common.tex'
open source > level 3, order 5, name 'pgfutil-context.def'
close source> level 3, order 5, name 'pgfutil-context.def'
open source > level 3, order 6, name 'pgfrcs.code.tex'
open source > level 4, order 7, name 'pgf.revision.tex'
close source> level 4, order 7, name 'pgf.revision.tex'
close source> level 3, order 7, name 'pgfrcs.code.tex'
open source > level 3, order 8, name 'pgfsys.code.tex'
open source > level 4, order 9, name 'pgfkeys.code.tex'
open source > level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex'
close source> level 5, order 10, name 'pgfkeyslibraryfiltered.code.tex'
close source> level 4, order 10, name 'pgfkeys.code.tex'
cld > stack > 
cld > stack > use : slot = context.functions.register(f)
cld > stack > and : context.functions.unregister(slot)
cld > stack > 
open source > level 4, order 11, name 'pgf.cfg'
close source> level 4, order 11, name 'pgf.cfg'
Driver file for pgf: pgfsys-luatex.def

open source > level 4, order 12, name 'pgfsys-luatex.def'
open source > level 5, order 13, name 'pgfsy

[NTG-context] Re: Very strange error:

2023-08-14 Thread Wolfgang Schuster

Xavier B. schrieb am 15.08.2023 um 00:03:

Now


      - \startexercici[]{}  -->
\startexercici[reference=...,title=...]


with LMTX this

\startitemize
\sym{\in[REFERENCE]}
\stopitemize

does not work.


You have to provide a example for the error because it works for me.

\starttext

\startsection [reference=foo,title=Foo]

\startitemize
\sym{\in[foo]} xxx
\stopitemize

\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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: Map XML attributes to variables, dynamically

2023-08-10 Thread Hans Hagen via ntg-context

On 8/10/2023 10:50 AM, Hans Hagen via ntg-context wrote:

On 8/10/2023 10:37 AM, Hans Hagen wrote:

On 8/10/2023 10:14 AM, Thangalin wrote:

Here's an MWE:

attached the more final version


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
% follow up on mail discussion with T

\startbuffer[demo]



Text Goes Here


Different Text Goes Here



\stopbuffer

\startxmlsetups xml:xhtml
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{html|body|div}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:xhtml}

\startxmlsetups xml:html
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:body
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:div
\setupstartstop
[\xmlatt{#1}{class}]
[title=\xmlatt{#1}{data-title}]%
\start[\xmlatt{#1}{class}]%
\xmlflush{#1}
\stop
\blank
used wherever needed: \namedstartstopparameter{concurrent}{title}
\blank
\stopxmlsetups

\definestartstop
   [concurrent]
   [before=\startsection[title={TITLE: 
\namedstartstopparameter{concurrent}{title}}],
after=\stopsection]%

\starttext
\xmlprocessbuffer{main}{demo}{}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Link from a PDF to a reference of an embedded PDF

2023-07-20 Thread Gerion Entrup
Hi,

I found the "interaction" parameter in the documentation for
setupexternalfigure/externalfigure [1]. I, however do not quite
understand it. When embedding another PDF with this command, it seems to
be possible to include the references of the underlying PDF. It is
possible to link to them within the main context document? In [2], I
found something maybe related but it requires a tuc file.

Example:

inner.tex:
```
\starttext
\startsection[title=References, reference=sec:ref]
Some text
\placeformula[eq:foo]
\startformula
1 + 2 = 3
\stopformula
or:
\startitemize[n]
\item[item:bla] bla
\item[item:blub] blub
\stopitemize

Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub].
\stoptext
```

outer.tex:
```
\starttext
\externalfigure[inner.pdf][width=10cm, interactive=reference]

Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub].
\stoptext
```

Can I somehow access the references of inner.tex from outer.tex?
For me, it is not that relevant, that the correct number is set, but the
interaction within the outer PDF should work, so clicking on the
reference should scroll to the correct content.

Background of my question: I normally do graphics in a separate PDFs.
Some graphics consists of source code together with a graphical
representation and I want to be able to link to single source code lines.


Gerion


[1] https://wiki.contextgarden.net/Command/setupexternalfigure
[2] https://wiki.contextgarden.net/References#References_to_an_external_file


signature.asc
Description: This is a digitally signed message part.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Custom TOC with makeup and setups

2023-05-10 Thread Jethro Djan via ntg-context
Hello,

I am trying to create a presentation where at the start of each section in
my presentation, a custom TOC page is shown. When I am at a particular
section, the TOC will grey out all other sections (not implemented in my
MWE). I have tried different ways but I find using makeups for the TOC page
works ok (following
https://wiki.contextgarden.net/Command/setuplistalternative and Aditya's
presentation slides on their blog). My challenge is that when a makeup page
is inserted, it leaves a page with the section name blank before it. How do
I fix it? Any other way to achieve this is also welcome. My MWE:

\setuppapersize[S6]
\startuseMPgraphic{itemize:toc}
  save p; path p;
  p := ( (0,-0.5)--(0,0.5)--(0.866,0)--cycle ) scaled 1.5ExHeight;
  fill p withcolor \MPcolor{Black};
\stopuseMPgraphic

\definesymbol[itemize:toc][\useMPgraphic{itemize:toc}]

\definelistalternative
  [toclist]
  [renderingsetup=list:toclist]

\setupheadtext[section=Table of Contents]

\startsetups toclist
  \framed[align=normal, frame=off]{\placelist [section] [criterium=all,
alternative=toclist]}
\stopsetups

\definehspace[tspace][4cm]
\setupframed[
  height=fit,
  width=fit,
  location=middle,
  frame=off,
  align=normal,
  offset=none,
]
\startsetups list:toclist
  {\hbox to \hsize \bgroup
  \hspace[tspace]
  \framed[width=10mm,align=flushleft]{\symbol[itemize:toc]}%
  \framed[empty=yes]{\currentlistentrynumber\currentlistentrypagenumber}%
  \doifelse\currentlistentrylocation{\namedstructureheadlocation{section}}{%
\framed[align=flushright,]{{\bfb\currentlistentrytitle}}%
  }{\framed[align=flushright,]{\currentlistentrytitle}}
  \egroup}
\stopsetups



 \definemakeup
  [toc]
  [
doublesided=no,
page=yes,
bottom=,
top=,
pagestate=start,
headerstate=empty,
footerstate=empty,
setups={toclist},
before=\setups{toc:setups},
  ]
\startsetups toc:setups
  \setupbackgrounds[page][background=color, backgroundcolor=blue]
\stopsetups

 \definemakeup
  [standard]
  [
doublesided=no,
page=right,
pagestate=start,
headerstate=empty,
footerstate=empty,
before=\setups{standard:setups},
  ]

 \startsetups standard:setups
\setupbackgrounds[page][background=color, backgroundcolor=lightgray]
 \stopsetups

 \define\TOC{
  \starttocmakeup
  \stoptocmakeup
 }

\starttext

\startstandardmakeup
  \title{Your Title Here}
\stopstandardmakeup

\startsection[title={Motivation}]
\TOC
\startitemize

\item something cool
\item something else cool

\stopitemize
\stopsection

\startsection[title={Main strands of theory}]
\TOC
\startitemize

\item another cool thing
\item cool too

\stopitemize
\stopsection


\stoptext

Thanks in advance.

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

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


Re: [NTG-context] how access to \namedstructurevariable [next / previous]

2023-04-29 Thread Garulfo via ntg-context

Got a solution, but it looks like "not a proper way to do it"

Is it recommanded to work directly with lua tables like these :
- structures.sections.current().references
- fonts.current().specification

===

\def\CheckC%
{\startluacode
local numero = structures.sections.current()
if numero == nil then
numero = 1
else
numero = structures.sections.current().references.listindex + 1
end
context.page()
context("inbetween : "..structures.lists.collected[numero].titledata.title)
context.page()
\stopluacode}

\setuphead [section] 
[color=darkred,style=\tfc,inbetween={\mono{\CheckC}}]

\setuphead [subsection] [inbetween=]

\starttext

\startsection[title=Section A]
Text of section A.

\startsubsection[title=SubSection A.A]
Text of subsection A.A
\stopsubsection

    \stopsection

\startsection[title=Section B]
Text of section B.

\startsubsection[title=SubSection A.A]
Text of subsection A.A
\stopsubsection

\stopsection

\stoptext



Le 29/04/2023 à 18:07, Garulfo a écrit :

Hi all,

I would like to use the title and the number of a section twice :
- first with a specific layout (with makeup)
- second, as usual, as part of the page flow.

like in : http://www.pragma-ade.nl/general/manuals/cont-enp.pdf#page=23

looking at the source code 
(http://context.aanhet.net/svn/manuals/context/layo-00.tex), I 
understood that it was achieved with :


\setuphead
   [\v!chapter]
   [\c!command=\PlaatsHoofdstuk,
    \c!page=\v!yes,
    \c!before=,
    \c!inbetween=\PlaatsHoofdstukIndex,
   %\c!incrementnumber=cont-\currentlanguage,
    \c!header=\v!nomarking,
    \c!textstyle=\bfd,
    \c!numberstyle=\bfe]

and

\def\PlaatsHoofdstukIndex % todo: lucida
  {%\startnotmode[*\v!frontpart]
     \page[\v!right]
     \setupbackgrounds[\v!paper][\c!background=\v!color]
     \startmakeup[\v!standard]
   \raggedleft
   \doifsomething{\currentheadnumber}
  {\hfill\expanded{\processMPheadnumber{\currentheadnumber}}}
   \vfill
   \hfill\expanded{\processMPheadtext{\currentheadtext}}
     \stopmakeup
     \setupbackgrounds[\v!paper][\c!background=]
   }%\stopnotmode}



But currently, I can not reproduce it :
- \currentheadtex return empty
- \namedstructurevariable{section}{title} only report the update title
   once the title is actually typesetted

Is there a way to access \namedstructurevariable with [next] or 
[previous] like options ?



Here is a test trying to reproduce cont-enp.pdf example
===

\def\CheckA{{\mono\currentheadtext}}
\def\CheckB{{\mono\namedstructurevariable{section}{title}}\page}

\setuphead
   [section]
   [before={before : \CheckA - \CheckB},
   inbetween={inbetween: \CheckA - \CheckB},
   after={after: \CheckA - \CheckB},
   beforesection={beforesection: \CheckA - \CheckB},
   insidesection={insidesection: \CheckA - \CheckB},
   aftersection={aftersection: \CheckA - \CheckB},
   color=darkred,
   style=\tfc,
   ]

\starttext

\startsection[title=Section A]
Text of section A.
\stopsection

\startsection[title=Section B]
Text of section B.
\stopsection

\stoptext

===

Thanks for your help
Garulfo

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

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


[NTG-context] how access to \namedstructurevariable [next / previous]

2023-04-29 Thread Garulfo via ntg-context

Hi all,

I would like to use the title and the number of a section twice :
- first with a specific layout (with makeup)
- second, as usual, as part of the page flow.

like in : http://www.pragma-ade.nl/general/manuals/cont-enp.pdf#page=23

looking at the source code 
(http://context.aanhet.net/svn/manuals/context/layo-00.tex), I 
understood that it was achieved with :


\setuphead
  [\v!chapter]
  [\c!command=\PlaatsHoofdstuk,
   \c!page=\v!yes,
   \c!before=,
   \c!inbetween=\PlaatsHoofdstukIndex,
  %\c!incrementnumber=cont-\currentlanguage,
   \c!header=\v!nomarking,
   \c!textstyle=\bfd,
   \c!numberstyle=\bfe]

and

\def\PlaatsHoofdstukIndex % todo: lucida
 {%\startnotmode[*\v!frontpart]
\page[\v!right]
\setupbackgrounds[\v!paper][\c!background=\v!color]
\startmakeup[\v!standard]
  \raggedleft
  \doifsomething{\currentheadnumber}
 {\hfill\expanded{\processMPheadnumber{\currentheadnumber}}}
  \vfill
  \hfill\expanded{\processMPheadtext{\currentheadtext}}
\stopmakeup
\setupbackgrounds[\v!paper][\c!background=]
  }%\stopnotmode}



But currently, I can not reproduce it :
- \currentheadtex return empty
- \namedstructurevariable{section}{title} only report the update title
  once the title is actually typesetted

Is there a way to access \namedstructurevariable with [next] or 
[previous] like options ?



Here is a test trying to reproduce cont-enp.pdf example
===

\def\CheckA{{\mono\currentheadtext}}
\def\CheckB{{\mono\namedstructurevariable{section}{title}}\page}

\setuphead
  [section]
  [before={before : \CheckA - \CheckB},
  inbetween={inbetween: \CheckA - \CheckB},
  after={after: \CheckA - \CheckB},
  beforesection={beforesection: \CheckA - \CheckB},
  insidesection={insidesection: \CheckA - \CheckB},
  aftersection={aftersection: \CheckA - \CheckB},
  color=darkred,
  style=\tfc,
  ]

\starttext

\startsection[title=Section A]
Text of section A.
\stopsection

\startsection[title=Section B]
Text of section B.
\stopsection

\stoptext

===

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

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


Re: [NTG-context] Numbering of figures after defining a new float

2023-03-31 Thread Willi Egger via ntg-context
Thank you Alan, I tried many different things but as Wolfgang pointed out I had 
a mistake in the float definition!

Kind regards

WIlli

> On 31 Mar 2023, at 00:08, Alan Braslau via ntg-context  
> wrote:
> 
> Have you tried:
> 
> \setuplist [figure] [partnumber=no]
> 
> ...
> 
> \placelistoffigures [criterium=part]
> 
> 
> 
> Alan
> 
> 
> On Thu, 30 Mar 2023 17:09:15 +0200
> Willi Egger via ntg-context  wrote:
> 
>> Hello everybody,
>> 
>> 
>> I am still working on the previously mentioned project, consisting
>> out of different parts. There are about 25 chapters in each part and
>> most of the chapters contain figures. When using the predefined
>> figure environment, then all figures in the figure-list are placed
>> correctly though at each part the numbering restarts.
>> 
>> Now I tried to implement for each part its own float environment,
>> which enables me to produce a figure-list per part with subtitels.
>> How ever in the newly defined floats there is no continuous numbering
>> i.e. chapternumber.serialnumber. Instead each float get the chapter
>> number only.
>> 
>> How to get the numbering right?
>> 
>> Kind regards
>> Willi
>> 
>> The following example shows what happens:
>> 
>> \useMPlibrary[dum]
>> 
>> \definefloat[Afigure][Afigures][figures]
>> \definefloat[Bfigure][Bfigures][figures]
>> 
>> \setuphead
>>  [part]
>>  [placehead=yes,
>>   page=yes]
>> 
>> \setuphead
>>  [chapter]
>>  [page=no]
>> 
>> \starttext
>> 
>> \starttitle[title=List of figures]
>>  \startsubject[title=Figures (predefined figureenvironment)]
>>\placelistoffigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures A]
>>  \placelistofAfigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures B]
>>\placelistofBfigures
>>  \stopsubject
>> \stoptitle
>> 
>> \startpart[title=Part ONE]
>> \startchapter[title={Chapter one in part one}] %les21
>> 
>> \startplaceAfigure
>>  [location=left,
>>   reference=fig:dumA,
>>   title={Dummy A}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \startplacefigure
>>  [location=left,
>>   reference=fig:dumB,
>>   title={Dummy B}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplacefigure
>> 
>> \startsection[title=Section A]
>> 
>> \startplaceAfigure
>>  [location=left,
>>   reference=fig:dumC,
>>   title={Dummy C}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \stopsection
>> \stopchapter
>> \stoppart
>> 
>> \startpart[title=Part TWO]
>> \startchapter[title=Chapter one in part two]
>> 
>> \startplaceBfigure
>>  [location=left,
>>   reference=fig:dumD,
>>   title={Dummy D}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceBfigure
>> \stopchapter
>> \stoppart
>> \stoptext
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


Re: [NTG-context] Numbering of figures after defining a new float

2023-03-30 Thread Alan Braslau via ntg-context
Have you tried:

\setuplist [figure] [partnumber=no]

...

\placelistoffigures [criterium=part]



Alan


On Thu, 30 Mar 2023 17:09:15 +0200
Willi Egger via ntg-context  wrote:

> Hello everybody,
> 
> 
> I am still working on the previously mentioned project, consisting
> out of different parts. There are about 25 chapters in each part and
> most of the chapters contain figures. When using the predefined
> figure environment, then all figures in the figure-list are placed
> correctly though at each part the numbering restarts.
> 
> Now I tried to implement for each part its own float environment,
> which enables me to produce a figure-list per part with subtitels.
> How ever in the newly defined floats there is no continuous numbering
> i.e. chapternumber.serialnumber. Instead each float get the chapter
> number only.
> 
> How to get the numbering right?
> 
> Kind regards
> Willi
> 
> The following example shows what happens:
> 
> \useMPlibrary[dum]
> 
> \definefloat[Afigure][Afigures][figures]
> \definefloat[Bfigure][Bfigures][figures]
> 
> \setuphead
>   [part]
>   [placehead=yes,
>page=yes]
> 
> \setuphead
>   [chapter]
>   [page=no]
> 
> \starttext
> 
> \starttitle[title=List of figures]
>   \startsubject[title=Figures (predefined figureenvironment)]
> \placelistoffigures
>   \stopsubject
> 
>   \startsubject[title=Figures A]
>   \placelistofAfigures
>   \stopsubject
> 
>   \startsubject[title=Figures B]
> \placelistofBfigures
>   \stopsubject
> \stoptitle
> 
> \startpart[title=Part ONE]
> \startchapter[title={Chapter one in part one}] %les21
> 
> \startplaceAfigure
>   [location=left,
>reference=fig:dumA,
>title={Dummy A}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \startplacefigure
>   [location=left,
>reference=fig:dumB,
>title={Dummy B}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplacefigure
> 
> \startsection[title=Section A]
> 
> \startplaceAfigure
>   [location=left,
>reference=fig:dumC,
>title={Dummy C}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \stopsection
> \stopchapter
> \stoppart
> 
> \startpart[title=Part TWO]
> \startchapter[title=Chapter one in part two]
> 
> \startplaceBfigure
>   [location=left,
>reference=fig:dumD,
>title={Dummy D}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceBfigure
> \stopchapter
> \stoppart
> \stoptext

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

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


[NTG-context] Numbering of figures after defining a new float

2023-03-30 Thread Willi Egger via ntg-context
Hello everybody,


I am still working on the previously mentioned project, consisting out of 
different parts. There are about 25 chapters in each part and most of the 
chapters contain figures. When using the predefined figure environment, then 
all figures in the figure-list are placed correctly though at each part the 
numbering restarts.

Now I tried to implement for each part its own float environment, which enables 
me to produce a figure-list per part with subtitels. How ever in the newly 
defined floats there is no continuous numbering i.e. 
chapternumber.serialnumber. Instead each float get the chapter number only.

How to get the numbering right?

Kind regards
Willi

The following example shows what happens:

\useMPlibrary[dum]

\definefloat[Afigure][Afigures][figures]
\definefloat[Bfigure][Bfigures][figures]

\setuphead
[part]
[placehead=yes,
 page=yes]

\setuphead
  [chapter]
[page=no]

\starttext

\starttitle[title=List of figures]
  \startsubject[title=Figures (predefined figureenvironment)]
\placelistoffigures
  \stopsubject

  \startsubject[title=Figures A]
\placelistofAfigures
  \stopsubject

  \startsubject[title=Figures B]
\placelistofBfigures
  \stopsubject
\stoptitle

\startpart[title=Part ONE]
\startchapter[title={Chapter one in part one}] %les21

\startplaceAfigure
[location=left,
 reference=fig:dumA,
 title={Dummy A}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceAfigure

\startplacefigure
[location=left,
 reference=fig:dumB,
 title={Dummy B}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplacefigure

\startsection[title=Section A]

\startplaceAfigure
[location=left,
 reference=fig:dumC,
 title={Dummy C}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceAfigure

\stopsection
\stopchapter
\stoppart

\startpart[title=Part TWO]
\startchapter[title=Chapter one in part two]

\startplaceBfigure
[location=left,
 reference=fig:dumD,
 title={Dummy D}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceBfigure
\stopchapter
\stoppart
\stoptext

test.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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Section numbering starting from zero, not one

2023-02-16 Thread Hans Hagen via ntg-context

On 2/16/2023 8:07 PM, Alex Leray via ntg-context wrote:

Answering my own question… this fits my needs:

###

\defineconversion[romannumeralszero][0, I, II, III, IV, V, VI, VII, 
VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIII, XIX, XX, XXI]


\setuphead[section][conversion=romannumeralszero]

\starttext
\startsection[title={Section zero}]foo\stopsection

\startsection[title={Section 1}]bar\stopsection
\stoptext

###

Sorry for the noise


you can often find hints in the test suite (many small files)


Le 16/02/23 à 17:32, Alex Leray via ntg-context a écrit :

Hello,

I'd like to have roman numerals prefixed sections, but starting from 
Zero and not One (even if I know that roman numerals don't have a sign 
for 0).


Is there a way to achieve this? My code looks like that at the moment:

###

\setuphead[section][conversion=Romannumerals]

\starttext
\setupheadnumber[section] [-1]
\startsection[title={Section zero}]\stopsection
\startsection[title={Section one}]\stopsection
\stoptext

###

Thank you,

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


maillist : ntg-context@ntg.nl / 
https://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Section numbering starting from zero, not one

2023-02-16 Thread Alex Leray via ntg-context

Answering my own question… this fits my needs:

###

\defineconversion[romannumeralszero][0, I, II, III, IV, V, VI, VII, 
VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIII, XIX, XX, XXI]


\setuphead[section][conversion=romannumeralszero]

\starttext
\startsection[title={Section zero}]foo\stopsection

\startsection[title={Section 1}]bar\stopsection
\stoptext

###

Sorry for the noise


Le 16/02/23 à 17:32, Alex Leray via ntg-context a écrit :

Hello,

I'd like to have roman numerals prefixed sections, but starting from 
Zero and not One (even if I know that roman numerals don't have a sign 
for 0).


Is there a way to achieve this? My code looks like that at the moment:

###

\setuphead[section][conversion=Romannumerals]

\starttext
\setupheadnumber[section] [-1]
\startsection[title={Section zero}]\stopsection
\startsection[title={Section one}]\stopsection
\stoptext

###

Thank you,

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


maillist : ntg-context@ntg.nl / 
https://www.ntg.nl/mailman/listinfo/ntg-context

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


--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Section numbering starting from zero, not one

2023-02-16 Thread Alex Leray via ntg-context

Hello,

I'd like to have roman numerals prefixed sections, but starting from 
Zero and not One (even if I know that roman numerals don't have a sign 
for 0).


Is there a way to achieve this? My code looks like that at the moment:

###

\setuphead[section][conversion=Romannumerals]

\starttext
\setupheadnumber[section] [-1]
\startsection[title={Section zero}]\stopsection
\startsection[title={Section one}]\stopsection
\stoptext

###

Thank you,

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

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Alex Leray via ntg-context
I somehow found a way. It doesn't work on my minimal example but it does 
in my real doc. I tested a lot of thing but I think it was thanks to the 
offset=none parameters


For the record:

###

\define[2]\MySection{
\framed[
location=top,
strut=no,
offset=none,
frame=none,
width=broad,
height=fit,
align=middle]{#1.\\#2}}

\setuphead[section][
conversion=Romannumerals,
style={\bf\kerncharacters[0.075]\WORDS},
align=middle,
command=\MySection,
]

###

Thanks!

Le 15/02/23 à 19:11, Rik Kabel via ntg-context a écrit :


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?



--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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

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


[NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Alex Leray via ntg-context

Hello again,

I'm having another issue: I'd like Chapter/Section number and titles in 
separate lines but with grid alignement. I followed that advice:


https://wiki.contextgarden.net/Titles#Chapter_number_and_titles_in_separate_lines

I'm having an issue though: I can't get rid of the space above the 
(framed) title and align the section number with the first line (it's on 
the second line)


Any idea? Many thanks.

###

\showframe
\showlayout
\showgrid

\setuplayout[
grid=yes,
]

\define[2]\MySection{\framed[
location=keep,
frame=on,
width=broad,
% height=22pt,
align=middle
]{{#1.\\#2}}}

\setuphead[section][
strut=no,
conversion=Romannumerals,
style={\bf\WORDS},
align=middle,
command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext

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

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


Re: [NTG-context] numbering questions

2023-01-01 Thread Henning Hraban Ramm via ntg-context

Thank you, Wolfgang!
I _knew_ ConTeXt would be able to handle my requirements! ;D
It’s wikified now (at \setuphead and \defineconversion).

Hraban

Am 01.01.23 um 11:27 schrieb Wolfgang Schuster:

Henning Hraban Ramm via ntg-context schrieb am 31.12.2022 um 18:23:

A happy new year to everyone!

I’m playing with some examples of section numbering.

* Is there a setup to influence the order of number segments? I.e. can 
I have “section.chapter.part“ instead of “part.chapter.section”?


You need a new prefix-set to rearrange the order of the sections.

 begin example
\defineprefixset [reverse-section]    [section,chapter] []
\defineprefixset [reverse-subsection] [subsection,section,chapter] []

\setuphead
   [section]
   [sectionset=reverse-section]

\setuphead
   [subsection]
   [sectionset=reverse-subsection]

\starttext

\startchapter [title={A}]

\startsection [title={B}]

\startsubsection [title={C}] \stopsubsection
\startsubsection [title={D}] \stopsubsection
\startsubsection [title={E}] \stopsubsection

\stopsection

\startsection [title={F}]

\startsubsection [title={G}] \stopsubsection
\startsubsection [title={H}] \stopsubsection
\startsubsection [title={I}] \stopsubsection

\stopsection

\stopchapter

\stoptext
 end example

* How can I format the segments, e.g. to get two or three digits each 
(leading zeros)?


You can create your own conversion format.

 begin example
\startluacode
interfaces.implement {
     name  = "FourDigits",
     public    = true,
     arguments = "string",
     actions   = function(s) context("%04d",tonumber(s)) end
}
\stopluacode

\defineconversion [FourDigits] [\FourDigits]

\setuphead
   [chapter]
   [conversion=FourDigits]

\starttext

\startchapter [title={Chapter}] \stopchapter

\stoptext
 end example

Wolfgang



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

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


Re: [NTG-context] numbering questions

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

Henning Hraban Ramm via ntg-context schrieb am 31.12.2022 um 18:23:

A happy new year to everyone!

I’m playing with some examples of section numbering.

* Is there a setup to influence the order of number segments? I.e. can 
I have “section.chapter.part“ instead of “part.chapter.section”?


You need a new prefix-set to rearrange the order of the sections.

 begin example
\defineprefixset [reverse-section]    [section,chapter] []
\defineprefixset [reverse-subsection] [subsection,section,chapter] []

\setuphead
  [section]
  [sectionset=reverse-section]

\setuphead
  [subsection]
  [sectionset=reverse-subsection]

\starttext

\startchapter [title={A}]

\startsection [title={B}]

\startsubsection [title={C}] \stopsubsection
\startsubsection [title={D}] \stopsubsection
\startsubsection [title={E}] \stopsubsection

\stopsection

\startsection [title={F}]

\startsubsection [title={G}] \stopsubsection
\startsubsection [title={H}] \stopsubsection
\startsubsection [title={I}] \stopsubsection

\stopsection

\stopchapter

\stoptext
 end example

* How can I format the segments, e.g. to get two or three digits each 
(leading zeros)?


You can create your own conversion format.

 begin example
\startluacode
interfaces.implement {
    name  = "FourDigits",
    public    = true,
    arguments = "string",
    actions   = function(s) context("%04d",tonumber(s)) end
}
\stopluacode

\defineconversion [FourDigits] [\FourDigits]

\setuphead
  [chapter]
  [conversion=FourDigits]

\starttext

\startchapter [title={Chapter}] \stopchapter

\stoptext
 end example

Wolfgang

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

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


[NTG-context] Achieving different \cite styles

2022-12-08 Thread Jethro Djan via ntg-context
Hello everyone

I am interested in being able to cite in different ways. By analogy, I
refer to the \texcite{}, \parencite{} and other options available with
biblatex in LaTeX. How do I achieve something like \textcite{} in ConTeXt?
Here is my MWE:

\startbuffer[ref]

@Article{wn:2017,
  author  = {Who, Nobody and What, Everyone},
  journal = {Good Journal},
  title   = {The Art of Being},
  year= {2017},
}

\stopbuffer

\definebtxdataset[ref]
\usebtxdataset[ref][ref.buffer]
\setupbtx[
  dataset=ref,
]
\definebtxrendering
  [ref]
  [apa]
  [
  dataset=ref,
  ]
\usebtxdefinitions[apa]

\starttext

In \cite[wn:2017], they illustrated that it is impossible to not be them.
\cite[wn:2017] said it was worth the discovery.

\startsection[title={References}, number=no, incrementnumber=no]
\placelistofpublications[ref][method=dataset]
\stopsection

\stoptext

The first sentence is okay. In the second, I would like the parenthesis
around the citation to come off because of the way I am citing it.

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

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


Re: [NTG-context] How to display the pages of a particular section in another PDF?

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

On 12/4/2022 11:30 PM, Joel via ntg-context wrote:

I can use this code to display page 5 from a PDF:

\externalfigure[filename.pdf][page=5]

I am making a teacher's guide for a workbook (workbook.pdf). I need to 
be able to display on the page all pages of a particular section.


The teacher's guide uses the same section titles as the workbook, e.g.:

17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's 
guide and the workbook.


Is there any way to tell ConTeXt to display all of the pages for a 
particular section?


\externalfigure[filename.pdf][section=17A]

prototype attached (first process crap, then load)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

\startluacode
document.foundsection = { first = 0, last  = 0 }

function document.loadsection(filename,reference)
local data = job.loadother(file.addsuffix(filename,"tuc"))
if data then
local lists = data.structures.lists.collected
local pages = data.structures.pages.collected
if lists and pages then
for i=1,#lists do
local li = lists[i]
if li.references.reference == reference then
local first = 1
local last  = pages[#pages].number
local level = li.metadata.level
first = li.references.realpage
for j=i+1,#lists do
local lj = lists[j]
if lj.metadata.level == level then
last = lj.references.realpage - 1
break
end
end
document.foundsection.first = first
document.foundsection.last  = last
end
end
end
end
end
\stopluacode

% it depends what interface one wants ... we could have
%
% \externalfigure[crap.pdf][section=] % takes from crap
%
% but we need more inpiut and discussion for that

\starttexdefinition DoWithSection #1#2
\startpagemakeup
\externalfigure[#1.pdf][page=#2]
\stoppagemakeup
\stoptexdefinition

\starttexdefinition LoadSectionsA #1#2
\ctxlua{document.loadsection("#1","#2")}
\doifnot{\cldcontext{document.foundsection.first}} {0} {
\dostepwiserecurse
{\cldcontext{document.foundsection.first}}
{\cldcontext{document.foundsection.last}}
{1}
{
\DoWithSection{#1}{\recurselevel}
}
}
\stoptexdefinition

\starttexdefinition spaces LoadSectionsB #1#2
\ctxlua{
document.loadsection("#1","#2")
if document.foundsection.first > 0 then
for i=document.foundsection.first,document.foundsection.last do
context.DoWithSection("#1",i)
end
end
}
\stoptexdefinition

\starttext

\LoadSectionsA{crap}{chapter:3}

\LoadSectionsB{crap}{chapter:2}

\stoptext
\starttext

\dorecurse{10}{
\startchapter[title=Chapter #1,reference=chapter:#1]
\dorecurse{10}{
\startsubject[title=Subject #1]
\dorecurse{2}{\samplefile{tufte}\par}
\stopsubject
\startsection[title=Section #1.##1,reference=#1.##1]
\dorecurse{10}{\samplefile{tufte}\par}
\stopsection
}
\stopchapter
}

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

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


Re: [NTG-context] What to do when ConTeXt not revealing the error details?

2022-10-30 Thread Joel via ntg-context
 I found what it was, a % in the text preventing a \stopitemize to close a 
list. Thanks! --Joel

On Sunday, October 30, 2022 at 07:56:44 PM MDT, Gavin 
 wrote:  
 
 Hi Joel,

I get this error frequently when I forget to stop an environment, for example a 
\startsection with no \stopsection or a \startplacefigure with no 
\stopplacefigure. This freqeuntly doesn’t cause an error because the engine is 
happily packing my entire book into a margin figure.

See if there something you should have stopped near the place where things go 
bad?

Good luck!
Gavin


> On Oct 30, 2022, at 7:46 PM, Joel via ntg-context  wrote:
> 
> I have a very large document that, when compiled, produces a PDF, but reports 
> the error "mtx-context    | fatal error: return code: 1".
> 
> The PDF can open, but after about 100 pages in, the content starts appearing 
> all in the wrong place.
> 
> Usually when I compile, it says there is an error, and I just scroll up until 
> I find the details. I've scrolled through the output, and *.log file, but 
> cannot see anything that looks like an error.
> 
> It could be that just because the document is so long (about 1200 pages), I 
> can't find the error among the huge logs, but I looked through them all 
> carefully.
> 
> How can I isolate the error when ConTeXt isn't showing it? Is there some 
> setting for showing only errors, or revealing more details about an error?
> 
> --Joel
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki    : https://contextgarden.net
> ___

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

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


Re: [NTG-context] What to do when ConTeXt not revealing the error details?

2022-10-30 Thread Gavin via ntg-context
Hi Joel,

I get this error frequently when I forget to stop an environment, for example a 
\startsection with no \stopsection or a \startplacefigure with no 
\stopplacefigure. This freqeuntly doesn’t cause an error because the engine is 
happily packing my entire book into a margin figure.

See if there something you should have stopped near the place where things go 
bad?

Good luck!
Gavin


> On Oct 30, 2022, at 7:46 PM, Joel via ntg-context  wrote:
> 
> I have a very large document that, when compiled, produces a PDF, but reports 
> the error "mtx-context | fatal error: return code: 1".
> 
> The PDF can open, but after about 100 pages in, the content starts appearing 
> all in the wrong place.
> 
> Usually when I compile, it says there is an error, and I just scroll up until 
> I find the details. I've scrolled through the output, and *.log file, but 
> cannot see anything that looks like an error.
> 
> It could be that just because the document is so long (about 1200 pages), I 
> can't find the error among the huge logs, but I looked through them all 
> carefully.
> 
> How can I isolate the error when ConTeXt isn't showing it? Is there some 
> setting for showing only errors, or revealing more details about an error?
> 
> --Joel
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


Re: [NTG-context] issues with current latest

2022-10-14 Thread Alain Delmotte via ntg-context

Hi!

Le 14/10/2022 à 16:24, Pablo Rodriguez via ntg-context a écrit :

Dear list,

I have the following sample:

   \setuppapersize[A7]
   \setupinteraction[state=start,
 color=darkred,
 contrastcolor=darkred,
 focus=standard]
   \starttext
   \completecontent
   \startsection[title={sec}, list=(before \&\ now), reference=a]
   \page
   \in[a] (after 2022.10.14 10:16)
   \stopsection
   \stoptext

For me it works! And

[...]
It is also caused by the minimal:

   \starttext
\null
   \stoptext


also for this!

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

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


[NTG-context] issues with current latest

2022-10-14 Thread Pablo Rodriguez via ntg-context
Dear list,

I have the following sample:

  \setuppapersize[A7]
  \setupinteraction[state=start,
color=darkred,
contrastcolor=darkred,
focus=standard]
  \starttext
  \completecontent
  \startsection[title={sec}, list=(before \&\ now), reference=a]
  \page
  \in[a] (after 2022.10.14 10:16)
  \stopsection
  \stoptext

If I try to compile with LuaTeX (after deleting the cache), I get the
following error:

lua error   > lua error on line 1 in file a.tex:

...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: attempt
to index a nil value (field 'subsets')
stack traceback:
...tex/texmf-context/tex/context/fonts/mkiv/common-math.lfg:100: in
field 'moveitalics'
.../context/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg:103: in
main chunk
[C]: in function 'dofile'
...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:78: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/good-ini.lua:68>
(...tail calls...)

It is also caused by the minimal:

  \starttext
   \null
  \stoptext

And with the first source, \in hyperlink doesn’t work at all.

Sylvain reported an issue with the \completecontent list (not honoring
"focus=standard"), but with current latest the \in hyperlink doesn’t
work at all.

Could anyone confirm the issues?

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Command for specifying et al limit

2022-09-24 Thread Jethro Djan via ntg-context
Dear list,

I am trying to specify that 'et al’ should be appended after the first author 
if paper has multiple authors. It seems from the mkiv-publications.pdf manual 
that it should work like this but it doesn’t. Here is my MWE:

\startbuffer[ref]

@Article{bb:2017,
  author  = {Bronstein, Michael M. and Bruna, Joan and Cohen, Taco and 
Veličković, Petar},
  journal = {arXiv preprint arXiv:2104.13478},
  title   = {Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and 
Gauges},
  year= {2021},
}

\stopbuffer

\definebtxdataset[ref]
\setupbtx[dataset=ref]
\definebtxrendering
[ref]
[apa]
[
dataset=ref,
]
\usebtxdefinitions[apa]
\usebtxdataset[ref][ref.buffer]
\setupbtx[
  dataset=ref,
  etaldisplay = 1,
  etallimit = 1,
]

\starttext

\cite[author][bb:2017] says in their paper \cite[bb:2017] 

\startsection[title={References}, number=no, incrementnumber=no]
\placelistofpublications[ref][method=dataset]
\stopsection

\stoptext

Thanks in advance.

Jethro



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

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


[NTG-context] Line up itemize list with answer block

2022-08-23 Thread Jan Willem Flamma via ntg-context


Dear list members,

How can I ensure that the itemize list in the answers line up with the 
counter?

Or, put simply: I want '1.1' and 'a) Answer 1' to line up.

Regards,
Jan Willem Flamma

PDF result:
https://live.contextgarden.net/cgi-bin/result.cgi?id=VtEh2Y


MWE:

\defineblock[question]
\defineblock[answer]

\hideblocks[question]
\hideblocks[answer]

\defineenumeration
    [question]
    [text=Question,
 after={\blank[2*big]},
 inbetween={\blank[nowhite]},
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]

\defineenumeration
    [answer]
    [counter=answer,
 text=,
 width=,
 before={\blank[nowhite]},
 after={\blank[nowhite]},
 indenting=no,
 titledistance=1cm,
 location=inmargin,
 alternative=left,
 headstyle=,
 way=bychapter,
 prefixsegments=chapter,
 prefix=yes]

\starttext

\startchapter[title={Chapter}]

\beginquestion
\startquestion
\startitemize[a,packed][stopper=,right=)]
\item Question 1
\item Question 2
\stopitemize
\stopquestion
\endquestion
\beginanswer
\startanswer
\startitemize[a,packed][stopper=,right=)]
\item Answer 1
\item Answer 2
\stopitemize

\stopanswer
\endanswer


\startsection[title={Questions}]
\useblocks[question]
\stopsection

\blank[big]

\startsection[title={Answers}]
\useblocks[answer]
\stopsection

\stopchapter

\stoptext


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

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


Re: [NTG-context] numbering sections/subsections

2022-07-10 Thread Alan Bowen via ntg-context
Thank you, Hraban, for the solution and the link!

All best, Alan

On Sat, Jul 9, 2022 at 6:59 PM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Am 10.07.22 um 00:35 schrieb Alan Bowen via ntg-context:
> > I’m trying to get my sections numbered with capital letters and my
> > subsections with Arabic numbers. So far, no joy. What am I missing?
> >
> > Alan
> >
> > Mwe: with ConText ver: 2022.01.21 20:13 LMTX  fmt: 2022.2.1. (The
> > problem persists when I run ConTeXt online)
> >
> > \setuphead[section][conversion=A]
> >
> \setuphead[subsection][conversion=n, sectionsegements=section:subsection, 
> stopper={.}]
>
> \definestructureconversionset[mySet][A,n,A,n][n] % starts at part!
> \setuphead[section,subsection][sectionconversionset=mySet]
> \setuphead[subsection][sectionsegments=section:subsection, stopper={.}]
>
> % found in https://wiki.contextgarden.net/Titles
>
> > \starttext
> >
> > \startsection[title=New section]
> > \input knuth
> > \startsubsection[title=New subsection]
> > \input ward
> > \stopsubsection
> > \stopsection
> >
> > \stoptext
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] numbering sections/subsections

2022-07-09 Thread Henning Hraban Ramm via ntg-context

Am 10.07.22 um 00:35 schrieb Alan Bowen via ntg-context:
I’m trying to get my sections numbered with capital letters and my 
subsections with Arabic numbers. So far, no joy. What am I missing?


Alan

Mwe: with ConText ver: 2022.01.21 20:13 LMTX  fmt: 2022.2.1. (The 
problem persists when I run ConTeXt online)


\setuphead[section][conversion=A]
\setuphead[subsection][conversion=n, sectionsegements=section:subsection, 
stopper={.}]


\definestructureconversionset[mySet][A,n,A,n][n] % starts at part!
\setuphead[section,subsection][sectionconversionset=mySet]
\setuphead[subsection][sectionsegments=section:subsection, stopper={.}]

% found in https://wiki.contextgarden.net/Titles


\starttext

\startsection[title=New section]
\input knuth
\startsubsection[title=New subsection]
\input ward
\stopsubsection
\stopsection

\stoptext


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

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


[NTG-context] numbering sections/subsections

2022-07-09 Thread Alan Bowen via ntg-context
I’m trying to get my sections numbered with capital letters and my
subsections with Arabic numbers. So far, no joy. What am I missing?

Alan

Mwe: with ConText ver: 2022.01.21 20:13 LMTX  fmt: 2022.2.1. (The problem
persists when I run ConTeXt online)

\setuphead[section][conversion=A]
\setuphead[subsection][conversion=n,
sectionsegements=section:subsection, stopper={.}]

\starttext

\startsection[title=New section]
\input knuth
\startsubsection[title=New subsection]
\input ward
\stopsubsection
\stopsection

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

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


Re: [NTG-context] Improving pandoc's ConTeXt output

2022-06-08 Thread Albert Krewinkel via ntg-context

Albert Krewinkel via ntg-context  writes:

> I'm currently trying to improve the ConTeXt output generated by pandoc,
> the document convert. There are two questions that we haven't decided
> on, and I'd be grateful to receive some feedback from ConTeXt experts on
> these issues:
>
> 1. As far as I understand, the `\section` syntax currently produced by
>pandoc should be considered mkii legacy syntax. We're likely going to
>    switch to the modern `\startsection`/`\stopsection` syntax instead.
>Are there any concerns about retiring the old syntax?
>(Side note: pandoc already produces the new syntax, but only when
>called with `--section-divs`.)
>
> 2. Similarly, I'd like to start wrapping paragraphs with
>`\startparagraph`/`\stopparagraph`. It is important for me to get
>properly tagged PDF, but this would also make the output more
>verbose. Is that something that you would find bothering, or do you
>see adding the extra environment by default as an acceptable
>practice?
>
> Of course, I'd also be happy to get other suggestions on how to improve
> pandoc's ConTeXt support.

A big "thank you" for everyone's feedback! We've implemented the first
point as suggested, with the second still in discussion. The next pandoc
version will also feature better table support for ConTeXt.

Thanks again, ConTeXt is a wonderful tool!

Best,
Albert



PS: For completeness, this is the pull requests for better table
support: https://github.com/jgm/pandoc/pull/8116

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
___
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] Improving pandoc's ConTeXt output

2022-06-05 Thread Albert Krewinkel via ntg-context
Dear juh,

juh via ntg-context  writes:

> great to hear that, as my cooperative uses pandoc to produce print stuff
> with ConTeXt, we are always happy, when there are improvements.

I'd love to learn more about your workflow, if you have time to share at
some point!

We chose ConTeXt as the intermediate format for the next iteration of
the JOSS pipeline (the current pipeline is described here:
https://www.ncbi.nlm.nih.gov/books/NBK579698/)

Big thanks to Denis Maier for convincing me to try and go that route :)

> Am Sun, Jun 05, 2022 at 09:07:37AM +0200 schrieb Albert Krewinkel via 
> ntg-context:
>> 2. Similarly, I'd like to start wrapping paragraphs with
>>`\startparagraph`/`\stopparagraph`. It is important for me to get
>>properly tagged PDF, but this would also make the output more
>>verbose. Is that something that you would find bothering, or do you
>>see adding the extra environment by default as an acceptable
>>practice?
>
> A similiary question came up in the org-mode mailinglist some weeks ago.
>
> (Background: Org-mode is a markup used with Emacs to make single source
> publishing possible)
>
> Someone who maintains an export programme for ConTeXt uses 
> sectionlevels.
>
> You get the incremental subsections and subsubsection like this.
>
> \startsectionlevel
>   \startsectionlevel
> \startsectionlevel
> \stopsectionlevel
>   \stopsectionlevel
> \stopsectionlevel
>
> This makes it possible to ignore the part-chapter-section naming
> convention and be more flexible. You can leave it to the style files to
> decide which level is a part, chapter, section etc...
>
> As I do not use this in production – only playing around with emacs and
> org-mode – I cannot say if this is a good way.
>
> Have you considered sectionlevel?
> What is your opinion?

I absolutely see the appeal of that method, and I'd like for pandoc to
support it. The main question is probably whether the default should be
`\startsection` or `\startsectionlevel`. I lean towards making
`\startsectionlevel` the new default, but that might need some more
discussing. I think Denis linked to the respective GitHub issue in his
mail, more comments and opinions are definitely welcome.

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
___
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] Improving pandoc's ConTeXt output

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

On 6/5/2022 9:07 AM, Albert Krewinkel via ntg-context wrote:

Hi all,

I'm currently trying to improve the ConTeXt output generated by pandoc,
the document convert. There are two questions that we haven't decided
on, and I'd be grateful to receive some feedback from ConTeXt experts on
these issues:

1. As far as I understand, the `\section` syntax currently produced by
pandoc should be considered mkii legacy syntax. We're likely going to
switch to the modern `\startsection`/`\stopsection` syntax instead.
Are there any concerns about retiring the old syntax?
(Side note: pandoc already produces the new syntax, but only when
called with `--section-divs`.)


We keep compatibility as much as possible although there are of course 
exceptions (like: we don't need font encodings in mkiv and we hav 
eopentype fonts there). So it si quit elikely that these commands will 
stay forever.



2. Similarly, I'd like to start wrapping paragraphs with
`\startparagraph`/`\stopparagraph`. It is important for me to get
properly tagged PDF, but this would also make the output more
verbose. Is that something that you would find bothering, or do you
see adding the extra environment by default as an acceptable
practice?


I assume not that many users see (or manipulate) the output so it is 
harmless.



Of course, I'd also be happy to get other suggestions on how to improve
pandoc's ConTeXt support.

Thanks in advance,

Albert





--

-
  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] Improving pandoc's ConTeXt output

2022-06-05 Thread Albert Krewinkel via ntg-context
Hi all,

I'm currently trying to improve the ConTeXt output generated by pandoc,
the document convert. There are two questions that we haven't decided
on, and I'd be grateful to receive some feedback from ConTeXt experts on
these issues:

1. As far as I understand, the `\section` syntax currently produced by
   pandoc should be considered mkii legacy syntax. We're likely going to
   switch to the modern `\startsection`/`\stopsection` syntax instead.
   Are there any concerns about retiring the old syntax?
   (Side note: pandoc already produces the new syntax, but only when
   called with `--section-divs`.)

2. Similarly, I'd like to start wrapping paragraphs with
   `\startparagraph`/`\stopparagraph`. It is important for me to get
   properly tagged PDF, but this would also make the output more
   verbose. Is that something that you would find bothering, or do you
   see adding the extra environment by default as an acceptable
   practice?

Of course, I'd also be happy to get other suggestions on how to improve
pandoc's ConTeXt support.

Thanks in advance,

Albert


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
___
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] Trying to get a simple bibliography

2022-03-27 Thread Jean-Pierre Delange via ntg-context

Hi Amine,

There are several ways to achieve a bibliography. The first one is your 
way, with a buffer, which you have to name it (see below : the buffer is 
named 'biblio')  : you put your references to books and articles between 
the 2 commands \startbuffer and \stopbuffer as the model shows hereafter 
(with the APA style). If you want to print a general and simple 
bibliography, you need a double command :\usebtxdataset[/any title you 
choose/][biblio.buffer] and \definebtxrendering[/any 
title/][apa][dataset=/any title/] after \stopbuffer. At the end of the 
text, you need to define the place where you want to print the 
bibliography. For that purpose :


\starttext

\startbackmatter

\startchapter[title={Bibliography}]

\placelistofpublications[/any title/] [method=local]

\stopchapter

\stopbackmatter

\stoptext

/But, as far as I know, this method is boring/, because you need to 
write all you bibliographical sources in the buffer. The better is to 
build a separate bibtex file with such a software as JabRef (which is a 
kind of bibtex tool). This bibtex file is in your ConTeXt repository and 
you need only to call the name of your bibtex item. For instance, the 
book /Natural Right and History/ of Leo Strauss becomes 'Strauss,1952' 
(with JabRef) and if you cite this book in your text (like this : 
\cite[alternative=entry][/any title/::Strauss1952]}, you can find the 
item at the 'S' letter. Indeed, there is some work to do (feed your 
bitex file with items...), but when it is done once, it is forever (I 
guess ...). I give you a MWE as an attached file ...


Hope it helps !

JP

[/here is the beginning of a buffer sample /]

\startbuffer[biblio]

@book{Cicéron1,

author = {Cicéron},

title = {Tusculanes, V, 8},

}


@INCOLLECTION{Leibniz1885,

author = {Leibniz, G. W.},

title = {Principes de la nature et de la grâce fondés en raison, 1714},

title:en = {Principles of Nature and Grace Founded in Reason},

booktitle = {\de Die Philosophischen Schriften von Gottfried Wilhelm 
Leibniz},


booktitle:en = {The Philosophical Writings of Gottfried Wilhelm Leibniz},

editor = {Gerhardt, C. G.},

publisher = {Weidmann},

year = {1885},

volume = {6},

chapter = {8},

pages = {598–606},

address = {Berlin},

language = {french},

}


@book{Rousseau1755,

author ={Rousseau, Jean-Jacques}

title = {Discours sur l’Origine et les Fondements de l’Inégalité parmi 
les Hommes.},


year = {1755},

}


@book{Rousseau1750,

author ={Rousseau, Jean-Jacques}

title = {Discours sur les Sciences et les Arts},

year = {1750},

}


@book{Rousseau1762,

author = {Rousseau, Jean-Jacques},

title = {Émile},

year = {1762},

}

\stopbuffer



Le 26/03/2022 à 13:25, A A via ntg-context a écrit :

Hi All,

I'm trying to get a simple bibliography to work with ConTeXt. Here's 
what I have so far:


*test.tex*
*
*
\usebtxdataset[bibliography.bib]

\starttext

  \startbodymatter
    See \cite[proofwiki]
  \stopbodymatter

  \startbackmatter
    \startsection[title=Bibliography]
    \stopsection
  \stopbackmatter
\stoptext
*
*
*bibliography.bib*
*
*
@misc{
  proofwiki,
  title={{Definition:Collation - ProofWiki}},
  author={{ProofWiki}},
  howpublished={
    \href{https://proofwiki.org/wiki/Definition:Collation}{link 
<https://proofwiki.org/wiki/Definition:Collation}{link>}

  },
  journal={{ProofWiki}},
  year={2021}
}

When I compile test.tex it generates a pdf, but the citation is not 
included in the body matter. Also the actual reference is not present 
in Bibliography.


What am I doing wrong?

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
___


--
Jean-Pierre Delange
Ancients
Professeur Agrégé de Philosophie (HC)
\startbuffer[biblio]

@book{Cicéron1,
author = {Cicéron},
title = {Tusculanes, V, 8},
}


@INCOLLECTION{Leibniz1885,
author = {Leibniz, G. W.},
title = {Principes de la nature et de la grâce fondés en raison, 1714},
title:en = {Principles of Nature and Grace Founded in Reason},
booktitle = {\de Die Philosophischen Schriften von Gottfried Wilhelm Leibniz},
booktitle:en = {The Philosophical Writings of Gottfried Wilhelm Leibniz},
editor = {Gerhardt, C. G.},
publisher = {Weidmann},
year = {1885},
volume = {6},
chapter = {8},
pages = {598–606},
address = {Berlin},
language = {french},
}

@book{Rousseau1755,
author ={Rousseau, Jean-Jacques}
title = {Discours sur l’Origine et les Fondements de l’Inégalité parmi les Hommes.},
year = {1755},
}

@book{Rousseau1750,
author ={Rousseau, Jean-Jacques}
title = {Discours sur les Sciences et les Arts},
  year = {1750},
}

Re: [NTG-context] Please could you send me the whole example

2022-03-27 Thread A A via ntg-context
Dear Helmut,

Here is a full working example:

*test.tex*

\usebtxdefinitions[aps]
\usebtxdataset[bibliography.bib]
\setupinteraction[state=start]


\starttext

  \startbodymatter
See \cite[proofwiki]
  \stopbodymatter

  \startbackmatter
\startsection[title=Bibliography]
  \placelistofpublications
\stopsection
  \stopbackmatter
\stoptext

*bibliography.bib*

@misc{
  proofwiki,
  title={{Definition:Collation - ProofWiki}},
  author={{ProofWiki}},
  journal={{ProofWiki}},
  year={2021},
  howpublished={
\goto
  {link}
  [
url(
  "
https://proofwiki.org/wiki/Definition:Language_of_Propositional_Logic;
)
  ]
  }
}

Hope it helps. Thanks.

Regards,

Amine



On Sun, 27 Mar 2022 at 12:33, Helmut Schwertner 
wrote:

> Hello Amiene,
>
> I read your "question" in the NTG-Context-Groupe, I try it, but it
> doesn't work for me.
>
> Please could you send me the complete working example?
>
> Thank you,
>
> Greetings,
>
> Helmut
>
> --
> *
> Helmut Schwertner
> Kirchweg 154
> 28201 Bremen
> 0421 528 58 22
> helmut.schwertner[a]gmail.com
>
>
___
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] Trying to get a simple bibliography

2022-03-26 Thread A A via ntg-context
I found the problem. I was not including the following in my preamble:

\usebtxdefinitions[aps]

The next question I guess is whether ConTeXt support other specs like MLA
or Chicago style. I tried MLA but without sucess. Is MLA possible in
ConTeXt?

On Sat, 26 Mar 2022 at 13:48, A A  wrote:

> In my previous email I forgot to include the \placelistofpublications
> command. I tried that and now I'm getting a citation, but the bibliography
> entry is not correctly typeset...
>
> On Sat, 26 Mar 2022 at 13:25, A A  wrote:
>
>> Hi All,
>>
>> I'm trying to get a simple bibliography to work with ConTeXt. Here's what
>> I have so far:
>>
>> *test.tex*
>>
>> \usebtxdataset[bibliography.bib]
>>
>> \starttext
>>
>>   \startbodymatter
>> See \cite[proofwiki]
>>   \stopbodymatter
>>
>>   \startbackmatter
>> \startsection[title=Bibliography]
>> \stopsection
>>   \stopbackmatter
>> \stoptext
>>
>> *bibliography.bib*
>>
>> @misc{
>>   proofwiki,
>>   title={{Definition:Collation - ProofWiki}},
>>   author={{ProofWiki}},
>>   howpublished={
>> \href{https://proofwiki.org/wiki/Definition:Collation}{link}
>>   },
>>   journal={{ProofWiki}},
>>   year={2021}
>> }
>>
>> When I compile test.tex it generates a pdf, but the citation is not
>> included in the body matter. Also the actual reference is not present in
>> Bibliography.
>>
>> What am I doing wrong?
>>
>> 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] Trying to get a simple bibliography

2022-03-26 Thread A A via ntg-context
In my previous email I forgot to include the \placelistofpublications
command. I tried that and now I'm getting a citation, but the bibliography
entry is not correctly typeset...

On Sat, 26 Mar 2022 at 13:25, A A  wrote:

> Hi All,
>
> I'm trying to get a simple bibliography to work with ConTeXt. Here's what
> I have so far:
>
> *test.tex*
>
> \usebtxdataset[bibliography.bib]
>
> \starttext
>
>   \startbodymatter
> See \cite[proofwiki]
>   \stopbodymatter
>
>   \startbackmatter
> \startsection[title=Bibliography]
> \stopsection
>   \stopbackmatter
> \stoptext
>
> *bibliography.bib*
>
> @misc{
>   proofwiki,
>   title={{Definition:Collation - ProofWiki}},
>   author={{ProofWiki}},
>   howpublished={
> \href{https://proofwiki.org/wiki/Definition:Collation}{link}
>   },
>   journal={{ProofWiki}},
>   year={2021}
> }
>
> When I compile test.tex it generates a pdf, but the citation is not
> included in the body matter. Also the actual reference is not present in
> Bibliography.
>
> What am I doing wrong?
>
> 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
___


[NTG-context] Trying to get a simple bibliography

2022-03-26 Thread A A via ntg-context
Hi All,

I'm trying to get a simple bibliography to work with ConTeXt. Here's what I
have so far:

*test.tex*

\usebtxdataset[bibliography.bib]

\starttext

  \startbodymatter
See \cite[proofwiki]
  \stopbodymatter

  \startbackmatter
\startsection[title=Bibliography]
\stopsection
  \stopbackmatter
\stoptext

*bibliography.bib*

@misc{
  proofwiki,
  title={{Definition:Collation - ProofWiki}},
  author={{ProofWiki}},
  howpublished={
\href{https://proofwiki.org/wiki/Definition:Collation}{link}
  },
  journal={{ProofWiki}},
  year={2021}
}

When I compile test.tex it generates a pdf, but the citation is not
included in the body matter. Also the actual reference is not present in
Bibliography.

What am I doing wrong?

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] Few quick questions

2022-03-09 Thread Christoph Hintermüller via ntg-context

Sorry for multi posting. Had yesterday a problem with my mail system
and was not sure if mail was sent at all.


On Tue, 2022-03-08 at 21:26 +0100, Marco Patzer via ntg-context wrote:
> On Tue, 08 Mar 2022 20:45:17 +0100
> Christoph Hintermüller via ntg-context  wrote:
> 
> > Hans indicated a tool, a program, which allows to verify that that
> > all start* stop* tag pairs are symmetric and placed in correct
> > order. I just cant remember how it is called. Can anybody help
> > here?
> 
>   mtxrun --autogenerate --script check 
> 


Thank you very much. If there is not any other tool it seems that there
are no errors.


> The following will not report missing tags but will find other
> common issues and report them on the console:
> 
>   context --errors='*' 


I guess this is equal to

\enabledirectives[logs.errors]

With which only the following error on plain pdf is remaining after
fixing any other indicated

error logging   > start possible issues

fonts   > start missing characters:
/usr/local/texlive/2021/texmf-dist/fonts/opentype/public/lm/lmroman12-
regular.otf
fonts   >2  U+1START OF HEADING
fonts   > stop missing characters

error logging   > stop possible issues



OK, I guess I figured the cause of why xml export aborts in the middle
of the document. It came to me while writing the above lines and
wanting to report that i see some warnings about fuzzy paragraphs
(forget about them).

To make it short it triggered a memory about a rather old thread, where
Hans mentioned that the exporter is not so fond of and keen about LaTeX
style \chapter, \section commands and that he advises to use
\startchapter \stopchapter, \startsection \stopsection, etc. pairs
instead. So i gave it a try and exchanged all occurrences of \chapter,
\section, \subsection, \subsection by their \start* \stop* equivalents
and now the xml document and the html document are a lot largen. They
now conatin nearly the whole document. 

There are sill plenty of LaTeX style commands around in the document
for which exporter friendly \start* \stop* replacements exist. I will
continue this route and 'am comfident that in the end  will get get a
full xhtml and true e-book for my lecture notes.
:-)

Thank you very much for triggering memories.

Christoph


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

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


Re: [NTG-context] how to place getmarking[title] in header instead of getmarking[chapter]

2022-01-04 Thread fv leung via ntg-context
can use this for the header:


\setupheadertexts
[text]
[{\namedstructurevariable{chapter}{title}}]
[]
[]
[{\namedstructurevariable{chapter}{title}}]

juh via ntg-context  於 2022年1月5日 週三 上午12:28寫道:

> Hi all,
>
> I know how to put the current chapter in the header.
>
> But how can I also put the value of \starttitle in the header.
>
> In this mwe the \starttitle command does not modify the header.
>
> Is it possible to do something like:
>
> \getmarking[chapter or title]
>
> I cannot include
> \setmarking[chapter]{title headline}
> right before \starttitle as the source is created automatically.
>
>
> \setupheadertexts
> [text]
> [{\getmarking[chapter]}]
> []
> []
> [{\getmarking[chapter]}]
>
> \setupcombinedlist[content][list={chapter}]
> \starttext
> \placecontent
> \startchapter
>  [title=Lorem]
>
>  \startsection
>  [title=Lorem subsection]
>  \stopsection
> \stopchapter
> \startchapter
>  [title=Ipsum]
> \stopchapter
> \starttitle
>  [title=title headline]
>
>  Pellentesque dapibus suscipit ligula. Donec posuere augue in quam.
>  Etiam vel tortor sodales tellus ultricies commodo.
>
>  \page
>
> Nullam eu ante vel est convallis dignissim.
>
> \stoptitle
> \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
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] how to place getmarking[title] in header instead of getmarking[chapter]

2022-01-04 Thread juh via ntg-context
Hi all,

I know how to put the current chapter in the header.

But how can I also put the value of \starttitle in the header.

In this mwe the \starttitle command does not modify the header.

Is it possible to do something like:

\getmarking[chapter or title]

I cannot include  
\setmarking[chapter]{title headline}
right before \starttitle as the source is created automatically.


\setupheadertexts
[text]
[{\getmarking[chapter]}]
[]
[]
[{\getmarking[chapter]}]

\setupcombinedlist[content][list={chapter}]
\starttext
\placecontent
\startchapter
 [title=Lorem]

 \startsection
 [title=Lorem subsection]
 \stopsection
\stopchapter
\startchapter
 [title=Ipsum]
\stopchapter
\starttitle
 [title=title headline]

 Pellentesque dapibus suscipit ligula. Donec posuere augue in quam.
 Etiam vel tortor sodales tellus ultricies commodo.

 \page

Nullam eu ante vel est convallis dignissim.

\stoptitle
\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] How to make \def accept block or buffer as part of (long) command argument

2022-01-02 Thread Benjamin Buchmuller via ntg-context
Uff, this is indeed deep tex. Thanks a lot for the example, Hans! I still need 
to learn a lot.

After a walk and a bit of fresh air, I found another (much easier) way around 
my problem. This works since I don't need to deal with #2 in any special way:

\tolerant\def\startMyCommand[#1]%
{
\startallbeautifulcontextcommands
% whatever #1 does
}

\tolerant\def\stopMyCommand%
{
\stopallbeautifulcontextcommands
}

Then one can do in the main files:

\startMyCommand

\beginMyBuffer
bla bla
\endMyBuffer

\stopMycommand

> On Jan 2, 2022, at 14:43, Hans Hagen  wrote:
> 
> On 1/2/2022 2:14 PM, Benjamin Buchmuller wrote:
>> Thanks, Hans, for the answer, but I'm not sure if I get the point.
>> While this is possible in ConTeXt:
>> \startsection[title={My Title}]
>> \beginMyBlock
>> bla bla
>> \endMyBlock
>> \stopsection
>> The following won't work (end of file error):
>> \startMyCommand[optional={Maybe}]
>> \beginMyBlock
>> bla bla
>> \endMyBlock
>> \stopMyCommand
>> I had hoped for a simple command/modifier like 
>> \pleaseacceptblocks\def\startMyCommand[#1]#2\stopMyCommand to have #2 work 
>> in a similar way.
>> But maybe, as Wolfgang stated here 
>> (https://www.mail-archive.com/ntg-context@ntg.nl/msg73956.html), buffers and 
>> blocks can't be used in commands. (To add: Even when passed as arguments 
>> during compilation?)
> 
> You can bet that WS is right.
> 
> You really have to go dirty tex for this kind of magic:
> 
> \defineblock[MyBlock]
> \keepblocks[MyBlock]
> 
> \starttext
> 
> \tolerant\def\startMyCommand[#1]%
>  {\begingroup
>   \setcatcodetable\notcatcodes
>   \dostartMyCommand[#1]}
> 
> \let\stopMyCommand\relax
> 
> \normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92
>  stopMyCommand}%
>  {\endgroup
>   % whatever #1 does
>   \setbuffer[foo]#2\endbuffer
>   \typebuffer[foo]
>   \getbuffer[foo]}
> 
> or
> 
> \normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\retokenized\notcatcodes 
> {\stopMyCommand}}%
>  {\endgroup
>   % whatever #1 does
>   \setbuffer[foo]#2\endbuffer
>   \typebuffer[foo]
>   \getbuffer[foo]}
> 
> \startMyCommand[optional={Maybe}]
> 
> \beginMyBlock
> bla bla
> \endMyBlock
> 
> \stopMyCommand
> 
> \stoptext
> 
> and then of course further nesting mess ...
> 
> 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] How to make \def accept block or buffer as part of (long) command argument

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

On 1/2/2022 2:14 PM, Benjamin Buchmuller wrote:

Thanks, Hans, for the answer, but I'm not sure if I get the point.

While this is possible in ConTeXt:

\startsection[title={My Title}]

\beginMyBlock
bla bla
\endMyBlock

\stopsection

The following won't work (end of file error):

\startMyCommand[optional={Maybe}]

\beginMyBlock
bla bla
\endMyBlock

\stopMyCommand

I had hoped for a simple command/modifier like 
\pleaseacceptblocks\def\startMyCommand[#1]#2\stopMyCommand  to have #2 work in 
a similar way.

But maybe, as Wolfgang stated here 
(https://www.mail-archive.com/ntg-context@ntg.nl/msg73956.html), buffers and 
blocks can't be used in commands. (To add: Even when passed as arguments during 
compilation?)


You can bet that WS is right.

You really have to go dirty tex for this kind of magic:

\defineblock[MyBlock]
\keepblocks[MyBlock]

\starttext

\tolerant\def\startMyCommand[#1]%
  {\begingroup
   \setcatcodetable\notcatcodes
   \dostartMyCommand[#1]}

\let\stopMyCommand\relax

\normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92 
stopMyCommand}%

  {\endgroup
   % whatever #1 does
   \setbuffer[foo]#2\endbuffer
   \typebuffer[foo]
   \getbuffer[foo]}

or

\normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\retokenized\notcatcodes 
{\stopMyCommand}}%

  {\endgroup
   % whatever #1 does
   \setbuffer[foo]#2\endbuffer
   \typebuffer[foo]
   \getbuffer[foo]}

\startMyCommand[optional={Maybe}]

\beginMyBlock
bla bla
\endMyBlock

\stopMyCommand

\stoptext

and then of course further nesting mess ...

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] How to make \def accept block or buffer as part of (long) command argument

2022-01-02 Thread Benjamin Buchmuller via ntg-context
Thanks, Hans, for the answer, but I'm not sure if I get the point.

While this is possible in ConTeXt:

\startsection[title={My Title}]

\beginMyBlock
bla bla
\endMyBlock

\stopsection

The following won't work (end of file error):

\startMyCommand[optional={Maybe}]

\beginMyBlock
bla bla
\endMyBlock

\stopMyCommand

I had hoped for a simple command/modifier like 
\pleaseacceptblocks\def\startMyCommand[#1]#2\stopMyCommand  to have #2 work in 
a similar way. 

But maybe, as Wolfgang stated here 
(https://www.mail-archive.com/ntg-context@ntg.nl/msg73956.html), buffers and 
blocks can't be used in commands. (To add: Even when passed as arguments during 
compilation?)

Many Thanks again!


Benjamin

> On Jan 2, 2022, at 12:19, Hans Hagen  wrote:
> 
> On 1/2/2022 11:47 AM, Benjamin Buchmuller via ntg-context wrote:
>> Hi list,
>> I'm playing around with blocks and buffers again, realizing that I cannot 
>> use them inbetween a \start...\stop that I defined myself. Apparently, they 
>> work between \startsection...\stopsection and the like, so I was wondering 
>> how I should define or expand #2 in the MWE below to make TeX happily accept 
>> these useful features?
> buffers are stored as-is so no catcode magic stored, contrary to macros
> 
> you can use \setbuffer but that doesn't solve the argument passing
> 
> however, you can nest buffers so you can make other \start\stop commands 
> buffers too and then do some at the start and (look for \defiebuffer) but it 
> quickly becomes messy i think
> 
> 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] How to make \def accept block or buffer as part of (long) command argument

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

On 1/2/2022 11:47 AM, Benjamin Buchmuller via ntg-context wrote:

Hi list,

I'm playing around with blocks and buffers again, realizing that I cannot use 
them inbetween a \start...\stop that I defined myself. Apparently, they work 
between \startsection...\stopsection and the like, so I was wondering how I 
should define or expand #2 in the MWE below to make TeX happily accept these 
useful features?

buffers are stored as-is so no catcode magic stored, contrary to macros

you can use \setbuffer but that doesn't solve the argument passing

however, you can nest buffers so you can make other \start\stop commands 
buffers too and then do some at the start and (look for \defiebuffer) 
but it quickly becomes messy i think


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] How to make \def accept block or buffer as part of (long) command argument

2022-01-02 Thread Benjamin Buchmuller via ntg-context
Hi list,

I'm playing around with blocks and buffers again, realizing that I cannot use 
them inbetween a \start...\stop that I defined myself. Apparently, they work 
between \startsection...\stopsection and the like, so I was wondering how I 
should define or expand #2 in the MWE below to make TeX happily accept these 
useful features?

Thanks a lot


Benjamin


\starttext

\let\stopMyCommand\relax

\tolerant\protected\def\startMyCommand[#1]#2\stopMyCommand{

Optional argument #1

Content #2

}

\bf Here we test the command: Works \tf

\startMyCommand[is optional]
gets processed!
\stopMyCommand

\bf Here we test the block: Works \tf

\defineblock[MyBlock]

\beginMyBlock
Block for something else.
\endMyBlock

\useblocks[MyBlock][criterium=text]

\bf Here we test the block inside command: Fails \tf

% UNCOMMENT BELOW FAILS: tex error > runaway error: end of file encountered
%
% \startMyCommand[is optional]
% Still?
%
% \beginMyBlock
% Block for something else.
% \endMyBlock
% \stopMyCommand

\definebuffer[MyBuffer]

\bf Here we test the buffer: Works \tf

\startbuffer[MyBuffer]
Buffer for something else.
\stopbuffer

\getbuffer[MyBuffer]

\bf Here we test the buffer inside command: Fails \tf

% UNCOMMENT BELOW FAILS: tex error > runaway error: end of file encountered
%
% \startMyCommand[is optional]
% Still?
%
% \startbuffer[MyBuffer]
% Buffer for something else.
% \endbuffer
% \stopMyCommand

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


[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] 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 Mon, Nov 22, 2021 at 6:28 PM 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
>

Thank you, Hans. This pointer is exactly what I needed.
___
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
___


Re: [NTG-context] Confusing interaction between \writetolist and bookmarks (bug?)

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

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

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


[NTG-context] Text expander

2021-10-03 Thread Luis Montgomery via ntg-context
Has anyone used a "text expander" like
Espanso https://espanso.org
to ease work with ConTeXt?

Ex.

- trigger: ":s1"
  replace: "\\startsection\n$|$\n\\stopsection"

Best regards

Luis Antelo
___
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] Control of Titles appearing in \completelistoftables and \completelistoffigures

2021-08-25 Thread Richard Mahoney via ntg-context

Brilliant, just what was needed. Thank you.

Richard



-- 
T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
IM https://t.me/rmahoney  W https://indica-et-buddhica.org/

Indica et Buddhica  Littledene  Bay Road  Oxford  NZ

-Original Message-
From: Taco Hoekwater 
To: Richard Mahoney , mailing list
for ConTeXt users 
Subject: Re: [NTG-context] Control of Titles appearing in
\completelistoftables and \completelistoffigures
Date: Wed, 25 Aug 2021 08:48:24 +0200
Mailer: Apple Mail (2.3654.120.0.1.13)
X-Spam-Score: 0.0

Hi,

There is \startplacefigure / \startplacetable , which has a ‘list’ key

  https://wiki.contextgarden.net/Command/_startplacefloat

Best wishes,
Taco

> On 25 Aug 2021, at 05:20, Richard Mahoney via ntg-context
>  wrote:
> 
> List,
> 
> I've been wondering if there is some syntax that one can use in:
> 
> \placetable or \placefigure
> 
> to control the Table of Figure Title appearing in:
> 
> \completelistoftables and \completelistoffigures
> 
> 
> At the moment one can do this for the output of:
> 
> \completecontent
> 
> with something such as the following:
> 
> \startsection[title={Title in body},list={Title in contents}]
> 
> 
> Such a thing would be *extremely* useful for a current 
> publication. :)
> 
> 
> Best, Richard
> 
> 
> 
> -- 
> T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
> IM https://t.me/rmahoney  W https://indica-et-buddhica.org/
> 
> Indica et Buddhica  Littledene  Bay Road  Oxford  NZ
> 
> ___
> 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
> 
> ___

Taco Hoekwater
Elvenkind BV




___
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] Control of Titles appearing in \completelistoftables and \completelistoffigures

2021-08-25 Thread Taco Hoekwater via ntg-context
Hi,

There is \startplacefigure / \startplacetable , which has a ‘list’ key

 https://wiki.contextgarden.net/Command/_startplacefloat

Best wishes,
Taco

> On 25 Aug 2021, at 05:20, Richard Mahoney via ntg-context 
>  wrote:
> 
> List,
> 
> I've been wondering if there is some syntax that one can use in:
> 
> \placetable or \placefigure
> 
> to control the Table of Figure Title appearing in:
> 
> \completelistoftables and \completelistoffigures
> 
> 
> At the moment one can do this for the output of:
> 
> \completecontent
> 
> with something such as the following:
> 
> \startsection[title={Title in body},list={Title in contents}]
> 
> 
> Such a thing would be *extremely* useful for a current 
> publication. :)
> 
> 
> Best, Richard
> 
> 
> 
> -- 
> T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
> IM https://t.me/rmahoney  W https://indica-et-buddhica.org/
> 
> Indica et Buddhica  Littledene  Bay Road  Oxford  NZ
> ___
> 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
> ___

Taco Hoekwater
Elvenkind BV






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


[NTG-context] Control of Titles appearing in \completelistoftables and \completelistoffigures

2021-08-24 Thread Richard Mahoney via ntg-context
List,

I've been wondering if there is some syntax that one can use in:

\placetable or \placefigure

to control the Table of Figure Title appearing in:

\completelistoftables and \completelistoffigures


At the moment one can do this for the output of:

\completecontent

with something such as the following:

\startsection[title={Title in body},list={Title in contents}]


Such a thing would be *extremely* useful for a current 
publication. :)


Best, Richard



-- 
T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
IM https://t.me/rmahoney  W https://indica-et-buddhica.org/

Indica et Buddhica  Littledene  Bay Road  Oxford  NZ
___
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] space before section titles sometimes disappears in grid mode

2021-08-12 Thread Henning Hraban Ramm via ntg-context
E.g. in CG journal, there are usually 3 blank lines before a section title.
Most of it is single column and without grid, no problem there. But some 
articles use columnsets and are therefore in grid mode.

Sometimes the space before the section title disappears completely, so that it 
is glued to the previous paragraph.

If I include \startlinecorrection in "before" of \setuphead[section], in front 
of the \blank, the space is only reduced by 1 line, but I get the space also at 
the top of a column (or at the start of the article).

If I put \startlinecorrection after \blank, the space disappears the same as 
without linecorrection.

\setuphead[section]
  [before={\startlinecorrection\blank[BigCGblank]},
   after={\stoplinecorrection\blank[CGblank]},
   grid=both,
  ]

It happens reproducably if there is a float before \startsection, but sometimes 
I can’t find a reason.

In the other magazine I’m typesetting ATM, I get the same problem. No 
columnsets involved in that case, but still in grid mode.
There I can "fix" it with some \blank[3*line], but it doesn’t help in the 
floats case.

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

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





\startbuffer[apx]

\setuppapersize[
  A4,landscape]

\setuppagenumbering[
  location={footer,center}]

\setbreakpoints[compound]

\starttext

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

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

\stopsection

\stoptext

\stopbuffer

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

  \starttext
  \startbodymatter
  \dorecurse{10}{\input zapf\par}
  \typesetfile[\jobname-apx.tex][--purgeall][object=no, width=0pt]
  \stopbodymatter
  \startappendices
  \getfiguredimensions[\jobname-apx.pdf]
  \dorecurse{\noffigurepages}
  {\startTEXpage
\externalfigure[\jobname-apx.pdf][page=\recurselevel]
   \stopTEXpage}
  \stopappendices
  \stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Code document and simpleslides and create in one go the document with simpleslides added

2021-08-06 Thread Jeroen via ntg-context
>
>
> One final question on this one. As per latest comments this works great,
> but is there a way so the presentation pages in the appendix are made-up
> landscape as they are now, but are rotated 90 degrees so they are created
> in the pdf document as the first two pages.




\startbuffer[slides]
\setuptolerance[
  horizontal,
  tolerant,
  stretch]

\setuppapersize[
  A4,landscape]

\setuplayout[
  width=middle,
  backspace=35mm,
  cutspace=35mm,
  height=middle,
  topspace=5mm,
  bottomspace=20mm]

\setuppagenumbering[
  location={footer,center}]

\setuphead
  [section]
  [page={yes}]

\usetypescript[pagella]
\setupbodyfont[pagella,18pt]
\setupbodyfontenvironment[
  28pt][  % For body
  d=36pt, % For title
  a=12pt, % For author & date
  ]
\setuptype[style=medium]
\setuptyping[typing][bodyfont=16pt]

\setupwhitespace[medium]

\setbreakpoints[compound]

\setuphead[chapter][style=\bfd]
\setuphead[section][style=\bfc]
\setuphead[subsection][style=\bfb]
\setuphead[subsubsection][style=\bf]

\setupitemize[autointro] % prevent orphan list intro
\setupitemize[indentnext=no]

\starttext

\startsection[title={MySlideTitle},ref={myref1}]

Body text

\startitemize
\item Item 1
\item Item 2
\stopitemize

\stopsection

\startsection[title={MySlideTitle},ref={myref2}]

Body text

\startitemize
\item Item 1
\item Item 2
\stopitemize

\stopsection

\stoptext\starttext
text

\stoptext
\stopbuffer

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

  \starttext
  \startbodymatter
  \dorecurse{10}{\input zapf\par}
  \typesetfile[\jobname-slides.tex][--purgeall][object=no, width=0pt]
  \stopbodymatter
  \startappendices
  \getfiguredimensions[\jobname-slides.pdf]
  \dorecurse{\noffigurepages}
  {\startTEXpage
\externalfigure[\jobname-slides.pdf][page=\recurselevel]
   \stopTEXpage}
  \stopappendices
  \stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Code document and simpleslides and create in one go the document with simpleslides added

2021-07-31 Thread Jeroen via ntg-context
I worked around it, instead of simpleslides just use larger fonts to with
regular pages

\startbuffer[slides]
\setuptolerance[
  horizontal,
  tolerant,
  stretch]

\setuppapersize[
  A4,landscape]

\setuplayout[
  width=middle,
  backspace=35mm,
  cutspace=35mm,
  height=middle,
  topspace=5mm,
  bottomspace=20mm]

\setuppagenumbering[
  location={footer,center}]

\setuphead
  [section]
  [page={yes}]

\usetypescript[pagella]
\setupbodyfont[pagella,18pt]
\setupbodyfontenvironment[
  28pt][  % For body
  d=36pt, % For title
  a=12pt, % For author & date
  ]
\setuptype[style=medium]
\setuptyping[typing][bodyfont=16pt]

\setupwhitespace[medium]

\setbreakpoints[compound]

\setuphead[chapter][style=\bfd]
\setuphead[section][style=\bfc]
\setuphead[subsection][style=\bfb]
\setuphead[subsubsection][style=\bf]

\setupitemize[autointro] % prevent orphan list intro
\setupitemize[indentnext=no]

\starttext

\startsection[title={MySlideTitle},ref={myref1}]

Body text

\startitemize
\item Item 1
\item Item 2
\stopitemize

\stopsection

\startsection[title={MySlideTitle},ref={myref2}]

Body text

\stopsection

\stoptext\starttext
text

\stoptext
\stopbuffer

  \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no]

  \starttext
  \startbodymatter
  \dorecurse{25}{\input zapf\par}
  \typesetfile[\jobname_slides.tex][--purgeall][object=no, width=0pt]
  \stopbodymatter
  \startappendices
  \getfiguredimensions[\jobname_slides.pdf]
  \dorecurse{\noffigurepages}
  {\startTEXpage
\externalfigure[\jobname_slides.pdf][page=\recurselevel]
   \stopTEXpage}
  \stopappendices
  \stoptext

Op za 31 jul. 2021 om 16:22 schreef Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl>:

>
> On 7/31/21 4:06 PM, Pablo Rodriguez via ntg-context wrote:
> > BTW, I cannot get simpleslides working with LMTX.
>
>
> I had to make some slight adjustments but have been to lazy to upload a
> new and improved version. One reason being that I can't remember my
> username and password for the modules section of the garden... I'll have
> to ask Taco to reset it for me.
>
> 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
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Problem with chapter numbering

2021-07-13 Thread Fabrice Couvreur
Hi,
For my book, the header for each chapter should be like the attached image. I
don't know if I am using the best method, but the result looks like what I
want. Nevertheless, I am having a problem.
I don't understand why the first chapter is not numbered while the second
is with number 1 etc.
Thanks.
Fabrice

###

\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]

\defineframedtext
  [FramedText]
  [
offset=0.6em,
style=,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[11pt]},
align={left, broad},
frame=off,
width=\textwidth,
  ]

\setuplabeltext
 [en]
 [chapter=CHAPITRE]


\setuppagenumbering
  [alternative=doublesided,location=]


\unexpanded\def\HeadTitle#1#2%
   {
 \FramedText{{\cap\labeltext{chapter}}\space#1
  \\
 \bfc#2}
   }

\unexpanded\def\processheadnumber#1%
   {\getmarking[chapternumber]}

 \setuphead
   [chapter]
   [style=\bfd,
align={flushleft,broad},
numbercommand=\processheadnumber,
command=\HeadTitle]


\starttext
\startchapter [title={La récurrence}]
  \startsection[title={Le principe de récurrence}]
\input knuth
  \stopsection
  \startsection[title={Le raisonement par récurrence}]
  \input knuth
  \stopsection
  \startsection[title={Récurrences fortes}]
\input knuth
  \stopsection
   \startsection[title={Exercices corrigés}]
\input knuth
  \stopsection
\stopchapter
\startchapter [title=Combinatoire-Dénombrement]
   \input knuth
\stopchapter
\startchapter [title=Suites]
  \input knuth
\stopchapter
\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] Header for a book

2021-07-13 Thread Fabrice Couvreur
Hi,
My first solution is incorrect ; with the second solution, I don't
understand why the first chapter is not numbered while the second is with
number 1.
Thanks.
Fabrice
\unexpanded\def\HeadTitle#1#2%
   {
 \FramedText{{\cap\labeltext{chapter}}\space#1
  \\
 \bfc#2}
   }

\unexpanded\def\processheadnumber#1%
   {\getmarking[chapternumber]}

 \setuphead
   [chapter]
   [style=\bfd,
align={flushleft,broad},
numbercommand=\processheadnumber,
command=\HeadTitle]


\starttext
\startchapter [title={La récurrence}]
  \startsection[title={Le principe de récurrence}]
 \dorecurse{10}{\input knuth}
  \stopsection
  \startsection[title={Le raisonement par récurrence}]
  \dorecurse{10}{\input knuth}
  \stopsection
  \startsection[title={Récurrences fortes}]
  \dorecurse{10}{\input knuth}
  \stopsection
   \startsection[title={Exercices corrigés}]
  \dorecurse{10}{\input knuth}
  \stopsection
\stopchapter
\startchapter [title=Combinatoire-Dénombrement]
\dorecurse{10}{\input knuth}
\stopchapter

\stoptext



Le lun. 12 juil. 2021 à 16:32, Fabrice Couvreur 
a écrit :

> Hi,
> For my book, the header for each chapter should be like the attached image. I
> don't know if I am using the best method, but the result looks like what I
> want. Nevertheless, I am having some problems :
> 1. the header appears on each page ;
> 2. the title of the chapter should not appear in the body of the text.
> Thanks for your help.
> Fabrice
>
> \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
> \defineframedtext
>   [FramedText]
>   [
> offset=0.6em,
> style=,
> toffset=\lineheight,
> background=color,
> backgroundcolor=MyColorA,
> foregroundstyle={\switchtobodyfont[11pt]},
> align={left, broad},
> frame=off,
> width=\textwidth,
>   ]
>
>
> \setuplabeltext
>  [en]
>  [chapter=CHAPITRE]
>
> \setuphead
>[chapter]
>[bodypartlabel=]
>
>
> \startsetups [header]
>  \labeltext{chapter} \getmarking[chapternumber]
> \stopsetups
>
> \setupheadertexts
>   []
>   [{\FramedText{{\cap\labeltext{chapter}\space\getmarking[chapternumber]}
>  \\
> \bfc\getmarking[chapter]}}]
>   []
>   [\FramedText{{\cap\labeltext{chapter}\space \getmarking[chapternumber]}
>  \\
>\bfc\getmarking[chapter]}]
>
>
> \setuppagenumbering
>  [alternative=doublesided,location=]
> \starttext
> \startchapter [title=La récurrence]
>   \startsection[title={Le principe de récurrence}]
>      \dorecurse{10}{\input knuth}
>   \stopsection
>   \startsection[title={Le raisonement par récurrence}]
>   \dorecurse{10}{\input knuth}
>   \stopsection
>   \startsection[title={Récurrences fortes}]
>   \dorecurse{10}{\input knuth}
>   \stopsection
>\startsection[title={Exercices corrigés}]
>   \dorecurse{10}{\input knuth}
>   \stopsection
> \stopchapter
> \startchapter [title=Combinatoire-Dénombrement]
> \dorecurse{10}{\input knuth}
> \stopchapter
>
> \stoptext[image: pied_3.png]
>
>
___
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] Header for a book

2021-07-12 Thread Fabrice Couvreur
Hi,
For my book, the header for each chapter should be like the attached image. I
don't know if I am using the best method, but the result looks like what I
want. Nevertheless, I am having some problems :
1. the header appears on each page ;
2. the title of the chapter should not appear in the body of the text.
Thanks for your help.
Fabrice

\definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784]
\defineframedtext
  [FramedText]
  [
offset=0.6em,
style=,
toffset=\lineheight,
background=color,
backgroundcolor=MyColorA,
foregroundstyle={\switchtobodyfont[11pt]},
align={left, broad},
frame=off,
width=\textwidth,
  ]


\setuplabeltext
 [en]
 [chapter=CHAPITRE]

\setuphead
   [chapter]
   [bodypartlabel=]


\startsetups [header]
 \labeltext{chapter} \getmarking[chapternumber]
\stopsetups

\setupheadertexts
  []
  [{\FramedText{{\cap\labeltext{chapter}\space\getmarking[chapternumber]}
 \\
\bfc\getmarking[chapter]}}]
  []
  [\FramedText{{\cap\labeltext{chapter}\space \getmarking[chapternumber]}
 \\
   \bfc\getmarking[chapter]}]


\setuppagenumbering
 [alternative=doublesided,location=]
\starttext
\startchapter [title=La récurrence]
  \startsection[title={Le principe de récurrence}]
 \dorecurse{10}{\input knuth}
  \stopsection
  \startsection[title={Le raisonement par récurrence}]
  \dorecurse{10}{\input knuth}
  \stopsection
  \startsection[title={Récurrences fortes}]
  \dorecurse{10}{\input knuth}
  \stopsection
   \startsection[title={Exercices corrigés}]
  \dorecurse{10}{\input knuth}
  \stopsection
\stopchapter
\startchapter [title=Combinatoire-Dénombrement]
\dorecurse{10}{\input knuth}
\stopchapter

\stoptext[image: pied_3.png]
___
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] Heading for endnotes / grouped by chapter endnotes

2021-07-02 Thread denis.maier
Thanks for this. I'll look into it.

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Rik Kabel
> Gesendet: Mittwoch, 30. Juni 2021 21:40
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes
> 
> For what its worth, I offer my endnote apparatus with updates for parts.
> It uses the standard note/notation mechanism, not a list, for endnotes.
> Perhaps it can be further adapted to the needs of this thread.
> 
> There is at least one small issue with it: I have to use \stopendnote even 
> though
> I define \startEndnote. This causes issues with the linter (mtxrun --script 
> check
> ) but seems otherwise harmless.
> 
> I am sure that others more versed in ConTeXt can find some ways to fix this 
> and
> improve the overall approach. I welcome suggestions.
> 
> %--%
> % Endnote apparatus adapted for parts
> %
> \mainlanguage  [en]
> \language  [en]
> \setupinteraction  [state=start]
> \setuppagenumbering[alternative=doublesided]
> 
> \setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}]
> [{\it\getmarking[chapter]}][{\it\getmarking[part]}]
> \setupheads    [number=no]
> \setuphead [part]
>     [placehead=yes,
>      header=empty]
> 
> %- footnote setup -% % 
> footnotes uses
> asterisk, dagger, ddagger... so that endnotes %   and pagenotes have separate
> sequences. Change way= to suit %   your footnote frequency
> 
> \setupnotation [footnote]
>     [numberconversion=set 2,
>      way=chapter]
> 
> %- endnote setup --% % 
> endnotes use
> numeric indices, reset by part
> 
> \setupnote [endnote][
>      textseparator={,},
>      textstyle=\high{\small\hairspace},
>      location=none,
>      bodyfont=]
> 
> \setupnotation [endnote]
>     [headstyle=\small,
>      way=bypart,
>      numbercommand=,
>      after={\blank[halfline]}]
> 
> %- endnote pages setup %
> 
> \definemarking [notePage]
> 
> \startsetups   [noteHeadingsText]
>    {\em Notes for page
> \doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]}
>      { \getmarking[notePage][top]}
>      {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}}
> \stopsetups
> 
> \starttexdefinition unexpanded startEndnote
>    \dosingleempty\doStartEndnote
> \stoptexdefinition
> 
> \starttexdefinition doStartEndnote [#1]
>    \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]}
> \stoptexdefinition
> 
> \starttexdefinition dodoStartEndnote [#1][#2]
>    \startendnote[#1]
>      \marking[notePage]{#2}\removeunwantedspaces
> \stoptexdefinition
> 
> \starttexdefinition endnoteChapter
>    \startchapter    [title=Notes]
> \setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}]
> [\setups{noteHeadingsText}][{\it\getmarking[part]}]
>    \placenotes  [endnote]
>    \page
> \setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}]
>     [{\it\getmarking[chapter]}][part]
>    \stopchapter
> \stoptexdefinition
> 
> %--%
> 
> \starttext
> 
> \completecontent
> 
> \startpart[title=Part 1]
> \dorecurse{3}{
>    \startchapter[title=Chapter #1]
>      If a man wants to read good books, he must make a point of
>      avoiding bad ones; for life is short, and time and energy
>      limited.
>      \startfootnote
>    T.\,Baily Saunders’ translation, in his 1891 {\em
>    The Art of Literature}, of part of one of Arthur
>    Schopenhauer’s essays.
>      \stopfootnote
>      \startEndnote
>    {\language[deo]%
>    Um das Gute zu lesen, ist eine Bedingung, dass man das
>    Schlechte nicht lese: denn das Leben ist kurz, Zeit und
>    Kräfte beschränkt.}
>      \stopendnote
> 
>      \dorecurse{6}{
>    \startsection[title=Section ##1]
>      This followed by:
> 
>      {\it Repetitio est mater studiorum}. Any book that is at
>      all important ought to be at once read through twice;
>      partly because, on a second reading, the connection of the
>      different portions of the book will be better understood,
>      and the beginning comprehended only when the end is known;

Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread Rik Kabel
For what its worth, I offer my endnote apparatus with updates for parts. 
It uses the standard note/notation mechanism, not a list, for endnotes. 
Perhaps it can be further adapted to the needs of this thread.


There is at least one small issue with it: I have to use \stopendnote 
even though I define \startEndnote. This causes issues with the linter 
(mtxrun --script check ) but seems otherwise harmless.


I am sure that others more versed in ConTeXt can find some ways to fix 
this and improve the overall approach. I welcome suggestions.


%--%
% Endnote apparatus adapted for parts
%
\mainlanguage  [en]
\language  [en]
\setupinteraction  [state=start]
\setuppagenumbering[alternative=doublesided]

\setupheadertexts [{\it\getmarking[part]}][{\it\getmarking[section]}]
[{\it\getmarking[chapter]}][{\it\getmarking[part]}]
\setupheads    [number=no]
\setuphead [part]
   [placehead=yes,
    header=empty]

%- footnote setup -%
% footnotes uses asterisk, dagger, ddagger... so that endnotes
%   and pagenotes have separate sequences. Change way= to suit
%   your footnote frequency

\setupnotation [footnote]
   [numberconversion=set 2,
    way=chapter]

%- endnote setup --%
% endnotes use numeric indices, reset by part

\setupnote [endnote][
    textseparator={,},
    textstyle=\high{\small\hairspace},
    location=none,
    bodyfont=]

\setupnotation [endnote]
   [headstyle=\small,
    way=bypart,
    numbercommand=,
    after={\blank[halfline]}]

%- endnote pages setup %

\definemarking [notePage]

\startsetups   [noteHeadingsText]
  {\em Notes for page
\doifelse{\fetchmark[notePage][top]}{\fetchmark[notePage][bottom]}
    { \getmarking[notePage][top]}
    {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}}
\stopsetups

\starttexdefinition unexpanded startEndnote
  \dosingleempty\doStartEndnote
\stoptexdefinition

\starttexdefinition doStartEndnote [#1]
  \expanded{\dodoStartEndnote[#1][{\rawcountervalue[userpage]}]}
\stoptexdefinition

\starttexdefinition dodoStartEndnote [#1][#2]
  \startendnote[#1]
    \marking[notePage]{#2}\removeunwantedspaces
\stoptexdefinition

\starttexdefinition endnoteChapter
  \startchapter    [title=Notes]
\setupheadertexts[{\it\getmarking[part]}][\setups{noteHeadingsText}]
[\setups{noteHeadingsText}][{\it\getmarking[part]}]
  \placenotes  [endnote]
  \page
\setupheadertexts[{\it\getmarking[part]}][{\it\getmarking[section]}]
   [{\it\getmarking[chapter]}][part]
  \stopchapter
\stoptexdefinition

%--%

\starttext

\completecontent

\startpart[title=Part 1]
\dorecurse{3}{
  \startchapter[title=Chapter #1]
    If a man wants to read good books, he must make a point of
    avoiding bad ones; for life is short, and time and energy
    limited.
    \startfootnote
  T.\,Baily Saunders’ translation, in his 1891 {\em
  The Art of Literature}, of part of one of Arthur
  Schopenhauer’s essays.
    \stopfootnote
    \startEndnote
  {\language[deo]%
  Um das Gute zu lesen, ist eine Bedingung, dass man das
  Schlechte nicht lese: denn das Leben ist kurz, Zeit und
  Kräfte beschränkt.}
    \stopendnote

    \dorecurse{6}{
  \startsection[title=Section ##1]
    This followed by:

    {\it Repetitio est mater studiorum}. Any book that is at
    all important ought to be at once read through twice;
    partly because, on a second reading, the connection of the
    different portions of the book will be better understood,
    and the beginning comprehended only when the end is known;
    and partly because we are not in the same temper and
    disposition on both readings. On the second perusal we get a
    new view of every passage and a different impression of the
    whole book, which then appears in another light.
  \startEndnote
    {\language[deo]%
    Repetitio est mater studiorum. Jedes irgend wichtige
    Buch soll man sogleich zwei Mal lesen, theils weil man
    die Sachen das zweite Mal in ihrem Zusammenhange besser
    begreift und den Anfang erst recht versteht, wenn man
    das Ende kennt; theils weil man zu jeder Stelle das
    zweite Mal eine andere Stimmung mit bringt, als beim
    ersten, wodurch der Eindruct verschieden ausfällt und
    es ist, wie wenn man einen Gegenstand in anderer
    Beleuchtung sieht.}
  \stopendnote
  \stopsection
    }
  \stopchapter
}
\endnoteChapter

Re: [NTG-context] First line of larger font paragraph on grid

2021-06-28 Thread denis.maier
Ok, I've now tried to adapt my real document to this (see below). But I'm 
running into some problems:

1. I'm not sure whether to use \setuplocalinterlinespace or 
\setupinterlinespace. With \setuphead, \setuplocalinterlinespace works, but it 
doesn't work with \framed... But even with \setuphead it leads to results I 
didn't expect: \blank[force,3*line,depth] -> four empty lines instead of three.

2. foregroundstyle={\bfe\setupinterlinespace[line=17.5pt]} works sort of with 
the default fonts, i.e. the visuals are ok, but with \showstruts enabled, you 
see that the struts are incorrect. Now, with the font I have to use (Noto Serif 
Semicondensed ExtraBold at 15pt, with linespacing 17.5pt, available at 
http://www.google.com/get/noto/#serif-lgc) this shows up even visually: The 
letters are placed a tiny bit below the baseline.

Any ideas? Hints?

TIA,
Denis

%-
\setuplayout[grid=yes]
\showgrid
\showstruts

\definefont  [BigFont]  [Bold at 20pt] [28pt]

\definefontsize[e]  %   < added
\definebodyfontenvironment [12pt] [e=20pt]  %   < added

\definebodyfontenvironment [10pt] [e=15pt]  %   < added dm
\definebodyfontenvironment [10pt] [interlinespace=14pt]  %   < added dm
%\definefontfamily[mainface][rm][Noto Serif]
%   [tf=file:NotoSerif-SemiCondensed.ttf] % < added dm

\setupbodyfont[mainface,10pt] % < added dm

\unprotect
\unexpanded\def\section_command#1#2{%
   \framed [
width=\textwidth,
frame=off,
rulethickness=0pt,
offset=0pt,
loffset=-0pt,
before=,
location=top,
align=flushleft,]{#2}%
}


\setuphead [section] [
 style=\bfe,
 %style={\bfe\setupinterlinespace[line=17.5pt]},
 style={\bfe\setuplocalinterlinespace[line=17.5pt]},
 after=,
before=,
   command=\section_command,
]
\protect


\defineframed[myframed][
width=\textwidth,
frame=off,
rulethickness=0pt,
offset=0pt,
loffset=-0pt,
foregroundstyle=\bfe,%   < added
foregroundstyle={\bfe\setupinterlinespace[line=17.5pt]},
%   < dm, added; does work partially; struts are incorrect
foregroundstyle={\bfe\setuplocalinterlinespace[line=17.5pt]},   
%   < dm, added; does not work
strut=yes,   %   < added
before=,
location=top,
align=flushleft,]  

\starttext

\blank[force,3*line,depth]

\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum 
dolor sit amet consectetur adipisicing elit}

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit 
Lorem ipsum dolor sit amet consectetur adipisicing elit]
   asdf
\stopsection

\stoptext%-




> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von
> denis.ma...@unibe.ch
> Gesendet: Sonntag, 27. Juni 2021 16:57
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] First line of larger font paragraph on grid
> 
> Thanks, Garulfo. I don't use \definedfont in my real document so I should be
> able to port it to my use case. And now I've learned about foregroundstyle. (I
> was already a bit perplexed that \framed has no style key.)
> 
> Just out of curiousity, perhaps someone (Hans? Wolfgang?) knows more about
> the underlying issue?
> 
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: ntg-context  Im Auftrag von Garulfo
> > Gesendet: Samstag, 26. Juni 2021 12:37
> > An: ntg-context@ntg.nl
> > Betreff: Re: [NTG-context] First line of larger font paragraph on grid
> >
> > To have the two pages similar
> >
> > There is something linked with the use of \definefont.
> > Don't know if it properly impacts the interlinespace for example.
> >
> > %--
> >
> > \setuplayout[grid=yes]
> > \showgrid
> >
> > \definefont  [BigFont]  [Bold at 20pt] [28pt]
> >
> > \definefontsize[e]  %   < added
> > \definebodyfontenvironment [12pt] [e=20pt]  %   < added
> >
> > \unprotect
> > \unexpanded\def\section_command#1#2{%
> >\framed [
> > width=\textwidth,
> > frame=off,
> > rulethickness=0pt,
> > offset=0pt,
> > loffset=-0pt,
> > before=,
> > location=top,
>

Re: [NTG-context] First line of larger font paragraph on grid

2021-06-27 Thread denis.maier
Thanks, Garulfo. I don't use \definedfont in my real document so I should be 
able to port it to my use case. And now I've learned about foregroundstyle. (I 
was already a bit perplexed that \framed has no style key.)

Just out of curiousity, perhaps someone (Hans? Wolfgang?) knows more about the 
underlying issue?

Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Garulfo
> Gesendet: Samstag, 26. Juni 2021 12:37
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] First line of larger font paragraph on grid
> 
> To have the two pages similar
> 
> There is something linked with the use of \definefont.
> Don't know if it properly impacts the interlinespace for example.
> 
> %--
> 
> \setuplayout[grid=yes]
> \showgrid
> 
> \definefont  [BigFont]  [Bold at 20pt] [28pt]
> 
> \definefontsize[e]  %   < added
> \definebodyfontenvironment [12pt] [e=20pt]  %   < added
> 
> \unprotect
> \unexpanded\def\section_command#1#2{%
>\framed [
> width=\textwidth,
> frame=off,
> rulethickness=0pt,
> offset=0pt,
> loffset=-0pt,
> before=,
> location=top,
> align=flushleft,]{#2}%
> }
> 
> 
> \setuphead [section] [
>  style=\bfe,
>  after=,
> before={\blank[1*line]},
>command=\section_command,
> ]
> \protect
> 
> 
> \defineframed[myframed][
> width=\textwidth,
> frame=off,
> rulethickness=0pt,
> offset=0pt,
> loffset=-0pt,
> foregroundstyle=\bfe,%   < added
> strut=yes,   %   < added
> before=,
> location=top,
> align=flushleft,]%   < removed dup "]"
> 
> \starttext
> 
> \blank[force,3*line,depth]
> 
> %\begingroup%   < removed
> %\BigFont   %   < removed
> \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem
> ipsum dolor sit amet consectetur adipisicing elit}
> %\endgroup  %   < removed
> 
> asdfasdf
> 
> \page
> \blank[force,3*line,depth]
> 
> \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit
> Lorem ipsum dolor sit amet consectetur adipisicing elit]
>asdf
> \stopsection
> 
> \stoptext
> 
> %--
> 
> 
> Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit :
> > Hi,
> >
> > I have some text in a larger font where the first line should be on
> > the grid. Therefore, I’ve tried to adapt the solution from the wiki:
> > https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_
> > grid
> > <https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the
> > _grid>
> >
> > The interesting thing is that the section command indeed places the
> > first line on the grid, but using \framed directly does not give the
> > desired results.
> >
> > I must be missing something obvious. Does anyone know a solution ?
> >
> > Thanks for your help,
> >
> > Denis
> >
> > ===
> >
> > \setuplayout[grid=yes]
> >
> > \showgrid
> >
> > \definefont  [BigFont]  [Bold at 20pt] [24pt]
> >
> > \unprotect
> >
> > \unexpanded\def\section_command#1#2{%
> >
> > \framed [
> >
> >     width=\textwidth,
> >
> >         frame=off,
> >
> >         rulethickness=0pt,
> >
> >         offset=0pt,
> >
> >         loffset=-0pt,
> >
> >     before=,
> >
> >     location=top,
> >
> >     align=flushleft,]{#2}%
> >
> > }
> >
> > \setuphead [section] [
> >
> >      style={\BigFont},
> >
> > after=,
> >
> >     before={\blank[1*line]},
> >
> >    command=\section_command,
> >
> > ]
> >
> > \protect
> >
> > \defineframed[myframed][
> >
> >         width=\textwidth,
> >
> >         frame=off,
> >
> >         rulethickness=0pt,
> >
> >         offset=0pt,
> >
> > loffset=-0pt,
> >
> >     before=,
> >
> >     location

Re: [NTG-context] Soft-hyphen in Antykwa.

2021-06-26 Thread Rik Kabel



On 6/26/2021 18:38, Rik Kabel wrote:

All,

In recent compilations of a document using Antykwa Torunska Condensed 
(in headings in the margin), I now have no hyphen at a word break, and 
see the following in the log:


fonts   > checking > char ­ (U+000AD) in font
'AntykwaTorunskaCond-Regular' with id 73: missing

Is there a way to restore the hyphen that once appeared? (ConTeXt  ver: 
2021.06.25 22:49 LMTX).




More information, sorry for the lack of detail in the first post.

1. The problem appears to be associated with tagging. Set the state to 
stop, or remove the line, and the hyphen appears.


2. When HeadFont is libertinus, there is no problem.

Sample document:

\definefontfamily  [HeadFont]
   [rm]
   [Antykwa Torunska Cond]
\setuphead [chapter]
   [style=\HeadFont\tfa]
\setuphead [section]
   [alternative=margintext,
before={\blank[big]\blank},
insidesection={\blank[-line]\setupindenting[next]},
style=\HeadFont\tf]
\setupindenting[yes,
small]
\setuptagging  [state=start]
\setupbodyfont [libertinus,12pt]
\starttext
  \startchapter[title=Testing Antykwa Torunska Condensed breaks]
\input klein
\startsection  [title=Abracadabra]
  \input knuth
\stopsection
  \stopchapter
\stoptext

--
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] First line of larger font paragraph on grid

2021-06-26 Thread Garulfo

To have the two pages similar

There is something linked with the use of \definefont.
Don't know if it properly impacts the interlinespace for example.

%--

\setuplayout[grid=yes]
\showgrid

\definefont  [BigFont]  [Bold at 20pt] [28pt]

\definefontsize[e]  %   < added
\definebodyfontenvironment [12pt] [e=20pt]  %   < added

\unprotect
\unexpanded\def\section_command#1#2{%
  \framed [
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]{#2}%
}


\setuphead [section] [
style=\bfe,
after=,
   before={\blank[1*line]},
  command=\section_command,
]
\protect


\defineframed[myframed][
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   foregroundstyle=\bfe,%   < added
   strut=yes,   %   < added
   before=,
   location=top,
   align=flushleft,]%   < removed dup "]"

\starttext

\blank[force,3*line,depth]

%\begingroup%   < removed
%\BigFont   %   < removed
\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}

%\endgroup  %   < removed

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]

  asdf
\stopsection

\stoptext

%--


Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit :

Hi,

I have some text in a larger font where the first line should be on the 
grid. Therefore, I’ve tried to adapt the solution from the wiki: 
https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid 
<https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid>


The interesting thing is that the section command indeed places the 
first line on the grid, but using \framed directly does not give the 
desired results.


I must be missing something obvious. Does anyone know a solution ?

Thanks for your help,

Denis

===

\setuplayout[grid=yes]

\showgrid

\definefont  [BigFont]  [Bold at 20pt] [24pt]

\unprotect

\unexpanded\def\section_command#1#2{%

\framed [

    width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

        loffset=-0pt,

    before=,

    location=top,

    align=flushleft,]{#2}%

}

\setuphead [section] [

     style={\BigFont},

after=,

    before={\blank[1*line]},

   command=\section_command,

]

\protect

\defineframed[myframed][

        width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

loffset=-0pt,

    before=,

    location=top,

align=flushleft,]]

\starttext

\blank[force,3*line,depth]

\begingroup

\BigFont

\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}


\endgroup

asdfasdf

\page

\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]


asdf

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


___
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] First line of larger font paragraph on grid

2021-06-26 Thread Garulfo

A proposal

===

\setuplayout[grid=yes]
\showgrid

\definefont  [BigFont]  [Bold at 20pt] [28pt]

\unprotect
\unexpanded\def\section_command#1#2{%
  \framed [
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]{#2}%
}


\setuphead [section] [
style={\BigFont},
after=,
   before={\blank[1*line]},
  command=\section_command,
]
\protect

\definefontsize[e]  %   < added
\definebodyfontenvironment [12pt] [e=20pt]  %   < added

\defineframed[myframed][
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   foregroundstyle=\bfe,%   < added
   strut=yes,   %   < added
   before=,
   location=top,
   align=flushleft,]%   < removed dupl "]"

\starttext

\blank[force,3*line,depth]

%\begingroup%   < removed
%\BigFont   %   < removed
\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}

%\endgroup  %   < removed

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]

  asdf
\stopsection

\stoptext

Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit :

Hi,

I have some text in a larger font where the first line should be on the 
grid. Therefore, I’ve tried to adapt the solution from the wiki: 
https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid 
<https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid>


The interesting thing is that the section command indeed places the 
first line on the grid, but using \framed directly does not give the 
desired results.


I must be missing something obvious. Does anyone know a solution ?

Thanks for your help,

Denis

===

\setuplayout[grid=yes]

\showgrid

\definefont  [BigFont]  [Bold at 20pt] [24pt]

\unprotect

\unexpanded\def\section_command#1#2{%

\framed [

    width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

        loffset=-0pt,

    before=,

    location=top,

    align=flushleft,]{#2}%

}

\setuphead [section] [

     style={\BigFont},

after=,

    before={\blank[1*line]},

   command=\section_command,

]

\protect

\defineframed[myframed][

        width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

loffset=-0pt,

    before=,

    location=top,

align=flushleft,]]

\starttext

\blank[force,3*line,depth]

\begingroup

\BigFont

\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}


\endgroup

asdfasdf

\page

\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]


asdf

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


___
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] ntg-context Digest, Vol 204, Issue 76

2021-06-26 Thread Kirkham, Robin (Mineral Resources, Clayton)


> On 25 Jun 2021, at 21:15, ntg-context-requ...@ntg.nl wrote:
> 
> Send ntg-context mailing list submissions to
>   ntg-context@ntg.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
>   ntg-context-requ...@ntg.nl
> 
> You can reach the person managing the list at
>   ntg-context-ow...@ntg.nl
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
> Today's Topics:
> 
>   1. Re: Align in setup header/footer (Jan U. Hasecke)
>   2. First line of larger font paragraph on grid (denis.ma...@unibe.ch)
>   3. Re: Align in setup header/footer (denis.ma...@unibe.ch)
>   4. Re: Align in setup header/footer (denis.ma...@unibe.ch)
>   5. Re: Align in setup header/footer (Jan U. Hasecke)
> 
> From: "Jan U. Hasecke" 
> Subject: Re: [NTG-context] Align in setup header/footer
> Date: 25 June 2021 at 20:23:24 AEST
> To: 
> 
> 
> 
> Hi Denis,
> 
> Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch:
>> Or, for more complex footers/headers you can use:
>> \setupfootertexts
>> [left on odd page] % out
>> [right on odd page] % in
>> [right on even page] % in
>> [left on even page] % out
> 
> In fact it is something like this
> 
> \setupfootertexts
>  [margin]
>  []
>  [\pagenumber]
>  [\pagenumber]
>  []
> 
> I want to align the number inside of this area to the right or the left 
> respectively.
> 
> I only found setuplayouttext to style the area, except that there is no key 
> "align".
> 
> juh
> 
> 
> 
> 
> From: 
> Subject: [NTG-context] First line of larger font paragraph on grid
> Date: 25 June 2021 at 20:30:29 AEST
> To: 
> 
> 
> Hi, 
>  
> I have some text in a larger font where the first line should be on the grid. 
> Therefore, I’ve tried to adapt the solution from the wiki: 
> https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid
>  
> The interesting thing is that the section command indeed places the first 
> line on the grid, but using \framed directly does not give the desired 
> results.
>  
> I must be missing something obvious. Does anyone know a solution ?
>  
> Thanks for your help,
> Denis
>  
> ===
> \setuplayout[grid=yes]
> \showgrid
>  
> \definefont  [BigFont]  [Bold at 20pt] [24pt]
>  
> \unprotect
> \unexpanded\def\section_command#1#2{%
>   \framed [
>width=\textwidth,
>frame=off,
>rulethickness=0pt,
>offset=0pt,
>loffset=-0pt,
>before=,
>location=top,
>align=flushleft,]{#2}%
> }
>  
>  
> \setuphead [section] [
> style={\BigFont},
> after=,
>before={\blank[1*line]},
>   command=\section_command,
> ]
> \protect
>  
> \defineframed[myframed][
>width=\textwidth,
>frame=off,
>rulethickness=0pt,
>offset=0pt,
>loffset=-0pt,
>    before=,
>location=top,
>align=flushleft,]]
>
> \starttext
>  
> \blank[force,3*line,depth]
>  
> \begingroup
> \BigFont
> \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum 
> dolor sit amet consectetur adipisicing elit}
> \endgroup
>
> asdfasdf
>  
> \page
> \blank[force,3*line,depth]
>  
> \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit 
> Lorem ipsum dolor sit amet consectetur adipisicing elit]
>   asdf
> \stopsection
>  
> \stoptext
> =
>  
>  
>  
> 
> 
> 
> From: 
> Subject: Re: [NTG-context] Align in setup header/footer
> Date: 25 June 2021 at 20:31:00 AEST
> To: 
> 
> 
> You can use \hfill
> 
>> -Ursprüngliche Nachricht-
>> Von: ntg-context  Im Auftrag von Jan U. Hasecke
>> Gesendet: Freitag, 25. Juni 2021 12:23
>> An: ntg-context@ntg.nl
>> Betreff: Re: [NTG-context] Align in setup header/footer
>> 
>> 
>> Hi Denis,
>> 
>> Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch:
>>> Or, for more complex footers/headers you can use:
>>> \setupfootertexts
>>> [left on odd page] % out
>>> [right on odd page] % in
>>> [right on even page] % in
>>> [left on even page] % out
>> 
&g

Re: [NTG-context] injectors not working in LMTX?

2021-06-25 Thread Hans Hagen

On 6/24/2021 6:44 PM, Rik Kabel wrote:

In March, Pablo wrote:

the following sample (from
https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort)
doesn’t get right output with LMTX (current latest from 2021.03.25 14:04):

   \showinjector
   \setinjector[register][3][\column]
   \setinjector[list][2][{\blank[3*big]}]
   \starttext
 \placelist[section][criterium=text]
 \blank[3*big]
 \placeregister[index][criterium=text]
 \page
 \startsection[title=Alpha] first \index{first}
 \startsection[title=Beta] second \index{second}
 \startsection[title=Gamma] third \index{third}
 \startsection[title=Delta] fourth \index{fourth}
   \stoptext

MkIV compiles this source fine, so I think this might be a bug.

Many thanks for your help,

Pablo

In trying to tune a toc, I discovered that this is still an issue.


fixed in next upload

-
  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] First line of larger font paragraph on grid

2021-06-25 Thread denis.maier
Hi,

I have some text in a larger font where the first line should be on the grid. 
Therefore, I've tried to adapt the solution from the wiki: 
https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid

The interesting thing is that the section command indeed places the first line 
on the grid, but using \framed directly does not give the desired results.

I must be missing something obvious. Does anyone know a solution ?

Thanks for your help,
Denis

===
\setuplayout[grid=yes]
\showgrid

\definefont  [BigFont]  [Bold at 20pt] [24pt]

\unprotect
\unexpanded\def\section_command#1#2{%
  \framed [
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]{#2}%
}


\setuphead [section] [
style={\BigFont},
after=,
   before={\blank[1*line]},
  command=\section_command,
]
\protect

\defineframed[myframed][
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]]

\starttext

\blank[force,3*line,depth]

\begingroup
\BigFont
\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum 
dolor sit amet consectetur adipisicing elit}
\endgroup

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit 
Lorem ipsum dolor sit amet consectetur adipisicing elit]
  asdf
\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] injectors not working in LMTX?

2021-06-24 Thread Rik Kabel

In March, Pablo wrote:

   the following sample (from
   https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort)
   doesn’t get right output with LMTX (current latest from 2021.03.25 14:04):

  \showinjector
  \setinjector[register][3][\column]
  \setinjector[list][2][{\blank[3*big]}]
  \starttext
\placelist[section][criterium=text]
\blank[3*big]
\placeregister[index][criterium=text]
\page
\startsection[title=Alpha] first \index{first}
\startsection[title=Beta] second \index{second}
\startsection[title=Gamma] third \index{third}
\startsection[title=Delta] fourth \index{fourth}
  \stoptext

   MkIV compiles this source fine, so I think this might be a bug.

   Many thanks for your help,

   Pablo

In trying to tune a toc, I discovered that this is still an issue.

--
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] setup parameter problem

2021-06-07 Thread Hans Hagen

On 6/7/2021 6:17 PM, Hans van der Meer wrote:
The code below seems ok in \startsection[title=] but not when I program 
the parameter collection with \def\setupparameters{\getparameters[prefix]}
In that case even [title={enclosed value}] crashes with error message: 
Use of \doMacro doesn't match its definition.

Obviously I am missing something here. What?

\def\Macro{\dosingleargument\doMacro}
\def\doMacro[#1]#2{#1X#2}

The code below shows that it should be possible.
\startsection[title=\Macro{arg} no braces needed]\stopsection
\startsection[title={\Macro[arg1]{arg2} enclosed in braces}]\stopsection
\stoptext


just prevent expansion:

  \protected\def\Macro{\dosingleargument\doMacro}

  \def\doMacro[#1]#2{#1X#2}

and when you're in adventurous mode (which i know you are) try this:

  \protected\tolerant\def\Macro[#1]#;#2%
{\ifparameter#1\or#1:\fi#2}

and when you for some reason do wan tto expand then, as in, do:

  \edef\foo{\expand\Macro[arg1]{arg2}}

etc etc

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
___


  1   2   3   4   5   6   7   >