[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] Why is this description environment not showing the correct title?

2024-05-05 Thread Joel via ntg-context

\definedescription[latexdesc][headstyle=bold, style=normal, align=flushleft, 
alternative=hanging, width=broad, margin=1cm]

\starttext

    \latexdesc{1540} some event happened
    \latexdesc{1541} some other event happened
    \latexdesc{1542} some event happened quite different

\stoptext


I found the above code (the first line) in the ConTeXt Wiki, as a way to create 
the equivalent of a desc environment from LaTeX. The items inside {} should be 
bold, then there is a gap before the next text.
I am using this to display a simple timeline.
Though the formatting looks perfect, very strangely when I compile it, it 
changes all of the dates to say "1540" (or whatever date was used first).
Why is it showing the wrong title on the desc environment?
--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 stop ConTeXt from thinking period is at the end of a sentence?

2024-05-04 Thread Joel via ntg-context
I noticed that some code is being rendered wrong, most especially apparent in a 
column environment where sometimes the text can get stretched a bit more to fit 
the column width nicer.

If a sentence says "They appeared between c. 1200 BCE and c. 1500 CE." it 
appears ConTeXt thinks that the period in "c." marks the end of a sentence. As 
such, when setting the text, sometimes it will give a large space between "c." 
and "1200 BCE".
How do I correctly tell ConTeXt that that period doesn't mark the end of a 
sentence, so shouldn't be given extra space afterwards?
--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 make superscript text match footnote mark formatting?

2024-04-27 Thread Joel via ntg-context
 Thank you! --Joel

On Saturday, April 27, 2024 at 12:08:13 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 27.04.2024 um 19:16:
> \starttext
>   test\high{1}test\footnote{some text}
> \stoptext
> 
> How can I create a superscript number that has exactly the same 
> formatting as a footnote, but which won't create a footnote. I tried 
> \high{}, which I believe should be the way to superscript text, but if 
> you compile this, you can see the first "1" and second "1" have entirely 
> different formatting. How do I make the first one have the same exact 
> formtating as the real footnote?

Footnotes apply the \tx style to the number in the running text and to 
get the same text size with \high you need \tx before the argument.

Another solution is to create your own \high command where you set the 
text size as default value but now you have to pass \txx as value 
because by default \high already uses style=\tx. When you now combine 
the default \tx from \high and the \tx from the footnote you get the 
\txx size (which is used in the custom \high command).

 begin example
\definehigh[fakenotesymbol][style=\txx]

\starttext

\startlines
test\footnote{\unknown}
test\high{\tx 1}
test\fakenotesymbol{1}
\stoplines

\stoptext
 end example

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

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


[NTG-context] How to make superscript text match footnote mark formatting?

2024-04-27 Thread Joel via ntg-context
\starttext
 test\high{1}test\footnote{some text}
\stoptext
How can I create a superscript number that has exactly the same formatting as a 
footnote, but which won't create a footnote. I tried \high{}, which I believe 
should be the way to superscript text, but if you compile this, you can see the 
first "1" and second "1" have entirely different formatting. How do I make the 
first one have the same exact formtating as the real footnote?
--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: 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: Why are ConTeXt-SBL endnotes empty?

2024-04-22 Thread Joel via ntg-context
 Changing location=none to location=text still left me with the bullet points 
appearing in a big list at the end of my chapter, but without any messages in 
them.

On Monday, April 22, 2024 at 07:54:39 AM MDT, Joel via ntg-context 
 wrote:  
 
 A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to 
compile. I'm forced to try again (due to some other issue with footnotes), and 
instead of compiling to error, it compiles, but the footnote's message ends up 
being empty. 
Why is it appearing empty? Is there a fix?

Here is a minimum working example:
\usemodule[publ-imp-sbl]
\startbuffer [bib]

@Article{na2006,
title={Volcanoes \word{of} New Mexico},
year={2006},
journal={New Mexico Earth Matters},
publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
volume={6},
number={1},
location={Socorro, New Mexico}
}

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl]

\setupnote[footnote][location=none]

\starttext

   \input knuth
    \cite[clark1989]

    \placenotes[footnote]

    
    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

\stoptext

--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
___
  ___
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 are ConTeXt-SBL endnotes empty?

2024-04-22 Thread Joel via ntg-context
A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to 
compile. I'm forced to try again (due to some other issue with footnotes), and 
instead of compiling to error, it compiles, but the footnote's message ends up 
being empty. 
Why is it appearing empty? Is there a fix?

Here is a minimum working example:
\usemodule[publ-imp-sbl]
\startbuffer [bib]

@Article{na2006,
title={Volcanoes \word{of} New Mexico},
year={2006},
journal={New Mexico Earth Matters},
publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
volume={6},
number={1},
location={Socorro, New Mexico}
}

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl]

\setupnote[footnote][location=none]

\starttext

   \input knuth
    \cite[clark1989]

    \placenotes[footnote]

    
    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

\stoptext

--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: 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] 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] 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] Is TIFF image no longer supported?

2024-04-14 Thread Joel via ntg-context
I have a document with PNG, JPG, and TIFF. When I try using 
\externalfigure[filename][frame=on, width=.\textwidth] it displays JPG and 
PNG fine, but the TIFF files don't render. Is TIFF not supported in 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] How to get an image to fill the maximum available space?

2024-03-29 Thread Joel via ntg-context
I have code like this:

    \placefigure[here, force]{my caption}{%        
\externalfigure[#1][frame=on, maxheight=1.2\textwidth, maxwidth=\textwidth]%
    }%
I need some images to appear in a book. I need them to keep their proper 
ratios, but scale up to the maximize the available space.
The image can't be more than \textwidth wide, and can't ever be more than 
1.2\textwidth high.
The problem I am getting with this code, and it does seem to be limiting the 
images to be not bigger than those two dimensions above, is some of the images, 
for reasons I can't understand, are appearing really tiny and aren't scaling up 
to fill as much space as is possible. I can't explain why this is 
happening--the images themselves are very very high resolution.
Is there any way to modify the code to make sure the image stretches up to be 
the biggest it can, without exceeding the sizes I've listed?
--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] 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: 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] 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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 I'm not understanding in a much much larger document how I sold this, as I've 
tired placing \dontleavehmode in different places, but no success. 

On Wednesday, March 13, 2024 at 04:46:54 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 13.03.2024 um 23:27:
> 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.

The message appears even without the external file.

> My code is so simple, I can't understand what I've typed wrong.

Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).

\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

\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: How to track down source of [entry not flushed] displaying in indexes?

2024-03-13 Thread Joel via ntg-context
 What is an anchor? Does that mean the index needs to me next to some items, 
like placed next to some text?

On Wednesday, March 13, 2024 at 04:46:54 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 13.03.2024 um 23:27:
> 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.

The message appears even without the external file.

> My code is so simple, I can't understand what I've typed wrong.

Indices need an anchor to be flushed. When you put \index entries 
between environments the next anchor appears at the start of a new 
paragraph (I used \dontleavehmode for this in the following example).

\starttext

\index{birds}
\index{insects}

\index{turtles}

\dontleavehmode % comment this line for [entry not flushed]

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


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

2024-03-13 Thread Joel via ntg-context
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
___


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

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

I have a document that has some structures like this:

\starttext

\startsection[title={Animals}]

\event{\input knuth }

\stopsection

\startsection[title={Books}]

\event{\input knuth }

\stopsection

\stoptext

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

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

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

\starttext

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

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

\stopsection

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

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

\stopsection

\stoptext





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

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


[NTG-context] How to print the book title and section title where \reference is located?

2024-02-06 Thread Joel via ntg-context
I have an extensive multi-book project. Each book has a nickname, like TB for 
"Textbook", "WB 1" for the "Workbook, Vol. 1":

TB -- 01_textbook.texWB 1 -- 03_workbook.texWB 2 -- 04_workbook.texWB 3 -- 
05_workbook.tex
WB 4 -- 06_workbook.tex
TG -- 08_teachersguide.tex
I have to prove to a government agency that the content meets several 
requirements, so I'm giving them a simple file that says something like 
"Requirement A is met in TB, "Cats", p. 11" basically letting the reader know 
its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm 
simply dropping in macros called "\requirementA" "\requirementB" on whichever 
page of whichever book demonstrates it meets the requirement, then the file 
will aquatically list the book, section, and page number by searching for that 
macro.

\define\requirementA{
    \reference[markerA]{This is a comment.}
}

\define\requirementB{
    \reference[markerB]{This is a comment.}
}

\define\requirementC{
    \reference[markerC]{This is a comment.}
}

\starttext

    \section{Cats}
        \requirementA
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Fish}
        \input knuth
        \input knuth
        \input knuth
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Frogs}
        \input knuth
        \requirementB
    
    \pagebreak
    
    \section{Markers}
    
        \startitemize
            \item Requirement A is met \at{page}[markerA].
            \item Requirement B is met \at{page}[markerB].
            \item Requirement C is met \at{page}[markerC].
        \stopitemize    
    
\stoptext



I have this sample code, but it only works for a single document, and only 
displays page number. I tried looking at the \about and other related command, 
but that requires giving a reference name and referring to the titles, not my 
dropped macro. How can I modify this to display a message like below, plus also 
scans the other files. *It only needs to reference the first found occurrence.*
Here is a sample message what the output should give:
"Requirement A is met in WB 3, "Bears", p. 33."
--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 stop

2024-01-27 Thread Joel via ntg-context
I have a document that uses ~40 different TABLE configurations, each with their 
own special requirements, such as these below, and in total, perhaps 2000 
tables appear in a file, using one of the configurations.

                        \setupTABLE[r][1][align=raggedleft]
                            \setupTABLE[c][1][width=.1\textwidth]
                            \setupTABLE[c][2][width=.33\textwidth]
                            \setupTABLE[c][3][width=.37\textwidth]
                            \setupTABLE[c][4][width=.1\textwidth]
                            \setupTABLE[c][5][width=.1\textwidth]
                            \setupTABLE[c][1,2,3,4,5][align=raggedleft, 
frame=off]
                            
%\setupTABLE[r][2,3,4,5,6,8,9,11,12,14][bottomframe=off]
                            \setupTABLE[r][1][bottomframe=on]
                            \bTABLE[split=yes]
                                \bTR\bTD {\it Lesson}        \eTD\bTD {\it 
Time} \\eTD\bTD {\it Date} \eTD\bTD {\it Page} \eTD\eTR
                            \eTABLE
What I've been finding is that previous settings on TABLES appearing earlier in 
the document is impacting later tables. For instance, if one has a frame to the 
right of column 1, then the next table seems to acquire this setting as well, 
even if it isn't expected to have any frames at all.

Note that each unique table is defined inside a macro.

How can I make these table settings only apply to the a specific table?

--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 input first n lines from file?

2023-12-16 Thread Joel via ntg-context
With the command `\input file`, I can input the entire contents of `file.tex`. 
Is there a way to limit it to the first n lines, for instance, something like 
`\input[10]` file would only input the first 10 lines from `file.tex` and 
ignore the rest of the lines.
--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
___


Re: [NTG-context] How to really force figure to appear "here"?

2023-05-21 Thread Joel via ntg-context
 Here, I've created an example that does just that. I want the figure to appear 
immediately after the bold text. Even if a lot of whitespace is placed and the 
figure appears on the next page, that is fine, but I don't want the next group 
of text to appear until *after* the figure. This is really confusing my readers.
\starttext
    \input knuth
    \input knuth

    {\boldface This is a short note about the picture. It should appear right 
after this.}
    \placefigure[here,force]{caption}{
        \externalfigure[1.jpg][width=\textwidth]
    }

    \input knuth
    \input knuth
    \input knuth
    \input knuth
    \input knuth
    \input knuth

\stoptext

--Joel

On Saturday, May 20, 2023 at 07:49:45 PM MDT, Joel via ntg-context 
 wrote:  
 
 I have been using \placefigure[here, force] to place some graphics, but its 
instead showing other text from the next section, then the picture. In testing, 
this is causing readers to be confused, as they expect to see a picture, but 
its somehow appearing two pages later. I don't care it it requires a huge blank 
area on the page before it, how can I make it so any text after 
\placefigure[here, force] doesn't appear before the figure?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : https://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to really force figure to appear "here"?

2023-05-20 Thread Joel via ntg-context
I have been using \placefigure[here, force] to place some graphics, but its 
instead showing other text from the next section, then the picture. In testing, 
this is causing readers to be confused, as they expect to see a picture, but 
its somehow appearing two pages later. I don't care it it requires a huge blank 
area on the page before it, how can I make it so any text after 
\placefigure[here, force] doesn't appear before the figure?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Is there a way to centrally add a list of indexed items to a sub category?

2023-05-14 Thread Joel via ntg-context

I have a document like this:

    \starttext
    \index{dogs}
    
    \index{cats}
    
    \index{flowers}
    
    \index{snails}
    
    \index{trees}
    
    \placeindex
    
    \stoptext
    
As I understand, if you use \index{animals+dogs}, it will place dogs as a 
sub-category of dogs.

Is there any way to control this centrally, for instance:

\addtosub[animals]{dogs, cats, snails}
\addtosub[plants]{flowers, trees}

Such a way would make it so \index{dogs} places an entry for "dog" under "d" 
and "animals --> dogs" under "a".
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to print all pages for a single index entry?

2023-05-07 Thread Joel via ntg-context
I have an index like this:

\starttext
\index{butterflies}\index{horses}\index{cows}
\placeindex

\stoptext
The placeindex will place every index.
Is there a way to say, display an index, but only for a specific single entry, 
or specific list of entries, e.g.
\placeindex[horses, cows] (would exclude butterflies from the index entries)
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to fix indexes displaying [entry not flushed] with hidden data?

2023-05-07 Thread Joel via ntg-context
I have a document that needs to place some "hidden" data. In other words, there 
is an entire \input file with an article, but it doesn't get rendered visibly. 
However, the indexes, registers, and bibliography need to still function as if 
it were displayed right there on the page.
It should be as if the data actually is all there, on a single page, but either 
compressed inside a single invisible pixel off or plain invisible to readers, 
not using any physical space on the page.

I tried two methods suggested at Stack Exchange for hiding the data:
1. \startnointerference
2. \setbox\scratchbox=\vbox{}
These both successfully seem to place the data there, without it actually being 
visible and bibliograhy entries still function fine.

The problem is, index and customer registers are getting confused:
When one goes to render the page numbers in \placeindex, it gets confused, 
displaying the message: "[entry not flushed]" instead of the page number. When 
I render this minimum working example below, the index is populated with [entry 
not flushed] instead of page numbers. Note that if I delete the test "This is 
invisible text."and recompile, I can get a successful render. The problem is, I 
have text that needs to remain invisible.

\starttext

    \index{birds}
    \index{insects}


        \startnointerference
            \index{spiders}
            \index{bears}
            \index{rabbits}
            This is invisible text.
        \stopnointerference
    
    \input knuth
    
    \placeindex
        
\stoptext


How to fix indexes displaying [entry not flushed] with hidden data?
--Joel

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

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


[NTG-context] How to show bibliography only for the chapter?

2023-05-06 Thread Joel via ntg-context
I am trying to place a bibliography at the end of the chapter, not the end of 
the whole document. I tried various code such as `criteria=bychapter` etc., but 
it will only show the entire bibliography for the whole document. How can I 
limit the list to the material falling within that chapter?

    \starttext
    \startchapter[title={Robots}]
    \input knuth    \cite[source1]
    \placelistofpublications[criteria=bychapter]
    \placelistofpublications[way=bychapter]    
\placelistofpublications[criteria=chapter]
    \stopchapter
    \stoptext

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

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


Re: [NTG-context] How to print the section number of a reference in ConTeXt?

2023-03-04 Thread Joel via ntg-context
 To explain more simply, I've put \pagereference[sample] somewhere in a 
document. Intead of just printing the page number that appeared with 
\at{page}[sample], I'd like to print the section or subsection title of where 
that appeared.
--Joel

On Saturday, March 4, 2023 at 09:18:19 AM MST, Joel via ntg-context 
 wrote:  
 
 I've set a \pagereference in a chapter, and want to print its chapter title 
and page number, ex.

"You can find more information in "Fish" on p. 1" (where "Fish" is the title of 
the chapter or section).
I've tried looking all through the wiki, thinking this was a basic feature, but 
couldn't get anything to work. I even tried my own custom macros, see below, 
but strangely, it won't give me the correct title, it tells me the title of the 
current chapter, instead of the title in which the reference was placed:


\define[1]\dropref{%    \textreference[#1]{\expanded{\currentstructuretitle}}
}


\starttext

\startchapter[title=Fish]

\dropref{hello}

\input knuth

\stopchapter

\startchapter[title=Whales]

You can more information at \at{page}[hello] in \at{chapter}[hello] or 
\about[hello].

\stopchapter

\stoptext
Strangely both at commands give the correct information, but \about doesn't.

How do I place a reference somewhere in a text, then later tell which chapter 
title and page number that reference appeared in?
--Joel


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : https://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to print the section number of a reference in ConTeXt?

2023-03-04 Thread Joel via ntg-context
I've set a \pagereference in a chapter, and want to print its chapter title and 
page number, ex.

"You can find more information in "Fish" on p. 1" (where "Fish" is the title of 
the chapter or section).
I've tried looking all through the wiki, thinking this was a basic feature, but 
couldn't get anything to work. I even tried my own custom macros, see below, 
but strangely, it won't give me the correct title, it tells me the title of the 
current chapter, instead of the title in which the reference was placed:


\define[1]\dropref{%    \textreference[#1]{\expanded{\currentstructuretitle}}
}


\starttext

\startchapter[title=Fish]

\dropref{hello}

\input knuth

\stopchapter

\startchapter[title=Whales]

You can more information at \at{page}[hello] in \at{chapter}[hello] or 
\about[hello].

\stopchapter

\stoptext
Strangely both at commands give the correct information, but \about doesn't.

How do I place a reference somewhere in a text, then later tell which chapter 
title and page number that reference appeared in?
--Joel


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

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


[NTG-context] How to place a page reference multiple times?

2023-03-01 Thread Joel via ntg-context
I need to report every chapter that a particular macro appeared. I would do 
this by placing `\pagereference[sample]` inside the macro definition, so 
whenever it is called, it marks the reference info. But I can't seem to get 
references to work with multiple reference locations marked, example:
\starttext

    You can find it at \at{page}[sample] in \at{chapter}[sample].

\chapter{Fish}

\pagereference[sample]

\input knuth

\input knuth

\pagebreak
\chapter{Whales}

\input knuth

\pagereference[sample]

\stoptext
(you can see in this example, it only finds `\pagereference[sample]` on page 1 
and ignores the second appearance.



Ideally, I need to be able to output something like, "See examples in Chapter 
3, 8, 19" (because those chapters contain a particular macro that I marked with 
\pagereference. Or, if even possible, see chapters 3 (p. 22), 8 (p. 40), and 20 
(though the first example is fine.
Is there a way to place a page reference multiple times, so multiple pages or 
chapter details will appear?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to add data from another PDF in index?

2023-02-26 Thread Joel via ntg-context
 Fantastic! Exactly what I needed. My publisher was gong to ask for the 
information of this index soon, so its great that already works!
--Joel

On Sunday, February 26, 2023 at 11:45:48 AM MST, Alan Braslau 
 wrote:  
 
 Hans needs to confirm, "In the next update..."

Test files (MWEs):

% index-1.tex

\setupinteraction[state=start]

\starttext
    test \index{entry    WB.1} \page empty \page
    test \index{another  WB.1} \page empty \page
    test \index{onemore  WB.1} \page empty \page
    test \index{whatever WB.1} \page empty \page
    test \index{common}        \page empty \page
    \placeregister[index]
\stoptext


% index-2.tex

\setupinteraction[state=start]

\defineregister[xedni]

\useregister[workbook][index-1][index][WB ]

\starttext
    test \index{onemore TB.1} \page
    test \index{another TB.1} \page
    test \index{entry  TB.1} \page
    test \index{common}      \page
    test \xedni{onemore TB.2} \page
    test \xedni{another TB.2} \page
    test \xedni{entry  TB.2} \page
    test \xedni{common}      \page
    \placeregister[index,xedni,workbook]
\stoptext



This seems to work well - I have applied it to a long and complicated
multi-volume book project to great success!

We need to thank Hans for the quick implementation.

Alan



On Fri, 24 Feb 2023 05:43:01 +0000 (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> 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{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Can ConTeXt display a simple itemized list as a comma-separated list?

2023-02-25 Thread Joel via ntg-context
I have a list like this:
\startitemize[1]\item fish\item eggs\item milk\stopitemize
Is there any command in ConTeXt to make this display the items as a 
comma-separated list, like this:
fish, eggs, milk
Or a semi-colon-separated list?
fish; eggs; milk
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to add data from another PDF in index?

2023-02-23 Thread Joel via ntg-context
I am making a textbook and workbook set.
I have this custom index using this code, in both the textbook and workbook:
%
\defineregister[learnedshort][compress=yes]
\setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2, 
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{%
    \learnedshort{#1}
    \learnedlong{\getvalue{#1}}
}

\starttext

\learnedis{blah blah}

\input knuth

\learnedis{some more}


    \startchapter[title=Standards]
        \placelearnedshort
    \stopchapter
    
\stoptext


My question is, can I have references to the Workbook page numbers in the 
textbook? And visa-versa?

For instance, the Textbook index currently looks like this:
-
Standards
blah blah 1
some more 2
--
With the data in the Workbook it might look like this:
 Standards
blah blah 1, WB: 1, 3-8

some more 2, WB: 8-9
yet more WB: 10, 12

--
Is this possible to merge index information like this?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to create multi-line headers and footers?

2023-01-29 Thread Joel via ntg-context
I am creating a template for a 1-page newsletter.
At the top of every page is a huge title, below which is a block with a brief 
introduction to the newsletter. The body is just 200-300 words each issue--I 
edit it such that all of the content fits on just one-side, one page. Finally, 
in the footer, is contact information and some other closing details.

==TITLE <-- big title
 <-- introduction paragraph

==
 <-- body text
--== <-- message in footer
==

I tried placing that all into a macro called "\introduction" then calling with 
this 

\setupheadertexts[\introduction]
It seems when placing the macro inside \setupheadertexts, the text is reduced 
to a single line. Any code involving \frames{} doesn't seem to work normally. 
Its all compressed to a single line, then centered.
How can I put a mult-line frame or multi-line text in the headers and footers?
--Joel

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

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


Re: [NTG-context] Can ConTeXt print specific paragraph and sentences from an input file?

2023-01-29 Thread Joel via ntg-context
I've tried to keep all of the input files entirely plain text, as much as 
possible. The exception is two custom macros used to mark citations that are in 
the text, \turabian{}{}{} and \ibid{}{}{}. I could find no way of getting 
around including that in the text, as legally I must include the citations. The 
rest of the text is plain text with no other ConTeXt markup, or at leave hardly 
any.
--Joel

   On Thursday, January 26, 2023 at 11:44:07 PM MST, Hans Hagen via ntg-context 
 wrote:  
 
 On 1/27/2023 4:22 AM, Joel via ntg-context wrote:
> Assuming I have an input file with an essay:
> 
> \starttext
> 
> \input essay
> 
> \stoptext
> 
> 
> Is there any command to tell ConTeXt to print a specific sentence, e.g. 
> the first sentence from paragraph 2, or the last sentence from paragraph 
> 1, etc?
depends on the kind of input, coding etc .. how reliable is is to 
recognize a sentence and such, but given that tex is a programing 
environment all is possible in the end

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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : https://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Can ConTeXt print specific paragraph and sentences from an input file?

2023-01-26 Thread Joel via ntg-context
Assuming I have an input file with an essay:
\starttext
\input essay
\stoptext

Is there any command to tell ConTeXt to print a specific sentence, e.g. the 
first sentence from paragraph 2, or the last sentence from paragraph 1, etc?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Why won't custom indexes work when the value comes from \getvalue?

2023-01-21 Thread Joel via ntg-context
I setup a custom index like this (see minimum example code below):
The problem is, when I try to create an index entry, using \setcoreidea, but 
place \getvalue inside, it won't render, ex.: \setcoreidea{\getvalue{secret1}}
As you can see in this sample code, \setcoreidea will work fine, but when 
\getvalue{} is placed inside, it can't find the value.

Any suggestions?
--Joel


\defineregister[coreidea][compress=yes]\setupregister[coreidea][style=sansbold, 
textstyle=slanted, n=2, pagenumber=yes, indicator=no]

\define[1]\setcoreidea{%
    \coreidea{#1}%
}

\setvalue{secret1}{this won't work}

\starttext

%

\setcoreidea{this works}

\input knuth
\input knuth
\input knuth
\input knuth


\setcoreidea{\getvalue{secret1}}

        \startchapter[title=Core Ideas]
            \placecoreidea
        \stopchapter
\stoptext


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

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


[NTG-context] Is the Society of Biblical Literature (SBL) style files for ConTeXt incompatible with \setupinteraction[state=start]?

2023-01-15 Thread Joel via ntg-context
When I am using the SBL ConTeXt files for citations, if I add a line 
`\setupinteraction[state=start` my code starts complaining:
Undefined control sequence \currentbtxloctext 

 \16>:btx:sbl:cite:inline 
    #1->\fastsetup {\s!btx :\s!cite :concat}\fastsetup 
{btx:sbl:cite:lefttext}\begingroup \letbtxparameter {punct}\empty \def 
\currentbtxcitealternative {inline}\def \currentbtxcategory {\btxfield 
{category}}\def \currentbtxloctext 
    {\btxparameter {loctex
 \normalexpanded 
    \Word {\fastsetup {btx:sbl:cite:inline}
    }\doif {\btxparameter {righttext}}{\empty } {\btxperiod }
 \strc_constructions_register_yes 

...
Is this package incompatible with interaction?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Why does \doifsomething think there is content?

2023-01-15 Thread Joel via ntg-context
I am creating a book that presents readers with a list of recommended materials.
If materials are listed, then its displayed under the \subject{Materials} 
heading in a simple itemized list.
I'm using \doifsomething{} to check if any items are listed.
The problem I'm having is, when fed a blank macro, `\define\needsoven{}` it 
thinks there is content, so it displays the "Materials" heading, but an empty 
list. I have a custom macro that determins "if oven is needed" independent of 
these other items. So I need  `\define\needsoven{}` to be regarded as nothing.
How can I get \doifsomething{} to think \define\needsoven{} is an empty value?
--Joel
My minimal working example is below:
\define\needsoven{}
\define[1]\materialsneeded{%
        \doifsomething{#1}{
            \subject{Materials}
                \startitemize
                    #1
                \stopitemize
        }        
}

\starttext

    \chapter{Recipe 1}
        \materialsneeded{\needsoven}
        
        \subject{Instructions}
        
            Spread peanut butter on sandwich.
        
    \chapter{Recipe 2}
        
        \materialsneeded{\item pizza cutter \item stove}
        
        \subject{Instructions}
        
            Preheat oven to 450 degrees F.
            
\stoptext


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

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


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

2022-12-05 Thread Joel via ntg-context
 Thanks so much! It took some work for me to figure out how to make it work, 
but it now works great!
--Joel

On Monday, December 5, 2022 at 05:15:49 AM MST, Hans Hagen via ntg-context 
 wrote:  
 
 On 12/4/2022 11:30 PM, Joel via ntg-context wrote:
> I can use this code to display page 5 from a PDF:
> 
> \externalfigure[filename.pdf][page=5]
> 
> I am making a teacher's guide for a workbook (workbook.pdf). I need to 
> be able to display on the page all pages of a particular section.
> 
> The teacher's guide uses the same section titles as the workbook, e.g.:
> 
> 17-A: Title
> 17-B: Title
> 
> In other words, there is 1:1 pairing of section titles in the teacher's 
> guide and the workbook.
> 
> Is there any way to tell ConTeXt to display all of the pages for a 
> particular section?
> 
> \externalfigure[filename.pdf][section=17A]
prototype attached (first process crap, then load)

Hans

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : https://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2022-12-04 Thread Joel via ntg-context
I can use this code to display page 5 from a 
PDF:\externalfigure[filename.pdf][page=5]I am making a teacher's guide for a 
workbook (workbook.pdf). I need to be able to display on the page all pages of 
a particular section.
The teacher's guide uses the same section titles as the workbook, e.g.:
17-A: Title
17-B: Title

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

Is there any way to tell ConTeXt to display all of the pages for a particular 
section?
\externalfigure[filename.pdf][section=17A]
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Why are my captions overlapping next text in combinations?

2022-11-25 Thread Joel via ntg-context
I have some combinations used throughout my document like this:
\starttext
   \startcombination[4*2]            {%
                \framed[width=.25\textwidth, height=.25\textwidth]{}%
            }{%
                \strut word \\ \thinrule\hairline\hairline%
            }%
        \stopcombination    \input knuth

\stoptext
This makes a box, then displays a word underneath, and then some blank lines.
The problem I'm having is many times the caption text is covering up whatever 
appears after. In this minimal example, I tried showing the problem, but 
somehow this is rendering find, not covering the \input knuth text.
Also, if I add more more items to the combination, the second row appears above 
the first row!

My document is rather complex, so I couldn't find a way to simplify it enough 
to get a minimal example to reveal the problem that is appearing.

Any ideas what might be causing the caption text to overlap and cover whatever 
appears after it?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to break margin notes across page breaks?

2022-11-15 Thread Joel via ntg-context
How can I allow margin text to break across the page breaks?
I have a document with many \inmargin code.
The problem I'm finding is that sometimes I have a lot of items in the margin. 
I hope this margin details can break across the page and continue onto the next 
page. The problem is instead it just runs off the print boundaries of the page. 
See this sample code for an example:
\starttext

\input knuth

\inmargin{\input knuth }
\input knuth

\input knuth

\input knuth

\input knuth

\input knuth

\input knuth


\stoptext

How can I allow margin notes to break across pages instead of running off the 
page boundaries?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to make a block of text narrower?

2022-11-15 Thread Joel via ntg-context
I need to make a section of text in my document narrower, about .\textwidth.
Basically the text has normal alignment and everything, just instead of filling 
\textwidth, its compressed so there is a larger white space to the right.
I've tried dozens of things, but cannot get a good solution, every solution has 
strange other effects.
The best thing that has worked so far is \setuplayout[width=3in]

But the problem with this solution is then I cannot get it to return to the 
original settings afterward.

--Joel

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

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


[NTG-context] How to stop enumerated tabulate environments from shifting to the right?

2022-11-12 Thread Joel via ntg-context
When I place a tabulate environment inside itemize, it indents and the entire 
table is shifted to the right about 1/2".
\starttext
    \input knuth

        \startitemize[n]
            \item x
        \stopitemize

        \startitemize[n]
            
\starttabulate[|lp(.1\textwidth)|cp(.35\textwidth)|cp(.2\textwidth)|cp(.35\textwidth)|]
                \NI \NC \NC \NC\NR
                \NC \NC \NC \NC\NR
            \stoptabulate
        \stopitemize
        
        \input knuth\stoptext

See this code which when compiled, the first itemize numbers line up with the 
left edge of text, but the one with tables indents. It also seems to spill into 
the right margin.

How can I stop enumerated table environments from indenting?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

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

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

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

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

Good luck!
Gavin


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

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

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


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

2022-10-30 Thread Joel via ntg-context
I have a very large document that, when compiled, produces a PDF, but reports 
the error "mtx-context | fatal error: return code: 1".
The PDF can open, but after about 100 pages in, the content starts appearing 
all in the wrong place.
Usually when I compile, it says there is an error, and I just scroll up until I 
find the details. I've scrolled through the output, and *.log file, but cannot 
see anything that looks like an error.
It could be that just because the document is so long (about 1200 pages), I 
can't find the error among the huge logs, but I looked through them all 
carefully.

How can I isolate the error when ConTeXt isn't showing it? Is there some 
setting for showing only errors, or revealing more details about an error?

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

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


[NTG-context] How to make a row of text have vertical centering in tabulate environment?

2022-10-24 Thread Joel via ntg-context
I have a simple tabulate environment like this:

\starttext

    \starttabulate[|p(.45\textwidth)|cp(.1\textwidth)|p(.45\textwidth)|]    
        \NR
                \HL
                \NC Cause    \NC \NC Effect    \NC\NR
                \HL
                \NC            \NC \NC            \NC\NR
                 \NC   text a     \NC text b \NC       \input knuth     
\NC\NR %<-- vertically center this row
                \HL
            \NR
        \stoptabulate

\stoptext
I'd like to vertically center the content in the one marked row. By default, 
they seem to place each cell aligned to the top, but how can I adjust them 
vertically so the text is vertically centered just in specific rows?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to set the vertical spacing between a sequence of images?

2022-10-24 Thread Joel via ntg-context
I have code like this which randomly pulls a page from `comic2.pdf` and 
displays it, scaled to fit \textwidth, then displays four more random pages 
afterwares.

\starttext    \dorecurse{5}{
            \placefigure[force, 
none]{}{\framed[frame=off]{\externalfigure[comic2.pdf][page=\randomnumber{1}{34},
 width=\textwidth]}}
        }\stoptext
The problem is I need to adjust the vertical space between the images. It seems 
to be set to some lineheight or such, but I need the distance between each 
image to be at 1/50th or 0.02 of \textwidth. ...though the last image can have 
the ordinary gap afterwards.
How can I se the vertical spacing between this sequence of image to 
0.02\textwidth?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to make something appear to the right of every paragraph?

2022-10-13 Thread Joel via ntg-context
 These both work great, but do that for the whole document? Is there a way to 
restrict it to only apply the lines to some parts of the file, not every single 
paragraph?
Thanks!
--Joel

On Monday, October 10, 2022 at 04:57:07 PM MDT, Max Chernoff 
 wrote:  
 
 Hi Joel,

On Mon, 2022-10-10 at 12:46 +, Joel wrote:
>  Hello Max,
> It is preferred if the solution is just three lines per paragraph,
> rather than some content parallel to the text

A Lua callback solution:

  \startluacode
      -- Constants
      RULE_OFFSET    = tex.sp "1em"
      RULE_THICKNESS = tex.sp "0.4pt"
      RULE_LENGTH    = tex.sp "3cm"
  
      -- Callback
      function userdata.lines(head)
          if status.output_active or
              tex.nest.ptr > 1
          then
              return head
          end
  
          local i = 0
          for n in node.traverseid(node.id "hlist", head) do
              i = i + 1
              if i > 3 then
                  break
              end
  
              local offset = node.new "glue"
              offset.width = RULE_OFFSET
              node.slide(n.list).next = offset
  
              local rule = node.new "rule"
              rule.width = RULE_LENGTH
              rule.height = RULE_THICKNESS
              rule.depth = 0
              offset.next = rule
          end
  
          return head
      end
  
      nodes.tasks.appendaction(
          "finalizers",
          "after",
          "userdata.lines"
      )
  \stopluacode
  
  \parskip=\baselineskip
  
  \starttext
      One line paragraph
  
      Two line paragraph \\
      Two line paragraph
  
      Three line paragraph \\
      Three line paragraph \\
      Three line paragraph
  
      Four line paragraph \\
      Four line paragraph \\
      Four line paragraph \\
      Four line paragraph
  
      \samplefile{bryson}
  
      \samplefile{knuth}
  \stoptext

An \everypar solution:

  \appendtoks%
      \vbox to 0pt{%
          \dorecurse{3}{%
              \rlap{%
                  \hskip\dimexpr\hsize+1em%
                  \vrule height 0.4pt width 3cm%
                  \relax%
              }%
          }%
      }%
  \to\everypar
  
  \parskip=\baselineskip
  
  \starttext
      One line paragraph
  
      Two line paragraph \\
      Two line paragraph
  
      Three line paragraph \\
      Three line paragraph \\
      Three line paragraph
  
      Four line paragraph \\
      Four line paragraph \\
      Four line paragraph \\
      Four line paragraph
  
      \samplefile{bryson}
  
      \samplefile{knuth}
  \stoptext

Neither of these solutions are great though. Both of these solutions are
pretty low-level, so there's presumably a more ConTeXt-y way of doing
this.

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

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


Re: [NTG-context] How to make something appear to the right of every paragraph?

2022-10-13 Thread Joel via ntg-context
 When I use the code given, it compiles and displays fine. But when I try 
replacing \everypar with \EveryPar, it halts during compiling with this 
complaint:
"A number should have been here; I inserted '0'. (If you can't figure out why I
needed to see a number, look up 'weird error' in the index to The TeXbook.)
mtx-context | fatal error: return code: 1

"

On Monday, October 10, 2022 at 09:58:11 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Max Chernoff via ntg-context schrieb am 11.10.2022 um 00:57:
> Hi Joel,
>
> On Mon, 2022-10-10 at 12:46 +, Joel wrote:
>>  Hello Max,
>> It is preferred if the solution is just three lines per paragraph,
>> rather than some content parallel to the text
> A Lua callback solution:
>
> [...]
>
> An \everypar solution:
>
>    \appendtoks%
>        \vbox to 0pt{%
>            \dorecurse{3}{%
>                \rlap{%
>                    \hskip\dimexpr\hsize+1em%
>                    \vrule height 0.4pt width 3cm%
>                    \relax%
>                }%
>            }%
>        }%
>    \to\everypar

You can use the \EveryPar register but \everypar is off limits.

Wolfgang

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

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


[NTG-context] How to get line numbering to match block quote position?

2022-10-10 Thread Joel via ntg-context
I have some text that is a block quote, but also has line numbering:

    \setuplinenumbering[step=3]    \starttext
    \startblockquote
            \startlinenumbering
                \input knuth
            \stoplinenumbering
        \stopblockquote \stoptext
The line numbering is appearing in the left margin as if the text were not a 
block quote. How can I tell it to move the numbering closer to the text, since 
the text is not up against the margin, being block quote text?
--Joel___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to make something appear to the right of every paragraph?

2022-10-10 Thread Joel via ntg-context
 Hello Max,
It is preferred if the solution is just three lines per paragraph, rather than 
some content parallel to the text...I'll be modifying whatever solution to fix 
a bunch of other situations (e.g. display a box next to each paragraph).

--Joel

On Monday, October 10, 2022 at 12:24:03 AM MDT, Max Chernoff 
 wrote:  
 
 Hi Joel,

> I'd like to add some area for readers to write in the margins of some
> text. This would leave three lines, like this to the right of the
> text.

Is it okay if there are rules continuously down the right column? If so,
this is fairly simple to do with layers/backgrounds + MetaFun. 

If you want for there to be exactly three rules per paragraph, then that
is more complicated. I can think of some bad solutions (\everypar, Lua
callbacks), but I'll leave it to someone else to think of a good
solution.

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

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


[NTG-context] How to make something appear to the right of every paragraph?

2022-10-09 Thread Joel via ntg-context
I'd like to add some area for readers to write in the margins of some text. 
This would leave three lines, like this to the right of the text.

__

The passage would take up about the left 60% of the text and the margin note 
space about 30% of textwidth, so no need to use the margins.
Though its easy for me to implement this code using some \thinrules and 
manually dropping macros in the text, is there some way ConTeXt can be told to 
just add them to right of every paragraph (at the start of the paragraph)?
Sample:
This is some text  
that is written in        
the passage and      you can see the th-ree lines to the right.The text 
in the para-graph continues eventhough there arejust three lines tothe right.

Here is another par-    agraph.                         
          
Here is yet another    paragraph. You can    see it also has 
the three liens.

This is just for a segment of the book, not every paragraph in the book.

--Joel

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

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


[NTG-context] How to reset settings in setuphead back to defaults?

2022-08-21 Thread Joel via ntg-context
I have some settings like this, which define the part, chapter, and section 
titles within a file that contains all of my common settings for all files.

\definepagebreak[chapterpagebreak][yes, right]

\setuphead[part][style=\sse, placehead=yes, expansion=yes]
\setuphead[chapter][style=\sse, placehead=yes, expansion=yes, page=yes,
                        numbercommand=\groupedcommand{}{\blank[1cm]},
                        alternative=middle,
                        numberstyle=ssl,
                        numbercolor=white,
                        strut=yes,
                        page=chapterpagebreak,
                        header=empty]
\setuphead[subject][style=\sse, placehead=yes, expansion=yes, page=yes,
                        numbercommand=\groupedcommand{}{\blank[1cm]},
                        alternative=middle,
                        numberstyle=ssl,
                        numbercolor=white,
                        strut=yes,
                        page=chapterpagebreak,
                        header=empty]
A problem I have is I need one document to ignore all the above, basically 
pretend each of these is reset to defaults. Is there a way to rest all of the 
above items to default settings quickly?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to print a random whole number between x and y?

2022-06-17 Thread Joel via ntg-context
I was using this code for a long time in my document. I have a PDF with 10 
pages, and this would randomly display one of those pages:
    \ctxlua{math.randomseed( os.time() )}
        
        \getrandomnumber \n {1} {10}
    
        \placefigure[force, 
none]{}{\framed[frame=off]{\externalfigure[comic.pdf][page=\n, 
width=\textwidth]}}
    
For reasons I cannot understand, after an update of ConTeXt, the code no longer 
works, though trying to reduce it to a minimum working example it works, so I 
cannot figure out what is wrong in my code.
Undefined control sequence

 ...domseed( os.time() )} \par \getrandomnumber \n 
  {1} {10} \par \placefigure...
\doifsomething #1->\edef \m_syst_string_one {#1
   }\ifx \m_syst_string_one \emp...
\event ... {#6}{{\bf #6}} \par \doifsomething {#7}
  {#7 } \par \doifsomething ...

Is there another solution for generating a random whole number between 1 and 10?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Why are some images rendered very tiny?

2022-06-15 Thread Joel via ntg-context
I wrote this macro to display images in my book. It should place the image to 
the left, filling ~50% of \textwidth, then the caption is to the right.

\setupcaption[location=right, minwidth=.5\textwidth]
\define[4]\figureis{%
    \placefigure{#2, Courtesy #3, photo no. 
#1\nocite[#4]{}}{\externalfigure[#1][maxheight=.7\paperheight, 
maxwidth=.5\paperwidth, minwidth=.5\paperwidth]}
}
#1 = filename, other variables are used for reference/credit details.

The problem is, somehow some images are inexplicably displayed very tiny on the 
page. I check the image file and they are not small, but somehow is rendered 
small with the code above.

What is wrong in my code?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to define a section title, after the section title appears?

2022-06-12 Thread Joel via ntg-context
I have a document with conditionally-generated content.

There are some situations when I need the section title to change according to 
the content displayed within that section.

For instance, the 14th section that appears in *every* chapter is either called 
"Cause and Effect" if the conditions decide to place macros \altMa, \altMb, or 
\altMc inside, but becomes called "Compare and Contrast" if one of a dozen 
other macros are pladed there.

- The macros are defined in an entirely different macros.tex file.
- The whole document is in a recurse loop, so \recurselevel or \chaptertitleis 
can give the current chapter number.

I tried defining chapter titles inside the macros, 
`\setvalue{title\recurselevel}{Cause and Effect}`, but 
\getvalue{title\recurselevel}` couldn't find the defined value.
I tried just defining in each macro \define\thesectiontitleis{Compare and 
Contrast}, but that only affects things AFTER the macro is called, so the wrong 
titles appear.

How do I very simply make a section title change according to what content is 
inside it?
--Joel

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

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


[NTG-context] Table of Contents empty for unknown reason

2022-06-12 Thread Joel via ntg-context
I need to display a table of contents, but only displaying chapters.

Here is my minimum working example:
\starttext
    \startfrontmatter
        \startchapter[title={Contents}]
            \placelist[chapter]
        \stopchapter
        \completecontent
    \stopfrontmatter
    \startbodymatter
    \startchapter[title={Title 1}]
    \input knuth
    \stopchapter
    \stopbodymatter

\stoptext

For reasons I don't understand, both  \placelist[chapter] and \completecontent 
display the title, but are otherwise empty of contents. I believe the code was 
working before an update. I used ConTeXt live though and confirmed this code 
even doesn't work there.
Why isn't it rendering the table of contents?
--Joel

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

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


[NTG-context] How to install the ConTeXt-SBL module?

2022-05-29 Thread Joel via ntg-context
I had https://github.com/jjmccollum/context-sbl this module working fine, but 
ran and update, and somehow it deleted my extra files. I can't figure out how I 
was able to get it working in the first place--I had just copied all the files 
to a folder somewhere.
What is the correct way to install an unofficial ConTeXt module, such as this 
one?

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

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


Re: [NTG-context] How to include a file with table data within a table?

2022-05-29 Thread Joel via ntg-context
 Adding the brackets + file name also didn't work.
--Joel

On Sunday, May 29, 2022, 11:33:48 AM MDT, Henning Hraban Ramm via 
ntg-context  wrote:  
 
 Did you try \input{file.tex} ?
(Just an idea, didn’t try.)

Hraban

Am 29.05.22 um 18:34 schrieb Joel via ntg-context:
> After a recent update to ConTeXt, the code no longer seems to allow me 
> to \input a file within a table:
> 
> \starttext
> \starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
>      \HL
>          \NC {\bf Term} \NC {\bf Definition} \NC\NR
>      \HL
>          \input test2.tex %<here you see I have input a file inside 
> the table
>      \HL
> \stoptabulate
> \stoptext
> 
> File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
> 
> I also tried defining a macro earlier in the document...
> 
> \define[2]\tablewordis{%
>      \NC \NC \NC\NR
>      \NC #1 \NC #2 \NC\NR
> }
> 
> ...then placing that in test2.tex, e.g.:
> 
> \tablewordis{my word}{my definition}
> 
> I get the error: " The file ended when scanning an argument."
> 
> Before the update, this code worked fine.
> 
> How can I \input a file while inside a table environment, as above?
> 
> I have a document that has 100s of these inputs in my code, and now 
> nothing will compile.
> 
> Thanks,
> 
> --Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : http://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to include a file with table data within a table?

2022-05-29 Thread Joel via ntg-context
After a recent update to ConTeXt, the code no longer seems to allow me to 
\input a file within a table:
\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
    \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR                
    \HL
        \input test2.tex %

[NTG-context] Does writing \emdash versus writing "—" in the source file impact the displayed output?

2022-05-18 Thread Joel via ntg-context
I have been using \endash, \emdash, and \figuredash in place of the various 
types of dashes in my document, \quotation{} around quotes, etc. so basically 
the only really punctuation appearing in the tex file are periods, commas, 
semi-colons, colons, apostrophes, and question-marks. The problem I have is 
when copying to a tool like Grammarly for grammar checks, these special symbols 
throw off the grammar-checking tools.

Does ConTeXt render and display these punctuation differently when I write them 
in the coded form, versus simply writing in the unicode directly?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to place "Content" and other chapter-level titles the same vertical distance from the top?

2022-05-07 Thread Joel via ntg-context
I created a chapter title style with a large number telling the chapter number, 
and below it the title of the chapter.
It looks like this:
-    1   <--really big chapter 
number=== <-- there is a border created by a background image between 
these
    How to keep  <--chapter title
    fish
This is the article <-- the article begins
about how to keepfish -

\definefontsize[a]%
\definefontsize[b]%
\definefontsize[c]%
\definefontsize[l]%
\setupbodyfontenvironment[default]%
    [%
        a=1.200,
        b=1.440,
        c=1.728,
        l=8.916
    ]%
%

\setuplabeltext[chapter=\strut]
\setuphead[chapter][style=\ssc,placehead=yes,expansion=yes,page=yes,
numbercommand=\groupedcommand{}{\blank[1cm]},
alternative=middle,
numberstyle=ssl,
numbercolor=green,
strut=yes]

\starttext

    \completecontent
    
    \chapter{Test}
        \input knuth

    \chapter{Test}
        \input knuth

\stoptext
The problem I'm facing, is anytime a chapter title is called, such as "Content" 
in complete content, or something in the appendix, such as one of the indexes, 
no number is printed above, so the vertical distance from the top of the page 
to the top of the chapter title changes. I need these to be consistent, as 
there is a background image, with vertical lines.
Basically, if I call \chapter{}, it appears perfectly aligned vertically on the 
page, with no other settings. But when calling \completecontent or a similar 
title that won't get a number, because the number isn't placed, it is 
vertically higher on the page, but I need it to be printed the same height, as 
it it had an invisible number.
I've tried adding strut (the code has it in two places), but don't know if I've 
used it appropriately, and it didn't solve the problem.
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How do I define a smallcaps font?

2022-04-25 Thread Joel via ntg-context
 Replacing \smallcaps with \sc fixed it. I had assumed they were synonyms---the 
same as \bf vs \boldface, \it vs \italicface, but it seems they are different 
entirely?
Thanks!
--Joel

On Sunday, April 24, 2022, 11:19:10 AM MDT, Henning Hraban Ramm via 
ntg-context  wrote:  
 
 Am 24.04.22 um 16:21 schrieb Joel via ntg-context:
> I have a font that already comes with a smallcaps variant.
> 
> How do I define it?
> 
> I've tried the following, which I think should work from the 
> documentation I've seen, but doesn't:
> 
> 
> \starttypescript[serif]                            [garamond]
>      \definefontsynonym[Serif]                  
>   [file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
>      \definefontsynonym[SerifBold]              
>   [file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
>      \definefontsynonym[SerifItalic]              
>   [file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
>      \definefontsynonym[SerifBoldItalic]          
>   [file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
>      \definefontsynonym[SerifCaps]              
>   [file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
> \stoptypescript
> 
> \starttypescript[sans]                            [garamond]
>      \definefontsynonym[Sans]                  
>   [file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
>      \definefontsynonym[SansBold]              
>   [file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
>      \definefontsynonym[SansItalic]              
>   [file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
>      \definefontsynonym[SansBoldItalic]          
>   [file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
>      \definefontsynonym[SansCaps]              
>   [file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
> \stoptypescript
> 
> \starttypescript[garamond]
>      \definetypeface[garamond]                  
>   [rm][serif][garamond][default]
>      \definetypeface[garamond]                  
>   [ss][sans][garamond][default]
>      \definetypeface[garamond]                  
>   [mm][math][modern][default]
> \stoptypescript
> 
> \starttext
> 
>      This is regular text.
> 
>      {\smallcaps This should be in smallcaps.}
> 
>      {\WORD This should be regular text, but capitalized, not really 
> smallcaps.}
> 
> \stoptext

SerifCaps etc. works with the traditional \sc, don’t know about \smallcaps.

Are you sure your fonts are found?

mtxrun --script fonts --list --all --pattern=EBGaramond


If your regular OpenType font contains smallcaps, try:

\definefontfeature[mysmallcaps][default][
  smcp=yes, % smallcaps
  script=latn,
]

\starttypescript [serif] [garamond] [name]
...
\definefontsynonym [SerifCaps][EBGaramond-Regular][features=mysmallcaps]
...


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : http://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How do I define a smallcaps font?

2022-04-24 Thread Joel via ntg-context
I have a font that already comes with a smallcaps variant.
How do I define it?
I've tried the following, which I think should work from the documentation I've 
seen, but doesn't:

\starttypescript[serif]                            [garamond]
    \definefontsynonym[Serif]                    
[file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
    \definefontsynonym[SerifBold]                
[file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
    \definefontsynonym[SerifItalic]                
[file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
    \definefontsynonym[SerifBoldItalic]            
[file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
    \definefontsynonym[SerifCaps]                
[file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
\stoptypescript

\starttypescript[sans]                            [garamond]
    \definefontsynonym[Sans]                    
[file:/home/joel/.fonts/12/EBGaramond-Regular.otf]
    \definefontsynonym[SansBold]                
[file:/home/joel/.fonts/12/EBGaramond-Bold.otf]
    \definefontsynonym[SansItalic]                
[file:/home/joel/.fonts/12/EBGaramond-Italic.otf]
    \definefontsynonym[SansBoldItalic]            
[file:/home/joel/.fonts/12/EBGaramond-BoldItalic.otf]
    \definefontsynonym[SansCaps]                
[file:/home/joel/.fonts/13/EBGaramond12-AllSC.otf]
\stoptypescript

\starttypescript[garamond]
    \definetypeface[garamond]                    [rm][serif][garamond][default]
    \definetypeface[garamond]                    [ss][sans][garamond][default]
    \definetypeface[garamond]                    [mm][math][modern][default]
\stoptypescript

\starttext

    This is regular text.

    {\smallcaps This should be in smallcaps.}

    {\WORD This should be regular text, but capitalized, not really smallcaps.}

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

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


[NTG-context] Why can I no longer place \input inside table after update?

2022-04-23 Thread Joel via ntg-context
After I ran an update on ConTeXt, my code gets an error:
\starttext
\starttabulate[|p(.3\textwidth)|p(.7\textwidth)|]
    \HL
        \NC {\bf Term} \NC {\bf Definition} \NC\NR                
    \HL
        \input test2.tex
    \HL
\stoptabulate
\stoptext
File test2.tex contains "\NC {\bf Term} \NC {\bf Definition} \NC\NR".
I also tried defining a macro earlier in the document...
\define[2]\tablewordis{%
    \NC \NC \NC\NR
    \NC #1 \NC #2 \NC\NR
}
...then placing that in test2.tex, e.g.:
\tablewordis{my word}{my definition}

I get the error: " The file ended when scanning an argument."
Before the update, this code worked fine.
How can I \input a file while inside a table environment, as above?
Thanks,
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to create a more human-readable syntax for displaying workbook activities?

2022-04-18 Thread Joel via ntg-context
I am creating a student workbook. There are ~30 chapters, each containing ~20 
activities, called "Activity A", "Activity B", and so on.

The `workbook.tex` itself uses a recurse function, so it prints chapter 1-30. 
The reason I use this, is if I need to do a fast test of the code, I can 
compile a specific range of chapters, not the whole workbook.

\define\activityA{}
\define\activityB{}

\dostepwiserecurse{1}{30}{1}{

    \chapter{\recurselevel}
        \activityA
        \activityB
}

\activityA prints the workbook activity "Activity A".
\activityB prints the workbook activity "Activity B".

The problem comes in that some activities have varied versions. Just as an 
example, "Activity C might be a crossword puzzle in some chapters, but a word 
search in other chapters. My poor solution has been to use registercyclist:

\define\altCa{print a crossword}
\define[3]\altCb{print a word search}
\registercyclelist{activityClist}{\altCa, \altCb{}{}{}, \altCb{}{}{}}
\define\activityC{%
    \usecyclelist{activityClist}
}

This code works okay, but becomes broken if I try to change the page range in 
`dostepwiserecurse` when testing my code. The other problem is the syntax is 
super messy. Within this single line, tones of data is crammed in:

\registercyclelist{activityClist}{\altCa, \altCb{}{}{}, \altCb{}{}{}}
...not only is it not easy to read which chapter gets which activity, I also 
have to fill in the {}{}{} with data, making it more difficult to read.

How can I create a much cleaner, human-readable syntax for storing this? Is 
there some simpler way to tell ConTeXt Chapter 1 gets one variant, Chapter 2, 
3, and 4 get another, etc.?

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

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


[NTG-context] How to stop \placefigure from floating off to some other page?

2022-01-29 Thread Joel via ntg-context
When I used `\placefigure`, ConTeXt often puts the figure on a completely 
different page, my readership of young students is getting confused where the 
image is. How can I have all of my `\placefigure` in the entire document appear 
exactly where called, even if that means having to place it on a new page with 
lots of space before it or even a new page afterwards? I need it to show up in 
the order it was called. I think `\setupexternalfigures[location=]` should 
provide the solution, but cann't figure what is the correct location, I'm not 
seeing that in the manual anywhere.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to create multiple PDFs from one TeX file?

2022-01-29 Thread Joel via ntg-context
I have several books in a set that have many things I'd like to have linked 
together, such as page references, shared indexes, shared glossaries, etc. 
One solution I see is putting all the files together, then using a tool like 
pdfjam to seperate the pages later, but I'm wondering if ConTeXt can already 
produce multiple files, or a split in the PDF, already?
I tried this code below, as I hoped it would create two PDFs, but it only 
rendered everything between the first set of `\starttext` and `\stoptext`.
--Joel
Minimum example:
\starttext
This is document 1.
\input knuth
\stoptext
\starttext
This is document 2.
\input knuth
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How can I get a section title to change depending on the section content?

2022-01-29 Thread Joel via ntg-context
I have a section somewhat like this...I'm replacing the code with something 
much simpler, but its basically doing a similar thing, running conditionals to 
check which content to place: 
\section{Brave Rabbits}
 \ifnum\somenumber>3 Print this content about rabbits. \else
 Print this stuff about pigeons instead. \fi
Basically the content inside that section can change, either being about 
rabbits or about pigeons. I need the section title to follow that change, the 
problem is the section title appears before this code, so defining some 
variable in the later code won't affect the rendeiring of the section title.
Is there a way I can tell the section title to change as well to match what 
content is inside that section?
\section{\thissectiontitle}
 \ifnum\somenumber>3 Print this content about rabbits.         
\define\thissectiontitle{Brave Rabbits} \else Print this stuff 
about pigeons instead. \define\thissectiontitle{Hungry Pigeons} \fi
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Why isn't bold + italics working together?

2022-01-29 Thread Joel via ntg-context
I am finishing the final touches on a manuscript, which I hope to send to a 
publisher later today and noticed this problem where bold and italic text isn't 
rendered at the same time.
I am using the EB Garamond font in my document. I set it up exactly as shown 
below. Strangely, bold works, italics works, but when bold and italics are 
together, it only display in italics, it doesn't display a bold italic text. 
I've confirmed the `EBGaramond-BoldItalic.otf` font is present and seems just 
fine. I've also tried by just using the default ConTeXt font and the error 
still appears, also in live.contextgarden.net. I tried searching the mailing 
list, as this seems like something that must have come up, but couldn't find 
any question about this.
Why won't it render both?

\starttypescript[serif] [garamond]\definefontsynonym[Serif] 
[file:~/.fonts/12/EBGaramond-Regular.otf]\definefontsynonym[SerifBold] 
[file:~/.fonts/12/EBGaramond-Bold.otf]\definefontsynonym[SerifItalic] 
[file:~/.fonts/12/EBGaramond-Italic.otf]\definefontsynonym[SerifBoldItalic] 
[file:~/.fonts/12/EBGaramond-BoldItalic.otf]\stoptypescript%\starttypescript[sans]
 [garamond]\definefontsynonym[Sans] 
[file:~/.fonts/12/EBGaramond-Regular.otf]\definefontsynonym[SansBold] 
[file:~/.fonts/12/EBGaramond-Bold.otf]\definefontsynonym[SansItalic] 
[file:~/.fonts/12/EBGaramond-Italic.otf]\definefontsynonym[SansBoldItalic] 
[file:~/.fonts/12/EBGaramond-BoldItalic.otf]\stoptypescript%\starttypescript[garamond]\definetypeface[garamond]
 [rm][serif][garamond][default]\definetypeface[garamond] 
[ss][sans][garamond][default]\definetypeface[garamond] 
[mm][math][modern][default]\stoptypescript%
\setupbodyfont[garamond, 12pt]%
\starttext\startitemize\item This text has {\bf bold} in it.\item This text has 
{\it italics} in it.\item Why doesn't this have {\bf\it bold and italics} in 
it?\stopitemize
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to stop columns from splitting up items in a list?

2022-01-29 Thread Joel via ntg-context
I am writing a workbook that contains a materials list in front of some craft 
activities. 
I found that simply displaying a bulleted list can take up lots of space on the 
page, so instead put the list in three columns. The problem is, if there is an 
item with a somewhat long description, it can be split across columns. See the 
example below:
\starttext    \startcolumns[n=3]%    \startitemize[1]% \item 
pizza cutter \item a word processor (or notebook paper) 
\stopitemize% \stopcolumns%\stoptext
In the example, it split the second item across the columns.
How can I create columns that don't allow the item to split across them?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] What is the proper way to define many different list types in a document?

2022-01-24 Thread Joel via ntg-context
I have about several different types of list that reoccur multiple times in my 
documents. Though I tried to keep things simple, by just defining the type when 
it appears, strange glitches appear. For instance, I have one that uses the ☞ 
(pointing hand) logo, and sometimes that randomly appears in the wrong lists, 
for reasons I cannot understand.

Below is how I'm defining my lists. I have about a dozen more, this is a 
sample. Is there some more robust and consistent manner in which I should be 
defining them, so the settings from one type don't spill over into the other 
types?
--Joel

%prompt

\definesymbol[bighand][{{☞}}]

\define[1]\prompt{%
    \setupitemize[symbol=bighand]
    \startitemize
        {\it #1}
    \stopitemize
}%

\prompt{What did you learn about today?}

%vocabulary

\startcolumns[n=3]\startitemize[n]
\item word1
\item word2
\item word3
\stopitemize\stopcolumns

%nested outline

\startitemize[1]
    \item some text
    \startitemize[2]
    \item some text
    \startitemize[3]
  \item some text
    \stopitemize
    \stopitemize
\stopitemize

%written answer (produces some lines after the question for writing an answer)

\define[1]\writingbox{%
    \dorecurse{#1}{%
        \hairline%
    }
}

\startitemize[n]
\item Which planet is closest to Earth? \writingbox{4}
\item What is the moon made of? \writingbox{4}
\stopitemize

%materials list

\startcolumns[n=3]\startitemize
\item crayons
\item scissors
\item glue
\stopitemize\stopcolumns

%word search clues (should be simple, but strangely this keeps getting the ☞ 
logo added instead of showing numbers)
\startitemize[n]
\item a type of hat worn
\item a cold season
\stopitemize
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to get \placenotes to place footnote-style citations at the end of my content?

2022-01-24 Thread Joel via ntg-context
I'm spinning this question off another post, as my previous  question was very 
specific, but it was possibly discovered a more general bug exists?
I'm creating some lecture slides that have footnote citations throughout. The 
problem is, the slides themselves already don't have much screen space, and 
adding all of the footnotes on the same slide steals limited screen space. It 
ends up showing one bullet point per slide and filling the page with the 
citation information.
I still need to provide citations though. The solution is perhaps to place 
`\placenotes[footnote]` after several slides. Then, at the very end of the 
document list the full bibliography with ` \placelistofpublications`.

In this way, I still present the citations, but they don't bury the content of 
the slides.

But something seems wrong with ConTeXt, not allowing this to function. Try to 
compile this code which Joey sent me and it won't populate 
`\placenotes[footnote]` with any content:
\startbuffer [bib]

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]

\setupnote[footnote][location=none] % commenting out this line will produce
footnotes that expand the citation correctly

\starttext

   \input knuth
    \cite[alternative=footnote][clark1989]
    \page
    \placenotes[footnote]

    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

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

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


[NTG-context] How to add entire chapter's page ranger for index entry?

2022-01-23 Thread Joel via ntg-context
I am adding items to an index simply using `\index{word}`.

There are a few cases where instead of printing just the page number where 
`\index{word}` is placed, I need the entire page range for that chapter to be 
displayed. For instance, if Chapter 3 spans page 22-50, and I place 
`\index{word}` in Chapter 3, I need the index to display "word 22-50", but only 
for that entry...not for all index entries.

How to add entire chapter's page ranger for index entry?

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

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


[NTG-context] How to make an in-text list without periods

2022-01-23 Thread Joel via ntg-context
I am trying to create an in-text list, with parenthesis, but without the period.

If I use this `\startitemize[text, n]`, I get an in-text list, but there are 
periods:

There are many kinds of animals at the children's zoo: (1.) rabbits, (2.) pigs, 
(3.) sheep, and (4.) dogs.
Strangely when I use `\startitemize[text, n, stopper=]`, which I hoped would 
make the period go away, I just get a regular bulleted list, it seems to ignore 
the 'text' command.

How can I achieve this output (below)?

There are many kinds of animals at the children's zoo: (1) rabbits, (2) pigs, 
(3) sheep, and (4) dogs.

--Joel

Minimum working example:

\starttext
    There are many kinds of animals at the children's zoo:
    \startitemize[text, n, stopper=]
        \item rabbits,
        \item pigs,
        \item sheep,
        and
        \item dogs.
    \stopitemize
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to create an index that refers to multiple other books?

2022-01-18 Thread Joel via ntg-context
 I tried adding 'pageprefixsegments' to setupregister, but cannot find any 
value that adds anything, ex. pageprefixsegments={WB1}
pageprefixsegments=part:number

How does it work? I'd be fine if the index listed pages like "WB1 3" meaning 
"Workbook 1, page 3", it isn't ideal but is better than not having the index 
showing anything.

--Joel


On Tuesday, January 18, 2022, 07:41:15 AM MST, Henning Hraban Ramm via 
ntg-context  wrote:  
 
 Am 18.01.22 um 14:27 schrieb Joel via ntg-context:
> One possible solution I see, since the textbooks and workbooks share the 
> same macros, formatting, fonts, etc. is to just render them as a single 
> file, resetting the page number at the start of each new book, then 
> later use pdfjam to split the files, but I'm not sure how the index 
> could tell readers which of the five "page 5's" (for example) the index 
> is referring to. --Joel

In this case, you could use \part per workbook and use 
pageprefixsegments in \setupregister to add the part number in front of 
the page number.

Otherwise, I guess it would be possible to read the .tuc files of the 
other products to create index entries. (Some Lua programming; shouldn’t 
bee too hard, but still way over my head.)

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : http://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to create an index that refers to multiple other books?

2022-01-18 Thread Joel via ntg-context
 One possible solution I see, since the textbooks and workbooks share the same 
macros, formatting, fonts, etc. is to just render them as a single file, 
resetting the page number at the start of each new book, then later use pdfjam 
to split the files, but I'm not sure how the index could tell readers which of 
the five "page 5's" (for example) the index is referring to. --Joel

On Tuesday, January 18, 2022, 06:19:01 AM MST, Joel via ntg-context 
 wrote:  
 
 I am writing a secondary textbook to be used in public schools. In my state, 
the textbooks must adhere to standards, such as the Common Core State Standards 
(CCSS). It is typical for a textbook to contain an index for teachers to check 
where in the textbook which standards are used. I've used the following code to 
create such an index, if I simply place `\learned{}` somewhere containing the 
standard's ID, it creates a custom index entry, and `\placelearned` displays 
that index.
\defineregister[learned][compress=yes]
\setupregister[learned][style=sansbold, textstyle=slanted, n=1, pagenumber=yes]
\starttext
        \learned{CCSS+W.7.3}
    \input knuth
        \learned{CCSS+W.7.3}
    \input knuth
        \learned{CCSS+W.7.1}
    \startchapter[title=Standards]
        \placelearned
    \stopchapter
\stoptext

This prints an index like this:

Standards
c
CSS
    W.7.1    1
    W.7.3    1

My problem is my textbook also includes four separate workbooks. I need the 
index to show my publisher that I've covered all 300+ standards, so I need the 
index at the back of the textbook to also contain details of which pages in 
each workbook the standards are found. How can I combine the index so it refers 
to all books? Something like this:

Standards

c
CSS
    W.7.1    T 1, Wk.1 3-8, 12, Wk.2 8-9, 60-61 
    W.7.3    T 1, Wk.1 3-8, 12, Wk.2 8-9, 60-61, Wk.3 1-2, 54, 70, 90, Wk.4 99, 
102, 104

...or possibly like this...

Standards
c
CSS
    W.7.1
    Textbook: 1
    Workbook 1: 3-8, 12
    Workbook 2: 8-9, 60-61 
    W.7.3
    Textbook: 1
    Workbook 1: 3-8, 12
    Workbook 2: 8-9, 60-61
    Workbook 3: 1-2, 54, 70, 90
    Workbook 4: 99, 102, 104

Is there any way to print an index that covers pages across multiple books?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : http://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to create an index that refers to multiple other books?

2022-01-18 Thread Joel via ntg-context
I am writing a secondary textbook to be used in public schools. In my state, 
the textbooks must adhere to standards, such as the Common Core State Standards 
(CCSS). It is typical for a textbook to contain an index for teachers to check 
where in the textbook which standards are used. I've used the following code to 
create such an index, if I simply place `\learned{}` somewhere containing the 
standard's ID, it creates a custom index entry, and `\placelearned` displays 
that index.
\defineregister[learned][compress=yes]
\setupregister[learned][style=sansbold, textstyle=slanted, n=1, pagenumber=yes]
\starttext
        \learned{CCSS+W.7.3}
    \input knuth
        \learned{CCSS+W.7.3}
    \input knuth
        \learned{CCSS+W.7.1}
    \startchapter[title=Standards]
        \placelearned
    \stopchapter
\stoptext

This prints an index like this:

Standards
c
CSS
    W.7.1    1
    W.7.3    1

My problem is my textbook also includes four separate workbooks. I need the 
index to show my publisher that I've covered all 300+ standards, so I need the 
index at the back of the textbook to also contain details of which pages in 
each workbook the standards are found. How can I combine the index so it refers 
to all books? Something like this:

Standards

c
CSS
    W.7.1    T 1, Wk.1 3-8, 12, Wk.2 8-9, 60-61 
    W.7.3    T 1, Wk.1 3-8, 12, Wk.2 8-9, 60-61, Wk.3 1-2, 54, 70, 90, Wk.4 99, 
102, 104

...or possibly like this...

Standards
c
CSS
    W.7.1
    Textbook: 1
    Workbook 1: 3-8, 12
    Workbook 2: 8-9, 60-61 
    W.7.3
    Textbook: 1
    Workbook 1: 3-8, 12
    Workbook 2: 8-9, 60-61
    Workbook 3: 1-2, 54, 70, 90
    Workbook 4: 99, 102, 104

Is there any way to print an index that covers pages across multiple books?

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

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


[NTG-context] How to achieve true double space text in ConTeXt?

2022-01-17 Thread Joel via ntg-context
I need to display one article within my book that is in double space, like what 
is a basic requirement in US colleges for turning in papers. Basically, I need 
readers to have lots of space above the text to be able to write some notes 
above every line.

This is a line of text.
% <-- here is the space between lines
% <-- this space here is as tall as a line of text.
% <-- here is the next space between lines
This is the next visible line of text.

The closest I can get is the "big" setting in `\setupinterlinespace`, but it 
isn't big enough. I've also tried manual measurements in cm, but I have no idea 
which setting is typographically good.

\setupinterlinespace[on, big]
    \startlinenumbering
    \input article
    \stoplinenumbering
\setupinterlinespace[off]

How can I achieve double space text in ConTeXt?
--Joel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to troubleshoot why my document begins with a blank page?

2022-01-17 Thread Joel via ntg-context
I created a book that strangely renders with an entirely blank page. There are 
tons and tons of macros, in dozens of files defined before the document starts, 
but the document itself starts quite simply with a title page set inside 
\startfrontmatter. How can I identify what types of preamble information would 
be causing an entire blank page to render before the document even begins?

This minimum working example won't show me the error, but it does show I simply 
have \starttext followed by my title and nothing is between that should be 
rendering an entire blank page.
--Joel
My minimum working example is here:

\definemakeup[titlepage][align=middle]

\definealternativestyle[titlestyle][\ss\bfd][]
\definealternativestyle[subtitlestyle][\ss\bfb][]
\definealternativestyle[authorstyle][\ss\tfa][]

\starttext % <-- there is no code between \starttext and \startfrontmatter 
below.
    \startfrontmatter
        \startmakeup[titlepage]
            \titlestyle{My story}
            \blank[big]
            \subtitlestyle{\date}
            \blank[big]
            \authorstyle{My name}
        \stopmakeup
    \stopfrontmatter

    \input knuth

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

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


[NTG-context] How to override ConTeXt-SBL titles, to make all titles everywhere capitalized?

2022-01-17 Thread Joel via ntg-context
I am a few days from sending a document to a publisher, and using the Society 
of Biblical Literature style (via the macro ConTeXt-SBL) as it is very close to 
what I need, Chicago (numbers style) citations. One glaring difference I notice 
between the two styles is ConTeXt-SBL presents the titles of articles and books 
in lower case, but Chicago gives them in upper case (I think SBL should too, 
but maybe as my entire BibTeX file is lowercase, it is not). How can I tell 
ConTeXt to override the titles, everywhere they appear, so they are printed in 
uppercase? I've manually marked all of the words that should not be capitalized 
in my BiBTeX file as with \word{of} so they will ignore any instructions to 
become capitalized.

--Joel


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

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


[NTG-context] How to manually adjust the sort order of items appearing in a custom index?

2022-01-17 Thread Joel via ntg-context
I created a custom index that displays a list of "Important Dates" appearing in 
my book. It lists the year, a short description of what happened, and should 
show the page number.

I'm running into two errors though:

First, if the date is the same year, it is sorting alphabetically, example

\dateis{1900s+1912}{Yet another event happened}
\dateis{1900s+1912}{Another event happened}

...will print the wrong one first in the index..

1912 - Another even happened
1912 - Yet another event happened.

Is there a way to manually tell it to display one first? I don't want to add 
visible month and day details, that would be even more confusing to the index 
as I have to print it in American order.

Second, when it compiles it is not printing the page number, instead prints 
"[Entry not flushed]".

-- Joel

Here is my minimum working example:


\defineregister[listdates][compress=yes]
\setupregister[listdates][style=sansbold, textstyle=slanted, n=1, 
pagenumber=yes]

\define[2]\dateis{%
    \listdates{#1~\emdash ~#2}%
}%

\starttext

\dateis{1900s+1911}{Some event happened}
\dateis{1900s+1912}{Yet another event happened}
\dateis{1900s+1912}{Another event happened}

\startchapter[title=Important Dates]
    \placelistdates
\stopchapter

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

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


[NTG-context] How to let a macro check the previous value of #1 the last time the same macro was called?

2022-01-09 Thread Joel via ntg-context
Is there a way for a macro to check the previous value of #1, the last time 
that same macro was called?

Here is a minimum working example, pretending that `\previousvalue` is equal to 
#1 from the last time the same macro was called:

    \define[1]\mymacro{
    \if\previousvalue=#1
        same as last time
    \else
        it is different from last time
    \fi
    }

\starttext

    \mymacro{cat}
    \mymacro{cat}
    \mymacro{mouse}
    \mymacro{mouse}
    \mymacro{cat}

\stoptext

This would print:

    it is different from last time <--it was never called previously
    same as last time
    it is different from last time
    same as last time
    it is different from last time

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

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


Re: [NTG-context] How to create cell data that spans four rows in a table?

2022-01-08 Thread Joel via ntg-context
 Thank you! The code is much easier to understand than the other way I was 
trying to use.
--Joel

On Saturday, January 8, 2022, 04:00:12 PM MST, Willi Egger via ntg-context 
 wrote:  
 
 I would suggest not to use \starttable at all.

To me the most suitable table environment for such a table is \bTABLE \eTABLE. 
It gives you all kind of control over layout, dimensions, frames on and off etc.

\setupTABLE[c][1][leftframe=off,width=40mm]
\setupTABLE[c][2][rightframe=off, width=60mm]
\setupTABLE[c][each][align={lohi,center}]
\bTABLE
    \bTR
        \bTD {\bf Eons}\eTD \bTD {\bf Eras} \eTD
    \eTR
    \bTR
        \bTD  Hadeon Eon \eTD \bTD \eTD
    \eTR
    \bTR
        \bTD[ny=4] Archanon Eon  \eTD \bTD Eoarchean Era \eTD
    \eTR
    \bTR
        \bTD Paleoarchean Era \eTD
    \eTR
    \bTR
        \bTD Mesoarchean Era \eTD 
    \eTR
    \bTR
        \bTD Neoarchean Era \eTD
    \eTR
    \bTR
        \bTD[ny=3] Proterozoic Eon \eTD    \bTD Paleoproterozoic Era \eTD
    \eTR
    \bTR    
        \bTD Mesoproterozoic Era \eTD
    \eTR
    \bTR
        \bTD Neoproterozoic Era\eTD
    \eTR
    \bTR
        \bTD[ny=3] Phanerozoic Eon \eTD \bTD Paleozoic Era \eTD
    \bTR    
        \bTD Mesozoic Era\eTD
    \eTR
    \bTR
        \bTD Cenozoic Era \eTD
    \eTR
\eTABLE

Willi

> On 8 Jan 2022, at 22:39, Joel via ntg-context  wrote:
> 
> I created a table that has some cells span multiple rows. This works good 
> with cells that span an odd-number of rows, but when I try to span 4 rows, 
> the text isn't quite vertically centered. How can I get the cell with the 
> text "Archaeon Eon" to be a little lower, so it is centered within its box?
> 
> --Joel
> 
> Minimum working example:
> 
> \starttext
> 
> \starttable[|c|c|]
> \NC {\bf Eons} \NC {\bf Eras} \NC \AR
> \HL
> \NC Hadeon Eon \VL \NC \AR
> \HL
> \NC \VL Eoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \smash{Archaeon Eon} \VL Paleoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Mesoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Neoarchean Era \NC \AR
> 
> \HL\NC \VL Paleoproterozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC Proterozoic Eon \VL Mesoproterozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Neoproterozoic Era \NC \AR
> \HL
> 
> 
> \HL\NC \VL Paleozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC Phanerozoic Eon \VL Mesozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Cenozoic Era \NC \AR
> \HL
> \stoptable
> 
> \stoptext
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki    : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki    : http://contextgarden.net
___
  ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] How to create cell data that spans four rows in a table?

2022-01-08 Thread Joel via ntg-context
I created a table that has some cells span multiple rows. This works good with 
cells that span an odd-number of rows, but when I try to span 4 rows, the text 
isn't quite vertically centered. How can I get the cell with the text "Archaeon 
Eon" to be a little lower, so it is centered within its box?
--Joel
Minimum working example:
\starttext

\starttable[|c|c|]
\NC {\bf Eons} \NC {\bf Eras} \NC \AR
\HL
\NC Hadeon Eon \VL \NC \AR
\HL
\NC \VL Eoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \smash{Archaeon Eon} \VL Paleoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \VL Mesoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \VL Neoarchean Era \NC \AR

\HL\NC \VL Paleoproterozoic Era \NC \AR
\DC \DL[1] \DR
\NC Proterozoic Eon \VL Mesoproterozoic Era \NC \AR
\DC \DL[1] \DR
\NC \VL Neoproterozoic Era \NC \AR
\HL


\HL\NC \VL Paleozoic Era \NC \AR
\DC \DL[1] \DR
\NC Phanerozoic Eon \VL Mesozoic Era \NC \AR
\DC \DL[1] \DR
\NC \VL Cenozoic Era \NC \AR
\HL
\stoptable

\stoptext


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

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


[NTG-context] Is there a syntax for making many index entry's all in one?

2021-12-28 Thread Joel via ntg-context
I am using \index{} to populate \placeindex (an index) with items.

I am wondering if there is any syntax that allows one \index{} command to 
define more than one entry, for example, something like this:

\index{presidents+Lincoln, Abraham; Lincoln, Abraham}
The result is two appearances in the index:

LLincoln, Abraham
Ppresidents    Lincoln, Abraham
Is there some syntax for making this possible, without calling \index{} 
multiple times?
--Joel


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

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


[NTG-context] Why are endnotes not working with ConTeXt-SBL?

2021-12-25 Thread Joel via ntg-context
I am using the ConTeXt-SBL package for citations. I need to move my footnotes 
to the end of each article.

According to the manual, I can suppress the placement of footnotes using two 
lines of code. I've added these to my minimal working code, placing 
\setupnote[footnote][location=none] in the header and  \placenotes[footnote] 
where I want the endnotes to appear. It complains this error:
"Undefined control sequence \doifendswithpunctelse"
What did I do wrong?
--Joel
Code follows:

\usemodule[publ-imp-sbl]
\startbuffer [bib]

@Article{na2006,
title={Volcanoes \word{of} New Mexico},
year={2006},
journal={New Mexico Earth Matters},
publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
volume={6},
number={1},
location={Socorro, New Mexico}
}

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl]

\setupnote[footnote][location=none]

\starttext

   \input knuth
    \cite[clark1989]

    \placenotes[footnote]

    
    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

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

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


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

2021-12-24 Thread Joel via ntg-context
I am using the ConTeXt-SBL module to handle the citations in my article. Using 
the plain \cite[na2006] command has worked fine.
But there are some situations where I want the footnote to include page number 
details. I tried using \cite[extra=2][na2006], but that doesn't seem compatible 
with ConTeXt-SBL. I checked the documentation, and if I understand correctly, I 
should use the autocite command to add page numbers to my citation? Like this:

    \autocite[{\loc[2]}][]{na2006}
This solution works in 95% of cases, but when I need to cite another book 
immediately after that, it throws up errors:

This won't compile:       \autocite[{\loc[2]}][]{na2006}    
\autocite[{\loc[2]}][]{clark1989}    This won't compile:       
\autocite[{\loc[2]}][]{na2006}%%
    \autocite[{\loc[2]}][]{clark1989}
This also won't compile:
    \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989}
After much trial and error, I found this will compile:
       \autocite[{\loc[2]}][]{na2006}
    \autocite[{\loc[2]}][]{clark1989}
The problem with this last example, is if my citations appear within the 
paragraph, then I end up with a paragraph break in the wrong place!

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

 \usemodule[publ-imp-sbl]
\startbuffer [bib]

@Article{na2006,
title={Volcanoes \word{of} New Mexico},
year={2006},
journal={New Mexico Earth Matters},
publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources},
volume={6},
number={1},
location={Socorro, New Mexico}
}

@Book{clark1989,
author = {Clark, William},
title = {Railroads \word{and} railroad towns \word{in} New Mexico},
publisher = {New Mexico Magazine},
year = {1989},
address = {Albuquerque, New Mexico},
isbn = {9780937206126}
}

\stopbuffer

\usebtxdataset[bib.buffer]

\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl]

\starttext

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

    
    \startchapter[title=Bibliography]
    \placelistofpublications
    \stopchapter

\stoptext
Is the autocite command the wrong tool for what I need? How can I place 
citations right next to each other, but also include page number information 
with ConTeXt-SBL?
--Joel

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

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


[NTG-context] Displaying names in Chicago-Turabian "note" style

2021-12-21 Thread Joel via ntg-context
I could not find any existing solution for using Chicago-Turabian "note" style 
in ConTeXt, so I have started my own attempt.

Chicago-Turabian uses footnotes to display the author's details on the same 
page, but also uses a bibliography to display an alphabetical list of the 
sources again at the end. The footnotes display somewhat differently each time 
a source is shown. The first time a source is cited, the footnote contains a 
long, detailed reference. Subsequent reappearances of the same citation are 
abbreviated somewhat. And "ibid" is used when the source is cited twice in a 
row. The bibliography entry contains really detailed information, similar to 
what was shown in the first footnote, with minor differences.

This code uses three macros: \turabian, used only the first time a source is 
reference, \shortturabian, used for subsequent references of the same source, 
and `\ibid, for when a source is referenced twice in a row. Each of these 
macros simply creates a footnote, showing the author's details, and also uses 
\nocite to make sure an entry is added to \placelistofpublications. Page 
details are optionally added in #2, and this information only appears in the 
footnotes.
I am having trouble getting the code to display the author's names correctly. 
Every attempt ends with strange results, like "FirstLast" with no space or just 
"Initial Last". Chicago-Turabian displays the names differently, depending on 
the placement:

(1) First, the \turabian macro should show in ordinary First + Last order in 
the footnote, example: "Anna Burns, Robert Smith, and Judith Green", but if the 
number of authors exceeds 3, it display "Anna Burns et al."

(2) Second, the \shorturabian macro should show just the Last names in the 
footnote: "Burns, Smith, and Green", also using "Burns et al." if there are 
more than 3 names.

(3) The \ibid macro doesn't show any names.

(4) Finally, the actual bibliographic entry in \placelistofpublications uses a 
strange format, with the first author listed as Last + First order, all 
subsequent authors in First + Last order, such as "Burns, Anna, Robert Smith, 
and Judith Green.", meanwhile "et al." is never used in the bibliography, even 
if there are 100 authors.

Any help would be greatly appreciated!
--Joel
Minimal working example follows:

\startbuffer [bib]
@Book{ball1996,
author = {Ball, Larry},
title = {Desert lawmen: The high sheriffs \word{of} New Mexico \word{and} 
Arizona, 1846-1912},
publisher = {University \word{of} New Mexico Press},
year = {1996},
address = {Albuquerque, NM},
isbn = {9780826317001}
}
 
@Book{minear2009,
author = {Minear, Tish and Limon, Janet},
title = {Discover Native America: Arizona, Colorado, New Mexico, \word{and} 
Utah},
publisher = {Hippocrene Books},
year = {2009},
address = {New York, NY},
isbn = {9780781803274}
}

\stopbuffer

\define[3]\ifisempty{%
        \setbox0=\hbox{#1\unskip}%
        \ifdim\wd0=0pt
            #2%
        \else
            #3%
        \fi
}%

\usebtxdataset[bib.buffer]

\startbtxrenderingdefinitions[chicagonum]

\definebtx[chicagonum]
    [default=default,
    specification=chicagonum,
    otherstext={\btxspace{\it\btxlabeltext{others}}},
    etallimit=10,
    etaldisplay=\btxparameter\c!etallimit,
    journalconversion=\v!normal,
    monthconversion=\v!month,
    title=yes,
    separator:names:2={\btxcomma},
    separator:names:3={\btxcomma\btxlabeltext{and}\space},
    separator:names:4={\btxspace\btxlabeltext{and}\space}]
   
\setupbtxlist[chicagonum]

\definebtxrendering[chicagonum]
    [specification=chicagonum,
    sorttype=authoryear,
    numbering=no]


\startsetups btx:chicagonum:list:book
    \btxdoif{author}{
        \btxflush{author}
        \btxperiod
    }
    \btxdoif{title}{
        {\it\Words \btxflush{title}}
        \btxperiod
    }
    \btxdoif{address}{
        \btxflush{address}
        \btxcolon
    }
    \btxdoif{publisher}{
        \btxflush{publisher}
        \btxcomma
    }
    \btxdoif{year}{
        \btxflush{year}
        \btxperiod
    }
    \removeunwantedspaces
\stopsetups


\startsetups btx:chicagonum:list:article
    \btxdoif{author}{
        \btxflush{author}
        \btxperiod
    }
    \btxdoif{title}{
        \quotation{\Words \btxflush{title}}
        \btxperiod
    }
    \btxdoif{journal}{
        {\it\Words \btxflush{journal}}
    }    
    \btxdoif{volume}{
        \btxflush{volume}
        \btxcomma
    }
    \btxdoif{number}{
        no.~\btxflush{number}
    }
    \btxdoifelse{month}{
        (\btxflush{month} \btxflush{year})
        \btxcolon
    }{
        \btxdoif{year}{
            (\btxflush{year})
        }
        \btxcolon
   }
    \btxdoif{pages}{
        \btxflush{pages}
        \btxperiod
    }
    \removeunwantedspaces
\stopsetups

\stopbtxrenderingdefinitions


\setupbtx[chicagonum][dataset=default,
    authorconversion={normal},
 etallimit=]

\setupbtx[chicagonum:list:author]
    [authorconversion={normal},
 etallimit=]