Re: [NTG-context] Trim blank space of a PDF page

2018-05-23 Thread Henri Menke
On 05/23/2018 01:25 AM, Procházka Lukáš Ing. wrote:
> Hello,
> 
> just curious - is threre a way how to crop a page of a PDF via ConTeXt?
> 
> Ideally - to process a single page PDF into another file, with the one
> page cropped...

It's not really clear what you want.  Are you looking for
\start...\stopTEXpage?

> 
> Best regards,
> 
> Lukas
> 
> 

___
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] Trim blank space of a PDF page

2018-05-22 Thread Procházka Lukáš Ing .

Hello,

just curious - is threre a way how to crop a page of a PDF via ConTeXt?

Ideally - to process a single page PDF into another file, with the one page 
cropped...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF

> This would be a solution:
> 
> Index term, and some
> text
>  21, 34, 45, 72, 89,
>101, 103, 109
> 
> where the rule is: when the numbers exceed the text width, close the
> paragraph, then start a new, right aligned one.
> 
> So i wrote this:
> 
> ---
> \def\wordorparagraphright#1{\let\scratchWidth\relax
>   \setbox\scratchbox=\hbox{#1}\newdimen\scratchWidth
>   \scratchWidth=\wd\scratchbox
>   \ifdim\scratchWidth < 0.9\textwidth
> \wordright{#1}%
>   \else
> \par
> \startalignment[flushright]#1\stopalignment
>   \fi}
> 
> \starttext
> \input sapolsky \wordorparagraphright{\it other text} \par
> \blank
> \input sapolsky \wordorparagraphright{\it other text, this time
> longer}
> \par
> \blank
> \input sapolsky \wordorparagraphright{\it other text, this time
> much much much much much much much much much much much much 
> much much much much much much much much much much longer} \par
> \stoptext
> ---
> 

This, instead, works also with registers:

-
--
\unexpanded\def\wordorparagraphright{\dosingleempty\WordOrParagraphRigh
t}

\def\WordOrParagraphRight[#1]{\groupedcommand{\setbox0\hbox\bgroup}
{\egroup\newdimen\myBoxWd\myBoxWd=\wd0
  \ifdim\myBoxWd < .7\hsize
\wordright{\box0}%
  \else
\startalignment[flushright]\leftskip=.3\hsize plus 1fil\unhbox0
\stopalignment
  \fi}}

\starttext
\input sapolsky \wordorparagraphright{\it other text} \par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time longer}
\par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time
much much much much much much much much much much much much 
much much much much much much much much much much longer} \par
\stoptext
---


A doubt: i'm using box0, is it dangerous?

I tried with scratchbox, but it doesn't work, then i moved to box0, and
it seems to work, even with a big file (with a big register too) of
mine.

___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
\wordright is ok until the numbers don't exceed the text width.

It manages these two cases right:

Index term, and some
text  21, 34, 45, 72

Index term, and some
text
  21, 34, 45, 72, 89

When the numbers exceed the text width, it fails:

Index term, and some
text
21, 34, 45, 72, 89, 101, 103, 109

It fails because it uses a hbox, that can't do nothing but running
beyond the right margin.

This would be a solution:

Index term, and some
text
 21, 34, 45, 72, 89,
   101, 103, 109

where the rule is: when the numbers exceed the text width, close the
paragraph, then start a new, right aligned one.

So i wrote this:

---
\def\wordorparagraphright#1{\let\scratchWidth\relax
  \setbox\scratchbox=\hbox{#1}\newdimen\scratchWidth
  \scratchWidth=\wd\scratchbox
  \ifdim\scratchWidth < 0.9\textwidth
\wordright{#1}%
  \else
\par
\startalignment[flushright]#1\stopalignment
  \fi}

\starttext
\input sapolsky \wordorparagraphright{\it other text} \par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time longer}
\par
\blank
\input sapolsky \wordorparagraphright{\it other text, this time
much much much much much much much much much much much much 
much much much much much much much much much much longer} \par
\stoptext
---

But it doesn't work with

---
\unprotect

\unexpanded\def\startregisterpages
   {\begingroup
\dostarttagged\t!registerpages\empty
\useregisterstyleandcolor\c!pagestyle\c!pagecolor
\registerparameter\c!pageleft}

\unexpanded\def\stopregisterpages
   {\registerparameter\c!pageright
\dostoptagged
\endgroup}

\protect

\def\wordorparagraphright#1{\let\scratchWidth\relax
 
\setbox\scratchbox=\hbox{#1}\newdimen\scratchWidth
 
\scratchWidth=\wd\scratchbox
  \ifdim\scratchWidth < 0.9\textwidth
\w
ordright{#1}%
  \else
\par
\startalignment[flushright]#1\stopalign
ment
  \fi}

\setupregister
   [index]
   [n=1,
alternative=A,
distance=0pt,
pageleft=\wordorparagraphright\bgroup,
pageright=\egroup]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext
---

I suppose it's related to the problem that \groupedcommand solves.
Is there a solution?

An even better solution would be:

Index term, and some
text 21, 34, 45, 72,
   89, 101, 103, 109

where the rule is: put the text until it fills the current line, than
proceed flushing the remainder of the paragraph lines to the right.

Here i tried changing \leftskip in the middle of a paragraph, but it
works globally.

I think this is even harder to implement, at least in the middle of the
register macros.
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread Hans Hagen

On 5/10/2018 12:35 PM, MF wrote:

This is a more polite version, that lets you restore the original
macros.

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\def\setupregisterpagescommand#1{%
   \unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }
   \unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}}
\def\resetregisterpagescommand{%
   \let\startregisterpages=\origstartregisterpages%
   \let\stopregisterpages=\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\setupregisterpagescommand{\wordright}
\placeindex
\page
\resetregisterpagescommand
\placeindex
\stoptext

btw, Hans, are you going to add an option to \setupregister? :)

knowing that wolfgang looked into it i just wait till he cooks up something

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 / 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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread Wolfgang Schuster
The following solution which adds two additional keys (pageleft and 
pageright)

is cleaner because it doesn’t have to overload commands.


\unprotect

\unexpanded\def\startregisterpages
  {\begingroup
   \dostarttagged\t!registerpages\empty
   \useregisterstyleandcolor\c!pagestyle\c!pagecolor
   \registerparameter\c!pageleft}

\unexpanded\def\stopregisterpages
  {\registerparameter\c!pageright
   \dostoptagged
   \endgroup}

\protect

\setupregister
  [index]
  [n=1,
   alternative=A,
   distance=0pt,
   pageleft=\wordright\bgroup,
   pageright=\egroup]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext


Wolfgang

MF <mailto:mass...@fastwebnet.it>
10. Mai 2018 um 12:35
This is a more polite version, that lets you restore the original
macros.

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\def\setupregisterpagescommand#1{%
\unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }
\unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}}
\def\resetregisterpagescommand{%
\let\startregisterpages=\origstartregisterpages%
\let\stopregisterpages=\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\setupregisterpagescommand{\wordright}
\placeindex
\page
\resetregisterpagescommand
\placeindex
\stoptext

btw, Hans, are you going to add an option to \setupregister? :)
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
This is a more polite version, that lets you restore the original
macros.

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\def\setupregisterpagescommand#1{%
  \unexpanded\def\startregisterpages{\origstartregisterpages#1\bgroup }
  \unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}}
\def\resetregisterpagescommand{%
  \let\startregisterpages=\origstartregisterpages%
  \let\stopregisterpages=\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\setupregisterpagescommand{\wordright}
\placeindex
\page
\resetregisterpagescommand
\placeindex
\stoptext

btw, Hans, are you going to add an option to \setupregister? :)
___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-10 Thread MF
Thanks Wolfgang and sorry if i reply to my mail, since i've downloaded
yours on another PC.

I've found these macros in strc-reg.mkiv, that are called right before
and after the page numbers:

\unexpanded\def\startregisterpages
  {\begingroup
   \dostarttagged\t!registerpages\empty
   \useregisterstyleandcolor\c!pagestyle\c!pagecolor}

\unexpanded\def\stopregisterpages
  {\dostoptagged
   \endgroup}

And this seems to work:

\let\origstartregisterpages=\startregisterpages%
\let\origstopregisterpages=\stopregisterpages%
\unexpanded\def\startregisterpages{\origstartregisterpages\wordright\bg
roup }
\unexpanded\def\stopregisterpages{\egroup\origstopregisterpages}

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext

I've also learned about \groupedcommand, which i did not know.
Again, thanks for you help.

Best wishes,
Massi


___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread Wolfgang Schuster

There is no option to apply a command to all page numbers but you can
add something after the register entry with the textcommand key.

Be aware this solution isn’t perfect because in the worst case
(narrow columns for the register or long entries) page numbers
can be split on multiple lines.

\setupregister
  [index]
  [n=1,
   alternative=A,
   textcommand=\groupedcommand{}{\hfill\quad}]

Wolfgang

MF <mailto:mass...@fastwebnet.it>
9. Mai 2018 um 17:09
Hello list,
i'd like moving the page numbers in my index to the right, with a
\wordright.

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext

The index is at page 4. I want to move the numbers "1,3" and "2" to the
right.
The parameter pagecommand is for the single page number, i want to put
a command (\wordright) around the whole block of page numbers.
How can i do that?

Greetings,
Massi


___
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] registers: how can I place a command around the whole of the page numbers of an index term?

2018-05-09 Thread MF
Hello list,
i'd like moving the page numbers in my index to the right, with a
\wordright.

\setupregister[index][n=1,alternative=A]

\starttext
\CONTEXT\index{\ConTeXt}
\page
\LATEX\index{\LaTeX}
\page
\CONTEXT\index{\ConTeXt}
\page
\placeindex
\stoptext

The index is at page 4. I want to move the numbers "1,3" and "2" to the
right.
The parameter pagecommand is for the single page number, i want to put
a command (\wordright) around the whole block of page numbers.
How can i do that?

Greetings,
Massi


___
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] keeping together \subject and a table without a page break

2018-05-03 Thread Robert Zydenbos
YES! Thank you!

> On 3. May 2018, at 13:07, Hans Hagen <j.ha...@xs4all.nl> wrote:
> 
> On 5/3/2018 12:22 PM, Robert Zydenbos wrote:
>> I am looking for a way to keep a subject header and a following table 
>> together on one page, without a page break. Something like:
>> […]
> you can put \testpage[4] before the \subsubject (number of lines you want)


___
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] keeping together \subject and a table without a page break

2018-05-03 Thread Hans Hagen

On 5/3/2018 12:22 PM, Robert Zydenbos wrote:

I am looking for a way to keep a subject header and a following table together 
on one page, without a page break. Something like:

---snippet begins---

\subsubject{Personal suffixes for the present tense}

\starttabulate 
[|w(.1\textwidth)|p(.2\textwidth)|pI(.2\textwidth)|p(.2\textwidth)|pI(.2\textwidth)|]
[…here comes the table…]
\stoptabulate

---snippet ends---

but everything together on one page. (The example uses \starttabulate, but I 
would also need this for \startTABLE.)

On the wiki I found a command \blank[samepage], but this does not seem to work 
(at least not in MkII), because the parameter 'samepage' is not recognized.

I would be very grateful for suggestions.

you can put \testpage[4] before the \subsubject (number of lines you want)


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

[NTG-context] keeping together \subject and a table without a page break

2018-05-03 Thread Robert Zydenbos
I am looking for a way to keep a subject header and a following table together 
on one page, without a page break. Something like:

---snippet begins---

\subsubject{Personal suffixes for the present tense}

\starttabulate 
[|w(.1\textwidth)|p(.2\textwidth)|pI(.2\textwidth)|p(.2\textwidth)|pI(.2\textwidth)|]
[…here comes the table…]
\stoptabulate

---snippet ends---

but everything together on one page. (The example uses \starttabulate, but I 
would also need this for \startTABLE.)

On the wiki I found a command \blank[samepage], but this does not seem to work 
(at least not in MkII), because the parameter 'samepage' is not recognized.

I would be very grateful for suggestions.

Robert
___
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] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Hans Hagen

On 3/5/2018 4:33 PM, Joseph Canedo wrote:
I see. So is it reliable to simply use lua function 
tex.getcount(‘realpageno’) in vertical mode to determine that page has 
changed ? Or do I need some other mechanism please ? If page has changed 
I agree that there is no need to deal with hangindent.


i don't know your logic but say that you have a dropped thingie that is 
5 lines high then you can check for available room


\setbox\scratchbox\hbox{...}
\getnoflines{\htdp\scratchbox}
\testpage[\noflines]

then you're for sure on the next page in which case your prevgraf is 
what you expect (assuming you stay on that page for a while)



I use grid typesetting so normally all lines have same height ?


they get snapped so they can take nlines

(the prevgraf variable just counts lines and doesn't look at the 
dimensions)



*De : *Hans Hagen <mailto:pra...@wxs.nl>
*Envoyé le :*lundi 5 mars 2018 16:06
*À : *ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
*Objet :*Re: [NTG-context] prevgraf change if page break occurs in a 
paragraph


On 3/5/2018 3:51 PM, Joseph Canedo wrote:

 > If I have a callback called just after paragraph has been split into

 > lines, would not be enough to count the number of hboxes in the vbox the

 > paragraph itself is contained ? Cannot say it’s ideal (easier to simply

 > read tex.prevgraf for sure), but might be possible, unless I missed

 > something (totally possible).

 >

 > In a couple of cases I see \prevgraf being larger than number of lines

 > of previous paragraph, including lines for paragraph before than one as

 > well. Could not create a MWE unfortunately to reproduce this case so far.

 >

 > I’ll try to amend my dropcaps/lettrine logic then. What are the reasons

 > behind this change in \prevgraf TeX primitive which AFAIK exists since

 > TeX has been written ? I thought that one of the strong points in TeX

 > was overall stability of its behaviour among versions. Here with this

 > semantic change in \prevgraf in recent luatex, this stability is a bit

 > broken IMO.

it's *not changed* in luatex .. context *itself* sets the prevgraf at

the next page as indicator of the left-over lines

say that you have:

XXX --

XXX --

--

--

- a page break between the first and second line is a bug in your code

- a page break after the second line is harmless and as we're on a new

page then there is nothing to be done i.e. prevgraf then is set to 2 (as

we have two lines if we look back)

say that you have:

XXX --

XXX

- if you get a page break here, again there is nothing to be done as

you're on a next page

- if you need to pick up in the next pagagraph (on the same page) then

prevgraf is 1

so, what in your case does it mean that when your next paragraph is on

the next page you look at prevgraf? there is no need to hangindent as

your hanging stuff is on the previous page

also, in general prevgraf is kind of useless when you have lines higher

than lineheight so if you use a callback, you also should calculate the

real accumulated drop so far

 > Joseph

 >

 > *De : *Hans Hagen <mailto:pra...@wxs.nl>

 > *Envoyé le :*lundi 5 mars 2018 10:15

 > *À : *ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>

 > *Objet :*Re: [NTG-context] prevgraf change if page break occurs in a

 > paragraph

 >

 > On 3/5/2018 9:43 AM, Joseph Canedo wrote:

 >

 >  > I see. I use prevgraf to get number of lines in most recent 
paragraph to


 >

 >  > compute eventually hangindent if there is a lettrine in paragraph (in

 >

 >  > case first paragraph has fewer lines than the lettrine itself, of 
course


 >

 >  > next paragraph needs to setup hangindent properly).

 >

 > but .. that one is then still on the same page; in fact, you should

 >

 > check for realpage being changed then

 >

 >  > I guess as an alternative, I could use the callback after paragraph is

 >

 >  > split in N lines to count the number of lines, or is this number 
can be


 >

 >  > accessed via some other existing variable in tex lua « table » ?

 >

 >  > Currently I access prevgraf value Inside lua. Probably better than

 >

 >  > making things more complicated in luatex itself.

 >

 > prevgraf is still ok after a 7 line paragraph but ... when you cross a

 >

 > page, and have say 4 lines moved to the next one, then a 7 line

 >

 > hangafter would be wrong (you can check if a par is on the same page)

 >

 > with callbacks after breaking in lines you still don't know ...

 >

 > Hans

 >

 > -

Re: [NTG-context] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Joseph Canedo
BTW, I could write a MWE for the case when \prevgraf aggregates number of lines 
for 2 paragraphs (sometimes).

\starttext

\dorecurse{15}{
One line par.\par\nobreak A\\ B\\ C\\ D\\ E\\ F\\ G\\ H\\ I\\ J\\ K\\ L \\M\\ N.

\the\prevgraf

}

\stoptext

In some cases when « One line par » appears at first line of page (except the 
first one in this MWE output at least), you might see « 15 » after N. line.

De : Joseph Canedo
Envoyé le :lundi 5 mars 2018 16:32
À : mailing list for ConTeXt users
Objet :RE: [NTG-context] prevgraf change if page break occurs in a paragraph

I see. So is it reliable to simply use lua function tex.getcount(‘realpageno’) 
in vertical mode to determine that page has changed ? Or do I need some other 
mechanism please ? If page has changed I agree that there is no need to deal 
with hangindent.

I use grid typesetting so normally all lines have same height ?

De : Hans Hagen
Envoyé le :lundi 5 mars 2018 16:06
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] prevgraf change if page break occurs in a paragraph

On 3/5/2018 3:51 PM, Joseph Canedo wrote:
> If I have a callback called just after paragraph has been split into 
> lines, would not be enough to count the number of hboxes in the vbox the 
> paragraph itself is contained ? Cannot say it’s ideal (easier to simply 
> read tex.prevgraf for sure), but might be possible, unless I missed 
> something (totally possible).
> 
> In a couple of cases I see \prevgraf being larger than number of lines 
> of previous paragraph, including lines for paragraph before than one as 
> well. Could not create a MWE unfortunately to reproduce this case so far.
> 
> I’ll try to amend my dropcaps/lettrine logic then. What are the reasons 
> behind this change in \prevgraf TeX primitive which AFAIK exists since 
> TeX has been written ? I thought that one of the strong points in TeX 
> was overall stability of its behaviour among versions. Here with this 
> semantic change in \prevgraf in recent luatex, this stability is a bit 
> broken IMO.

it's *not changed* in luatex .. context *itself* sets the prevgraf at 
the next page as indicator of the left-over lines

say that you have:

XXX --
XXX --
------
--

- a page break between the first and second line is a bug in your code
- a page break after the second line is harmless and as we're on a new 
page then there is nothing to be done i.e. prevgraf then is set to 2 (as 
we have two lines if we look back)

say that you have:

XXX --
XXX

- if you get a page break here, again there is nothing to be done as 
you're on a next page
- if you need to pick up in the next pagagraph (on the same page) then
prevgraf is 1

so, what in your case does it mean that when your next paragraph is on 
the next page you look at prevgraf? there is no need to hangindent as 
your hanging stuff is on the previous page

also, in general prevgraf is kind of useless when you have lines higher 
than lineheight so if you use a callback, you also should calculate the 
real accumulated drop so far

> Joseph
> 
> *De : *Hans Hagen <mailto:pra...@wxs.nl>
> *Envoyé le :*lundi 5 mars 2018 10:15
> *À : *ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
> *Objet :*Re: [NTG-context] prevgraf change if page break occurs in a 
> paragraph
> 
> On 3/5/2018 9:43 AM, Joseph Canedo wrote:
> 
>  > I see. I use prevgraf to get number of lines in most recent paragraph to
> 
>  > compute eventually hangindent if there is a lettrine in paragraph (in
> 
>  > case first paragraph has fewer lines than the lettrine itself, of course
> 
>  > next paragraph needs to setup hangindent properly).
> 
> but .. that one is then still on the same page; in fact, you should
> 
> check for realpage being changed then
> 
>  > I guess as an alternative, I could use the callback after paragraph is
> 
>  > split in N lines to count the number of lines, or is this number can be
> 
>  > accessed via some other existing variable in tex lua « table » ?
> 
>  > Currently I access prevgraf value Inside lua. Probably better than
> 
>  > making things more complicated in luatex itself.
> 
> prevgraf is still ok after a 7 line paragraph but ... when you cross a
> 
> page, and have say 4 lines moved to the next one, then a 7 line
> 
> hangafter would be wrong (you can check if a par is on the same page)
> 
> with callbacks after breaking in lines you still don't know ...
> 
> 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
&

Re: [NTG-context] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Joseph Canedo
I see. So is it reliable to simply use lua function tex.getcount(‘realpageno’) 
in vertical mode to determine that page has changed ? Or do I need some other 
mechanism please ? If page has changed I agree that there is no need to deal 
with hangindent.

I use grid typesetting so normally all lines have same height ?

De : Hans Hagen
Envoyé le :lundi 5 mars 2018 16:06
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] prevgraf change if page break occurs in a paragraph

On 3/5/2018 3:51 PM, Joseph Canedo wrote:
> If I have a callback called just after paragraph has been split into 
> lines, would not be enough to count the number of hboxes in the vbox the 
> paragraph itself is contained ? Cannot say it’s ideal (easier to simply 
> read tex.prevgraf for sure), but might be possible, unless I missed 
> something (totally possible).
> 
> In a couple of cases I see \prevgraf being larger than number of lines 
> of previous paragraph, including lines for paragraph before than one as 
> well. Could not create a MWE unfortunately to reproduce this case so far.
> 
> I’ll try to amend my dropcaps/lettrine logic then. What are the reasons 
> behind this change in \prevgraf TeX primitive which AFAIK exists since 
> TeX has been written ? I thought that one of the strong points in TeX 
> was overall stability of its behaviour among versions. Here with this 
> semantic change in \prevgraf in recent luatex, this stability is a bit 
> broken IMO.

it's *not changed* in luatex .. context *itself* sets the prevgraf at 
the next page as indicator of the left-over lines

say that you have:

XXX --
XXX --
------
--

- a page break between the first and second line is a bug in your code
- a page break after the second line is harmless and as we're on a new 
page then there is nothing to be done i.e. prevgraf then is set to 2 (as 
we have two lines if we look back)

say that you have:

XXX --
XXX

- if you get a page break here, again there is nothing to be done as 
you're on a next page
- if you need to pick up in the next pagagraph (on the same page) then
prevgraf is 1

so, what in your case does it mean that when your next paragraph is on 
the next page you look at prevgraf? there is no need to hangindent as 
your hanging stuff is on the previous page

also, in general prevgraf is kind of useless when you have lines higher 
than lineheight so if you use a callback, you also should calculate the 
real accumulated drop so far

> Joseph
> 
> *De : *Hans Hagen <mailto:pra...@wxs.nl>
> *Envoyé le :*lundi 5 mars 2018 10:15
> *À : *ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
> *Objet :*Re: [NTG-context] prevgraf change if page break occurs in a 
> paragraph
> 
> On 3/5/2018 9:43 AM, Joseph Canedo wrote:
> 
>  > I see. I use prevgraf to get number of lines in most recent paragraph to
> 
>  > compute eventually hangindent if there is a lettrine in paragraph (in
> 
>  > case first paragraph has fewer lines than the lettrine itself, of course
> 
>  > next paragraph needs to setup hangindent properly).
> 
> but .. that one is then still on the same page; in fact, you should
> 
> check for realpage being changed then
> 
>  > I guess as an alternative, I could use the callback after paragraph is
> 
>  > split in N lines to count the number of lines, or is this number can be
> 
>  > accessed via some other existing variable in tex lua « table » ?
> 
>  > Currently I access prevgraf value Inside lua. Probably better than
> 
>  > making things more complicated in luatex itself.
> 
> prevgraf is still ok after a 7 line paragraph but ... when you cross a
> 
> page, and have say 4 lines moved to the next one, then a 7 line
> 
> hangafter would be wrong (you can check if a par is on the same page)
> 
> with callbacks after breaking in lines you still don't know ...
> 
> 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 / 
> 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] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Hans Hagen

On 3/5/2018 3:51 PM, Joseph Canedo wrote:
If I have a callback called just after paragraph has been split into 
lines, would not be enough to count the number of hboxes in the vbox the 
paragraph itself is contained ? Cannot say it’s ideal (easier to simply 
read tex.prevgraf for sure), but might be possible, unless I missed 
something (totally possible).


In a couple of cases I see \prevgraf being larger than number of lines 
of previous paragraph, including lines for paragraph before than one as 
well. Could not create a MWE unfortunately to reproduce this case so far.


I’ll try to amend my dropcaps/lettrine logic then. What are the reasons 
behind this change in \prevgraf TeX primitive which AFAIK exists since 
TeX has been written ? I thought that one of the strong points in TeX 
was overall stability of its behaviour among versions. Here with this 
semantic change in \prevgraf in recent luatex, this stability is a bit 
broken IMO.


it's *not changed* in luatex .. context *itself* sets the prevgraf at 
the next page as indicator of the left-over lines


say that you have:

XXX --
XXX --
--
--

- a page break between the first and second line is a bug in your code
- a page break after the second line is harmless and as we're on a new 
page then there is nothing to be done i.e. prevgraf then is set to 2 (as 
we have two lines if we look back)


say that you have:

XXX --
XXX

- if you get a page break here, again there is nothing to be done as 
you're on a next page

- if you need to pick up in the next pagagraph (on the same page) then
prevgraf is 1

so, what in your case does it mean that when your next paragraph is on 
the next page you look at prevgraf? there is no need to hangindent as 
your hanging stuff is on the previous page


also, in general prevgraf is kind of useless when you have lines higher 
than lineheight so if you use a callback, you also should calculate the 
real accumulated drop so far



Joseph

*De : *Hans Hagen <mailto:pra...@wxs.nl>
*Envoyé le :*lundi 5 mars 2018 10:15
*À : *ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
*Objet :*Re: [NTG-context] prevgraf change if page break occurs in a 
paragraph


On 3/5/2018 9:43 AM, Joseph Canedo wrote:

 > I see. I use prevgraf to get number of lines in most recent paragraph to

 > compute eventually hangindent if there is a lettrine in paragraph (in

 > case first paragraph has fewer lines than the lettrine itself, of course

 > next paragraph needs to setup hangindent properly).

but .. that one is then still on the same page; in fact, you should

check for realpage being changed then

 > I guess as an alternative, I could use the callback after paragraph is

 > split in N lines to count the number of lines, or is this number can be

 > accessed via some other existing variable in tex lua « table » ?

 > Currently I access prevgraf value Inside lua. Probably better than

 > making things more complicated in luatex itself.

prevgraf is still ok after a 7 line paragraph but ... when you cross a

page, and have say 4 lines moved to the next one, then a 7 line

hangafter would be wrong (you can check if a par is on the same page)

with callbacks after breaking in lines you still don't know ...

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 / 
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
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 

Re: [NTG-context] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Joseph Canedo
If I have a callback called just after paragraph has been split into lines, 
would not be enough to count the number of hboxes in the vbox the paragraph 
itself is contained ? Cannot say it’s ideal (easier to simply read tex.prevgraf 
for sure), but might be possible, unless I missed something (totally possible).

In a couple of cases I see \prevgraf being larger than number of lines of 
previous paragraph, including lines for paragraph before than one as well. 
Could not create a MWE unfortunately to reproduce this case so far.

I’ll try to amend my dropcaps/lettrine logic then. What are the reasons behind 
this change in \prevgraf TeX primitive which AFAIK exists since TeX has been 
written ? I thought that one of the strong points in TeX was overall stability 
of its behaviour among versions. Here with this semantic change in \prevgraf in 
recent luatex, this stability is a bit broken IMO.

Joseph

De : Hans Hagen
Envoyé le :lundi 5 mars 2018 10:15
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] prevgraf change if page break occurs in a paragraph

On 3/5/2018 9:43 AM, Joseph Canedo wrote:
> I see. I use prevgraf to get number of lines in most recent paragraph to 
> compute eventually hangindent if there is a lettrine in paragraph (in 
> case first paragraph has fewer lines than the lettrine itself, of course 
> next paragraph needs to setup hangindent properly).

but .. that one is then still on the same page; in fact, you should 
check for realpage being changed then

> I guess as an alternative, I could use the callback after paragraph is 
> split in N lines to count the number of lines, or is this number can be 
> accessed via some other existing variable in tex lua « table » ? 
> Currently I access prevgraf value Inside lua. Probably better than 
> making things more complicated in luatex itself.
prevgraf is still ok after a 7 line paragraph but ... when you cross a 
page, and have say 4 lines moved to the next one, then a 7 line 
hangafter would be wrong (you can check if a par is on the same page)

with callbacks after breaking in lines you still don't know ...

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 / 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] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Hans Hagen

On 3/5/2018 9:43 AM, Joseph Canedo wrote:
I see. I use prevgraf to get number of lines in most recent paragraph to 
compute eventually hangindent if there is a lettrine in paragraph (in 
case first paragraph has fewer lines than the lettrine itself, of course 
next paragraph needs to setup hangindent properly).


but .. that one is then still on the same page; in fact, you should 
check for realpage being changed then


I guess as an alternative, I could use the callback after paragraph is 
split in N lines to count the number of lines, or is this number can be 
accessed via some other existing variable in tex lua « table » ? 
Currently I access prevgraf value Inside lua. Probably better than 
making things more complicated in luatex itself.
prevgraf is still ok after a 7 line paragraph but ... when you cross a 
page, and have say 4 lines moved to the next one, then a 7 line 
hangafter would be wrong (you can check if a par is on the same page)


with callbacks after breaking in lines you still don't know ...

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 / 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] prevgraf change if page break occurs in a paragraph

2018-03-05 Thread Joseph Canedo
I see. I use prevgraf to get number of lines in most recent paragraph to 
compute eventually hangindent if there is a lettrine in paragraph (in case 
first paragraph has fewer lines than the lettrine itself, of course next 
paragraph needs to setup hangindent properly).

I guess as an alternative, I could use the callback after paragraph is split in 
N lines to count the number of lines, or is this number can be accessed via 
some other existing variable in tex lua « table » ? Currently I access prevgraf 
value Inside lua. Probably better than making things more complicated in luatex 
itself.

Thanks a lot,

Joseph

De : Hans Hagen
Envoyé le :lundi 5 mars 2018 08:58
À : ntg-context@ntg.nl
Objet :Re: [NTG-context] prevgraf change if page break occurs in a paragraph

On 3/4/2018 10:59 PM, Joseph Canedo wrote:

> I am aware that ConTeXt betas might use experimental luaTeX changes (I 
> use both stable and latest and run both), just wanted to report a change 

not really, as we don't ship beta luatex's so context normally either 
has adaptive code or delays usage for a year

> in prevgraf result. Apparently with latest beta it reports the number of 
> lines in last page of paragraph (only tested with pars on 2 pages 
> maximum, haven’t tried longer ones). Simple MWE reproduces the case:
> 
> \starttext
> 
> \dorecurse{15}{
> 
> A\\ B\\ C\\ D\\ E\\ F\\ G\\ H\\ I\\ J\\ K\\ L \\M\\ N.
> 
> \the\prevgraf
> 
> }
> 
> \stoptext
> 
> Using ConTeXt online always reports « 14 » after the letters, latest 
> ConTeXt reports different numbers if the par before it has been split in 
> 2 pages.
well, i could store the old prevgraf (of make that an option) but it's a 
fact that a top of page is basically a change (in prevgraf and prevdepth)

what do you use prevgraf for?

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 / 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] prevgraf change if page break occurs in a paragraph

2018-03-04 Thread Hans Hagen

On 3/4/2018 10:59 PM, Joseph Canedo wrote:

I am aware that ConTeXt betas might use experimental luaTeX changes (I 
use both stable and latest and run both), just wanted to report a change 


not really, as we don't ship beta luatex's so context normally either 
has adaptive code or delays usage for a year


in prevgraf result. Apparently with latest beta it reports the number of 
lines in last page of paragraph (only tested with pars on 2 pages 
maximum, haven’t tried longer ones). Simple MWE reproduces the case:


\starttext

\dorecurse{15}{

A\\ B\\ C\\ D\\ E\\ F\\ G\\ H\\ I\\ J\\ K\\ L \\M\\ N.

\the\prevgraf

}

\stoptext

Using ConTeXt online always reports « 14 » after the letters, latest 
ConTeXt reports different numbers if the par before it has been split in 
2 pages.
well, i could store the old prevgraf (of make that an option) but it's a 
fact that a top of page is basically a change (in prevgraf and prevdepth)


what do you use prevgraf for?

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 / 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] prevgraf change if page break occurs in a paragraph

2018-03-04 Thread Joseph Canedo
Hello,

I am aware that ConTeXt betas might use experimental luaTeX changes (I use both 
stable and latest and run both), just wanted to report a change in prevgraf 
result. Apparently with latest beta it reports the number of lines in last page 
of paragraph (only tested with pars on 2 pages maximum, haven’t tried longer 
ones). Simple MWE reproduces the case:

\starttext

\dorecurse{15}{
A\\ B\\ C\\ D\\ E\\ F\\ G\\ H\\ I\\ J\\ K\\ L \\M\\ N.

\the\prevgraf

}

\stoptext

Using ConTeXt online always reports « 14 » after the letters, latest ConTeXt 
reports different numbers if the par before it has been split in 2 pages.

Thanks

Joseph

___
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] page-ini.lua, was Re: option for printing range

2018-02-24 Thread Hans Hagen

On 2/24/2018 9:29 PM, Rik Kabel wrote:

On 2018-02-24 13:50, Hans Hagen wrote:

On 2/24/2018 11:31 AM, Pablo Rodriguez wrote:

Hans,

would it be possible to add an key to \setupinteractionscreen that
implements the /PrintPageRange key in the /ViewerPreferences dictionary
(https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=373)? 



For example, "\setupinteractionscreen[range={2, 4-7, 10}]" should add
the "/PrintPageRange [1 1 3 6 9 9]" in /ViewerPreferences. (BTW, the key
name is the first one that came to my mind.)

This is extremely useful to help the user to print only the required
pages and not the whole document (which may be required only for viewing
purposes).
well, 'extremely' is a bit of a exaggeration i guess as most of these 
fancy acrobat only features are hardly used or requested (i still have 
to meet a publisher who wants anything fancy pdf anyway) so we're 
talking of yet another feature creep that probably only one person 
will use


anyway, that said, as we use abstraction and as we don't know pages in 
advance the only way i'm willing to support it is by using the 
(probably unknown) marked pages feature


\setupinteractionscreen
  [print={foo,oof}]

\starttext

% \markpage[foo][1,4,5]
% \markpage[foo][+2]

\markpage[foo] foo \page
\markpage[foo] foo \page
\markpage[oof] oof \page
\markpage[bar] bar \page
\markpage[foo] foo \page
\markpage[foo] foo \page
\markpage[bar] bar \page
\markpage[foo] foo \page
\markpage[oof] oof \page
\markpage[bar] bar \page

\stoptext

Hans,

A question on the code in page-ini.lua.

Should there be a test for a '-' with subtraction from realpage if 
present, as there is for '+' and addition to realpage, around line 
number 28-30, or is it the case that it does not make sense to mark a 
prior page? (If it does not make sense, why parse the '-'?)
i can't figure a reasonable meaning for minus (after all, we're past 
that page then and this mechanism is for testing pages)


just to make sure that we have a number (but we ignore a -)

btw, a few decases ago we had a similar feature which we used to inject 
pages from a different bin in the printer


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 / 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] page-ini.lua, was Re: option for printing range

2018-02-24 Thread Rik Kabel

On 2018-02-24 13:50, Hans Hagen wrote:

On 2/24/2018 11:31 AM, Pablo Rodriguez wrote:

Hans,

would it be possible to add an key to \setupinteractionscreen that
implements the /PrintPageRange key in the /ViewerPreferences dictionary
(https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=373)? 



For example, "\setupinteractionscreen[range={2, 4-7, 10}]" should add
the "/PrintPageRange [1 1 3 6 9 9]" in /ViewerPreferences. (BTW, the key
name is the first one that came to my mind.)

This is extremely useful to help the user to print only the required
pages and not the whole document (which may be required only for viewing
purposes).
well, 'extremely' is a bit of a exaggeration i guess as most of these 
fancy acrobat only features are hardly used or requested (i still have 
to meet a publisher who wants anything fancy pdf anyway) so we're 
talking of yet another feature creep that probably only one person 
will use


anyway, that said, as we use abstraction and as we don't know pages in 
advance the only way i'm willing to support it is by using the 
(probably unknown) marked pages feature


\setupinteractionscreen
  [print={foo,oof}]

\starttext

% \markpage[foo][1,4,5]
% \markpage[foo][+2]

\markpage[foo] foo \page
\markpage[foo] foo \page
\markpage[oof] oof \page
\markpage[bar] bar \page
\markpage[foo] foo \page
\markpage[foo] foo \page
\markpage[bar] bar \page
\markpage[foo] foo \page
\markpage[oof] oof \page
\markpage[bar] bar \page

\stoptext

Hans,

A question on the code in page-ini.lua.

Should there be a test for a '-' with subtraction from realpage if 
present, as there is for '+' and addition to realpage, around line 
number 28-30, or is it the case that it does not make sense to mark a 
prior page? (If it does not make sense, why parse the '-'?)


--
Rik
___
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] show header text only on first page of chapter

2018-02-20 Thread Henning Hraban Ramm
Thank you, but I don’t know how to use that in my setup.
Since my rubric has to be in a defined place and I didn’t manage to achieve 
that with header setups, I used \setlayer with \getmarking[part]

Would that defined text behave differently than the part "marker"? And how do I 
get at that?

Since I must complete that damned layout tonight, I’ll resolve to setting the 
rubric manually. :(

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

Am 2018-02-20 um 17:56 schrieb Wolfgang Schuster :

> 
>> Henning Hraban Ramm 20. Februar 2018 um 17:35
>> Hi Wolfgang,
>> thank you very much - does that mean it’s not possible to use the part title?
> 
> \definetext[henning][header][part]
> 
> \setuphead[part][placehead=empty]
> 
> \setuphead[chapter][header=henning]
> 
> \starttext
> 
> \dorecurse{3}
>   {\expanded{\part{Rubrik \recurselevel}}
>\dorecurse{5}
>  {\expanded{\chapter{Kapitel \recurselevel}}
>   \dorecurse{10}{\input{lorem}\par}}}
> 
> \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
> ___

___
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] show header text only on first page of chapter

2018-02-20 Thread Wolfgang Schuster



Henning Hraban Ramm 
20. Februar 2018 um 17:35
Hi Wolfgang,
thank you very much - does that mean it’s not possible to use the part 
title?


\definetext[henning][header][part]

\setuphead[part][placehead=empty]

\setuphead[chapter][header=henning]

\starttext

\dorecurse{3}
  {\expanded{\part{Rubrik \recurselevel}}
   \dorecurse{5}
 {\expanded{\chapter{Kapitel \recurselevel}}
  \dorecurse{10}{\input{lorem}\par}}}

\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] show header text only on first page of chapter

2018-02-20 Thread Henning Hraban Ramm
Hi Wolfgang,
thank you very much - does that mean it’s not possible to use the part title?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

Am 2018-02-20 um 17:17 schrieb Wolfgang Schuster :

> \definetext[henning][header][chapter]
> 
> \setuphead[chapter][header=henning]
> 
> \starttext
> 
> \dorecurse{5}
>   {\expanded{\chapter{Kapitel \recurselevel}}
>\dorecurse{10}{\input{lorem}\par}}
> 
> \stoptext
> 
> Wolfgang
> 
>> Henning Hraban Ramm 20. Februar 2018 um 15:30
>> 
>> I tried something like:
>> 
>> \def\SetPart{%
>> \setlayerframed[background]%
>> [y=10mm,x=20mm,]%
>> {\getmarking[part]}
>> }
>> \setuphead[chapter][after={\SetPart}]
>> 
>> But I always get the name of the previous part. :(
>> 
>> 
>> Greetlings, Hraban
>> ---
>> http://www.fiee.net
>> http://wiki.contextgarden.net
>> GPG Key ID 1C9B22FD
>> 
>> ___
>> 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
___

Re: [NTG-context] show header text only on first page of chapter

2018-02-20 Thread Wolfgang Schuster

\definetext[henning][header][chapter]

\setuphead[chapter][header=henning]

\starttext

\dorecurse{5}
  {\expanded{\chapter{Kapitel \recurselevel}}
   \dorecurse{10}{\input{lorem}\par}}

\stoptext

Wolfgang


Henning Hraban Ramm 
20. Februar 2018 um 15:30

I tried something like:

\def\SetPart{%
\setlayerframed[background]%
[y=10mm,x=20mm,]%
{\getmarking[part]}
}
\setuphead[chapter][after={\SetPart}]

But I always get the name of the previous part. :(


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] show header text only on first page of chapter

2018-02-20 Thread Henning Hraban Ramm
Am 2018-02-20 um 12:30 schrieb Henning Hraban Ramm <te...@fiee.net>:

> Hello again,
> 
> in my current magazine layout I’m abusing the part structure as a rubric, 
> i.e. the part title shows up only in the header and in the ToC.
> That works nicely so far, but I must show the rubric header only on the first 
> page of a chapter (article).
> 
> Which approach would you suggest?
> In my experience, it’s hard to find the right place for \setupheader(texts) 
> so that it affects the right page(s).

I tried something like:

\def\SetPart{%
  \setlayerframed[background]%
  [y=10mm,x=20mm,]%
  {\getmarking[part]}
}
\setuphead[chapter][after={\SetPart}]

But I always get the name of the previous part. :(


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] show header text only on first page of chapter

2018-02-20 Thread Henning Hraban Ramm
Hello again,

in my current magazine layout I’m abusing the part structure as a rubric, i.e. 
the part title shows up only in the header and in the ToC.
That works nicely so far, but I must show the rubric header only on the first 
page of a chapter (article).

Which approach would you suggest?
In my experience, it’s hard to find the right place for \setupheader(texts) so 
that it affects the right page(s).


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] avoiding space on top of a page

2018-02-11 Thread Wolfgang Schuster



Henning Hraban Ramm <mailto:te...@fiee.net>
11. Februar 2018 um 16:00
Ahoi,
I configured my section titles to have a line of space (\blank[big]) 
before and after the title.
But if the section starts on a new page, the title should start in the 
first line.

I couldn’t find the right combination of \blank options...

\setuplayout[grid=yes]
\setuphead[section][
page=no,
style={\bf},
before={\testpage[4]\startlinecorrection\blank[medium,back]},
after={\blank[small,max]\stoplinecorrection},
]


\setuphead
  [...]
  [before={\testpage[5]\blank[...]\startlinecorrection},
   after={\stoplinecorrection\blank[...]}]

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] avoiding space on top of a page

2018-02-11 Thread Henning Hraban Ramm
Ahoi,
I configured my section titles to have a line of space (\blank[big]) before and 
after the title.
But if the section starts on a new page, the title should start in the first 
line.
I couldn’t find the right combination of \blank options...

\setuplayout[grid=yes]
\setuphead[section][
page=no,
style={\bf},
before={\testpage[4]\startlinecorrection\blank[medium,back]},
after={\blank[small,max]\stoplinecorrection},
]

(Please find working example attached.)

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD


sectiontest.tex
Description: Binary data
___
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] text on every page howto

2018-02-02 Thread Otared Kavian
Hi,

I think the following can solve your problem, but I don’t know whether it is 
the optimal way to achieve what you are looking for: in any case you can play 
with the dimensions used here as an example, in order to find the correct 
location.

Best regards: OK
%% begin rotated-text.tex
\define\myrotatedtext{%
\rotate[rotation=90]{%
\scale[width=50mm]{\startcolor[darkred] my rotated text\stopcolor}
}
}

\definelayer[myrotatedlayer]
[width=30mm,
height=100mm,
repeat=yes]

\setlayer[myrotatedlayer]
[x=180mm,y=100mm]
{\myrotatedtext}
 

\setupbackgrounds[page][background=myrotatedlayer]

\starttext

\input knuth

\stoptext
%% end rotated-text.tex



> On 2 Feb 2018, at 12:41, dr. Hans van der Meer <havdm...@ziggo.nl> wrote:
> 
> I would like to put a (rotated) text on every page in the margin.
> Please, how do I accomplish this?
> 
> Hans van der Meer
> 
> 
> ___
> 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] text on every page howto

2018-02-02 Thread dr. Hans van der Meer
I would like to put a (rotated) text on every page in the margin.
Please, how do I accomplish this?

Hans van der Meer


___
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] Bug: Paragraph formatting on new page after placefigure

2018-01-12 Thread Hans Hagen

On 1/12/2018 6:44 PM, Rik Kabel wrote:

Bump.

This has come up a few times, but never resolved.

Is there the possibility of an option for placefigure to discard 
remaining depth at a page break?


it's more a aside effect of operating at the edge of the page (i'm 
reluctant to change this mechanism as at soem point we should stick to 
what we have ... it already changed a few times)


just move up the figure a bit:

\placefigure
  [right,high][]{caption}
  {\externalfigure[nop][width=0.5\textwidth,height=19cm]}

or limit the height


--
Rik

On 2015-08-25 10:14, Rik Kabel wrote:

On 2015-08-25 03:41, Andreas Becker wrote:

ConTeXt version: 2015.08.21 19:57

In the PDF output of the following code, the first text line on the second page 
only
spans half the textwidth. However, below the figure, the text should span the
whole width.

\starttext
\placefigure[right][]{caption}
{
\externalfigure[nop][width=0.5\textwidth,height=19cm]
}
\input lorem
\input lorem
\input lorem
\stoptext



Andreas,

This is a long-recognized issue that appears to have no resolution. It 
was previously raised by Gerhard Kugler in March 2007 (figure occupies 
space into next page 
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg21273.html>) and 
by me in March 2014 (Caption whitespace overflows page 
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg73904.html>) and 
possibly by others I did not come across.


The only resolution I have found is to reduce the size of the figure 
enough to prevent the reserved space from intruding on the text area 
of the next page.


--
Rik Kabel




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




--

-
  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] Bug: Paragraph formatting on new page after placefigure

2018-01-12 Thread Rik Kabel

Bump.

This has come up a few times, but never resolved.

Is there the possibility of an option for placefigure to discard 
remaining depth at a page break?


--
Rik

On 2015-08-25 10:14, Rik Kabel wrote:

On 2015-08-25 03:41, Andreas Becker wrote:

ConTeXt version: 2015.08.21 19:57

In the PDF output of the following code, the first text line on the second page 
only
spans half the textwidth. However, below the figure, the text should span the
whole width.

\starttext
\placefigure[right][]{caption}
{
\externalfigure[nop][width=0.5\textwidth,height=19cm]
}
\input lorem
\input lorem
\input lorem
\stoptext



Andreas,

This is a long-recognized issue that appears to have no resolution. It 
was previously raised by Gerhard Kugler in March 2007 (figure occupies 
space into next page 
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg21273.html>) and 
by me in March 2014 (Caption whitespace overflows page 
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg73904.html>) and 
possibly by others I did not come across.


The only resolution I have found is to reduce the size of the figure 
enough to prevent the reserved space from intruding on the text area 
of the next page.


--
Rik Kabel


___
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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Hans Hagen

On 12/20/2017 6:44 PM, Aditya Mahajan wrote:

On Wed, 20 Dec 2017, Hans Hagen wrote:


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]



I recently had a problem where \testpage was misbehaving while 
\testpagesyncronized worked correctly. The example above is another 
situation where syncronization solves the problem.


that is actually more tricky as trying toi sync the page buildern (and 
spacing) is rather sensitive


Does syncronization have any drawbacks (other than speed)? If not, then 
what is the overhead of "synchronizing everything"? ConTeXt is quite 
fast, and I for one, wouldn't mind a few mili second delay in each 
compilation for saving a few hours of debugging time!
normally i can deal with the speed (in this case it's probably not 
measurable) and normally i manage to add features without much of a 
penalty (of course sometimes it can mean hours of programming and 
testing) ... speaking of speed, probably no one notices when context 
becomes faster (mkiv definitely has not become slower over the years) 
unless the fact that no one complains is a good sign


concerning syncing each time ... i can think of it but it needs an extra 
set of state variables per head then (and probbaly a way to turn that 
trickery off)



-
  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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Hans Hagen

On 12/20/2017 6:40 PM, Aditya Mahajan wrote:

On Wed, 20 Dec 2017, Hans Hagen wrote:

 Forwarded Message 
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen <pra...@wxs.nl>
To: Henri <henrime...@gmail.com>

On 12/19/2017 9:15 PM, Henri wrote:

 Dear list,

 Motivated by
 https://tex.stackexchange.com/questions/406892
 I wanted to disable page breaks for parts.  This works on all pages,
 except the first page of a
 document.  Why?  MWE is below as always.  Reproducible with TL 2017 and
 latest beta.

 Cheers, Henri



 \setuphead
    [part]
    [page=no]

 \starttext

 \startpart[title=Part One]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart
   \startpart[title=Part Two]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart

 \stoptext
this relates to the fatc that there has to be some node on the page 
that registers the part information and as chapter flushes a page that 
one ends up on a page then


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]

%  solution 2:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\appendtoks
   \synchronizehead{part}%
\to \everybeforepagebody

%  solution 3 (new in beta):

\setuphead
  [part]
  [placehead=section]

This will delay the flush till the next section head gets place. It's 
still not 100% predictable but it might work out ok in most cases.


Another option, that I posted on Tex.se is:

\setuphead[chapter][continue=no]

So that the page is not flushed by \startchapter immediate after a 
\startpart.
there is still a (potentially) interfering node then (which can then be 
seen from the chapter line starting lower)


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 / 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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Aditya Mahajan

On Wed, 20 Dec 2017, Hans Hagen wrote:


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]



I recently had a problem where \testpage was misbehaving while 
\testpagesyncronized worked correctly. The example above is another 
situation where syncronization solves the problem.


Does syncronization have any drawbacks (other than speed)? If not, then 
what is the overhead of "synchronizing everything"? ConTeXt is quite fast, 
and I for one, wouldn't mind a few mili second delay in each compilation 
for saving a few hours of debugging time!


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
___

Re: [NTG-context] Fwd: Re: Stray blank page with part

2017-12-20 Thread Aditya Mahajan

On Wed, 20 Dec 2017, Hans Hagen wrote:

 Forwarded Message 
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen <pra...@wxs.nl>
To: Henri <henrime...@gmail.com>

On 12/19/2017 9:15 PM, Henri wrote:

 Dear list,

 Motivated by
 https://tex.stackexchange.com/questions/406892
 I wanted to disable page breaks for parts.  This works on all pages,
 except the first page of a
 document.  Why?  MWE is below as always.  Reproducible with TL 2017 and
 latest beta.

 Cheers, Henri



 \setuphead
    [part]
    [page=no]

 \starttext

 \startpart[title=Part One]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart
   \startpart[title=Part Two]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart

 \stoptext
this relates to the fatc that there has to be some node on the page that 
registers the part information and as chapter flushes a page that one ends up 
on a page then


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]

%  solution 2:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\appendtoks
   \synchronizehead{part}%
\to \everybeforepagebody

%  solution 3 (new in beta):

\setuphead
  [part]
  [placehead=section]

This will delay the flush till the next section head gets place. It's still 
not 100% predictable but it might work out ok in most cases.


Another option, that I posted on Tex.se is:

\setuphead[chapter][continue=no]

So that the page is not flushed by \startchapter immediate after a 
\startpart.


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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Hans Hagen




 Forwarded Message 
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen <pra...@wxs.nl>
To: Henri <henrime...@gmail.com>

On 12/19/2017 9:15 PM, Henri wrote:

Dear list,

Motivated by
https://tex.stackexchange.com/questions/406892
I wanted to disable page breaks for parts.  This works on all pages, except the 
first page of a
document.  Why?  MWE is below as always.  Reproducible with TL 2017 and latest 
beta.

Cheers, Henri



\setuphead
   [part]
   [page=no]

\starttext

\startpart[title=Part One]
   \startchapter[title=Chapter One]
   \stopchapter
   \startchapter[title=Chapter Two]
   \stopchapter
\stoppart
  
\startpart[title=Part Two]

   \startchapter[title=Chapter One]
   \stopchapter
   \startchapter[title=Chapter Two]
   \stopchapter
\stoppart

\stoptext
this relates to the fatc that there has to be some node on the page that 
registers the part information and as chapter flushes a page that one 
ends up on a page then


% solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]

% solution 2:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\appendtoks
\synchronizehead{part}%
\to \everybeforepagebody

% solution 3 (new in beta):

\setuphead
  [part]
  [placehead=section]

This will delay the flush till the next section head gets place. It's 
still not 100% predictable but it might work out ok in most cases.


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 / 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] Stray blank page with part

2017-12-19 Thread Henri
Dear list,

Motivated by
https://tex.stackexchange.com/questions/406892
I wanted to disable page breaks for parts.  This works on all pages, except the 
first page of a
document.  Why?  MWE is below as always.  Reproducible with TL 2017 and latest 
beta.

Cheers, Henri



\setuphead
  [part]
  [page=no]

\starttext

\startpart[title=Part One]
  \startchapter[title=Chapter One]
  \stopchapter
  \startchapter[title=Chapter Two]
  \stopchapter
\stoppart
 
\startpart[title=Part Two]
  \startchapter[title=Chapter One]
  \stopchapter
  \startchapter[title=Chapter Two]
  \stopchapter
\stoppart

\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] Page printed upside down

2017-10-24 Thread Fabrice Couvreur
Hi Pablo,
I like to separate so that students concentrate their reading, but it's my
point of view that is not scientific.
Fabrice

2017-10-23 17:22 GMT+02:00 Pablo Rodriguez :

> On 10/23/2017 12:34 PM, Fabrice Couvreur wrote:
> > Hi Pablo,
> > Thank you for the links and for your help. I'm going to look at Metafun
> > for the vertical line.
>
> Hi Fabrice,
>
> I know that curiosity killed the cat, but why do you need the vertical
> line?
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> 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] Page printed upside down

2017-10-23 Thread Pablo Rodriguez
On 10/23/2017 12:34 PM, Fabrice Couvreur wrote:
> Hi Pablo,
> Thank you for the links and for your help. I'm going to look at Metafun
> for the vertical line.

Hi Fabrice,

I know that curiosity killed the cat, but why do you need the vertical line?

Pablo
-- 
http://www.ousia.tk
___
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] Page printed upside down

2017-10-23 Thread Fabrice Couvreur
Hi Pablo,
Thank you for the links and for your help. I'm going to look at Metafun for
the vertical line.
Fabrice

2017-10-22 9:48 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:

> On 10/21/2017 11:45 PM, Fabrice Couvreur wrote:
> > Hi Pablo,
> > Sorry for the late response. I did some tests before answering to
> > understand your explanations.
>
> Hi Fabrice,
>
> the basic idea is the paper orientation matches the printing option (if
> any).
>
> > - With the command \setupinteractionscreen [option = landscape] and
> > without selecting anything in Acrobat, I get a document in double-sided
> > portrait mode but the back side is upside down
>
> \setupinteractionscreen[option=portrait] would be the right option here.
> It is double-sided (duplex) printing for portrait orientation.
>
> Consider that ConTeXt has \setuppapersize[A4, portrait] as default.
>
> > - With the command \setuppapersize [A4, landscape] and without
> > selecting anything in Acrobat, I get two documents in landscape mode in
> > the same direction
>
> You got two printed sheets instead of one. To get only one, you need to
> specify duplex printing (as explained above). Otherwise, your printer
> would print as its default properties specify.
>
> There is even a \setupinteractionscreen[option=page] option, which
> enables single-sided (or simplex) printing. This is required for
> printers that are configured to print doublesided per default.
>
> > I think it's clear now, thank you.
>
> I hope it may be clearer after my explanation.
>
> > I did a try to get a booklet but the result is not correct because the
> > text or formulas of mathematics are overflowing in the colums
>
> Sorry, but overflowing is normal here, the formula has too many data to
> fit in that column width.
>
> I would discourage the use of columns to create the booklet.
>
> My advice would be to compose the standard text and then impose the pages:
>
> \starttext
>   \dorecurse{4}{\chapter{Chapter \Romannumerals{\recurselevel}}
>   \section{\TeX}\input knuth\par
> \section{Zapf}\input zapf\par
> \section{Math}
> \startformula
> \startmathalignment[n=2,align={left,left}]
> \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 +
> 400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR
> \NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
> \NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
> \stopmathalignment
> \stopformula}
> \stoptext
>
> And then use the following code with the output PDF document from the
> code above:
>
> \setuppapersize [A5][A4,landscape]
> \setupexternalfigures[interaction=all]
> \enabledirectives[references.border]
> \setuparranging [2UP]
> \setuplayout
>   [backspace=0pt,
> topspace=0pt,
>width=middle,
>   height=middle,
> location=middle,
>   header=0pt,
>   footer=0pt]
> \setupinteraction[state=start]
> \setupinteractionscreen[option={landscape, fixed, paper}]
> \starttext
> \insertpages[document.pdf][width=0pt]
> \stoptext
>
> You should get something similar to the attached booklet.
>
> Of course, you may have to increase font size in the original document.
> But to know which increase in size the font needs, you have to check it
> in the printed version of the final booklet.
>
> With an already released booklet,
> https://github.com/ousia/from-pandoc-to-context/blob/master/
> doc/from-pandoc-to-context_A4.pdf
> is the basis to be imposed in the final booklet
> https://github.com/ousia/from-pandoc-to-context/blob/master/
> doc/from-pandoc-to-context_A4-booklet.pdf.
>
> The approach I’m suggesting is simpler and easier to implement.
>
> Just in case it helps,
>
> Pablo
> --
> http://www.ousia.tk
>
> 
> ___
> 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] Page printed upside down

2017-10-22 Thread Pablo Rodriguez
On 10/21/2017 11:45 PM, Fabrice Couvreur wrote:
> Hi Pablo,
> Sorry for the late response. I did some tests before answering to
> understand your explanations.

Hi Fabrice,

the basic idea is the paper orientation matches the printing option (if
any).

> - With the command \setupinteractionscreen [option = landscape] and
> without selecting anything in Acrobat, I get a document in double-sided
> portrait mode but the back side is upside down

\setupinteractionscreen[option=portrait] would be the right option here.
It is double-sided (duplex) printing for portrait orientation.

Consider that ConTeXt has \setuppapersize[A4, portrait] as default.

> - With the command \setuppapersize [A4, landscape] and without
> selecting anything in Acrobat, I get two documents in landscape mode in
> the same direction

You got two printed sheets instead of one. To get only one, you need to
specify duplex printing (as explained above). Otherwise, your printer
would print as its default properties specify.

There is even a \setupinteractionscreen[option=page] option, which
enables single-sided (or simplex) printing. This is required for
printers that are configured to print doublesided per default.

> I think it's clear now, thank you.

I hope it may be clearer after my explanation.

> I did a try to get a booklet but the result is not correct because the
> text or formulas of mathematics are overflowing in the colums

Sorry, but overflowing is normal here, the formula has too many data to
fit in that column width.

I would discourage the use of columns to create the booklet.

My advice would be to compose the standard text and then impose the pages:

\starttext
  \dorecurse{4}{\chapter{Chapter \Romannumerals{\recurselevel}}
  \section{\TeX}\input knuth\par
\section{Zapf}\input zapf\par
\section{Math}
\startformula
\startmathalignment[n=2,align={left,left}]
\NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 +
400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR
\NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
\NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
\stopmathalignment
\stopformula}
\stoptext

And then use the following code with the output PDF document from the
code above:

\setuppapersize [A5][A4,landscape]
\setupexternalfigures[interaction=all]
\enabledirectives[references.border]
\setuparranging [2UP]
\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]
\setupinteraction[state=start]
\setupinteractionscreen[option={landscape, fixed, paper}]
\starttext
\insertpages[document.pdf][width=0pt]
\stoptext

You should get something similar to the attached booklet.

Of course, you may have to increase font size in the original document.
But to know which increase in size the font needs, you have to check it
in the printed version of the final booklet.

With an already released booklet,
https://github.com/ousia/from-pandoc-to-context/blob/master/doc/from-pandoc-to-context_A4.pdf
is the basis to be imposed in the final booklet
https://github.com/ousia/from-pandoc-to-context/blob/master/doc/from-pandoc-to-context_A4-booklet.pdf.

The approach I’m suggesting is simpler and easier to implement.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk


A5-to-A4_landscape-booklet.pdf
Description: Adobe PDF document
___
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] Page printed upside down

2017-10-21 Thread Fabrice Couvreur
Hi Pablo,
Sorry for the late response. I did some tests before answering to
understand your explanations.

- With the commands \ setuppapersize [A4, landscape] and \
setupinteractionscreen [option = landscape] and without selecting anything
in Acrobat, I get the desired double-sided document

- With the command \ setupinteractionscreen [option = landscape] and
without selecting anything in Acrobat, I get a document in double-sided
portrait mode but the back side is upside down

- With the command \ setuppapersize [A4, landscape] and without selecting
anything in Acrobat, I get two documents in landscape mode in the same
direction

I think it's clear now, thank you.

I did a try to get a booklet but the result is not correct because the text
or formulas of mathematics are overflowing in the colums

###
document.tex
###

\definemixedcolumns
  [MyColumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMyColumns
  \dorecurse{6}{\input knuth}

\startformula
\startmathalignment[n=2,align={left,left}]
\NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times
1,05^2 + \dots + 400 \times 1,05^{11}\NR
\NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
\NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
\stopmathalignment
  \stopformula

\stopMyColumns
\stoptext


Fabrice

2017-10-18 18:44 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:

> On 10/18/2017 06:00 PM, Fabrice Couvreur wrote:
> > Hi,
> > With this
> >
> > \setuppapersize[A4,landscape]
> > \setupinteractionscreen[option=landscape]
> >
> > I get a double-sided page that I can read without having to return the
> > page on the back. But I wish I could fold the sheet to have a booklet.
> >
> > Difficult to explain without showing. Is it possible ?
>
> Hi Fabrice,
>
> for a booklet I would recommend imposition.
>
> 1. Generate the document in the standard way (no landscape).
>
> 2. Impose it using the following code:
>
> \setuppapersize [A5][A4,landscape]
> \setupexternalfigures[interaction=all]
> \enabledirectives[references.border]
> \setuparranging [2UP]
> \setuplayout
>   [backspace=0pt,
> topspace=0pt,
>width=middle,
>   height=middle,
> location=middle,
>   header=0pt,
>   footer=0pt]
> \setupinteraction[state=start]
> \setupinteractionscreen[option={landscape, fixed, paper}]
> \starttext
> \insertpages[document.pdf][width=0pt]
> \stoptext
>
> A sample for document would be:
>
> \setupbodyfont[600pt]
> \starttext
> \dorecurse{4}{\startstandardmakeup[style={\bf\ss}, align=center]
> \recurselevel
> \stopstandardmakeup}
> \stoptext
>
> Althought the paper size from the document is A4, imposition handles it
> as A5, so it works fine.
>
> BTW, page order in the final booklet is different (you may see it
> yourself :-)).
>
> I hope it helps,
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> 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] avoiding two lines on last page

2017-10-20 Thread Alan Bowen
Thanks, Hraban. I finally got a chance to try it—and it works very nicely.

Note: I placed the command in text of the last page of the component and
got the desired result without specifying a page number. I wonder if this
more abuse than use.

Alan

On Wed, Oct 18, 2017 at 4:42 PM, Henning Hraban Ramm <te...@fiee.net> wrote:

> Am 2017-10-18 um 15:03 schrieb Alan Bowen <bowenala...@gmail.com>:
>
> > Occasionally, one of my components (chapters) ends with only two lines
> on the last page. Since space is at a premium, I was wondering if there is
> a way to encourage ConTeXt to put these two lines on the preceding page.
> >
> > I do not have a mwe, so any tips about strategies and commands to
> consider will be much appreciated.
>
> Did you try \adaptlayout?
> http://wiki.contextgarden.net/Command/adaptlayout
>
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
>
> 
> ___
> 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] Forced Page Break in a Table of Content

2017-10-19 Thread Antoine Cailliau
No one for helping me ?

On 11 October 2017 at 10:49, Antoine Cailliau <antoinecaill...@gmail.com>
wrote:

> hi,
>
> The wiki documents how to insert a page break in a table of content:
> http://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break
>
> However, this does not work on ConTeXt ver: 2017.07.27 16:17 MKIV beta
> fmt: 2017.7.28
>
> The following minimal document does not have the page break.
>
> \definelistextra[page][before=\page]
>> \starttext
>> \placecontent[criterium=all,extras={2=page}]
>> \startsection[title={A}]
>> \stopsection
>> \startsection[title={B}]
>> \stopsection
>> \startsection[title={C}]
>> \stopsection
>> \stoptext
>
>
> Can anyone help me have the page break in the table of content?
>
> Thanks in advance,
>
> Antoine
>
___
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] avoiding two lines on last page

2017-10-18 Thread Henning Hraban Ramm
Am 2017-10-18 um 15:03 schrieb Alan Bowen <bowenala...@gmail.com>:

> Occasionally, one of my components (chapters) ends with only two lines on the 
> last page. Since space is at a premium, I was wondering if there is a way to 
> encourage ConTeXt to put these two lines on the preceding page.
> 
> I do not have a mwe, so any tips about strategies and commands to consider 
> will be much appreciated.

Did you try \adaptlayout?
http://wiki.contextgarden.net/Command/adaptlayout

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] Page printed upside down

2017-10-18 Thread Pablo Rodriguez
On 10/18/2017 06:00 PM, Fabrice Couvreur wrote:
> Hi,
> With this
> 
> \setuppapersize[A4,landscape]
> \setupinteractionscreen[option=landscape]
> 
> I get a double-sided page that I can read without having to return the
> page on the back. But I wish I could fold the sheet to have a booklet.
> 
> Difficult to explain without showing. Is it possible ?

Hi Fabrice,

for a booklet I would recommend imposition.

1. Generate the document in the standard way (no landscape).

2. Impose it using the following code:

\setuppapersize [A5][A4,landscape]
\setupexternalfigures[interaction=all]
\enabledirectives[references.border]
\setuparranging [2UP]
\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]
\setupinteraction[state=start]
\setupinteractionscreen[option={landscape, fixed, paper}]
\starttext
\insertpages[document.pdf][width=0pt]
\stoptext

A sample for document would be:

\setupbodyfont[600pt]
\starttext
\dorecurse{4}{\startstandardmakeup[style={\bf\ss}, align=center]
\recurselevel
\stopstandardmakeup}
\stoptext

Althought the paper size from the document is A4, imposition handles it
as A5, so it works fine.

BTW, page order in the final booklet is different (you may see it
yourself :-)).

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
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] Page printed upside down

2017-10-18 Thread Pablo Rodriguez
On 10/18/2017 09:05 AM, Fabrice Couvreur wrote:
> Hi Pablo,
> I printed the file at my high school yesterday and the output is not the
> one expected. I get a document in portrait format and the mathematical
> formulas overflow in the other column.

Sorry, Fabrice, but I’m afraid that you switched topics.

In your first message
(https://mailman.ntg.nl/pipermail/ntg-context/2017/090051.html), you
were interested in (duplex) printing. My reply answered that question.

In your second message (your reply to my answer), you wanted to know
about a sample document.

Let me explain what went wrong:

First of all, paper orientation is totally different from how the
printer should rotate the paper when printing the document.

My first sample would be printed fine if you have a decent Acrobat
version and a printer that can print on both sides of the paper sheet
automatically (duplex printing).

Your second sample from only needs \setuppapersize[A4, landscape] at the
very beginning. Since it wasn’t added, page orientation is portrait by
default.

[landscape] in \setuppapersize defines the page orientation. Adding it
should change the display in your PDF browser.

[option=landscape] in \setupinteractionscreen won’t change anything in
the display of the document. The info added by this command is only
relevant if and only if the PDF document is printed.

Both commands are independent and related to different features.

If you want to have lanscape page orientation, use \setuppapersize. If
you want double sided printing, you need \setupinteractionscreen.

For PDF print options, you may be interested in
http://wiki.contextgarden.net/PDF_Print_Options.

Let me know whether this is clear now.

Pablo
-- 
http://www.ousia.tk
___
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] Page printed upside down

2017-10-18 Thread Fabrice Couvreur
Hi,
With this

\setuppapersize[A4,landscape]
\setupinteractionscreen[option=landscape]

 I get a double-sided page that I can read without having to return the
page on the back. But I wish I could fold the sheet to have a booklet.

The output is:

1 | 2

3 | 4

it would be necessary to have:

3 | 4

1 | 2

Difficult to explain without showing. Is it possible ?

Thank you
Fabrice




2017-10-18 9:05 GMT+02:00 Fabrice Couvreur <fabrice1.couvr...@gmail.com>:

> Hi Pablo,
> I printed the file at my high school yesterday and the output is not the
> one expected. I get a document in portrait format and the mathematical
> formulas overflow in the other column.
> Fabrice
>
> 2017-10-16 20:53 GMT+02:00 Fabrice Couvreur <fabrice1.couvr...@gmail.com>:
>
>> Hi Pablo,
>> I'm not sure I understand but I'll test tomorrow in high school.
>> With the file below, using what you offer, will the dimensions of my page
>> be respected ?
>>
>> \setuplayout
>>[header=\zeropoint,
>> headerdistance=\lineheight,
>> backspace=2cm,
>> width=middle,
>> topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
>> footer=\lineheight,
>> height=middle]
>>
>> \setupinteractionscreen[option=landscape]
>>
>> \setuppagenumbering[alternative=,location=]
>>
>> \definemixedcolumns
>>   [MyColumns]
>>   [
>> n=2,
>> separator=rule,
>> rulecolor=,
>> balance=yes,
>>   ]
>>
>> \setupalign[verytolerant,stretch,hanging]
>>
>> \starttext
>> \startMyColumns
>> \startformula
>> \startmathalignment[n=2,align={left,left}]
>> \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times
>> 1,05^2 + \dots + 400 \times 1,05^{11}\NR
>> \NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
>> \NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
>> \stopmathalignment
>>   \stopformula
>> \dorecurse{6}{\input knuth}
>> \stopMyColumns
>> \stoptext
>>
>>
>> 2017-10-16 19:35 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:
>>
>>> On 10/16/2017 05:59 PM, Fabrice Couvreur wrote:
>>> > Hello,
>>> > I have printed this document and the page on the back is printed
>>> upside down
>>> > in fact you have to turn the page to read it.
>>> > How to correct this ?
>>> > Thank you
>>> > Fabrice
>>> >
>>> > \setuppapersize[A4,landscape]
>>>
>>> Hi Fabrice,
>>>
>>> [the command above is the only relevant one, lanscape page orientation.]
>>>
>>> If you use a recent version of Acrobat, you may use:
>>>
>>>\setupinteractionscreen[option=landscape]
>>>
>>> This will automatically print it in the right way. In that case, you
>>> don’t have to select anything in Acrobat, the program will read it from
>>> the PDF document itself.
>>>
>>> If you use another viewer, select flip long edge of the paper.
>>>
>>> Just in case it helps,
>>>
>>> Pablo
>>> --
>>> http://www.ousia.tk
>>> 
>>> ___
>>> 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/list
>>> info/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] avoiding two lines on last page

2017-10-18 Thread Alan Bowen
Occasionally, one of my components (chapters) ends with only two lines on
the last page. Since space is at a premium, I was wondering if there is a
way to encourage ConTeXt to put these two lines on the preceding page.

I do not have a mwe, so any tips about strategies and commands to consider
will be much appreciated.

Alan
___
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] Page printed upside down

2017-10-18 Thread Fabrice Couvreur
Hi Pablo,
I printed the file at my high school yesterday and the output is not the
one expected. I get a document in portrait format and the mathematical
formulas overflow in the other column.
Fabrice

2017-10-16 20:53 GMT+02:00 Fabrice Couvreur <fabrice1.couvr...@gmail.com>:

> Hi Pablo,
> I'm not sure I understand but I'll test tomorrow in high school.
> With the file below, using what you offer, will the dimensions of my page
> be respected ?
>
> \setuplayout
>[header=\zeropoint,
> headerdistance=\lineheight,
> backspace=2cm,
> width=middle,
> topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
> footer=\lineheight,
> height=middle]
>
> \setupinteractionscreen[option=landscape]
>
> \setuppagenumbering[alternative=,location=]
>
> \definemixedcolumns
>   [MyColumns]
>   [
> n=2,
> separator=rule,
> rulecolor=,
> balance=yes,
>   ]
>
> \setupalign[verytolerant,stretch,hanging]
>
> \starttext
> \startMyColumns
> \startformula
> \startmathalignment[n=2,align={left,left}]
> \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times
> 1,05^2 + \dots + 400 \times 1,05^{11}\NR
> \NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
> \NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
> \stopmathalignment
>   \stopformula
> \dorecurse{6}{\input knuth}
> \stopMyColumns
> \stoptext
>
>
> 2017-10-16 19:35 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:
>
>> On 10/16/2017 05:59 PM, Fabrice Couvreur wrote:
>> > Hello,
>> > I have printed this document and the page on the back is printed upside
>> down
>> > in fact you have to turn the page to read it.
>> > How to correct this ?
>> > Thank you
>> > Fabrice
>> >
>> > \setuppapersize[A4,landscape]
>>
>> Hi Fabrice,
>>
>> [the command above is the only relevant one, lanscape page orientation.]
>>
>> If you use a recent version of Acrobat, you may use:
>>
>>\setupinteractionscreen[option=landscape]
>>
>> This will automatically print it in the right way. In that case, you
>> don’t have to select anything in Acrobat, the program will read it from
>> the PDF document itself.
>>
>> If you use another viewer, select flip long edge of the paper.
>>
>> Just in case it helps,
>>
>> Pablo
>> --
>> http://www.ousia.tk
>> 
>> ___
>> 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/list
>> info/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] Page printed upside down

2017-10-16 Thread Fabrice Couvreur
Hi Pablo,
I'm not sure I understand but I'll test tomorrow in high school.
With the file below, using what you offer, will the dimensions of my page
be respected ?

\setuplayout
   [header=\zeropoint,
headerdistance=\lineheight,
backspace=2cm,
width=middle,
topspace=\dimexpr 2cm-\headerheight-\headerdistance\relax,
footer=\lineheight,
height=middle]

\setupinteractionscreen[option=landscape]

\setuppagenumbering[alternative=,location=]

\definemixedcolumns
  [MyColumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMyColumns
\startformula
\startmathalignment[n=2,align={left,left}]
\NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times
1,05^2 + \dots + 400 \times 1,05^{11}\NR
\NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
\NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
\stopmathalignment
  \stopformula
\dorecurse{6}{\input knuth}
\stopMyColumns
\stoptext


2017-10-16 19:35 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:

> On 10/16/2017 05:59 PM, Fabrice Couvreur wrote:
> > Hello,
> > I have printed this document and the page on the back is printed upside
> down
> > in fact you have to turn the page to read it.
> > How to correct this ?
> > Thank you
> > Fabrice
> >
> > \setuppapersize[A4,landscape]
>
> Hi Fabrice,
>
> [the command above is the only relevant one, lanscape page orientation.]
>
> If you use a recent version of Acrobat, you may use:
>
>\setupinteractionscreen[option=landscape]
>
> This will automatically print it in the right way. In that case, you
> don’t have to select anything in Acrobat, the program will read it from
> the PDF document itself.
>
> If you use another viewer, select flip long edge of the paper.
>
> Just in case it helps,
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> 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] Page printed upside down

2017-10-16 Thread Pablo Rodriguez
On 10/16/2017 05:59 PM, Fabrice Couvreur wrote:
> Hello,
> I have printed this document and the page on the back is printed upside down
> in fact you have to turn the page to read it.
> How to correct this ?
> Thank you
> Fabrice
> 
> \setuppapersize[A4,landscape]

Hi Fabrice,

[the command above is the only relevant one, lanscape page orientation.]

If you use a recent version of Acrobat, you may use:

   \setupinteractionscreen[option=landscape]

This will automatically print it in the right way. In that case, you
don’t have to select anything in Acrobat, the program will read it from
the PDF document itself.

If you use another viewer, select flip long edge of the paper.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___
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] Page printed upside down

2017-10-16 Thread Fabrice Couvreur
Hello,
I have printed this document and the page on the back is printed upside down
in fact you have to turn the page to read it.
How to correct this ?
Thank you
Fabrice

\setuppapersize[A4,landscape]

\setuppagenumbering[alternative=,location=]

\definemixedcolumns
  [MyColumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMyColumns
\dorecurse{6}{\input knuth}
\stopMyColumns
\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] Suppress chapter title marking on blank page after chapter

2017-10-14 Thread Pablo Rodriguez
On 10/14/2017 09:39 PM, Rik Kabel wrote:
> [...]
> I understand that is a way to place page numbers, but it still does not 
> resolve the placement of the chapter name on pages 4 and 6. I suspect I 
> need to change the value of the chapter name marking to nil or spaces at 
> some point, but how and exactly where to inject that change has escaped me.

Header and footer may be removed in the page previous to chapter with:

\setuphead[chapter]
  [page={yes, header, footer, right}]

There may be a way to set a kind of conditional processing if page
content is empty, but this is unknown to me :-(.

Pablo
-- 
http://www.ousia.tk
___
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] Suppress chapter title marking on blank page after chapter

2017-10-14 Thread Rik Kabel

On 2017-10-14 15:23, Pablo Rodriguez wrote:

On 10/14/2017 06:56 PM, Rik Kabel wrote:

In a doublesided document, how can I suppress the chapter title marking
in the header of the blank page that follows a chapter in which the text
ends on a recto page? I do not want to suppress the header.

Hi Rik,

if you want pages in pages without headers, I guess you should use
layers to place the page numbers.


I understand that is a way to place page numbers, but it still does not 
resolve the placement of the chapter name on pages 4 and 6. I suspect I 
need to change the value of the chapter name marking to nil or spaces at 
some point, but how and exactly where to inject that change has escaped me.





The following example shows the problem on pages 4 and 6. I notice that
the Contents chapter does not exhibit this problem (page 2).

This is just by chance. In your sample you asked for chapter (not for
title) in headers.
Sorry, poor wording on my part. When I wrote chapter title, I meant 
chapter name, the value retrieved by \getmarking[chapter].


I realize now that the Contents has not name marked because I asked for 
chapter, not title. The sentences quoted below can safely be ignored.



But checking the source for /completecontent/ provides no useful
information. Indeed, when I use /title/ instead of /chapter/, as done
in strc-lis.mkvi, page 2 gets the marking as well!

Actually, \completecontent uses \title, not \chapter.

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 / 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] Suppress chapter title marking on blank page after chapter

2017-10-14 Thread Pablo Rodriguez
On 10/14/2017 06:56 PM, Rik Kabel wrote:
> In a doublesided document, how can I suppress the chapter title marking
> in the header of the blank page that follows a chapter in which the text
> ends on a recto page? I do not want to suppress the header.

Hi Rik,

if you want pages in pages without headers, I guess you should use
layers to place the page numbers.

> The following example shows the problem on pages 4 and 6. I notice that
> the Contents chapter does not exhibit this problem (page 2). 

This is just by chance. In your sample you asked for chapter (not for
title) in headers.

> But checking the source for /completecontent/ provides no useful 
> information. Indeed, when I use /title/ instead of /chapter/, as done
> in strc-lis.mkvi, page 2 gets the marking as well!
Actually, \completecontent uses \title, not \chapter.

Just in case it might help,

Pablo
-- 
http://www.ousia.tk
___
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] Suppress chapter title marking on blank page after chapter

2017-10-14 Thread Rik Kabel
In a doublesided document, how can I suppress the chapter title marking 
in the header of the blank page that follows a chapter in which the text 
ends on a recto page? I do not want to suppress the header.


The following example shows the problem on pages 4 and 6. I notice that 
the Contents chapter does not exhibit this problem (page 2). But 
checking the source for /completecontent/ provides no useful 
information. Indeed, when I use /title/ instead of /chapter/, as done in 
strc-lis.mkvi, page 2 gets the marking as well!


   \setuppagenumbering [alternative=doublesided,location=]
   \setupheadertexts   [][{\it\getmarking[section]}]
    [{\it\getmarking[chapter]}][]
   \setupheadertexts   [margin]
    []
   [{\inframed[frame=off,leftframe=on,loffset=1em]
    {\userpage}}]
   [{\inframed[frame=off,rightframe=on,roffset=1em]
    {\userpage}}]
    []
   \setuphead  [chapter]
    [header=nomarking]

   \startbuffer[testt]
    \startchapter[title=Chapter]
    \startparagraph
    \input ward
    \stopparagraph
    \dorecurse{\numexpr2*\recurselevel\relax}
    {\startsection[title=Section]
    \startparagraph
    \input ward
    \stopparagraph
    \stopsection}
    \stopchapter
   \stopbuffer

   \starttext
   \completecontent
   \dorecurse{3}{\getbuffer[testt]}
   \startchapter[title={Chapter Last}]
    \input knuth
   \stopchapter
   \stoptext


--
Rik

___
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] Forced Page Break in a Table of Content

2017-10-11 Thread Antoine Cailliau
hi,

The wiki documents how to insert a page break in a table of content:
http://wiki.contextgarden.net/Table_of_Contents#Forced_Page_Break

However, this does not work on ConTeXt ver: 2017.07.27 16:17 MKIV beta fmt:
2017.7.28

The following minimal document does not have the page break.

\definelistextra[page][before=\page]
> \starttext
> \placecontent[criterium=all,extras={2=page}]
> \startsection[title={A}]
> \stopsection
> \startsection[title={B}]
> \stopsection
> \startsection[title={C}]
> \stopsection
> \stoptext


Can anyone help me have the page break in the table of content?

Thanks in advance,

Antoine
___
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] hiding page number in postponed makeup page

2017-09-23 Thread Henning Hraban Ramm
Am 2017-09-21 um 22:20 schrieb Hans Hagen <pra...@wxs.nl>:

> postponed flushing happens inside the output routine and therefore has some 
> limitations (other solutions would also have such limitations)
> 
> anyway, i do some extra checking now .. this was my test

> \startpagemakeup[pagestate=start,page=no]
>\color[red]{
>\vfill
>\dorecurse{3}{
>\samplefile{klein}
>\vfill
>}
>}
> \stoppagemakeup

Thank you very much: pagestate=start does the trick.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] hiding page number in postponed makeup page

2017-09-21 Thread Hans Hagen

On 9/20/2017 8:32 PM, Pablo Rodriguez wrote:

On 09/19/2017 11:29 PM, Henning Hraban Ramm wrote:

[...]
Thank you for the suggestion, but it doesn’t help, not even in the MWE.


I don’t know, but the postponed page doesn’t behave as a makeup (at
least, with the page number):

 \setuppapersize[A9]
 \starttext
 \startbuffer[makeup]
 \startmakeup[standard][align=middle]
 123
 \stopmakeup
 \stopbuffer
 \getbuffer[makeup]

 \startpostponing[3]
 \getbuffer[makeup]
 \stoppostponing

 \input knuth

 \getbuffer[makeup]

 \input knuth

 \getbuffer[makeup]
 \stoptext

It is also weird that real page 10 gets a page label. Default pagestate
is stop (behavior is correct only on the first page [makeup on last page
also fails]).
postponed flushing happens inside the output routine and therefore has 
some limitations (other solutions would also have such limitations)


anyway, i do some extra checking now .. this was my test

\starttext

\startbuffer[makeup]
\startpagemakeup[pagestate=start,page=no]
\color[red]{
\vfill
\dorecurse{3}{
\samplefile{klein}
\vfill
}
}
\stoppagemakeup
\stopbuffer

\startcolor[green]
\dorecurse{10}{
\dontleavehmode{\bf 1:#1:} \samplefile{sapolsky}\par
}
\stopcolor

\startpostponing % [+3]
\getbuffer[makeup]
\stoppostponing

\startcolor[blue]
\dorecurse{25}{
\dontleavehmode{\bf 2:#1:} \samplefile{sapolsky}\par
}
\stopcolor

\stoptext

i'm not sure if this will stay the way it is but it needs testing.

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 / 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] hiding page number in postponed makeup page

2017-09-21 Thread Henning Hraban Ramm
Am 2017-09-20 um 20:32 schrieb Pablo Rodriguez <oi...@gmx.es>:

> On 09/19/2017 11:29 PM, Henning Hraban Ramm wrote:
>> [...]
>> Thank you for the suggestion, but it doesn’t help, not even in the MWE.
> 
> I don’t know, but the postponed page doesn’t behave as a makeup (at
> least, with the page number):

That’s why I’m asking.

> It is also weird that real page 10 gets a page label. Default pagestate
> is stop (behavior is correct only on the first page [makeup on last page
> also fails]).

I struggle with page numbers on/off all the time...

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] hiding page number in postponed makeup page

2017-09-20 Thread Pablo Rodriguez
On 09/19/2017 11:29 PM, Henning Hraban Ramm wrote:
> [...]
> Thank you for the suggestion, but it doesn’t help, not even in the MWE.

I don’t know, but the postponed page doesn’t behave as a makeup (at
least, with the page number):

\setuppapersize[A9]
\starttext
\startbuffer[makeup]
\startmakeup[standard][align=middle]
123
\stopmakeup
\stopbuffer
\getbuffer[makeup]

\startpostponing[3]
\getbuffer[makeup]
\stoppostponing

\input knuth

\getbuffer[makeup]

\input knuth

\getbuffer[makeup]
\stoptext

It is also weird that real page 10 gets a page label. Default pagestate
is stop (behavior is correct only on the first page [makeup on last page
also fails]).

Pablo
-- 
http://www.ousia.tk
___
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] hiding page number in postponed makeup page

2017-09-19 Thread Henning Hraban Ramm
Am 2017-09-19 um 17:15 schrieb Pablo Rodriguez <oi...@gmx.es>:

> On 09/19/2017 04:46 PM, Henning Hraban Ramm wrote:
>> Hi all,
>> back from the meeting I’m still working on my full page figure placement.
>> Most of it works so far, even if it tends to collide with floats, but now 
>> I’d like to switch off the page numbers on that pages.
> 
> Hi Hraban,
> 
> if you plan full-page figure placement, I think this might help:
> 
>   \setuplayout[standard][footer=0cm]

Thank you for the suggestion, but it doesn’t help, not even in the MWE.
While the footer of the makeup layout goes away, the page number stays. In the 
example the blue box gets bigger and hides it, but it’s still there - you can 
see it if you use a transparent color, the same if you place it (or an image) 
on a layer (as I do in my real project).


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] hiding page number in postponed makeup page

2017-09-19 Thread Pablo Rodriguez
On 09/19/2017 04:46 PM, Henning Hraban Ramm wrote:
> Hi all,
> back from the meeting I’m still working on my full page figure placement.
> Most of it works so far, even if it tends to collide with floats, but now I’d 
> like to switch off the page numbers on that pages.

Hi Hraban,

if you plan full-page figure placement, I think this might help:

   \setuplayout[standard][footer=0cm]

Pablo


> The M(N)WE is simplified in that I use only a text area sized frame instead 
> of a full page image on a layer.
> If I could place the image layer on top of the page numbers that also would 
> be a solution.
> 
> 
> \setuppapersize[A6]
> \setuppagenumbering
>   [location=footer,
>   alternative=doublesided,
>   state=start]
> 
> \startsetups paginaoff
>   \setuppagenumbering[location=,] % doesn’t work
> \stopsetups
> 
> \setupmakeup[standard]
>   [page=no,
>   doublesided=no,
>   headerstate=empty,
>   footerstate=empty,
>   before=\setups{paginaoff}]
> 
> \starttext
> \input knuth
> 
> \startpostponing[+2]
> \startstandardmakeup
>   \setuppagenumbering[location=,] % doesn’t work
>   \framed
> [width=\textwidth,
> height=\textheight,
> background=color,
>     backgroundcolor=blue,
> foregroundcolor=white,
> foregroundstyle=bold,
> frame=off,
>   ]{This page should show no page number}
> \stopstandardmakeup
> \stoppostponing
> 
> \dorecurse{5}{
>   \recurselevel
>   \input tufte \par
> }
> 
> \stoptext
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 
> ___
> 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
> ___
> 


-- 
http://www.ousia.tk
___
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] hiding page number in postponed makeup page

2017-09-19 Thread Henning Hraban Ramm
Hi all,
back from the meeting I’m still working on my full page figure placement.
Most of it works so far, even if it tends to collide with floats, but now I’d 
like to switch off the page numbers on that pages.

The M(N)WE is simplified in that I use only a text area sized frame instead of 
a full page image on a layer.
If I could place the image layer on top of the page numbers that also would be 
a solution.


\setuppapersize[A6]
\setuppagenumbering
  [location=footer,
  alternative=doublesided,
  state=start]

\startsetups paginaoff
  \setuppagenumbering[location=,] % doesn’t work
\stopsetups

\setupmakeup[standard]
  [page=no,
  doublesided=no,
  headerstate=empty,
  footerstate=empty,
  before=\setups{paginaoff}]

\starttext
\input knuth

\startpostponing[+2]
\startstandardmakeup
  \setuppagenumbering[location=,] % doesn’t work
  \framed
[width=\textwidth,
height=\textheight,
background=color,
backgroundcolor=blue,
foregroundcolor=white,
foregroundstyle=bold,
frame=off,
  ]{This page should show no page number}
\stopstandardmakeup
\stoppostponing

\dorecurse{5}{
  \recurselevel
  \input tufte \par
}

\stoptext



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] Empty page to suppress header (background) frame

2017-09-04 Thread Procházka Lukáš Ing .

Hello,

done here (on the bottom of the page):

http://wiki.contextgarden.net/Command/setupheader

But the result doesn't show the goal of the example:

- header is not shown at all, including its blue "underline",
- user cannot check the emptiness of the second page.

Maybe a switch to  which would suppress result/page trimming 
would be nice here...

Best regards,

Lukas


On Fri, 01 Sep 2017 22:34:53 +0200, Pablo Rodriguez <oi...@gmx.es> wrote:


On 09/01/2017 09:31 AM, Procházka Lukáš Ing. wrote:

Hello Pablo,

you inspired me:


\setuplayout[header=5mm,headerdistance=5mm,]
\setupheader
   [text]
   [before={\startframed[frame=off,bottomframe=on,framecolor=blue,]},
after={\stopframed},
   ]
\setupheadertexts[left][right]

\starttext
   Page 1
   \page[empty,blank]
   Page 2
\stoptext



Hi Lukáš,

could you add this info to the wiki?

Pablo



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] Empty page to suppress header (background) frame

2017-09-01 Thread Pablo Rodriguez
On 09/01/2017 09:31 AM, Procházka Lukáš Ing. wrote:
> Hello Pablo,
> 
> you inspired me:
> 
> 
> \setuplayout[header=5mm,headerdistance=5mm,]
> \setupheader
>[text]
>[before={\startframed[frame=off,bottomframe=on,framecolor=blue,]},
> after={\stopframed},
>]
> \setupheadertexts[left][right]
> 
> \starttext
>Page 1
>\page[empty,blank]
>Page 2
> \stoptext
> 

Hi Lukáš,

could you add this info to the wiki?

Pablo
-- 
http://www.ousia.tk
___
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] Empty page to suppress header (background) frame

2017-09-01 Thread Procházka Lukáš Ing .

Hello Pablo,

you inspired me:


\setuplayout[header=5mm,headerdistance=5mm,]
\setupheader
  [text]
  [before={\startframed[frame=off,bottomframe=on,framecolor=blue,]},
   after={\stopframed},
  ]
\setupheadertexts[left][right]

\starttext
  Page 1
  \page[empty,blank]
  Page 2
\stoptext


Best regards,

Lukas


On Wed, 30 Aug 2017 19:43:57 +0200, Pablo Rodriguez <oi...@gmx.es> wrote:


On 08/30/2017 05:19 PM, Procházka Lukáš Ing. wrote:

[...]
How to:

- define header to be framed normally and
- to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called?


Hi Lukáš,

from your sample, I wonder whether you need a complete frame or only a
rule in the header.

If you only need a rule, this is the way to go:

\setuplayout[header=5mm,headerdistance=5mm,]
%~ \setupheader[text][after=\vskip 4pt\hrule]
\setupheader[text][after={\blackrule[
width=\textwidth,
height=1em]}]
\setupheadertexts[left][right]

\starttext
   Page 1
   \page[empty,blank]
   Page 2
\stoptext

I hope it helps,

Pablo



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] Empty page to suppress header (background) frame

2017-08-31 Thread Procházka Lukáš Ing .

Hello Pablo,

thanks for the answer - yes, it works - for the situation header underline has 
been defined via \blackrule and not background.

I found a proposal for this situation spoken here before:

- to provide [noheaderandfooterbackground] (or similar) option for \page which 
would temporarily switch header and footer background off;

would \page[noheaderandfooterbackground] be implemented (kindly asking Hans...)?

Best regards,

Lukas


On Wed, 30 Aug 2017 19:43:57 +0200, Pablo Rodriguez <oi...@gmx.es> wrote:


On 08/30/2017 05:19 PM, Procházka Lukáš Ing. wrote:

[...]
How to:

- define header to be framed normally and
- to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called?


Hi Lukáš,

from your sample, I wonder whether you need a complete frame or only a
rule in the header.

If you only need a rule, this is the way to go:

\setuplayout[header=5mm,headerdistance=5mm,]
%~ \setupheader[text][after=\vskip 4pt\hrule]
\setupheader[text][after={\blackrule[
width=\textwidth,
height=1em]}]
\setupheadertexts[left][right]

\starttext
   Page 1
   \page[empty,blank]
   Page 2
\stoptext

I hope it helps,

Pablo



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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] Empty page to suppress header (background) frame

2017-08-30 Thread Pablo Rodriguez
On 08/30/2017 05:19 PM, Procházka Lukáš Ing. wrote:
> [...]
> How to:
> 
> - define header to be framed normally and
> - to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called?

Hi Lukáš,

from your sample, I wonder whether you need a complete frame or only a
rule in the header.

If you only need a rule, this is the way to go:

\setuplayout[header=5mm,headerdistance=5mm,]
%~ \setupheader[text][after=\vskip 4pt\hrule]
\setupheader[text][after={\blackrule[
width=\textwidth,
height=1em]}]
\setupheadertexts[left][right]

    \starttext
   Page 1
   \page[empty,blank]
   Page 2
\stoptext

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
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] Empty page to suppress header (background) frame

2017-08-30 Thread Procházka Lukáš Ing .

Hello,

suppose the following code:


\setuplayout[header=5mm,headerdistance=5mm,]
\setupbackgrounds[header][text][bottomframe=on]
\setupheadertexts[left][right]

\starttext
  Page 1
  \page[empty,blank]
  Page 2
\stoptext


Page 2 in this sample is empty - no text and no header/footer - but it KEEPS 
FRAME around HEADER.

How to:

- define header to be framed normally and
- to be "frame-free" when \page[empty] (and/or maybe \page[blank]) is called?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

NoHdrUln~.mkiv
Description: Binary data


NoHdrUln~.pdf
Description: Adobe PDF document
___
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] Possible error in page-lay.mkiv

2017-08-29 Thread Rik Kabel

In page-lay.mkvi I see, at lines 1591–1594:

   \definepapersize
  [doubleoversized]
  [ \c!width=\dimexpr
   \paperheight+\layouttargetparameter\c!distance\relax,
   \c!height=\dimexpr2\paperwidth
   +\layouttargetparameter\c!distance\relax]


I would expect to see:

   \definepapersize
  [doubleoversized]
  [ \c!width=\dimexpr \paperwidth
   +\layouttargetparameter\c!distance\relax,
   \c!height=\dimexpr2\paperheight+\layouttargetparameter\c!distance\relax]


--
Rik
___
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] combined / compressed / collapsed page and numbered citation references in bibliographies

2017-08-12 Thread Rik Kabel

On 2017-08-12 22:30, Alan Braslau wrote:

On Sat, 12 Aug 2017 20:32:17 -0400
Rik Kabel <cont...@rik.users.panix.com> wrote:


I noticed that in bibliographies, page indexing combines runs of two
or more pages (pp. 150­–151), as does page number compression in
registers, while it takes three or more numbered citations to cause a
similar collapse (per the MKIV-Publications manual, page 38, I do not
have an example) for citation number references.

Is there a way to change such compression minimums so that they can
be made consistent?

What seems more logical to you?
pp 150,151 or pp 150-151 - of course pp 150-152 makes perfect sense.
[2,3] or [2-3] - of course [2-4] also makes sense.

I prefer the first choices. ConTeXt registers do the second, and I do
not know what led to that choice and if Hans would like to change it
(or even make this a parameter).

Alan


I am looking for consistency.

For page references, the bibliography subsystem gives:

 * pp. 1–2
 * pp. 1–3
 * p. 1 and p. 3

and numeric citations apparently produce:

 * [1,2]
 * [1–3]
 * [1,3]

while the index registers give:

 * 1–2
 * 1–3
 * 1, 3

Why is the ‘and’ needed in the bibliography page reference? One could 
also ask why the ‘p.’ and ‘pp.’, but in the more verbose setting of a 
bibliography, I can live with them.


As for the choice of two or more over three or more for compression, I 
can see arguments for each. A default and the ability to change it seems 
best, especially for bibliographic entries where publishers have 
overriding standards.


--
Rik

--
Rik

___
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] combined / compressed / collapsed page and numbered citation references in bibliographies

2017-08-12 Thread Alan Braslau
On Sat, 12 Aug 2017 20:32:17 -0400
Rik Kabel <cont...@rik.users.panix.com> wrote:

> I noticed that in bibliographies, page indexing combines runs of two
> or more pages (pp. 150­–151), as does page number compression in
> registers, while it takes three or more numbered citations to cause a
> similar collapse (per the MKIV-Publications manual, page 38, I do not
> have an example) for citation number references.
> 
> Is there a way to change such compression minimums so that they can
> be made consistent?

What seems more logical to you? 
pp 150,151 or pp 150-151 - of course pp 150-152 makes perfect sense.
[2,3] or [2-3] - of course [2-4] also makes sense.

I prefer the first choices. ConTeXt registers do the second, and I do
not know what led to that choice and if Hans would like to change it
(or even make this a parameter).

Alan
___
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] combined / compressed / collapsed page and numbered citation references in bibliographies

2017-08-12 Thread Rik Kabel
I noticed that in bibliographies, page indexing combines runs of two or 
more pages (pp. 150­–151), as does page number compression in registers, 
while it takes three or more numbered citations to cause a similar 
collapse (per the MKIV-Publications manual, page 38, I do not have an 
example) for citation number references.


Is there a way to change such compression minimums so that they can be 
made consistent?


--
Rik

___
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 can I add “page # of ##” on my document ?

2017-08-11 Thread Fabrice Couvreur
Hi Peter and Aditya,

"You run the command "ConTeXt Full" instead of "ConTeXt"

It works !
Thank you

Fabrice

2017-08-11 9:30 GMT+02:00 Peter Münster :

> On Thu, Aug 10 2017, Aditya Mahajan wrote:
>
> > You need to remove the --once call from the context call. (Not sure
> > how to do this in Emacs)
>
> You run the command "ConTeXt Full" instead of "ConTeXt".
>
> --
>Peter
> 
> ___
> 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 can I add “page # of ##” on my document ?

2017-08-11 Thread Peter Münster
On Thu, Aug 10 2017, Aditya Mahajan wrote:

> You need to remove the --once call from the context call. (Not sure
> how to do this in Emacs)

You run the command "ConTeXt Full" instead of "ConTeXt".

-- 
   Peter
___
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 can I add “page # of ##” on my document ?

2017-08-10 Thread Aditya Mahajan

On Thu, 10 Aug 2017, Fabrice Couvreur wrote:


Hi,
@Aditya "You need multiple runs to resolve \lastpage"
What you propose does not solve the problem


How are you running it. You need to remove the --once call from the 
context call. (Not sure how to do this in Emacs)


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
___

Re: [NTG-context] How can I add “page # of ##” on my document ?

2017-08-10 Thread Fabrice Couvreur
Hi,
@Aditya "You need multiple runs to resolve \lastpage"
What you propose does not solve the problem

@Pablo Very nice job !
Thanks
Merci

2017-08-10 18:54 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:

> On 08/10/2017 12:35 PM, Fabrice Couvreur wrote:
> > [...]
> > How to make the last page number interactive ?
>
> Hi Fabrice,
>
> I guess this might be what you want:
>
> \showframe
> \setupinteraction
> [state=start,
>  style=,
>  color=,
>  contrastcolor=,
>  focus=standard]
> \enabledirectives[references.border=darkred]
> \setuppagenumbering[alternative=]
> \setupfootertexts[{Page\,\pagenumber\,sur\,\at[final page]}]
> \starttext
> \dorecurse{50}{a\page}
> \reference[final page]{final}
> \stoptext
>
> Just in case it helps,
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> 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 can I add “page # of ##” on my document ?

2017-08-10 Thread Pablo Rodriguez
On 08/10/2017 12:35 PM, Fabrice Couvreur wrote:
> [...]
> How to make the last page number interactive ?

Hi Fabrice,

I guess this might be what you want:

\showframe
\setupinteraction
[state=start,
 style=,
 color=,
 contrastcolor=,
 focus=standard]
\enabledirectives[references.border=darkred]
\setuppagenumbering[alternative=]
\setupfootertexts[{Page\,\pagenumber\,sur\,\at[final page]}]
\starttext
\dorecurse{50}{a\page}
\reference[final page]{final}
\stoptext

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___
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 can I add “page # of ##” on my document ?

2017-08-10 Thread Aditya Mahajan

Hi Otared,
This works with Texlive context but this does not work with Standalone
context that I use with Emacs.


I believe that Emacs calls ConTeXt with `context --once`. You need 
multiple runs to resolve \lastpage.


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
___

Re: [NTG-context] How can I add “page # of ##” on my document ?

2017-08-10 Thread Fabrice Couvreur
Hi Otared,
This works with Texlive context but this does not work with Standalone
context that I use with Emacs.
How to make the last page number interactive ?
Thank you
Fabrice

2017-08-10 11:47 GMT+02:00 Otared Kavian <ota...@gmail.com>:

> I forgot to add that you can also use
>
> \setupfootertexts[Page \pagenumber\ sur\ \totalnumberofpages][]
>
> Best regards: OK
>
>
> On 10 Aug 2017, at 11:43, Otared Kavian <ota...@gmail.com> wrote:
>
> Hi Fabrice,
>
> The following gives the desired result, as Hans pointed ou:
>
> \setuppagenumbering[alternative=]
>
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>
> \starttext
>
> \dorecurse{5}{\input knuth.tex \page}
>
> \stoptext
>
> Best regards: OK
>
> On 10 Aug 2017, at 11:28, Fabrice Couvreur <fabrice1.couvr...@gmail.com>
> wrote:
>
> Hi Hans and Pablo,
>
> \setuppagenumbering[alternative=]
>
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>
> The behavior is not that expected:
>
> Page 1 sur 0
> Page 2 sur 0
> Page 3 sur 0 
>
> Thanks
> Fabrice
>
> 2017-08-10 9:57 GMT+02:00 Hans Hagen <pra...@wxs.nl>:
>
>> On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:
>>
>>> Hello,
>>> With Latex, I did this :
>>>
>>> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue
>>> ,citecolor=blue,urlcolor=blue]{hyperref}
>>> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage
>>>
>>>
>>> With Context, I tried this unsuccessfully ;
>>>
>>> \setupinteraction
>>>  [state=start,
>>>   style=,
>>>   color=\darkred,
>>>   contrastcolor=]
>>>
>>>   \setuppagenumbering
>>>  [alternative=,
>>>   location={footer,right},
>>>   command={Page\,\pagenumber\,sur\,\lastpage } ]
>>>
>> \setuppagenumbering[alternative=]
>>
>> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>>
>> -
>>   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/list
>> info/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
> 
> ___
>
___
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 can I add “page # of ##” on my document ?

2017-08-10 Thread Otared Kavian
I forgot to add that you can also use

\setupfootertexts[Page \pagenumber\ sur\ \totalnumberofpages][] 

Best regards: OK

> On 10 Aug 2017, at 11:43, Otared Kavian <ota...@gmail.com> wrote:
> 
> Hi Fabrice,
> 
> The following gives the desired result, as Hans pointed ou:
> 
> \setuppagenumbering[alternative=]
> 
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
> 
> \starttext
> 
> \dorecurse{5}{\input knuth.tex \page}
> 
> \stoptext
> 
> Best regards: OK
> 
>> On 10 Aug 2017, at 11:28, Fabrice Couvreur <fabrice1.couvr...@gmail.com 
>> <mailto:fabrice1.couvr...@gmail.com>> wrote:
>> 
>> Hi Hans and Pablo,
>> 
>> \setuppagenumbering[alternative=]
>> 
>> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>> 
>> The behavior is not that expected:
>> 
>> Page 1 sur 0
>> Page 2 sur 0
>> Page 3 sur 0 
>> 
>> Thanks
>> Fabrice
>> 
>> 2017-08-10 9:57 GMT+02:00 Hans Hagen <pra...@wxs.nl <mailto:pra...@wxs.nl>>:
>> On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:
>> Hello,
>> With Latex, I did this :
>> 
>> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
>> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage
>> 
>> 
>> With Context, I tried this unsuccessfully ;
>> 
>> \setupinteraction
>>  [state=start,
>>   style=,
>>   color=\darkred,
>>   contrastcolor=]
>> 
>>   \setuppagenumbering
>>  [alternative=,
>>   location={footer,right},
>>   command={Page\,\pagenumber\,sur\,\lastpage } ]
>> \setuppagenumbering[alternative=]
>> 
>> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>> 
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
>> www.pragma-pod.nl <http://www.pragma-pod.nl/>
>> -
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <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 can I add “page # of ##” on my document ?

2017-08-10 Thread Otared Kavian
Hi Fabrice,

The following gives the desired result, as Hans pointed ou:

\setuppagenumbering[alternative=]

\setupfootertexts[Page \pagenumber\ sur\ \lastpage][]

\starttext

\dorecurse{5}{\input knuth.tex \page}

\stoptext

Best regards: OK

> On 10 Aug 2017, at 11:28, Fabrice Couvreur <fabrice1.couvr...@gmail.com> 
> wrote:
> 
> Hi Hans and Pablo,
> 
> \setuppagenumbering[alternative=]
> 
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
> 
> The behavior is not that expected:
> 
> Page 1 sur 0
> Page 2 sur 0
> Page 3 sur 0 
> 
> Thanks
> Fabrice
> 
> 2017-08-10 9:57 GMT+02:00 Hans Hagen <pra...@wxs.nl <mailto:pra...@wxs.nl>>:
> On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:
> Hello,
> With Latex, I did this :
> 
> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage
> 
> 
> With Context, I tried this unsuccessfully ;
> 
> \setupinteraction
>  [state=start,
>   style=,
>   color=\darkred,
>   contrastcolor=]
> 
>   \setuppagenumbering
>  [alternative=,
>   location={footer,right},
>   command={Page\,\pagenumber\,sur\,\lastpage } ]
> \setuppagenumbering[alternative=]
> 
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://www.pragma-pod.nl/>
> -
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <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
___

Re: [NTG-context] How can I add “page # of ##” on my document ?

2017-08-10 Thread Fabrice Couvreur
Hi Hans and Pablo,

\setuppagenumbering[alternative=]

\setupfootertexts[Page \pagenumber\ sur\ \lastpage][]

The behavior is not that expected:

Page 1 sur 0
Page 2 sur 0
Page 3 sur 0 

Thanks
Fabrice

2017-08-10 9:57 GMT+02:00 Hans Hagen <pra...@wxs.nl>:

> On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:
>
>> Hello,
>> With Latex, I did this :
>>
>> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue
>> ,citecolor=blue,urlcolor=blue]{hyperref}
>> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage
>>
>>
>> With Context, I tried this unsuccessfully ;
>>
>> \setupinteraction
>>  [state=start,
>>   style=,
>>   color=\darkred,
>>   contrastcolor=]
>>
>>   \setuppagenumbering
>>  [alternative=,
>>   location={footer,right},
>>   command={Page\,\pagenumber\,sur\,\lastpage } ]
>>
> \setuppagenumbering[alternative=]
>
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>
> -
>   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/list
> info/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 can I add “page # of ##” on my document ?

2017-08-10 Thread Hans Hagen

On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:

Hello,
With Latex, I did this :

\usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
\rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage


With Context, I tried this unsuccessfully ;

\setupinteraction
 [state=start,
  style=,
  color=\darkred,
  contrastcolor=]

  \setuppagenumbering
 [alternative=,
  location={footer,right},
  command={Page\,\pagenumber\,sur\,\lastpage } ]

\setuppagenumbering[alternative=]

\setupfootertexts[Page \pagenumber\ sur\ \lastpage][]

-
  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] How can I add “page # of ##” on my document ?

2017-08-09 Thread Pablo Rodriguez
On 08/09/2017 11:42 PM, Fabrice Couvreur wrote:
> Hello,
> With Latex, I did this :
> 
> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage

Hi Fabrice,

this is a ConTeXt list. Personally, I don’t remember what the code above
could achieve in LaTeX (I haven’t used it in the last decade).

> With Context, I tried this unsuccessfully ;
> 
> \setupinteraction
> [state=start,
>  style=,
>  color=\darkred,
>  contrastcolor=]

It is clear that color=darkred isn’t color=darkblue ;-).

But I guess you need:

   \enabledirectives[references.border=darkred]

(Or blue, the color you want.)

\setupinteraction
 [state=start,
 style=,
 color=,
contrastcolor=]
\enabledirectives[references.border=darkred]
\unexpanded\def\href#1{\goto{#1} [url(#1)]}
\starttext
\href{http://wiki.contextgarden.net/}
\stoptext

>  \setuppagenumbering
> [alternative=,
>  location={footer,right},
>  command={Page\,\pagenumber\,sur\,\lastpage } ]

\showframe
\setupfootertexts[][Page\,\pagenumber\,sur\,\lastpagenumber]
\setuppagenumbering[location=]
\starttext
\dorecurse{50}{a\page}
\stoptext

Wikify what you think it may help others (or that it might have helped
you if it was there before),

Pablo
-- 
http://www.ousia.tk
___
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 add “page # of ##” on my document ?

2017-08-09 Thread Fabrice Couvreur
Hello,
With Latex, I did this :

\usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
\rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage


With Context, I tried this unsuccessfully ;

\setupinteraction
[state=start,
 style=,
 color=\darkred,
 contrastcolor=]

 \setuppagenumbering
[alternative=,
 location={footer,right},
 command={Page\,\pagenumber\,sur\,\lastpage } ]


Thank you
Fabrice
___
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] TwoColumns in two different languages, with alternate text on even and odd page.

2017-08-03 Thread Jean-Pierre Delange
Hi again Marcello,

I was somehow busy and forgot that I made a promise to give you a better answer 
than I did about bilingual texts on two columns. If you need only to print some 
simple texts on two columns, there is no major issues. Problems occur when you 
want to print two texts in different languages, with a complex criticus 
apparatus.

But I've forgotten that (when I first began to work with ConTeXt, under the 
Pablo Rodriguez's eye), I was looking for a mechanism which allow to print 
greek/latin original text on the left column with a translation within the 
right column and a few series of footnotes in the footer. Notes dealing with 
the original text and different notes for the translation, given that if the 
original text was on the even page (left), a commentary might be print on the 
right page. The situation is clear : an even page with original language and 
translation (on two separate columns), and criticus apparatus in  the footer; 
an odd page which contains some material like a commentary. It is without 
saying that the translation has to follow the original text line by line, not 
in a strictly way, but almost, when the odd page may be much more flexible. I 
know there are some technical ways under LaTeX (Maieul Rouquette made some work 
on that), and with non-free software but I had forgotten that Wolfgang made a 
simple proposal with the Stream mechanism. I have to work on that, but I am 
currently working on other jobs.

See what Wolfgang wrote in the end of 2016 here on the wiki : 
http://wiki.contextgarden.net/Columns#Streams

There are two non-free softwares, just as CET (Critical Edition Typesetter) : 
http://karas.ch/cet/cetinfo.htm

or Classical Text Editor :
http://cte.oeaw.ac.at/

JP


- Mail original -
De: "Jean-Pierre Delange" <adeiman...@free.fr>
À: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Envoyé: Jeudi 27 Juillet 2017 12:11:05
Objet: Re: [NTG-context] TwoColumns in two different languages, with alternate 
text on even and odd page.

Hi Marcello,

As you say "this feature could be really interesting", but as far as I know, 
there are many issues to deal with, in order to print 2 columns on the same 
page with different languages (say : greek and latin). This is not only because 
of two languages (say : english and russian, or greek and german), but because 
such work needs some editing datas, like footnotes, or more complex type of 
single line footnotes. I'll give some samples in a few hours. I've written once 
to Maieul Rouquette (author of (xe)LaTeX and in charge or reledpar 
(http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/reledmac/reledpar.pdf)
 and reledmac 
(ftp://ftp.dante.de/tex-archive/macros/latex/contrib/reledmac/reledmac.pdf) 
LaTeX packages for asking him about complex "criticus apparatus" in edition 
issues for Classics. Pablo Rodriguez has a better knowledfge as me on these 
topics. 
In fact, there is currently no strictly satisfying way to deal with different 
texts with ConTeXt on even and odd page (or on the same page with two columns), 
except if there is no need of footnotes (or criticus apparatus), because some 
mismatches between texts with the second page. But, there is possibly some 
solutions with XML and CTX (which I didn't try) ?

JP



- Mail original -
De: "Marcello Urgo" <marcello.u...@polimi.it>
À: ntg-context@ntg.nl
Envoyé: Samedi 22 Juillet 2017 19:14:03
Objet: Re: [NTG-context] TwoColumns in two different languages, with alternate 
text on even and odd page.


Dear Hans, 
I am also intersted in this issue. 
In the last years I am dealing with a multi-language technical lexicon. 
Hence, different languages refer to different columns, and if the languages are 
three or four, then it is better to go with two pages side-by-side. 
Nevertheless this seems a problem also in LaTeX redelpar (multiple columns are 
not supported). 
I tried to manage it with \linetable but without success ( 
https://tex.stackexchange.com/questions/380923/synchronise-data-spanning-over-two-side-by-side-pages-in-context
 ) 
I think this feature could be really interesting because, according to my 
knowledge, ConTeXt is at present the best way to manage the publishing of XML 
data. 
Hence, this could be a useful tool to publish large sets of data. 
Thank you in advance 







Marcello Urgo, Ph.D. 
Assistant Professor 
Manufacturing and Production Systems Lab. 
Mechanical Engineering Department 
POLITECNICO DI MILANO 
Via La Masa, 1 - 20156 Milano 


Phone +39 02 2399 8521 
Fax +39 02 2399 8585 
tecnologie.mecc.polimi.it 
www.polimi.it 



This message may contain confidential and/or otherwise reserved information and 
is thus for use only by the intended recipient. If you received this in error, 
please contact the sender and delete the e-mail and its attachments from your 
computer. Thank you. 
Il presente messaggio può contenere infor

Re: [NTG-context] TwoColumns in two different languages, with alternate text on even and odd page.

2017-07-27 Thread Jean-Pierre Delange
Hi Marcello,

As you say "this feature could be really interesting", but as far as I know, 
there are many issues to deal with, in order to print 2 columns on the same 
page with different languages (say : greek and latin). This is not only because 
of two languages (say : english and russian, or greek and german), but because 
such work needs some editing datas, like footnotes, or more complex type of 
single line footnotes. I'll give some samples in a few hours. I've written once 
to Maieul Rouquette (author of (xe)LaTeX and in charge or reledpar 
(http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/reledmac/reledpar.pdf)
 and reledmac 
(ftp://ftp.dante.de/tex-archive/macros/latex/contrib/reledmac/reledmac.pdf) 
LaTeX packages for asking him about complex "criticus apparatus" in edition 
issues for Classics. Pablo Rodriguez has a better knowledfge as me on these 
topics. 
In fact, there is currently no strictly satisfying way to deal with different 
texts with ConTeXt on even and odd page (or on the same page with two columns), 
except if there is no need of footnotes (or criticus apparatus), because some 
mismatches between texts with the second page. But, there is possibly some 
solutions with XML and CTX (which I didn't try) ?

JP



- Mail original -
De: "Marcello Urgo" <marcello.u...@polimi.it>
À: ntg-context@ntg.nl
Envoyé: Samedi 22 Juillet 2017 19:14:03
Objet: Re: [NTG-context] TwoColumns in two different languages, with alternate 
text on even and odd page.


Dear Hans, 
I am also intersted in this issue. 
In the last years I am dealing with a multi-language technical lexicon. 
Hence, different languages refer to different columns, and if the languages are 
three or four, then it is better to go with two pages side-by-side. 
Nevertheless this seems a problem also in LaTeX redelpar (multiple columns are 
not supported). 
I tried to manage it with \linetable but without success ( 
https://tex.stackexchange.com/questions/380923/synchronise-data-spanning-over-two-side-by-side-pages-in-context
 ) 
I think this feature could be really interesting because, according to my 
knowledge, ConTeXt is at present the best way to manage the publishing of XML 
data. 
Hence, this could be a useful tool to publish large sets of data. 
Thank you in advance 







Marcello Urgo, Ph.D. 
Assistant Professor 
Manufacturing and Production Systems Lab. 
Mechanical Engineering Department 
POLITECNICO DI MILANO 
Via La Masa, 1 - 20156 Milano 


Phone +39 02 2399 8521 
Fax +39 02 2399 8585 
tecnologie.mecc.polimi.it 
www.polimi.it 



This message may contain confidential and/or otherwise reserved information and 
is thus for use only by the intended recipient. If you received this in error, 
please contact the sender and delete the e-mail and its attachments from your 
computer. Thank you. 
Il presente messaggio può contenere informazioni di carattere confidenziale e/o 
riservate ed è quindi ad uso esclusivo del destinatario. Nel caso aveste 
ricevuto questa e-mail per errore siete pregati di contattare immediatamente il 
mittente e di cancellare il messaggio ed i suoi allegati dal vostro computer . 
Grazie. 





___
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] TwoColumns in two different languages, with alternate text on even and odd page.

2017-07-23 Thread Marcello Urgo
Dear Hans,
I am also intersted in this issue.
In the last years I am dealing with a multi-language technical lexicon.
Hence, different languages refer to different columns, and if the languages are 
three or four, then it is better to go with two pages side-by-side.
Nevertheless this seems a problem also in LaTeX redelpar (multiple columns are 
not supported).
I tried to manage it with \linetable but without success 
(https://tex.stackexchange.com/questions/380923/synchronise-data-spanning-over-two-side-by-side-pages-in-context)
I think this feature could be really interesting because, according to my 
knowledge, ConTeXt is at present the best way to manage the publishing of XML 
data.
Hence, this could be a useful tool to publish large sets of data.
Thank you in advance


Marcello Urgo, Ph.D.
Assistant Professor
Manufacturing and Production Systems Lab.
Mechanical Engineering Department
POLITECNICO DI MILANO
Via La Masa, 1 - 20156 Milano

Phone +39 02 2399 8521
Fax +39 02 2399 8585
tecnologie.mecc.polimi.it
www.polimi.it

This message may contain confidential and/or otherwise reserved information and 
is thus for use only by the intended recipient. If you received this in error, 
please contact the sender and delete the e-mail and its attachments from your 
computer. Thank you.
Il presente messaggio può contenere informazioni di carattere confidenziale e/o 
riservate ed è quindi ad uso esclusivo del destinatario. Nel caso aveste 
ricevuto questa e-mail  per errore siete pregati di contattare immediatamente 
il mittente e di cancellare il messaggio ed i suoi allegati dal vostro 
computer. Grazie.




___
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] Why is the page off?

2017-07-03 Thread Henri Menke
On 07/03/2017 07:09 PM, Hans Hagen wrote:
> On 7/3/2017 8:42 AM, Henri Menke wrote:
>> On Mon, 2017-07-03 at 01:48 -0400, Aditya Mahajan wrote:
>>> On Sun, 2 Jul 2017, Henri Menke wrote:
>>>
>>>> Why is the page shifted?  Reproducible in TL2017 and latest beta.  See
>>>> also attached.  MWE is below.
>>>
>>> Why do you think that the page is shifted? Or are you asking why does the
>>> default layout set the left margin width to be larger than the backspace?
>>
>> How about this?  By default text in the margin can run off the page.  Also 
>> the whole layout is
>> symmetric (margin widths, margin distances) but shifted to the left.  This 
>> looks like a bug to me.
>>   Furthermore it doesn't make sense to have a non-centred text block for 
>> onesided typesetting.
> 
> theyt run off the page but are aligned to the text side so that permits a bit 
> more tolerance against wrapping to soon

I see.  Would it be possible to add another layout to page-lay.mkiv?  I guess a 
good name is "fit" because it fits all margins on the page.

\definelayout
  [\v!fit]
  [\v!middle]
  
[\c!backspace=\dimexpr\layoutparameter\c!leftmargin+\layoutparameter\c!leftmargindistance\relax,
   
\c!cutspace=\dimexpr\layoutparameter\c!rightmargin+\layoutparameter\c!rightmargindistance\relax]

> 
>>
>> \setuppapersize[A5][A4,landscape]
>> \setuppaper[nx=2]
>> \setuparranging[XY]
>>
>> \showframe
>>
>> \starttext
>> Foo\page Bar\inleft{Foobarb}
>> \stoptext
>>
>>>
>>> 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
>>> ___
>>>
>>>
>>> ___
>>> 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] Why is the page off?

2017-07-03 Thread Hans Hagen

On 7/3/2017 8:42 AM, Henri Menke wrote:

On Mon, 2017-07-03 at 01:48 -0400, Aditya Mahajan wrote:

On Sun, 2 Jul 2017, Henri Menke wrote:


Why is the page shifted?  Reproducible in TL2017 and latest beta.  See
also attached.  MWE is below.


Why do you think that the page is shifted? Or are you asking why does the
default layout set the left margin width to be larger than the backspace?


How about this?  By default text in the margin can run off the page.  Also the 
whole layout is
symmetric (margin widths, margin distances) but shifted to the left.  This 
looks like a bug to me.
  Furthermore it doesn't make sense to have a non-centred text block for 
onesided typesetting.


theyt run off the page but are aligned to the text side so that permits 
a bit more tolerance against wrapping to soon




\setuppapersize[A5][A4,landscape]
\setuppaper[nx=2]
\setuparranging[XY]

\showframe

\starttext
Foo\page Bar\inleft{Foobarb}
\stoptext



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
___


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



--

-
  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] Why is the page off?

2017-07-03 Thread Henri Menke
On Mon, 2017-07-03 at 18:42 +1200, Henri Menke wrote:
> On Mon, 2017-07-03 at 01:48 -0400, Aditya Mahajan wrote:
> > 
> > On Sun, 2 Jul 2017, Henri Menke wrote:
> > 
> > > 
> > > Why is the page shifted?  Reproducible in TL2017 and latest beta.  See 
> > > also attached.  MWE is below.
> > Why do you think that the page is shifted? Or are you asking why does the 
> > default layout set the left margin width to be larger than the backspace?

Just found this in "page-lay.mkiv"

%D The default dimensions are quite old and will not change.
%D The funny fractions were introduced when we went from fixed
%D dimensions to relative ones. Since \CONTEXT\ is a dutch
%D package, the dimensions are based on the metric system. The
%D asymmetrical layout is kind of handy for short
%D quick||and||dirty stapled documents.

> How about this?  By default text in the margin can run off the page.  Also 
> the whole layout is
> symmetric (margin widths, margin distances) but shifted to the left.  This 
> looks like a bug to me.
>  Furthermore it doesn't make sense to have a non-centred text block for 
> onesided typesetting.
> 
> 
> \setuppapersize[A5][A4,landscape]
> \setuppaper[nx=2]
> \setuparranging[XY]
> 
> \showframe
> 
> \starttext
> Foo\page Bar\inleft{Foobarb}
> \stoptext
> 
> > 
> > 
> > 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
> > ___
___
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] Why is the page off?

2017-07-03 Thread Henri Menke
On Mon, 2017-07-03 at 01:48 -0400, Aditya Mahajan wrote:
> On Sun, 2 Jul 2017, Henri Menke wrote:
> 
> > Why is the page shifted?  Reproducible in TL2017 and latest beta.  See 
> > also attached.  MWE is below.
> 
> Why do you think that the page is shifted? Or are you asking why does the 
> default layout set the left margin width to be larger than the backspace?

How about this?  By default text in the margin can run off the page.  Also the 
whole layout is
symmetric (margin widths, margin distances) but shifted to the left.  This 
looks like a bug to me.
 Furthermore it doesn't make sense to have a non-centred text block for 
onesided typesetting.


\setuppapersize[A5][A4,landscape]
\setuppaper[nx=2]
\setuparranging[XY]

\showframe

\starttext
Foo\page Bar\inleft{Foobarb}
\stoptext

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

test.pdf
Description: Adobe PDF document
___
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
___

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