[NTG-context] Re: How to stop

2024-01-27 Thread Hraban Ramm
Just use a group (\start ... \stop, \bgroup ... \egroup or {} ) around 
the setup commands and their table, or use \startsetup mytable ... 
\stopsetup and \startTABLE[setups=mytable] if you need the same settings 
for several tables.


HR

Am 27.01.24 um 22:29 schrieb 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
__
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] Re: \framed{\externalfigure} vs \externalfigure[frame=on]

2024-01-27 Thread Jim
On Sat, Jan 27, 2024 at 19:12 (+0100), Pablo Rodriguez via ntg-context wrote:

> On 1/27/24 17:44, Jim wrote:
>> The wiki page for \setupexternalfigure says
>>  "Show frame around image. Most(?) options of \setupframed are usable!"

Hi Pablo,

> I’m afraid that this is a too generous statement.

I can't disagree with you!  ;-)

> https://www.pragma-ade.com/general/qrcs/setup-en.pdf#page=218 shows
> which keys and values \setupexternalfigure allows.

Thanks for that pointer.

>> I tried to put a frame around a picture (using \externalfigure with
>> frame=on) but I didn't get the frame to play nicely (see example below).  I
>> can get the frame where I want it if instead I do
>>  \framed[frame=on,...]{\externalfigure...}
>> but this leaves me wondering whether
>> (1) I am misinterpreting the wiki pages,
>> (2) The wiki pages are misleading/wrong, or

> I would say, that the offset and frameoffset don’t seem to be available
> in \setupexternalfigure.

And yet, experiments suggest that frameoffset does indeed do something (in,
specifically, \externalfigure, I didn't yet try \setupexternalfigure).

Given that frameoffset does something and is not mentioned in setup-en.pdf,
I will add to my wonderment

(2') the summary in setup-en.pdf is incomplete.

>> (3) There is a bug in some code.


>> If anyone would care to enlighten me, I would appreciate it.

>> In particular, the offset=... option of \externalfigure does not seem to be
>> consistent with the offset=... option of \framed.

> I hope it is clear now.

Well, given that (at least on my computer, with context updated a couple of
days ago) frameoffset does do something.  So I still see an inconsistency.

I would be happy to help out by editing the wiki to accurately describe
reality.  The problem is, I'm not sure what reality is supposed to be on
this point.  For example, if I edited the wiki to say that offset has no
effect in \setupexternalfigure, and it turns out that some (recent?) change
to something else broke 'offset=', then I wouldn't want to add
misinformation.

>> Here is the example... one and all should be able to directly run it, but
>> the text above and below each picture may make the issues clear without
>> having to run the code.  (The result I was looking for is the second figure
>> in this example.)

> To get offset in the frame of the image, you need a different frame from
> the external figure itself (or so it seems).

As I mentioned, on my system I can get a frame offset from the image
without using \frame, but unfortunately it is the type of frame which is
"invisible" to the layout of the page.

> I hope it helps,

It does (a bit), thanks again for your time.

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

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


[NTG-context] Footnotes in footnotes

2024-01-27 Thread Thomas Meyer

Hi folks,

in https://wiki.contextgarden.net/Footnotes

there is Oblomov's example for footnotes in footnotes:

This\footnote{Or that\footnote{Or possibly even the other.}, if you 
prefer.} is a sentence

with a footnote.

I get only the footnote number of the inner footnote in the first 
footnote, not the whole second/inner footnote.

What's going wrong?

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

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


[NTG-context] Re: \framed{\externalfigure} vs \externalfigure[frame=on]

2024-01-27 Thread Pablo Rodriguez via ntg-context
On 1/27/24 17:44, Jim wrote:
> The wiki page for \setupexternalfigure says
>  "Show frame around image. Most(?) options of \setupframed are usable!"

Hi Jim,

I’m afraid that this is a too generous statement.

https://www.pragma-ade.com/general/qrcs/setup-en.pdf#page=218 shows
which keys and values \setupexternalfigure allows.

> I tried to put a frame around a picture (using \externalfigure with
> frame=on) but I didn't get the frame to play nicely (see example below).  I
> can get the frame where I want it if instead I do
>  \framed[frame=on,...]{\externalfigure...}
> but this leaves me wondering whether
> (1) I am misinterpreting the wiki pages,
> (2) The wiki pages are misleading/wrong, or

I would say, that the offset and frameoffset don’t seem to be available
in \setupexternalfigure.

> (3) There is a bug in some code.
>
> If anyone would care to enlighten me, I would appreciate it.
>
> In particular, the offset=... option of \externalfigure does not seem to be
> consistent with the offset=... option of \framed.

I hope it is clear now.

> Here is the example... one and all should be able to directly run it, but
> the text above and below each picture may make the issues clear without
> having to run the code.  (The result I was looking for is the second figure
> in this example.)

To get offset in the frame of the image, you need a different frame from
the external figure itself (or so it seems).

I hope it helps,

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

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


[NTG-context] Re: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Pablo Rodriguez via ntg-context
On 1/27/24 17:40, Ali Ali wrote:
> Thanks, those seems close to what I wanted but not exactly.
>
> The ASCII graphic (better in typewriter font) may explain what I desired,
> ```
> text width
>  |<>|
>
> ##.   SECTION TITLE paragraph
>   ...
>   .
>
> |<-->|
> margin
> ```
> I wanted paragraph to begin on the same line the section title lies.

Hi Ali,

from what I understand, you need both alternative=inmargin (or margin)
and alternative=text.

I’m afraid they are mutually exclusive alternative modes.

Just in case it might help,

Pablo

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

maillist : ntg-context@ntg.nl / 
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] \framed{\externalfigure} vs \externalfigure[frame=on]

2024-01-27 Thread Jim
The wiki page for \setupexternalfigure says
 "Show frame around image. Most(?) options of \setupframed are usable!"

I tried to put a frame around a picture (using \externalfigure with
frame=on) but I didn't get the frame to play nicely (see example below).  I
can get the frame where I want it if instead I do
 \framed[frame=on,...]{\externalfigure...}
but this leaves me wondering whether
(1) I am misinterpreting the wiki pages,
(2) The wiki pages are misleading/wrong, or
(3) There is a bug in some code.

If anyone would care to enlighten me, I would appreciate it.

In particular, the offset=... option of \externalfigure does not seem to be
consistent with the offset=... option of \framed.

Here is the example... one and all should be able to directly run it, but
the text above and below each picture may make the issues clear without
having to run the code.  (The result I was looking for is the second figure
in this example.)

Thanks.
Jim

%%% cut here %

\setuppapersize[legal]

\starttext

fr[ef] with frameoffset=1cm: This preceding text ends up inside the frame.

\framed[frame=on,frameoffset=1cm]{\externalfigure[cow][width=3cm,frame=on]}

This following text ends up inside the frame.


\vskip0.25 in\hrule\vskip0.25 in


fr[ef] with offset=1cm: This preceding text is above the frame as desired.

\framed[frame=on,offset=1cm]{\externalfigure[cow][width=3cm,frame=on]}

This following text is below the frame, as desired.


\vskip0.25 in\hrule\vskip0.25 in


ef[fr] with frameoffset=1cm: This preceding text ends up inside the frame.

\externalfigure[cow][width=3cm,frame=on,frameoffset=1cm]

This following text ends up inside the frame.


\vskip0.25 in\hrule\vskip0.25 in


ef[fr] with offset=1cm: The frame is tight to the image, not 1cm away.

\externalfigure[cow][width=3cm,frame=on,offset=1cm]

This following text ends up just below the image.


\vskip0.25 in\hrule\vskip0.25 in


ef[fr] with frameoffset=1cm,offset=1cm: This preceding text ends up inside
the frame.

\externalfigure[cow][width=3cm,frame=on,frameoffset=1cm,offset=1cm]

This following text ends up inside the frame.

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

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


[NTG-context] Re: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Ali Ali
Thanks, those seems close to what I wanted but not exactly.

The ASCII graphic (better in typewriter font) may explain what I desired,
```
text width
 |<>|

##.   SECTION TITLE paragraph
  ...
  .

|<-->|
margin
```
I wanted paragraph to begin on the same line the section title lies.

Best regards,
Ali
___
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: chronological TOC

2024-01-27 Thread Henning Hraban Ramm

Am 26.01.24 um 23:46 schrieb jbf:
I wonder if someone can point me in the right direction for a separate 
TOC which needs to be in chronological order at the back of the book 
(i.e. not in page number order, although I need the page numbers to show 
up in the TOC. There is the normal TOC at the front of the book, 
according to chapter titles.


I have succeeded in defining a separate TOC to place at the back, but 
have not succeeded in the chronological order! Here is what I have done:


\definelist[chron][criterium=all,alternative=c]

At the back of the book:

\placelist[chron][criterium=all]

Then at an appropriate point after each \startchapter I have placed (as 
an example):


\writetolist[chron]{}{{\bf 29 April 2017,} Speech, Panama City}

This gives me my list, but in page number order. How do I get the date 
(e.g. 29 April 2017) to be the ordering factor in the list. I assume it 
will be something to do with criterium, but am clueless at the moment on 
how to indicate this.


I don’t know if it works this way (the wizards will know a way), but for 
special needs I’m (ab)using indexes:
just add something like \index[2017-04-29]{Speech, Panama City} to your 
chapter command and setup the index at will.


Hraban

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

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


[NTG-context] Re: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Wolfgang Schuster

Ali Ali schrieb am 27.01.2024 um 06:03:

I've able to achieve the results I wanted by trial/e using the code shown 
below.
"""
\def\subsecnumwrapper#1{\llap{#1\hskip8pt}}
\setuphead[subsection][alternative=text,numbercommand=\subsecnumwrapper,distance=0pt]
"""

I just wanted to know if there already an option defined to achieve the desired 
result.


\setuphead [subsection] [alternative=margin]
%\setuphead [subsection] [alternative=inmargin]
%\setuphead [subsection] [alternative=margintext]

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
___