Re: [NTG-context] DIN lang folder with crop marks

2019-04-10 Thread Wolfgang Schuster

Benjamin Koppe schrieb am 10.04.2019 um 20:33:

Hallo,

I'm new to ConTeXt and am crazy enough to start with something
nonstandard.

Of course I got stuck pretty fast. I started out with this:

https://wiki.contextgarden.net/DIN_lang_folder

and then found some info on crop marks here:

https://wiki.contextgarden.net/PaperSetup#Crop_marks


I tried different options (marked=on, market=colour, marked=color...,
something with \setuplayout[location={middle,middle}]...)

Some times the crop marks don't show at all, sometimes they are set off
a bit so they don't fit with the actual document.

I added the whole file as I really do not knwo (yet) how to reduce
things...


When you increase the size of the printed paper

\definepapersize
    [A4-flyer]
    [width=\dimexpr297mm+10\measured{bleed}\relax,
 height=\dimexpr210mm+10\measured{bleed}\relax]

and center the arranged pages

\setuplayout
  [marking=on,
   location=middle]

you can see the shifting moves everything away from the marks.

BTW: You forgot the = for the marking settings in \startttitle.

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] DIN lang folder with crop marks

2019-04-10 Thread Benjamin Koppe
Hallo,

I'm new to ConTeXt and am crazy enough to start with something
nonstandard.

Of course I got stuck pretty fast. I started out with this:

https://wiki.contextgarden.net/DIN_lang_folder

and then found some info on crop marks here:

https://wiki.contextgarden.net/PaperSetup#Crop_marks


I tried different options (marked=on, market=colour, marked=color...,
something with \setuplayout[location={middle,middle}]...)

Some times the crop marks don't show at all, sometimes they are set off
a bit so they don't fit with the actual document.

I added the whole file as I really do not knwo (yet) how to reduce
things...

Thanks for any help
De Benny

%% This is a template for a Din lang Folder.
%% The folded page of such a flyer is shorter (97mm) than the other pages (100mm)

%% This measure shows how much shorter the folded page is.
\definemeasure
[shortfold]
[3mm]

%% The bleed measure is necessary if you have colored page backgrounds 
%% or images in the bleed.
%% Different print shops need different bleeds.
\definemeasure
[bleed]
[3mm]

%% This is the pagesize of the final PDF.
%% The bleed size is added two times to width and height.
\definepapersize
[A4-flyer]
[width=\dimexpr297mm+2\measured{bleed}\relax,
 height=\dimexpr210mm+2\measured{bleed}\relax]

%% The size of a normal page.
\definepapersize
[flyer-page]
[width=100mm,
 height=210mm]

%% The size of the folded page.
\definepapersize
[flyer-page-small]
[width=\dimexpr100mm-\measure{shortfold}\relax,
 height=210mm]

%% Imposition: With the following two commands we arrange the six pages
%% on the final PDF print sheet.

%% The flyerpages are imposed on the printed sheet.
\setuppapersize
[flyer-page]
[A4-flyer]


%% The pages are arranged as a tryptichon.
\setuparranging
[TRYPTICHON]

%% Because of the shorter folded page and the bleed the pages has
%% to be shifted horizontally on the printed sheet.
%% The values are calculated here.
\definepageshift
[flyer]
[horizontal]
[\dimexpr\measure{bleed}-\measured{shortfold}\relax,
\measure{bleed},
 \measure{bleed},
 \dimexpr2\measured{shortfold}+\measured{bleed}\relax,
 \measure{bleed},
\dimexpr\measure{bleed}-\measured{shortfold}\relax
]


%% The vertical pageshift is simple.
\definepageshift
[flyer]
[vertical]
[\measure{bleed}]

\setuppageshift
[paper]
[flyer]

%% We define some measures to construct the page layout.
\definemeasure
[small]
[3mm]

\definemeasure
[big]
[\measure{small}*2]

%% Each page has a slightly different page layout.
%% The named layouts (1. bracket) inherit values from other layouts
%% which are assigned in the second bracket.
\definelayout
[first]
[page]
[page=flyer-page,
 topspace=2\measured{big},
 backspace=2\measured{small},
 width=\dimexpr\paperwidth-4\measured{small}\relax,
 height=\dimexpr\paperheight-4\measured{big}\relax]

\definelayout
[second]
[first]
[topspace=2\measured{big},
 backspace=2\measured{big},
 width=\dimexpr\paperwidth-3\measured{big}\relax]

\definelayout
[thirdandfourth]
[second]
[backspace=\measure{big},
 width=\dimexpr\paperwidth-2\measured{big}\relax]

\definelayout
[fifthandsixth]
[first]
[backspace=\measure{big},
 width=\dimexpr\paperwidth-2\measured{big}\relax]

%% We assign the layouts to the pages.
\definelayout [1] [first]
\definelayout [2] [second]
\definelayout [3] [thirdandfourth]
\definelayout [4] [thirdandfourth]
\definelayout [5] [fifthandsixth]
\definelayout [6] [fifthandsixth]


%% Some setups
\setupmakeup [doublesided=no]
\setupbodyfont  [mainface,10pt]
\setuptolerance [verytolerant]

\setuplayout[marking=color]


%% We want to see page and layout borders.
%% COMMENT THIS OUT BEFORE YOU PRINT!
\showframe


\starttext
\starttitle[title={First page},marking{ }]
\input lorem
  \stoptitle 
  \starttitle[title={Second page},marking{ }]
\input lorem

  \stoptitle 
  \starttitle[title={Third page},marking{ }]
\input lorem

  \stoptitle

  \starttitle[title={Fourth page},marking{ }]
\setuppapersize [flyer-page-small] [A4-flyer]
\input lorem

  \stoptitle

  \starttitle[title={Fifth page},marking{ }]
\input lorem

  \stoptitle

  \starttitle[title={Sixth page},marking{ }]
  \setuppapersize [flyer-page] [A4-flyer]
\input lorem

  \stoptitle

\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] LMTX deeptextcommand issue

2019-04-02 Thread Hans Hagen

On 4/2/2019 8:41 PM, Jan Tosovsky wrote:

Dear All,

my document ends with the index

\startbackmatter
\chapter{Rejstřík jmenný}
\start
\switchtobodyfont[8pt]
\placeindexname
\stop
\stopbackmatter
\startbackmatter
\chapter{Rejstřík věcný}
\start
\switchtobodyfont[8pt]
\placeindexsubject
\stop
\stopbackmatter

At the beginning there is a condition for one word (kind of manual column
balancing) - but according to the log, see below, this seems to be an issue:
\newconditional\IndexState
\define[1]\IndexInternalCommand
  
{\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSta

te}#1}

\define[1]\IndexCommand
   {\setfalse\IndexState
\setbox\scratchbox\hbox{#1}%
\ifconditional\IndexState
  \column
\fi
\box\nextbox}


does

\unexpanded\def\IndexCommand#1%
  {

work?


\defineregister[indexname][indexnames]
\setupregister[indexname][command=\Word, textcommand=\IndexCommand,
deeptextcommand=\IndexInternalCommand]

\defineregister[indexsubject][indexsubjects]
\setupregister[indexsubject][command=\Word]
\setupheadtext[indexname=Rejstřík jmenný]
\setupheadtext[indexsubject=Rejstřík věcný]


This worked in luatex 1.0.1, but in LMTX I am getting:

structures  > begin of sectionblock 'backpart'
structure   > sectioning > chapter @ level 2 : 0.1 -> Rejstřík jmenný
fonts   > defining > font 'palab', feature 'locl', script 'latn', no
language 'dflt'

tex error   > tex error on line 25 in file
D:/context-lmtx/tex/texmf-context/tex/context/base/mkiv/page-run.mkiv: ?

 [internal expandable lua function call]

\IndexInternalCommand ...\setfalse \IndexState }#1
   
\IndexCommand ...ate \setbox \scratchbox \hbox {#1

   }\ifconditional
\IndexStat...
\doapplyregisterentrycommand ...extcommand {#2
   \dostoptagged
\registerentry ...plyregisterentrycommand {#2}{#5}
   \fi \else \let
\currentreg...
l.25 }
 
...l.11633 \stop



15
16 \registerctxluafile{page-run}{}
17
18 \unprotect
19
20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
21
22 \gdef\page_layouts_show_print[#1][#2][#3]% only english
23   {\setbuffer[crap]%
24   \unprotect
25 >>  \definepapersize[X][\c!width=4em, \c!height=6em]
26     \definepapersize[Y][\c!width=12em,\c!height=14em]
27 \setuppapersize[X,#1][Y,#2]
28 \setuplayout[#3]
29 \setuplayout[\v!page]
30 \framed
31   [\c!offset=\v!overlay,\c!strut=\v!no,
32\c!width=\paperwidth,\c!height=\paperheight]
33   {\ss ABC\par DEF}%
34   \protect
35\endbuffer


When I've seen that 'crap' and weird page dimensions, I thought it is part
of the April fool, like all that LMTX announcement.

This issue is not urgent, I was just curious how different the output is.

Thanks,

Jan

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


[NTG-context] LMTX deeptextcommand issue

2019-04-02 Thread Jan Tosovsky
Dear All,

my document ends with the index

\startbackmatter
\chapter{Rejstřík jmenný}
\start
\switchtobodyfont[8pt]
\placeindexname
\stop
\stopbackmatter
\startbackmatter
\chapter{Rejstřík věcný}
\start
\switchtobodyfont[8pt]
\placeindexsubject
\stop
\stopbackmatter

At the beginning there is a condition for one word (kind of manual column
balancing) - but according to the log, see below, this seems to be an issue:
\newconditional\IndexState
\define[1]\IndexInternalCommand
 
{\doifelse{#1}{Dolsko}{\global\settrue\IndexState}{\global\setfalse\IndexSta
te}#1}

\define[1]\IndexCommand
  {\setfalse\IndexState
   \setbox\scratchbox\hbox{#1}%
   \ifconditional\IndexState
 \column
   \fi
   \box\nextbox}

\defineregister[indexname][indexnames]
\setupregister[indexname][command=\Word, textcommand=\IndexCommand,
deeptextcommand=\IndexInternalCommand]

\defineregister[indexsubject][indexsubjects]
\setupregister[indexsubject][command=\Word]
\setupheadtext[indexname=Rejstřík jmenný]
\setupheadtext[indexsubject=Rejstřík věcný]


This worked in luatex 1.0.1, but in LMTX I am getting:

structures  > begin of sectionblock 'backpart'
structure   > sectioning > chapter @ level 2 : 0.1 -> Rejstřík jmenný
fonts   > defining > font 'palab', feature 'locl', script 'latn', no
language 'dflt'

tex error   > tex error on line 25 in file
D:/context-lmtx/tex/texmf-context/tex/context/base/mkiv/page-run.mkiv: ?

 [internal expandable lua function call]
   
\IndexInternalCommand ...\setfalse \IndexState }#1
  
\IndexCommand ...ate \setbox \scratchbox \hbox {#1
  }\ifconditional
\IndexStat...
\doapplyregisterentrycommand ...extcommand {#2
  \dostoptagged 
\registerentry ...plyregisterentrycommand {#2}{#5}
  \fi \else \let
\currentreg...
l.25 }

...l.11633 \stop
   

15 
16 \registerctxluafile{page-run}{}
17 
18 \unprotect
19 
20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
21 
22 \gdef\page_layouts_show_print[#1][#2][#3]% only english
23   {\setbuffer[crap]%
24   \unprotect
25 >>  \definepapersize[X][\c!width=4em, \c!height=6em]
26     \definepapersize[Y][\c!width=12em,\c!height=14em]
27 \setuppapersize[X,#1][Y,#2]
28 \setuplayout[#3]
29 \setuplayout[\v!page]
30 \framed
31   [\c!offset=\v!overlay,\c!strut=\v!no,
32\c!width=\paperwidth,\c!height=\paperheight]
33   {\ss ABC\par DEF}%
34   \protect
35\endbuffer


When I've seen that 'crap' and weird page dimensions, I thought it is part
of the April fool, like all that LMTX announcement.

This issue is not urgent, I was just curious how different the output is.

Thanks,

Jan

___
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] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Jan U. Hasecke
Am 12.03.19 um 17:25 schrieb Wolfgang Schuster:
> \definepapersize [A4/3] [width=99mm,height=210mm]
> 
> \setuppapersize [A4/3] [A4,landscape]
> 
> \setuppaper [nx=3,ny=1]
> 
> \setuparranging [XY]
> 
> \setupbodyfont [10pt]
> 
> \showframe[page]
> 
> \starttext
> \dorecurse{10}{\samplefile{tufte}}
> \stoptext

Thanks a lot, Wolfgang.

juh

-- 
Soziale Plastik. Die Kunst der Allmende
Essay zum 30. Todestag von Joseph Beuys
http://www.amazon.de/dp/1523458763/
Taschenbuch, 130 Seiten, EUR 9,90
___
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] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 12.03.19 um 13:04:

Hi,

I managed to print din long flyers (100mmx210mm with 97mmx210mm fold
page) with 6 pages using a lot of pageshifts etc.

But how can I print one simple din long page (99mmx210mm) three times on
a din a4 page so that I can cut it myself?

The following does not work.

\definepapersize
[flyer]
[width=99mm,height=210mm]

\setuppapersize [flyer] [a4]

\setuparranging[1*3]

The option [1*3] does not exist for \setuparranging.
But I thought this could be what I want one sheet three pages.


Use the XY arrangement method and set the number of columns with the 
nx-key of \setuppaper.



\definepapersize [A4/3] [width=99mm,height=210mm]

\setuppapersize [A4/3] [A4,landscape]

\setuppaper [nx=3,ny=1]

\setuparranging [XY]

\setupbodyfont [10pt]

\showframe[page]

\starttext
\dorecurse{10}{\samplefile{tufte}}
\stoptext

Wolfgang

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

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


[NTG-context] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Jan U. Hasecke
Hi,

I managed to print din long flyers (100mmx210mm with 97mmx210mm fold
page) with 6 pages using a lot of pageshifts etc.

But how can I print one simple din long page (99mmx210mm) three times on
a din a4 page so that I can cut it myself?

The following does not work.

\definepapersize
[flyer]
[width=99mm,height=210mm]

\setuppapersize [flyer] [a4]

\setuparranging[1*3]

The option [1*3] does not exist for \setuparranging.
But I thought this could be what I want one sheet three pages.

TIA
juh

___
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] right figure at bottom of page can narrow text block on whole next page

2019-02-06 Thread Rik Kabel

On 1/29/2019 06:48, Sanjoy Mahajan wrote:

\definepapersize[bookcrop][width=137mm,height=221mm]
\setuppapersize [bookcrop][bookcrop]

\setuplayout[marking=on,
   location=middle,
   backspace=13.5mm,
   width=middle,
   topspace=32bp,
   header=10bp, headerdistance=26bp,
   footerdistance=16bp, footer=10bp,
   height=578bp,
]

\setupinterlinespace[line=1.3em]
\setupbodyfont[times,10bp]

\starttext

\input knuth

Silly para

Silly para

\placefigure[right]{}{\framed[width=100bp,height=75.75bp]{\null}}

\input knuth

\dorecurse{8}{\par Silly para}

\placefigure[right]{}{\framed[width=100bp,height=60.75bp]{\null}}

\dorecurse{32}{Silly text }

\dorecurse{3}{\input knuth \par}

\stoptext


This has come up a few times on this list. Hans has stated a reluctance 
to make a change or add an option to discard the unused vertical space 
(see https://www.mail-archive.com/ntg-context@ntg.nl/msg21273.html from 
March 2007, and most recently 
https://www.mail-archive.com/ntg-context@ntg.nl/msg86872.html in January 
2018).


The workaround that Hans suggests in that last post , adding the flag 
'high', almost resolves the issue in your example.


--
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] right figure at bottom of page can narrow text block on whole next page

2019-01-29 Thread Sanjoy Mahajan
Dear List,

A figure near the bottom of the page can narrow the text block on the
whole next page.  I noticed the problem when typesetting my (next) book.
But the book is more a maximal than a minimal example.  However, from it
I made the minimal example included below that uses no external figures.

Figure 2 is the bottom of the page and the paragraph flows to its left
with a correspondingly narrower text block.  So far, so good.  But the
text block also narrows for the entirity of page 2 and for the first
two lines of page 3.  

I've found the problem on the MkIV 2019.01.07 and 2019.01.28 betas (all
on Debian amd64), as well as on the live ConTeXt (which is the
2019.01.28 beta).

-Sanjoy

== start margin-figure-region.tex =
\definepapersize[bookcrop][width=137mm,height=221mm]
\setuppapersize [bookcrop][bookcrop]

\setuplayout[marking=on, 
  location=middle,
  backspace=13.5mm,
  width=middle,
  topspace=32bp, 
  header=10bp, headerdistance=26bp,
  footerdistance=16bp, footer=10bp,
  height=578bp,
]

\setupinterlinespace[line=1.3em]
\setupbodyfont[times,10bp]

\starttext

\input knuth

Silly para

Silly para

\placefigure[right]{}{\framed[width=100bp,height=75.75bp]{\null}}

\input knuth

\dorecurse{8}{\par Silly para}

\placefigure[right]{}{\framed[width=100bp,height=60.75bp]{\null}}

\dorecurse{32}{Silly text }

\dorecurse{3}{\input knuth \par}

\stoptext
== end margin-figure-region.tex =
___
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] columnset vs columns

2018-12-22 Thread Henri Menke


On 23/12/18 7:59 PM, Thangalin wrote:
> Minimal example:
> 
> \definepapersize[PaperSize][
>   width=400mm,
>   height=100mm,
> ]
> 
> \setuppapersize[PaperSize]

\setuplayout[grid=yes]

> 
> \starttext
>   \startcolumnset[n=3]
> \dorecurse{3}{\input knuth}
>   \stopcolumnset
> \stoptext
> 
> The old-columnsets module fails with an error. The following works as
> expected:
> 
> \definepapersize[PaperSize][
>   width=400mm,
>   height=100mm,
> ]
> 
> \setuppapersize[PaperSize]
> 
> \starttext
>   \startcolumns[n=3]
> \dorecurse{3}{\input knuth}
>   \stopcolumns
> \stoptext
> 
> Thank you.
> 
> 
> ___
> 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] columnset vs columns

2018-12-22 Thread Thangalin
Minimal example:

\definepapersize[PaperSize][
  width=400mm,
  height=100mm,
]

\setuppapersize[PaperSize]

\starttext
  \startcolumnset[n=3]
\dorecurse{3}{\input knuth}
  \stopcolumnset
\stoptext

The old-columnsets module fails with an error. The following works as
expected:

\definepapersize[PaperSize][
  width=400mm,
  height=100mm,
]

\setuppapersize[PaperSize]

\starttext
  \startcolumns[n=3]
\dorecurse{3}{\input knuth}
  \stopcolumns
\stoptext

Thank you.


bug-01.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] Creating flyers with ConTeXt

2018-09-26 Thread Marco Patzer
On Tue, 25 Sep 2018 12:57:54 +0200
"Jan U. Hasecke"  wrote:

> \definemeasure
>   [bleed]
>   [3mm]
> 
> I used this value to generalize the A4-flyer dimensions.
> 
> \definepapersize
>   [A4-flyer]
>   [width=\dimexpr297mm+2\measured{bleed}\relax,
>height=\dimexpr210mm+2\measured{bleed}\relax]

That looks good. Note that the value 297 needs to be changed if
“shortfold” is changed. Which is unlikely because it's based on an
A4 paper size. Still, keep that in mind.

> But horizontal pageshift is beyond my grasp.
> 
> I can't see how to generalize the values.

I looked into it and this is what I came up with:

\definepageshift
  [flyer]
  [horizontal]
  [\dimexpr\measure{bleed}/2-\measure{shortfold}\relax,
   \dimexpr\measure{bleed}/2\relax,
   \dimexpr\measure{bleed}/2\relax,
   \dimexpr\measure{bleed}/2+2\measured{shortfold}\relax,
   \dimexpr\measure{bleed}/2\relax,
   \dimexpr\measure{bleed}/2-\measure{shortfold}\relax]

Marco
___
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] Creating flyers with ConTeXt

2018-09-25 Thread Jan U. Hasecke
On 25.09.18 09:56, Marco Patzer wrote:
> In general it shouldn't be too hard to create two variables, “bleed”
> and “shortfold” and make the rest dependent on those two. But this
> didn't work for page shift when I tried. Probably because I didn't
> really grasp how pageshift works.

\definemeasure
[bleed]
[3mm]

I used this value to generalize the A4-flyer dimensions.

\definepapersize
[A4-flyer]
[width=\dimexpr297mm+2\measured{bleed}\relax,
 height=\dimexpr210mm+2\measured{bleed}\relax]



But horizontal pageshift is beyond my grasp.

I can't see how to generalize the values.

This example of yours works with 1mm bleed.

\definepageshift
  [flyer]
  [horizontal]
  [-2mm, 1mm, 1mm, 6.8mm, 1mm, -2mm]


This seems to work with 2mm bleed:

\definepageshift
  [flyer]
  [horizontal]
  [-1mm, 2mm, 2mm, 8mm, 2mm, -1mm]

And these are your values with 3mm bleed.

\definepageshift
[flyer]
[horizontal]
[\zeropoint, % 0
 \measure{shortfold},% 3mm
 \measure{shortfold},% 3mm
 3\measured{shortfold},  % 9mm
 \measure{shortfold},% 3mm
 \zeropoint] % 0


I tried to calculate it, but this equation is wrong.

\definepageshift
[flyer]
[horizontal]
[\dimexpr\measure{bleed}-\measure{shortfold}\relax,
\measure{shortfold},
 \measure{shortfold},
 3\measured{shortfold},
 \measure{shortfold},
\dimexpr\measure{bleed}-\measure{shortfold}\relax
]

It only works for a bleed of 3 mm.

juh
___
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] Creating flyers with ConTeXt

2018-09-24 Thread Jan U. Hasecke
Hi Marco,

On 21.09.18 16:56, Marco Patzer wrote:

> A while ago I made a corporate flyer with context using the
> TRYPTICHON method. Printing required 3mm bleed.

Thanks a lot for this template. This is exactly what I need.

I try to understand it in order to adapt it to the requirements of my
print shop which only needs a bleed of 1mm.

I hope that I understand it right:

Page 1,2,3 and 6 are 100mm

Page 4 and 5 are 97mm as these are the pages that are folded to the inside.

The measure "shortfold" (3mm) reduces the 100mm page to 97mm. Right?

The pageshift thing is beyond my horizon so I won't comment on this.

You adjust the backspace of the pages with multiples of the measure
"big". Right?

As you can see in my example I use layers on page 2-4 to have bleeding
images on the top of the page. This works more or less.

But as you can see there are blank white spaces between the images of
page 2-4. Maybe I can adjust this by using absolut measures like 100mm
or 97mm in the layers.

I have to adjust the layout of pages 2-4 so that the text starts below
the images.

An now here is my question. Is there a value I can simply change to have
a pdf with only 1mm bleed?

Only adjusting the papersize A4-flyer to 299mm/212mm does not work of
course.

TIA
juh

%% The page shift of page #6 needs to be adjusted if the value is changed, no
%% clue why.
%% A4-flyer pagesize needs to be adjusted as well
\definemeasure
	[shortfold]
	[3mm]

\definepapersize
	[A4-flyer]
	[width=303mm,
	 height=216mm]

\definepapersize
	[flyer-page]
	[width=100mm,
	 height=210mm]

\definepapersize
  [flyer-page-small]
	[width=\dimexpr100mm-\measure{shortfold}\relax,
	 height=210mm]

\setuppapersize
	[flyer-page]
	[A4-flyer]

\setuparranging
	[TRYPTICHON]

%% The page shift of page #6 needs to be adjusted if shortfold is adjusted, no
%% clue why.
\definepageshift
	[flyer]
	[horizontal]
	[\zeropoint,
	 \measure{shortfold},
	 \measure{shortfold},
	 3\measured{shortfold},
	 \measure{shortfold},
	 \zeropoint]

\definepageshift
	[flyer]
	[vertical]
	[\measure{shortfold}]

\setuppageshift
	[paper]
	[flyer]

\definemeasure
	[small]
	[3mm]

\definemeasure
	[big]
	[\measure{small}*2]

\definelayout
	[first]
	[page]
	[page=flyer-page,
	 topspace=2\measured{big},
	 backspace=2\measured{small},
	 width=\dimexpr\paperwidth-4\measured{small}\relax,
	 height=\dimexpr\paperheight-4\measured{big}\relax]

\definelayout
	[second]
	[first]
	[topspace=4\measured{big},
	 backspace=2\measured{big},
	 width=\dimexpr\paperwidth-3\measured{big}\relax,
	 height=\dimexpr\paperheight-4\measured{big}-2\measured{big}\relax]

\definelayout
	[thirdandfourth]
	[second]
	[backspace=\measure{big},
	 width=\dimexpr\paperwidth-2\measured{big}\relax]

\definelayout
	[fifthandsixth]
	[first]
	[backspace=\measure{big},
	 width=\dimexpr\paperwidth-2\measured{big}\relax]

\definelayout [1] [first]
\definelayout [2] [second]
\definelayout [3] [thirdandfourth]
\definelayout [4] [thirdandfourth]
\definelayout [5] [fifthandsixth]
\definelayout [6] [fifthandsixth]


\setuphead[title][header=none,footer=none]

\definecolor [hs-logoblau] [c=1.0,m=0.46,y=0.0,k=0.42]
\definecolor [hs-dunkelblau] [c=0.65,m=0.36,y=0.0,k=0.26]
\definecolor [hs-mittelblau] [c=0.72,m=0.33,y=0.0,k=0.28]
\definecolor [hs-hellblau] [c=0.30,m=0.14,y=0.0,k=0.14]
\definecolor [hs-orange] [c=0.0,m=0.67,y=1.0,k=0.13]

\definefontfamily
[mainface]
[rm]
[Tex Gyre Heros]



\setupmakeup [doublesided=no]
\setupinterlinespace[line=3ex]

\setuphead [title] [textcolor=hs-dunkelblau,textstyle=\bfc, align=right]
\setupbodyfont	[mainface,10pt]
\setuptolerance [verytolerant]
\mainlanguage [de]
\setbreakpoints[compound]

\definelayer[Hintergrund]
[x=0, y=0, width=\paperwidth, height=\paperwidth]

\setlayer[Hintergrund]
[x=1.2cm, y=1cm]
{\externalfigure[../bilder/logo.pdf][width=7cm]}

\definelayer[topic1]
[x=-3mm, y=-3mm, width=\paperwidth, height=\paperheight]

\setlayer[topic1]
[x=-3mm, y=-3mm]
{\externalfigure[../bilder/topic1.png][width=102mm]}

\definelayer[topic2]
[x=0, y=-3mm, width=\paperwidth, height=\paperheight]

\setlayer[topic2]
[x=0cm, y=-3mm]
{\externalfigure[../bilder/topic2.png][width=99mm,height=58mm]}

\definelayer[topic3]
[x=0, y=0, width=\paperwidth, height=\paperwidth]

\setlayer[topic3]
[x=0cm, y=-3mm]
{\externalfigure[../bilder/topic3.png][width=102mm]}

\definelayer[blau]
[x=0, y=-3mm, width=\paperwidth, height=\paperheight]

\setlayer[blau]
[x=0mm,y=-3mm]
{\framed[frame=off,background=color, backgroundcolor=hs-dunkelblau,width=102mm, height=303mm]{}}

\showframe


\starttext
\setupbackgrounds[page][background=blau]

\startstandardmakeup

\externalfigure [../bilder/example.png] [width=\textwidth]
\blank[5*big]

\externalfigure [../bilder/logo.svg] [width=\textwidth]


\stopstandardmakeup

\starttitle[title={PAGE 2},marking{}]
\setupbackgrounds[page][background=topic1]



   \input lorem
\stoptitle 

\starttitle[title={PAGE 3},marking{ }]
\setupbackgrounds[page][backgr

Re: [NTG-context] Creating flyers with ConTeXt

2018-09-21 Thread Marco Patzer
On Fri, 21 Sep 2018 15:27:02 +0200
"Jan U. Hasecke"  wrote:

> consulting the wiki I found
> http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf
> and the command \setuparranging [TRYPTICHON]. So I think that I should
> be able to make a pdf for a flyer and print it with an online printer.
> 
> But as I am still very new to ConTeXt, I need a kickstart doing it.

A while ago I made a corporate flyer with context using the
TRYPTICHON method. Printing required 3mm bleed.

> Has anybody made a template for a leaflet flyer.

I created a context module for the flyer, so it was easy to add
content and support different languages. However, this is a very
specific module including corporate design and nothing generally
usable.

I trimmed the specific parts and attached a working file producing a
flyer. I left a few bits of the page design in the file.

Marco
%% The page shift of page #6 needs to be adjusted if the value is changed, no
%% clue why.
%% A4-flyer pagesize needs to be adjusted as well
\definemeasure
	[shortfold]
	[3mm]

\definepapersize
	[A4-flyer]
	[width=303mm,
	 height=216mm]

\definepapersize
	[flyer-page]
	[width=100mm,
	 height=210mm]

\definepapersize
  [flyer-page-small]
	[width=\dimexpr100mm-\measure{shortfold}\relax,
	 height=210mm]

\setuppapersize
	[flyer-page]
	[A4-flyer]

\setuparranging
	[TRYPTICHON]

%% The page shift of page #6 needs to be adjusted if shortfold is adjusted, no
%% clue why.
\definepageshift
	[flyer]
	[horizontal]
	[\zeropoint,
	 \measure{shortfold},
	 \measure{shortfold},
	 3\measured{shortfold},
	 \measure{shortfold},
	 \zeropoint]

\definepageshift
	[flyer]
	[vertical]
	[\measure{shortfold}]

\setuppageshift
	[paper]
	[flyer]

\definemeasure
	[small]
	[3mm]

\definemeasure
	[big]
	[\measure{small}*2]

\definelayout
	[first]
	[page]
	[page=flyer-page,
	 topspace=2\measured{big},
	 backspace=2\measured{small},
	 width=\dimexpr\paperwidth-4\measured{small}\relax,
	 height=\dimexpr\paperheight-4\measured{big}\relax]

\definelayout
	[second]
	[first]
	[topspace=4\measured{big},
	 backspace=2\measured{big},
	 width=\dimexpr\paperwidth-3\measured{big}\relax,
	 height=\dimexpr\paperheight-4\measured{big}-2\measured{big}\relax]

\definelayout
	[thirdandfourth]
	[second]
	[backspace=\measure{big},
	 width=\dimexpr\paperwidth-2\measured{big}\relax]

\definelayout
	[fifthandsixth]
	[first]
	[backspace=\measure{big},
	 width=\dimexpr\paperwidth-2\measured{big}\relax]

\definelayout [1] [first]
\definelayout [2] [second]
\definelayout [3] [thirdandfourth]
\definelayout [4] [thirdandfourth]
\definelayout [5] [fifthandsixth]
\definelayout [6] [fifthandsixth]

\defineoverlay
	[pagedecoration]
	[\useMPgraphic{pagedecoration}]

\setupbackgrounds
	[page]
	[background=pagedecoration,
	 backgroundcolor=lightblue]

\startuseMPgraphic{pagedecoration}
	distanceSmall := 3mm;
	distanceBig   := distanceSmall;
	bleed := 3mm;

	if PageNumber==1:

		path pageOne;
		pageOne := (0, -bleed) -- (PaperWidth + bleed, -bleed) -- (PaperWidth + bleed, distanceBig)
			-- (2.5distanceBig, distanceBig){left} .. {up}(distanceSmall, 2.5distanceBig)
			-- (distanceSmall, PaperHeight +  bleed) -- (0, PaperHeight + bleed) -- cycle;
		fill pageOne withcolor "lightblue";
		setbounds currentpicture to OverlayBox;

	elseif PageNumber==2:

		path pageTwo;
		pageTwo := (-bleed, -bleed) -- (PaperWidth, -bleed)
			-- (PaperWidth, distanceBig)
			-- (2.5distanceBig, distanceBig){left} .. {up}(distanceBig, 2.5distanceBig)
			-- (distanceBig, PaperHeight + bleed) -- (-bleed, PaperHeight + bleed) -- cycle;
		fill pageTwo withcolor "lightblue";
		setbounds currentpicture to OverlayBox;

	elseif PageNumber==3:

		path pageThree;
		pageThree := (0, -bleed) -- (PaperWidth, -bleed)
			-- (PaperWidth, distanceBig)
			-- (0, distanceBig) -- cycle;
		fill pageThree withcolor "lightblue";
		setbounds currentpicture to OverlayBox;

	elseif PageNumber==4:

	elseif PageNumber==5:

		path pageFive;
		pageFive := (-bleed, -bleed) -- (PaperWidth, -bleed)
			-- (PaperWidth, distanceBig)
			-- (-bleed, distanceBig) -- cycle;
		fill pageFive withcolor "lightblue";
		setbounds currentpicture to OverlayBox;

	elseif PageNumber==6:

		path pageSix;
		pageSix := (distanceSmall, -bleed) -- (PaperWidth, -bleed)
			-- (PaperWidth, PaperHeight-distanceBig)
			-- (2.5distanceBig, PaperHeight-distanceBig){left}
			.. {down}(distanceSmall, PaperHeight-2.5distanceBig) -- cycle;
		fill pageSix withcolor "lightblue";
		setbounds currentpicture to OverlayBox;

	fi
\stopuseMPgraphic

\starttext
	\input knuth \page
	\input knuth \page
	\input knuth \page
	\setuppapersize [flyer-page-small] [A4-flyer]
	\input knuth \page
	\input knuth \page
	\setuppapersize [flyer-page] [A4-flyer]
	\input knuth
\stoptext
___
If your question is of interest to others as well, ple

Re: [NTG-context] Creating flyers with ConTeXt

2018-09-21 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 21.09.18 um 16:03:

Thanks a lot. This is really straight forward. Embarrasing. ;-)


You should also read the following thread where the goal was to optimize 
the size of the inner pages to make folding easier.


https://mailman.ntg.nl/pipermail/ntg-context/2018/091766.html


On 21.09.18 15:48, Wolfgang Schuster wrote:

\definepapersize [A4/3] [width=99mm,height=210mm]

\setuppapersize [A4/3] [A4,landscape]

One question: is "A4/3" just a marker or does it include calculation?


It’s just a name for the paper size and the / is part of it, I choose it 
because we already have A4/2 as a predefined size.


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] Creating flyers with ConTeXt

2018-09-21 Thread Jan U. Hasecke
Thanks a lot. This is really straight forward. Embarrasing. ;-)

On 21.09.18 15:48, Wolfgang Schuster wrote:
> \definepapersize [A4/3] [width=99mm,height=210mm]
> 
> \setuppapersize [A4/3] [A4,landscape]

One question: is "A4/3" just a marker or does it include calculation?

juh
___
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] Creating flyers with ConTeXt

2018-09-21 Thread Brian Ballsun-Stanton
I use 3 steps to make: https://www.fedarch.org/resources/introPamphlet.pdf

Step 1, I lay out each individual page in a document.
Step 2. I make the cover in its own document. (I confess I don't remember
why I chose to do this)
Step 3. And then in a different document, I perform imposition to map the
pages to the folds.

My imposition code:

\definepapersize[sheet][width=99mm,height=210mm]

\setuppapersize[sheet][A4, landscape]
\setuppaper[nx=3, ny=1, dx=0mm, dy=0mm] % must come before \setuparranging!
\setuplayout[page][location=middle, marking=on]
\setuparranging [XY]
\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]

\starttext
\filterpages[../pdf/mobilePamphletInterior.pdf][4][width=0pt]
\filterpages[../pdf/mobilePamphletCover.pdf][2][width=0pt]
\filterpages[../pdf/mobilePamphletCover.pdf][1][width=0pt]
\filterpages[../pdf/mobilePamphletInterior.pdf][1,2,3][width=0pt]

\stoptext





On Fri, 21 Sep 2018 at 23:27, Jan U. Hasecke 
wrote:

> Hi all,
>
> consulting the wiki I found
>
> http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf
> and the command \setuparranging [TRYPTICHON]. So I think that I should
> be able to make a pdf for a flyer and print it with an online printer.
>
> But as I am still very new to ConTeXt, I need a kickstart doing it.
>
> Has anybody made a template for a leaflet flyer. In Germany we call it
> DIN lang afaik, I don't know the English name of the format. But it ends
> up with six pages (width 99mm/ height 210 mm).
>
> TIA
> juh
>
> ___
> 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] Creating flyers with ConTeXt

2018-09-21 Thread Wolfgang Schuster

\definepapersize [A4/3] [width=99mm,height=210mm]

\setuppapersize [A4/3] [A4,landscape]

\setuparranging [TRYPTICHON]

\setupbodyfont [10pt]

\starttext
\dorecurse{12}{\samplefile{knuth}}
\stoptext


Wolfgang


Jan U. Hasecke schrieb am 21.09.18 um 15:27:

Hi all,

consulting the wiki I found
http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf
and the command \setuparranging [TRYPTICHON]. So I think that I should
be able to make a pdf for a flyer and print it with an online printer.

But as I am still very new to ConTeXt, I need a kickstart doing it.

Has anybody made a template for a leaflet flyer. In Germany we call it
DIN lang afaik, I don't know the English name of the format. But it ends
up with six pages (width 99mm/ height 210 mm).

TIA
juh
___
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] Question to covers

2018-07-21 Thread Henning Hraban Ramm
Hi Wolfgang,

thank you so much!

If we put the externalfigure setup in front, we can also calculate the spine 
width:

\getfiguredimensions[MAG]
\definemeasure [SpineWidth] [\dimexpr0.01mm * (\noffigurepages/2) + 0.5mm\relax]

Where 0.01mm is the paper thickness (100 g/m2) and 0.5mm is the folding 
addition – ask your printshop/bookbinder how much they need!


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

Am 2018-07-21 um 17:39 schrieb Wolfgang Schuster :

> 
>> Henning Hraban Ramm 20. Juli 2018 um 20:49
>> 
>> Hi Tomáš,
>> 
>> I don’t know of anything existing.
>> Find attached what I use for a magazine – I include title and back pages in 
>> the main PDF (to get a complete issue for corrections and online 
>> distribution) and use that as externalfigure, just creating the spine anew.
> Hi Henning,
> 
> below is a modified version of your example where I changed a few things.
> 
> 1. I used the "measure" commands to set the spine values, the advantage of 
> the \measure is that it falls back to 0pt when you try to use a undefined 
> value.
> 
> 2. I determined the last page of the megazine with the \getfiguredimensions 
> command, afterwards you can use the \noffigurepages command to get the last 
> page of the document.
> 
> 3. I put the layer and frame settings for the \setlayerframed command in 
> separate arguments.
> 
> 4. I got rid of the backgrounds setup for the layer. A better solution here 
> is to create a page without margins which can be done with the "page" layout 
> where you flush the collected content of the layer with the \flushlayer 
> command.
> 
> 5. I set the texts for the isse number and title with the \setvariables 
> command.
> 
> Wolfgang
> 
> %%
> \definemeasure [SpineWidth]  [6mm]
> \definemeasure [SpineOffset] [\dimexpr(\measure{SpineWidth}-9pt)/5\relax]
> 
> \definepapersize
>   [Cover]
>   [width=\dimexpr420mm+\measure{SpineWidth}\relax,
>height=297mm]
> 
> \setuppapersize [Cover]
> 
> \setupexternalfigures [directory={_pdf}]
> 
> \useexternalfigure [MAG] [magazine.pdf]
> 
> \setvariables
>   [cover]
>   [issue={34},
>topic={Topic}]
> 
> \setuplayout
>   [marking=on]
> 
> \definelayer
>   [whole]
>   [width=\paperwidth,
>height=\paperheight]
> 
> \starttext
> 
> \startlayout [page]
> 
> \setlayer
>   [whole]
>   [x=0mm,
>y=0mm]
>   {\getfiguredimensions[MAG]
>\externalfigure[MAG][page=\noffigurepages]}
> 
> \setlayer
>   [whole]
>   [x=\dimexpr210mm+\measure{SpineWidth}\relax,
>y=0mm]
>   {\externalfigure[MAG][page=1]}
> 
> \setlayerframed
>   [whole]
>   [x=210mm,
>y=20mm]
>   [frame=off,
>offset=overlay,
>width=\measure{SpineWidth},
>align=center]
>   {\getvariable{cover}{issue}}
> 
> \setlayerframed
>   [whole]
>   [x=210mm,
>y=92mm]
>   [frame=off,
>offset=overlay,
>align=right,
>width=\measure{SpineWidth},
>height=190mm]
>   {\rotate
>  [rotation=90,
>   align={right,middle},
>   frame=off,
>   height=\measure{SpineWidth},
>   width=190mm]
>  {\vskip\measure{SpineOffset}
>   \vbox{MAGAZINE\hfill\getvariable{cover}{topic
> 
> \flushlayer [whole]
> 
> \stoplayout
> 
> \stoptext
> %%
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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

Re: [NTG-context] Question to covers

2018-07-21 Thread Wolfgang Schuster



Henning Hraban Ramm <mailto:te...@fiee.net>
20. Juli 2018 um 20:49

Hi Tomáš,

I don’t know of anything existing.
Find attached what I use for a magazine – I include title and back 
pages in the main PDF (to get a complete issue for corrections and 
online distribution) and use that as externalfigure, just creating the 
spine anew.

Hi Henning,

below is a modified version of your example where I changed a few things.

1. I used the "measure" commands to set the spine values, the advantage 
of the \measure is that it falls back to 0pt when you try to use a 
undefined value.


2. I determined the last page of the megazine with the 
\getfiguredimensions command, afterwards you can use the \noffigurepages 
command to get the last page of the document.


3. I put the layer and frame settings for the \setlayerframed command in 
separate arguments.


4. I got rid of the backgrounds setup for the layer. A better solution 
here is to create a page without margins which can be done with the 
"page" layout where you flush the collected content of the layer with 
the \flushlayer command.


5. I set the texts for the isse number and title with the \setvariables 
command.


Wolfgang

%%
\definemeasure [SpineWidth]  [6mm]
\definemeasure [SpineOffset] [\dimexpr(\measure{SpineWidth}-9pt)/5\relax]

\definepapersize
  [Cover]
  [width=\dimexpr420mm+\measure{SpineWidth}\relax,
   height=297mm]

\setuppapersize [Cover]

\setupexternalfigures [directory={_pdf}]

\useexternalfigure [MAG] [magazine.pdf]

\setvariables
  [cover]
  [issue={34},
   topic={Topic}]

\setuplayout
  [marking=on]

\definelayer
  [whole]
  [width=\paperwidth,
   height=\paperheight]

\starttext

\startlayout [page]

\setlayer
  [whole]
  [x=0mm,
   y=0mm]
  {\getfiguredimensions[MAG]
   \externalfigure[MAG][page=\noffigurepages]}

\setlayer
  [whole]
  [x=\dimexpr210mm+\measure{SpineWidth}\relax,
   y=0mm]
  {\externalfigure[MAG][page=1]}

\setlayerframed
  [whole]
  [x=210mm,
   y=20mm]
  [frame=off,
   offset=overlay,
   width=\measure{SpineWidth},
   align=center]
  {\getvariable{cover}{issue}}

\setlayerframed
  [whole]
  [x=210mm,
   y=92mm]
  [frame=off,
   offset=overlay,
   align=right,
   width=\measure{SpineWidth},
   height=190mm]
  {\rotate
 [rotation=90,
  align={right,middle},
  frame=off,
  height=\measure{SpineWidth},
  width=190mm]
 {\vskip\measure{SpineOffset}
  \vbox{MAGAZINE\hfill\getvariable{cover}{topic

\flushlayer [whole]

\stoplayout

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

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

[NTG-context] issue with balanced columns

2018-07-15 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\showframe
\showgrid

\setuplanguage[agr][patterns={agr, us}]
\mainlanguage[agr]

\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]

\setupbodyfont[dejavu, 13pt]

\setupbodyfontenvironment[default][em=italic, x=.95]

\setupregister[index]
[language=gr,
 indicator=no,
 before=,
 after=,
 distance=3ex,
 textstyle=\tfx,
 pagenumber=no,
 n=2,
 align={verybroad, hz,hanging},
 method={zm,zc}]

\starttext
\mbox{}
\index{ἀδελφός, ὁ: brother}
\index{ἀδικίη, ἡ: wrongdoing, injustice}
\index{ἀκρόησις, –ιος, ἡ: hearing, listening}
\index{ἄνευ: without (\char43\ gen.)}
\index{ἄρρην, –εν: male}
\index{γένος, –εος, τό: race, family}
\index{δήλησις, –ιος, ἡ: ruin, bane}
\index{διαίτημα, –ατος, τό: regimen, diet}
\index{ἐπικρίνω: decide, consider}
\index{ἰητρικός, –ή, –όν: of a physician, medical}
\index{κάμνω: be sick, suffer from illness}
\index{λοιπός, –ή, –όν: remaining, rest}
\index{μάθησις, –ιος, ἡ: learning}
\index{μαθητής, –οῦ, ὁ: learner, pupil}
\index{μανθάνω: learn}
\index{μισθός, ὁ: wages, pay, hire}
\index{νόμος, ὁ: custom, law}
\index{ὁρκίζω: bind by oath}
\index{υἱός, ὁ: son}
\index{χρέομαι: use}
\index{ὠφέλειη, ἡ: help, aid, benefit}
\placeindex
\stoptext

Although colums are balanced, I get unbalanced columns.

Is there a command that prevents the wrong balanced columns?

Many thanks for your 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
___

Re: [NTG-context] 6-sided letter fold (TRYPTICHON) with unequal page size

2018-06-27 Thread Wolfgang Schuster



Pablo Rodriguez <mailto:oi...@gmx.es>
27. Juni 2018 um 20:40
On 06/27/2018 07:54 PM, Wolfgang Schuster wrote:

This isn’t possible because the imposition mechanism puts the finished pages
in boxes with the same size.


Wolfgang,

isn’t it a case for \definepageshift and \setuppageshift?


For most documents this should work.


\definepapersize[flyer][width=100mm,height=210mm]

\setuppapersize[flyer][A4,landscape]

\setuparranging [TRYPTICHON]

\definepageshift[flyer][horizontal][-3pt,0pt,0pt,0pt,-3pt,-3pt]
%\definepageshift[flyer][horizontal][-3pt,0pt,0pt,-1.5pt,-1.5pt,-3pt]

\setuppageshift[paper][flyer]

\showframe[page]

\starttext
\dorecurse{6}{\page[dummy]}
\stoptext

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

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

[NTG-context] 6-sided letter fold (TRYPTICHON) with unequal page size

2018-06-19 Thread Marco Patzer
Hi,

I try getting a 6-sided letterfold with unequal page size to work.
This is how it's supposed to look like:

  
https://www.saxoprint.co.uk/blog/wp-content/uploads/2013/06/roll-fold-leaflets-02-01.png

This is easy with the arranging option TRYPTICHON. *But* the page
sizes are not equal and manually adjusting them shifts them not the
way they're supposed to. Page 4 and 5 need to be a bit less wide to
be able to fold neatly.

  Page width 1,2,3,6: 10cm
  Page width 4,5:  9.7cm

How to adapt for the changed page size without an overlapping page 4
and a page with clearance to the adjacent 6th page? Suggestions
welcome!

Here the example you've all been waiting for:

%% 6-sided letter fold
%% 
https://www.saxoprint.co.uk/blog/wp-content/uploads/2013/06/roll-fold-leaflets-02-01.png

\definepapersize
  [flyer]
  [width=10cm, height=21cm]

\definepapersize
  [flyer-small]
  [width=9.7cm, height=21cm]

\setuppapersize
  [flyer]
  [A4, landscape]

\setuplayout [page]
\setuparranging [TRYPTICHON]

\starttext
\showframe

10cm:\blank \rightaligned{\blackrule[width=10cm]}\vfill{\tfd\currentpage}

\page
10cm:\blank[5mm] \blackrule[width=10cm]\vfill{\tfd\currentpage}

\page
10cm:\blank[8mm] \blackrule[width=10cm]\vfill{\tfd\currentpage}

\page
%% shifts page to the left, why?
\setuppapersize [flyer-small] [A4, landscape]
9.7cm:\blank[11mm] 
\rightaligned{\blackrule[width=9.7cm]}\vfill{\tfd\currentpage}

\page
\setuppapersize [flyer-small] [A4, landscape]
9.7cm:\blank[14mm] \blackrule[width=9.7cm]\vfill{\tfd\currentpage}

\page
\setuppapersize [flyer] [A4, landscape]
10cm:\blank[10mm] \blackrule[width=10cm]\vfill{\tfd\currentpage}

\stoptext

Marco
___
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] fixed spacing

2017-07-17 Thread Floris van Manen
No, i don’t want them in a table in columns.
Rather i want the stretching space after the comma only.

.F


> On 17 Jul 2017, at 22:05, Rik Kabel <cont...@rik.users.panix.com> wrote:
> 
> On 2017-07-17 15:23, Floris van Manen wrote:
>> dear List,
>> 
>> I try to put a set of numbers into a block text.
>> I want to keep the spacing within the items fixed
>> x-y:~z,
>> How do i do that?
>> The attached code does not seem to treat the fixed space as fixed.
>> 
>> Thanks
>> .Floris
>> 
>> 
>> \definepapersize[iiwii][width=125mm, height=125mm]
>> \setuppapersize[iiwii]
>> \setupbodyfont[7pt]
>> \setuplayout[backspace=3mm,
>> topspace=3mm,
>> width=70mm,
>> header=0mm,
>> footer=0mm,
>> height=119mm]
>> \starttext
>> 
>> \starttext
>> {\tfxx\framed[width=42mm,align={width,nothyphenated,verytolerant},frame=off]
>> {0-1:~28, 1-2:~1686, 0-2:~1710, 8-9:~3484, 7-8:~15862, 7-9:~17152, 
>> 1-3:~90632, 0-3:~90645, 2-3:~90840, 7-6:~98762, 6-8:~100082, 6-9:~103544, 
>> 4-0:~106926, 4-1:~106949, 4-2:~107546, 4-3:~192211, 3-6:~990165, 
>> 2-6:~1040810, 3-7:~1041891, 1-6:~1042032, 0-6:~1042060, 3-8:~1055123, 
>> 3-9:~1057765, 2-7:~1086097, 1-7:~1087411, 0-7:~1087439, 2-8:~1099942, 
>> 1-8:~1101249, 0-8:~1101277, 2-9:~1102409, 1-9:~1103718, 0-9:~1103746, 
>> 4-6:~1138989, 4-7:~1180436, 4-8:~1194617, 4-9:~1196971, 5-3:~1729640, 
>> 4-5:~1756438, 5-0:~1761922, 5-1:~1761941, 5-2:~1763565, 5-6:~2459757, 
>> 5-7:~2548510, 5-8:~2555440, 5-9:~2558871
>> }}
>> 
>> {\tfxx\framed[width=42mm,align={width,nothyphenated},frame=off]
>> {0-1:~28, 1-2:~1686, 0-2:~1710, 8-9:~3484, 7-8:~15862, 7-9:~17152, 
>> 1-3:~90632, 0-3:~90645, 2-3:~90840, 7-6:~98762, 6-8:~100082, 6-9:~103544, 
>> 4-0:~106926, 4-1:~106949, 4-2:~107546, 4-3:~192211, 3-6:~990165, 
>> 2-6:~1040810, 3-7:~1041891, 1-6:~1042032, 0-6:~1042060, 3-8:~1055123, 
>> 3-9:~1057765, 2-7:~1086097, 1-7:~1087411, 0-7:~1087439, 2-8:~1099942, 
>> 1-8:~1101249, 0-8:~1101277, 2-9:~1102409, 1-9:~1103718, 0-9:~1103746, 
>> 4-6:~1138989, 4-7:~1180436, 4-8:~1194617, 4-9:~1196971, 5-3:~1729640, 
>> 4-5:~1756438, 5-0:~1761922, 5-1:~1761941, 5-2:~1763565, 5-6:~2459757, 
>> 5-7:~2548510, 5-8:~2555440, 5-9:~2558871
>> }}
>> 
>> \stoptext
>> 
> 
>   • Use tabular numbers and hard-code all of the spaces you need:
> \definefontfeature[default][default][tnum=yes]
> or
> \definefontfeature[ff:tnum][tnum=yes] ... \addff{ff:tnum} or 
> \feature[+][ff:tnum] where appropriate.
> 
>   • Put the numbers in a table and right-align the number columns (see 
> http://wiki.contextgarden.net/TABLE#Using_character_alignment if you need 
> decimal alignment).
> --
> Rik
>   • Both
> 
> =
> ___
> 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
> ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] fixed spacing

2017-07-17 Thread Rik Kabel

On 2017-07-17 15:23, Floris van Manen wrote:

dear List,

I try to put a set of numbers into a block text.
I want to keep the spacing within the items fixed
x-y:~z,
How do i do that?
The attached code does not seem to treat the fixed space as fixed.

Thanks
.Floris


\definepapersize[iiwii][width=125mm, height=125mm]
\setuppapersize[iiwii]
\setupbodyfont[7pt]
\setuplayout[backspace=3mm,
 topspace=3mm,
 width=70mm,
 header=0mm,
 footer=0mm,
 height=119mm]
\starttext

\starttext
{\tfxx\framed[width=42mm,align={width,nothyphenated,verytolerant},frame=off]
{0-1:~28, 1-2:~1686, 0-2:~1710, 8-9:~3484, 7-8:~15862, 7-9:~17152, 1-3:~90632, 
0-3:~90645, 2-3:~90840, 7-6:~98762, 6-8:~100082, 6-9:~103544, 4-0:~106926, 
4-1:~106949, 4-2:~107546, 4-3:~192211, 3-6:~990165, 2-6:~1040810, 3-7:~1041891, 
1-6:~1042032, 0-6:~1042060, 3-8:~1055123, 3-9:~1057765, 2-7:~1086097, 
1-7:~1087411, 0-7:~1087439, 2-8:~1099942, 1-8:~1101249, 0-8:~1101277, 
2-9:~1102409, 1-9:~1103718, 0-9:~1103746, 4-6:~1138989, 4-7:~1180436, 
4-8:~1194617, 4-9:~1196971, 5-3:~1729640, 4-5:~1756438, 5-0:~1761922, 
5-1:~1761941, 5-2:~1763565, 5-6:~2459757, 5-7:~2548510, 5-8:~2555440, 
5-9:~2558871
}}

{\tfxx\framed[width=42mm,align={width,nothyphenated},frame=off]
{0-1:~28, 1-2:~1686, 0-2:~1710, 8-9:~3484, 7-8:~15862, 7-9:~17152, 1-3:~90632, 
0-3:~90645, 2-3:~90840, 7-6:~98762, 6-8:~100082, 6-9:~103544, 4-0:~106926, 
4-1:~106949, 4-2:~107546, 4-3:~192211, 3-6:~990165, 2-6:~1040810, 3-7:~1041891, 
1-6:~1042032, 0-6:~1042060, 3-8:~1055123, 3-9:~1057765, 2-7:~1086097, 
1-7:~1087411, 0-7:~1087439, 2-8:~1099942, 1-8:~1101249, 0-8:~1101277, 
2-9:~1102409, 1-9:~1103718, 0-9:~1103746, 4-6:~1138989, 4-7:~1180436, 
4-8:~1194617, 4-9:~1196971, 5-3:~1729640, 4-5:~1756438, 5-0:~1761922, 
5-1:~1761941, 5-2:~1763565, 5-6:~2459757, 5-7:~2548510, 5-8:~2555440, 
5-9:~2558871
}}

\stoptext


1. Use tabular numbers and hard-code all of the spaces you need:
   \definefontfeature[default][default][tnum=yes]
   or
   \definefontfeature[ff:tnum][tnum=yes] ... \addff{ff:tnum} or
   \feature[+][ff:tnum] where appropriate.

2. Put the numbers in a table and right-align the number columns (see
   http://wiki.contextgarden.net/TABLE#Using_character_alignment if you
   need decimal alignment).

--
Rik

1. Both


=

___
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] fixed spacing

2017-07-17 Thread Floris van Manen
dear List,

I try to put a set of numbers into a block text.
I want to keep the spacing within the items fixed
x-y:~z,
How do i do that?
The attached code does not seem to treat the fixed space as fixed.

Thanks
.Floris


\definepapersize[iiwii][width=125mm, height=125mm]
\setuppapersize[iiwii]
\setupbodyfont[7pt]
\setuplayout[backspace=3mm,
topspace=3mm,
width=70mm,
header=0mm,
footer=0mm,
height=119mm]
\starttext

\starttext
{\tfxx\framed[width=42mm,align={width,nothyphenated,verytolerant},frame=off]
{0-1:~28, 1-2:~1686, 0-2:~1710, 8-9:~3484, 7-8:~15862, 7-9:~17152, 1-3:~90632, 
0-3:~90645, 2-3:~90840, 7-6:~98762, 6-8:~100082, 6-9:~103544, 4-0:~106926, 
4-1:~106949, 4-2:~107546, 4-3:~192211, 3-6:~990165, 2-6:~1040810, 3-7:~1041891, 
1-6:~1042032, 0-6:~1042060, 3-8:~1055123, 3-9:~1057765, 2-7:~1086097, 
1-7:~1087411, 0-7:~1087439, 2-8:~1099942, 1-8:~1101249, 0-8:~1101277, 
2-9:~1102409, 1-9:~1103718, 0-9:~1103746, 4-6:~1138989, 4-7:~1180436, 
4-8:~1194617, 4-9:~1196971, 5-3:~1729640, 4-5:~1756438, 5-0:~1761922, 
5-1:~1761941, 5-2:~1763565, 5-6:~2459757, 5-7:~2548510, 5-8:~2555440, 
5-9:~2558871
}}

{\tfxx\framed[width=42mm,align={width,nothyphenated},frame=off]
{0-1:~28, 1-2:~1686, 0-2:~1710, 8-9:~3484, 7-8:~15862, 7-9:~17152, 1-3:~90632, 
0-3:~90645, 2-3:~90840, 7-6:~98762, 6-8:~100082, 6-9:~103544, 4-0:~106926, 
4-1:~106949, 4-2:~107546, 4-3:~192211, 3-6:~990165, 2-6:~1040810, 3-7:~1041891, 
1-6:~1042032, 0-6:~1042060, 3-8:~1055123, 3-9:~1057765, 2-7:~1086097, 
1-7:~1087411, 0-7:~1087439, 2-8:~1099942, 1-8:~1101249, 0-8:~1101277, 
2-9:~1102409, 1-9:~1103718, 0-9:~1103746, 4-6:~1138989, 4-7:~1180436, 
4-8:~1194617, 4-9:~1196971, 5-3:~1729640, 4-5:~1756438, 5-0:~1761922, 
5-1:~1761941, 5-2:~1763565, 5-6:~2459757, 5-7:~2548510, 5-8:~2555440, 
5-9:~2558871
}}

\stoptext



numbertest.pdf
Description: Adobe PDF document


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] setupitemgroup and 'command='

2017-05-24 Thread Thomas Floeren
Hans, thanks for your swift reply…



> On 24. May 2017, at 19:31, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 5/24/2017 6:28 PM, Thomas Floeren wrote:
>> Hi,
>> I used to use the “command=” parameter when setting up itemize. Now I 
>> noticed that it introduces a spurious horizontal whitespace after the item 
>> symbol when the item is of type “\sym{}”.
>> I also noticed that the problem goes away if I use “inner=” instead of 
>> “command=”.
> 
> command is applied to the text, try command=\WORD and after \sym is a space 
> so it depends on what command does with it


I see, \WORD does not introduce the whitespace. But I don’t understand why 
\setupwhitespace[none] should do anything with the space after \sym, what \WORD 
doesn’t do.


> 
>> Example:
>> \setuppapersize [A6]
>> \starttext
>> \start
>> \setupitemize [each][command={\setupwhitespace[none]}]
>> With \type{\command=}
>> \startitemize
>> \item \dorecurse{20}{bla }
>> \sym{Y} \dorecurse{20}{bla }
>> \stopitemize
>> \stop
>> \setupitemize [each][inner={\setupwhitespace[none]}]
>> With \type{\inner=}
>> \startitemize
>> \item \dorecurse{20}{bla }
>> \sym{Y} \dorecurse{20}{bla }
>> \stopitemize
>> \stoptext
>> This is with ConTeXt 2017.05.15 21:48. With an older ConTeXt, for example 
>> 2015.01.13 15:54, “inner=” and “command=” deliver identical, correct results.
>> So, I’m asking, has “command=” been deprecated or is it just a bug?
>> Or was I using it the wrong way, and “inner=” is the only correct parameter 
>> in the example above?
> \setupitemize [each][nowhite]


Tried that, but it does not the same as \setupwhitespace[none]. (It completely 
annihilates any whitespace.)

Compile this to see what I mean:



\definepapersize[Tmp][width=120mm,height=400mm]
\setuppapersize [Tmp]
\setupwhitespace[2\lineheight]

\startbuffer
bla, bla\crlf bla, bla 
\stopbuffer

\starttext

Normal text:

\getbuffer\par
\getbuffer

Itemize, unmodified:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize

\start
\setupitemize [each][command={\setupwhitespace[none]}]
Itemize with \type{command={\setupwhitespace[none]}}:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize
\stop

\start
\setupitemize [each][inner={\setupwhitespace[none]}]
Itemize with \type{inner={\setupwhitespace[none]}}:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize
\stop

\start
\setupitemize [each][nowhite]
Itemize with \type{nowhite}:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize
\stop

\stoptext


So it seems the only ways to get the desired result are either 
inner={\setupwhitespace[none]} or command={\setupwhitespace[none]}, where the 
first one seems to work correctly and the latter one introduces the whitespace 
with recent Betas. (well, recent = younger than 2 years or so)

Should I change all my existing documents to “inner”?


Thanks,
best,

– Tom

-- 
For macOS:  
http://dflect.net/context-typeset-tool/
___
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] pdfboxes

2017-02-13 Thread Peter Rolf
Am 11.02.2017 um 01:25 schrieb Hans Hagen:
> On 2/10/2017 2:56 PM, Peter Rolf wrote:
>> Hi,
>>
>> I tried to set some PDF boxes properly, but no luck (setupcanvas).
>> After searching the mailing archive from 2015 I found this (broken)
>> example. Is this still the official method to set the crop|trim|bleed
>> boxes?
> 
> controlled by:
> 
> \setupinteractionscreen
>[width=max,height=max]
>

Thanks for the pointer. Kind of works now, but the height calculation
seems to be broken. The crop-|trimbox height is smaller than the defined
paper height. If I disable the mechanism (comment
\setupinteractionscreen) I get the correct sizes (paper on printpaper).

As always the real world example is too big and complex, I attached a
smaller one (but with the same sizes).


ps:

For all interested, here is the link to that table (best viewed on a UHD
monitor).
https://spideroak.com/browse/share/indiego/public/Titanfall2/

There's still a bug in the (combined) table header on page one, which
inserts an unwanted extra column. Checked the numbers several times, no
error found on my side. Currently I use the extra column as right frame,
wanted to add one anyway. First attempts to make a minimal example
failed, seems to be more complex (need to also add fonts, table
content?). Will report back when done.


> to be wikified
>

aye

>> -
>> \showframe
>>
>> \setuplayout
>>[location=middle,
>> width=middle,
>> height=middle,
>> cropoffset=auto,
>> trimoffset=1bp,
>> bleedoffset=2bp,
>> artoffset=2bp]
>>
>>  \setupbackend
>>[level=0]
>>
>> \starttext
>>
>> \definepapersize[TestA][width=100bp,height=200bp]
>> \definepapersize[TestB][width=150bp,height=250bp]
>>
>> \setuppapersize[TestA][TestB]
>>
>> test
>>
>> \stoptext
>> -
>>
>> ConTeXt version 2017.01.27 gives
>>
>> [..]
>> 10 0 obj
>> <> 250]/CropBox [ 0 0 150 250 ] /TrimBox [ 0 0 150 250 ]/Parent 13 0 R>>
>> endobj
>> [..]
>>
>>
>>
>> One additional note. The Mediabox precision seems to be 5 now (and not
>> 4). Taken from my latest table using TeXpage (/MediaBox[0 0 1655.39105
>> 969.22291]). The precision value for the other boxes should be adjusted
>> to avoid rounding problems (?Box < MediaBox).
>>
>> [lpdf-mis.lua]
>> [..]
>> -- temp hack: the mediabox is not under our control and has a precision
>> of 4 digits
>>
>> local factor  = number.dimenfactors.bp
>> local f_value = formatters["%0.4F"]
>> [..]
>>
>>
>> Not in a hurry, fix (or advice) is welcome at any time :D
>>
>>
>> Best wishes,  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
>> ___
>>
>>
> 
> 


% dimens are taken from the final tables (TEXpage)
\newdimen\tableAwidth
\newdimen\tableAheight
\tableAwidth= 1655.39105bp
\tableAheight= 969.22291bp
\definepapersize[tableA][width=\tableAwidth, height=\tableAheight]

\newdimen\tableBwidth
\newdimen\tableBheight
\tableBwidth= 698.65893bp
\tableBheight= 489.67048bp
\definepapersize[tableB][width=\tableBwidth, height=\tableBheight]
 

\definelayout[tableA]
  [location=middle,
   width=middle,
   height=middle,
   paper=tableA,
%   clipoffset=0mm,
%   horoffset=0mm,
%   veroffset=0mm,
   cropoffset=auto,
   trimoffset=2bp,
   bleedoffset=3mm,
   marking=on,
   backspace=0mm,
%   bottom=0mm,
%   bottomdistance=0mm,
   bottomspace=0mm,
   cutspace=0mm,
   footer=0mm,
   footerdistance=0mm,
   header=0mm,
   headerdistance=0mm,
   leftedge=0mm,
   leftedgedistance=0mm,
   leftmargin=0mm,
   leftmargindistance=0mm,
   margin=0mm,
   rightedge=0mm,
   rightedgedistance=0mm,
   rightmargin=0mm,
   rightmargindistance=0mm,
   textdistance=0mm,
   textmargin=0mm,
%   top=0mm,
%   topdistance=0mm,
   topspace=0mm,
  ]

\definelayout[tableB]
  [location=middle,
   width=middle,
   height=middle,
   paper=tableB,
   clipoffset=0bp,
   cropoffset=auto,
   trimoffset=2bp,
   bleedoffset=3mm,
   marking=on,
   backspace=0mm,
%   bottom=0mm,
%   bottomdistance=0mm,
   bottomspace=0mm,
   cutspace=0mm,
   footer=0mm,
   footerdistance=0mm,
   

Re: [NTG-context] pdfboxes

2017-02-10 Thread Hans Hagen

On 2/10/2017 2:56 PM, Peter Rolf wrote:

Hi,

I tried to set some PDF boxes properly, but no luck (setupcanvas).
After searching the mailing archive from 2015 I found this (broken)
example. Is this still the official method to set the crop|trim|bleed boxes?


controlled by:

\setupinteractionscreen
   [width=max,height=max]

to be wikified


-
\showframe

\setuplayout
   [location=middle,
width=middle,
height=middle,
cropoffset=auto,
trimoffset=1bp,
bleedoffset=2bp,
artoffset=2bp]

 \setupbackend
   [level=0]

\starttext

\definepapersize[TestA][width=100bp,height=200bp]
\definepapersize[TestB][width=150bp,height=250bp]

\setuppapersize[TestA][TestB]

test

\stoptext
-

ConTeXt version 2017.01.27 gives

[..]
10 0 obj
<>
endobj
[..]



One additional note. The Mediabox precision seems to be 5 now (and not
4). Taken from my latest table using TeXpage (/MediaBox[0 0 1655.39105
969.22291]). The precision value for the other boxes should be adjusted
to avoid rounding problems (?Box < MediaBox).

[lpdf-mis.lua]
[..]
-- temp hack: the mediabox is not under our control and has a precision
of 4 digits

local factor  = number.dimenfactors.bp
local f_value = formatters["%0.4F"]
[..]


Not in a hurry, fix (or advice) is welcome at any time :D


Best wishes,  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
___




--

-
  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] pdfboxes

2017-02-10 Thread Peter Rolf
Hi,

I tried to set some PDF boxes properly, but no luck (setupcanvas).
After searching the mailing archive from 2015 I found this (broken)
example. Is this still the official method to set the crop|trim|bleed boxes?

-
\showframe

\setuplayout
   [location=middle,
width=middle,
height=middle,
cropoffset=auto,
trimoffset=1bp,
bleedoffset=2bp,
artoffset=2bp]

 \setupbackend
   [level=0]

\starttext

\definepapersize[TestA][width=100bp,height=200bp]
\definepapersize[TestB][width=150bp,height=250bp]

\setuppapersize[TestA][TestB]

test

\stoptext
-

ConTeXt version 2017.01.27 gives

[..]
10 0 obj
<>
endobj
[..]



One additional note. The Mediabox precision seems to be 5 now (and not
4). Taken from my latest table using TeXpage (/MediaBox[0 0 1655.39105
969.22291]). The precision value for the other boxes should be adjusted
to avoid rounding problems (?Box < MediaBox).

[lpdf-mis.lua]
[..]
-- temp hack: the mediabox is not under our control and has a precision
of 4 digits

local factor  = number.dimenfactors.bp
local f_value = formatters["%0.4F"]
[..]


Not in a hurry, fix (or advice) is welcome at any time :D


Best wishes,  Peter

\showframe

\setuplayout
   [location=middle,
width=middle,
height=middle,
cropoffset=auto,
trimoffset=1bp,
bleedoffset=2bp,
artoffset=2bp]

 \setupbackend
   [level=0]
   
\starttext

\definepapersize[TestA][width=100bp,height=200bp]
\definepapersize[TestB][width=150bp,height=250bp]

\setuppapersize[TestA][TestB]

test

\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] twoside layout

2016-12-13 Thread Hans Hagen

On 12/13/2016 10:54 PM, Herbert Voss wrote:

Is it possible to set only the textwidth and the inner margin
for a twosided layout?

As far as I can see, backspace sets only the _left_ margin
of odd _and_ even pages.


\definepapersize[new][height=240mm,width=165mm]
\setuppapersize[new]

\definelayout[odd][
  topspace=14pt, header=14pt, headerdistance=22pt, height=20.2cm,
  backspace=1.9cm, width=12.4cm]
\definelayout[even][
  topspace=14pt, header=14pt, headerdistance=22pt, height=20.2cm,
  backspace=2.2cm, width=12.4cm]
\setuplayout

\starttext
\showframe
\dorecurse{10} {\input knuth \endgraf \input tufte \endgraf}
\showlayout[1,pt,cm]
\dorecurse{10} {\input knuth \endgraf \input tufte \endgraf}
\stoptext


\setuppagenumbering[alternative=singlesided]
\setuppagenumbering[alternative=doublesided]
\setuppagenumbering[alternative={singlesided,doublesided}]

the last one will not swap dimensions

-
  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] twoside layout

2016-12-13 Thread Herbert Voss

Is it possible to set only the textwidth and the inner margin
for a twosided layout?

As far as I can see, backspace sets only the _left_ margin
of odd _and_ even pages.


\definepapersize[new][height=240mm,width=165mm]
\setuppapersize[new]

\definelayout[odd][
  topspace=14pt, header=14pt, headerdistance=22pt, height=20.2cm,
  backspace=1.9cm, width=12.4cm]
\definelayout[even][
  topspace=14pt, header=14pt, headerdistance=22pt, height=20.2cm,
  backspace=2.2cm, width=12.4cm]
\setuplayout

\starttext
\showframe
\dorecurse{10} {\input knuth \endgraf \input tufte \endgraf}
\showlayout[1,pt,cm]
\dorecurse{10} {\input knuth \endgraf \input tufte \endgraf}
\stoptext


Herbert
___
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] dx in setuplayout problem

2016-09-29 Thread Jean Magnan de Bornier
Hi all,
Trying to print visit cards as in
http://wiki.contextgarden.net/BusinessCard I encounter a problem as the
location=middle seems not to work as expected.
Here is my minimal example:



\definepapersize[BC][width=85mm,height=54mm]


\definelayer[blocks][width=85mm,height=54mm]

\setuppapersize[BC][A4]
  \setuplayout[nx=2,ny=5,dx=10mm]
  \setuplayout[location=middle,width=fit,height=fit]

  \setuppagenumbering[state=stop]


\showframe[edge]
\starttext
moi et moi
\stoptext
.

There is no symmetry in the output as can be seen in the attached file.
This symmetry problem disappears if I drop the «dx=10mm» so maybe the
trouble lies in this instruction.

Sorry if this question already arised.



carvis2.pdf
Description: Adobe PDF document

-- 
Jean
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Wolfgang Schuster

Procházka Lukáš Ing. <mailto:l...@pontex.cz>
18. Juli 2016 um 16:59
Hello,

one more problem - paper height still 297 mm?


\definepapersize[A4L][A4,landscape]

\showframe

\starttext
  \setuppapersize[A4L]
  A4L
\stoptext

Look at Hans answer, you need at the moment a third argument for the 
\definepapersize but he's going to allow two as well.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Procházka Lukáš Ing .

Hello,

one more problem - paper height still 297 mm?


\definepapersize[A4L][A4,landscape]

\showframe

\starttext
  \setuppapersize[A4L]
  A4L
\stoptext


(Ctx already patched by WS' solution.)

Best regards,

Lukas


On Mon, 18 Jul 2016 16:41:06 +0200, Procházka Lukáš Ing. <l...@pontex.cz> wrote:


Hello,

thank you for the patch.

A solution which would not require named page sizes might be better as we don't necessary need to know the 
name of the "previous" (or "pushed") paper size (mostly we use "anonymous" page 
sizes, set up once in the document preamble).

Thus push/pop way would be a bit more flexible (like \pushpagebackground / 
\poppagebackground);
or making paper size local (enclosing paper setup into group - \start 
\setupppapersize ... \stop\page) would restore the previous paper size.

Thank you anyway.

Best regards

Lukas


On Mon, 18 Jul 2016 16:00:05 +0200, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


Procházka Lukáš Ing. <mailto:l...@pontex.cz>
18. Juli 2016 um 15:09
Hello,

why this code doesn't restore A4-portrait for page 3?


\showframe

\starttext
  Page 1
  \page
  \adaptpapersize[A4,landscape]
  Page 2
  \page
  Page 3
\stoptext


page-lay.mkiv

\unexpanded\def\adaptpapersize
- {\global\let\page_paper_reinstate\page_paper_reinstate_indeed
+ {\global\let\page_paper_reinstate\page_paper_restore
\setuppapersize}

-\unexpanded\def\page_paper_reinstate_indeed
-  {\page_paper_reinstate
-   \global\let\page_paper_reinstate\relax}

\appendtoks
 \page_paper_reinstate
+   \global\let\page_paper_reinstate\relax
\to \everyaftershipout


(I need to mix A4 portrait/landscape pages in a document...)

When I need to switch to landscape for more pages (e.g. for long large
tables; \adaptpapersize is not enough as it changes just one current
page), is there something like:

\pushpapersize
  \page
  \setuppapersize[A4,landscape]
  ...
  more pages
  ...
\poppapersize

There is no start/stop version like we have for layouts
(\startlayout[...] ... \stoplayout) but you can use named sizes.

\definepapersize [main]  [A4]   [A4]
\definepapersize [extra] [A4,landscape] [A4,landscape]

\starttext
 Page 1. \page
 Page 2. \page
 \setuppapersize[extra]
 Page 3. \page
 Page 4. \page
 \setuppapersize[main]
 Page 5. \page
 Page 6. \page
\stoptext

Wolfgang







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

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

PapSize2.mkiv
Description: Binary data


PapSize2.pdf
Description: Adobe PDF document


page-lay.mkiv
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Procházka Lukáš Ing .

Hello,

thank you for the patch.

A solution which would not require named page sizes might be better as we don't necessary need to know the 
name of the "previous" (or "pushed") paper size (mostly we use "anonymous" page 
sizes, set up once in the document preamble).

Thus push/pop way would be a bit more flexible (like \pushpagebackground / 
\poppagebackground);
or making paper size local (enclosing paper setup into group - \start 
\setupppapersize ... \stop\page) would restore the previous paper size.

Thank you anyway.

Best regards

Lukas


On Mon, 18 Jul 2016 16:00:05 +0200, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


Procházka Lukáš Ing. <mailto:l...@pontex.cz>
18. Juli 2016 um 15:09
Hello,

why this code doesn't restore A4-portrait for page 3?


\showframe

\starttext
  Page 1
  \page
  \adaptpapersize[A4,landscape]
  Page 2
  \page
  Page 3
\stoptext


page-lay.mkiv

\unexpanded\def\adaptpapersize
- {\global\let\page_paper_reinstate\page_paper_reinstate_indeed
+ {\global\let\page_paper_reinstate\page_paper_restore
\setuppapersize}

-\unexpanded\def\page_paper_reinstate_indeed
-  {\page_paper_reinstate
-   \global\let\page_paper_reinstate\relax}

\appendtoks
 \page_paper_reinstate
+   \global\let\page_paper_reinstate\relax
\to \everyaftershipout


(I need to mix A4 portrait/landscape pages in a document...)

When I need to switch to landscape for more pages (e.g. for long large
tables; \adaptpapersize is not enough as it changes just one current
page), is there something like:

\pushpapersize
  \page
  \setuppapersize[A4,landscape]
  ...
  more pages
  ...
\poppapersize

There is no start/stop version like we have for layouts
(\startlayout[...] ... \stoplayout) but you can use named sizes.

\definepapersize [main]  [A4]   [A4]
\definepapersize [extra] [A4,landscape] [A4,landscape]

\starttext
 Page 1. \page
 Page 2. \page
 \setuppapersize[extra]
 Page 3. \page
 Page 4. \page
 \setuppapersize[main]
 Page 5. \page
 Page 6. \page
\stoptext

Wolfgang




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

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Pablo Rodriguez
On 07/18/2016 03:27 PM, Henri Menke wrote:
> This is a bug.  The following example from the wiki
> (http://wiki.contextgarden.net/PaperSetup) does not work either.  At
> least not with ConTeXt MkIV in TL2016.

Hi Lukáš and Henri,

this seems to work with latest beta:

\showframe

\definepapersize[main] [A4][A4]
\definepapersize[extra][A4,landscape][A4,landscape]

\setuppapersize[main]

\starttext
Page 1. Portrait \page
Page 2. Portrait \page
\setuppapersize[extra]
Page 3. Landscape \page
\setuppapersize[main]
Page 4. Portrait \page
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Hans Hagen

On 7/18/2016 3:27 PM, Henri Menke wrote:

This is a bug.  The following example from the wiki
(http://wiki.contextgarden.net/PaperSetup) does not work either.  At
least not with ConTeXt MkIV in TL2016.

\showframe

\definepapersize[main] [A4]
\definepapersize[extra][A4,landscape]

\setuppapersize[main]

\starttext
Page 1. Portrait \page
Page 2. Portrait \page
\adaptpapersize[extra]
Page 3. Landscape \page
Page 4. Portrait \page
\stoptext

On 07/18/2016 03:09 PM, Procházka Lukáš Ing. wrote:

\showframe

\starttext
  Page 1
  \page
  \adaptpapersize[A4,landscape]
  Page 2
  \page
  Page 3
\stoptext


It's not so much a bug but more something undefined as

\definepapersize[main] [A4]  [A4]
\definepapersize[extra][A4,landscape][A4,landscape]

works ok. I'll add a default third argument but the above works well too.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Wolfgang Schuster

Procházka Lukáš Ing. <mailto:l...@pontex.cz>
18. Juli 2016 um 15:09
Hello,

why this code doesn't restore A4-portrait for page 3?


\showframe

\starttext
  Page 1
  \page
  \adaptpapersize[A4,landscape]
  Page 2
  \page
  Page 3
\stoptext


page-lay.mkiv

\unexpanded\def\adaptpapersize
- {\global\let\page_paper_reinstate\page_paper_reinstate_indeed
+ {\global\let\page_paper_reinstate\page_paper_restore
   \setuppapersize}

-\unexpanded\def\page_paper_reinstate_indeed
-  {\page_paper_reinstate
-   \global\let\page_paper_reinstate\relax}

\appendtoks
\page_paper_reinstate
+   \global\let\page_paper_reinstate\relax
\to \everyaftershipout


(I need to mix A4 portrait/landscape pages in a document...)

When I need to switch to landscape for more pages (e.g. for long large 
tables; \adaptpapersize is not enough as it changes just one current 
page), is there something like:


\pushpapersize
  \page
  \setuppapersize[A4,landscape]
  ...
  more pages
  ...
\poppapersize
There is no start/stop version like we have for layouts 
(\startlayout[...] ... \stoplayout) but you can use named sizes.


\definepapersize [main]  [A4]   [A4]
\definepapersize [extra] [A4,landscape] [A4,landscape]

\starttext
Page 1. \page
Page 2. \page
\setuppapersize[extra]
Page 3. \page
Page 4. \page
\setuppapersize[main]
Page 5. \page
Page 6. \page
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Restoring/switching paper size?

2016-07-18 Thread Henri Menke
This is a bug.  The following example from the wiki
(http://wiki.contextgarden.net/PaperSetup) does not work either.  At
least not with ConTeXt MkIV in TL2016.

\showframe

\definepapersize[main] [A4]
\definepapersize[extra][A4,landscape]

\setuppapersize[main]

\starttext
Page 1. Portrait \page
Page 2. Portrait \page
\adaptpapersize[extra]
Page 3. Landscape \page
Page 4. Portrait \page
\stoptext

On 07/18/2016 03:09 PM, Procházka Lukáš Ing. wrote:
> \showframe
> 
> \starttext
>   Page 1
>   \page
>   \adaptpapersize[A4,landscape]
>   Page 2
>   \page
>   Page 3
> \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] crop marks

2016-06-29 Thread Thomas Fehige

Thanks Wolfgang and Thomas, that was it.

Now, what if I want crop marks only outside the printed area? As it is 
now, they appear also where the cutting lines cross each other between 
the single "pages". That way they'll end up on either the one or the 
other of the adjacent pages, maybe half a line on both, depending on how 
more or less precise printer and cutting alignments work.


Thanks -- Thomas

Am 29.06.2016 um 12:37 schrieb Thomas A. Schmitz:



On 29 Jun 2016, at 12:14, Thomas Fehige <tho...@fehige.de> wrote:

\definepapersize[Labelpaper][width=95mm,height=90mm]
\setuppapersize[Labelpaper][A4,portrait]

\setuplayout[
backspace=3mm,
margin=0mm,
topspace=3mm,
header=0mm,
footer=0mm,
width=89mm,
height=84mm,
nx=2,
ny=3,
location=middle,
marking=on   % according to the wiki,
 % this should show the crop marks
]

\showframe% not for the final printing of course

\starttext
~ % Dummy text, I'll work with background layers.
\stoptext


Either put a comma after your last assignment marking=on, or move the closing 
bracket right after this assignment.

Thomas
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] crop marks

2016-06-29 Thread Thomas Fehige

Thanks Wolfgang and Thomas, that was it.

Now, what if I want crop marks only outside the printed area? As it is 
now, they appear also where the cutting lines cross each other between 
the single "pages". That way they'll end up on either the one or the 
other of the adjacent pages, maybe half a line on both, depending on how 
more or less precise printer and cutting alignments work.


Thanks -- Thomas

Am 29.06.2016 um 12:37 schrieb Thomas A. Schmitz:



On 29 Jun 2016, at 12:14, Thomas Fehige <tho...@fehige.de> wrote:

\definepapersize[Labelpaper][width=95mm,height=90mm]
\setuppapersize[Labelpaper][A4,portrait]

\setuplayout[
backspace=3mm,
margin=0mm,
topspace=3mm,
header=0mm,
footer=0mm,
width=89mm,
height=84mm,
nx=2,
ny=3,
location=middle,
marking=on   % according to the wiki,
 % this should show the crop marks
]

\showframe% not for the final printing of course

\starttext
~ % Dummy text, I'll work with background layers.
\stoptext


Either put a comma after your last assignment marking=on, or move the closing 
bracket right after this assignment.

Thomas
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] crop marks

2016-06-29 Thread Thomas A. Schmitz

> On 29 Jun 2016, at 12:14, Thomas Fehige <tho...@fehige.de> wrote:
> 
> \definepapersize[Labelpaper][width=95mm,height=90mm]
> \setuppapersize[Labelpaper][A4,portrait]
> 
> \setuplayout[
>   backspace=3mm,
>   margin=0mm,
>   topspace=3mm,
>   header=0mm,
>   footer=0mm,
>   width=89mm,
>   height=84mm,
>   nx=2,
>   ny=3,
>   location=middle,
>   marking=on   % according to the wiki,
> % this should show the crop marks
> ]
> 
> \showframe% not for the final printing of course
> 
> \starttext
> ~ % Dummy text, I'll work with background layers.
> \stoptext

Either put a comma after your last assignment marking=on, or move the closing 
bracket right after this assignment. 

Thomas
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] crop marks

2016-06-29 Thread Wolfgang Schuster

Thomas Fehige <mailto:tho...@fehige.de>
29. Juni 2016 um 12:14
I wonder how I can get crop marks to work. This is what I have, but 
they don't show:


%=== MWE =====

\definepapersize[Labelpaper][width=95mm,height=90mm]
\setuppapersize[Labelpaper][A4,portrait]

\setuplayout[
backspace=3mm,
margin=0mm,
topspace=3mm,
header=0mm,
footer=0mm,
width=89mm,
height=84mm,
nx=2,
ny=3,
location=middle,
marking=on   % according to the wiki,
You need a "," after "on", otherwise context uses the following spaces 
as part of the value and it sees "on ".


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] crop marks

2016-06-29 Thread Thomas Fehige
I wonder how I can get crop marks to work. This is what I have, but they 
don't show:


%=== MWE =

\definepapersize[Labelpaper][width=95mm,height=90mm]
\setuppapersize[Labelpaper][A4,portrait]

\setuplayout[
backspace=3mm,
margin=0mm,
topspace=3mm,
header=0mm,
footer=0mm,
width=89mm,
height=84mm,
nx=2,
ny=3,
location=middle,
marking=on   % according to the wiki,
 % this should show the crop marks
]

\showframe% not for the final printing of course

\starttext
~ % Dummy text, I'll work with background layers.
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Duplex printing problem!

2016-05-05 Thread Geert Verhaag

Hi,

I try something like this:

*\definepapersize[BOOK][width=270mm,height=195mm]**
**\setuppapersize[BOOK][A4,landscape]*

while my *\setuplayout* command contains:

*location={doublesided,left}*

among other settings.

I would expect that the BOOK-page on the front and back side would move 
to the correct corner, but that doesn't seem to happen.
Both on the front and back are shifted to the left!? I'would expect them 
to alter position between left and right!


What am I doing wrong?

Regards,
Gerard Verhaag

By the way running context --version yields the following info:

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file: 
/home/verhaag/context/tex/texmf-context/tex/context/base/context.mkiv

mtx-context | current version: 2013.08.11 20:23


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ntg-context Digest, Vol 142, Issue 52

2016-04-19 Thread Brian Ballsun-Stanton
I'm dealing with a 500 page book (if you give me your github username, I'll
happily add you to the repo) and many of these problems emerge only at
scale. (when I render individual chapters, there are no issues, but when
rendering the whole book, the tables just have all sorts of formatting
issues.)

Here's a working example

% engine=luajittex
\startenvironment env_trap
\enableregime[utf-8]
\setupcolors[state=start]
\setupreferencing[autofile=yes]
\setupinteraction[state=start, color=blue, contrastcolor=blue, style={\tf}]
\usemodule[simplefonts]

\usemodule[database]
% Enable hyperlinks

\setuppapersize [A4][A4]
\definepapersize[standing][A4][A4]
\definepapersize[lying][A4,landscape][A4]
\setuplayout[width=middle,  backspace=.75in, cutspace=.75in,
 height=middle, topspace=.5in, bottomspace=.5in]

\setupbodyfont[11pt]

\setupwhitespace[none]

\setupcaption[table][location=top]
\setupcaptions[style={\tfx}, width=.9\textwidth,align=middle]

   \unprotect
   \appendtoks
 \setupbackgrounds[\v!page][\c!background=\makeupparameter\c!background]
   \to \t_page_makeup_every_setup
   \protect


\defineseparatedlist[CSV]
  [separator={,},
   quotechar={"},
   left=\bTD,right=\eTD,
   first=\bTR,last=\eTR,
   before=\bTABLE,after=\eTABLE]


\setupTABLE[c][each][align=flushleft,style={\tfx},width=fit]
\setupTABLE[r][1][background=color,backgroundcolor=gray,style={\tf}]
\setupTABLE[align=middle]
\setuppagenumbering[alternative=doublesided]

\stopenvironment

\starttext

\placetable[here][tab01]{Kazanlak site numbers, aggregate area and average
area
through through time}{
\setupTABLE[c][each][align=middle,style={\tfx},alignmentcharacter={.},aligncharacter=yes]
\chardef\characteralignmentmode=2
\startCSV
Period,NL,Chl,EBA,LBA,EIA,LIA,RM,LA,BYZ,MA,OTT
Aggregate Area (ha),1.5,2.9,5.0,6.7,21.5,43.3,54.9,31.2,24.4,30.7,94.9
Site Count,3,6,10,7,23,38,23,19,15,21,15
Avg Area (ha),0.5,0.5,0.5,1.0,0.9,1.1,2.4,1.6,1.6,1.5,6.3
\stopCSV
}

\stoptext

And I wasn't able to cause it to fail via a trivial 'making it a component'
and calling it from a project.



> --
>
> Message: 5
> Date: Mon, 18 Apr 2016 22:11:28 +0200
> From: Hans Hagen <pra...@wxs.nl>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Table index is nil
> Message-ID: <57153f70.6050...@wxs.nl>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 4/18/2016 3:59 AM, Brian Ballsun-Stanton wrote:
> > I'm getting (suddenly) an error:
> > ...ext/tex/texmf-context/tex/context/base/mkiv/font-hsh.lua:124: table
> > index is nil
> >
> >
> > And I have a bunch of tables:
> >
> >
> > \placetable[here][tab01]{Kazanlak site numbers, aggregate area and
> > average area
> > through through time}{
> >
> \setupTABLE[c][each][align=middle,style={\tfx},alignmentcharacter={.},aligncharacter=yes]
> > \chardef\characteralignmentmode=2
> > \startCSV
> > Period,NL,Chl,EBA,LBA,EIA,LIA,RM,LA,BYZ,MA,OTT
> > Aggregate Area (ha),1.5,2.9,5.0,6.7,21.5,43.3,54.9,31.2,24.4,30.7,94.9
> > Site Count,3,6,10,7,23,38,23,19,15,21,15
> > Avg Area (ha),0.5,0.5,0.5,1.0,0.9,1.1,2.4,1.6,1.6,1.5,6.3
> > \stopCSV
> > }
> >
> > The odd thing is that no other chapters of the book (all of which use
> > the same environment, and many use the same table)
> >
> > When I comment out the series of tables, the errors go away.
> > I've just rerun first-setup.sh just out of paranoia. mtx-context |
> > current version: 2016.04.17 11:56
>
> i really need a small *working* example for this
>
>
>
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] PageSetup

2016-04-14 Thread Aidan Nichol
I’ve been have been having a couple of problems with swapping pages and so I 
went back to the example in Context Garden using the latest beta

\definepapersize[main] [A4]
\definepapersize[extra][A4,landscape]

\setuppapersize[main]
\starttext
Page 1. Portrait \page
Page 2. Portrait \page
\adaptpapersize[extra]
Page 3. Landscape \page
Page 4. Portrait \page
\stoptext

The main problem I have is that \adaptpapersize is working as though I had 
entered \setuppapersize. Page 3 was created as landscape and but it didn’t 
revert to main to give page 4 as portrait.

The secondary issue is that the landscape page is not as expected in that it is 
a square page. Inserting a \showsetups and \showframe into page 3 I can see 
that it is layed out Ok but on a large piece of paper. \printpaperwidth and 
\printpaperheight are both set to 29.7cm.

Aidan
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Interactionmenu not creating a button for the final page

2016-04-11 Thread Brian Ballsun-Stanton
Given the following code:

\enableregime [utf]
> \mainlanguage [en]
> \definepapersize[sheet][width=1280px, height=960px]
> \setuppapersize[sheet][sheet]
> \setupexternalfigures[directory={img,
> /home/ubuntu/EGU2016-Presentation,
> /home/ubuntu/ConTeXt/img}]
> \usemodule[simplefonts]
> \setmainfont[Adventor][expansion=quality,protrusion=quality]
> \setupcolors[state=start]
> \definecolor[faimsblue][h=1B3E93]
> \definecolor[faimsorange][h=F68E1E]
> \setuphead[section][placehead=yes, page=yes, number=no, align=middle,
> style={\setupbodyfont[40pt]}]
>
> \setuplayout[
> backspace=.01\pagewidth,
> header=0pt,
> footer=.02\pageheight,
> topspace=.185\pageheight,
> cutspace-.1\pagewidth,
> width=.87\pagewidth,
> height=.798\pageheight,
> bottomspace=.8cm,
> bottom=12pt
> ]
> \setuppagenumbering[location=]
> \setupinteraction
>   [page=yes,
>color=faimsblue,
>contrastcolor=faimsorange,
>menu=on,
>state=start]
> \setupsubpagenumber
>   [way=bytext,
>state=start]
> \startinteractionmenu[bottom]
> {\interactionbar[alternative=f,width=\makeupwidth,height=2ex]}
> \stopinteractionmenu
> \starttext
> \input knuth
> \section{section 1}
> \input knuth
>
> \section{section 2}
> \input knuth
>
>
> \section{section 3}
> \input knuth
>
>
> \section{section 4}
> \input knuth
> \stoptext


(used in a real presentation:
http://context.fedarch.org/Context/presentation.pdf with environment at
https://github.com/FAIMS/EGU2016-Presentation/blob/master/envpresentation.tex
)

it seems that the interactionmenu doesn't have a button for the final page.
I'm assuming I did something wrong, but I'm not quite sure what it is.
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] not able to change paper sizes

2016-02-04 Thread Wolfgang Schuster

Pablo Rodriguez <mailto:oi...@gmx.es>
4. Februar 2016 um 17:19

Hans,

many thanks for your reply Pablo.

I’m afraid that dimensions seem not to be adapted:

\definepapersize[main] [A4] [A4]
\definepapersize[extra][A4,landscape][A4,landscape]

\definelayer[test][x=.5\paperwidth, y=.5\paperheight,state=repeat]
\setlayer[test]{abcde}

\setupbackgrounds[page][background={test}]

You have to reset the layer on each page.

\definelayer[test][x=.5\paperwidth, y=.5\paperheight]

\startsetups[testlayer]
\setlayer[test]{abcde}
\stopsetups

\setupbackgrounds[page][setups=testlayer,background=test]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] not able to change paper sizes

2016-02-04 Thread Pablo Rodriguez
On 02/03/2016 02:57 PM, Hans Hagen wrote:
> On 2/1/2016 7:38 PM, Pablo Rodriguez wrote:
>> [...]
>> It isn’t possible to change the paper size. Only TEXpage does
>> change the paper size.
>>
>> Could anyone confirm the bug?
> 
> more a side effect (synchronizing all related settings can result in 
> recursive calls)
> 
> i'll add a poor mans sync but normally one will use
> 
> \setuplayout (with or without arguments) because simply changing the 
> papersize only has no use

Hans,

many thanks for your reply Pablo.

I’m afraid that dimensions seem not to be adapted:

\definepapersize[main] [A4]  [A4]
\definepapersize[extra][A4,landscape][A4,landscape]

\definelayer[test][x=.5\paperwidth, y=.5\paperheight,state=repeat]
\setlayer[test]{abcde}

\setupbackgrounds[page][background={test}]

\starttext
 \setuppapersize[main]
 Page 1. \page
 \setuppapersize[extra]\setuplayout
 Page 2 \page
\stoptext

Many thanks for your 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] not able to change paper sizes

2016-02-03 Thread Hans Hagen

On 2/1/2016 7:38 PM, Pablo Rodriguez wrote:

Dear list,

in this sample adapted from the documented code:

\definepapersize[main] [A4]  [A4]
\definepapersize[extra][A4,landscape][A4,landscape]

\starttext
 \setuppapersize[main]
 Page 1. \page
 Page 2. \page
 \setuppapersize[extra]
 Page 2 \page
 \setuppapersize[main]
 Page 3. \page
 Page 4. \page
 \adaptpapersize[extra]
 Page 5. \page
 Page 6. \page
 \startTEXpage[height=210mm, width=297mm]
 Page 6.
 \stopTEXpage
\stoptext

It isn’t possible to change the paper size. Only TEXpage does
change the paper size.

Could anyone confirm the bug?


more a side effect (synchronizing all related settings can result in 
recursive calls)


i'll add a poor mans sync but normally one will use

\setuplayout (with or without arguments) because simply changing the 
papersize only has no use


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] not able to change paper sizes

2016-02-02 Thread Pablo Rodriguez
Dear list,

in this sample adapted from the documented code:

\definepapersize[main] [A4]  [A4]
\definepapersize[extra][A4,landscape][A4,landscape]

\starttext
\setuppapersize[main]
Page 1. \page
Page 2. \page
\setuppapersize[extra]
Page 2 \page
\setuppapersize[main]
Page 3. \page
Page 4. \page
\adaptpapersize[extra]
Page 5. \page
Page 6. \page
\startTEXpage[height=210mm, width=297mm]
Page 6.
\stopTEXpage
\stoptext

It isn’t possible to change the paper size. Only TEXpage does
change the paper size.

Could anyone confirm the bug?

Many thanks for your 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Switching to landscape

2015-12-27 Thread Lukáš Procházka

Hello,

I have problem switching to landscape paper size (and landscape printing).

Based on

http://wiki.contextgarden.net/PaperSetup

I have:


\definepapersize[A4L][A4,landscape]

\starttext
  Aaa
  \page
  %\setuppapersize[A4,landscape]
  \setuppapersize[A4L]
  Bbb
\stoptext


But neither "\setuppapersize[A4,landscape]" nor "\setuppapersize[A4L]" works - 
still portrait paper orientation;
so how to switch to landscape page orientation?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

PapSz.mkiv
Description: Binary data


PapSz.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Switching to landscape

2015-12-27 Thread Wolfgang Schuster

Lukáš Procházka <mailto:l...@pontex.cz>
27. Dezember 2015 um 22:19
Hello,

I have problem switching to landscape paper size (and landscape 
printing).


Based on

http://wiki.contextgarden.net/PaperSetup

I have:


\definepapersize[A4L][A4,landscape]

\starttext
  Aaa
  \page
  %\setuppapersize[A4,landscape]
  \setuppapersize[A4L]
  Bbb
\stoptext


But neither "\setuppapersize[A4,landscape]" nor "\setuppapersize[A4L]" 
works - still portrait paper orientation;

so how to switch to landscape page orientation?
It’s a bug but for the moment you can call \setuplayout (no arguments 
are necessary) after \setupapersize to have the correct sizes in the PDF.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Set PDF TrimBox

2015-08-23 Thread Henning Hraban Ramm
Am 2015-08-21 um 22:53 schrieb Hans Hagen pra...@wxs.nl:

 On 8/16/2015 6:33 AM, Henning Hraban Ramm wrote:
 Could you please implement this? Should be really easy…
 I’m tired of fixing the boxes in Acrobat every time.
 Thank you very much!
 
 The next beta will have this extra 'feature':
 
 \showframe
 
 \setuplayout
  [location=middle,
   width=middle,
   height=middle,
   cropoffset=auto,
   trimoffset=1bp,
   bleedoffset=2bp,
   artoffset=2bp]
 
 \starttext
 
 \definepapersize[TestA][width=100bp,height=200bp]
 \definepapersize[TestB][width=150bp,height=250bp]
 
 \setuppapersize[TestA][TestB]
 
 test
 
 \stoptext
 
 The auto option only works with layout=middle (message otherwise) as I'm not 
 going to add all kind of extra calculation code to an already bit overloaded 
 mechanism deep down. The offset are accumulative (so crop  trim  bleed  
 art). In Haralds case cropoffset=auto should be enough. The default crop and 
 trimbox handling is unchanged (as it would complicate my own workflows and 
 also breaks compatibility) so one really needs to set this when it's needed. 
 The already present interactionscreen cropping is unchanged.

Hi Hans, thank you very much for looking into that!
I wikified the box information plus your example at 
http://wiki.contextgarden.net/PDF_Boxes

Unfortunately, the order (crop  trim  bleed  art) is not so good, it should 
be (art  crop  trim  bleed) - as I wrote, in PDF/X, ArtBox must be the same 
as TrimBox, if defined at all. Would you please fix this?

(I don’t know any use of ArtBox - it was meant for imposition, but software 
will probably look for page contents itself, since ArtBox is mostly undefined.)

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Set PDF TrimBox

2015-08-21 Thread Hans Hagen

On 8/16/2015 6:33 AM, Henning Hraban Ramm wrote:

Hi Hans,

in May Harald König asked about setting the TrimBox value in PDFs and provided 
even a patch for lpdf-mis.lua; you promised to look into that, see 
http://article.gmane.org/gmane.comp.tex.context/91544/

If there’s only one paper size (from \setuppapersize), TrimBox is the same as 
CropBox.

If there’s a second paper size (like from \setuppapersize[A4][B4]), TrimBox is 
the first.

At least if there’s marking=on|color|... in \setuplayout, please also set 
BleedBox, even if we can’t influence the bleed value.

Would be nice if there would be an option to let CropBox be the same as TrimBox 
or BleedBox.

We don’t need ArtBox (in PDF/X it must not differ from TrimBox, if defined).

Could you please implement this? Should be really easy…
I’m tired of fixing the boxes in Acrobat every time.
Thank you very much!


The next beta will have this extra 'feature':

\showframe

\setuplayout
  [location=middle,
   width=middle,
   height=middle,
   cropoffset=auto,
   trimoffset=1bp,
   bleedoffset=2bp,
   artoffset=2bp]

\starttext

\definepapersize[TestA][width=100bp,height=200bp]
\definepapersize[TestB][width=150bp,height=250bp]

\setuppapersize[TestA][TestB]

test

\stoptext

The auto option only works with layout=middle (message otherwise) as I'm 
not going to add all kind of extra calculation code to an already bit 
overloaded mechanism deep down. The offset are accumulative (so crop  
trim  bleed  art). In Haralds case cropoffset=auto should be enough. 
The default crop and trimbox handling is unchanged (as it would 
complicate my own workflows and also breaks compatibility) so one really 
needs to set this when it's needed. The already present 
interactionscreen cropping is unchanged.


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Setup footnotes mark placement

2015-06-05 Thread Michał Goliński

Dear list,

in the following file:


\setupinteraction[
 state=start,
 focus=standard
]

\definepapersize[kindle][width=90mm,height=117mm]
\setuppapersize[kindle][kindle]

\setuplayout[
  backspace=2mm,
  topspace=2mm,
  header=0mm,
  footer=0mm,
  width=86mm,
  height=113mm
]

\starttext
a\footnote{b}
\stoptext



footnote mark in the footer is not visible because of the very narrow 
backspace (it is placed off-paper). Is it possible to make the mark 
visible without making the backspace broader?


Many thanks for your help,

M. Goliński
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Setup footnotes mark placement

2015-06-05 Thread Pablo Rodriguez
On 06/05/2015 12:17 PM, Michał Goliński wrote:
 Dear list,
 
 in the following file:
 [...] 
 footnote mark in the footer is not visible because of the very narrow 
 backspace (it is placed off-paper). Is it possible to make the mark 
 visible without making the backspace broader?

Hi Michał,

I guess \setupnotation[footnote][alternative=serried] may do what you want.

Complete sample:

\setupinteraction[
  state=start,
  focus=standard
]

\definepapersize[kindle][width=90mm,height=117mm]
\setuppapersize[kindle][kindle]

\setuplayout[
   backspace=2mm,
   topspace=2mm,
   header=0mm,
   footer=0mm,
   width=86mm,
   height=113mm,
]

\setupnotation[footnote][alternative=serried]

\starttext
a\footnote{\input knuth}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Architectural paper sizes

2015-05-25 Thread Kate F
Hello,

I made definitions for the architectural paper sizes, usually known as
ArchA, ArchB, etc.
I don't know if you want to add them to base/page-lay.mkiv.

% Architectural sizes
\definepapersize [ArchA]  [\c!width=9in, \c!height=12in] % 3:4
\definepapersize [ArchB]  [\c!width=12in,\c!height=18in] % 2:3
\definepapersize [ArchC]  [\c!width=18in,\c!height=24in] % 3:4
\definepapersize [ArchD]  [\c!width=24in,\c!height=36in] % 2:3
\definepapersize [ArchE]  [\c!width=36in,\c!height=48in] % 3:4
\definepapersize [ArchE1] [\c!width=30in,\c!height=42in] % 5:7
\definepapersize [ArchE2] [\c!width=26in,\c!height=38in] % 13:19
\definepapersize [ArchE3] [\c!width=27in,\c!height=39in] % 9:13

-- 
Kate
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bleeding pictures as floats?

2015-05-05 Thread Henning Hraban Ramm
Am 2015-05-05 um 02:59 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 \def\bleed{3mm}
 \def\maxWidth{\dimexpr(\paperwidth+\bleed)}
 
 Use \definemeasure and \measure to set your own dimensions.
 It is also bad style to redefine the \bleed command.

Ok, forgot about that.

 Can you make a working minimal example.


\definepapersize[a6][width=105mm,height=148mm]
\definepapersize[a6o][width=115mm,height=158mm]
\setuppapersize[a6][a6o]
\setuplayout[
location=middle,marking=on,
grid=yes,
backspace=12.5mm, width=80mm,
topspace=12.5mm,
header=0mm,footer=10mm,
]

\definemeasure[Bleed][3mm]
\definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
\definemeasure[maxHeight][\dimexpr \paperheight + 2\measure{Bleed}\relax]
\definemeasure[topOffset][\dimexpr \topspace + \measure{Bleed}\relax]

\setupexternalfigures[
maxwidth=\measure{maxWidth},
maxheight=\measure{maxHeight}
]
\setupcaptions[style=\ss\tfx,align=flushleft,number=no,width=\textwidth]

\definefloat[bleedfigure][figure]
\setupfloat[bleedfigure][
outermargindistance=-2\measure{Bleed},
%leftmargindistance=-2\measure{Bleed},
%rightmargindistance=-2\measure{Bleed},
maxwidth=\measure{maxWidth}
]

\def\topfig#1#2{%
\placebleedfigure[top]{#1}{%
\offset[topoffset=-\measure{topOffset}]%
{\externalfigure[#2][width=\measure{maxWidth}]}%
}%
}

\starttext

\chapter{Test}

\topfig{Caption}{koe}
\input tufte

\topfig{Caption}{koe}

\input knuth
\topfig{Caption}{koe}

\showlayout

\stoptext


So, one of my mistakes was, I had set 
\setupexternalfigures[maxwidth=\paperwidth], that overrides all other float 
definitions.

With this (perhaps not minimal) example I get nearly what I want, but the image 
starts with the paper and is centered (x/y -1,5mm/0mm) where I want it to start 
on -3mm/-3mm on a left page, 0mm/-3mm on a right page. I thought my definitions 
should do that...


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
I’m struggling to make a minimal example.It happens in my project, so it is a 
result of my …/products/prd_book.tex and ../environment/env_cataoia.tex and the 
test file. I need to give three files, two of which differ between mkii and 
mkiv because of different font commands and lettrine vs initial

prd_book.tex ===
\startproduct prd_book
\project project_cataoia

\starttext
\start
\startstandardmakeup[doublesided=no]
\ss
\hairline \start
\blank[line]
\switchtobodyfont[16pt]\bf
\leftaligned{Chess}%
\blank[line]
\leftaligned{and the Art of}%
\blank[line]
\leftaligned{Enterprise Architecture}%
\stop
\hairline \blank[line]
\leftaligned{Making the right moves to manage Business--IT complexity}%
\hairline \blank[line]\rightaligned{Gerben Wierda}%
\blank[6cm]\start\leftskip=10cm\hairline\stop
\rightaligned{2015}%
\stopstandardmakeup
\startstandardmakeup[doublesided=no,page=no]
~\blank[2in]
\start
\switchtobodyfont[9pt]
Copyright \copyright\ 2015 by Gerben Wierda, The Netherlands\crlf
Image used on cover (and on the inside) \copyright\ iStock.com/Antonio
\blank[4mm]
Published by R\A, The Netherlands
\blank[4mm]
Typeset with \TeX, using the mkii version of the \SSCONTEXT\ macro package.
\blank[4mm]
Neither the author, nor the publisher, nor the printer, nor the distributor,
nor the seller accept any responsibility or liability for loss or damage
occasioned to any person or property through using the material, instructions,
methods or ideas contained in or distributed with this book, or acting or
refraining from acting as a result of such use. The author, publisher,
printer, distributor, and seller expressly disclaim all implied warranties,
including merchantability of fitness for any particular purpose.
\blank[4mm]
ISBN 978-90-819840-5-8
\blank[4mm]
Contact info: {\sl i...@enterprisechess.com}\crlf Web site: {\sl
http://enterprisechess.com}\crlf Suggested hashtag: {\sl \#eachess}
\stop
\stopstandardmakeup
\startstandardmakeup[doublesided=no]
\start
\switchtobodyfont[16pt]
\midaligned{The world is not {\blackboard Q}, it is {\blackboard R}}
\blank[6cm]
\stop
\stopstandardmakeup
\stop
\startfrontmatter
\startbuffer [chapter:quote]
%When teaching a rapidly changing technology, perspective is more important
%than content\crlf
%{\tf Richard~Pattis}
The most erroneous stories are those we think we know best --- and therefore
never scrutinize or question.\crlf
{\tf Stephen Jay Gould}
\stopbuffer
\noheaderandfooterlines
\start
\title[h:toc]{Contents}
\setuppagenumber[number=3]
\placelist[chapter,chaptertext]
\stop
\component c_loosely
\stopfrontmatter
\startbodymatter
\component c_inconvenient
\component c_goals
\component c_orthodoxy
\component c_intermezzo
\component c_chess
\component c_model
\component c_future
\component c_hurdles
\stopbodymatter
\startappendices
%   \component c_logic
\component c_cloud
\component c_current
\component c_fsatemplate
\component c_psatemplate
\component c_bibliography
\component c_endnotes
\component c_index
\stopappendices
\stoptext

\stopcomponent
=

env_cataoia.tex mkii =
\startenvironment env_cataoia
\project project_cataoia
%
\definedescription [description]
[location=serried, width=broad, hang=fit, margin=standard,
headstyle=bold]
\definestartstop [descriptions] [before=\startpacked,
after=\stoppacked]
%
\def\SSCONTEXT {Con\kern-.15em\TeX t}
%
%
\definepapersize[smallpaperback][width=5in,height=8in]
\setuppapersize[smallpaperback][smallpaperback]
\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

% Every chapter body text starts with lettrine:
\usemodule[lettrine]
\setuplettrine[Lines=3,
   Hang=.5,
   Oversize=0,
   Raise=0,
   Findent=0pt,
   Nindent=0em,
   Slope=0em,
   Ante=,
   FontHook=,
   TextFont=\sc,
   Image=no]

% Every chapter starts with a quote on the LHS page:
\setuphead
  [chapter]
  [page=,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\noheaderandfooterlines
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

% Mark TODO items in the text
\def\todo#1{{\red --- --- --- TODO: {#1

[NTG-context] 2UP Arranging

2015-02-02 Thread John Kitzmiller
Using 2UP the rightmargin on odd (recto) pages becomes the leftmargin on even 
(verso) pages.

Is there an option for 2UP doublesided to be printed and folded where the 
rightmargin is always on the righthand side of each ‘page’ from the reader’s 
viewpoint? Or another layout scheme to get the same result?

This mwe shows 2UP default:

\definepapersize[booklet][width=140mm,height=216mm]
\setuppapersize[booklet][letter,landscape]
\setuppagenumbering[alternative=doublesided]
\setuparranging[2UP,doublesided]

\setuplayout[
  width=92mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargindistance=3mm,
  rightmargin=25mm,
  ]

\showframe

\starttext
\dorecurse{4}{\input ward \page}
\stoptext

And this gives an image of the desired layout:

\definepapersize[booklet][width=140mm,height=216mm]
\setuppapersize[booklet][letter,landscape]
\setuppagenumbering[alternative=doublesided]
\setuparranging[2UP,doublesided]

\setuplayout[
  width=92mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargindistance=3mm,
  rightmargin=25mm,
  ]

\definelayout[evenside][
  width=92mm,
  leftmargindistance=3mm,
  leftmargin=25mm,
  backspace=43mm,
  rigthedge=0mm,
  rightmargin=0mm,
  ]

\showframe

\starttext
\input ward \page
\setuplayout[evenside] \input ward \page
\setuplayout[reset] \input ward \page
\setuplayout[evenside] \input ward 
\stoptext

I would like to avoid the manual switching if possible. Thanks!
John

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] letter booklet

2015-01-31 Thread John Kitzmiller

 On Jan 26, 2015, at 4:04 AM, schuster.wolfg...@gmail.com wrote:
 
 Am 25.01.2015 um 23:15 schrieb John Kitzmiller k...@inradius.net 
 mailto:k...@inradius.net:
 
 Desired outcome: a multipage booklet on letter size paper with margins lined 
 up when duplex printed and folded.
 
 Using imposition with [letter][letter,landscape] did not work, so to start I 
 used:
 
 \definepapersize[booklet][width=140mm,height=216mm]
 \setuppapersize[booklet][letter,landscape]
 \setuparranging[2UP,doublesided]
 \setuplayout[width=115mm,
 leftedge=0mm,  
 leftmargin=0mm,
 backspace=15mm,
 rightmargin=0mm,
 rigthedge=0mm]  
 \showframe
 \starttext
 \dorecurse{8}{\input Ward \page}
 \stoptext
 
 but the inside and outside margins do not line up. Where is the elegant path?
 
 1. Set your document doublesided with
 
 \setuppagenumbering[alternative=doublesided]
 
 
 2. Reduce the width of the backspace
 
 \setuplayout[backspace=10mm]

Thank you Wolfgang.

Follow-up question: how to have a right margin appear on the right side of 
every booklet page?

The layouts I have tried with the following mwe put the right margin on the cut 
side of the paper, but that “reverses” the margin side from the reader’s view 
when printed and folded.


\definepapersize[booklet][width=140mm,height=216mm]
\setuppapersize[booklet][letter,landscape]
\setuppagenumbering[alternative=doublesided]
\setuparranging[2UP,doublesided]

\setuplayout[
  width=90mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargindistaince=3mm,
  rightmargin=25mm,
  ]

\showframe

\starttext
\dorecurse{4}{\input ward \page}
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Some Lua Code solved

2015-01-26 Thread Eric Gerard
Hello Hans,

many thanks for your help.

I tried to adapt the code you sent me and in case it can help someone I provide 
you what I wrote.

I don’t pretend to make something perfectly correct but…

The idea is to make a checklist with left and bottom tabs.

The line position of left and bottom tabs are defined in two variables and each 
time the lua function is called it computes the topspace position of the even 
page.

\definepapersize
[normal]
[width=14.85cm,
height=21cm]

\definepapersize
[upsidedown]
[normal,
180]

\setupbodyfont
 [10pt,ss]

\setupcolor
 [xwi]

\setuppapersize
 [normal][A4]

\setuppapersize
 [upsidedown][A4]

\setuplayout
 [backspace=16mm,
  leftmargin=15mm,
  leftmargindistance=1mm,
  topspace=10mm,
  header=0mm,
  footer=0mm,
  height=200mm,
  rightmargin=0mm,
  width=131mm,
  location=middle,
  marking=on]

\definelayer
 [OngletGauche]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight]

\definelayer
 [OngletBas]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight]

\definelayer
 [ACouper]
 [x=0mm,
  y=0mm,
  width=\paperwidth,
  height=\paperheight]

% variables
\newdimen\hauteuronglet 
\hauteuronglet=1cm
\setvariables[userdata][bottomligne=4]
\setvariables[userdata][leftligne=10]


\setupTABLE
 [r][1]
 [color=dodgerblue,
  align={middle,lohi},
  height=1cm,
  style=\bfx,
  framecolor=black]

\startluacode
userdata = userdata or { }

function userdata.onglets(pos, word, opt_2, arg_2)

local ongletgauche = utilities.parsers.settings_to_hash(pos)
local labelongletgauche = word

local ongletbas = utilities.parsers.settings_to_hash(opt_2)
local labels  = utilities.parsers.settings_to_array(arg_2)

local ho = tex.dimen.hauteuronglet

local y_ongletgauche = ongletgauche[numligne]

y_ongletgauche = tex.dimen.paperheight - y_ongletgauche * ho

local hauteurzoneacouper =  tex.dimen.paperheight - 
(y_ongletgauche + ho)

local NumLigne   = ongletbas[numligne]
local NbTotalOnglets = ongletbas[nbcol]
local PremierOnglet  = ongletbas[startcol]
local nbTabs = ongletbas[nbtabs]

local y_ongletbas   = tex.dimen.paperheight - (ho * 
NumLigne)
local largeurongletbas  = (tex.dimen.paperwidth  - 
tex.dimen.leftmarginwidth) / NbTotalOnglets
local x_ongletbas   = tex.dimen.leftmarginwidth   + 
largeurongletbas * (PremierOnglet - 1)
local acouper = NbTotalOnglets - (nbTabs + PremierOnglet)

context.setupbackgrounds({page},{background = OngletBas, 
OngletGauche, ACouper})

context.setlayer(
{ OngletBas },
{
hoffset = number.todimen(x_ongletbas),
voffset = number.todimen(y_ongletbas),
},
function()

context.bTABLE({ width = 
number.todimen(largeurongletbas) })
context.bTR()
for i=1, nbTabs
do
context.bTD()
context(labels[i])
context.eTD()
end
for i=nbTabs + PremierOnglet, NbTotalOnglets
do
context.bTD({background = 
color,backgroundcolor = gray})
context(C U T)
context.eTD()
end
context.eTR()
context.eTABLE()
end
)

context.setlayer(
{ OngletGauche },
{
hoffset = number.todimen(0),
voffset = number.todimen(y_ongletgauche),
},
function()

context.startframedtext(
{left},
{
align = lohi, middle,
width = 15mm,
height = 1cm,
offset = 0pt,
frameoffset = 0pt,
style = bold,
})
context

Re: [NTG-context] letter booklet

2015-01-25 Thread Wolfgang Schuster

 Am 25.01.2015 um 23:15 schrieb John Kitzmiller k...@inradius.net:
 
 Desired outcome: a multipage booklet on letter size paper with margins lined 
 up when duplex printed and folded.
 
 Using imposition with [letter][letter,landscape] did not work, so to start I 
 used:
 
 \definepapersize[booklet][width=140mm,height=216mm]
 \setuppapersize[booklet][letter,landscape]
 \setuparranging[2UP,doublesided]
 \setuplayout[width=115mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargin=0mm,
  rigthedge=0mm]  
 \showframe
 \starttext
 \dorecurse{8}{\input Ward \page}
 \stoptext
 
 but the inside and outside margins do not line up. Where is the elegant path?

1. Set your document doublesided with

\setuppagenumbering[alternative=doublesided]


2. Reduce the width of the backspace

\setuplayout[backspace=10mm]


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] letter booklet

2015-01-25 Thread John Kitzmiller
Desired outcome: a multipage booklet on letter size paper with margins lined up 
when duplex printed and folded.

Using imposition with [letter][letter,landscape] did not work, so to start I 
used:

\definepapersize[booklet][width=140mm,height=216mm]
\setuppapersize[booklet][letter,landscape]
\setuparranging[2UP,doublesided]
\setuplayout[width=115mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargin=0mm,
  rigthedge=0mm]  
\showframe
\starttext
\dorecurse{8}{\input Ward \page}
\stoptext

but the inside and outside margins do not line up. Where is the elegant path?

Thanks, John

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with luacode

2015-01-22 Thread Hans Hagen

On 1/20/2015 8:03 PM, Eric Gerard wrote:

Hello Hans,

sorry for that, here is the code I used to check some LUACODE.

\definepapersize[normal][width=14.85cm, height=21cm]

\setupbodyfont[10pt]
\enableregime[il1]
\setupcolor[xwi]

\setuplayout[backspace=16mm, 
leftmargin=15mm,leftmargindistance=1mm,topspace=10mm,header=0mm,footer=0mm,height=200mm,rightmargin=0mm,width=131mm,location=middle,marking=on]

\setuppapersize[normal][A4]
\definelayer[OngletGauche][x=0mm, y=0mm, width=\paperwidth, height=\paperheight]
\setupTABLE[r][1][color=dodgerblue,align={middle,lohi},height=1cm,style={\sansserif
 \bfx},framecolor=black]

% variables
\newdimen\hauteuronglet %height of tab
\hauteuronglet=1cm

%variables onglet bas
\newdimen\largeurzoneongletsbas% total width available for tabs
\newdimen\ordonneeongletsbas% vertical position of tab
\newdimen\abscisseongletsbas% horizontal position of tab
\newdimen\largeurongletbas  % tab width

\startluacode
function test(opt_1, arg_1)
local table = lpeg.split(,,interfaces.tolist(opt_1))
local labels = lpeg.split(,,arg_1)

local NumLigne = table[1]
local NbTotalOnglets = table[2]
local PremierOnglet = table[3]

local decalage = tex.sp(6.5pt)

print(NumLigne)
print(NbTotalOnglets)
print(PremierOnglet)

tex.dimen.ordonneeongletsbas = tex.dimen.paperheight - 
tex.dimen.hauteuronglet * NumLigne
tex.dimen.largeurzoneongletsbas = tex.dimen.paperwidth - 
tex.dimen.backspace
tex.dimen.largeurongletbas = tex.dimen.largeurzoneongletsbas / 
NbTotalOnglets
tex.dimen.abscisseongletsbas = tex.dimen.backspace + 
tex.dimen.largeurongletbas * (PremierOnglet - 1)

local x_ongletsbas = tex.dimen.abscisseongletsbas - decalage
local y_ongletsbas = tex.dimen.ordonneeongletsbas
local largeurongletbas = tex.dimen.largeurongletbas

context.setupbackgrounds({page},{background = 
OngletBas,OngletGauche,ACouper})

context.setlayer({OngletBas},{hoffset = x_ongletsbas, voffset 
= y_ongletsbas},
context.setupTABLE({c},{1,2,3,4,5,6},{width = largeurongletbas})
context.bTABLE()
context.bTR()
context.bTD()
context(labels[1])
context.eTD()
context.eTR()
context.eTABLE()
)
end
interfaces.definecommand {
name = test,
arguments = {
{ option, hash },
{ content, string },
},
macro = test,
}
\stopluacode

\starttext
\ss
\showframe
\input{tufte}
\test[1,6,1]{GROUND EGRESS}

\stoptext

This code is not working, I get an error while calling the function, and I 
don’t understand why.


\definepapersize
  [normal]
  [width=14.85cm,
   height=21cm]

\setupbodyfont
  [10pt,ss]

\setupcolor
  [xwi]

\setuppapersize
  [normal][A4]

\setuplayout
  [backspace=16mm,
   leftmargin=15mm,
   leftmargindistance=1mm,
   topspace=10mm,
   header=0mm,
   footer=0mm,
   height=200mm,
   rightmargin=0mm,
   width=131mm,
   location=middle,
   marking=on]

\definelayer
  [OngletGauche]
  [x=0mm,
   y=0mm,
   width=\paperwidth,
   height=\paperheight]

\definelayer
  [OngletBas]
  [x=0mm,
   y=0mm,
   width=\paperwidth,
   height=\paperheight]

\setupTABLE
  [r][1]
  [color=dodgerblue,
   align={middle,lohi},
   height=1cm,
   style=\bfx,
   framecolor=black]

% variables

\startluacode
local decalage  = string.todimen(6.5pt)
local hauteuronglet = string.todimen(1cm)

function test(opt_1,arg_1)

local options = utilities.parsers.settings_to_array(opt_1)
local labels  = utilities.parsers.settings_to_array(arg_1)

local NumLigne   = options[1]
local NbTotalOnglets = options[2]
local PremierOnglet  = options[3]

		local ordonneeongletsbas= tex.dimen.paperheight - hauteuronglet * 
NumLigne

local largeurzoneongletsbas = tex.dimen.paperwidth  - 
tex.dimen.backspace
local largeurongletbas  = largeurzoneongletsbas / 
NbTotalOnglets
		local abscisseongletsbas= tex.dimen.backspace   + largeurongletbas 
* (PremierOnglet - 1)


local x_ongletsbas = abscisseongletsbas - decalage
local y_ongletsbas = ordonneeongletsbas

		context.setupbackgrounds({page},{background = 
OngletBas,OngletGauche,ACouper})


context.setlayer

[NTG-context] Problem with luacode

2015-01-20 Thread Eric Gerard
Hello Hans,

sorry for that, here is the code I used to check some LUACODE.

\definepapersize[normal][width=14.85cm, height=21cm]

\setupbodyfont[10pt]
\enableregime[il1]
\setupcolor[xwi]

\setuplayout[backspace=16mm, 
leftmargin=15mm,leftmargindistance=1mm,topspace=10mm,header=0mm,footer=0mm,height=200mm,rightmargin=0mm,width=131mm,location=middle,marking=on]

\setuppapersize[normal][A4]
\definelayer[OngletGauche][x=0mm, y=0mm, width=\paperwidth, 
height=\paperheight]
\setupTABLE[r][1][color=dodgerblue,align={middle,lohi},height=1cm,style={\sansserif
 \bfx},framecolor=black]

% variables
\newdimen\hauteuronglet %height of tab
\hauteuronglet=1cm

%variables onglet bas
\newdimen\largeurzoneongletsbas% total width available for tabs
\newdimen\ordonneeongletsbas% vertical position of tab
\newdimen\abscisseongletsbas% horizontal position of tab
\newdimen\largeurongletbas  % tab width

\startluacode
function test(opt_1, arg_1)
local table = lpeg.split(,,interfaces.tolist(opt_1))
local labels = lpeg.split(,,arg_1)

local NumLigne = table[1]
local NbTotalOnglets = table[2]
local PremierOnglet = table[3]

local decalage = tex.sp(6.5pt)

print(NumLigne)
print(NbTotalOnglets)
print(PremierOnglet)

tex.dimen.ordonneeongletsbas = tex.dimen.paperheight - 
tex.dimen.hauteuronglet * NumLigne
tex.dimen.largeurzoneongletsbas = tex.dimen.paperwidth - 
tex.dimen.backspace
tex.dimen.largeurongletbas = tex.dimen.largeurzoneongletsbas / 
NbTotalOnglets
tex.dimen.abscisseongletsbas = tex.dimen.backspace + 
tex.dimen.largeurongletbas * (PremierOnglet - 1)

local x_ongletsbas = tex.dimen.abscisseongletsbas - decalage
local y_ongletsbas = tex.dimen.ordonneeongletsbas
local largeurongletbas = tex.dimen.largeurongletbas

context.setupbackgrounds({page},{background = 
OngletBas,OngletGauche,ACouper}) 

context.setlayer({OngletBas},{hoffset = x_ongletsbas, voffset 
= y_ongletsbas},
context.setupTABLE({c},{1,2,3,4,5,6},{width = largeurongletbas})
context.bTABLE()
context.bTR()
context.bTD()
context(labels[1])
context.eTD()
context.eTR()
context.eTABLE()
)
end
interfaces.definecommand {
name = test,
arguments = {
{ option, hash },
{ content, string },
},
macro = test,
}
\stopluacode

\starttext
\ss
\showframe
\input{tufte}
\test[1,6,1]{GROUND EGRESS}

\stoptext

This code is not working, I get an error while calling the function, and I 
don’t understand why.

Can you explain if you have a bit of time the remark you made about the 
overload of table ?

Eric Gerard


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] wrong line break in linenotes

2014-11-24 Thread Pablo Rodriguez
Dear list,

sorry for writting again about this, but I have this sample:

\showframe
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]
\setupnote[linenote][rule=off, paragraph=yes, split=verystrict,
scope=text, inbetween=\hskip1.5em, compress=yes]
\setupnotation[linenote][numbercommand=, width=broad,
alternative=serried, distance=1em]

\starttext
\startlinenumbering
\showhyphens{testing paragraph}
\dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one}
testing\linenote{nesting} sentence\linenote{table}. }
\stoplinenumbering
\stoptext

It has wrong line breaks in linenotes with latest beta from 2014.11.17
14:32. It has also wrong linebreaks with stable version form 2014.01.03
00:40.

But line breaks are right with version 2013.05.28 00:36 (which comes
with TeX Live 2013).

Line breaks are right, if I use footnotes instead of linenotes.

Could anyone confirm this bug?

Many thanks for your 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \adaptpapersize doesn't change back

2014-11-18 Thread Pol Stra
Hello,

This message is just for bug report.

from wiki, the below example should switch back page 4 in portrait mode, 
but it doesn't. (ConTeXt  ver: 2014.11.17 14:32 MKIV beta)

\definepapersize[main] [A4]
\definepapersize[extra][A4,landscape]
\setuppapersize[main]
\starttext
Page 1. Portrait \page
Page 2. Portrait \page
\adaptpapersize[extra]
Page 3. Landscape \page
Page 4. Portrait \page
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] first line indents

2014-10-13 Thread Andrea Valle
Thanks, that’s what I was thinking but I’m missing something. If I replace  the 
double white line in knuth.tex with \crlf
indentation is not applied anymore to the first block.

In my source I have this:

 TYPESET with Mark IV %%%

\enableregime[utf]
\mainlanguage[it] 
\language[it]
\setupcolors[state=start]
\definepapersize[ZaffiriBook][width=130mm,height=205mm]
\setuppapersize[ZaffiriBook, portrait][ZaffiriBook, portrait]
\setuppagenumber[state=stop]
\setuppagenumbering[location={footer, margin}]

\setupindenting[yes, medium]
\setupheads[indentnext=yes]

\setuptyping
   [before={\setupbodyfont[6pt]},
after={\setupbodyfont[9pt]}]

\usetypescript[palatino]
\setupbodyfont[palatino,9pt]

\setupfootnotes[way=bysection, numberconversion=romannumerals]

\defineparagraphs
 [mypar][n=3,before={\blank},after={\blank}]
 \setupparagraphs
 [mypar][1][width=.3\textwidth,style=bold]
  \setupparagraphs
 [mypar][2][width=.4\textwidth]

\starttext


%% various chapter inputs follow

I get the indent only in the first line of each section/subsection

Best
-a-


--
Andrea Valle
--
CIRMA - StudiUm
Università degli Studi di Torino
-- http://www.cirma.unito.it/andrea/
-- http://www.fonurgia.unito.it/andrea/
-- http://www.flickr.com/photos/vanderaalle/sets/
-- http://vimeo.com/vanderaalle
-- andrea.va...@unito.it
--

This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a 
lotta what-have-yous. 
(Jeffrey 'The Dude' Lebowski)

On 13 Oct 2014, at 23:48, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 13.10.2014 um 23:42 schrieb Andrea Valle va...@di.unito.it:
 
 thanks Wolfgang,
 see the “indent” section here:
 http://smad.jmu.edu/shen/webtype/indent.html
 
 \setupindenting[yes,medium]
 
 \starttext
 
 \input knuth
 
 \section{Knuth}
 
 \input knuth
 
 \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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] first line indents

2014-10-13 Thread Wolfgang Schuster

Am 14.10.2014 um 00:14 schrieb Andrea Valle va...@di.unito.it:

 Thanks, that’s what I was thinking but I’m missing something. If I replace  
 the double white line in knuth.tex with \crlf
 indentation is not applied anymore to the first block.

1. This part is missing in your example below.

2. To end a paragraph insert a blank line or use \par.

 In my source I have this:
 
  TYPESET with Mark IV %%%
 
 \enableregime[utf]

Can be omitted because MkIV expects UTF-8 as default encoding.

 \mainlanguage[it] 
 \language[it]

You don’t need \language here because \mainlanguage already loads the italian 
hyphenation patterns, the \language
command is only used in the content of your document when you want to load 
different hyphenation patterns.

 \setupcolors[state=start]

Can be omitted because colors are enabled by default.

 \definepapersize[ZaffiriBook][width=130mm,height=205mm]
 \setuppapersize[ZaffiriBook, portrait][ZaffiriBook, portrait]
 \setuppagenumber[state=stop]
 \setuppagenumbering[location={footer, margin}]
 
 \setupindenting[yes, medium]
 \setupheads[indentnext=yes]
 
 \setuptyping
[before={\setupbodyfont[6pt]},
 after={\setupbodyfont[9pt]}]

Use \setuptyping[bodyfont=6pt].

 \usetypescript[palatino]

Can be omitted because the following line load the typescript.

 \setupbodyfont[palatino,9pt]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in hyphenation?

2014-09-18 Thread Pablo Rodriguez
On 09/18/2014 05:55 AM, Thomas A. Schmitz wrote:
 On 17 Sep 2014, at 10:03, Pablo Rodriguez wrote:
 Hyphenation points for this word are: κοι[-||]νώ[-||]σε[-||]σθαι.

 Sorry, but I think that the bug is clear, but I don’t know how to
 provide a minimal sample.

 Many thanks for your help,
 
 Why is it difficult to provide a minimal example? I have this:
 [...] 
 Which gives me the attached output - with the expected hyphenation.
 So this is not a bug, but something is wrong in your document. And we
 won’t be able to say what unless you provide a minimal example.

Many thanks for the reply, Thomas.

My sample is the following:

\showframe
\mainlanguage[en]
\setuplanguage[en][patterns={en, agr}]
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]

\definefontfamily[mainface][serif][FreeSerif]
\setupbodyfont[mainface, 13pt]

\unexpanded\def\doCritApp#1#2#3%
   {\startlinenote[#1]{#2 #3}#2\stoplinenote[#1]}

\newcounter\MyCounter
\unexpanded\def\CritApp
   {\doglobal\increment\MyCounter
\normalexpanded{\doCritApp{Varia:\MyCounter}}}

%~ \def\CritApp#1#2{#1}

\starttext
με τὴν τέχνην ταύτην \CritApp{ἴσα}{neut. pl. acc. adverbial, “equally
to” + dat.} γενέτῃσιν ἐμοῖς, καὶ βίου \CritApp{κοινώσεσθαι}{fut. inf.
with ὄμνυμι “to be a partner of” + gen.}
\stoptext

After reading again the message that gave me the macro, hyphenation
seems to be an unsolved issue with that command.

Many tganks for your 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in hyphenation?

2014-09-18 Thread Thomas A. Schmitz
So your problem has nothing to do with Greek hyphenation, it’s about the way 
you define your \CritApp command. You could have shown the same problem with an 
English text. It appears that injecting the word via your macro breaks 
hyphenation, but I assume Hans and Wolfgang  will know better about that. 
Example without Greek:

\showframe
\mainlanguage[en]
\setuplanguage[en][patterns={en, agr}]
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]

\definefontfamily[mainface][serif][FreeSerif]
\setupbodyfont[mainface, 13pt]

\unexpanded\def\doCritApp#1#2#3%
  {\startlinenote[#1]{#2 #3}#2\stoplinenote[#1]}

\newcounter\MyCounter
\unexpanded\def\CritApp
  {\doglobal\increment\MyCounter
   \normalexpanded{\doCritApp{Varia:\MyCounter}}}

\starttext
supercalifragilisticexpialidocious
\CritApp{supercalifragilisticexpialidocious}{test}
\stoptext


On 18 Sep 2014, at 08:33, Pablo Rodriguez oi...@gmx.es wrote:

 Many thanks for the reply, Thomas.
 
 My sample is the following:
 
 \showframe
 \mainlanguage[en]
 \setuplanguage[en][patterns={en, agr}]
 \definepapersize[HippPaper][width=6in, height=9in]
 \setuppapersize[HippPaper]
 
 \definefontfamily[mainface][serif][FreeSerif]
 \setupbodyfont[mainface, 13pt]
 
 \unexpanded\def\doCritApp#1#2#3%
   {\startlinenote[#1]{#2 #3}#2\stoplinenote[#1]}
 
 \newcounter\MyCounter
 \unexpanded\def\CritApp
   {\doglobal\increment\MyCounter
\normalexpanded{\doCritApp{Varia:\MyCounter}}}
 
 %~ \def\CritApp#1#2{#1}
 
 \starttext
 με τὴν τέχνην ταύτην \CritApp{ἴσα}{neut. pl. acc. adverbial, “equally
 to” + dat.} γενέτῃσιν ἐμοῖς, καὶ βίου \CritApp{κοινώσεσθαι}{fut. inf.
 with ὄμνυμι “to be a partner of” + gen.}
 \stoptext
 
 After reading again the message that gave me the macro, hyphenation
 seems to be an unsolved issue with that command.
 
 Many tganks for your help,

--
Prof. Dr. Thomas A. Schmitz
Geschäftsführender Direktor
Institut für Klassische und Romanische Philologie
Universität Bonn
Am Hof 1e
53113 Bonn
http://www.philologie.uni-bonn.de/personal/schmitz

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in hyphenation?

2014-09-17 Thread Thomas A. Schmitz

On 17 Sep 2014, at 10:03, Pablo Rodriguez oi...@gmx.es wrote:

 I found a bug in a Greek edition of the Hippocratic oath I’m trying to
 typeset. Last line from the first page
 http://www.ousia.tk/hippocratic-oath.pdf.
 
 Hyphenation points for this word are: κοι[-||]νώ[-||]σε[-||]σθαι.
 
 Sorry, but I think that the bug is clear, but I don’t know how to
 provide a minimal sample.
 
 Many thanks for your help,

Why is it difficult to provide a minimal example? I have this:

\definepapersize [test] [width=5.7in,height=4in]

\setuppapersize [test] [test]

\mainlanguage [agr]

\definefontfamily [test] [serif] [Free Serif]

\setupbodyfont [test,12pt]

\starttext

\strut \hskip1em Ἀπόλλωνα ἰητρὸν καὶ Ἀσκληπιὸν, καὶ Ὑγείαν καὶ Πανάκειαν
καὶ θεοὺς πάντας τε καὶ πάσας, ἵστορας ποιεύμενος, ἐπιτελέα ποιήσειν κατὰ
δύναμιν καὶ κρίσιν ἐμὴν ὅρκον τόνδε καὶ συγγραφὴν τήνδε· ἡγήσεσθαι μὲν τὸν
διδάξαντά με τὴν τέχνην ταύτην ἴσα γενέτῃσιν ἐμοῖσι, καὶ βίου κοινώσεσθαι

\stoptext

Which gives me the attached output - with the expected hyphenation. So this is 
not a bug, but something is wrong in your document. And we won’t be able to say 
what unless you provide a minimal example.

Thomas



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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in hyphenation?

2014-09-04 Thread Pablo Rodriguez
On 08/30/2014 12:00 PM, Hans Hagen wrote:
 On 8/30/2014 6:47 AM, Pablo Rodriguez wrote:
 Dear list,

 the following sample shows bad hyphenation in the first body line and in
 many linenotes:

 \showframe
 \definepapersize[HippPaper][width=6in, height=9in]
 \setuppapersize[HippPaper]
 \setupnote[linenote][rule=off, paragraph=yes, split=verystrict,
 scope=text, inbetween=\hskip1.5em, compress=yes]
 \setupnotation[linenote][numbercommand=, width=broad,
 alternative=serried, distance=1em]

 \starttext
 \startlinenumbering
 \showhyphens{testing paragraph}
 \dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one}
 testing\linenote{nesting} sentence\linenote{table}. }
 \stoplinenumbering
 \stoptext

 If this is not a bug, what am I missing here?

 Many thanks for your help,
 
 more a side effect of binding a reference node and such ... possible 
 solution in next beta

Hans,

I’m afraid that beta from today has still this bug.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Framed text and page breaks

2014-09-02 Thread Keith McKay

Colleagues

I've been struggling today with trying to change paragraph width of 
selected paragraphs within the body text of a novel I'm typesetting. I 
thought that the way to do this would be by framing the text that I 
would like to reduce the paragraph width off.  However the framed text 
doesn't seem to honour page breaks and just seems to disappear off the 
page bottom.  Also the framed text starts on a new page which I do not 
want to happen.


Any suggestions on how I may go about solving this problem?

Best Wishes
Keith McKay

Here is an example tex file which shows these effects:
\definepapersize[book][width=5.06in,height=7.81in]

\setuppapersize [book][]

\setuplayout 
[width=middle,backspace=12.5mm,cutspace=12.5mm,height=middle,topspace=12.7mm,bottomspace=12.7mm]


\starttext

\dorecurse{2}{\input ward \blank}

\midaligned

\framed[frame=off,width=5cm,align={width,nothyphenated,verytolerant,stretch},before=\blank]{\dorecurse{4}{\input 
ward \blank}}


\dorecurse{2}{\input ward \blank}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Framed text and page breaks

2014-09-02 Thread Aditya Mahajan
If you just want to reduce the width of paragraphs, use the narrower 
environment. If you also want frames or background colors that break 
across page, use the background environment. If you want floats and 
parshape to also work, use the textbackground environment.


Aditya

On Tue, 2 Sep 2014, Keith McKay wrote:


Colleagues

I've been struggling today with trying to change paragraph width of selected 
paragraphs within the body text of a novel I'm typesetting. I thought that 
the way to do this would be by framing the text that I would like to reduce 
the paragraph width off.  However the framed text doesn't seem to honour page 
breaks and just seems to disappear off the page bottom.  Also the framed text 
starts on a new page which I do not want to happen.


Any suggestions on how I may go about solving this problem?

Best Wishes
Keith McKay

Here is an example tex file which shows these effects:
\definepapersize[book][width=5.06in,height=7.81in]

\setuppapersize [book][]

\setuplayout 
[width=middle,backspace=12.5mm,cutspace=12.5mm,height=middle,topspace=12.7mm,bottomspace=12.7mm]


\starttext

\dorecurse{2}{\input ward \blank}

\midaligned

\framed[frame=off,width=5cm,align={width,nothyphenated,verytolerant,stretch},before=\blank]{\dorecurse{4}{\input 
ward \blank}}


\dorecurse{2}{\input ward \blank}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Framed text and page breaks

2014-09-02 Thread Keith McKay

Thank you Aditya!

Your hint to using the narrower environment lead me to \startnarrower 
\stopnarrower on the wiki which was exactly what I was looking for.


Thanks again

Best Wishes
Keith McKay

On 02/09/2014 17:22, Aditya Mahajan wrote:
If you just want to reduce the width of paragraphs, use the narrower 
environment. If you also want frames or background colors that break 
across page, use the background environment. If you want floats and 
parshape to also work, use the textbackground environment.


Aditya

On Tue, 2 Sep 2014, Keith McKay wrote:


Colleagues

I've been struggling today with trying to change paragraph width of 
selected paragraphs within the body text of a novel I'm typesetting. 
I thought that the way to do this would be by framing the text that I 
would like to reduce the paragraph width off.  However the framed 
text doesn't seem to honour page breaks and just seems to disappear 
off the page bottom.  Also the framed text starts on a new page which 
I do not want to happen.


Any suggestions on how I may go about solving this problem?

Best Wishes
Keith McKay

Here is an example tex file which shows these effects:
\definepapersize[book][width=5.06in,height=7.81in]

\setuppapersize [book][]

\setuplayout 
[width=middle,backspace=12.5mm,cutspace=12.5mm,height=middle,topspace=12.7mm,bottomspace=12.7mm]


\starttext

\dorecurse{2}{\input ward \blank}

\midaligned

\framed[frame=off,width=5cm,align={width,nothyphenated,verytolerant,stretch},before=\blank]{\dorecurse{4}{\input 
ward \blank}}


\dorecurse{2}{\input ward \blank}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug in hyphenation?

2014-08-30 Thread Hans Hagen

On 8/30/2014 6:47 AM, Pablo Rodriguez wrote:

Dear list,

the following sample shows bad hyphenation in the first body line and in
many linenotes:

\showframe
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]
\setupnote[linenote][rule=off, paragraph=yes, split=verystrict,
scope=text, inbetween=\hskip1.5em, compress=yes]
\setupnotation[linenote][numbercommand=, width=broad,
alternative=serried, distance=1em]

\starttext
\startlinenumbering
\showhyphens{testing paragraph}
\dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one}
testing\linenote{nesting} sentence\linenote{table}. }
\stoplinenumbering
\stoptext

If this is not a bug, what am I missing here?

Many thanks for your help,


more a side effect of binding a reference node and such ... possible 
solution in next beta


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] bug in hyphenation?

2014-08-29 Thread Pablo Rodriguez
Dear list,

the following sample shows bad hyphenation in the first body line and in
many linenotes:

\showframe
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]
\setupnote[linenote][rule=off, paragraph=yes, split=verystrict,
scope=text, inbetween=\hskip1.5em, compress=yes]
\setupnotation[linenote][numbercommand=, width=broad,
alternative=serried, distance=1em]

\starttext
\startlinenumbering
\showhyphens{testing paragraph}
\dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one}
testing\linenote{nesting} sentence\linenote{table}. }
\stoplinenumbering
\stoptext

If this is not a bug, what am I missing here?

Many thanks for your 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Why is my output body text in 15pt?

2014-07-23 Thread Gerben Wierda
I am typesetting a small pocketbook. I’m using mkii and the standard 
products/environment/chapters structure. I am trying to create a small 
paperbook size book with 11pt Optima font (using the converted font on my Mac).

Everything works, except the body text is in 15pt in the PDF. Now, I did all 
this font setup stuff years and years ago (I think the whole GTAMacFonts 
doesn’t work/exist anymore, I just keep it running on my system) and of course 
I suspect something not quite right in  that part, but when I completely leave 
out the Optima stuff, I get CMR in 15pt, so that is probably not it. When in 
CRM, I see log entries like

[7.5]
Overfull \hbox (4.50882pt too wide) in paragraph at lines 36--46
\*12ptrmtfrm*: rat-ings in-sti-tute are ca-pa-ble of han-dling this amount

\hbox(8.26648+2.1)x258.10477, glue set - 1.0
.\*12ptrmtfrm*: r
.\*12ptrmtfrm*: a
.\*12ptrmtfrm*: t
.\discretionary
..\*12ptrmtfrm*: -
.\*12ptrmtfrm*: i
.etc.

Which seems to indicate that the font is 12pt. But why is the document in 15pt 
text?

My environment contains (amongst other things):

\definepapersize[smallpaperback][width=5in,height=8in]
\setuppapersize[smallpaperback][smallpaperback]
\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

% Every chapter body text starts with lettrine:
\usemodule[lettrine]
\setuplettrine[Lines=3,
   Hang=.5,
   Oversize=0,
   Raise=0,
   Findent=0pt,
   Nindent=0em,
   Slope=0em,
   Ante=,
   FontHook=,
   TextFont=\sc,
   Image=no]

% Every chapter starts with a quote on the LHS page:
\setuphead
  [chapter]
  [page=,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\noheaderandfooterlines
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

\setuptolerance[horizontal=strict]
\setupcolors[state=start]
\setupcolor[rgb]
%
\setupquote[style=small]
\setupnarrower[left=1cm,right=0.5cm]
%
\usetypescript[serif,sans,mono] [hanging] [normal]

% Bypassing type-gtamacfonts.tex
\starttypescript [sans,serif] [optima] [texnansi,ec]
\definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular]
[encoding=\typescriptthree]
\definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic]
[encoding=\typescriptthree]
\definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold]
[encoding=\typescriptthree]
\definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic]
[encoding=\typescriptthree]
\definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack]
[encoding=\typescriptthree]
\stoptypescript
\starttypescript [sans,serif] [optima] [name]
\setups[font:fallback:\typescriptone]
\definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular]
\definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic]
\definefontsynonym [\typescriptprefix\typescriptone Bold]   [Optima-Bold]
\definefontsynonym [\typescriptprefix\typescriptone BoldItalic]
[Optima-BoldItalic]
\definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack]
\stoptypescript
\definetypeface[allsans][rm][serif][optima][default][encoding=texnansi]
\definetypeface[allsans][ss][sans][optima][default][encoding=texnansi]
\loadmapfile [gtamacfonts.map]
\setupbodyfont[allsans,11pt]___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] dx=1cm with imposition: how to disable right most dx?

2014-06-01 Thread Xan
Hi,

I have this code:

\definepapersize[carnet][width=8.50cm,height=5.40cm]

\setuppapersize [carnet][A4]

\setuppaper []
\setuplayout[page] [topspace=0.02cm, backspace=0.02cm, 
header=0.02cm,margin=0.02cm,width=middle,footer=0.02cm,height=fit]
\setuplayout[page]
\setuplayout[location=middle,marking=on,nx=2,ny=4,dy=1cm,dx=1cm]


When I run context, the dx distance is added to the right of the rightest 
page of type carnet. So I have an extra right dx distance that it annyoes me 
becase in double printing pages, the side above and the side below don't match.

How can I prevent that?

Thanks in advance,
Xan.

PS: Please CCme.
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] dx=1cm with imposition: how to disable right most dx?

2014-06-01 Thread Hans Hagen

On 6/1/2014 12:00 PM, Xan wrote:

Hi,

I have this code:

\definepapersize[carnet][width=8.50cm,height=5.40cm]

\setuppapersize [carnet][A4]

\setuppaper []
\setuplayout[page] [topspace=0.02cm, backspace=0.02cm, 
header=0.02cm,margin=0.02cm,width=middle,footer=0.02cm,height=fit]
\setuplayout[page]
\setuplayout[location=middle,marking=on,nx=2,ny=4,dy=1cm,dx=1cm]


When I run context, the dx distance is added to the right of the rightest page of 
type carnet. So I have an extra right dx distance that it annyoes me becase in double printing 
pages, the side above and the side below don't match.

How can I prevent that?


\definepageshift[test][horizontal][8mm]
\setuppageshift[test]

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] dx=1cm with imposition: how to disable right most dx?

2014-06-01 Thread Xan
Oh! thanks. Now I have to try for having the same space on left and on right.

Thanks


On Sun, 01 Jun 2014 13:16:06 +0200
Hans Hagen pra...@wxs.nl ha escrit:

 On 6/1/2014 12:00 PM, Xan wrote:
  Hi,
 
  I have this code:
 
  \definepapersize[carnet][width=8.50cm,height=5.40cm]
 
  \setuppapersize [carnet][A4]
 
  \setuppaper []
  \setuplayout[page] [topspace=0.02cm, backspace=0.02cm, 
  header=0.02cm,margin=0.02cm,width=middle,footer=0.02cm,height=fit]
  \setuplayout[page]
  \setuplayout[location=middle,marking=on,nx=2,ny=4,dy=1cm,dx=1cm]
 
 
  When I run context, the dx distance is added to the right of the 
  rightest page of type carnet. So I have an extra right dx distance that 
  it annyoes me becase in double printing pages, the side above and the side 
  below don't match.
 
  How can I prevent that?
 
 \definepageshift[test][horizontal][8mm]
 \setuppageshift[test]
 
 -
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
   | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Problem with pdf output for FeedARead.com

2014-04-15 Thread Keith McKay

Colleagues

A friend of mine asked me to produce a small book of three of her short 
stories for FeedARead.com from a word document.  On looking at the site 
I suggested I do a conversion to pdf since it would look much better and 
FeedARead recommend uploading pdf over word as well.  So I set about 
using Context to produce a simple pdf for upload using the structure below:


\definepapersize[leela][width=5in, height=8in]

\setuppapersize[leela][leela]

\setuplayout[backspace=0.75in,cutspace=0.5in,width=fit]

\setupindenting[yes,medium,next]

\setuppagenumbering[state=stop]

\setupexternalfigures[location={local,default}]

\setupalign[nonhyphenated]

\setuphead[section-3][number=no,align=middle][alternative=doublesided,location=footer]

\setuptolerance[vertical,verystrict]

\setuptolerance[horizontal,verytolerant]

\starttext

\midaligned{\tfd{Title Page}}

\page

FeedAReed blurb and copyright notice goes here.

\setupcombinedlist[content][list={chapter,section,subsection}]

\completecontent

\page[empty]

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

\startsection[title={Knuth}]

\input knuth\par

\stopsection

\page

\startsection[title={Zapf}]

\input zapf\par

\stopsection

\page

\startsection[title={Tufte}]

\input tufte\par

\stopsection

\stoptext


As you can see it's nothing fancy but is produces nice copy. However, 
when my friend uploaded to FeedARead she received back this comment:


/Please note that you have uploaded TWO pages of your book per one 5 
inch wide x 8 inch high page e.g. on your file there would be two book 
pages of print per page and not one per page as required./



I did notice that when viewed in Adobe Reader, V11.0.6, it displays two 
pages on the screen at a time but on checking the documents properties 
it shows the correct page size so I thought it was OK. I've had a look 
on the wiki but haven't found anything obviously wrong in what I've done 
above. Is their something I'm missing in \definepapersize or 
\setuppapersize? I really don't want to have to tell her to upload the 
word doc.


Thanks and Best Wishes
Keith


___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] struggling with section headers

2014-03-10 Thread Henning Hraban Ramm
Ok, second try. Here’s a rather minimal example:

———
\usemodule[visual] % fakewords

\definepapersize[a6][width=105mm,height=148mm] % ConTeXt seems to have 
forgotten about a5 and a6??
\setuppapersize[a6][a6] % small paper to get more breaks

\setupbodyfont[rm,9pt]
\setupinterlinespace[12pt]

\setupindenting[yes, medium, next]
\setupblank[big]
\setupcolor[state=start]

\setuplayout[grid=yes]

\setupheads[
  align={right,nothyphenated}, 
  tolerance=verytolerant,
  grid=line
]
\definefont[SectionFont][Sans at 11pt] % fits within grid
\setuphead[section][
  page=no, style={\SectionFont}, 
  before={\blank}, after={},
  interlinespace=12pt
]

% dummy section with long, red title
\def\Section{
\startsection[title={\definecolor[fakerulecolor][red]\fakewords{5}{20}\definecolor[fakerulecolor][black]}]
\fakewords{20}{50}\par\fakewords{20}{50}\par\fakewords{20}{50}\par
\stopsection
}

\starttext

\startchapter[title={See, ye mighty, and despair!}]

\fakewords{10}{30}

\dorecurse{20}{\Section}

\stopchapter

\stoptext
———

Problems:
- section titles with several lines get negative space above (but not always) 
and overprint the last line(s) of the previous section.
- instead, the space before section titles must stay constant, but not show up, 
if a page starts with a section title
- section titles should stick to their section text and never stand alone at 
the bottom of a page

I guess the first is a bug and the others may need some setup options that I 
don’t know.


Grüßlinge, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] struggling with section headers

2014-03-10 Thread Thangalin
Hi,

Try using \testpage[3]. The 3 will have to vary depending on the
number of lines that the section titles can possibly take up. For
example, if the section title takes up 4 lines, then you might want to
use \testpage[5].

\usemodule[visual] % fakewords

\definepapersize[a6][width=105mm,height=148mm] % ConTeXt seems to have
forgotten about a5 and a6??
\setuppapersize[a6][a6] % small paper to get more breaks

\setupbodyfont[rm,9pt]
\setupinterlinespace[12pt]

\setupindenting[yes, medium, next]
\setupblank[big]
\setupcolor[state=start]

\setuplayout[grid=yes]

\setupheads[
  align={right,nothyphenated},
  tolerance=verytolerant,
  grid=line
]
\definefont[SectionFont][Sans at 11pt] % fits within grid
\setuphead[section][
  page=no, style={\SectionFont},
  before={\blank\testpage[3]}, after={},
  interlinespace=12pt
]

% dummy section with long, red title
\def\Section{
\startsection[title={\definecolor[fakerulecolor][red]Section
Title\fakewords{2}{15}\definecolor[fakerulecolor][black]}]
\fakewords{20}{50}\par\fakewords{20}{50}\par\fakewords{20}{50}\par
\stopsection
}

\starttext

\startchapter[title={See, ye mighty, and despair!}]

\fakewords{10}{30}

\dorecurse{20}{\Section}

\stopchapter

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] line notes compress

2013-12-02 Thread Hans Hagen

Hi,

The linenote compression options (and control) has been upgraded:

\definepapersize
  [mine]
  [width=8cm,
   height=6cm]

\setuplayout
  [location=middle,
   width=middle,
   height=middle,
   headerdistance=5mm]

\setuppapersize
  [mine]
  [oversized]

\definelinenote
  [MyNote]

\setupnote
  [MyNote]
  [paragraph=yes]

\setupnotation
  [MyNote]
  [alternative=serried,
   distance=.5em,
   width=broad]

\setupalign
  [verytolerant]

\showframe

\startbuffer
\setupfootertexts[\ttxx 
compress=\namednoteparameter{MyNote}{compress}\quad 
compressmethod=\namednoteparameter{MyNote}{compressmethod}]

\startlinenumbering
This\MyNote{That} context\MyNote{document} is\MyNote{was} a
sample\MyNote{an example} that I\MyNote{she} want\MyNote{didn’t
want} to show\MyNote{publish}
\stoplinenumbering
\page
\stopbuffer

\starttext
\setupnote[MyNote][compress=yes,compressmethod=stopper]   \getbuffer
\setupnote[MyNote][compress=yes,compressmethod=separator] \getbuffer
\setupnote[MyNote][compress=yes,compressmethod=space] \getbuffer
\setupnote[MyNote][compress=yes,compressmethod=]  \getbuffer
\setupnote[MyNote][compress=no,compressmethod=stopper]\getbuffer
\setupnote[MyNote][compress=no,compressmethod=separator]  \getbuffer
\setupnote[MyNote][compress=no,compressmethod=space]  \getbuffer
\setupnote[MyNote][compress=no,compressmethod=]   \getbuffer
\stoptext

Keep in mind that paragraph notes are somewhat special so some tolerance 
in alignment helps.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Duplexing a single-sided layout?

2013-11-30 Thread Adam Khan
I have a document in which left and right cannot be equated with inner and 
outer respectively (outside the header texts). So I use 
\setuppagenumbering[alternative={singlesided,doublesided}]. But I still need a 
gutter along (what would be) the inner margin. So, how would I go about 
duplexing a single-sided layout?

For example:

\definepapersize[custom][width=335mm,height=500mm]
\setuppapersize[custom][B3]
\setuplayout[%
  width=middle,%
  height=middle,%
  backspace=90mm,%
  topspace=25mm,%
  leftmargin=30mm,%
  rightmargin=15mm,%
  leftmargindistance=5mm,%
  rightmargindistance=20mm,%
  location={doublesided,duplex},%
  bottomspace=25mm,%
  cutspace=90mm]
\setuppagenumbering[alternative={singlesided,doublesided}]

Sincerely yours,
Adam Khan

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] (critical edition) compressseparatorbefore and compressseparatorafter

2013-11-18 Thread Pablo Rodriguez
Dear Thomas, Luigi and Hans,

code first:

\definepapersize[mine][width=3in,height=2in]
\setuppapersize[mine]
\definelinenote[Variant]
\setupnote[Variant][paragraph=yes, inbetween=\hskip2.5em]
\setupnotation[Variant][alternative=serried,distance=1em,compress=yes,
width=broad]
\starttext
\startlinenumbering
This\Variant{That} context\Variant{document} is\Variant{was} a
sample\Variant{an example} that I\Variant{she} want\Variant{didn’t
want} to show\Variant{publish}\stoplinenumbering
\stoptext

With compressed linenotes (when compressseparator isn’t set to none), I
think is important to have the ability to specify different lengths for
the compressseparator than for the linenotes.

If neither of them is defined, compressseparatorbefore should have the
same value as inbetween from setupnote and compressseparatorafter should
take its value from distance in setupnotation.

But with the sample above, I think that the spacing that can make sense
for line numbers might be visually misleading for separators.

Here I’m only an amateur, Thomas, you are the professional. What do you
think of this feature?

Many thanks for your 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] [***SPAM***] Page layout mechanics

2013-10-09 Thread hwitloc

I am trying to create a papersize for a business card (Japanese sized).
I want a 3 mm border/edge and the rest of the space available for text space.

I'm able to get new this for the vertical dimension, but the horizontal text 
area is about 20 mm shorter than desired or (intented) setyp values.

How can I get this to provide a text are width of 85 mm and not the 65 mm I am 
currently getting, even tough I only spacife 3mm right and left edges?

Thanks


% Minimal example follows:

\definepapersize[business-card][width=91mm,height=55mm]
\setuppapersize[business-card][business-card]
\setuppagenumbering[location=] 

\setuplayout[leftedge=0mm, leftedgedistance=0mm, leftmargin=0mm, 
leftmargindistance=0mm,
 backspace=3mm,
 
rightedge=0mm,rightedgedistance=0mm,rightmargin=0mm,rightmargindistance=0mm,
 topspace=3mm, top=0mm, topdistance=0mm, header=0mm, 
headerdistance=0mm,
 footerdistance=0mm, footer=0mm,bottomdistance=0mm, bottom=0mm,
 makeupwidth=85mm ]
\starttext

\showframe

\midaligned{Hello World!}

\showlayout

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [***SPAM***] Page layout mechanics

2013-10-09 Thread Marco Patzer
On 2013–10–09 hwit...@gmail.com wrote:

 I want a 3 mm border/edge and the rest of the space available for text space.

\definepapersize
  [business-card]
  [width=91mm,
   height=55mm]

\setuppapersize
  [business-card]

\setuplayout
  [backspace=3mm,
   topspace=3mm,
   margin=0mm,
   header=0mm,
   footer=0mm,
   width=middle,
   height=middle]

\starttext
  \showframe
  \midaligned{Hello World!}
  \showlayout
\stoptext

Marco


signature.asc
Description: Digital signature
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [***SPAM***] Page layout mechanics

2013-10-09 Thread Wolfgang Schuster

Am 09.10.2013 um 14:38 schrieb Marco Patzer li...@homerow.info:

 On 2013–10–09 hwit...@gmail.com wrote:
 
 I want a 3 mm border/edge and the rest of the space available for text space.
 
 \definepapersize
  [business-card]
  [width=91mm,
   height=55mm]
 
 \setuppapersize
  [business-card]
 
 \setuplayout
  [backspace=3mm,
   topspace=3mm,
   margin=0mm,
   header=0mm,
   footer=0mm,
   width=middle,
   height=middle]


You can also modify the “page” layout.

\setuplayout[page][backspace=3mm,topspace=3mm]
\setuplayout[page]

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [***SPAM***] Page layout mechanics

2013-10-09 Thread hwitloc


Marco,
   thanks for demonstrating a clean way to set up custom layout sizes.
This is very usefull and will be applied to various target documents and paper 
sizes depending on the need.

Regards

Marco Patzer wrote:

 On 2013–10–09 hwit...@gmail.com wrote:
 
  I want a 3 mm border/edge and the rest of the space available for text 
  space.
 
 \definepapersize
   [business-card]
   [width=91mm,
height=55mm]
 
 \setuppapersize
   [business-card]
 
 \setuplayout
   [backspace=3mm,
topspace=3mm,
margin=0mm,
header=0mm,
footer=0mm,
width=middle,
height=middle]
 
 \starttext
   \showframe
   \midaligned{Hello World!}
   \showlayout
 \stoptext
 
 Marco
 ___
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Using \setupinterlinespace with \setuparranging[XY], and more

2013-06-26 Thread Pavneet Arora
Thanks for the explanation, Wolfgang.

I am, however, getting some strange interline behaviour exhibited using
the \par approach.  In the MWE below the quoted text, which have both
approaches (\par and explicit \setinterlinespace outside the \framed)
listed, you will see with the \par approach that the text is aligned
slightly lower than middle (so not properly vertically centred), and the
spacing below the first line is larger than the subsequent lines.

Regards.

On 25Jun13, Wolfgang Schuster wrote:
 
 Am 21.06.2013 um 22:27 schrieb Pavneet Arora pavneet_ar...@waroc.com:
 
  3.  I cannot get interlinespacing to affect the line spacing even though
  the baselineskip variable is changed as shown in the MWE.
 
 You have to add \par at the end of each paragraph, e.g. 
 \framed{\definedfont[…]\setupinterlinespace …\par}
 
 Wolfgang

MWE:

\definepapersize
[Label]
[width=4in,height=3.33in]

\setuppapersize[Label][letter,portrait]

\setuppaper
[topspace=0.4688in,
backspace=0.1875in,
dx=0.1875in,
dy=0in,
nx=2,
ny=3]

\setuplayout
[topspace=0in,
backspace=0in,
margin=0in,
width=4in,
height=3.33in,
header=0in,
footer=0in]

\setuparranging[XY]

\setupframedtexts
[width=\textwidth,
height=\textheight,
frame=off,
location=lohi,
offset=0pt]

\setupframed
[frame=off,
width=\textwidth,
height=\textheight,
alignment=center]

\setuplayout[location=middle]

\definelayer
[Label]
[width=\paperwidth,
height=\paperheight]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,48pt]
\setupinterlinespace[line=2.8ex]

\showframe

\starttext
\framed{Label 1}\page
\framed{\definedfont[Serif at 18pt]\setupinterlinespace A long description 
label that needs to be have its interline spacing adjusted.\par}\page
\setupbodyfont[rm,18pt]
\setupinterlinespace
\framed{Another long description label that seems to have proper interline 
spacing.}\page
\framed{Yet another long description label that seems to have proper interline 
spacing.}\page
Label 2\page
Label 3\page
Label 4\page
Label 5\page
Label 6\page
Label 7\page
Label 8\page
\stoptext

-- 

Pavneet Arora   m: 647.406.6843
Waroc Informatikt: 416.937.9276
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Using \setupinterlinespace with \setuparranging[XY], and more

2013-06-25 Thread Pavneet Arora
By chance I found a possible, but not very satisfying, solution to the
\setupinterlinspace issue when trying to print labels using
\setuparranging[XY]. That is to explicitly set
\setupbodyfont[rm,18pt]\setupinterlinespace
once again outside the \framed directive for the specific label as in the
following MWE.

I haven't seen any answers on my other two questions from the original
post (included down below), so if anyone has any ideas, I would be most
grateful.

MWE:

\definepapersize
[Label]
[width=4in,height=3.33in]

\setuppapersize[Label][letter,portrait]

\setuppaper
[topspace=0.4688in,
backspace=0.1875in,
dx=0.1875in,
dy=0in,
nx=2,
ny=3]

\setuplayout
[topspace=0in,
backspace=0in,
margin=0in,
width=4in,
height=3.33in,
header=0in,
footer=0in]

\setuparranging[XY]

\setupframedtexts
[width=\textwidth,
height=\textheight,
alignment=center,
frame=off,
location=lohi,
alignment=center,
offset=0pt]

\setuplayout[location=middle]

\definelayer
[Label]
[width=\paperwidth,
height=\paperheight]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,48pt]
\setupinterlinespace[line=2.8ex]

\showframe

\starttext
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{Label 
1}\page
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{\definedfont[Serif
 at 18pt]\setupinterlinespace \the\baselineskip\crlf A long description label 
that needs to be have its interline spacing adjusted.}\page
Label 2\page
\setupbodyfont[rm,18pt]
\setupinterlinespace
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{ 
\the\baselineskip\crlf Another long description label that needs to be have its 
interline spacing adjusted.}\page
Label 3\page
Label 4\page
Label 5\page
Label 6\page
Label 7\page
Label 8\page
\stoptext




On 22Jun13, ntg-context-requ...@ntg.nl wrote:
 Hello,
 
 I am using Willi's MAPS 37 and the Example section from the \setuppaper 
 command:
 
 http://wiki.contextgarden.net/Command/setuppaper
 
 to print a set of labels, 2x6 configuration on U.S. Letter waterproof
 label paper.
 
 For the most part things are working well, but I have a number of questions:
 
 1.  A difference between MAPS 37 and wiki entry for \setuppaper is the
 inclusion of the following line in the later:
 
 \setuplayout[location=middle]
 
 which seems to play a significant role.  Otherwise, I cannot get the
 labels to honour the topspace and backspace specified in the setuppaper
 command.  My question is why is this significant?  What role does it
 play?  This can be tested by simply deleting the line in the MWE below.
 
 2.I would like to have every label centered, i.e.,
 \framed[alignment=center] should be set for all labels.  However,
 including it in the setupframedtexts command doesn't seem to have any
 effect as shown in the MWE down below.  Is there another way for all
 labels to inherit this alignment setting?
 
 3.  I cannot get interlinespacing to affect the line spacing even though
 the baselineskip variable is changed as shown in the MWE.
 
 advTHANKSance.
 
 

-- 

Pavneet Arora   m: 647.406.6843
Waroc Informatikt: 416.937.9276
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


  1   2   3   4   5   >