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

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

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

\placetable or \placefigure

to control the Table of Figure Title appearing in:

\completelistoftables and \completelistoffigures


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

\completecontent

with something such as the following:

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


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


Best, Richard



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

Indica et Buddhica  Littledene  Bay Road  Oxford  NZ
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] lmtx update/t-vim (again)

2021-08-24 Thread Aditya Mahajan via ntg-context
On Mon, 23 Aug 2021, Aditya Mahajan via ntg-context wrote:

> On Mon, 23 Aug 2021, Benjamin Buchmuller via ntg-context wrote:
> 
> > This is the setup I have been using, but I'm unsure if the problem could be 
> > related to the other problem I had. (Not scaled to a MWE, but short 
> > enough.) I figured the issue by removing some of the lines.
> 
> I get the same error. Most likely due to some grouping issue because there is 
> also this:
> 
> system  > invalid \starttext ... \stoptext structure
> 
> I'll look into it.

The error was due to the change in job.files.run macro. I have adapted the 
t-filter module to use the new interface. So, the error should go away if you 
update your installed modules.

Thanks for the bug report.

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

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


[NTG-context] TOC labeltext and no partlabel

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

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

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

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

1 Bodypart
A Appendix
---

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

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

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

\starttext

\startfrontmatter
\completecontent[label=section]
\stopfrontmatter

\startbodymatter
\chapter{Bodypart}
\stopbodymatter

\startappendices
\chapter{Appendix}
\stopappendices

\stoptext

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

I must be doing something wrong.
Any hints?

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

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


Re: [NTG-context] numbered exercises

2021-08-24 Thread Aditya Mahajan via ntg-context
On Tue, 24 Aug 2021, Henning Hraban Ramm via ntg-context wrote:

> > Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context 
> > :
> > 
> > Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
> >> Hi, I’m typesetting a textbook that contains numbered and indented 
> >> exercises. They must not float.
> >> 
> >> Which structure should I use for them? There must be an easy answer, but I 
> >> draw a blank.
> > 
> > Use an enumeration.
> 
> Thank you, but how can I define a title/caption for the enumeration and its 
> reference?

http://www.ntg.nl/maps/36/09.pdf

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

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

On 8/24/2021 6:12 PM, Bruce Horrocks wrote:


Thanks. I'll wait for your upload and try again.

i uploaded new bins

just for fun (yesterday i needed a distraction) i also added some basic 
mechanism for repeatable random numbers (i can add more if needed) (the 
usual tex / lua / mp interfaces)


\starttext

   % \enabletrackers[system.randomizer.details]
% empty == default

\newrepeatablerandom\MyRandom {Welcome 2 America}
\newrepeatablerandom\MyRandomN{\randomnumber{0}{1000}}
\newrepeatablerandom\MyRandomM{\randomnumber{0}{1000}}

\cldcontext{utilities.randomizer.getrepeatableseed()}\par
\cldcontext{utilities.randomizer.getrepeatableseed("default")}\par
\cldcontext{utilities.randomizer.getrepeatableseed("MyRandom")}\par
\cldcontext{utilities.randomizer.getrepeatableseed("MyRandomN")}\par
\cldcontext{utilities.randomizer.getrepeatableseed("MyRandomM")}\par

\dorecurse{10}{\MyRandom\par}

\startlinecorrection
\startMPcode
randomseed := repeatablerandom("MyRandom") ;
draw image (
for i=1 upto 1000 :
draw origin randomized 100 ;
endfor ;
) withpen pencircle scaled 1 withcolor white withstacking 2 ;
fill boundingbox currentpicture withcolor darkred 
withstacking 1 ;

\stopMPcode
\stoplinecorrection

\startluacode
context(utilities.randomizer.getrepeatableseed("MyRandom"))
context.par()
local rep = utilities.randomizer.getrepeatable("MyRandom")
for i=1,5 do
context(rep())
context.par()
end
\stopluacode

\stoptext



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

maillist : ntg-context@ntg.nl / 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] numbered exercises

2021-08-24 Thread Henning Hraban Ramm via ntg-context
Here’s what I have now (result attached):

\define[1]\ÜbungNrCmd{\inmargin{\offset[y=3em]{\rotate[rotation=90]{\SectionFont
 #1
  
\defineenumeration[Übung][
  text=Übung,
  title=yes,
  titleleft=,
  titleright=,
  titledistance=-1em,
  titlestyle=\SectionFont,
  %numberstyle=\SectionFont,
  numbercommand=\ÜbungNrCmd,
  way=bytext,
  margin=1em,
  before={\blank[2*line]},
]


Now I’d like to have a vertical line beside the text, starting below the title.

And because I want to use the “sketchy“ lines we discussed a while ago (I 
needed them for the same book), it must be a MetaPost-drawn line.

What’s the right approach? Overlay? Textbackground?

Hraban


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

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


Re: [NTG-context] numbered exercises

2021-08-24 Thread Henning Hraban Ramm via ntg-context

> Am 24.08.2021 um 21:34 schrieb Wolfgang Schuster via ntg-context 
> :
> 
> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 21:26:
>>> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context 
>>> :
>>> 
>>> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
 Hi, I’m typesetting a textbook that contains numbered and indented 
 exercises. They must not float.
 
 Which structure should I use for them? There must be an easy answer, but I 
 draw a blank.
>>> 
>>> Use an enumeration.
>> Thank you, but how can I define a title/caption for the enumeration and its 
>> reference?
> 
> 
> \defineenumeration
>  [Exercise]
>  [text=Exercise,
>   title=yes,
>   titleleft=,
>   titleright=,
>   way=bytext,
>   margin=1em]
> 
> \starttext
> 
> \samplefile{lorem}
> 
> \startExercise [title={Something to do},reference=ex:something]
> \samplefile{lorem}
> \stopExercise
> 
> \stoptext

Thank you, I didn’t even try, since the wiki looked like it wasn’t possible. 
Sorry!
I’ll wikify that.

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

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


Re: [NTG-context] numbered exercises

2021-08-24 Thread Gavin via ntg-context
> On Aug 24, 2021, at 1:26 PM, Henning Hraban Ramm via ntg-context 
>  wrote:
>> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context 
>> :
>> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>>> Hi, I’m typesetting a textbook that contains numbered and indented 
>>> exercises. They must not float.
>>> 
>>> Which structure should I use for them? There must be an easy answer, but I 
>>> draw a blank.
>> 
>> Use an enumeration.
> 
> Thank you, but how can I define a title/caption for the enumeration and its 
> reference?
> 

Hi Hraban,

Here’s an example from my textbook which might be helpful. I use this 
enumeration for example problems, but exercises could be similar. You have 
access to the rest of the textbook, so feel free to grab anything useful.

-Gavin


In the environment file:

% Example Problems
\defineenumeration[example]
\setupenumeration[example][
margin=no,
headstyle=\ss\sc,
text=Example, % This text is part of the number, e.g. "Example 2.3"
style=\ss,
alternative=serried,
title=no, % This would be a title after the number
prefix=yes, % Turns on the prefix
prefixsegments=chapter, % makes the prefix the chapter number
way=bychapter, % Numbers within each chapter
%margin=standard, % Indents block on the left
width=fit, % Makes the space between the number and the question a good 
size
indentnext=no,
]
\definedelimitedtext[solution][
spacebefore=medium,
spaceafter=medium,
style=\rm\it,
leftmargin=standard, % Indents block on the left
rightmargin=yes, % Indents block on the right
indentnext = no,
]


In the text:

\startexample[ex:organ]
What interval is produced by two consecutive thirds?
\startsolution
We wish to add a third to a third.
\startformula
\text{3rd} + \text{3rd} = 2\units{steps} + 2\units{steps} = 
4\units{steps} = \text{5th}
\stopformula
Two thirds produce a fifth.
\stopsolution
\stopexample


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

2021-08-24 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 21:26:



Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context 
:

Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:

Hi, I’m typesetting a textbook that contains numbered and indented exercises. 
They must not float.

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


Use an enumeration.


Thank you, but how can I define a title/caption for the enumeration and its 
reference?



\defineenumeration
  [Exercise]
  [text=Exercise,
   title=yes,
   titleleft=,
   titleright=,
   way=bytext,
   margin=1em]

\starttext

\samplefile{lorem}

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

\stoptext

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

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


Re: [NTG-context] numbered exercises

2021-08-24 Thread Henning Hraban Ramm via ntg-context


> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context 
> :
> 
> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>> Hi, I’m typesetting a textbook that contains numbered and indented 
>> exercises. They must not float.
>> 
>> Which structure should I use for them? There must be an easy answer, but I 
>> draw a blank.
> 
> Use an enumeration.

Thank you, but how can I define a title/caption for the enumeration and its 
reference?

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

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


Re: [NTG-context] numbered exercises

2021-08-24 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:

Hi, I’m typesetting a textbook that contains numbered and indented exercises. 
They must not float.

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


Use an enumeration.

Wolfgang

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

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


[NTG-context] numbered exercises

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

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

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


\setuplabeltext[en][Exercise=Exercise~]

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

\starttext

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

This can have several paragraphs and maybe images etc.

\stopExercise

\stoptext



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

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


Re: [NTG-context] Place a logo at the bottom of the page with a layer

2021-08-24 Thread Wolfgang Schuster via ntg-context

Fabrice Couvreur via ntg-context schrieb am 24.08.2021 um 19:32:

Hi,
I want to insert a logo at the bottom of the page on the right on the 
first page, on the left on the second, on the right on the third ...

With the key repeat=yes, the logo is always at the bottom right


\useMPlibrary[dum]

\definelayer
  [MyLogo]
  [doublesided=yes,
   width=\paperwidth,
   height=\paperheight,
   repeat=yes]

\setupbackgrounds [page] [background=MyLogo]

\setuppagenumbering [alternative=doublesided]

\setlayer
  [MyLogo]
  [left]
  [preset=leftbottom,
   x=\dimexpr\cutspace-\rightmargindistance-\rightmarginwidth\relax,
   y=\bottomspace]
  {\externalfigure[dum][width=\rightmarginwidth,height=\footerheight]}

\setlayer
  [MyLogo]
  [right]
  [preset=rightbottom,
   x=\dimexpr\cutspace-\rightmargindistance-\rightmarginwidth\relax,
   y=\bottomspace]
  {\externalfigure[dum][width=\rightmarginwidth,height=\footerheight]}

\showframe

\starttext
\dorecurse{20}{\samplefile{lorem}}
\stoptext

Wolfgang

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

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


[NTG-context] Place a logo at the bottom of the page with a layer

2021-08-24 Thread Fabrice Couvreur via ntg-context
Hi,
I want to insert a logo at the bottom of the page on the right on the first
page, on the left on the second, on the right on the third ...
With the key repeat=yes, the logo is always at the bottom right
Thanks
Fabrice

\useMPlibrary[dum]

\definelayer
   [MyLogo]
   [x=0mm, y=0mm,
width=\paperwidth,
height=\paperheight,
repeat=yes]


\setupbackgrounds[page][background=MyLogo]

\setlayer
  [MyLogo]
  [hoffset=\dimexpr\textwidth+\backspace+\rightmargindistance\relax,
   voffset=\dimexpr\topspace+\textheight+\footerheight\relax]
   {\externalfigure[dum][width=\rightmarginwidth,height=\headerheight]}

\showframe

\starttext
\dorecurse{20}{\samplefile{lorem}}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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
___