[NTG-context] \setuplist[alternative=d, margin=2em] not working on latest beta

2012-02-19 Thread Pablo Rodríguez
Hi Hans,

in the following sample, the first chapter has the correct margin on the
content list, but the second one doesn't have any margin.

\setuplist[part][alternative=b]
\setuplist[chapter][alternative=d,margin=2em]
\starttext
\completecontent
\part{Part}
\chapter{Chapter}
a
\part{Part}
\chapter{Chapter}
b
\stoptext

I'm afraid this might be a bug introduced in latest beta.

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] label in enumerations broken?

2012-02-19 Thread Andreas Mang
Dear all,

As I have learned from the mailing list, there have been some changes in the 
enumeration / description environment. Did I miss something (i.e. has there 
also been a change in how to define the labels for the description / 
enumeration?) I have attached my prefs, a minimal example and an error message.

Your help is very much appreciated.

Thanks in advance,
Andreas

%
% PREFS 
%
% ConTeXt  ver: 2012.02.18 10:50 MKIV  fmt: 2012.2.18  int: english/english
% LuaTeX, Version beta-0.70.1-2011051908 (rev 4277)

%
% MINIMAL EXAMPLE 
%
\setupenumerations%
[%
alternative=hanging,%
width=broad,%
headstyle=bold,%
titlestyle=bold,% 
]%

\defineenumeration[mydefinition]%
[text=Definition,%
style=italic,%
title=yes,%
listtext={Definition }%
]%


\starttext

% \startmydefinition WITHOUT [ref2mydef] and/or the title {The Definition}  
works fine
% note: I have added alternative instead of location as suggested in the 
mailing list
% note: I have switched the title on and off and accordingly have also removed 
The Definition

\startmydefinition[ref2mydef]{The Definition}

Let something be defined.

\stopmydefinition

\stoptext



%
% ERROR MESSAGE
%
\strc_descriptions_start_yes_reference ...e_state 
  \expandafter \strc_descrip...
\strc_descriptions_start_yes ...art_yes_reference 
  [#1]
l.21 \startmydefinition[ref2mydef]
  {The Definition}
? 
! Emergency stop.

system   tex  error on line 21 in file 
/Users/Chip/Desktop/dump/context-minimal/minimal.tex: Emergency stop


___
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] Page count of PDF file from lua

2012-02-19 Thread Marco
I can't figure out how to determine the number of pages of a PDF
file within lua. From the TeX side it works with
\getfiguredimensions

Can somebody give me a nudge in the right direction? Example:

\starttext

% Works
%\getfiguredimensions [somefile.pdf]

\startluacode
-- Does not work
context.getfiguredimensions({somefile.pdf})

local numpages = figures.get(used, pages, 0)
context(numpages)
\stopluacode

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


Re: [NTG-context] label in enumerations broken?

2012-02-19 Thread Wolfgang Schuster

Am 19.02.2012 um 14:47 schrieb Andreas Mang:

 Dear all,
 
 As I have learned from the mailing list, there have been some changes in the 
 enumeration / description environment. Did I miss something (i.e. has there 
 also been a change in how to define the labels for the description / 
 enumeration?) I have attached my prefs, a minimal example and an error 
 message.
 
 Your help is very much appreciated.
 
 Thanks in advance,
 Andreas
 
 %
 % PREFS 
 %
 % ConTeXt  ver: 2012.02.18 10:50 MKIV  fmt: 2012.2.18  int: english/english
 % LuaTeX, Version beta-0.70.1-2011051908 (rev 4277)
 
 %
 % MINIMAL EXAMPLE 
 %
 \setupenumerations%
 [%
 alternative=hanging,%
 width=broad,%
 headstyle=bold,%
 titlestyle=bold,% 
 ]%
 
 \defineenumeration[mydefinition]%
 [text=Definition,%
 style=italic,%
 title=yes,%
 listtext={Definition }%
 ]%

There is no need for all these comments.

 \starttext
 
 % \startmydefinition WITHOUT [ref2mydef] and/or the title {The 
 Definition}  works fine
 % note: I have added alternative instead of location as suggested in the 
 mailing list
 % note: I have switched the title on and off and accordingly have also 
 removed The Definition
 
 \startmydefinition[ref2mydef]{The Definition}

You can now write this as “\startmydefinition[reference=ref2mydef,title=The 
Definition]”

 Let something be defined.
 
 \stopmydefinition
 
 \stoptext

strc-enu.mkvi (move \donothing before 
\strc_enumerations_inject_extra_text_indeed):

\unexpanded\def\strc_enumerations_inject_extra_text
  {\ifconditional\c_strc_constructions_title_state
 
\ctxcommand{doiflisthastitleelse(\currentconstructionmain,\currentconstructionlistentry)}
+ \donothing
   \strc_enumerations_inject_extra_text_indeed
- \donothing
   \fi}

strc-des.mkvi:

\unexpanded\def\strc_descriptions_start_yes_reference
+ {\ifconditional\c_strc_constructions_title_state
- {\ifconditional\c_strc_descriptions_title_state
 \expandafter\strc_descriptions_start_yes_titled
   \else
 \expandafter\strc_descriptions_start_yes_normal
   \fi}

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] line numbers or margin data in headers

2012-02-19 Thread Pablo Rodríguez
Hi there,

I'm trying to get a feature similar to those headers that display the
first and last entry on a give page.

I would like to do the same with line numbers on pages, which is
especially useful for poetry.

How could i change this in the following sample?

\setupheadertexts[line--numbers]
\starttext
\startlinenumbering
\dorecurse{50}{\input knuth\par}
\stoplinenumbering
\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
___


[NTG-context] bug with \definepagebreak in latest beta?

2012-02-19 Thread Pablo Rodríguez
Hans,

truly empty pages before parts and chapters (as explained at
http://wiki.contextgarden.net/Titles#Truly_empty_pagebreak_before_chapters
 worked with the previous beta (and in stable), but they don't work with
the latest one:

\definepagebreak[numberpagebreak][yes,header,footer,right]
\setuphead[part][page=numberpagebreak,placehead=yes]
\setuphead[chapter][page=numberpagebreak]
\setuppagenumbering[alternative=doublesided,location=inmargin]
\starttext
\completecontent
\part{Part}
\chapter{Chapter}
a
\part{Part}
\chapter{Chapter}
b
\stoptext

Has been \definepagebreak replaced with a new command or is this a 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
___


Re: [NTG-context] bug with \definepagebreak in latest beta?

2012-02-19 Thread Wolfgang Schuster

Am 19.02.2012 um 21:29 schrieb Pablo Rodríguez:

 Hans,
 
 truly empty pages before parts and chapters (as explained at
 http://wiki.contextgarden.net/Titles#Truly_empty_pagebreak_before_chapters
 worked with the previous beta (and in stable), but they don't work with
 the latest one:
 
 \definepagebreak[numberpagebreak][yes,header,footer,right]
 \setuphead[part][page=numberpagebreak,placehead=yes]
 \setuphead[chapter][page=numberpagebreak]
 \setuppagenumbering[alternative=doublesided,location=inmargin]
 \starttext
 \completecontent
 \part{Part}
 \chapter{Chapter}
 a
 \part{Part}
 \chapter{Chapter}
 b
 \stoptext
 
 Has been \definepagebreak replaced with a new command or is this a bug?

page-txt.mkvi:

\installpagebreakmethod \v!header
- 
{\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\c!state=\v!empty]}}
+ 
{\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\v!header][\c!state=\v!empty]}}

\installpagebreakmethod \v!footer
- 
{\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\c!state=\v!empty]}}
+ 
{\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\v!footer][\c!state=\v!empty]}}

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 with \definepagebreak in latest beta?

2012-02-19 Thread Pablo Rodríguez
On 02/19/2012 09:39 PM, Wolfgang Schuster wrote:
 Am 19.02.2012 um 21:29 schrieb Pablo Rodríguez:
 [...]
 Has been \definepagebreak replaced with a new command or is this a bug?
 
 page-txt.mkvi:
 
 \installpagebreakmethod \v!header
 - 
 {\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\c!state=\v!empty]}}
 + 
 {\doifnot{\namedlayoutelementparameter\v!header\c!state}\v!stop{\setuplayoutelement[\v!header][\c!state=\v!empty]}}
 
 \installpagebreakmethod \v!footer
 - 
 {\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\c!state=\v!empty]}}
 + 
 {\doifnot{\namedlayoutelementparameter\v!footer\c!state}\v!stop{\setuplayoutelement[\v!footer][\c!state=\v!empty]}}

Many thanks for your ultra-fast fix, Wolfgang.


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] \setuplist[alternative=g] bug with interactive document

2012-02-19 Thread Pablo Rodríguez
Hi Wolfgang,

I have a with \setuplist[alternative=g] in an interactive document.

Here you have the minimal sample:

\setupinteraction[state=start]
\setupcombinedlist[content][interaction=all]
\setuplist[part][alternative=g]
\setuplist[chapter][alternative=d]
\starttext
\completecontent
\part{part}
\chapter{chapter}
\part{part}
\stoptext

The second \part should start a new line. I now that you told me that I
was misusing “alternative=g”, because it was meant for interactive
documents (but this is exactly what I have).

Sorry, but since I got no reply, I'm still wondering whether this is a
bug or an illegitimate use of “alternative=g”.

Would you be so kind to explain what is wrong 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] closesymbol in enumeration broken?

2012-02-19 Thread Andreas Mang
Hi everybody,

I might have spotted a problem related to enumerations. The minimal example 
below results in the given error message. It works without the closesymbol 
option.

Thanks for your help.

Cheers,
Andreas 

% ### MINIMAL EXAMPLE ###  (ConTeXt  ver: 2012.02.18 10:50 MKIV  fmt: 2012.2.19)

\defineenumeration[myproof][text=Proof,closesymbol={\mathematics{\square}}]

\starttext

\startmyproof
This is a proof
\stopmyproof

\stoptext

% ###


% ### ERROR MESSAGE 

to be read again 
   \normalstartimath 
\mathematics ...ifmmode #1\else \normalstartimath 
  #1\normalstopimath \fi 
\strc_constructions_close_symbol_place ...esymbol 
  \fi \fi 
\140construction ...tructions_close_symbol_place 
  \doifnot {\constructionpar...
\140enumeration ...er \v!construction \endcsname 
  \endgroup 
l.5 \stopmyproof

% ###

___
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] closesymbol in enumeration broken?

2012-02-19 Thread Wolfgang Schuster

Am 19.02.2012 um 23:22 schrieb Andreas Mang:

 Hi everybody,
 
 I might have spotted a problem related to enumerations. The minimal example 
 below results in the given error message. It works without the closesymbol 
 option.
 
 Thanks for your help.
 
 Cheers,
 Andreas 
 
 % ### MINIMAL EXAMPLE ###  (ConTeXt  ver: 2012.02.18 10:50 MKIV  fmt: 
 2012.2.19)
 
 \defineenumeration[myproof][text=Proof,closesymbol={\mathematics{\square}}]
 
 \starttext
 
 \startmyproof
 This is a proof
 \stopmyproof
 
 \stoptext

strc-con.mkvi:

\def\strc_constructions_close_symbol_place
  {\ifconditional\csname\??constructionclosesymbol\currentconstruction\endcsname
 
\global\expandafter\setfalse\csname\??constructionclosesymbol\currentconstruction\endcsname
 \edef\p_closesymbol{\constructionparameter\c!closesymbol}%
 \ifx\p_closesymbol\empty \else
-  \constructionparameter\c!closecommand\p_closesymbol
+  \constructionparameter\c!closecommand{\p_closesymbol}%
 \fi
   \fi}

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] Layout: odd, even and newLayout

2012-02-19 Thread Jan Heinen

Hi,

no answer to my question?
To easy or to difficult? Please see above.

Isn't it possible to define individual layouts when using 
the default layouts like odd and even?


Regards
Jannis

= Copy

I first want to use layouts for odd and even pages
and then I want to use a newLayout
but it does not work:


\setuppapersize[A5][A4]
\setuppagenumbering[alternative=doublesided,  location=inleft]
\setuplayout [marking=on, location=middle]
\showframe

\definelayout [odd][topspace=5cm,backspace=0cm]
\definelayout [even][topspace=0cm,backspace=0cm]
\definelayout [newLayout] [topspace=2cm,backspace=10cm]

\starttext
\dorecurse{10}{\input tufte}
\page

\setuplayout [newLayout] % Now backspace must be 10cm, but 
it is still 0cm


\dorecurse{10}{\input tufte}
\page
\stoptext



Regards
Jannis


___
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] notes changes

2012-02-19 Thread Peter Park Nelson
Seems like an on/off option would be cleaner.

On Sat, Feb 18, 2012 at 12:01 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 17.02.2012 um 16:40 schrieb Steffen Wolfrum:

 Hi,

 with current beta I get an interesting symbol in cases when my footnotetext 
 doesn't fit on the same page as its marker:

 PastedGraphic-2.pdf

 Nice! But how can I switch it off?

 \setupnote[symbolcommand=\gobbleoneargument]

 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
 ___



-- 
Peter Park Nelson
peter.park.nel...@gmail.com
___
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
___