[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] \setupparagraphs - can they run over two pages?

2023-02-23 Thread jbf via ntg-context

I have the following setup for side-by-side paras.

\defineparagraphs[Two][n=2]

\setupparagraphs[Two][1][width=.1\textwidth,style=\bfx,align=tolerant]

\setupparagraphs[Two][2][width=.9\textwidth,style=normal,align=tolerant]

My difficulty is that while there is only ever just a couple of numbers 
in the left-hand 'column', the right-hand 'column' may have several 
lengthy paragraphs. If I have one relatively short \startTwo followed by 
one that is much longer, it will be forced to start on the next page, 
leaving too much empty space on the previous page.


It is probable that getting this environment to split across pages is 
not possible. I can try very different approaches (columns, tables) to 
solve my problem, but I thought I would at least ask first.


Julian
___
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] Indenting next multi paragraph description

2023-02-23 Thread Alex Leray via ntg-context
Actually it works if I comment out "\setupindenting" (or with a manual 
`\indentation`).


But then, no indentation on the rest of the document :(

Le 23/02/23 à 22:27, Alex Leray via ntg-context a écrit :

\setupindenting[yes, 3em, next]


___
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] Indenting next multi paragraph description

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

Hi,

I'd like to indent next paragraphs in multi paragraph descriptions.

For some reason, I can't figure out why this isn't working. Any idea?

Here is my code:

###

\setupwhitespace[none]
\setupindenting[yes, 3em, next]

\definedescription[question][
before={\vskip-\parskip},
after={\vskip-\parskip},
width=3em,
hang=3,
]
\definedescription[answer][
before={\vskip-\parskip},
after={\vskip-\parskip},
width=3em,
hang=3,
indenting={yes, 3em, next}, % Does nothing
indentnext=yes, % Does nothing too
]

\starttext
\startcolumns[n=2]
\startquestion{(T.C.)}
\input ward
\stopquestion

\startanswer{(N.M.)}
\input ward

\input ward
\stopanswer
\stopcolumns
\stoptext

###

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

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


Re: [NTG-context] Chapter cover page

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

Hi Bruce, and thanks for your answer.

In the end, I think a combination of `insidesection` and `placehead` 
does what I want:


###

\setuphead[interview][
placehead=hidden,
insidesection={\setup{interview:cover}},
]

###

I'll test it harder in the coming days!

Alex

Le 23/02/23 à 14:24, Bruce Horrocks via ntg-context a écrit :

Hi Alex,

I couldn't get it to work with \tabulate so I switched to TABLE instead. The 
workaround for the horizontal mode problem is to put the chapter title into row 
two of the table. Hopefully this works with your actual text. Also I'm not sure 
where \layoutcolumnwidth is coming from so I just hard-coded a width for now. 
Lastly there are neater ways (using \setuptable) to define the table but it's 
just an example...

\define[2]\MyChapter{
\bTABLE[frame=off]
\bTR
  \bTD[width=4cm] \structureuservariable{author} \eTD
  \bTD \structureuservariable{bio} \eTD
\eTR
\bTR
  \bTD[nc=2] #1 #2 \eTD
\eTR
\eTABLE
}

\definehead[interview][chapter]
\setuphead[interview][
page=right,
command=\MyChapter,
% insidesection={\page},
style={\tfa},
]

\starttext
\startinterview[title={My Interview}][
author={Jane Doe},
year={2022},
month={Decembre},
bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext



On 23 Feb 2023, at 10:21, Alex Leray via ntg-context  wrote:

Hello,

I'm trying to figure out how to design a chapter page for a custom head section 
with uservariables defined.

I'd like to have the chapter page start on a right page. I'd like this page to feature 
the title of the chapter (here: an interview) along with some other info like the 
interviewee name and bio. All in a "fancy" layout.

I'm having issue putting it all together. The command parameter allow me to 
override the content of the title but has some drawbacks (it seems to be stuck 
in horizontal mode for instance).

I'm open to any solution but would find it nice to keep the \startstopinterview 
structure.

Here is my code at the moment:

%%%

\define[2]\MyChapter{
\starttabulate[|p(\layoutcolumnwidth)|p(\layoutcolumnwidth)|]
\NC \structureuservariable{author} \NC \structureuservariable{bio} \NR
\stoptabulate
}

\definehead[interview][chapter]
\setuphead[interview][
page=right,
command=\MyChapter,
% insidesection={\page},
style={\tfa},
]


\starttext
\startinterview[title={My Interview}][
author={Jane Doe},
year={2022},
month={Decembre},
bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext

%%%

Many thanks

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

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


—
Bruce Horrocks
Hampshire, UK

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

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


--
Alexandre Leray
+32 487 947 030

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

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


[NTG-context] update

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

Hi,

I uploaded a new version. We further improved Antykwa support,

\switchtobodyfont[antykwa]

\startTEXpage[offset=1dk]
\im{
f' = f'' = f''' = f =
a + b + \ldots + c +
\overbar{x} + \overbar{S} + \bar{x} + \widebar{x}
}

\im{
\fenced[doublebar]{x} =
\fenced[doublebar][size=1]{x_1} =
\fenced[doublebar][size=2]{x_2} =
\fenced[doublebar][size=3]{x_3} =
\fenced[doublebar][size=4]{x_4} =
\fenced[doublebar]{\blackrule[width=1cm,height=1cm]}
}

\im{
\fenced[bar]{x} =
\fenced[bar][size=1]{x_1} =
\fenced[bar][size=2]{x_2} =
\fenced[bar][size=3]{x_3} =
\fenced[bar][size=4]{x_4} =
\fenced[bar]{\blackrule[width=1cm,height=1cm]}
}

\im{
\fenced[brace]{x} =
\fenced[brace][size=1]{x_1} =
\fenced[brace][size=2]{x_2} =
\fenced[brace][size=3]{x_3} =
\fenced[brace][size=4]{x_4} =
\fenced[brace]{\blackrule[width=1cm,height=1cm]}
}

\im{
\root[4]{1+x^2+a} +
\frac{1}{1+x^2+a} +
\overparent{1+x^2+a} +
\overbrace{1+x^2+a} +
\overparent{x} +
\overbrace{x} +
\overbrace{i}
}

\stopTEXpage


This time with fancy radical bars, fraction bars, vertical bars, over 
and underbars etc.


Hans

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

maillist : ntg-context@ntg.nl / 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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2023-02-23 Thread Cron Daemon via ntg-context
receiving incremental file list
 ./
 ctan.lsr
 document-2.htm
 download-1.htm
 download-2.htm
 logo-ade.png
 logo-cts.png
 logo-pod.png
 rss.xml
 show-fil.pdf
 context/latest/
 context/latest/cont-mpd.zip
 context/latest/cont-ppc.zip
 context/latest/cont-sci.zip
 context/latest/cont-tmf.zip
 context/latest/cont-tst.7z
 context/latest/cont-tst.tar.xz
 context/latest/cont-tst.zip
 
 sent 101,500 bytes  received 20,696,643 bytes  2,446,840.35 bytes/sec
 total size is 449,514,047  speedup is 21.61


Running archiver:

New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-02-23.22
122318268   
/var/www/aanhet.net/context//htdocs/archives/context-2023-02-23.22/latest
126745317   
/var/www/aanhet.net/context//htdocs/archives/context-2023-02-23.22/current
249067681   
/var/www/aanhet.net/context//htdocs/archives/context-2023-02-23.22
249067681   total
___
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] Bug with \startnarrow?

2023-02-23 Thread peter.hopcroft--- via ntg-context
It's the documentation that has the bug. With \startnarrow, you need two sets 
of square brackets, 1 for the \setupnarrower data and 1 for the \startnarrower 
data. Like this:

\starttext
Some text before
\startnarrow[left=5cm,right=1cm,before={\blank[2*line]},after={\blank[halfline]}][left,
 right]
narrower text
\stopnarrow
some text after
\stoptext

> On 23/02/2023, at 11:14 PM, Denis Maier via ntg-context  
> wrote:
> 
> Hi,
>  While doing some more tests with my example from yesterday (tables in 
> \startnarrow), I’ve realized that the example from the wiki doesn’t seem to 
> quite work as expected:
>  %%
> \starttext
> Some text before
> \startnarrow[left=2cm,right=1cm,before={\blank[2*line]},after={\blank[halfline]}]
> narrower text
> \stopnarrow
> some text after
> \stoptext
> %%
>  Already here, the extra margins on both sides seem to be equal. Changing the 
> size of the left extra margin has no effect at all.
>  %%
> \starttext
> \startnarrow[left=10cm,right=2cm]
> \input ward
> \stopnarrow
>  but:
>  \setupnarrower[left=5cm, right=2cm]
> \startnarrower[left,right]
> \input ward
> \stopnarrower
> \stoptext
> %%
>  Is this a bug or intended behaviour ?
>  Best,
> Denis
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___


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

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


Re: [NTG-context] Math Formula Alignment

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

On 2/18/2023 3:04 PM, Mikael Sundqvist via ntg-context wrote:

Hi,

On Sat, Feb 18, 2023 at 3:01 PM Lutz Haseloff via ntg-context
 wrote:


Hi Hans, hi all,

the alignment of formulas seems broken:

\setuppapersize[A5]
\starttext
\setuplayout[textwidth=8cm]
\setupformulas[align=left]
\startformula c^2 = a^2 + b^2 \stopformula
\setupformulas[align=middle]
\startformula c^2 = a^2 + b^2 \stopformula
\setupformulas[align=right]
\startformula c^2 = a^2 + b^2 \stopformula
\setupformulas[align=left]
\placeformula \startformula c^2 = a^2 + b^2 \stopformula
\setupformulas[align=middle]
\placeformula \startformula c^2 = a^2 + b^2 \stopformula
\setupformulas[align=right]
\placeformula \startformula c^2 = a^2 + b^2 \stopformula
\stoptext

All formulas are centered with ConTeXt ver: 2023.02.14 17:44 LMTX

Greetings Lutz


Indeed, but align=flushleft and align=flushright seems to work.

i'll add the aliases

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

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

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


Re: [NTG-context] Chapter cover page

2023-02-23 Thread Bruce Horrocks via ntg-context
Hi Alex,

I couldn't get it to work with \tabulate so I switched to TABLE instead. The 
workaround for the horizontal mode problem is to put the chapter title into row 
two of the table. Hopefully this works with your actual text. Also I'm not sure 
where \layoutcolumnwidth is coming from so I just hard-coded a width for now. 
Lastly there are neater ways (using \setuptable) to define the table but it's 
just an example...

\define[2]\MyChapter{
   \bTABLE[frame=off]
   \bTR
 \bTD[width=4cm] \structureuservariable{author} \eTD
 \bTD \structureuservariable{bio} \eTD
   \eTR
   \bTR
 \bTD[nc=2] #1 #2 \eTD
   \eTR
   \eTABLE
}

\definehead[interview][chapter]
\setuphead[interview][
   page=right,
   command=\MyChapter,
   % insidesection={\page},
   style={\tfa},
]

\starttext
\startinterview[title={My Interview}][
   author={Jane Doe},
   year={2022},
   month={Decembre},
   bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext


> On 23 Feb 2023, at 10:21, Alex Leray via ntg-context  
> wrote:
> 
> Hello,
> 
> I'm trying to figure out how to design a chapter page for a custom head 
> section with uservariables defined.
> 
> I'd like to have the chapter page start on a right page. I'd like this page 
> to feature the title of the chapter (here: an interview) along with some 
> other info like the interviewee name and bio. All in a "fancy" layout.
> 
> I'm having issue putting it all together. The command parameter allow me to 
> override the content of the title but has some drawbacks (it seems to be 
> stuck in horizontal mode for instance).
> 
> I'm open to any solution but would find it nice to keep the 
> \startstopinterview structure.
> 
> Here is my code at the moment:
> 
> %%%
> 
> \define[2]\MyChapter{
>\starttabulate[|p(\layoutcolumnwidth)|p(\layoutcolumnwidth)|]
>\NC \structureuservariable{author} \NC \structureuservariable{bio} \NR
>\stoptabulate
> }
> 
> \definehead[interview][chapter]
> \setuphead[interview][
>page=right,
>command=\MyChapter,
>% insidesection={\page},
>style={\tfa},
> ]
> 
> 
> \starttext
> \startinterview[title={My Interview}][
>author={Jane Doe},
>year={2022},
>month={Decembre},
>bio={\input ward}
> ]
> 
> \dorecurse{10}{\input ward \crlf}
> \stopinterview
> \stoptext
> 
> %%%
> 
> Many thanks
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://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
> ___

—
Bruce Horrocks
Hampshire, UK

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

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


[NTG-context] Chapter cover page

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

Hello,

I'm trying to figure out how to design a chapter page for a custom head 
section with uservariables defined.


I'd like to have the chapter page start on a right page. I'd like this 
page to feature the title of the chapter (here: an interview) along with 
some other info like the interviewee name and bio. All in a "fancy" layout.


I'm having issue putting it all together. The command parameter allow me 
to override the content of the title but has some drawbacks (it seems to 
be stuck in horizontal mode for instance).


I'm open to any solution but would find it nice to keep the 
\startstopinterview structure.


Here is my code at the moment:

%%%

\define[2]\MyChapter{
\starttabulate[|p(\layoutcolumnwidth)|p(\layoutcolumnwidth)|]
\NC \structureuservariable{author} \NC 
\structureuservariable{bio} \NR

\stoptabulate
}

\definehead[interview][chapter]
\setuphead[interview][
page=right,
command=\MyChapter,
% insidesection={\page},
style={\tfa},
]


\starttext
\startinterview[title={My Interview}][
author={Jane Doe},
year={2022},
month={Decembre},
bio={\input ward}
]

\dorecurse{10}{\input ward \crlf}
\stopinterview
\stoptext

%%%

Many thanks

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

maillist : ntg-context@ntg.nl / https://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] Bug with \startnarrow?

2023-02-23 Thread Denis Maier via ntg-context
Hi,

While doing some more tests with my example from yesterday (tables in 
\startnarrow), I've realized that the example from the wiki doesn't seem to 
quite work as expected:

%%
\starttext
Some text before
\startnarrow[left=2cm,right=1cm,before={\blank[2*line]},after={\blank[halfline]}]
narrower text
\stopnarrow
some text after
\stoptext
%%

Already here, the extra margins on both sides seem to be equal. Changing the 
size of the left extra margin has no effect at all.

%%
\starttext
\startnarrow[left=10cm,right=2cm]
\input ward
\stopnarrow

but:

\setupnarrower[left=5cm, right=2cm]
\startnarrower[left,right]
\input ward
\stopnarrower
\stoptext
%%

Is this a bug or intended behaviour ?

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

maillist : ntg-context@ntg.nl / https://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] Spacing between headings

2023-02-23 Thread Denis Maier via ntg-context
Hi,

I want to make the spacing before headings conditional. Like, apply the spacing 
if the a heading follows some text, but not if it immediately follows a 
previous heading. This has been requested before : 
https://www.mail-archive.com/ntg-context@ntg.nl/msg63950.html

Does there exist a way now, to achieve this?

Best,
Denis

\setuphead
[section, subsection]
[number=yes]

\setuphead
[section]
[before={\blank[2*big]},
after={\blank[big]}]

\setuphead
[subsection]
[before={\blank[2*big]},
after={\blank[big]}]

\starttext

\section{A}
\input knuth

\subsection{B} % regular spacing here
\input knuth

\section{C}
\subsection{D} % less spacing here
\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 / 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
___