[NTG-context] [installation] "unzipping" gives 0K files on windows

2024-05-14 Thread yashpalgoyal1304+ntgcontext
xmf-win64/bin/luametatex.exe
mtx-install | skipping tex/texmf-win64/bin/mtxrun.exe
mtx-install | new  : 100 % :   701766 : tex/texmf-win64/bin/mtxrun.lua
```

-
### links

[context_history]: https://wiki.contextgarden.net/ConTeXt_history#ConTeXt_LMTX 
"lmtx in context history"
[check_installation]: 
https://wiki.contextgarden.net/Installation#Check_the_installation "check the 
installation"
[main_page]: https://wiki.contextgarden.net/Main_Page "context main page"
[pragma-ade]: https://www.pragma-ade.nl/download-1.htm "pragma webpage"

[`context-win64.zip`]: 
https://lmtx.pragma-ade.com/install-lmtx/context-win64.zip "~1.5M"
[`texmf.zip`]: http://lmtx.pragma-ade.com/install-lmtx//texmf.zip "~52M"
[`texmf-context.zip`]: 
http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip "~115M"
___
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: Hbox error with itemized list on second page

2024-05-14 Thread Ross Schulman
Hi, sorry. The example was in an earlier message in the thread: 
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/ZLVFEBU73KBBCBUQMWXZWER2CZHR6ZR2/

I fixed the problem for now by forcing a page break where it was needed.

On Tue, May 14, 2024, at 6:57 AM, Wolfgang Schuster wrote:
> Ross Schulman schrieb am 07.05.2024 um 01:33:
>> So, unfortunately while using `\testpage` helped in the version of the 
>> resume I was working on at the time, I've encountered the error again now 
>> that some different content is making the page break at a different point, 
>> and setting `\testpage` as high as 6 is not fixing the problem. Is there 
>> something else I can/should try?
> 
> For the start you can show us a minimal example with the problem.
> 
> When you're still trying to create a paragraph with different text widths 
> there are limitations. TeX always typesets more text than it can fit on the 
> current page and when on the next page the text widths changes this is to 
> late for TeX at this moment because the text has already been set with the 
> width of the previous page.
> 
> 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: Hbox error with itemized list on second page

2024-05-14 Thread Wolfgang Schuster

Ross Schulman schrieb am 07.05.2024 um 01:33:
So, unfortunately while using `\testpage` helped in the version of the 
resume I was working on at the time, I've encountered the error again 
now that some different content is making the page break at a 
different point, and setting `\testpage` as high as 6 is not fixing 
the problem. Is there something else I can/should try?


For the start you can show us a minimal example with the problem.

When you're still trying to create a paragraph with different text 
widths there are limitations. TeX always typesets more text than it can 
fit on the current page and when on the next page the text widths 
changes this is to late for TeX at this moment because the text has 
already been set with the width of the previous page.


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] Is there a way to consolidate index reference numbers by book?

2024-05-10 Thread Joel via ntg-context
\useregister[workbookA][03_workbook][learnedlong][WB~1:~]
\useregister[workbookB][04_workbook][learnedlong][WB~2:~]
\useregister[workbookC][05_workbook][learnedlong][WB~3:~]
\useregister[workbookD][06_workbook][learnedlong][WB~4:~]




    \startchapter[title=Standards]                    
\placeregister[learnedlong,workbookA,workbookB,workbookC,workbookD]
        \stopchapter

I setup a custon index that lists items from four different workbooks. 

The problem is in the indexi, it displays entreis like this:
WHST.1.1: 11, 231, WB 1: 124, WB 1: 133, WB 2: 325, WB 2: 345, etc.
In other words, it says WB 1 in front of every page number from the first 
workbook.
Is there any way to consolidate the page numbers by book, e.g. output instead 
like this:
WHST.1.1: 11, 231, WB1: 124, 133, WB 2: 325, 345
In other words, it list all page numbers for Workbook 1 right after WB 1: 
instead of placing WB 1 in front of every single page from Workbook 1?
--Joel
___
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 place text, but make it completely hidden from viewers?

2024-05-09 Thread Joel via ntg-context
I have found a few situations is confusing/breaking ConTeXt:
- Footnotes inside tables, figures, frames, margins (won't render the cited 
item).
- Custom index items inside those items (displays "entry not flushed").
My workaround has been to define a size 0 font \tfz, then put it in a block 
like this:

    {\tfz%    \starteffect[hidden]%
    \cite[author1912]    \stopeffect%
    }%
The problem this seems to create, is sometimes if placed between two passages, 
it interprets a need to create two paragraph breaks:
\input knuth
    {\tfz%    \starteffect[hidden]%
    \cite[author1912]    \stopeffect%
    }%
\input knuth
It creates a paragraph break after the first knuth, then another after the 
hidden text, thereby creating a "double spaced" break between two paragraphs. 
Note the above code is used in many macros, so I don't have full control always 
where it appears, but its making the double-spaced break everywhere.

Is there either (1) something can enter before this code that essentially has 
the effect of "backup to the previous paragraph" or (2) some other method of 
hiding text that makes it present on the page, but just not visible to the 
reader, that won't create a double spaced break, or take up any space 
what-so-ever?
--Joel
___
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: Hbox error with itemized list on second page

2024-05-08 Thread Ross Schulman
Hi everyone. Just raising this question again. Is anyone able to help me figure 
out why this is happening and how I can fix it more permanently? Thank you all 
very much!

Ross

On Mon, May 6, 2024, at 7:33 PM, Ross Schulman wrote:
> So, unfortunately while using `\testpage` helped in the version of the resume 
> I was working on at the time, I've encountered the error again now that some 
> different content is making the page break at a different point, and setting 
> `\testpage` as high as 6 is not fixing the problem. Is there something else I 
> can/should try?
> 
> Thanks very much,
> Ross
> 
> On Tue, Apr 30, 2024, at 12:20 PM, Ross Schulman wrote:
>> Thank you. Adding that did the trick!
>> 
>> Best,
>> Ross Schulman
>> 
>> On Tue, Apr 30, 2024, at 11:47 AM, Wolfgang Schuster wrote:
>>> Ross Schulman schrieb am 30.04.2024 um 15:01:
>>> > Hello,
>>> > I'm attempting to format a resume in Context building off of a template 
>>> > I found online. I'm having an odd error with some bullets on the second 
>>> > page, however. I'm guessing it has something to do with my \definelayout 
>>> > for the second (and subsequent) pages, but I can't figure it out for 
>>> > sure. What is happening is that whichever bullets are at the top of the 
>>> > second page are being wrapped as if they were appearing on the first 
>>> > page, which has a different layout structure.
>>> > 
>>> > I've pasted a sanitized version of the tex file below. Any assistance 
>>> > would be greatly appreciated!
>>> > 
>>> > Thanks,
>>> > Ross Schulman
>>> > 
>>> > 
>>> > [...]
>>> > 
>>> > Lorem Manager
>>> > \startitemize[packed]
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> > \stopitemize
>>> 
>>> You can use the \testpage command to force a page break before the TeX 
>>> mechanism to start a new page kicks in.
>>> 
>>> \startitemize[inbetween={\testpage[2]\blank}]
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>> \stopitemize
>>> 
>>> 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
>>> ___
>>> 
>> 
>> ___
>> 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: more register questions!

2024-05-07 Thread Rik Kabel

Hello Wolfgang and all,

I have been trying to extend this to handle endnotes. So far, I have not 
succeeded; the number is always that of the last endnote.


I could possibly increment a counter for each endnote processed, but 
that seems a hack.


--
Rik

On 2024-05-03 06:18, Wolfgang Schuster wrote:

Thomas A. Schmitz schrieb am 02.05.2024 um 17:01:

Hi,

making wonderful progress on my registers and translating from xml. 
There is one thing I can't figure out (and I or some other good soul 
may have asked in the past...). Is it possible to mark occurrences in 
footnotes? Ideally, the entry in the register would look like


p. 100\high{20}

to show that the term occurs in note 20 on p. 100. But if that's 
asking too much, I would be content with applying a processor (say, 
italic) to these register entries. From the looks of the tuc file, 
Context doesn't appear to "know" that a register entry is within a 
footnote. But Hans never ceases to amaze me, so maybe there is a way 
(short of applying special markup to these notes in the source)?


You can play with the following example, the main point use to use the 
\setregisterentry command and pass the footnote counter with the third 
(optional) argument.


\def\IndexPageCommand#1%
  {#1\doifsomething
 {\currentregisterpageuserdata{footnote}}
 {\high{\currentregisterpageuserdata{footnote

\setupregister[index][pagecommand=\IndexPageCommand]

\starttext

\dorecurse{200}
{\samplefile{lorem}\expanded{\setregisterentry[index][entries=\recurselevel]}% 

\samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}% 


   \samplefile{lorem}}

\page \placeindex

\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
___ 
___
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: intercolumn pull quotes typesetting

2024-05-07 Thread Garulfo

Hi all,

I am happy to share one way to get "pull quotes between two columns"
(in a three columns layout).

https://wiki.contextgarden.net/images/5/50/context_3columns_layout.pdf

It's not based on Columns / ColumnSet / Page Columns.
It just combines \startuseMPgraphic + build_parshape + \framed +
\getshapetext (and several precautions regarding offsets, thicknesses,
spacings, dimensions, box positioning...)

It's not used in this case, but I discovered that \placelocalfootnotes 
and \reference \at \in etc... are fully functional with \getshapetext

:-)

The resulting layout isn't as complex as a newspaper, but a lot can be
done (at the cost of some investment, but really, it's not that hard).

LuaMetaTeX is definitely fun and pretty.
Thanks devs and community.


=> One question <=

Would it be possible to define several shapetex like 
\startshapetex[NAME1], \startshapetex[NAME2], in order to alternate the 
use of \getshapetext[NAME1] and \getshapetext[NAME2]

because currently only one can be active at a time ?

Garulfo



2 years ago...

Le 13/03/2022 à 22:13, Garulfo a écrit :


Hi all,

what would be the prefered way to typeset pull quotes (with
\startcolumns or even \startcolumnset if needed) between 2 columns.

Examples:
https://tex.stackexchange.com/questions/45709/how-do-you-create-pull-quotes
https://www.societal.fr/sites/societal/files/old_site/societal-46-6-boiteux-reperesettendances.pdf#page=2

Thanks for your ideas and solutions.

Garulfo
<>
___
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: Hbox error with itemized list on second page

2024-05-06 Thread Ross Schulman
So, unfortunately while using `\testpage` helped in the version of the resume I 
was working on at the time, I've encountered the error again now that some 
different content is making the page break at a different point, and setting 
`\testpage` as high as 6 is not fixing the problem. Is there something else I 
can/should try?

Thanks very much,
Ross

On Tue, Apr 30, 2024, at 12:20 PM, Ross Schulman wrote:
> Thank you. Adding that did the trick!
> 
> Best,
> Ross Schulman
> 
> On Tue, Apr 30, 2024, at 11:47 AM, Wolfgang Schuster wrote:
>> Ross Schulman schrieb am 30.04.2024 um 15:01:
>> > Hello,
>> > I'm attempting to format a resume in Context building off of a template 
>> > I found online. I'm having an odd error with some bullets on the second 
>> > page, however. I'm guessing it has something to do with my \definelayout 
>> > for the second (and subsequent) pages, but I can't figure it out for 
>> > sure. What is happening is that whichever bullets are at the top of the 
>> > second page are being wrapped as if they were appearing on the first 
>> > page, which has a different layout structure.
>> > 
>> > I've pasted a sanitized version of the tex file below. Any assistance 
>> > would be greatly appreciated!
>> > 
>> > Thanks,
>> > Ross Schulman
>> > 
>> > 
>> > [...]
>> > 
>> > Lorem Manager
>> > \startitemize[packed]
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> > \stopitemize
>> 
>> You can use the \testpage command to force a page break before the TeX 
>> mechanism to start a new page kicks in.
>> 
>> \startitemize[inbetween={\testpage[2]\blank}]
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>> \stopitemize
>> 
>> 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
>> ___
>> 
> 
> ___
> 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: transparent color

2024-05-06 Thread Wolfgang Schuster

Bruce Horrocks schrieb am 06.05.2024 um 15:30:

On 6 May 2024, at 09:41, Hans van der Meer via ntg-context  
wrote:

I would like to use a transparent version of an existing color. Thus
\definecolor[transparentcolor][color,t=0.2,a=1]
instead of
\definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
because I do not know the rgb values of the color that must be made 
transparent, only its name.

How to accomplish?

The Wiki page <https://wiki.contextgarden.net/Color> gives the source files for 
various sets of colours (built in, crayola etc) and the source has the RGB values in 
a fairly obvious format.


\definecolor [wolley] [\colorcomponents{yellow},t=0.5,a=1]

\starttext

%\showcolorcomponents [yellow]

\framed[background=color,backgroundcolor=darkblue,foregroundcolor=yellow]{yellow}

\framed[background=color,backgroundcolor=darkblue,foregroundcolor=wolley]{wolley}

\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] Re: transparent color

2024-05-06 Thread Bruce Horrocks


> On 6 May 2024, at 09:41, Hans van der Meer via ntg-context 
>  wrote:
> 
> I would like to use a transparent version of an existing color. Thus
> \definecolor[transparentcolor][color,t=0.2,a=1]
> instead of
> \definecolor[transparentcolor][r=..,g=..,b=..,t=0.2,a=1]
> because I do not know the rgb values of the color that must be made 
> transparent, only its name.
> 
> How to accomplish? 

The Wiki page <https://wiki.contextgarden.net/Color> gives the source files for 
various sets of colours (built in, crayola etc) and the source has the RGB 
values in a fairly obvious format.

—
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: more register questions!

2024-05-03 Thread Thomas A. Schmitz

Hi Wolfgang,

powerful and elegant, as always! I think I have a solution with xml; I 
will have to test it more extensively with my complex real file; but 
here comes, also for Hraban (if it works in real life, I'll add it to 
the wiki...).


Thanks a lot!

Thomas

\startbuffer[test]

  
Dummy text.Dummy footnote.
  
  
Dummy text.Dummy footnote.
  
  

\stopbuffer

\startxmlsetups xml:testsetups
  \xmlsetsetup{#1}{*}{-}
  \xmlsetsetup{#1}{document|chapter|p|footnote|indexentry|index}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

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

\startxmlsetups xml:chapter
  \xmlflush {#1} \page
\stopxmlsetups

\startxmlsetups xml:p
  \xmlflush {#1} \par
\stopxmlsetups

\startxmlsetups xml:footnote
  \footnote[\xmlatt{#1}{id}]{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:indexentry
  \xmldoiftext {#1} {ancestor::footnote}
   {\setregisterentry 
[index][keys:1=\xmlatt{#1}{key},entries:1=\xmlatt{#1}{key}][footnote={\rawcountervalue[footnote]}]}


{\setregisterentry[index][keys:1=\xmlatt{#1}{key},entries:1=\xmlatt{#1}{key}]}
\stopxmlsetups

\startxmlsetups xml:index
  \page \placeregister [index]
\stopxmlsetups

\def\IndexPageCommand#1%
  {#1\doifsomething
 {\currentregisterpageuserdata{footnote}}
 {\high{\currentregisterpageuserdata{footnote

\setupregister[index][pagecommand=\IndexPageCommand]
\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext




On 5/3/24 12:18, Wolfgang Schuster wrote:
You can play with the following example, the main point use to use the 
\setregisterentry command and pass the footnote counter with the third 
(optional) argument.


\def\IndexPageCommand#1%
   {#1\doifsomething
  {\currentregisterpageuserdata{footnote}}
  {\high{\currentregisterpageuserdata{footnote

\setupregister[index][pagecommand=\IndexPageCommand]

\starttext

\dorecurse{200}
{\samplefile{lorem}\expanded{\setregisterentry[index][entries=\recurselevel]}%
\samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}%
    \samplefile{lorem}}

\page \placeindex

\stoptext

Wolfgang


--
Prof. Dr. Thomas A. Schmitz
Institut für Klassische und Romanische Philologie
Universität Bonn
Rabinstr. 8
53111 Bonn
http://www.philologie.uni-bonn.de/de/personal/schmitz

___
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: more register questions!

2024-05-03 Thread Thomas A. Schmitz

Hi Massi,

yes, that was a very good idea! I can detect if the element  
occurs within a footnote by testing


\xmldoiftext {#1} {ancestor::footnote}

and then apply a processor to these entries. That would be a good 
solution for the time being.


Thanks and all best

Thomas

On 5/2/24 17:55, mf wrote:


I did something like that, with a processor that added a "n" after the 
occurrence page number.


Since you typeset XML, maybe you can detect that an index (register) 
reference happens inside a note from the DOM element you are typesetting.


Then you use a command like this:

\index[NoteProcessor->sortkey]{index term}

where NoteProcessor is defined like this:

\defineprocessor[NoteProcessor][right={\itx n}]

In this case I'm adding a smaller "n" to the right of the page number of 
the occurrence.


Adding the \high style is not difficult:

\defineprocessor[NoteProcessor][right=\high{n}]

but replacing a fixed "n" with the footnote number is quite challenging.

The second argument of \defineprocessor has a "command=\...##1" option 
that could be exploited, but I don't know exactly what gets passed to 
that custom command as ##1; maybe the page number of the occurrence.


In that case, I'd look for a way to store the association between that 
occurrence and the footnote number, and retrieve that in the custom 
command.


Massi


--
Prof. Dr. Thomas A. Schmitz
Institut für Klassische und Romanische Philologie
Universität Bonn
Rabinstr. 8
53111 Bonn
http://www.philologie.uni-bonn.de/de/personal/schmitz

___
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: more register questions!

2024-05-03 Thread Wolfgang Schuster

Thomas A. Schmitz schrieb am 02.05.2024 um 17:01:

Hi,

making wonderful progress on my registers and translating from xml. 
There is one thing I can't figure out (and I or some other good soul 
may have asked in the past...). Is it possible to mark occurrences in 
footnotes? Ideally, the entry in the register would look like


p. 100\high{20}

to show that the term occurs in note 20 on p. 100. But if that's 
asking too much, I would be content with applying a processor (say, 
italic) to these register entries. From the looks of the tuc file, 
Context doesn't appear to "know" that a register entry is within a 
footnote. But Hans never ceases to amaze me, so maybe there is a way 
(short of applying special markup to these notes in the source)?


You can play with the following example, the main point use to use the 
\setregisterentry command and pass the footnote counter with the third 
(optional) argument.


\def\IndexPageCommand#1%
  {#1\doifsomething
 {\currentregisterpageuserdata{footnote}}
 {\high{\currentregisterpageuserdata{footnote

\setupregister[index][pagecommand=\IndexPageCommand]

\starttext

\dorecurse{200}
{\samplefile{lorem}\expanded{\setregisterentry[index][entries=\recurselevel]}%
\samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}%
   \samplefile{lorem}}

\page \placeindex

\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] Re: more register questions!

2024-05-02 Thread mf



Il 02/05/24 17:01, Thomas A. Schmitz ha scritto:

Hi,

making wonderful progress on my registers and translating from xml. 
There is one thing I can't figure out (and I or some other good soul may 
have asked in the past...). Is it possible to mark occurrences in 
footnotes? Ideally, the entry in the register would look like


p. 100\high{20}

to show that the term occurs in note 20 on p. 100. But if that's asking 
too much, I would be content with applying a processor (say, italic) to 
these register entries. From the looks of the tuc file, Context doesn't 
appear to "know" that a register entry is within a footnote. But Hans 
never ceases to amaze me, so maybe there is a way (short of applying 
special markup to these notes in the source)?




I did something like that, with a processor that added a "n" after the 
occurrence page number.


Since you typeset XML, maybe you can detect that an index (register) 
reference happens inside a note from the DOM element you are typesetting.


Then you use a command like this:

\index[NoteProcessor->sortkey]{index term}

where NoteProcessor is defined like this:

\defineprocessor[NoteProcessor][right={\itx n}]

In this case I'm adding a smaller "n" to the right of the page number of 
the occurrence.


Adding the \high style is not difficult:

\defineprocessor[NoteProcessor][right=\high{n}]

but replacing a fixed "n" with the footnote number is quite challenging.

The second argument of \defineprocessor has a "command=\...##1" option 
that could be exploited, but I don't know exactly what gets passed to 
that custom command as ##1; maybe the page number of the occurrence.


In that case, I'd look for a way to store the association between that 
occurrence and the footnote number, and retrieve that in the custom command.


Massi
___
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: \par and \startlines

2024-05-01 Thread Henning Hraban Ramm

Am 01.05.24 um 09:44 schrieb Wolfgang Schuster:
but that should be sufficient, but to repeat Hraban's question: What 
would be the advantage of using the format module?


The module provides features like

     - alignment of the verse lines
     - numbering of the lines (which isn't supported by \startlines 
unless you add the normal linenumbering mechanism)
     - support for lines which don't fit on a single page where the 
consecutive lines are indented


but the module is outdated and relies on an old mkii style code base.

A big difference between the \startlines environment and the format 
module is that the first treats
each line in the input file as a separate line in the output while the 
format module requires begin/end

tags for each line which works better for xml input.


Thank you! Doesn’t sound like I should use it…

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: \par and \startlines

2024-05-01 Thread Wolfgang Schuster

denisma...@mailbox.org schrieb am 30.04.2024 um 14:28:

-Ursprüngliche Nachricht-
Von: Wolfgang Schuster 
Gesendet: Samstag, 27. April 2024 07:40
An: Denis Maier 
Cc: mailing list for ConTeXt users 
Betreff: Re: [NTG-context] Re: \par and \startlines

Denis Maier schrieb am 26.04.2024 um 19:52:


I see. But there's no command that could be used to simulate an empty line?
If not, me should I perhaps try to replicate the wrapper structure
from the XML source in context? (I'll also look into the format module
of
course.) What do you think?

Below is a different solution to your problem with works without \startlines
because you already mark up each individual line in the poem which make it
possible to add a linebreak in the output.

With \blank options (samepage) you can avoid pagebreaks between stanzas.

\startxmlsetups xml:test
  \xmlsetsetup{#1}{*}{-}
  \xmlsetsetup{#1}{doc|poem|stanza|line}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:test}

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

\startxmlsetups xml:poem
  \blank[line]
  \xmlflush{#1}
  \blank[back,line]
\stopxmlsetups

\startxmlsetups xml:stanza
 \xmlflush{#1}\blank[preference,line]
\stopxmlsetups

\startxmlsetups xml:line
  \xmlflush{#1}\blank[samepage,none]
\stopxmlsetups

\startbuffer[test]




The
lines
are
there!


The
lines
are
there!


The
lines
are
there!



\stopbuffer

\starttext

\samplefile{lorem}

\xmlprocessbuffer{test}{test}{}

\samplefile{lorem}

\stoptext

Thanks for this solution. I've had a quick look, and it seems to do exactly 
what I need. My requirements are rather simple at the moment, but that should 
be sufficient, but to repeat Hraban's question: What would be the advantage of 
using the format module?


The module provides features like

    - alignment of the verse lines
    - numbering of the lines (which isn't supported by \startlines 
unless you add the normal linenumbering mechanism)
    - support for lines which don't fit on a single page where the 
consecutive lines are indented


but the module is outdated and relies on an old mkii style code base.

A big difference between the \startlines environment and the format 
module is that the first treats
each line in the input file as a separate line in the output while the 
format module requires begin/end

tags for each line which works better for xml input.

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: Hbox error with itemized list on second page

2024-04-30 Thread Ross Schulman
Thank you. Adding that did the trick!

Best,
Ross Schulman

On Tue, Apr 30, 2024, at 11:47 AM, Wolfgang Schuster wrote:
> Ross Schulman schrieb am 30.04.2024 um 15:01:
> > Hello,
> > I'm attempting to format a resume in Context building off of a template 
> > I found online. I'm having an odd error with some bullets on the second 
> > page, however. I'm guessing it has something to do with my \definelayout 
> > for the second (and subsequent) pages, but I can't figure it out for 
> > sure. What is happening is that whichever bullets are at the top of the 
> > second page are being wrapped as if they were appearing on the first 
> > page, which has a different layout structure.
> > 
> > I've pasted a sanitized version of the tex file below. Any assistance 
> > would be greatly appreciated!
> > 
> > Thanks,
> > Ross Schulman
> > 
> > 
> > [...]
> > 
> > Lorem Manager
> > \startitemize[packed]
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> >\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> > \stopitemize
> 
> You can use the \testpage command to force a page break before the TeX 
> mechanism to start a new page kicks in.
> 
> \startitemize[inbetween={\testpage[2]\blank}]
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
>\item \ipsum[alternative=words, n=10, inbetween=\space] \par
> \stopitemize
> 
> 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
> ___
> 
___
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: Hbox error with itemized list on second page

2024-04-30 Thread Wolfgang Schuster

Ross Schulman schrieb am 30.04.2024 um 15:01:

Hello,
I'm attempting to format a resume in Context building off of a template 
I found online. I'm having an odd error with some bullets on the second 
page, however. I'm guessing it has something to do with my \definelayout 
for the second (and subsequent) pages, but I can't figure it out for 
sure. What is happening is that whichever bullets are at the top of the 
second page are being wrapped as if they were appearing on the first 
page, which has a different layout structure.


I've pasted a sanitized version of the tex file below. Any assistance 
would be greatly appreciated!


Thanks,
Ross Schulman


[...]

Lorem Manager
\startitemize[packed]
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
   \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize


You can use the \testpage command to force a page break before the TeX 
mechanism to start a new page kicks in.


\startitemize[inbetween={\testpage[2]\blank}]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

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] Hbox error with itemized list on second page

2024-04-30 Thread Ross Schulman
Hello,
I'm attempting to format a resume in Context building off of a template I found 
online. I'm having an odd error with some bullets on the second page, however. 
I'm guessing it has something to do with my \definelayout for the second (and 
subsequent) pages, but I can't figure it out for sure. What is happening is 
that whichever bullets are at the top of the second page are being wrapped as 
if they were appearing on the first page, which has a different layout 
structure.

I've pasted a sanitized version of the tex file below. Any assistance would be 
greatly appreciated!

Thanks,
Ross Schulman


\usemodule[ipsum]
\setuppapersize[letter]
\setuppagenumbering[location=]
\definelayout[first]
  [% horizontal
   backspace=2.5in,
   leftmargin=1.75in,
   leftmargindistance=0.25in,
   width=5.5in,
   rightmargin=0in,
   % vertical
   topspace=0pt,
   header=1.2in,
   headerdistance=.1in,
   height=middle,
   footerdistance=0pt,
   footer=\lineheight,
   bottomspace=.5in]

\definelayout[rest]
  [% horizontal
leftmargin=0in,
width=6.5in,
rightmargin=0in,
% % vertical
topspace=0pt,
header=1in,
headerdistance=.1in,
height=middle,
footerdistance=0pt,
footer=\lineheight,
bottomspace=.3in]

\definelayout[1][first]
\definelayout[2][rest]

\setupmarginblock
  [location=left,
   width=\leftmarginwidth,
   align=flushright]

\usecolors[svg]

\definehead[contacts][title]
\setuphead
[contacts]
[
align=center,
page=no,
after={\thinrule\blank[big]}]

\definehead[topic][subject]
\setuphead
[topic]
[
after={\hairline}]

\defineitemgroup
  [timeline]
  [before=,
   inbetween=,
   width=6em]

\setuplines[before=,after=,command=\strut]

\definelayer[mybkgr][x=0mm,y=0mm,
  width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background={mybkgr}]

\starttext
\setlayerframed
  [mybkgr]
  []
  [background=color,
   framecolor=forestgreen,
   backgroundcolor=forestgreen,
   foregroundcolor=white,
   width=\paperwidth,
   height=\dimexpr\topspace+\headerheight\relax]
{\dontleavehmode{\tfd ROSS SCHULMAN}\blank[medium]
policy technologist
}

\startmarginblock
\topic{CONTACT}
\startlines
1234 Main St NW
Washington, DC 20011
\stoplines

\topic{LANGUAGES}
\startlines
English (Native Speaker)
Spanish (Conversational)
\stoplines

\topic{TECH}
\startlines
Rust
Javascript \letterampersand\space Typescript
Linux Administration
Google and Microsoft Office Suites
\stoplines
\stopmarginblock

\setupalign[flushleft]
\topic{EXPERIENCE}
\starttimeline
\sym{2021--Now}\color[forestgreen]{Lorem Ipsum Foundation}\hfill
\color[darkgrey]{\tfx San Francisco, CA (remote)}

Senior Fellow
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2015--2021}\color[forestgreen]{Other Place About Lorem}\hfill
\color[darkgrey]{\tfx Washington, DC}

Senior Lorem Counsel
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2014--2015}\color[forestgreen]{Lorems R Us}\hfill
\color[darkgrey]{\tfx Washington, DC}

Lorem Manager
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2010--2014}\color[forestgreen]{Computer and Communications Industry 
Association}\hfill
\color[darkgrey]{\tfx Washington, DC}

Lorem Project Manager
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize

\sym{2005--2007}\color[forestgreen]{Center for Lorem Ipsum}\hfill
\color[darkgrey]{\tfx Washington, DC}

Program Associate
\startitemize[packed]
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
  \item \ipsum[alternative=words, n=10, inbetween=\space] \par
\stopitemize
\stoptimeline
\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

[NTG-context] Re: start/stopregister

2024-04-26 Thread Hans Hagen

On 4/26/2024 9:54 AM, Thomas A. Schmitz wrote:

On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
 A\index{A} B \page
 A\startregister [index] {A} B\startregister [index] [B] {B}
 \dorecurse {10} {\input tufte}
 A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext


And I'm not even sure if this is allowed to say anymore, but: works in 
mkii...

That's because mkii is AI enhanced. Can you try this:

\setuppapersize [A6]

\starttext

A\index{A} B \page


\stopregister [index] [A]
B>
\stopregister [index] [B]

\page

\placeregister[index]

\stoptext

(Watch the [A] vs {A} usage where [A] is the label used for matching the 
potentially weiord nested start/stop ... maybe we need different aliases 
for these, like \fromregister and \toregister.)


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 / 
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: start/stopregister

2024-04-26 Thread Thomas A. Schmitz

On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
     A\index{A} B \page
     A\startregister [index] {A} B\startregister [index] [B] {B}
     \dorecurse {10} {\input tufte}
     A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext


And I'm not even sure if this is allowed to say anymore, but: works in 
mkii...


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: start/stopregister

2024-04-26 Thread Thomas A. Schmitz

On 4/25/24 6:27 PM, Thomas A. Schmitz wrote:
Ah, simple typo! After fixing abel to label, startregister gives the 
expected results again! Thanks Hans! I may be back with more register 
questions soon...


And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!


All best

Thomas

\setuppapersize [A6]

\starttext
A\index{A} B \page
A\startregister [index] {A} B\startregister [index] [B] {B}
\dorecurse {10} {\input tufte}
A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\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: start/stopregister

2024-04-25 Thread Hans Hagen

On 4/25/2024 4:51 PM, Taco Hoekwater wrote:




On 25 Apr 2024, at 16:45, Thomas A. Schmitz  wrote:

On 4/25/24 16:13, Henning Hraban Ramm wrote:

I’m using it like
\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]
i.e. very similar to your example, and can confirm it doesn’t result in a page 
range in the index. Also gives no error.


Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from 
a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in 
the references table, mkxl doesn't. This appears to be the relevant bit, and it is 
connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt

references.lastrealpage = texgetcount(c_realpageno)


Let's seen if we can make Thomas more of an expert as he's zooming in on 
the issue:


extendregister {
metadata   = { name =  name },
references = { abel =  label },
}

Let me know if you't see it.


Possibly related: I noticed last week that mkxl does not update the legacy 
counter \pageno any more for every page.

i'll check it

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 / 
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: start/stopregister

2024-04-25 Thread Taco Hoekwater


> On 25 Apr 2024, at 16:45, Thomas A. Schmitz  
> wrote:
> 
> On 4/25/24 16:13, Henning Hraban Ramm wrote:
>> I’m using it like
>> \startregister[index][bibliografie]{Bibliografie}
>> …
>> \stopregister[index][bibliografie]
>> i.e. very similar to your example, and can confirm it doesn’t result in a 
>> page range in the index. Also gives no error.
> 
> Since I've become an expert on tuc files since yesterday (ha!): if I compare 
> the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry 
> ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be 
> the relevant bit, and it is connected with the replacement of realpageno by 
> c_realpageno in line 638 of strc-reg.lmt
> 
> references.lastrealpage = texgetcount(c_realpageno)

Possibly related: I noticed last week that mkxl does not update the legacy 
counter \pageno any more for every page.

Best wishes,
Taco

— 
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 / 
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: start/stopregister

2024-04-25 Thread Thomas A. Schmitz

On 4/25/24 16:13, Henning Hraban Ramm wrote:

I’m using it like

\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]

i.e. very similar to your example, and can confirm it doesn’t result in 
a page range in the index. Also gives no error.


Since I've become an expert on tuc files since yesterday (ha!): if I 
compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an 
entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This 
appears to be the relevant bit, and it is connected with the replacement 
of realpageno by c_realpageno in line 638 of strc-reg.lmt


references.lastrealpage = texgetcount(c_realpageno)

But that's as far as I could get...

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: start/stopregister

2024-04-25 Thread Henning Hraban Ramm

Am 25.04.24 um 15:44 schrieb Thomas A. Schmitz:

Hi all,

has \startregister been superseded in luametatex or is it not yet 
implemented? I tried to read strc-reg.lmt but couldn't figure out what 
is going on. The following silly minimal test produces the expected 
result with mkiv but not in mkxl.


All best

Thomas

\setuppapersize [A6]

\starttext
 A\index{A} B\startregister [index] [B] {B}
 \dorecurse {10} {\input tufte}
 A\index{A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext



I’m using it like

\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]

i.e. very similar to your example, and can confirm it doesn’t result in 
a page range in the index. Also gives no error.


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] start/stopregister

2024-04-25 Thread Thomas A. Schmitz

Hi all,

has \startregister been superseded in luametatex or is it not yet 
implemented? I tried to read strc-reg.lmt but couldn't figure out what 
is going on. The following silly minimal test produces the expected 
result with mkiv but not in mkxl.


All best

Thomas

\setuppapersize [A6]

\starttext
A\index{A} B\startregister [index] [B] {B}
\dorecurse {10} {\input tufte}
A\index{A} B\stopregister [index] [B]

\page

\placeregister[index]

\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: what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?

2024-04-24 Thread Wolfgang Schuster

garu...@azules.eu schrieb am 20.04.2024 um 23:00:

I can not figure out why this progress bar only works when \showframe is 
activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)

\showframe

\startuseMPgraphic{MonGraphisme_MP}
   numeric n ; n := \number\realpageno ;
   numeric m ; m := \number\lastpageno ;
   numeric h ; h := \overlayheight ;
   numeric w ; w := \overlaywidth ;
   numeric e ; e := 3mm;
   numeric r ; r := (((n-1)/(m-1))*w);
   fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ;
   fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
\stopuseMPgraphic

\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]

\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]

\starttext
\dorecurse{10}{\input tufte\page}
\stoptext

Any clue is warmly welcome


You need

    \setupbackgrounds[state=repeat]

which is set when you use \showframe.

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: documentation: parameters of \setuplist

2024-04-24 Thread Henning Hraban Ramm

Am 24.04.24 um 01:00 schrieb Bruce Horrocks:

In the source there is a comment relating to location:

%D Regular list entries are bound to a specific location in order to get the 
right
%D pagenumber etc.\ associated. When pushing something inbetween (in mkiv) it 
ends
%D up directtly in the list. This is the default because otherwise users will 
wonder
%D why spacing might get messed up (due to an unseen but present node). It is
%D possible to force a location by explicitly setting \type {location} to \type
%D {here}.
%D
%D Another way to force a certain order is to set the \type {order} variable 
when
%D placing a list. The \type {command} option only pushes commands into the 
right
%D order, and \type {all} orders all entries (which might be too much). In this 
case
%D no specific location is needed with the inbetween method. Maybe additional
%D mechanisms show up some day. See \type {inbetween-001.tex} for an example.

I don't really understand what capability the comment is referring to let alone 
be able to create an example demonstrating the difference.


Thank you, so it looks like "location=here" is only used with 
\writebetweenlist to get the current page number.


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: Why don't footnotes appear in floats or figures?

2024-04-23 Thread Joel via ntg-context
 Okay, I've been trying many things with this \startpostponing code--if I 
understand what's happening, its moving the figures to a later page. I'm not 
sure that's quite ideal, its not fully working with my actual documents, and 
leaves lots of empty white space, when I'm already in a situation where I need 
to reduce page count.
So I thought an alternative route:
(1) have a code that checks "what is current footnote number?" that sets that 
as a variable
\def\currentfoodnote{\somevariableincontextthatgetsfoodnotenumber}
(2) adjust my placefigure macro such that the footnote is outside the 
placefigure, but color it white so its invisible:
\define\showafigure{

\cite[author2019]<--somehow hide this invisible
 
\placefigure{Caption\superscript{\currentfootnote}}}{\externalfigure[cow][width=\textwidth]}
 <--this places a superscript number inside the caption, but it isn't the true 
marker(3) in the caption, place a superscript number with value to 
\currentfootnoteIts basically a fake footnote, just a superscript number of the 
same value as the real footnote.


Shouldn't this result work? Any idea how I can get current footnote value?
--Joel

   On Monday, April 22, 2024 at 07:22:24 AM MDT, vm via ntg-context 
 wrote:  
 
 

On 22/04/2024 14:38, Joel via ntg-context wrote:
> Is this the correct way to be using the \startpostponing code (see 
> example below)?
> 
> \starttext
>      \input knuth
> \startpostponing
>      \placefigure{Caption\footnote{message 
> A}}{\externalfigure[cow][width=\textwidth]}
> \stoppostponing
> \stoppostponing



double stop ?

___
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: minwidth not working ?

2024-04-22 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht-
> Von: Wolfgang Schuster 
> Gesendet: Samstag, 20. April 2024 11:56
> An: Denis Maier 
> Cc: mailing list for ConTeXt users ; denis.ma...@unibe.ch
> Betreff: Re: [NTG-context] Re: minwidth not working ?
> 
> Denis Maier schrieb am 19.04.2024 um 22:55:
> 
> >> Wolfgang Schuster  hat am
> >> 19.04.2024 20:32 CEST geschrieben:
> >> denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47:
> >>>
> >>> Hi,
> >>>
> >>> Shouldn’t minwidth set a default minimal width for external figures?
> >>> But this here does not work
> >>>
> >>> [...]
> >>>
> >>> Am I missing something here?
> >>
> >> There are no minwidth/minheight values for \externalfigure.
> >>
> >> Wolfgang
> >>
> > So the wiki is wrong here?
> > https://wiki.contextgarden.net/Command/setupexternalfigure
> 
> Yes the comment at the end of page is wrong and the text about the strut
> setting can also be removed, only the orientation value is missing in the
> command table.
> 
> Wolfgang

Thanks you for the clarification, Wolfgang. I've changed the wiki page.
Best,
Denis

___
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: Why don't footnotes appear in floats or figures?

2024-04-22 Thread Joel via ntg-context
 I've managed to get a minimum working example. If you check, you'll see the 
5th footnote inside a placefigure doesn't render anywhere:
\starttext

    \input knuth
    \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
B}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
C}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
D}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
E}}{\externalfigure[cow][width=\textwidth]}
    \input knuth
    \placefigure{Caption\footnote{message 
F}}{\externalfigure[cow][width=\textwidth]}

\stoptext


Is this the correct way to be using the \startpostponing code (see example 
below)?
\starttext
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
A}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
B}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
C}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
D}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
E}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
    \input knuth
\startpostponing
    \placefigure{Caption\footnote{message 
F}}{\externalfigure[cow][width=\textwidth]}
\stoppostponing
\stoptext




On Monday, April 22, 2024 at 02:31:30 AM MDT, Hans Hagen via ntg-context 
 wrote:  
 
 On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
> I'm three days out from sending my work to an editor, and found some 
> serious problem: many footnotes just aren't rendering.
> 
> I have a history text that uses ConTeXt-SBL for the citations, as such, 
> it has lots of footnotes. Sometimes the footnotes are just in the main 
> text, but sometimes also in figure captions, inside floats, inside 
> tables that are inside floats, inside tabulations inside floats, etc.
> 
> What I find alarming is it is frequently not rendering all of the 
> footnote messages at the bottom of the page. The actual footnote number 
> within the body is rendered, but no number is listed in at the bottom of 
> the page. So I might see a list of footnotes, for instance, on page 1, I 
> only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.
> 
> 
> ---
> 1 message
> 2 message
> 3 message
> 5 message
> 6 message
> 
> After a lot of trial-and-error and checking logs and checking my BibTeX 
> files for errors, running everything through BibTex Tidy, etc., and 
> failures to make a minimum working example, I found a single pattern:
> 
> If the footnote marker appears on the SAME page as the footnote text, it 
> has no problem rendering the footnote. But, if ConTeXt decides to move a 
> float a page or two later on--as it frequently seems to do---such that 
> the footnote marker and footnote text at bottom of page should be on 
> DIFFERENT pages, the footnote message at the bottom of the page won't 
> render.
> 
> I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
> have issues with footnotes; they appear to be similar to my issue--is 
> that still a problem? Is there a fix or workaround? Old fixes I could 
> finding in the mailing list don't seem to work with current versions of 
> ConTeXt anymore.
you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)
- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
    \startplacefigure[location=here,title={test \footnote{oeps 1}}]
        \blackrule[width=1tw]
        here
        \footnote{hello 1} and
        \footnote{hello 2} and
        \footnote{hello 3} done
    \stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).

I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem




-
                                          Hans Hagen | PRAGMA ADE
              Ridd

[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-22 Thread Hans Hagen via ntg-context

On 4/22/2024 2:45 AM, Joel via ntg-context wrote:
I'm three days out from sending my work to an editor, and found some 
serious problem: many footnotes just aren't rendering.


I have a history text that uses ConTeXt-SBL for the citations, as such, 
it has lots of footnotes. Sometimes the footnotes are just in the main 
text, but sometimes also in figure captions, inside floats, inside 
tables that are inside floats, inside tabulations inside floats, etc.


What I find alarming is it is frequently not rendering all of the 
footnote messages at the bottom of the page. The actual footnote number 
within the body is rendered, but no number is listed in at the bottom of 
the page. So I might see a list of footnotes, for instance, on page 1, I 
only get footnotes 1, 2, 3, 5, and 6, but 4 was mysteriously skipped.



---
1 message
2 message
3 message
5 message
6 message

After a lot of trial-and-error and checking logs and checking my BibTeX 
files for errors, running everything through BibTex Tidy, etc., and 
failures to make a minimum working example, I found a single pattern:


If the footnote marker appears on the SAME page as the footnote text, it 
has no problem rendering the footnote. But, if ConTeXt decides to move a 
float a page or two later on--as it frequently seems to do---such that 
the footnote marker and footnote text at bottom of page should be on 
DIFFERENT pages, the footnote message at the bottom of the page won't 
render.


I've seen some 2+ year old mailing list posts suggesting ConTeXt might 
have issues with footnotes; they appear to be similar to my issue--is 
that still a problem? Is there a fix or workaround? Old fixes I could 
finding in the mailing list don't seem to work with current versions of 
ConTeXt anymore.

you need to consider the complications of such notes ...

- tex needs to take the notes into account when determining a page break
- it does so by the insert mechanism
- when floats can't be placed they also become inserts (top and bottom)
- when there are inserts in inserts th eproblem becomes more complex (so 
notes inside floats)

- in traditional tex deeply burried inserts disappearm less so in lmtx

There are things that are hard to get right. This works:

\startpostponing
\startplacefigure[location=here,title={test \footnote{oeps 1}}]
\blackrule[width=1tw]
here
\footnote{hello 1} and
\footnote{hello 2} and
\footnote{hello 3} done
\stopplacefigure
\stoppostponing

\dorecurse{10}{\samplefile{tufte}\par}

Because here the inserts (notes) will migrate but even then one can get 
them out of order (unless we renumber, which then is sensitiev for 
oscillation).


I occasionally wonder if top floats could be done more directly but 
bottom notes still would have an out-of-sync problem





-
  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://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] Why don't footnotes appear in floats or figures?

2024-04-21 Thread Joel via ntg-context
I'm three days out from sending my work to an editor, and found some serious 
problem: many footnotes just aren't rendering.

I have a history text that uses ConTeXt-SBL for the citations, as such, it has 
lots of footnotes. Sometimes the footnotes are just in the main text, but 
sometimes also in figure captions, inside floats, inside tables that are inside 
floats, inside tabulations inside floats, etc.
What I find alarming is it is frequently not rendering all of the footnote 
messages at the bottom of the page. The actual footnote number within the body 
is rendered, but no number is listed in at the bottom of the page. So I might 
see a list of footnotes, for instance, on page 1, I only get footnotes 1, 2, 3, 
5, and 6, but 4 was mysteriously skipped.

---1 message2 message3 message5 message6 message

After a lot of trial-and-error and checking logs and checking my BibTeX files 
for errors, running everything through BibTex Tidy, etc., and failures to make 
a minimum working example, I found a single pattern:
If the footnote marker appears on the SAME page as the footnote text, it has no 
problem rendering the footnote. But, if ConTeXt decides to move a float a page 
or two later on--as it frequently seems to do---such that the footnote marker 
and footnote text at bottom of page should be on DIFFERENT pages, the footnote 
message at the bottom of the page won't render.
I've seen some 2+ year old mailing list posts suggesting ConTeXt might have 
issues with footnotes; they appear to be similar to my issue--is that still a 
problem? Is there a fix or workaround? Old fixes I could finding in the mailing 
list don't seem to work with current versions of ConTeXt anymore.
--Joel___
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] what are the interaction between \showframe and \realpageno in \startuseMPgraphic ?

2024-04-20 Thread garulfo
I can not figure out why this progress bar only works when \showframe is 
activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)

\showframe

\startuseMPgraphic{MonGraphisme_MP}
  numeric n ; n := \number\realpageno ;
  numeric m ; m := \number\lastpageno ;
  numeric h ; h := \overlayheight ;
  numeric w ; w := \overlaywidth ;
  numeric e ; e := 3mm;
  numeric r ; r := (((n-1)/(m-1))*w);
  fill fullsquare xscaled w yscaled e shifted (w/2, h/2) withcolor darkblue ;
  fill fullsquare xscaled r yscaled e shifted (r/2, h/2) withcolor darkred;
\stopuseMPgraphic

\defineoverlay [MonGraphisme_OL] [\useMPgraphic{MonGraphisme_MP}]

\setupbackgrounds [footer] [rightmargin] [background={MonGraphisme_OL}]

\starttext
\dorecurse{10}{\input tufte\page}
\stoptext

Any clue is warmly welcome
___
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: minwidth not working ?

2024-04-20 Thread Wolfgang Schuster

Denis Maier schrieb am 19.04.2024 um 22:55:

Wolfgang Schuster  hat am 
19.04.2024 20:32 CEST geschrieben:

denis.ma...@unibe.ch schrieb am 10.04.2024 um 12:47:


Hi,

Shouldn’t minwidth set a default minimal width for external figures? 
But this here does not work


[...]

Am I missing something here?


There are no minwidth/minheight values for \externalfigure.

Wolfgang

So the wiki is wrong here? 
https://wiki.contextgarden.net/Command/setupexternalfigure


Yes the comment at the end of page is wrong and the text about the strut 
setting can also be removed, only the orientation value is missing in 
the command table.


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: Weird (?) float placement for specific widths of image

2024-04-19 Thread Pablo Rodriguez via ntg-context
On 4/19/24 17:48, Denis Maier via ntg-context wrote:
> Hi again,
>
> just a quick follow up on this one. Can anyone reproduce this?

Hi Denis,

I can reproduce it.

> Would be good to know how this can be fixed. I have this in a real
> document, and as I’m typesetting a XML source I cannot just adjust
> slightly adjust the dimensions to get rid of that.

It seems that you can place the figures somehow
(https://www.pragma-ade.nl/general/qrcs/setup-en.pdf#page=169):

See the extreme example:

  \showframe\showgrid\showstruts
  \setupexternalfigures
  [location={local,global,default}]
  \starttext
  \placefigure{A Cow}{\externalfigure[cow][
  height=.5\textheight,
  ]}

  \placefigure{A Cow}{\externalfigure[cow][
  height=.3\textheight,
  %height=.4\textheight,
  ]}

  \placefigure{A Cow}{\externalfigure[cow][
  width=3cm,
  %width=2cm,
  ]}

  \placefigure[inleft]{A Cow}{\externalfigure[cow][width=2cm]}

  \placefigure[inright]{A Cow}{\externalfigure[cow][width=2cm]}
  \stoptext

Just in case it helps,

Pablo
___
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: minwidth not working ?

2024-04-19 Thread Pablo Rodriguez via ntg-context
On 4/19/24 17:51, Denis Maier via ntg-context wrote:
> Hi again,
>
> another follow up. Can anyone confirm this issue? Is there a way to set
> the minimal width of graphics?

Hi Denis,

maximum widht or height work fine, but their minimum counterparts seem
not to be working at all:

  \showframe
  \starttext
  \doloopoverlist{none, width, height, maxwidth, maxheight}
{\externalfigure[cow.pdf][\recursestring=.125\textwidth]}
  \page
  \doloopoverlist{none, width, height, minwidth, minheight}
{\externalfigure[cow.pdf][\recursestring=.33\textwidth]}
  \stoptext

Just to confirm the issue,

Pablo
___
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: Weird (?) float placement for specific widths of image

2024-04-19 Thread Denis Maier via ntg-context
Hi again,

 

just a quick follow up on this one. Can anyone reproduce this?

Would be good to know how this can be fixed. I have this in a real document,
and as I'm typesetting a XML source I cannot just adjust slightly adjust the
dimensions to get rid of that.

 

Best,

Denis

 

 

Von: denisma...@mailbox.org  
Gesendet: Mittwoch, 10. April 2024 13:37
An: 'ntg-context@ntg.nl' 
Betreff: Weird (?) float placement for specific widths of image

 

Hi, 

 

another graphics/floats question: consider the following example

 

%

 

\setupexternalfigures

[location={local,global,default}]

 

\starttext

 

\placefigure{A Cow}{\externalfigure[cow][

height=.5\textheight,

]}

 

\placefigure{A Cow}{\externalfigure[cow][

height=.3\textheight,

%height=.4\textheight,

]}

 

 

\placefigure{A Cow}{\externalfigure[cow][

width=3cm,

%width=2cm,

]}

 

\placefigure{A Cow}{\externalfigure[cow][width=2cm]}

 

\placefigure{A Cow}{\externalfigure[cow][width=2cm]}

 

\stoptext%

 

On the first page, the images appear stacked above each other while on the
second page they appear next to each other.

 

It took me some time to reproduce this behaviour, and I can't claim to
understand what is happening. But it seems to be related to the specific
widths of the images. When I change them to other values the behaviour
disappears. Is this a bug? Anything I can do about this?

 

Best

Denis

___
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 isolate serious errors from warnings?

2024-04-19 Thread Hans Hagen

On 4/18/2024 8:26 AM, Henning Hraban Ramm wrote:

Am 18.04.24 um 02:09 schrieb Joel via ntg-context:
I'm about to have a lengthy (2,000+ page) document published. Normally 
if it compiles and looks okay, I regard that as meaning no errors 
appeared, but I've noticed that sometimes ConTeXt will still compile, 
even if something isn't displayed on screen as it should:


(1) I tried placing a table inside a startitemize environment, as 
instead of it not compiling, it left a message in the document warning 
that wasn't supported.


(2) In another case, I had an image that ConTeXt couldn't find, as I 
mispelled the filenmame, and it fully compiled and made a PDF, without 
me noticing.


(3) Or maybe in some case, a font couldn't be found for a specific 
character, so a single character in the file isn't displaying.


Those are just some examples; I intended for something to be printed 
on the PDF, but it isn't showing there.


Since a document of this size will have a lot of messages, is there a 
way to adjust the settings, from "show everything" to "show some" to 
"show only serious errors"? Or maybe to use > to send the errors to 
another file for careful study? (using Linux if that matters)


You can enable trackers like

\enabletrackers[figures.*]

But that just gives more log messages for debugging.

You get the list of all trackers with:

context --global m-trackers.mkiv


For your use case, directives are more helpful, like

\enabledirectives[logs.errors=*] (i.e. break at every error)

AFAIK that just handles missing characters, references and modules ATM, 
but this information might be outdated.


You get all directives with

context --global m-directives.mkiv


often the log files has some summaries at the end



-
  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://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 - test/proposal to further clarify documentation

2024-04-18 Thread Henning Hraban Ramm

Am 17.04.24 um 23:25 schrieb Garulfo:
- exactly, it's not a question of proposing new documents, but of 
proposing another complementary way of accessing and browsing existing 
ones.


- Actually, the wiki is (or can be) a hub for the 4 needs:
   - "Reference" like https://wiki.contextgarden.net/Command/setuphead
   - "How-To Guides" like https://wiki.contextgarden.net/Titles
   - "Tutorials":
 - hosted https://wiki.contextgarden.net/Detailed_Example
 - linked https://github.com/mpsmath/stepbystep
   - "Explanation" : mostly linked manuals and books


https://wiki.contextgarden.net/Command/setuphead
and https://wiki.contextgarden.net/Titles
are examples of how difficult it can be to understand where to find a 
particular information.


It might be worth keeping only the key examples on reference pages
like https://wiki.contextgarden.net/Command/***
and moving the "how-to" examples to a separate page (or pages).


I agree. Let’s accept this as a rule for further wiki editing.

Also, explain parameters with top priority in Command/setup* pages 
(keeping them in Command/define* pages etc. doesn’t hurt, but at least 
experienced users should know where to find something without searching).


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 isolate serious errors from warnings?

2024-04-18 Thread Henning Hraban Ramm

Am 18.04.24 um 02:09 schrieb Joel via ntg-context:
I'm about to have a lengthy (2,000+ page) document published. Normally 
if it compiles and looks okay, I regard that as meaning no errors 
appeared, but I've noticed that sometimes ConTeXt will still compile, 
even if something isn't displayed on screen as it should:


(1) I tried placing a table inside a startitemize environment, as 
instead of it not compiling, it left a message in the document warning 
that wasn't supported.


(2) In another case, I had an image that ConTeXt couldn't find, as I 
mispelled the filenmame, and it fully compiled and made a PDF, without 
me noticing.


(3) Or maybe in some case, a font couldn't be found for a specific 
character, so a single character in the file isn't displaying.


Those are just some examples; I intended for something to be printed on 
the PDF, but it isn't showing there.


Since a document of this size will have a lot of messages, is there a 
way to adjust the settings, from "show everything" to "show some" to 
"show only serious errors"? Or maybe to use > to send the errors to 
another file for careful study? (using Linux if that matters)


You can enable trackers like

\enabletrackers[figures.*]

But that just gives more log messages for debugging.

You get the list of all trackers with:

context --global m-trackers.mkiv


For your use case, directives are more helpful, like

\enabledirectives[logs.errors=*] (i.e. break at every error)

AFAIK that just handles missing characters, references and modules ATM, 
but this information might be outdated.


You get all directives with

context --global m-directives.mkiv


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] How to isolate serious errors from warnings?

2024-04-17 Thread Joel via ntg-context
I'm about to have a lengthy (2,000+ page) document published. Normally if it 
compiles and looks okay, I regard that as meaning no errors appeared, but I've 
noticed that sometimes ConTeXt will still compile, even if something isn't 
displayed on screen as it should:

(1) I tried placing a table inside a startitemize environment, as instead of it 
not compiling, it left a message in the document warning that wasn't supported.
(2) In another case, I had an image that ConTeXt couldn't find, as I mispelled 
the filenmame, and it fully compiled and made a PDF, without me noticing.
(3) Or maybe in some case, a font couldn't be found for a specific character, 
so a single character in the file isn't displaying.
Those are just some examples; I intended for something to be printed on the 
PDF, but it isn't showing there.

Since a document of this size will have a lot of messages, is there a way to 
adjust the settings, from "show everything" to "show some" to "show only 
serious errors"? Or maybe to use > to send the errors to another file for 
careful study? (using Linux if that matters)

--Joel
___
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 - test/proposal to further clarify documentation

2024-04-17 Thread Garulfo



Le 17/04/2024 à 13:57, Bruce Horrocks a écrit :




On 14 Apr 2024, at 12:21, garu...@azules.eu wrote:

Hi all,

I just discover the Diátaxis documentation framework :


I'd be more confident if you had started by saying "I've been using the Diátaxis for 
the last ten years and have used it on multiple projects". ;-)


- https://www.diataxis.fr/
- 30min video : "What nobody tells you about documentation", 
https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 2017

As I understand it, it can help both readers and writers of the documentation 
by clarifying the purpose of each element.

So I started a potential new "welcome page" :  
https://wiki.contextgarden.net/Main_Page2

The main lines would be :
- Tutorials: installation pages, step by step examples
- How-to guides: most of the existing wiki pages which are not 
https://wiki.contextgarden.net/Commands/ ...
- Discussions and manuals: most of the existing manuals
- Reference : the pages dedicated to commands which already include link to 
mailing list, stack exchange, ConTeXt's source
  - https://wiki.contextgarden.net/Category:Commands
  - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F

To match the logic of Diátaxis, maybe some material from command pages should be moved from 
"Reference" to "How-to guides",
for example, when the examples go beyond "pure description" and begin to deal with 
"how-to" cases, e.g. :
- Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
- How-to guides for headings: https://wiki.contextgarden.net/Titles

If it make sense, and according to your feedbacks, I can continue to reallocate 
existing contents.

Thanks for your feedback and thoughts.


I'm going to be devil's advocate and say that the Context documentation is 
*already* in the Diátaxis framework - just not in one place on the Wiki.

- There are at least two books, and a third being written but not yet released: 
these fit into the Tutorials and Explanation quadrants.

- There are "My Way" guides linked from the Wiki and the PragmaADE website that fit into 
the "How-To Guides" quadrant.

- thank you for these reminders


- And the wiki itself is the "Reference" quadrant.



Clearly these can always be better but they are there already. My recommendation would be 
to use the wiki as the reference quadrant and, apart from the first few "main 
pages" for people who land there from a web search, it should focus on being the 
reference manual. Beginners should be directed to the books.


- Thanks again, the comments are helping to identify a robust method of 
distributing content across the quadrants.


- exactly, it's not a question of proposing new documents, but of 
proposing another complementary way of accessing and browsing existing ones.


- Actually, the wiki is (or can be) a hub for the 4 needs:
  - "Reference" like https://wiki.contextgarden.net/Command/setuphead
  - "How-To Guides" like https://wiki.contextgarden.net/Titles
  - "Tutorials":
- hosted https://wiki.contextgarden.net/Detailed_Example
- linked https://github.com/mpsmath/stepbystep
  - "Explanation" : mostly linked manuals and books


https://wiki.contextgarden.net/Command/setuphead
and https://wiki.contextgarden.net/Titles
are examples of how difficult it can be to understand where to find a 
particular information.


It might be worth keeping only the key examples on reference pages
like https://wiki.contextgarden.net/Command/***
and moving the "how-to" examples to a separate page (or pages).



Regards,
—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / 
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: Wiki - test/proposal to further clarify documentation

2024-04-17 Thread Bruce Horrocks


> On 14 Apr 2024, at 12:21, garu...@azules.eu wrote:
> 
> Hi all,
> 
> I just discover the Diátaxis documentation framework :

I'd be more confident if you had started by saying "I've been using the 
Diátaxis for the last ten years and have used it on multiple projects". ;-)

> - https://www.diataxis.fr/
> - 30min video : "What nobody tells you about documentation", 
> https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 
> 2017
> 
> As I understand it, it can help both readers and writers of the documentation 
> by clarifying the purpose of each element.
> 
> So I started a potential new "welcome page" :  
> https://wiki.contextgarden.net/Main_Page2
> 
> The main lines would be :
> - Tutorials: installation pages, step by step examples
> - How-to guides: most of the existing wiki pages which are not 
> https://wiki.contextgarden.net/Commands/ ...
> - Discussions and manuals: most of the existing manuals
> - Reference : the pages dedicated to commands which already include link to 
> mailing list, stack exchange, ConTeXt's source
>  - https://wiki.contextgarden.net/Category:Commands
>  - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F
> 
> To match the logic of Diátaxis, maybe some material from command pages should 
> be moved from "Reference" to "How-to guides",
> for example, when the examples go beyond "pure description" and begin to deal 
> with "how-to" cases, e.g. :
> - Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
> - How-to guides for headings: https://wiki.contextgarden.net/Titles
> 
> If it make sense, and according to your feedbacks, I can continue to 
> reallocate existing contents.
> 
> Thanks for your feedback and thoughts.

I'm going to be devil's advocate and say that the Context documentation is 
*already* in the Diátaxis framework - just not in one place on the Wiki.

- There are at least two books, and a third being written but not yet released: 
these fit into the Tutorials and Explanation quadrants.

- There are "My Way" guides linked from the Wiki and the PragmaADE website that 
fit into the "How-To Guides" quadrant.

- And the wiki itself is the "Reference" quadrant.

Clearly these can always be better but they are there already. My 
recommendation would be to use the wiki as the reference quadrant and, apart 
from the first few "main pages" for people who land there from a web search, it 
should focus on being the reference manual. Beginners should be directed to the 
books.

Regards,
—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / 
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 - test/proposal to further clarify documentation

2024-04-16 Thread Henning Hraban Ramm

Am 14.04.24 um 21:45 schrieb Peter Hopcroft via ntg-context:

It would be great if the main page actually said what Context does.


In my poster (still WIP) I wrote:

start
---

The “infamous” alternative to LaTeX

While most designers use graphical tools, there are still areas where 
code-based typesetting systems are fun, make sense or are even superior. 
While LaTeX is the most known of these, ConTeXt is used by a growing 
minority of ambitioned enthusiasts around the world.


The small but active and creative community of ConTeXt users and 
developers is always driving TeX development over new frontiers:

NTS, MetaFun, Oriental TeX, LuaTeX, mplib, LuaMetaTeX…
They’re also dubbed the incisors (AKA cutting edge) of the dinosaur of 
Open Source.


ConTeXt is aimed at creative users, known for advanced features like 
extensive font control and direct XML processing, with a deep 
integration of Lua and MetaPost.


---

ConTeXt was invented in the 1990s by Hans Hagen and Ton Otten of the 
Dutch company “Pragma Advanced Document Engineering” for typesetting 
schoolbooks. Taco Hoekwater refactored the TeX source code to create 
LuaTeX which was further developed into LuaMetaTeX by Hans Hagen (and 
lately Mikael Sundqvist for refined math typography).


---

“To be fair, switching to the ConTeXt way of thinking and doing things 
was not an overnight process […]. But once I got used to it, I could not 
imagine going back to LaTeX. I’ll go even further and say that, in my 
view, ConTeXt is the future of TeX.

(Prof. Idris Samawi Hamid, 2009)
Source: www.tug.org/interviews/hamid.html

---

“ConTeXt is LaTeX done right. It is simple, flexible and powerful.”
(J. U. Hasecke on Mastodon, 2022)

---

Is ConTeXt for me?

If you want …
* to design your own layout
* best quality math typesetting
* to use Lua functions e.g. for processing data
* deep integration of a graphics language (MetaPost)
* to process XML input
* no package conflicts
* to use OpenType features
* consistent setup commands
* to place stuff on layers
* visual debugging features
* to have a lean, but mighty TeX system
* to typeset much faster than with LaTeX
* high quality Arabic typography
… then ConTeXt is for you!

---
stop

___
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] \getmarking for top at the current page

2024-04-15 Thread Biblio--- via ntg-context
Dear list,

I've got a problem. Not the first one, but the first one to contribute to the 
list. ;)

system> ConTeXt  ver: 2024.04.01 08:59 LMTX  fmt: 2024.4.12  int: 
english/english
system> 'cont-new.mkxl' loaded

%==
%==
\definehead[Datum][subsubsubject]

\startsetups[Test]
  Pr=(\getmarking[Datum][previous])~
  Nx=(\getmarking[Datum][next])~
  Fi=(\getmarking[Datum][first])~
  La=(\getmarking[Datum][last])~
  Tp=(\getmarking[Datum][top])~
  Bt=(\getmarking[Datum][bottom])~
  Cu=(\getmarking[Datum][current])~
\stopsetups

\setupheadertexts[text]
  [\setups{Test}][]
  [\setups{Test}][]

\setuppagenumbering[location=footer]

\starttext

\startDatum[title={secA}]%

  \dorecurse{50}{aaa }

  \pagebreak
 
  \dorecurse{50}{aaa }

\stopDatum

\startDatum[title={secB}]%

  \dorecurse{630}{bbb }

\stopDatum

\startDatum[title={secC}]%

  \dorecurse{50}{ccc }

\stopDatum

\startDatum[title={secD}]%

  \dorecurse{50}{ddd }

\stopDatum

\startDatum[title={secE}]%

  \dorecurse{50}{eee }

\stopDatum


\stoptext
%==
%==


I'd like to write the marking of the very first text at the current page to the 
header. That seems to be a bit tricky, at least for me. (I'm afraid that 
\getmarking[xxx][top] was intended for that and it is not feasible at all.)

At page 1 the header should read "secA", at page 2 again "secA" (because the 
very first text belongs to "secA"), and at page 3 "secC" (because the very 
first text (the section title) belongs to "secC"). Unfortunatly \getmarking[][] 
does not behave like I expacted.

I understand the keywords of \getmarking in the wiki 
(https://wiki.contextgarden.net/Command/getmarking) as listed below:
• previous: marking at the bottom of the page BEFORE the current page (no page 
before then empty)
• next: marking at the top of the page AFTER the current page (no page after 
then bottom of current page)

• top: marking at the top of the current page
• bottom: marking at the bottom of the current page

• first: first marking that starts at the current page (no first than behaving 
like top)
• last: last marking that starts at the current page (no last than behaving 
like bottom)

• current: last stored marking while deciding on pagebreaking between the 
current page and the (potential) following page
• default: first

According to these thoughts, I started with \getmarking[Datum][top]. But "top" 
seems not to work, there is no difference between "top" and "first", "top" 
behaves like "first".

My second thought: Generally \getmarking[Datum][first] would be perfect, so 
I've thought something like

    \doifelse{\fetchmark[Datum][next] of the page before the current 
page}{\fetchmark[Datum][previous]}
      {\getmarking[Datum][previous]}
      {\getmarking[Datum][first]}

could work. (Honestly I don't know how to do "\fetchmark[Datum][next] of the 
page before the current page}". The first page would need a special treatment 
too.)

But: At page 2 \getmarking[Datum][next] (Nx) contains "secB" but at top of page 
3 is not "secB" but "secC". So \getmarking[Datum][next] does not seem to 
contain the correct information I need, therefore I don't get any further.


Any ideas: How do I write the marking of the very first text at the current 
page to the header?


Thank you in advance, Matthias

___
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 - test/proposal to further clarify documentation

2024-04-14 Thread Peter Hopcroft via ntg-context
It would be great if the main page actually said what Context does. 

> On 15/04/2024, at 2:18 AM, Henning Hraban Ramm  wrote:
> 
> Hi Garulfo,
> 
> I’m not against the “new order”, but I’d keep the colorful subject tiles. 
> Different accesses are good IMO (as long as it doesn’t get to convoluted).
> 
> I’d say updating, sorting, restructuring pages is more important than a new 
> start page.
> 
> Yes, please sort out reference vs. tutorials!
> 
> Often examples make sense in the reference pages, so the distinction is a bit 
> fuzzy, but there are enough where a subject/tutorial page would make more 
> sense than examples spread over several single command pages.
> 
> We could also define if the “main” reference page (with examples) is 
> \definestuff, \setupstuff, or \stuff – IMO \setupstuff makes the most sense, 
> since usually the others inherit from it.
> 
> Often enough, parameters aren’t explained in the reference pages; sometimes 
> you can find examples using them, but there are too many holes. I tried to 
> fix that where I could, but too often I don’t understand enough of the 
> sources to make sense of some setting.
> 
> For wiki contributors, it might make sense to combine the markup pages – in 
> many pages e.g.  is used where  would make more 
> sense; often \starttext … \stoptext is not necessary and just blows up 
> examples; markup is generally somewhat chaotic (e.g. , , or ``?).
> 
> Hraban
> 
>> Am 14.04.24 um 13:21 schrieb garu...@azules.eu:
>> I just discover the Diátaxis documentation framework :
>> - https://www.diataxis.fr/
>> - 30min video : "What nobody tells you about documentation", 
>> https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 
>> 2017
>> As I understand it, it can help both readers and writers of the 
>> documentation by clarifying the purpose of each element.
>> So I started a potential new "welcome page" :  
>> https://wiki.contextgarden.net/Main_Page2
>> The main lines would be :
>> - Tutorials: installation pages, step by step examples
>> - How-to guides: most of the existing wiki pages which are not 
>> https://wiki.contextgarden.net/Commands/ ...
>> - Discussions and manuals: most of the existing manuals
>> - Reference : the pages dedicated to commands which already include link to 
>> mailing list, stack exchange, ConTeXt's source
>>   - https://wiki.contextgarden.net/Category:Commands
>>   - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F
>> To match the logic of Diátaxis, maybe some material from command pages 
>> should be moved from "Reference" to "How-to guides",
>> for example, when the examples go beyond "pure description" and begin to 
>> deal with "how-to" cases, e.g. :
>> - Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
>> - How-to guides for headings: https://wiki.contextgarden.net/Titles
>> If it make sense, and according to your feedbacks, I can continue to 
>> reallocate existing contents.
>> Thanks for your feedback and thoughts.
>> Garulfo
>> ___
>> 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: Wiki - test/proposal to further clarify documentation

2024-04-14 Thread Henning Hraban Ramm

Hi Garulfo,

I’m not against the “new order”, but I’d keep the colorful subject 
tiles. Different accesses are good IMO (as long as it doesn’t get to 
convoluted).


I’d say updating, sorting, restructuring pages is more important than a 
new start page.


Yes, please sort out reference vs. tutorials!

Often examples make sense in the reference pages, so the distinction is 
a bit fuzzy, but there are enough where a subject/tutorial page would 
make more sense than examples spread over several single command pages.


We could also define if the “main” reference page (with examples) is 
\definestuff, \setupstuff, or \stuff – IMO \setupstuff makes the most 
sense, since usually the others inherit from it.


Often enough, parameters aren’t explained in the reference pages; 
sometimes you can find examples using them, but there are too many 
holes. I tried to fix that where I could, but too often I don’t 
understand enough of the sources to make sense of some setting.


For wiki contributors, it might make sense to combine the markup pages – 
in many pages e.g.  is used where  would 
make more sense; often \starttext … \stoptext is not necessary and just 
blows up examples; markup is generally somewhat chaotic (e.g. , 
, or ``?).


Hraban

Am 14.04.24 um 13:21 schrieb garu...@azules.eu:

I just discover the Diátaxis documentation framework :
- https://www.diataxis.fr/
- 30min video : "What nobody tells you about documentation", 
https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 2017

As I understand it, it can help both readers and writers of the documentation 
by clarifying the purpose of each element.

So I started a potential new "welcome page" :  
https://wiki.contextgarden.net/Main_Page2

The main lines would be :
- Tutorials: installation pages, step by step examples
- How-to guides: most of the existing wiki pages which are not 
https://wiki.contextgarden.net/Commands/ ...
- Discussions and manuals: most of the existing manuals
- Reference : the pages dedicated to commands which already include link to 
mailing list, stack exchange, ConTeXt's source
   - https://wiki.contextgarden.net/Category:Commands
   - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F

To match the logic of Diátaxis, maybe some material from command pages should be moved from 
"Reference" to "How-to guides",
for example, when the examples go beyond "pure description" and begin to deal with 
"how-to" cases, e.g. :
- Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
- How-to guides for headings: https://wiki.contextgarden.net/Titles

If it make sense, and according to your feedbacks, I can continue to reallocate 
existing contents.

Thanks for your feedback and thoughts.
Garulfo
___
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: 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] Re: Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread 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.

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] Wiki - test/proposal to further clarify documentation

2024-04-14 Thread garulfo
Hi all,

I just discover the Diátaxis documentation framework :
- https://www.diataxis.fr/
- 30min video : "What nobody tells you about documentation", 
https://www.youtube.com/watch?v=t4vKPhjcMZg  , from Daniele Procida at PyCon 
2017

As I understand it, it can help both readers and writers of the documentation 
by clarifying the purpose of each element.

So I started a potential new "welcome page" :  
https://wiki.contextgarden.net/Main_Page2

The main lines would be :
- Tutorials: installation pages, step by step examples
- How-to guides: most of the existing wiki pages which are not 
https://wiki.contextgarden.net/Commands/ ...
- Discussions and manuals: most of the existing manuals
- Reference : the pages dedicated to commands which already include link to 
mailing list, stack exchange, ConTeXt's source
  - https://wiki.contextgarden.net/Category:Commands
  - https://wiki.contextgarden.net/Special:PrefixIndex?prefix=Command%2F

To match the logic of Diátaxis, maybe some material from command pages should 
be moved from "Reference" to "How-to guides",
for example, when the examples go beyond "pure description" and begin to deal 
with "how-to" cases, e.g. :
- Reference for setuphead: https://wiki.contextgarden.net/Command/setuphead
- How-to guides for headings: https://wiki.contextgarden.net/Titles

If it make sense, and according to your feedbacks, I can continue to reallocate 
existing contents.

Thanks for your feedback and thoughts.
Garulfo
___
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: Most recent context doesn't like synctex?

2024-04-13 Thread Jim
Thanks for the quick reply.

On Sat, Apr 13, 2024 at 09:18 (+0200), Hans Hagen wrote:

> On 4/13/2024 12:39 AM, Jim wrote:
>> Hi,

>> I have both TeXlive 2024 and the stand-alone ConTeXt distribution on my
>> system.

>> Recently, the stand-alone ConTeXt distribution seems to not create a
>> synctex file any more.  Specifically,

>>  /usr/local/context/tex/texmf-linux-64/bin/context --once --texutil 
>> --synctex=1 --nonstop file.tex

>> does not create a .synctex file (and deletes it, if it is there), whereas
>> the TeXlive version

>>  /usr/local/texlive/2024/bin/x86_64-linux/context --once --texutil 
>> --synctex=1 --nonstop nwg_newsletter_2024_04.tex

>> does create the .synctex file.


>> The ConTeXt distribution version *does* create the file if --nonstop is
>> *not* used.  Knowing that, I can work around this for now, although
>> emacs+auctex probably won't be happy without --nonstop.

>> I updated the stand-alone ConTeXt a few minutes ago, so I'm up to date on
>> that.

>> Is this a bug introduced by some recent change?

> it's more a feature

I guess one person's bug is another person's feature.  :-)

> - Mikael S and i spend some time with editor/viewer combinations on linux in
> order to find ways around the different synctex libs that they use

> - as a result we could make most work ok

Are these recent changes?  And should emacs+auctex+PDFview work now?

> - we assume that synctex is set up in the document with

> \setupsynctex[state=start]
> \setupsynctex[state=repeat] % less efficient but gets around issue

I haven't been using either of those, since auctex does The Right Thing for
me.  Or, at least, it used to.

> - when context is run 'headless' (on a server) it's often done in
> batchmode because one knows that the style works and in that case synctex
> makes no sense so we disable it; this avoids the need to patch the style

I (think I) see what you are saying, but if one explicitly uses --synctex
on the command line, should that not over-ride the over-ride?  Or, put
another way, would the following not make sense:
if --synctex is used on the command line
create synctex file
else if --nonstop is used on the command line
do not create the synctex file
else if \setupsynctex[...] is used in the source file
create the synctex file
else
do not create the synctex file

> - the manual has been updates

Ummm... I hunted around for a while, but I did not find out which manual
was updated.  The synctex wiki page has not been updated, nor has the
"workflow support in context" manual.  Can you tell me which manual I
should go look at?

> - running context in nonstop mode makes little sense

Guessing wildly, I assume the auctex author(s) didn't want processes
sitting there waiting for input on errors, like plain TeX would normally
do.  But perhaps the addition of --nonstopmode for ConTeXt is incorrect
and/or redundant in April of 2024.

> (maybe, as power user, Mikael remembers more details)

Mikael?  Any thoughts to share?


Cheers.
Jim
___
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: Back in the 90s

2024-04-13 Thread Hans Hagen

On 4/13/2024 2:12 PM, Riviera Taylor wrote:

Hello,

I was reading about the history of ConTeXt in the Not So Short 
Introduction To ConTeXt and I have a historical question. I noticed that 
the PDF specification was published in 1993 yet ConTeXt was invented in 
1991. The book suggests that PDF output was handled by the PdfTeX engine 
in MKII in 2005. What sort of output did the software produce before 
PdfTeX was introduced? Was this the same as the output produced by the 
software before the publication of the PDF specification?
2005 is when we started with luatex which is a follow up on pdftex, and 
pdftex is more a mid 90's thing; we immediately adopted pdftex (which 
made some believe that context depended on pdftex which is not true)


anyway, we started with dvi which needs a postprocessor to go to some 
printer format like specific hp or more general postscript but also can 
drive viewers


we went from epson dot matrix printer -> early 300 dpi laser -> 600 dpi 
laser printer -> high speed oce 512 dpi printer (metric) -> high speed 
oce 600 dpi printer (+ crappy canon color laser printer) -> fast 
page-wide hp color inkjet office printer


in mkii all is controlled by backend drivers, that use so called 
specials to support color, hyperlinks, images so a workflow can have


- dvipsone : high quality postscript
- dviwindo : viewer with typeone support and hyperlinks
- acrobat  : postscript to pdf

and as all these external backends have their demands we could handle 
all these things in an abstract way (that way one could also drive 
printer properties like duplex or paper bins etc from a tex job)


that meant that when pdf came around we could almost immediately support 
most of the interactive features in a dvi -> ps -> acrobat workflow


when pdftex came around the intermediate step of postscript could be 
avoided which btw was also possible with dvipdfm(x) so we also supported 
that


so to summarize, it went from

tex -> dvi -> printer format
tex -> dvi -> postscript -> more generic printer format
tex -> dvi -> pdf -> print from acrobat
tex -> pdf -> print from pdf viewer

in the meantime we are pdf (as from that one can produce other formats)

Hans

(btw, the fact that we could easily support pdf was also a reason why at 
that time some adobe folk in nl used documents produced by context to 
show somewhat extrems usage of interactive features, thanks to the fact 
that tex can adapt to such new situations, also via the dvi route in 
this case with pdfmarks; at that time pdf usage - and features - was a 
bit more dualistic: ps replacement format versus storage and preview 
format, but that's a different story; but it still shows in how the 
standard evolved)


-
  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://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: \luaescapestring in proper Lua

2024-04-11 Thread Pablo Rodriguez via ntg-context
On 4/11/24 18:56, Hans Hagen via ntg-context wrote:
> [...]
>>> \protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}}
>>
>> Sorry, but why \protected is required or recommended here?
>
> depends if you want it to be expandable

I see now that "still.pdf" has a full chapter (#3, titled “Scanning
Input”) and page 79 explains exactly this.

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://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] Weird (?) float placement for specific widths of image

2024-04-10 Thread Denis Maier via ntg-context
Hi, 

 

another graphics/floats question: consider the following example

 

%

 

\setupexternalfigures

[location={local,global,default}]

 

\starttext

 

\placefigure{A Cow}{\externalfigure[cow][

height=.5\textheight,

]}

 

\placefigure{A Cow}{\externalfigure[cow][

height=.3\textheight,

%height=.4\textheight,

]}

 

 

\placefigure{A Cow}{\externalfigure[cow][

width=3cm,

%width=2cm,

]}

 

\placefigure{A Cow}{\externalfigure[cow][width=2cm]}

 

\placefigure{A Cow}{\externalfigure[cow][width=2cm]}

 

\stoptext%

 

On the first page, the images appear stacked above each other while on the
second page they appear next to each other.

 

It took me some time to reproduce this behaviour, and I can't claim to
understand what is happening. But it seems to be related to the specific
widths of the images. When I change them to other values the behaviour
disappears. Is this a bug? Anything I can do about this?

 

Best

Denis

___
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: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-10 Thread Hans Hagen

On 4/10/2024 5:22 AM, seyal zavira wrote:
seams this code means to put a hidden text with same size behind 
metapost shape.
but it does not work properly for me (current version: 2024.04.01 08:59) 
and produce empty page but with searchable hidden text.


as mentioned kind = "outline" will be in the next upload so with the 
current one you need to use the also posted here for ... endfor variant



also when i edit the code and replace metapost part like this:

\startMPcode
      draw lmt_outline [
          kind = "outline",
          text = "\getbuffer[MyText]",
       ]
          withcolor red
       ;
\stopMPcode

it produces a selectable hidden text on top of body and red text that 
drawn by metapost below of that.


How can this problem be solved?

i attached the codes and pdf results.

On Mon, Apr 8, 2024 at 4:37 AM Hans Hagen <mailto:j.ha...@xs4all.nl>> wrote:


On 4/8/2024 8:22 AM, seyal zavira wrote:
 > thank you Harban and Keith McKay.
 >
 >     \startMPpage
 >            picture tt ; tt := lmt_outline [
 >                kind = "path",
 >                text =
"\definedfont[name:texgyrepagellabold*default]foo
 >     f o o",
 >            ] ;
 >
 >            fill
 >               for i within tt : pathpart i && endfor cycle
 >               withshademethod "linear"
 >               withshadedirection down
 >               withshadecolors (red, blue) ;
 >     \stopMPpage
 >
 >     I'll add this:
 >
 >     \startMPpage
 >           draw lmt_outline [
 >               kind = "outline",
 >               text =
"\definedfont[name:texgyrepagellabold*default]foo f
 >     o o",
 >           ]
 >               withshademethod "linear"
 >               withshadedirection down
 >               withshadecolors (red, blue)
 >           ;
 >     \stopMPpage
 >
 >     so a single path option (no picture)
 >
 >     Hans
 >
 >
 > Thank you so much for the sample examples
 > it would be great to also make text select able in output pdf
 > the third example currently does not work. did you mean you will add
 > this feature for next updates?
we're talking outlines so that is paths which implies no search but you
can do this (Keith and/or Hraban will explain and/or wikify it)

\starttext

\startbuffer[MyText]
      \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
      \framed[align=normal,frame=off]{\input{tufte}}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
      \startMPcode
           draw lmt_outline [
               kind = "outline",
               text = "\getbuffer[MyText]",
           ]
               withshademethod "linear"
               withshadedirection down
               withshadecolors (red, blue)
           ;
      \stopMPcode
\egroup

\startoverlay


{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
      {\box\scratchbox}
\stopoverlay

\stoptext




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


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

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

___


___
If your question is of interest to others 

[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-09 Thread seyal zavira
seams this code means to put a hidden text with same size behind metapost
shape.
but it does not work properly for me (current version: 2024.04.01 08:59)
and produce empty page but with searchable hidden text.
also when i edit the code and replace metapost part like this:

\startMPcode
 draw lmt_outline [
 kind = "outline",
 text = "\getbuffer[MyText]",
  ]
 withcolor red
  ;
\stopMPcode

it produces a selectable hidden text on top of body and red text that drawn
by metapost below of that.

How can this problem be solved?

i attached the codes and pdf results.

On Mon, Apr 8, 2024 at 4:37 AM Hans Hagen  wrote:

> On 4/8/2024 8:22 AM, seyal zavira wrote:
> > thank you Harban and Keith McKay.
> >
> > \startMPpage
> >picture tt ; tt := lmt_outline [
> >kind = "path",
> >text = "\definedfont[name:texgyrepagellabold*default]foo
> > f o o",
> >] ;
> >
> >fill
> >   for i within tt : pathpart i && endfor cycle
> >   withshademethod "linear"
> >   withshadedirection down
> >   withshadecolors (red, blue) ;
> > \stopMPpage
> >
> > I'll add this:
> >
> > \startMPpage
> >   draw lmt_outline [
> >   kind = "outline",
> >   text = "\definedfont[name:texgyrepagellabold*default]foo f
> > o o",
> >   ]
> >   withshademethod "linear"
> >   withshadedirection down
> >   withshadecolors (red, blue)
> >   ;
> > \stopMPpage
> >
> > so a single path option (no picture)
> >
> > Hans
> >
> >
> > Thank you so much for the sample examples
> > it would be great to also make text select able in output pdf
> > the third example currently does not work. did you mean you will add
> > this feature for next updates?
> we're talking outlines so that is paths which implies no search but you
> can do this (Keith and/or Hraban will explain and/or wikify it)
>
> \starttext
>
> \startbuffer[MyText]
>  \definedfont[name:texgyrepagellabold*default]foo f o o%
> \stopbuffer
>
> \startbuffer[MyText]
>  \framed[align=normal,frame=off]{\input{tufte}}%
> \stopbuffer
>
> \setbox\scratchbox\hbox\bgroup
>  \startMPcode
>   draw lmt_outline [
>   kind = "outline",
>   text = "\getbuffer[MyText]",
>   ]
>   withshademethod "linear"
>   withshadedirection down
>   withshadecolors (red, blue)
>   ;
>  \stopMPcode
> \egroup
>
> \startoverlay
>
>
> {\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
>  {\box\scratchbox}
> \stopoverlay
>
> \stoptext
>
>
>
>
> -
>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://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
>
> ___
>
\starttext

\startbuffer[MyText]
 \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
 \framed[align=normal,frame=off]{a sample text}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
 \startMPcode
  draw lmt_outline [
  kind = "outline",
  text = "\getbuffer[MyText]",
  ]
  withshademethod "linear"
  withshadedirection down
  withshadecolors (red, blue)
  ;
 \stopMPcode
\egroup

\startoverlay

{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
 {\box\scratchbox}
\stopoverlay

\stoptext


test1.pdf
Description: Adobe PDF document
\starttext

\startbuffer[MyText]
 \definedfont[name:texgyrepage

[NTG-context] Fwd: [lug-leaders] BachoTeX 2024: Last minute

2024-04-09 Thread Taco Hoekwater

Hi all,

Please see the forwarded message from GUST below.

Best wishes,
Taco

> Begin forwarded message:
> 
> From: Jerzy Ludwichowski 
> Subject: [lug-leaders] BachoTeX 2024: Last minute
> Date: 9 April 2024 at 14:09:09 CEST
> To: tex...@tug.org, LUG boards 
> Reply-To: lug-boa...@ifi.uio.no
> 
> Dear TeXies,
> 
> we've extended the deadline for "early-bird"  BachoTeX 2024 registrations 
> until 11th of April.
> All the current details of the conference are available from the revamped(!) 
> page:
> 
> https://bachotex.gust.org.pl
> 
> Don't hesitate, come and share the joys of TeXing together: "Ideas are born 
> between heads"
> 
> --Jerzy Ludwichowski
> (for the Organizing Committee)

___
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: Very bizarre bug

2024-04-07 Thread Hans Hagen

On 4/7/2024 7:08 PM, Thomas A. Schmitz wrote:

Hi everybody,

this is bizarre, but hear me out: a file that I have has a mixture of 
xml, TeX and Lua. It compiles cleanly, no problem, on macos and linux. I 
also have a little raspberry pi on which I have installed lmtx. The file 
compiles, BUT: it has one additional page. The first page of the 
document is empty and has the word "on" in the upper left hand corner of 
the text area. I have checked several times, it always comes out like 
this. Everything else is exactly the same - context version, file and 
environment files (everything under git, so really identical). The "on" 
does not appear if I just make a "hello world" document on the raspi. So 
my question is: how can I begin to explore where this word creeps in? I 
suspect it's something in the linux-aarch64 tree or some test for this 
architecture that is the culprit, but what would be a good way to trace it?


can you make a format with line 25 of context.mkxl uncommented to see if 
you get a message (not production, just a test)


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 / 
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] Very bizarre bug

2024-04-07 Thread Thomas A. Schmitz

Hi everybody,

this is bizarre, but hear me out: a file that I have has a mixture of 
xml, TeX and Lua. It compiles cleanly, no problem, on macos and linux. I 
also have a little raspberry pi on which I have installed lmtx. The file 
compiles, BUT: it has one additional page. The first page of the 
document is empty and has the word "on" in the upper left hand corner of 
the text area. I have checked several times, it always comes out like 
this. Everything else is exactly the same - context version, file and 
environment files (everything under git, so really identical). The "on" 
does not appear if I just make a "hello world" document on the raspi. So 
my question is: how can I begin to explore where this word creeps in? I 
suspect it's something in the linux-aarch64 tree or some test for this 
architecture that is the culprit, but what would be a good way to trace it?


All best

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: last page number for a list

2024-04-03 Thread Wolfgang Schuster

Alan Bowen schrieb am 30.03.2024 um 20:59:

How can I get the last page number of a chapter for a list (ToC)?

Outside of a list, I use \lastpagenumber.
But that does not work in a list such as the ToC.

Any tips or pointers will be gladly received.


You can try this:

\definepagestate[alanpage]
\definecounter  [alanindex]

\setuphead
  [chapter]
  [insidesection={\setpagestate[alanpage]},
   aftersection={\setpagestate[alanpage]}]

\setuphead
  [title]
  [insidesection=,
   aftersection=]

\define[1]\ChapterListPage

{\pagestaterealpage{alanpage}{\number\numexpr\incrementedcounter[alanindex]\relax}%
   \thinspace --\thinspace

\pagestaterealpage{alanpage}{\number\numexpr\incrementedcounter[alanindex]\relax}}

\setuplist[chapter][pagecommand=\ChapterListPage]
\setuplist[chapter][pagecommand=\ChapterListPage]

\showgrid

\starttext

\completecontent

\startchapter [title=Knuth]
\dorecurse{12}{\samplefile{knuth}}
\stopchapter

\startchapter [title=Zapf]
\dorecurse{12}{\samplefile{zapf}}
\stopchapter

\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] Re: last page number for a list

2024-04-03 Thread Alan Bowen
Hi, Bruce—
This does not quite work—the page numbers are those of the first page of
the chapter, not the last. But thanks for the tip about \writetolist.
Perhaps I can get that to work.

What I need are ToC entries like
AuthorName
ShortTitle   1–6

I need this pagination because one of the requirements of continuous
publication on the OJS is that once an item is published changes are not
permitted. So I cannot go with normal continuous publication since, for us
anyway, items are not processed in strict sequential order (e,g., we may
have, paper+paper+ review+paper...)

If it helps: I currently have

\startFMTitle[reference=\Reference, title={}][itemAuthor=AuthorName,
itemTitle=ShortTitle,...]
\setuplist[FMTitle][state=start, alternative=startendfmpages,
criterium=all,]
(\Reference is defined at the in the preamble to input of the
file/component.)

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

\startsetups[list:startendfmpages]
  \structurelistuservariable{itemAuthor}\crlf
  \structurelistuservariable{itemTitle}\hfill%
   \at[\currentlistentrypagenumber]–\at[\lastpagenumber]
\vglue1pc
\stopsetups
where I have \reference[\lastpagenumber]{} at the end of the file. But this
gives me ??–viii (the viii is correct and interactive) for the FMTitle.
Sadly the entries for all my other Titles (SourceTitle, StudyTitle...) is
??–viii.
(Each title is a modified chapter.)

Curiously, \at[\Reference]–\convertnumber{r}{\lastpagenumber}  and
\at[\Reference]–\at[\lastpagenumber] work properly in the body text.
The overall structure is project-product sort with many components in the
product.

This is probably TMI. The bottom line is that I am truly stumped.

All best,
Alan

On Wed, Apr 3, 2024 at 6:56 AM Bruce Horrocks  wrote:

>
>
> > On 30 Mar 2024, at 19:59, Alan Bowen  wrote:
> >
> > How can I get the last page number of a chapter for a list (ToC)?
> >
> > Outside of a list, I use \lastpagenumber.
> > But that does not work in a list such as the ToC.
> >
> > Any tips or pointers will be gladly received.
>
>
> I'm not quite sure what you want to do with these numbers: something like
> printing out a contents page but instead of the start page of a chapter it
> shows the last page of the chapter?
>
> If so then try creating a custom list and use \writetolist immediately
> before each \stopchapter command?
>
> \definelist[LastPages][criterium=all]
> \starttext
> \completecontent
> \page
> \completelist[LastPages]
> \page
> \dorecurse{10}{
>   \startchapter[title={This is my chapter}]
>   This is a chapter\par \dorecurse{6}{\input knuth } \input
> math-kontinuitet-sv
>
>   \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}
>   \stopchapter
> }
> \stoptext
>
> But I can't get the number option of \writetolist to work - the "3." above
> is ignored. :-(
>
> —
> 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
>
> ___
>
___
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: last page number for a list

2024-04-03 Thread Bruce Horrocks


> On 30 Mar 2024, at 19:59, Alan Bowen  wrote:
> 
> How can I get the last page number of a chapter for a list (ToC)?
> 
> Outside of a list, I use \lastpagenumber. 
> But that does not work in a list such as the ToC.
> 
> Any tips or pointers will be gladly received.


I'm not quite sure what you want to do with these numbers: something like 
printing out a contents page but instead of the start page of a chapter it 
shows the last page of the chapter?

If so then try creating a custom list and use \writetolist immediately before 
each \stopchapter command?

\definelist[LastPages][criterium=all]
\starttext
\completecontent
\page
\completelist[LastPages]
\page
\dorecurse{10}{
  \startchapter[title={This is my chapter}]
  This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv

  \writetolist[LastPages]{3.}{\namedstructurevariable{chapter}{title}}
  \stopchapter
}
\stoptext

But I can't get the number option of \writetolist to work - the "3." above is 
ignored. :-(

—
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] last page number for a list

2024-03-30 Thread Alan Bowen
How can I get the last page number of a chapter for a list (ToC)?

Outside of a list, I use \lastpagenumber.
But that does not work in a list such as the ToC.

Any tips or pointers will be gladly received.

Alan
___
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: Headertext

2024-03-27 Thread Thomas Meyer

Thank you, Wolfgang,

that's exactly what I wanted.

Greetings
Thomas

Am 26.03.24 um 17:12 schrieb Wolfgang Schuster:
When you use "header=high" you can't have a header because the block 
for it no longer exists, compare the results for "header=high" and 
"header=empty" in the following example.


 begin example
\showframe

\starttext

\setuphead[chapter][header=high]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\setuphead[chapter][header=empty]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
 end example

As you have guessed \definetext is the way to create a custom header 
for the first page of your \chapter, the command has like 
\setupheadertexts a variable number of arguments.


The third argument with the horizontal position can only be used when 
you use two or four arguments to set texts on the left and right side 
but isn't in my example because a) the text position is the default 
and b) I pass only one argument for the content because I wan't the 
text in the middle.


 begin example
\showframe

\definetext
  [chapterheader] % identifier
  [header]    % vertical position (header/footer)
% [text]  % horizontal position (text/margin)
  [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]

\starttext

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\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] start/end pages in ToC

2024-03-26 Thread Alan Bowen
Our journal is currently in the process of moving to continuous publication
of items in a given volume as they are ready. This entails re-jigging the
ToC so that it now includes the start and end page numbers of each item. So
far, I have everything pretty much in the right place, but for the page
numbers I am getting only “??”. I am not sure why this is happening and
would be grateful if someone could tell me why or point me to
documentation that explains the problem and how to solve it.

Many thanks in advance.

My minimalish working example:

\definehead[SourceTitle][chapter]
\setuphead[SourceTitle][page=yes,
footer={ItemData}]

\definehead[StudyTitle][chapter]
\setuphead[StudyTitle][page=yes,
footer={ItemData}]

\definetext[ItemData][footer][
{\at[\Reference]–
\at[\namedstructureuservariable{}{authorInitials}endPage]}
]
\setuplist[SourceTitle][
state=start,
textcolor=black,
alternative=startendpages,
criterium=all,
headnumber=no,
interaction=page,
numberalign=flushright,
before={\blank[2.2ex, fixed]},
inbetween=\endgraf,
]

\setuplist[StudyTitle][
state=start,
textcolor=black,
alternative=startendpages,
criterium=all,
headnumber=no,
interaction=all,
numberalign=flushright,
before={\blank[2.2ex, fixed]},
inbetween=\endgraf,
]

\define\ToCEntry{%
\structurelistuservariable{author}\crlf
\structurelistuservariable{title}\hfill%
\at[\structurelistuservariable{reference}]–%
\at[\structurelistuservariable{authorInitials}endPage]
}

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

\startsetups[list:startendpages]
{\ToCEntry}
\vglue1pc
\stopsetups

\starttext

{\tfa\bf Contents}

\blank[line, fixed]
\WORD{Sources}
\blank[halfline, fixed]
\placelist[SourceTitle][criterium=all]

\blank[line, fixed]
\WORD{Studies}
\blank[halfline, fixed]
\placelist[StudyTitle][criterium=all]

\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSo01}
\startSourceTitle[reference={\Reference},
bookmark=Source01,
title={}][
title=Source01,
author=Author01,
authorInitials=ABC,
reference={\Reference},
]
\input knuth
\page
\dorecurse{25}{\input ward\par}
\reference[ABCendPage]{}
\stopSourceTitle
\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSo02}
\startSourceTitle[reference={\Reference},
bookmark=Source02,
title={}][
author=Author02,
title=Source02,
authorInitials=PQR,
reference={\Reference},
]

\input knuth
\page
\dorecurse{10}{\input ward\par}
\reference[PQRendPage]{}
\stopSourceTitle
\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSt01}
\startStudyTitle[reference={\Reference},
bookmark=Study01,
title={}][
author=Author03,
title=Study01,
authorInitials=XYZ,
reference={\Reference},
]
\input knuth
\blank[big]
\page
\dorecurse{15}{\input ward\par}
\reference[XYZendPage]{}
\stopStudyTitle
\page[makeup]
\stoptext

Alan
___
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: Headertext

2024-03-26 Thread Wolfgang Schuster

Thomas Meyer schrieb am 26.03.2024 um 16:28:

Hi folks,

I know, with

\setuphead[chapter][header=high]

I can suppress the header text on the first page. But what can I do if I 
still want to have part of the header text on the first page?

Is there something I can do with \definetext and if so, how?


When you use "header=high" you can't have a header because the block for 
it no longer exists, compare the results for "header=high" and 
"header=empty" in the following example.


 begin example
\showframe

\starttext

\setuphead[chapter][header=high]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\setuphead[chapter][header=empty]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
 end example

As you have guessed \definetext is the way to create a custom header for 
the first page of your \chapter, the command has like \setupheadertexts 
a variable number of arguments.


The third argument with the horizontal position can only be used when 
you use two or four arguments to set texts on the left and right side 
but isn't in my example because a) the text position is the default and 
b) I pass only one argument for the content because I wan't the text in 
the middle.


 begin example
\showframe

\definetext
  [chapterheader] % identifier
  [header]% vertical position (header/footer)
% [text]  % horizontal position (text/margin)
  [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]

\starttext

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

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

2024-03-26 Thread Thomas Meyer

Hi folks,

I know, with

\setuphead[chapter][header=high]

I can suppress the header text on the first page. But what can I do if I 
still want to have part of the header text on the first page?

Is there something I can do with \definetext and if so, how?

Thanks for any help
Greetings 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: Struggling with the distance and right margin text

2024-03-22 Thread Ursula Hermann
Dear Pablo,


Many thanks for your example. Sorry for writing so late.

At least I found out, how it works for me .  This is the best way.


\setuppapersize[A8,landscape]
\setupbodyfont[termes, 12.50pt]
\setuplayout[inrightmargin=5.1cm
 backspace=2.9cm,
 inleftmargin=0cm,width=4cm]
\inrightmargin{\blackrule\\{3.2.2}}\par \dontleavehmode \blackrule
\showframe
\starttext
Me

\stoptext




Von: Pablo Rodriguez via ntg-context 
Gesendet: Freitag, 15. März 2024 20:00:35
An: ntg-context@ntg.nl
Cc: Pablo Rodriguez
Betreff: [NTG-context] Re: Struggling with the distance and right margin text

On 3/15/24 14:06, Ursula Hermann wrote:
> Dear List,

Dear Ursula,

this might help you (it isn’t perfect, but you just seem to copy and
paste fragments from your source files):

  %\showframe\showstruts
  \mainlanguage[de-at]
  \setuppagenumbering[alternative=doublesided]
  \definemargindata  [MyInMargin][ininner]
  \definemarginframed[MyInMargin]
[topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
  \defineframed[topruletitle]
[width=max,
 frame=off,
 topframe=on,
 rulethickness=1pt,
 align={justify},
 extras=\dontleavehmode]
  \starttext
  \topruletitle{\MyInMargin {1.1.1}\bf
  Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par
  \input knuth\page

  \topruletitle{\MyInMargin{3.2.22}{\bf
  Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und
\input zapf b}
  \stoptext

Sorry for saying that again, but please elaborate both your minimal
samples and your descriptions of the issues you are experiencing.

Some comments on the code fragments you sent.

First of all, please include always code that can be compiled simply
after being copied and pasted.

This requires \starttext (most of the time) and \stoptext (mandatory to
avoid stupid errors).

> \definepapersize[MyBook][width=19cm,height=29.7cm]
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
> \setupbodyfont[modern, 12.50pt]

If these lines are irrelevant for the issue you are experiencing, please
don’t include them.

> \definemargindata  [MyInMargin][inleft]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]

You define this margin framed, but your sample makes no use of it.

Sorry, but I don’t get it.

> \defineenumeration
>   [theorem]
>   [
> text=Theorem,
> title=yes,
> width=fit,
> distance=0.2em,
> alternative=serried,
>   ]
> \definetextbackground[GrayBackground][
>   location=paragraph,
>   background=color,
>   backgroundcolor=lightgray,
>   leftoffset=.5\bodyfontsize,
>   rightoffset=.5\bodyfontsize,
>   topoffset=.5\bodyfontsize,
>   bottomoffset=.5\bodyfontsize,
>   frame=off,]
>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
>   \blackrule[color=black, height=0.10ex, width=13.50cm]

If your sample includes no theorem or text background, please remove
these definitions when sending code.

BTW, avoid include text content (such as margin and body rules [but not
their definitions]) before \starttext.

Also, use \clrf instead of \\ (since the mailing list displays the
relevant line as ("\" instead of "\\"):

>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\}

Here starts your text:

> \starttext
> \margintext {1.1.1}
> {\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par

Your margin text is undefined. Your code has a defined margin text
command, but it isn’t used.

> So  I have here an example from the second page:

Sorry, but I’m having the impression you are using ConTeXt as a kind of
command-based DTP software (which I think it isn’t at all).

Or, do you define commands for each page?

I think it is better to define a single margin text command and use a
doublesided page setup.

> \definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
> width=.90cm]

Again, margin text commands defined, but never used.

> \blackrule[color=black, height=0.10ex, width=13.40cm]
> {\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par

Here you open a brace that is not closed at all.

At least, consider that this won’t be extremely readable for other
people (this is only a sample).

It also may be problematic for you, if you leave the source untouched
for some weeks.

> \defineenumeration
>   [theorem]
>   [
> text=Theorem,
> title=yes,
> width=fit,
> distance=0.2em,
> alternative=serried,
>   ]

At least, it would be better not to include a definition inside content
that seems to (or may) be grouped with braces.

BTW, it is exactly t

[NTG-context] Re: offset with \copypages

2024-03-21 Thread Wolfgang Schuster

Peter Münster schrieb am 21.03.2024 um 15:04:

Hi,

When inserting pages with \copypages, the included pages are slightly
shifted to the left and to the bottom.

Minimal example:

% test-file.tex:
\setuplayout[page]
\starttext
\input tufte
\vfill
\input tufte
\stoptext

% test.tex:
\starttext

\startlayout[page]

\copypages[test-file.pdf]

\stoplayout

\stoptext

How could I avoid this offset please?
You have to change the layout for the pages where you include your 
images to get rid of the default margins.


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] offset with \copypages

2024-03-21 Thread Peter Münster
Hi,

When inserting pages with \copypages, the included pages are slightly
shifted to the left and to the bottom.

Minimal example:

% test-file.tex:
\setuplayout[page]
\starttext
\input tufte
\vfill
\input tufte
\stoptext

% test.tex:
\starttext
\copypages[test-file.pdf]
\stoptext

How could I avoid this offset please?

TIA for any hints,
-- 
   Peter
___
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: can we do binding correction?

2024-03-20 Thread Hraban Ramm

Hi Andrés, thank you!

Am 20.03.24 um 06:07 schrieb Andres Conrado Montoya:
I have found with experience that a formula to calculate the binding 
correction for a saddle stitch binding, not more than 4 pages in a 
signature (only one fold in the middle) usually is 1/2 the 
circumference of a circle with radius /r/, being /r/ the thickness of 
the paper times the amount of physical signatures. Something like: 
\frac{π \times t \times s}{2}. I have not tried a formula for more 
folds in a signature.


The thing is, you have to recalculate for each signature fold. The 
innermost will have displacement zero, the second one a little bit 
more, the third a little bit more, and on and on until we reach the 
outermost signature.


However, it is necessary to say that unless you are using a 
particularly thick paper, or you are using too many pages for a saddle 
stitch bind (my personal and professional opinion would be no more 
than 80, but better 60), the displacement is usually negligible.


For example, let's say the paper thickness is 0.1 mm (which is 0.0001 
meters) and there are 40 pages in 10 signatures. The radius would be 
0.0001 meters per signature * 10 signatures = 0.001 meters. Then, half 
the circumference would be 1/2 * 3.14159 * 0.001 meters ≈  0.0016 
meters or 1.6mm at the last signature. Unless there was a displacement 
of more than, say, 4 mm, I wouldn't worry too much about it.


E.g. our Bonn architectural guides 
(https://www.dreiviertelhaus.de/reihen/afb/) are saddle-stitched 
booklets, usually have 60 pages and are printed on 115g coated paper. 
With coated paper you can’t really derivate the thickness from grammage. 
The horizontal page shift is visible if you look carefully. But since 
the paper is not very transparent, you only see the problem if you look 
for it. I don’t arrange the pages myself, don’t know the signature size, 
and I can’t request specials, since we must print cheaply to keep the 
low price (had to raise it from 5 to 8 € anyway, half of it goes to the 
wholesaler).


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: can we do binding correction?

2024-03-20 Thread Hraban Ramm

Am 19.03.24 um 23:42 schrieb Willi Egger:

Generally I know for what binding correction is used, I just never tried to set 
it up. If I look carefully at one of our printed booklets, the printshop also 
didn’t. So I'd need pageshift without applying imposition (setting it up 
wouldn’t hurt).

I organise this always with correction to the backspace.

For every single page?



Theoretically the shift value should be the same as the paper thickness (don’t 
you think?), but there’s some deformation involved, so a factor might make 
sense?

I think that this would be quite cumbersome, paper thickness of higly coated 
papers vs. novel-printing paper… I believe one would have to establish this 
thickness for each project unless the same paper is used...


No, I meant, I'd use the actual paper thickness as a parameter, so that 
paper shift could be calculated automatically with a geometrical factor 
according to the imposition schema. Don't you think that makes more 
sense than setting it for single pages?


But while this is an interesting topic, it's one of these overly 
involved niche features in ConTeXt… I didn't care too much myself, and 
laypeople don't see it anyway.





Unfortunately I threw out my old books on printing technology long ago, and my 
newer one doesn’t cover bookbinding (I’m not at home anyway).

I think, that many printshops do not possess neither old books including 
bookbinding nor do they care about the wishes of the binder … Pity, that you 
threw them out, but i understand, that circumstances might be such that you 
have to take decisions…


When we left Switzerland in 2012 for Freiburg (and then again Freiburg 
in 2013 for Kyrgyzstan), we had to drop ballast, and I still had too 
many books (if you can have too many books at all…). I had a lot on art 
techniques like calligraphy that I never used, and my printing 
technology stuff was outdated – well… The antiquarian gave me 30€ for a 
big pile of formerly expensive books, and he probably was generous.


Since then I gained a publishing house and had to move three times, my 
moving helpers were not amused about that many book boxes. (The last 
move was into the 3rd story, or is this 4th?, of an old house with very 
high stories; if visitors arrive panting at my door, I tell them they 
can sign the summit register now…)


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: can we do binding correction?

2024-03-19 Thread Willi Egger
Hi Hraban,

> On 19 Mar 2024, at 21:56, Hraban Ramm  wrote:
> 
> Thank you Willi!
> 
> Generally I know for what binding correction is used, I just never tried to 
> set it up. If I look carefully at one of our printed booklets, the printshop 
> also didn’t. So I'd need pageshift without applying imposition (setting it up 
> wouldn’t hurt).

I organise this always with correction to the backspace.

> 
> I didn’t think about vertical pageshift, but of course that’s also needed for 
> cross-folded sheets.
> 
> I'm not sure how (horizontal) pageshift is supposed to work with full page 
> images without introducing white borders, but bleed at the inner edge should 
> be enough.
> 
> Theoretically the shift value should be the same as the paper thickness 
> (don’t you think?), but there’s some deformation involved, so a factor might 
> make sense?

I think that this would be quite cumbersome, paper thickness of higly coated 
papers vs. novel-printing paper… I believe one would have to establish this 
thickness for each project unless the same paper is used...


> Unfortunately I threw out my old books on printing technology long ago, and 
> my newer one doesn’t cover bookbinding (I’m not at home anyway).

I think, that many printshops do not possess neither old books including 
bookbinding nor do they care about the wishes of the binder … Pity, that you 
threw them out, but i understand, that circumstances might be such that you 
have to take decisions…

Willi
> 
> Hraban
> 
> Am 19.03.24 um 17:01 schrieb Willi Egger:
>> Hi Hraban,
>> 
>> I think we should clarify this.
>> 
>> Binding correction is a fixed amount of whitespace in the spine added to the 
>> inner white-space. This is to ensure, that the binding, which is consuming 
>> white-space, keeps the inner white-space optically as intended..
>> 
>> The page shift mechanism works only with imposition enabled. This ensures, 
>> that the type-setting area does not creep towards the spine because multiple 
>> sheets of paper are folded in the spine.
>> 
>> I doubt whether it is enough to have the measure of the thickness do 
>> determine this creeping effect, because we are making folds which are 
>> probably more circles than just adding thickness of paper.
>> 
>> 
>> Willi
>> 
>>> On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:
>>> 
>>> 
>>> Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:
>>>> Hraban Ramm schrieb am 17.03.2024 um 22:48:
>>>>> Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz 
>>>>> Linux Days today:
>>>>> 
>>>>> Can I configure binding correction for saddle-stitched or thread-bound 
>>>>> booklets, and if, does it only work with arranging (imposition) or can I 
>>>>> enable it somehow for the layout (if the printshop does the imposition)?
>>>> 1. \definepageshift + \setuppageshift
>>>> 
>>>> 2. \setuplayout[horoffset=]
>>>> 
>>>>> Also I recognized I'm not sure about the difference of the layout 
>>>>> parameters backspace and cutspace.
>>>> backspace is the inner margin and cutspace the outer
>>>> 
>>> Hi Wolfgang, thank you! Seems like I was too dense to understand the 
>>> description for the \setuplayout parameters in the wiki (and there are more 
>>> that I never used, oh my…), and since I never use ConTeXt’s imposition for 
>>> serious print products (and never set up a scheme myself), I didn’t know 
>>> about pageshift.
>>> 
>>> Ok, if I leave imposition to the printshop and they don't do binding 
>>> correction in their workflow, I'd need to set horoffset differently for 
>>> every single page (i.e. first, second, second-to-last and last the same; 
>>> 3th, 4th and from back the same etc.). Or is pageshift applied 
>>> independently from arranging?
>>> 
>>> And then, it makes no sense to add the same value all the time. I don’t 
>>> know if BCOR works this way in LaTeX, but one value (paper thickness) 
>>> should be enough in combination with an imposition schema. I.e. if I define 
>>> a paper thickness and the number of pages that are in one booklet (as a 
>>> single booklet or part of a "proper" book), then the page shift should work 
>>> automatically.
>>> 
>>> Well, for a single booklet, it could. In a book, booklets can have 
>>> different numbers of pages, and then you'd need to define a list… Okay, too 
>>> c

[NTG-context] Re: can we do binding correction?

2024-03-19 Thread Hraban Ramm

Thank you Willi!

Generally I know for what binding correction is used, I just never tried 
to set it up. If I look carefully at one of our printed booklets, the 
printshop also didn’t. So I'd need pageshift without applying imposition 
(setting it up wouldn’t hurt).


I didn’t think about vertical pageshift, but of course that’s also 
needed for cross-folded sheets.


I'm not sure how (horizontal) pageshift is supposed to work with full 
page images without introducing white borders, but bleed at the inner 
edge should be enough.


Theoretically the shift value should be the same as the paper thickness 
(don’t you think?), but there’s some deformation involved, so a factor 
might make sense?


Unfortunately I threw out my old books on printing technology long ago, 
and my newer one doesn’t cover bookbinding (I’m not at home anyway).


Hraban

Am 19.03.24 um 17:01 schrieb Willi Egger:

Hi Hraban,

I think we should clarify this.

Binding correction is a fixed amount of whitespace in the spine added to the 
inner white-space. This is to ensure, that the binding, which is consuming 
white-space, keeps the inner white-space optically as intended..

The page shift mechanism works only with imposition enabled. This ensures, that 
the type-setting area does not creep towards the spine because multiple sheets 
of paper are folded in the spine.

I doubt whether it is enough to have the measure of the thickness do determine 
this creeping effect, because we are making folds which are probably more 
circles than just adding thickness of paper.


Willi


On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:


Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 22:48:

Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz Linux 
Days today:

Can I configure binding correction for saddle-stitched or thread-bound 
booklets, and if, does it only work with arranging (imposition) or can I enable 
it somehow for the layout (if the printshop does the imposition)?

1. \definepageshift + \setuppageshift

2. \setuplayout[horoffset=]


Also I recognized I'm not sure about the difference of the layout parameters 
backspace and cutspace.

backspace is the inner margin and cutspace the outer


Hi Wolfgang, thank you! Seems like I was too dense to understand the 
description for the \setuplayout parameters in the wiki (and there are more 
that I never used, oh my…), and since I never use ConTeXt’s imposition for 
serious print products (and never set up a scheme myself), I didn’t know about 
pageshift.

Ok, if I leave imposition to the printshop and they don't do binding correction 
in their workflow, I'd need to set horoffset differently for every single page 
(i.e. first, second, second-to-last and last the same; 3th, 4th and from back 
the same etc.). Or is pageshift applied independently from arranging?

And then, it makes no sense to add the same value all the time. I don’t know if BCOR 
works this way in LaTeX, but one value (paper thickness) should be enough in combination 
with an imposition schema. I.e. if I define a paper thickness and the number of pages 
that are in one booklet (as a single booklet or part of a "proper" book), then 
the page shift should work automatically.

Well, for a single booklet, it could. In a book, booklets can have different 
numbers of pages, and then you'd need to define a list… Okay, too complicated. 
It’s the printshops's responsibility anyway, and nobody complained about my 
books so far. (I'm not perfectionist enough to care.)

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  

[NTG-context] command line arguments

2024-03-19 Thread Hraban Ramm
Following up on the other imposition question, I'm trying to make an 
example file that shows an imposition schema according to command line 
arguments.


This way it works for the number of pages, as used in 
\dorecurse{\Pages}{…}, but not for the imposition schema. Typesetting 
\Schema looks right, but \setuparranging doesn’t work. Where's my error?


\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}

\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}

\setuparranging[\Schema]

Find the full example attached, I call it like

context --autopdf=auto --arrange impositiontest.tex --schema=TRYPTICHON 
--numberofpages=32

Hraban
% context --autopdf=auto --arrange --arguments=schema=2\*4,pages=16

\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}

\setuppapersize[A9,landscape][A7,landscape]

\setuparranging[\Schema]

\setupbodyfont[ss,10pt]

\setuplayout[margin=0pt, width=fit, header=2.8ex, footer=2.8ex]
\setupalign[middle,hilo]
\setuppagenumbering [alternative=doublesided,location=footer]
\setupheadertexts[\CONTEXT\ imposition test]

\showframe
\setupbackgrounds [text][text][background=color,backgroundcolor=lightgray]

% Where the block of pages is placed on the sheet
% (relevant if there is space left over.)
\setuplayout [location=middle,marking=on]

\startbuffer[Fakepage]
\strut
\blank
\bold{[\Schema]}
\vfill
This is page \recurselevel
\vfill
\stopbuffer

\starttext
\dorecurse{\Pages}{\getbuffer[Fakepage]\page}
\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: Adjusted Chapter Headings

2024-03-19 Thread Wolfgang Schuster

Jeroen schrieb am 19.03.2024 um 12:59:
I have some style adjustments for the chapters. The chapter "numbers" 
need to be Boek I, Boek II, etc. A vertical separator was introduced 
with an inframe. The chapter title at the right side does not vertically 
align properly with the chapter number in the frame (inside the frame is 
vertically centered, the title not). Is there a way to align the chapter 
title with the chapter number?




\starttexdefinition MyNumberChapterCommand #1
     \inframed[frame=off,rightframe=on,framecolor=black,
      rulethickness=1px,height=30pt]{#1\enspace}
\stoptexdefinition

\setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
     page=no]


\define[2]\MyNumberChapterCommand
  {#1\space\blackrule[width=1pt,height=22pt,depth=8pt]\space#2}

\setuphead
  [chapter]
  [   page=no,
   command=\MyNumberChapterCommand,
 style=\bfc]

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: Adjusted Chapter Headings

2024-03-19 Thread Jeroen
I have been able to achieve it as following, but the first frame width is
fixed so will cause problems with other chapter numbers such as VIII


\unexpanded\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
\hfill
\setupframed[offset=.5em,frame=off]
\tbox{\framed[width=22mm,align=right]{#1}}%
\tbox{\framed[width=130mm,align=right,leftframe=on,
rulethickness=0.8pt]{#2}}%
\egroup}

\setuplabeltext[chapter=Boek~]

\setuphead[chapter][style={\bfc}, command=\HeadTitle, textstyle=bold]

...

\startchapter
  [title={Algemene Beginselen},
   ownnumber={I}]

Op di 19 mrt 2024 om 15:49 schreef Hraban Ramm :

> Hi Jeroen,
>
> it might make sense to use
>
> \setuphead[chapter][
>   conversion=R,
> ]
> \setuplabeltext[nl][chapter={Boek }]
>
> instead of ownnumber.
>
> I would use one command for number and title and put both in the same kind
> of frame. Probably you should use a \strut in the text or
> \inframed[strut=yes] to assure the same text height.
>
> HTH, Hraban
> Am 19.03.24 um 12:59 schrieb Jeroen:
>
> I have some style adjustments for the chapters. The chapter "numbers" need
> to be Boek I, Boek II, etc. A vertical separator was introduced with an
> inframe. The chapter title at the right side does not vertically align
> properly with the chapter number in the frame (inside the frame is
> vertically centered, the title not). Is there a way to align the chapter
> title with the chapter number?
>
>
>
> \starttexdefinition MyNumberChapterCommand #1
> \inframed[frame=off,rightframe=on,framecolor=black,
>  rulethickness=1px,height=30pt]{#1\enspace}
> \stoptexdefinition
>
> \setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
> page=no]
>
> \starttext
>
> \startchapter
>   [title={Algemene Beginselen},
>ownnumber={Boek I}]
>
> \samplefile{tufte}
>
> \stopchapter
>
> \startchapter
>   [title={Organisatorische Structuren},
>ownnumber={Boek II}]
>
> \samplefile{tufte}
>
> \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
> ___
>
>
> ___
> 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: can we do binding correction?

2024-03-19 Thread Willi Egger
Hi Hraban,

I think we should clarify this.

Binding correction is a fixed amount of whitespace in the spine added to the 
inner white-space. This is to ensure, that the binding, which is consuming 
white-space, keeps the inner white-space optically as intended..

The page shift mechanism works only with imposition enabled. This ensures, that 
the type-setting area does not creep towards the spine because multiple sheets 
of paper are folded in the spine.

I doubt whether it is enough to have the measure of the thickness do determine 
this creeping effect, because we are making folds which are probably more 
circles than just adding thickness of paper.


Willi

> On 18 Mar 2024, at 17:35, Hraban Ramm  wrote:
> 
> 
> Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:
>> Hraban Ramm schrieb am 17.03.2024 um 22:48:
>>> Hi, this question was rised in my ConTeXt beginners workshop* at Chemnitz 
>>> Linux Days today:
>>> 
>>> Can I configure binding correction for saddle-stitched or thread-bound 
>>> booklets, and if, does it only work with arranging (imposition) or can I 
>>> enable it somehow for the layout (if the printshop does the imposition)?
>> 
>> 1. \definepageshift + \setuppageshift
>> 
>> 2. \setuplayout[horoffset=]
>> 
>>> Also I recognized I'm not sure about the difference of the layout 
>>> parameters backspace and cutspace.
>> 
>> backspace is the inner margin and cutspace the outer
>> 
> Hi Wolfgang, thank you! Seems like I was too dense to understand the 
> description for the \setuplayout parameters in the wiki (and there are more 
> that I never used, oh my…), and since I never use ConTeXt’s imposition for 
> serious print products (and never set up a scheme myself), I didn’t know 
> about pageshift.
> 
> Ok, if I leave imposition to the printshop and they don't do binding 
> correction in their workflow, I'd need to set horoffset differently for every 
> single page (i.e. first, second, second-to-last and last the same; 3th, 4th 
> and from back the same etc.). Or is pageshift applied independently from 
> arranging?
> 
> And then, it makes no sense to add the same value all the time. I don’t know 
> if BCOR works this way in LaTeX, but one value (paper thickness) should be 
> enough in combination with an imposition schema. I.e. if I define a paper 
> thickness and the number of pages that are in one booklet (as a single 
> booklet or part of a "proper" book), then the page shift should work 
> automatically.
> 
> Well, for a single booklet, it could. In a book, booklets can have different 
> numbers of pages, and then you'd need to define a list… Okay, too 
> complicated. It’s the printshops's responsibility anyway, and nobody 
> complained about my books so far. (I'm not perfectionist enough to care.)
> 
> 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: Adjusted Chapter Headings

2024-03-19 Thread Hraban Ramm

Hi Jeroen,

it might make sense to use

\setuphead[chapter][
  conversion=R,
]
\setuplabeltext[nl][chapter={Boek }]

instead of ownnumber.

I would use one command for number and title and put both in the same 
kind of frame. Probably you should use a \strut in the text or 
\inframed[strut=yes] to assure the same text height.


HTH, Hraban

Am 19.03.24 um 12:59 schrieb Jeroen:
I have some style adjustments for the chapters. The chapter "numbers" 
need to be Boek I, Boek II, etc. A vertical separator was introduced 
with an inframe. The chapter title at the right side does not 
vertically align properly with the chapter number in the frame (inside 
the frame is vertically centered, the title not). Is there a way to 
align the chapter title with the chapter number?




\starttexdefinition MyNumberChapterCommand #1
    \inframed[frame=off,rightframe=on,framecolor=black,
     rulethickness=1px,height=30pt]{#1\enspace}
\stoptexdefinition

\setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
    page=no]

\starttext

\startchapter
  [title={Algemene Beginselen},
   ownnumber={Boek I}]

\samplefile{tufte}

\stopchapter

\startchapter
  [title={Organisatorische Structuren},
   ownnumber={Boek II}]

\samplefile{tufte}

\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
__
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] Adjusted Chapter Headings

2024-03-19 Thread Jeroen
I have some style adjustments for the chapters. The chapter "numbers" need
to be Boek I, Boek II, etc. A vertical separator was introduced with an
inframe. The chapter title at the right side does not vertically align
properly with the chapter number in the frame (inside the frame is
vertically centered, the title not). Is there a way to align the chapter
title with the chapter number?



\starttexdefinition MyNumberChapterCommand #1
\inframed[frame=off,rightframe=on,framecolor=black,
 rulethickness=1px,height=30pt]{#1\enspace}
\stoptexdefinition

\setuphead[chapter][style={\bfc},numbercommand=\MyNumberChapterCommand,
page=no]

\starttext

\startchapter
  [title={Algemene Beginselen},
   ownnumber={Boek I}]

\samplefile{tufte}

\stopchapter

\startchapter
  [title={Organisatorische Structuren},
   ownnumber={Boek II}]

\samplefile{tufte}

\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: can we do binding correction?

2024-03-18 Thread Hraban Ramm


Am 17.03.24 um 23:54 schrieb Wolfgang Schuster:

Hraban Ramm schrieb am 17.03.2024 um 22:48:
Hi, this question was rised in my ConTeXt beginners workshop* at 
Chemnitz Linux Days today:


Can I configure binding correction for saddle-stitched or 
thread-bound booklets, and if, does it only work with arranging 
(imposition) or can I enable it somehow for the layout (if the 
printshop does the imposition)?


1. \definepageshift + \setuppageshift

2. \setuplayout[horoffset=]

Also I recognized I'm not sure about the difference of the layout 
parameters backspace and cutspace.


backspace is the inner margin and cutspace the outer

Hi Wolfgang, thank you! Seems like I was too dense to understand the 
description for the \setuplayout parameters in the wiki (and there are 
more that I never used, oh my…), and since I never use ConTeXt’s 
imposition for serious print products (and never set up a scheme 
myself), I didn’t know about pageshift.


Ok, if I leave imposition to the printshop and they don't do binding 
correction in their workflow, I'd need to set horoffset differently for 
every single page (i.e. first, second, second-to-last and last the same; 
3th, 4th and from back the same etc.). Or is pageshift applied 
independently from arranging?


And then, it makes no sense to add the same value all the time. I don’t 
know if BCOR works this way in LaTeX, but one value (paper thickness) 
should be enough in combination with an imposition schema. I.e. if I 
define a paper thickness and the number of pages that are in one booklet 
(as a single booklet or part of a "proper" book), then the page shift 
should work automatically.


Well, for a single booklet, it could. In a book, booklets can have 
different numbers of pages, and then you'd need to define a list… Okay, 
too complicated. It’s the printshops's responsibility anyway, and nobody 
complained about my books so far. (I'm not perfectionist enough to care.)


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: Why is header page number appearing when I define a header?

2024-03-17 Thread Hraban Ramm

Am 16.03.24 um 22:28 schrieb Marco Patzer:

On Sat, 16 Mar 2024 20:33:33 + (UTC)
Joel via ntg-context  wrote:


How do I remove the page number from the header texts?

   \setupheadertexts []

or

   \setuplayouttext
  [header][text]
  [middletext=]


I’d have guessed

\setuppagenumbering[location=,]

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: Why is header page number appearing when I define a header?

2024-03-16 Thread Marco Patzer
On Sat, 16 Mar 2024 20:33:33 + (UTC)
Joel via ntg-context  wrote:

> How do I remove the page number from the header texts?

  \setupheadertexts []

or

  \setuplayouttext
 [header][text]
 [middletext=]

Marco
___
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] Why is header page number appearing when I define a header?

2024-03-16 Thread Joel via ntg-context

\starttext
            
\setupheadertexts[Name:~][Date:~__][Date:~__][Name:~]
            \setupfootertexts[][pagenumber][][pagenumber]


    \input knuth

\stoptext



I used this code to create header texts that prints Name / Date on the top and 
page numbers in the bottom corners. But somehow when I define this code, its 
also adding the page number not just to the bottom of the page, but to the top 
of the page as well. How do I remove the page number from the header texts?
--Joel
___
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 include an an svg file?

2024-03-16 Thread Jean-Pierre Delange
 
0  
system  >   ptr  50727 10311  50710 
   578519  0  5  0  0  0  0 
20  0 28  7
system  >   top  50728807100 131074  21440  
   575953341 42  5 12 43301 
   250250 50 10
system  >   
---
system  > 
system  >   current input type: initial
system  > 
system  >   approximate memory: 44350014 (42 MB)
system  > 
system  >   expansion depth   : min: 1, max: 100, set: 
1, top: 6
system  > 
system  >   luabytecode registers : 1015
system  >   luabytecode bytes : 16256 (0 MB)
system  >   luastate bytes now: 65596258 (62 MB)
system  >   luastate bytes max: 65596258 (62 MB)
system  > 
system  >   file callbacks: 129
system  >   saved callbacks   : 715
system  >   direct callbacks  : 4
system  >   function callbacks: 826
system  >   value callbacks   : 436
system  >   message callbacks : 0
system  >   bytecode callbacks: 620
system  > 
system  >   mp instances  : 1
system  >   mp estimated memory   : 4212312 (4 MB)
system  >   mp file callbacks : 13879
system  >   mp text callbacks : 0
system  >   mp script callbacks   : 393
system  >   mp log callbacks  : 1138
system  > 
system  >   total callbacks   : 2730
system  >   mp total callbacks: 15411
system  >   backend callbacks : 0
system  > 
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/Users/adeim/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.022 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 36 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 515 modules (0.182 sec), 105 tables 
(0.016 sec), 620 chunks (0.198 sec)
mkiv lua stats  > traced context: maxstack: 1748, freed: 2, unreachable: 1746
mkiv lua stats  > cleaned up reserved nodes: 74 nodes, 7 lists of 437
mkiv lua stats  > node memory usage: 9 attribute, 3 glue, 131 gluespec, 1 kern, 
645 mathspec, 4 penalty, 2 temp
mkiv lua stats  > node list callback tasks: 16 unique task lists, 10 instances 
(re)created, 293 calls
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.003 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: file: 129, saved: 715, direct: 4, function: 826, 
value: 436, message: 0, bytecode: 620, late 0, total: 2730 (683 per page)
mkiv lua stats  > randomizer: resumed with value 0.95189229949769
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 3 files: latinmodernmath-companion.otf, 
latinmodern-math.otf, lmroman10-regular.otf
mkiv lua stats  > font engine: otf 3.135, afm 1.513, tfm 1.000, 14 instances, 9 
shared in backend, 4 common vectors, 5 common hashes, load time 0.231 seconds 
mkiv lua stats  > metapost: 0.006 seconds, loading: 0.076, execution: 0.006, n: 
4, average: 0.022, instances: 1, luacalls: 15411 (file: 13879, text: 0, script: 
393, log: 1138), memory: 4.017 M
mkiv lua stats  > math tweaking time: 0.097 seconds, 12 math goodie tables
mkiv lua stats  > graphics processing time: 0.003 seconds including tex, 1 
processed images, 1 unique asked, 0 bad names
mkiv lua stats  > font embedding time: 0.007 seconds, 1 fonts
mkiv lua stats  > result saved in file: ctx-test-MetaPost-pdf.pdf, 
compresslevel 1, objectcompresslevel 3, 12 streams, 4 uncompressed, 6 
compressed, 2 not compressed, threshold 40
mkiv lua stats  > positions: 4 collected, 0 deltas, 0 shared partials, 0 
partial entries
mkiv lua stats  > used platform: win64, type: windows, binary subtree: 
texmf-win64
mkiv lua stats  > used engine: luametatex version: 2.10.11, functionality 
level: 20240124, format id: 700, compiler: gcc
mkiv lua stats  > tex properties: 807100 hash slots used of 2097152, 50710 
control sequences, approximate memory usage: 42 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 65 MB, ctx: 62 
MB, max: 62 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.675 seconds, 4 processed pages, 4 shipped pages, 
5.924 pages/second
___
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: Why aren't cross-references working in tabulate?

2024-03-15 Thread Joel via ntg-context
 Thank you! The solution worked!

On Friday, March 15, 2024 at 02:30:40 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 15.03.2024 um 20:50:
> When I run this code, \at{page}[xyz] is unable to find the cross reference:
> 
> \starttext
> %\reference[xyz]{}
> \starttabulate[|lp(.3\textwidth)|lp(.\textwidth)|]
> \NC    \reference[xyz]{} \NC \NC\NR

\NC \doifnotmode{*trialtypesetting}{\pagereference[xyz]} \NC \NC\NR

> \stoptabulate
> 
> 
> \pagebreak
> 
> \at{page}[xyz]
> 
> \stoptext
> 
> The code does work when I uncomment line #2, revealing the 
> cross-references work find when outside of a table.
> 
> I also tried using a TABLE environment instead and the result was 
> similar, it wouldn't show the page number.
> 
> What am I doing wrong?

Tabulate and natural tables process the table content multiple times and 
therefore you're setting the reference multiple times, to avoid this 
check for trialtypesetting mode and set the reference only when you're 
out of the mode.

@Hans: Can we add the check trialtypesetting check to \reference etc.?

\protected\def\strc_references_set_named_reference
- {\ifreferencing
+ {\iftrialtypesetting
+    \expandafter\gobblefourarguments
+  \orelse\ifreferencing
      \expandafter\strc_references_set_named_reference_indeed
    \else
      \expandafter\gobblefourarguments
    \fi}

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
___
  ___
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: Why aren't cross-references working in tabulate?

2024-03-15 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 15.03.2024 um 20:50:

When I run this code, \at{page}[xyz] is unable to find the cross reference:

\starttext
%\reference[xyz]{}
\starttabulate[|lp(.3\textwidth)|lp(.\textwidth)|]
\NC    \reference[xyz]{} \NC \NC\NR


\NC \doifnotmode{*trialtypesetting}{\pagereference[xyz]} \NC \NC\NR


\stoptabulate


\pagebreak

\at{page}[xyz]

\stoptext

The code does work when I uncomment line #2, revealing the 
cross-references work find when outside of a table.


I also tried using a TABLE environment instead and the result was 
similar, it wouldn't show the page number.


What am I doing wrong?


Tabulate and natural tables process the table content multiple times and 
therefore you're setting the reference multiple times, to avoid this 
check for trialtypesetting mode and set the reference only when you're 
out of the mode.


@Hans: Can we add the check trialtypesetting check to \reference etc.?

\protected\def\strc_references_set_named_reference
- {\ifreferencing
+ {\iftrialtypesetting
+\expandafter\gobblefourarguments
+  \orelse\ifreferencing
 \expandafter\strc_references_set_named_reference_indeed
   \else
 \expandafter\gobblefourarguments
   \fi}

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] Why aren't cross-references working in tabulate?

2024-03-15 Thread Joel via ntg-context
When I run this code, \at{page}[xyz] is unable to find the cross reference:
\starttext%\reference[xyz]{}
\starttabulate[|lp(.3\textwidth)|lp(.\textwidth)|]
\NC    \reference[xyz]{} \NC \NC\NR
\stoptabulate


\pagebreak

\at{page}[xyz]

\stoptext

The code does work when I uncomment line #2, revealing the cross-references 
work find when outside of a table.
I also tried using a TABLE environment instead and the result was similar, it 
wouldn't show the page number.
What am I doing wrong?
--Joel
___
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: Struggling with the distance and right margin text

2024-03-15 Thread Pablo Rodriguez via ntg-context
On 3/15/24 14:06, Ursula Hermann wrote:
> Dear List, 

Dear Ursula,

this might help you (it isn’t perfect, but you just seem to copy and
paste fragments from your source files):

  %\showframe\showstruts
  \mainlanguage[de-at]
  \setuppagenumbering[alternative=doublesided]
  \definemargindata  [MyInMargin][ininner]
  \definemarginframed[MyInMargin]
[topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
  \defineframed[topruletitle]
[width=max,
 frame=off,
 topframe=on,
 rulethickness=1pt,
 align={justify},
 extras=\dontleavehmode]
  \starttext
  \topruletitle{\MyInMargin {1.1.1}\bf
  Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par
  \input knuth\page

  \topruletitle{\MyInMargin{3.2.22}{\bf
  Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und
\input zapf b}
  \stoptext

Sorry for saying that again, but please elaborate both your minimal
samples and your descriptions of the issues you are experiencing.

Some comments on the code fragments you sent.

First of all, please include always code that can be compiled simply
after being copied and pasted.

This requires \starttext (most of the time) and \stoptext (mandatory to
avoid stupid errors).

> \definepapersize[MyBook][width=19cm,height=29.7cm]
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
> \setupbodyfont[modern, 12.50pt]

If these lines are irrelevant for the issue you are experiencing, please
don’t include them.

> \definemargindata  [MyInMargin][inleft]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]

You define this margin framed, but your sample makes no use of it.

Sorry, but I don’t get it.

> \defineenumeration
>   [theorem]
>   [
>     text=Theorem,
>     title=yes,
>     width=fit,
>     distance=0.2em,
>     alternative=serried,
>   ]
> \definetextbackground[GrayBackground][
>   location=paragraph,
>   background=color,
>   backgroundcolor=lightgray,
>   leftoffset=.5\bodyfontsize,
>   rightoffset=.5\bodyfontsize,
>   topoffset=.5\bodyfontsize,
>   bottomoffset=.5\bodyfontsize,
>   frame=off,]
>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
>   \blackrule[color=black, height=0.10ex, width=13.50cm]

If your sample includes no theorem or text background, please remove
these definitions when sending code.

BTW, avoid include text content (such as margin and body rules [but not
their definitions]) before \starttext.

Also, use \clrf instead of \\ (since the mailing list displays the
relevant line as ("\" instead of "\\"):

>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\}

Here starts your text:

> \starttext
> \margintext {1.1.1}
> {\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par

Your margin text is undefined. Your code has a defined margin text
command, but it isn’t used.

> So  I have here an example from the second page: 

Sorry, but I’m having the impression you are using ConTeXt as a kind of
command-based DTP software (which I think it isn’t at all).

Or, do you define commands for each page?

I think it is better to define a single margin text command and use a
doublesided page setup.

> \definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
> width=.90cm]

Again, margin text commands defined, but never used.

> \blackrule[color=black, height=0.10ex, width=13.40cm]
> {\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par

Here you open a brace that is not closed at all.

At least, consider that this won’t be extremely readable for other
people (this is only a sample).

It also may be problematic for you, if you leave the source untouched
for some weeks.

> \defineenumeration
>   [theorem]
>   [
>     text=Theorem,
>     title=yes,
>     width=fit,
>     distance=0.2em,
>     alternative=serried,
>   ]

At least, it would be better not to include a definition inside content
that seems to (or may) be grouped with braces.

BTW, it is exactly the same definition as the one included before.

It isn’t just to be removed in minimal samples, your final code doesn’t
need the duplicated command definition.

> \inright{3.2.22}
> {\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und 
>
> My problem here is that there is not the same distance between the  the
> text and the  margintext .

Please, always compile the minimal samples that you send to the list.

This is simply to ensure other list subscribers will get the same
results as you.

After adding a final \stoptext command, I had to run:

  mtxrun --script check source-sample.tex

This allowed me to sp

[NTG-context] Struggling with the distance and right margin text

2024-03-15 Thread Ursula Hermann
Dear List,



On the first page I had this example:
\definepapersize[MyBook][width=19cm,height=29.7cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[modern, 12.50pt]
\definemargindata  [MyInMargin][inleft]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
{\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par


So  I have here an example from the second page:


\definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]

\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
width=.90cm]
\blackrule[color=black, height=0.10ex, width=13.40cm]
{\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\inright{3.2.22}
{\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und

My problem here is that there is not the same distance between the  the text 
and the  margintext .

And now the margintext should be on the right side.

So maybe someone could help me please.
Many thanks.



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

2024-03-14 Thread Otared Kavian
Dear Emmanuel,

Thank you for your reply: indeed I understand your approach, which is quite 
efficient. I am not at all good in coding, so I naively thought there would be 
a way for your setup to retrieve the information it needs from what the user is 
doing. Maybe once things are settled, Hans and Wolfgang will have a look in the 
Japanese part of ConTeXt so that the user can avoid to enter the setup included 
in the \directlua part.

Again thank you for what you are sharing.

Best regards: Otared

> On 14 Mar 2024, at 08:12, Emanuel Han via ntg-context  
> wrote:
> 
> Dear Otared,
> 
> when you read the lua code in the first \directlua{}, you should realize that 
> the dimensions of almost all layout elements are depending on the value of my 
> lua variable "paperSize".
> Thanks to defining the paper size first in lua, I can apply calculations of 
> numeric values.
> 
> The value of paperSize is later passed on to \setuppapersize via 
> \setuppapersize[\directlua{tex.print(paperSize)}]
> 
> Emanuel
> On März 13 2024, at 3:55 pm, Otared Kavian  wrote:
> Hi Emmanuel,
> 
> Thank you so much for the new setup for writing Japanese: I tested with both 
> files, and noticed that with the new version the output looks great.
> 
> I have a question about the code in the \directlua{} part of your setup: why, 
> for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
> 
> Actually I am using your setup for learning Japanese, and at my beginner’s 
> level I do separate words I am learning with spaces. While with the previous 
> version of your setup the lines were breaking womewhat strangely, but now the 
> spaces between words in the output are as I intended them to be (I should 
> also Thank Wolfgang Schuster for his insight with the \script[nihongo], and 
> indeed Hans for fixing so quickly the slightest bug).
> 
> It is really a great pleasure to be in this community where help comes from 
> everyone and features are given on demand !
> 
> Best regards: Otared
> 
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context  
> > wrote:
> >
> > Hi all,
> >
> > I added 
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout 
> > output meets already some of the requirements (see comments in the code). 
> > Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) 
> > https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
> > https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in 
> > this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
> > https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
> > https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
> > https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster 
> >  wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very 
> > narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the 
> > necessary value for the 

[NTG-context] Re: Japanese

2024-03-14 Thread Emanuel Han via ntg-context
Dear Otared,

when you read the lua code in the first \directlua{}, you should realize that 
the dimensions of almost all layout elements are depending on the value of my 
lua variable "paperSize".
Thanks to defining the paper size first in lua, I can apply calculations of 
numeric values.

The value of paperSize is later passed on to \setuppapersize via 
\setuppapersize[\directlua{tex.print(paperSize)}]
Emanuel
On März 13 2024, at 3:55 pm, Otared Kavian  wrote:
> Hi Emmanuel,
>
> Thank you so much for the new setup for writing Japanese: I tested with both 
> files, and noticed that with the new version the output looks great.
> I have a question about the code in the \directlua{} part of your setup: why, 
> for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
>
> Actually I am using your setup for learning Japanese, and at my beginner’s 
> level I do separate words I am learning with spaces. While with the previous 
> version of your setup the lines were breaking womewhat strangely, but now the 
> spaces between words in the output are as I intended them to be (I should 
> also Thank Wolfgang Schuster for his insight with the \script[nihongo], and 
> indeed Hans for fixing so quickly the slightest bug).
> It is really a great pleasure to be in this community where help comes from 
> everyone and features are given on demand !
> Best regards: Otared
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context  
> > wrote:
> >
> > Hi all,
> >
> > I added 
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout 
> > output meets already some of the requirements (see comments in the code). 
> > Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) 
> > https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment 
> > https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in 
> > this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 
> > https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and 
> > https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and 
> > https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster 
> >  wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected 
> > attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, 
> > but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very 
> > narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the 
> > necessary value for the text height.
> >
> > • protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> >
> > You're getting this for free because ruby text doesn't take up vertical 
> > space, in case vertical text is working it would now stick into the margins 
> > as expected.
> >
> > \starttext
> > \ruledhbox{a \ruby{x}{y} b}
> > \stoptext
> >
> >
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 
> > lines on one page, while the actual example doesn't show the 46th line.
> >
> > It would be important to identify the reason why only 24 characte

[NTG-context] Re: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 After many hours of trial-and-error, I was able to recreate the problem in a 
minimum working example:
file main.tex only contains:

\starttext

    \index{birds}
    \index{insects}
    
    \input secondary
    
    \placeindex
    
\stoptext
file secondary.tex only contains:


   \index{turtles}

For reasons I can't understand, the index produces the same [entry not flushed] 
error. It seems here happening when contents are input.
My code is so simple, I can't understand what I've typed wrong.

--Joel


On Wednesday, March 13, 2024 at 12:51:56 PM MDT, Joel via ntg-context 
 wrote:  
 
  Okay, I maybe made some progress. I traced the code back and back through the 
various documents and found I have some items inside:

\startnointerference\startnointerference
My intent is to have items that are "there" but invisible to viewers, taking up 
no space on screen, but treated as being present, so the index will still point 
to that particular page.
This solution seems to be what's causing the [entry not flushed] error in the 
index.
Is there another solution instead of startnointerferencethat will hide text or 
any content but still allow page references to link to that blank spot?

--Joel

On Wednesday, March 13, 2024 at 07:53:21 AM MDT, Joel via ntg-context 
 wrote:  
 
 I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \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
___
  
___
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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 Okay, I maybe made some progress. I traced the code back and back through the 
various documents and found I have some items inside:

\startnointerference\startnointerference
My intent is to have items that are "there" but invisible to viewers, taking up 
no space on screen, but treated as being present, so the index will still point 
to that particular page.
This solution seems to be what's causing the [entry not flushed] error in the 
index.
Is there another solution instead of startnointerferencethat will hide text or 
any content but still allow page references to link to that blank spot?

--Joel

On Wednesday, March 13, 2024 at 07:53:21 AM MDT, Joel via ntg-context 
 wrote:  
 
 I have some custom registers that I use to index some information. When 
compiled, it just prints [entry not flushed] instead of printing some of the 
page numbers.
I have tens of thousands of lines of code, so have no idea how to break the 
problem down to a minimal example. What does [entry not flushed] mean? What 
kind of feature in my document do I need to search for that might explain why 
this is appearing?

Here is the minimal code used in my index, as you see it isn't showing the 
error, so something else in the document is causing it:

 \setvalue{W3}{this is text for W3}


\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=3, 
pagenumber=yes, indicator=no]
%
\defineregister[learnedlong][compress=yes]
\setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2, 
pagenumber=yes, indicator=no]
%
\define[1]\learnedis{%
    \txt{} \getvalue{#1}
    \learnedshort{#1}
    \learnedlong{#1}
}
\define[1]\learned{%
    \textreference[textref#1]{\expanded{\currentstructuretitle}}
    \reference[ref#1]{}%
%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learned{W3}

    \startchapter[title=Standards]
  \placeregister[learnedlong]
    \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
___
  ___
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
___


<    1   2   3   4   5   6   7   8   9   10   >