Re: [NTG-context] Error with alternative (interactive) TOC

2014-10-10 Thread Wolfgang Schuster

Am 09.10.2014 um 20:24 schrieb Thangalin thanga...@gmail.com:

 Hi,
 
 How do you make a custom TOC entry that links to the correct page?
 
 In the following example, the last TOC item is not hyperlinked, and
 all the section hyperlinks are incorrect (off by one). Note that the
 chapters and sections are separate pages.

You’re wrong, there are links for all section entries but the area for the 
hyperlinks
are shifted upwards by half a line, it’s easier to notice when you increase the 
space
between the entries.

\setupinteraction[state=start]
\setuphead[section][page=yes,continue=no]

\define[3]\SectionTOC{\ruledhbox{#3 #2}}

\setuplist
  [section]
  [alternative=interactive,
   command=\SectionTOC,
   before={\blank[2*line]}]

\starttext

\placecontent

\chapter[title=Chapter]

\dorecurse{4}
  {\section{Section}
   Level \recurselevel.}

\stoptext


This problem can be fixed by adding \noindent in front of the \hbox command in 
the defintion
of the interactive alternative, i.e.

\startsetups[\??listrenderings:interactive]
   \edef\p_command{\listalternativeparameter\c!command}%
   \ifx\p_command\empty
   [\currentlist: \currentlistentrynumber\space -- 
\currentlistentrytitle\space -- \currentlistentrypagenumber]%
   \else
   \listparameter\c!before
-  \hbox \strc_lists_get_reference_attribute\v!all 
\strc_lists_get_destination_attribute {
+  \noindent\hbox \strc_lists_get_reference_attribute\v!all 
\strc_lists_get_destination_attribute {
   
\p_command\currentlistentrynumber\currentlistentrytitle\currentlistentrypagenumber
   }
   \listparameter\c!after
   \fi
\stopsetups

but to ensure all entries all placed below each other you have to set 
before=\endgraf“ with \setuplist.


BTW: The vertical“ list alternative has the same problem with the wrong area 
for the hyperlink.

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] Error with alternative (interactive) TOC

2014-10-10 Thread Thangalin
Thank you, Wolfgang.

This fixes the issue. I worry, though, that these types of solutions
are a bit brittle. If the interactive alternative definition changes,
then the TOC code could break.

If the definition in strc-lst.mkvi were to change to something like:

% Perform a half-line adjustment in some cases
\listparameter\c!indent\hbox \strc_lists_get_reference_attribute\v!all
\strc_lists_get_destination_attribute {

Then the usage would look like:

\setuplist[section,][
  alternative=interactive,
  indent=\noindent,
  before=\endgraf,
]

That would leave a clue for maintenance purposes, making the overall
code less brittle.

Thoughts?
___
If your question is of interest to others as well, please add an 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] Error with alternative (interactive) TOC

2014-10-10 Thread Hans Hagen

On 10/10/2014 8:04 PM, Thangalin wrote:

Thank you, Wolfgang.

This fixes the issue. I worry, though, that these types of solutions
are a bit brittle. If the interactive alternative definition changes,
then the TOC code could break.

If the definition in strc-lst.mkvi were to change to something like:

% Perform a half-line adjustment in some cases
\listparameter\c!indent\hbox \strc_lists_get_reference_attribute\v!all
\strc_lists_get_destination_attribute {

Then the usage would look like:

\setuplist[section,][
   alternative=interactive,
   indent=\noindent,
   before=\endgraf,
]

That would leave a clue for maintenance purposes, making the overall
code less brittle.

Thoughts?


as soon as you need to mess at that level it's easier to just write a 
proper specific setup than to configure 20 something things for a 10 
line setup ...


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] Error with alternative (interactive) TOC

2014-10-09 Thread Thangalin
Hi,

How do you make a custom TOC entry that links to the correct page?

In the following example, the last TOC item is not hyperlinked, and
all the section hyperlinks are incorrect (off by one). Note that the
chapters and sections are separate pages.

\setupinteraction[state=start,]
\setuphead[chapter,section][page=yes,continue=no,]

\define[3]\SectionTOC{#3 #2}

% Using alternative causes the cross-reference to be off-by-one.
\setuplist[section][
  alternative=interactive,
  command=\SectionTOC,
]

\starttext
  \placecontent

  \startchapter[title=Chapter]
\dorecurse{4}{
  \startsection[title=Section]
Level \recurselevel.
  \stopsection
}
  \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
___

Re: [NTG-context] whitespace in \setuplist[chapter]

2014-10-05 Thread Pablo Rodriguez
On 10/05/2014 02:59 AM, Thangalin wrote:
 Try:
 
 \setuplist[chapter][before={\blank[4*big]}]

Many thanks for your reply, Thangalin.

I completely forgot the before option. Of course that was the right way
to set the separation between chapter entries in the TOC.

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] whitespace in \setuplist[chapter]

2014-10-04 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startsetups[setups:chapterlist]
  \setupwhitespace[10*big]
\stopsetups
\setuplist[chapter][setups=setups:chapterlist]
\starttext
\completecontent
\dorecurse{50}{\chapter{My Chapter}}
\stoptext

I thought that setups were the right way to setup whitespace in TOC, but
it doesn’t seem to work.

Which is the right way to do it?

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] whitespace in \setuplist[chapter]

2014-10-04 Thread Thangalin
Try:

\setuplist[chapter][
  before={\blank[4*big]}
]

\starttext
  \completecontent
  \dorecurse{50}{\chapter{My Chapter}}
\stoptext

See also:

http://wiki.contextgarden.net/Command/setuplist
http://tex.stackexchange.com/questions/89758/
___
If your question is of interest to others as well, please add an 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] Generate Authorlist example fails, was Re: authors in the toc

2014-10-03 Thread Rik Kabel

On 2014-10-02 15:22, Wolfgang Schuster wrote:


Am 02.10.2014 um 19:42 schrieb Rik Kabel cont...@rik.users.panix.com 
mailto:cont...@rik.users.panix.com:



On 2014-10-02 05:18, Wolfgang Schuster wrote:
There is a example on the wiki. You have to set your own values with 
the second argument of the \startchapter etc. command, to display 
the entry in the roc you have to write your own layout where you 
access it with the \structurelistuservariable command.


http://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content

Wolfgang

This example fails for me using the current (2014-09-27) standalone 
beta and with TL14. The failure is that the list of authors is 
presented as a grid without contents.


Changing any of the lines in the example that construct the table 
cells, such as


\bTD \structureuservariable{author} \eTD

to

\bTD xx \structureuservariable{author} \eTD

results in a table with the new text, but no user variable text, 
showing that the \structureuservariable commands are not returning 
any text in this example.


Has something relevant changed since the example was prepared 
(2010-11 or earlier)?


(A pointer to useful descriptions of \structureuservariable and 
\structurelistuservariable would also be welcome. In the wiki, the 
startsection command description describes the former, but I have 
come across no comprehensive description for either in the 
documentation.)


First you have to make a distinction between the values which are set 
with the first and second argument of \startchapter, \startsection 
etc.  While the first argument takes only certain keys, e.g. title, 
bookmark etc. you’re free to choose your own keys for the second 
argument because they are considered userdata.  The point of this 
userdata is to give users a way to specify information which are 
printed in the table of content or in the header, to access these 
values context provides two commands.  When you create a new layout 
for the table of contents you can use the \structurelistuservariable 
command which takes the name of the key with the information as 
argument and when you create a new header layout you can use the 
\structureuservariable command.



\define[3]\ChapterListCommand
  {\starttabulate
   \NC Number \NC #1 \NC\NR
   \NC Title  \NC #2 \NC\NR
   \NC Page   \NC #3 \NC\NR
   \TB[medium]
   \NC File   \NC \structurelistuservariable{file} \NC\NR
   \stoptabulate}

\setuplist[chapter][alternative=command,command=\ChapterListCommand]

\define[2]\ChapterHeadCommand
  {\startframed[align=flushleft,strut=no]
 \starttabulate[before=,after=]
 \NC Number \NC #1 \NC\NR
 \NC Title  \NC #2 \NC\NR
 \TB[medium]
 \NC File   \NC \structureuservariable{file} \NC\NR
 \stoptabulate
   \stopframed}

\setuphead[chapter][command=\ChapterHeadCommand]

\starttext

\completecontent

\startchapter[title=Knuth example][file=knuth.tex]
\input knuth
\stopchapter

\startchapter[title=Zapf example][file=zapf.tex]
\input zapf
\stopchapter

\stoptext

Wolfgang


Thank you, Wolfgang, for that explanation.

Can you suggest what might be wrong with the example at 
http://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content?


The list of authors is created, so the user variable 'author' is set at 
for \doifsomething. When the index for the author list is set to a 
constant, only one row is generated, but when it is the user variable 
'name' the right number of rows is created, so 'name' is also set when 
it is referenced as the key in the author list sorting macro. Each line 
of the table is empty, suggesting that within the scope of the table the 
user variables are reset to nil. The same problem exists when 
\starttabulate is used instead of \bTABLE.


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

Re: [NTG-context] Influencing the vertical spacing of the table of contents? No possible?

2014-10-02 Thread Wolfgang Schuster

Am 28.09.2014 um 15:17 schrieb Gerben Wierda gerben.wie...@rna.nl:

 I asked this on the list a while back. Is there no answer on this one? I use 
 \startpacked\stoppacked with some effect, but I'd like to have more 
 finegrained control.
 
 Original question:
 
 I'm using mkii.
 
 I've got a table of contents that just places one item on the next page, 
 which is ugly. I'd like to tweak the spacing between lines, but which 
 parameter do I have to adjust? It wasn't clear to me from the docs.

You can use the before and after keys for \setuplist to set your own values for 
spaces before and after each entry, e.g.

  \setuplist[chapter][before={\blank[big]},after={\blank[medium]}]

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] authors in the toc

2014-10-02 Thread Wolfgang Schuster

Am 02.10.2014 um 19:42 schrieb Rik Kabel cont...@rik.users.panix.com:

 On 2014-10-02 05:18, Wolfgang Schuster wrote:
 There is a example on the wiki. You have to set your own values with the 
 second argument of the \startchapter etc. command, to display the entry in 
 the roc you have to write your own layout where you access it with the 
 \structurelistuservariable command.
 
 http://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content
 
 Wolfgang
 
 This example fails for me using the current (2014-09-27) standalone beta and 
 with TL14. The failure is that the list of authors is presented as a grid 
 without contents.
 
 Changing any of the lines in the example that construct the table cells, such 
 as
 \bTD \structureuservariable{author} \eTD
 to
 \bTD xx \structureuservariable{author} \eTD
 results in a table with the new text, but no user variable text, showing that 
 the \structureuservariable commands are not returning any text in this 
 example.
 
 Has something relevant changed since the example was prepared (2010-11 or 
 earlier)?
 
 (A pointer to useful descriptions of \structureuservariable and 
 \structurelistuservariable would also be welcome. In the wiki, the 
 startsection command description describes the former, but I have come across 
 no comprehensive description for either in the documentation.)

First you have to make a distinction between the values which are set with the 
first and second argument of \startchapter, \startsection etc.  While the first 
argument takes only certain keys, e.g. title, bookmark etc. you’re free to 
choose your own keys for the second argument because they are considered 
userdata.  The point of this userdata is to give users a way to specify 
information which are printed in the table of content or in the header, to 
access these values context provides two commands.  When you create a new 
layout for the table of contents you can use the \structurelistuservariable 
command which takes the name of the key with the information as argument and 
when you create a new header layout you can use the \structureuservariable 
command.


\define[3]\ChapterListCommand
  {\starttabulate
   \NC Number \NC #1 \NC\NR
   \NC Title  \NC #2 \NC\NR
   \NC Page   \NC #3 \NC\NR
   \TB[medium]
   \NC File   \NC \structurelistuservariable{file} \NC\NR
   \stoptabulate}

\setuplist[chapter][alternative=command,command=\ChapterListCommand]

\define[2]\ChapterHeadCommand
  {\startframed[align=flushleft,strut=no]
 \starttabulate[before=,after=]
 \NC Number \NC #1 \NC\NR
 \NC Title  \NC #2 \NC\NR
 \TB[medium]
 \NC File   \NC \structureuservariable{file} \NC\NR
 \stoptabulate
   \stopframed}

\setuphead[chapter][command=\ChapterHeadCommand]

\starttext

\completecontent

\startchapter[title=Knuth example][file=knuth.tex]
\input knuth
\stopchapter

\startchapter[title=Zapf example][file=zapf.tex]
\input zapf
\stopchapter

\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] Chapter precis

2014-08-28 Thread Wolfgang Schuster

Am 28.08.2014 um 17:46 schrieb Werner Hintze w.hin...@posteo.eu:

 Yes. I did. Before and now.
 
 But I think, writebetweenlist is not what I’m looking for. I try now with 
 \writetolist[section] and to give the section list the desired format. That 
 seems not easy, because the text now runs on the whole line, this means also 
 in the region, where the page numbers are. It should terminate before, where 
 the line of dots terminates or so. I see no parameter for this width seems ti 
 be not the right one (it seems, width has no visible effect at all).
 
You can use the maxwidth key to set a limit for the width of the list entry.

\definelist[chaptertext]
%\setuplist [chaptertext][maxwidth=8cm]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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] Chapter precis

2014-08-28 Thread Werner Hintze
Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I 
get just one truncated line of the text. But I’d like to have all the 
text, somewhat indented on both sides, but not truncated.


But why is the text without maxwidth indented on the right?

Werner

On 28 Aug 2014, at 17:57, Wolfgang Schuster wrote:


Am 28.08.2014 um 17:46 schrieb Werner Hintze w.hin...@posteo.eu:


Yes. I did. Before and now.

But I think, writebetweenlist is not what I’m looking for. I try 
now with \writetolist[section] and to give the section list the 
desired format. That seems not easy, because the text now runs on the 
whole line, this means also in the region, where the page numbers 
are. It should terminate before, where the line of dots terminates or 
so. I see no parameter for this width seems ti be not the right one 
(it seems, width has no visible effect at all).


You can use the maxwidth key to set a limit for the width of the list 
entry.


\definelist[chaptertext]
%\setuplist [chaptertext][maxwidth=8cm]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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] Chapter precis

2014-08-28 Thread Wolfgang Schuster

Am 28.08.2014 um 18:17 schrieb Werner Hintze w.hin...@posteo.eu:

 Sorry. I don’t understand. If I use maxwidth (line 2 without the %), I get 
 just one truncated line of the text. But I’d like to have all the text, 
 somewhat indented on both sides, but not truncated.
 
 But why is the text without maxwidth indented on the right?
 
When you enable the pagenumber context puts some space between the number and 
the text.

\definelist[chaptertext]
\setuplist [chaptertext][margin=2em,pagecommand=\gobbleoneargument]
%\setuplist [chaptertext][margin=2em,pagenumber=no]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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] Chapter precis

2014-08-28 Thread Werner Hintze
Aha. I see. So it may work. But I just recalled how to achieve the same 
result with Latex and Memoir... And I decided to sleep one night and if 
then my feeling ist the same as now, I'll turn back to Latex. I’m too 
stupid for such a complicated tool as ConTeXt. I know that it is much 
better als Latex, but I don’t understand it. It’s now a year that I 
use it frequently and I have the impression that I made not a single 
step forward.


Let’s see what the morning brings and says ;)

Thank you all for all your help!

Werner

On 28 Aug 2014, at 18:53, Wolfgang Schuster wrote:


Am 28.08.2014 um 18:17 schrieb Werner Hintze w.hin...@posteo.eu:

Sorry. I don’t understand. If I use maxwidth (line 2 without the 
%), I get just one truncated line of the text. But I’d like to have 
all the text, somewhat indented on both sides, but not truncated.


But why is the text without maxwidth indented on the right?

When you enable the pagenumber context puts some space between the 
number and the text.


\definelist[chaptertext]
\setuplist [chaptertext][margin=2em,pagecommand=\gobbleoneargument]
%\setuplist [chaptertext][margin=2em,pagenumber=no]

\starttext

\placelist[chapter,chaptertext]

\chapter{This is a chapter}

\writetolist[chaptertext]{}{\input ward }

\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] bug with \setuplist?

2014-06-08 Thread Pablo Rodriguez
On 06/07/2014 10:57 PM, Hans Hagen wrote:
 On 6/7/2014 8:41 PM, Pablo Rodriguez wrote:
 [...]
 AFAIK, no \part could be the last line of a page in the contents.

 Well, I’m afraid this isn’t the case.

 Could anyone confirm whether I am doing something wrong or this is bug?
 
 \setuplist
[chapter]
[before=\blank] % is 'preference,big' by default

Many thanks for your reply, Hans.

It works fine.

 maybe some day i can make this better but it needs a bit of work 
 (working around some tex specific trickery)

I’d rather have right page breaks with sectioning commands and other
features as well first.

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 \setuplist?

2014-06-07 Thread Pablo Rodriguez
Dear list,

sorry for posting this issue twice, but I wonder whether it went
unnoticed because I added it in an answer to an already replied message.

I have the following sample:

\setuppapersize[A6]
\setuplist[part][after={\blank[samepage,big]}]
\starttext
\completecontent
\dorecurse{4}{\part{Part}
\chapter{Chapter}
\chapter{Chapter}}
\stoptext

AFAIK, no \part could be the last line of a page in the contents.

Well, I’m afraid this isn’t the case.

Could anyone confirm whether I am doing something wrong or this is 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 \setuplist?

2014-06-07 Thread Hans Hagen

On 6/7/2014 8:41 PM, Pablo Rodriguez wrote:

Dear list,

sorry for posting this issue twice, but I wonder whether it went
unnoticed because I added it in an answer to an already replied message.

I have the following sample:

 \setuppapersize[A6]
 \setuplist[part][after={\blank[samepage,big]}]
 \starttext
 \completecontent
 \dorecurse{4}{\part{Part}
 \chapter{Chapter}
 \chapter{Chapter}}
 \stoptext

AFAIK, no \part could be the last line of a page in the contents.

Well, I’m afraid this isn’t the case.

Could anyone confirm whether I am doing something wrong or this is bug?


\setuppapersize
  [A6]

\setuplist
  [part]
  [after={\blank[samepage,big]}]

\setuplist
  [chapter]
  [before=\blank] % is 'preference,big' by default

\starttext

\completecontent

\dorecurse {4} {
\part{Part}
\chapter{Chapter}
\chapter{Chapter}}
}

\stoptext


Many thanks for your help,


maybe some day i can make this better but it needs a bit of work 
(working around some tex specific trickery)


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
___


Re: [NTG-context] bug with \setuplist[part][after={\blank[samepage, big]}]

2014-06-06 Thread Pablo Rodriguez
On 06/05/2014 06:56 PM, Hans Hagen wrote:
 On 6/5/2014 6:02 PM, Pablo Rodriguez wrote:
 I don’t have a minimal sample (yet), but I have added the command above
 to force part titles in contents to be with the next part title.

 Well, the contents take five pages and two of them finish with a part title.

 Am I missing something or is this a bug? And if it were a bug, would it
 be related to wrong page breaks with titles?
 
 no, more with before/after settings in the list setup (that you can 
 change per section)

Hans,

this is the minimal sample:

\setuppapersize[A6]
\setuplist[part][after={\blank[samepage,big]}]
\starttext
\completecontent
\dorecurse{4}{\part{Part}
\chapter{Chapter}
\chapter{Chapter}}
\stoptext

Is this a real bug or am i missing something?

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] standard setup values for titles in heads and lists?

2014-06-05 Thread Pablo Rodriguez
On 06/04/2014 10:50 PM, Wolfgang Schuster wrote:
 Am 04.06.2014 um 21:34 schrieb Pablo Rodriguez:
 Dear list,

 where in the source can I find the standard configuration for titles in
 heads and lists?

 I have looked at strc-lst.mkvi, but there I couldn’t find anything about
 the default configuration values for any sectioning command.
 
 The file strc-lst.mkvi contains the code for \setuplist and \placelist command
 but the default settings for chapter, section etc. entries are set in 
 strc-def.mkiv.

Many thanks for your reply, Wolfgang.

This is exactly what I was looking for.


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 \setuplist[part][after={\blank[samepage, big]}]

2014-06-05 Thread Pablo Rodriguez
Dear list,

I don’t have a minimal sample (yet), but I have added the command above
to force part titles in contents to be with the next part title.

Well, the contents take five pages and two of them finish with a part title.

Am I missing something or is this a bug? And if it were a bug, would it
be related to wrong page breaks with titles?

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 \setuplist[part][after={\blank[samepage, big]}]

2014-06-05 Thread Hans Hagen

On 6/5/2014 6:02 PM, Pablo Rodriguez wrote:

Dear list,

I don’t have a minimal sample (yet), but I have added the command above
to force part titles in contents to be with the next part title.

Well, the contents take five pages and two of them finish with a part title.

Am I missing something or is this a bug? And if it were a bug, would it
be related to wrong page breaks with titles?


no, more with before/after settings in the list setup (that you can 
change per section)


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
___


Re: [NTG-context] standard setup values for titles in heads and lists?

2014-06-04 Thread Wolfgang Schuster

Am 04.06.2014 um 21:34 schrieb Pablo Rodriguez oi...@gmx.es:

 Dear list,
 
 where in the source can I find the standard configuration for titles in
 heads and lists?
 
 I have looked at strc-lst.mkvi, but there I couldn’t find anything about
 the default configuration values for any sectioning command.

The file strc-lst.mkvi contains the code for \setuplist and \placelist command
but the default settings for chapter, section etc. entries are set in 
strc-def.mkiv.

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] \setuplist ignores width=dim in combination with headnumber=no

2014-05-23 Thread Mojca Miklavec
Hi,

I would like to remove header numbers for subsections, but keep
subsections properly aligned in the table of contents. However, the
width= parameter seems to be completely ignored in that case.

Here's a nearly-minimal example:

\setuplist[section][width=10mm,style=bold]
\setuplist[subsection][width=15mm,headnumber=no]
\setuplist[subsubsection][width=20mm,style=slanted,pagestyle=normal]

\starttext

\completecontent
\page[yes]

\section{First section}
\subsection{First subsection}
\subsubsection{First subsubsection}
\subsubsubsection{First subsubsubsection}
\section{Second section}
\subsection{Second subsection}
\subsubsection{Second subsubsection}
\subsubsubsection{Second subsubsubsection}
\stoptext

The example has been adapted from
http://wiki.contextgarden.net/Table_of_Contents. The image on the wiki
seems ok, but I get a different result if I try to run the same
example with the latest version of ConTeXt (mkiv).

Somewhat related: say that I wanted to setup
\setuplist[name][width=10mm]
for all the sections and sub(subsub)sections. The documentation seems
to suggest that \placecontent[aligntitle=yes/no,width=10mm] should do
that (it's not clear to me whether that's yes or no that should do
it), but it doesn't seem to have any effect at all.

Mojca
___
If your question is of interest to others as well, please add an 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] \setuplist ignores width=dim in combination with headnumber=no

2014-05-23 Thread Wolfgang Schuster

Am 23.05.2014 um 13:08 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com:

 Hi,
 
 I would like to remove header numbers for subsections, but keep
 subsections properly aligned in the table of contents. However, the
 width= parameter seems to be completely ignored in that case.
 
 Here's a nearly-minimal example:
 
 \setuplist[section][width=10mm,style=bold]
 \setuplist[subsection][width=15mm,headnumber=no]

\setuplist[subsection][distance=20mm,headnumber=no]

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] \setuplist ignores width=dim in combination with headnumber=no

2014-05-23 Thread Mojca Miklavec
On Fri, May 23, 2014 at 2:39 PM, Wolfgang Schuster wrote:
 Am 23.05.2014 um 13:08 schrieb Mojca Miklavec wrote:

 I would like to remove header numbers for subsections, but keep
 subsections properly aligned in the table of contents. However, the
 width= parameter seems to be completely ignored in that case.

 Here's a nearly-minimal example:

 \setuplist[section][width=10mm,style=bold]
 \setuplist[subsection][width=15mm,headnumber=no]

 \setuplist[subsection][distance=20mm,headnumber=no]

Dear Wolfgang,

Perfect, thank you, it works.


Even though I still don't understand why width wouldn't give the
desired result. The keyword distance= seems to be the distance
between the right edge of section number and the left edge of section
title, while width= seems to be the distance between the left edge
of section number and section title. (If width0, distance is just
added to width.)

I don't understand why no head number nullifies width.

Mojca
___
If your question is of interest to others as well, please add an 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] setuppage is ignored

2014-05-07 Thread Thomas Möbius
Dear list,

it seems as if \setupnumber is ignored or I am using the wrong way to
reset the page numbering.

How to start the page numbering at 1 in the bodymatter?

---minimal exampe---

\setuppapersize[A5]

\setuppagenumbering[start=start,alternative=doublesided,location=]

\setupheader[style=small]
\setupheadertexts
  [{\getmarking[sectionnumber]~\getmarking[section]}]
  [pagenumber]
  [pagenumber]
  [{\getmarking[chapternumber]~\getmarking[chapter]}]

\setuphead[chapter][page={yes,right},header=empty,textstyle=\tfc]

\definehead [intro] [chapter]
\setuphead  [intro] [number=no]

\definecombinedlist [content][intro,chapter,section]
\setuplist  [intro] [headnumber=no]

\starttext
\startfrontmatter
\setuppagenumber[numberconversion=romannumerals,state=start,number=1]
%\setupnumber[page][1]
\completecontent
\intro{No number}
\input knuth
\input knuth
\input knuth
\stopfrontmatter

\startbodymatter
\setuppagenumber[numberconversion=numbers,state=start,number=1]
%\setupnumber[page][1]
\chapter{Has number}
\input knuth
\input knuth
\input knuth
\chapter{Has number}
\input knuth
\input knuth
\input knuth
\chapter{Has number}
\input knuth
\input knuth
\input knuth
\stopbodymatter
\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] Getting the current chapter number in the TOC

2014-04-17 Thread Maggyero
Hello,


How can I get the following table of contents?


Contents

Chapter first MyTitle
Chapter II MyTitle
Chapter III MyTitle


I have tried:

\MyNumber{\doifelse{\currentsectioncountervalue}{1}{first}{#1}}
setuplist[chapter][numbercommand=\MyNumber]

but it does not work. Actually because \currentsectioncountervalue always
returns 0 in the table of contents. So I need another command which gives
me the current number for testing if it is equal to one (first chapter).


Thank you in advance.
___
If your question is of interest to others as well, please add an 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] Getting the current chapter number in the TOC

2014-04-17 Thread Wolfgang Schuster

Am 17.04.2014 um 17:27 schrieb Maggyero maggy...@gmail.com:

 Hello,
 
 
 How can I get the following table of contents?
 
 
 Contents
 
 Chapter first MyTitle
 Chapter II MyTitle
 Chapter III MyTitle
 
 
 I have tried:
 
 \MyNumber{\doifelse{\currentsectioncountervalue}{1}{first}{#1}}
 setuplist[chapter][numbercommand=\MyNumber]
 
 but it does not work. Actually because \currentsectioncountervalue always 
 returns 0 in the table of contents. So I need another command which gives me 
 the current number for testing if it is equal to one (first chapter).

\define[1]\Weirdnumber
  {\ifcase#1\relax
 % 0
   \or
 First% 1
   \else
 \convertnumber{Romannumerals}{#1}%
   \fi}

\defineconversion[Weirdnumber][\Weirdnumber]

\defineconversionset[Weirdchapter][number,Weirdnumber][number]

\setuplist[chapter][width=3em,numberconversionset=Weirdchapter]

\starttext

\completecontent

\dorecurse{10}{\expanded{\chapter{Chapter \recurselevel}}}

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


[NTG-context] Problems with XML and table of contents

2014-03-27 Thread Xan
Hi,

I have this:

\definehead [Fitxa] [subsubject]
\setuphead 
[Fitxa][textstyle=sca,align=normal,color=headingcolor,before={},ownnumber=yes,incrementnumber=yes,number=no,strut=no]
\setuplabeltext [Fitxa=Fitxa]
\setuplist[Fitxa] [margin=4em,interaction=text,color=green,textcommand=\WORD]
%\setuplist [Fitxa] [width=2em,criterium=all,interaction=all]

\newcounter\FitxaNumber

\def\fitxa#1%
{\doglobal\increment\FitxaNumber
\Fitxa{\FitxaNumber}{#1}}


\setupcombinedlist[content][list={chapter,section,subsection,Fitxa,tasca},interaction=all,textcolor=black]


and

\startxmlsetups xml:demo:titol
  \fitxa{\xmltext{#1}{/}}
\stopxmlsetups


In the document all is ok, but in the table of contents, I get phantom 
content.

Any clue?

Thanks in advance,
Xan
___
If your question is of interest to others as well, please add an 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] Problems with XML and table of contents

2014-03-27 Thread Hans Hagen

On 3/27/2014 11:55 AM, Xan wrote:

Hi,

I have this:

\definehead [Fitxa] [subsubject]
\setuphead 
[Fitxa][textstyle=sca,align=normal,color=headingcolor,before={},ownnumber=yes,incrementnumber=yes,number=no,strut=no]
\setuplabeltext [Fitxa=Fitxa]
\setuplist[Fitxa] [margin=4em,interaction=text,color=green,textcommand=\WORD]
%\setuplist [Fitxa] [width=2em,criterium=all,interaction=all]

\newcounter\FitxaNumber

\def\fitxa#1%
{\doglobal\increment\FitxaNumber
\Fitxa{\FitxaNumber}{#1}}


\setupcombinedlist[content][list={chapter,section,subsection,Fitxa,tasca},interaction=all,textcolor=black]


and

\startxmlsetups xml:demo:titol
   \fitxa{\xmltext{#1}{/}}
\stopxmlsetups


In the document all is ok, but in the table of contents, I get phantom 
content.

Any clue?


\definehead [Fitxa] [subsection][ownnumber=yes,expansion=yes]

\newcounter\FitxaNumber

\startxmlsetups xml:demo:base
  \xmlsetsetup{demo}{*}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:d
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:t
\doglobal\increment\FitxaNumber
\Fitxa{\FitxaNumber}{\xmlflush{#1}}
\stopxmlsetups

\startxmlsetups xml:demo:b
\start
\bf \xmlflush{#1}
\stop
\stopxmlsetups

\starttext

\placelist[Fitxa][criterium=all]

\page

\xmlprocessfile{demo}{./x.xml}{}

\stoptext



?xml version='1.0' standalone='yes' encoding=UTF-8?
d
tnormal bbold/b/t
tsome more/t
/d


-
  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] extra link border with alternative=c

2014-03-24 Thread Pablo Rodriguez
Hans,

I have a the following sample:

\setupinteraction[state=start]
\enabledirectives[references.border]
\setuplist[chapter][alternative=d]
\starttext
\completecontent
\chapter{\TeX}
\stoptext

It shows that the E from \TeX has an extra frame in content list.

I don’t know what might be causing it, but it seems to be wrong.

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] Feature Request: ToC page number alternative

2014-02-26 Thread Thangalin
Hi,

The predefined alternative list setups (e.g., a, b, c...) provide
various ways to format the ToC with the page number to the right of
the list entry title. An alternative with the page number to the left
of the list entry title would be useful.

For example:

\setupinteraction[state=start,]
\setupcombinedlist[content][interaction=all,]

\unprotect

\define[3]\SectionToCEntry{%
  \hbox \strc_lists_get_reference_attribute\v!all{%
\par \leftaligned\bgroup
  \hbox to 2em{#3}%
\hskip 1em
\vtop{\hsize\dimexpr\textwidth-3em\relax#2}
\egroup \par%
  }
}

\protect


\setuplist[section][
  alternative=command,
  command=\SectionToCEntry,
]

\starttext
  \placecontent
  \dorecurse{4}{
\chapter[title={Chapter}]
\page
\section[title={Section A}]
\dorecurse{5}{\input knuth}
\section[title={Section B}]
\dorecurse{5}{\input ward}
  }
\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] Feature Request: ToC page number alternative

2014-02-26 Thread Wolfgang Schuster

Am 26.02.2014 um 20:31 schrieb Thangalin thanga...@gmail.com:

 Hi,
 
 The predefined alternative list setups (e.g., a, b, c...) provide
 various ways to format the ToC with the page number to the right of
 the list entry title. An alternative with the page number to the left
 of the list entry title would be useful.
 
 \unprotect
 
 \define[3]\SectionToCEntry{%
  \hbox \strc_lists_get_reference_attribute\v!all{%
\par \leftaligned\bgroup
  \hbox to 2em{#3}%
\hskip 1em
\vtop{\hsize\dimexpr\textwidth-3em\relax#2}
\egroup \par%
  }
 }
 
 \protect
 
 
 \setuplist[section][
  alternative=command,
  command=\SectionToCEntry,
 ]

When you want a interactive list entry replace “alternative=command” with 
“alternative=interactive”.

\define[3]\SectionToCEntry
  {\leftaligned\bgroup
 \hbox to 2em{#3}%
 \hskip 1em
 \vtop{\hsize\dimexpr\textwidth-3em\relax#2}%
   \egroup}

\setuplist
  [section]
  [alternative=interactive,
   command=\SectionToCEntry]

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] \setuplist[alternative=inmargin, sectionsegments=section]?

2014-02-19 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupheads\setuphead[chapter][sectionsegments=chapter, align=center]
\setuphead[section][alternative=inmargin]
\setuplist[section][alternative=d, style=\itx]
\starttext
\placecontent
\startfrontmatter
\dorecurse{2}{\chapter{Chapter}
\dorecurse{10}{\section{Section}\input zapf}}
\startfrontmatter
\startbodymatter
\dorecurse{2}{\part{Part}
\dorecurse{2}{\chapter{Chapter}
\dorecurse{10}{\section{Section}\input knuth}}}
\stopbodymatter
\stoptext

My question is: how can I achieve
\setuplist[chapter][alternative=inmargin] and
\setuplist[section][sectionsegments=section]?

I know these options are not implemented for \setuplist, but I think
they would be extremely useful, if they were implemented.

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] \setuplist[alternative=inmargin, sectionsegments=section]?

2014-02-19 Thread Wolfgang Schuster

Am 19.02.2014 um 19:02 schrieb Pablo Rodriguez oi...@gmx.es:

 Dear list,
 
 I have the following sample:
 
 \setupheads\setuphead[chapter][sectionsegments=chapter, align=center]
 \setuphead[section][alternative=inmargin]
 \setuplist[section][alternative=d, style=\itx]
 \starttext
 \placecontent
 \startfrontmatter
 \dorecurse{2}{\chapter{Chapter}
 \dorecurse{10}{\section{Section}\input zapf}}
 \startfrontmatter
 \startbodymatter
 \dorecurse{2}{\part{Part}
 \dorecurse{2}{\chapter{Chapter}
 \dorecurse{10}{\section{Section}\input knuth}}}
 \stopbodymatter
 \stoptext
 
 My question is: how can I achieve
 \setuplist[chapter][alternative=inmargin] and

Write your own list layout.

 \setuplist[section][sectionsegments=section]?

\setuplist[section][numbersegments=section]

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] \setuplist[alternative=inmargin, sectionsegments=section]?

2014-02-19 Thread Pablo Rodriguez
On 02/19/2014 07:48 PM, Wolfgang Schuster wrote:
 Am 19.02.2014 um 19:02 schrieb Pablo Rodriguez:
 [...]
 My question is: how can I achieve
 \setuplist[chapter][alternative=inmargin] and
 
 Write your own list layout.

Many thanks for your reply, Wolfgang.

I have no idea about how to do it. What should I start reading?

 \setuplist[section][sectionsegments=section]?
 
 \setuplist[section][numbersegments=section]

Exactly what I wanted.

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] \setuplist[alternative=inmargin, sectionsegments=section]?

2014-02-19 Thread Wolfgang Schuster

Am 19.02.2014 um 20:14 schrieb Pablo Rodriguez oi...@gmx.es:

 On 02/19/2014 07:48 PM, Wolfgang Schuster wrote:
 Am 19.02.2014 um 19:02 schrieb Pablo Rodriguez:
 [...]
 My question is: how can I achieve
 \setuplist[chapter][alternative=inmargin] and
 
 Write your own list layout.
 
 Many thanks for your reply, Wolfgang.
 
 I have no idea about how to do it. What should I start reading?

Search for \definelistalternative or \setuplist in combination with 
alternative=command.

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] \setuplist[alternative=inmargin?

2014-02-19 Thread Pablo Rodriguez
On 02/19/2014 08:26 PM, Wolfgang Schuster wrote:
 Am 19.02.2014 um 20:14 schrieb Pablo Rodriguez:
 On 02/19/2014 07:48 PM, Wolfgang Schuster wrote:
 [...]
 Write your own list layout.

 I have no idea about how to do it. What should I start reading?
 
 Search for \definelistalternative or \setuplist in combination with 
 alternative=command.

Many thanks for your reply, Wolfgang.

After reading strc-lst.mkvi (and trying something), I thought of a
different approach:

\showframe\showgrid
\setupinteraction[state=start]
\setupcombinedlist[content][interaction=all]
\setuplist[chapter][numbercommand=\listchapter,width=0pt]
\definemargindata[listchapter][hoffset=1em,location=left,style=]
\setupinterlinespace[line=3.3ex]
\setupwhitespace[small]
\setupindenting[medium,always]
\starttext
\placecontent
\dorecurse{10}{\chapter{Chapter}}
\stoptext

The only side-effect is that interaction doesn’t work for the chapter
number.

Is there any way to enable it again?

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] writetolist doesn't include sectionnumber in mkiv?

2014-02-15 Thread Sanjoy Mahajan
With MkIV, I'm having trouble getting \writetolist to include
sectionnumbers.  Or at least, I cannot get the typeset list to include
the sectionnumbers (but maybe writetolist sent in the information).

Here's a minimal example, which is almost exactly the example from the
wiki at http://wiki.contextgarden.net/Command/setuplist.  The only change
is that I've included [order=command] so that the \hrule ends up at the
right place.

\definelist[Reprints][criterium=all]

\starttext
  \section{Sec 1}
  \writetolist[Reprints]{1.}{List entry A}
  \subsection{Subsec 1}
  \writebetweenlist[Reprints]{\hrule}
  \writetolist[Reprints]{2.}{List entry B}
  \completelist[Reprints][order=command]
\stoptext


When typeset (I'm using the 2014.02.14 beta), the completelist looks
like:


List entry A   1

List entry B   1

But the 1. and 2. didn't show up in the left column.

I tried adding \setuplist[Reprints][sectionnumber=yes] but that didn't
help.  Does one need to define an alternative that includes
sectionnumbers?

-Sanjoy
___
If your question is of interest to others as well, please add an 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] (Combined)lists, two questions

2014-02-14 Thread Robert Blackstone

On 11 Feb 2014, at 10:18 , Wolfgang Schuster schuster.wolfg...@gmail.com wrote
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] (Combined)lists, two questions
 Message-ID: 28b0bd59-a98d-47c2-a6bd-554f150c1...@gmail.com
 Content-Type: text/plain; charset=us-ascii
 
 
 Am 10.02.2014 um 19:41 schrieb Robert Blackstone 
 blackstone.rob...@gmail.com:
 1 How can one force a page break after some section. In my present setup I 
 have a Chapter 4, sitting lonely at the bottom of the first page of the ToC, 
 What can be done about it?
 
 You can use \testpage to make sure chapter entries have a certain number of 
 lines before a page break happens, e.g. 
 \setuplist[chapter][before={\testpage[4]\blank}]
 
 When you need manual page breaks in the TOC in your final document there is 
 another mechanism: http://www.ntg.nl/pipermail/ntg-context/2010/052739.html
 
 What can I do the create a little more space between caption and page number?
 
 Make an example.
 
 Wolfgang
Thank you, Wolfgang. My apologies for my late reaction.

As for my first problem, the link you gave showed me what I needed. Problem 
solved.
As for my second problem, the relative dimensions of the three columns in the 
List of Examples, I could no see how I could create a representative ME in a 
short time, so instead I experimented with the many parameters for \setuplist 
and eventually found a satisfactory solution.
Thanks again,

Best regards, 
Robert Blackstone

___
If your question is of interest to others as well, please add an 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] Linespacing in TOC

2014-02-12 Thread Jan Tosovsky
On 2014-02-11 Wolfgang Schuster wrote: 
  Am 11.02.2014 um 17:32 schrieb Jan Tosovsky j.tosov...@email.cz:
 
  My fundamental question is why ToC has different ToC line gaps
  than body text. I still think it is rather a bug which we are 
  trying to work around all the time.
 
 The chapter entries insert a empty line before their content, you can
 disable this with
 
   \setuplist[chapter][before=]

Great! I was not aware of that empty line!

I misled all of you by incorrect wording, sorry, but it is fortunately fixed
now!

Thanks a lot.

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


Re: [NTG-context] Linespacing in TOC

2014-02-11 Thread Wolfgang Schuster

Am 11.02.2014 um 17:32 schrieb Jan Tosovsky j.tosov...@email.cz:

 My fundamental question is why ToC has different ToC line gaps than body
 text. I still think it is rather a bug which we are trying to work around
 all the time…

The chapter entries insert a empty line before their content, you can disable 
this with

  \setuplist[chapter][before=]

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] (Combined)lists, two questions

2014-02-10 Thread Robert Blackstone
Dear all,
 I have a few issues with the Table of Contents and with the List of Figures

1 How can one force a page break after some section. In my present setup I have 
a Chapter 4, sitting lonely at the bottom of the first page of the ToC, with 
its sections on the next page. I have tried \completecontent[3.7], as described 
on p. 53 of ConTeXt an excursion, but that does not work for me (I'm on 
mkiv). 
What can be done about it?

2 My list of figures gives the complete captions, some of which are long. Those 
exceeding their allotted space break off, which is OK, but there are some that 
run up against the page number, which is ugly and unclear. 
What can I do the create a little more space between caption and page number?

In general, of most if not all of the 38 possible arguments for \setuplist, as 
shown on http://wiki.contextgarden.net/, I do not know what they do and how 
they can be used. Unfortunately, also ConTeXt an excursion is very brief on 
this subject. 
Is there any place where I can find more information?

Thanks in advance for ay advice.

Best regards,
Robert Blackstone___
If your question is of interest to others as well, please add an 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] (Combined)lists, two questions

2014-02-10 Thread Wolfgang Schuster

Am 10.02.2014 um 19:41 schrieb Robert Blackstone blackstone.rob...@gmail.com:

 Dear all,
  I have a few issues with the Table of Contents and with the List of Figures
 
 1 How can one force a page break after some section. In my present setup I 
 have a Chapter 4, sitting lonely at the bottom of the first page of the ToC, 
 with its sections on the next page. I have tried \completecontent[3.7], as 
 described on p. 53 of ConTeXt an excursion, but that does not work for me 
 (I'm on mkiv). 
 What can be done about it?

You can use \testpage to make sure chapter entries have a certain number of 
lines before a page break happens, e.g. 
\setuplist[chapter][before={\testpage[4]\blank}]

When you need manual page breaks in the TOC in your final document there is 
another mechanism: http://www.ntg.nl/pipermail/ntg-context/2010/052739.html

 2 My list of figures gives the complete captions, some of which are long. 
 Those exceeding their allotted space break off, which is OK, but there are 
 some that run up against the page number, which is ugly and unclear. 
 What can I do the create a little more space between caption and page number?

Make a example.

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] Bookmarks with the specified label on

2014-02-06 Thread Lei WANG
I have specified the headnumber of chapter to be the Number chpt.

By using \setuplist and \placelist with the attributes label=yes,
I could get a content with the label as what I want.

But the headnumber of chapter label on bookmarks is still using Number
intead of  the Number chpt.
What should I do to enable this feature?
A minimal example:

\setuplabeltext[en][chapter={the , chpt}]
\setupinteraction[state=start]
\placebookmarks[chapter,section]
\setupinteractionscreen[option=bookmark]


\setuplist[chapter,section,subsection][alternative=c]
\setuplist[chapter][distance=3em]
\setuplist[section][margin=2em]
\setuplist[subsection][margin=4em]

\starttext
\placelist[chapter,section,subsection][label=yes]
\chapter{first}
\input knuth
\chapter{second}
\input knuth
\section{second2}
\input knuth
\subsection{second3}
\input knuth
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] Rearrange Table of Contents section page numbers

2014-02-01 Thread Wolfgang Schuster

Am 31.01.2014 um 23:20 schrieb Thangalin thanga...@gmail.com:

 Hi,
 
 I am trying to recreate the following ToC entries:
 
 http://i.stack.imgur.com/ig6LX.png
 
 The code on the wiki uses:
 
\doifelse\currentlistentrylocation{\structureheadlocation{chapter}}
{{\bfb\currentlistentrytitle}}
{ \currentlistentrytitle}\NC\NR
 
 However, there are syntax errors and the conditional expression
 assumes that the ToC is being placed on every page. This assumption
 allows it to resolve the namedstructureheadlocation value. For a ToC
 at the start of a document, there is no current chapter and so the
 head location for the chapter entry returns 0.
 
 Here is what I have so far:
 
\startsetups [list:TOC]
\starttabulate
\currentlistentrypagenumber{} \hskip 1em \NC \currentlistentrytitle{} \NR
\stoptabulate
\stopsetups
 
\definelistalternative
  [TOC]
  [renderingsetup=list:TOC]
 
% Format the ToC style.
\setupcombinedlist[content][
  alternative=TOC,
]
 
\starttext
  \completecontent
  \startchapter [title=alpha] \stopchapter
\startsection[title=alphasec] \stopsection
  \startchapter [title=beta]  \stopchapter
\startsection[title=alphasec] \stopsection
  \startchapter [title=gamma] \stopchapter
\startsection[title=alphasec] \stopsection
\stoptext
 
 How do you determine whether or not the chapter title should be displayed?

\define[3]\SectionListEntry
  {\par \leftaligned\bgroup
 \hbox to 2em{\color[red]{#3}}%
 \hskip   1em
 \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
  \egroup \par}

\setuplist[chapter][headnumber=no,pagenumber=no,style=\bfc]
\setuplist[section][alternative=command,command=\SectionListEntry]

\starttext

\completecontent

\dorecurse{100}
  {\chapter{Chapter #1}
   \dorecurse{2}{\section{Section #1.##1}}}

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


[NTG-context] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-22 Thread Rudolf Bahr

Hello listmembers,

ConTeXt  ver: 2013.05.28 00:36 MKIV current  fmt: 2014.1.6

I'm typesetting a book in A4 landscape and would like to indent the TOC
at both sides. I tried two solutions which both didn't work as expected.

1. attempt with \startnarrower[left,right] 
\completecontent[pageboundaries={0.1.1.5}] \stopnarrower:
   The output of the following minimalistic example is partly attached as .pdf 
file. I shortened there
   the textheight to 80mm.
   a.) I would expect the TOC to be midaligned. But it isn't. It is leftaligned.
   b.) I would expect the TOC stopped after the 5th subsection row at page 
bottom and to be
   continued at the next page due to [pageboundaries={0.1.1.5}]. But it 
isn't.

2. attempt with 
\line{\hfill\vbox{\hsize=.75\hsize\completecontent[pageboundaries={0.1.1.5}]}\hfill},
   outcommented in the following example. The TOC is really indented at both 
sides, but
   it doesn't stop at all at page bottom.

Something must be wrong here. But what?

Regards,

Rudolf Bahr

-8
\setuppapersize[A4,landscape]
\setuplayout[backspace=27.5mm,topspace=20mm,height=80mm,width=242mm,footer=5mm,header=8mm,margin=18mm]

\setuplayout [location=middle, marking=on, margindistance=3mm]

\setuppagenumbering[alternative=singlesided,
location={footer, margin},
style=bold,
command=\midaligned]
\setupheader[text][after=\hrule]

\setupbodyfont[default]

\definebodyfontswitch [xvii] [17.3pt]
\definebodyfontswitch [xiv]  [14.4pt]
\definebodyfontswitch [xii]  [12pt]

\setupheadtext[content=\rm\xvii\bf Inhaltsverzeichnis]
\definelist[chapter]
\setuplist[chapter]   [style=\rm\xvii\bf, pagenumber=no]

\definelist[section]
\setuplist[section]   [margin=1.5em, style=\rm\xiv\bf, pagenumber=no]

\definelist[subsection]
\setuplist[subsection][margin=3.0em, style=\rm\xii, alternative=c]

\setuphead[chapter]   [header=empty, style=\rm\xvii\bf, number=no, 
align=middle, textstyle=\rm\xvii\bf]
\setuphead[section]   [header=empty, style=\rm\xiv\bf,  number=no, align=middle]
\setuphead[subsection][header=empty, style=\rm\xii\bf,  number=no. align=middle]

\showframe

\setupnarrower[left=.125\hsize,right=.125\hsize]
 % -

\starttext

%\line{\hfill\vbox{\hsize=.75\hsize\completecontent[pageboundaries={0.1.1.5}]}\hfill}
\startnarrower[left,right] \completecontent[pageboundaries={0.1.1.5}] 
\stopnarrower  % -

\chapter{2010}
\section{My Home Is My Castle}

\subsection{A}
Here we are in subsection A.
\subsection{B}
Here we are in subsection B.
\subsection{C}
Here we are in subsection C.
\subsection{D}
Here we are in subsection D.
\subsection{E}
Here we are in subsection E.
\subsection{F}
Here we are in subsection F.
\subsection{G}
Here we are in subsection G.
\subsection{H}
Here we are in subsection H.
\subsection{I}
Here we are in subsection I.

\stoptext
-8



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

[NTG-context] issues with \setuplist

2014-01-17 Thread Pablo Rodriguez
Dear list,

generating a table of contents with the following sample:

\setupinterlinespace[line=3.5ex]
\setuplist[section][alternative=d, style={\itx\setupinterlinespace},
separator={·}]
\starttext
\placecontent
\dorecurse{5}{\chapter{Chapter}\dorecurse{10}{\section{Long Section
Title}}}
\stoptext

I experience two issues.

The first one is that I have no hay to get the sections that build a
paragraph to have an adapted \setupinterlinespace. Right now the
interline space is too high. And \setupinterlinespace from style doesn’t
seem to work.

The second issue is that I would like to get a separator between each
section item in the table of contents. Am I missing something about
separator?

Could anyone explain what is wrong with the sample?

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] wider item numbering in toc

2013-12-07 Thread Wolfgang Schuster

Am 06.12.2013 um 21:04 schrieb H. van der Meer h.vanderm...@uva.nl:

 \define[1]\ChapterListNumber
  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
 
 \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]
 
 This now gives a toc looking the way I like.
 May I lay at your foot a plea for a change/additional parameter here? 
 \setuplist[][itemalign=left/right] or something in that sense.
 For numbered chapters I consider an alignment as below most natural, although 
 opinions may differ.

When there would a key for this it should be named numberalign.

 By the way, the \define[1] eludes me. Why this particular [1] there?

You specify the number of argument for the \define command with the number, e.g.

\define\command{…} is equal to \unexpanded\def\command{…}

and

\define[3]\command{…} is equal to \unexpanded\def#1#2#3{…}


When you want to create a command which is similar to \def (without 
\unexpanded) you can use \defineexpandable[number]\command

 Why do you think lists use the itemgroup/itemize mechanism?
 
 I didn’t think that exactly, but just tried it in despair and having the idea 
 that toc items are set as an itemized list (it looks that way, isn’t it?).

No, they are unrelated but both mechanism use the same low level commands for 
the indentation of the text.

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] wider item numbering in toc

2013-12-06 Thread Wolfgang Schuster

Am 06.12.2013 um 13:53 schrieb H. van der Meer h.vanderm...@uva.nl:

 In the table of contents my items are numbers 1, 2, etc. At the number the 
 aligning is wrong, the tens are shifted to the right. I tried to remedy with 
 a setup:
 \setupitemgroup[itemize][each][5,autointro][…]
 But changing width, distance, textdistance, itemalign do not have effect on 
 the toc.
 How to accomplish?

Where is the problem, in your table of contents which is controlled by 
\setuplist or in your itemize which is controlled by \setupitemgroup?

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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
The table of contents results from:

\startfrontmatter
\input front
\let\ChapterTOC\relax   % Only then chapters typeset !?
\completecontent
\stopfrontmatter

The table of contents is typeset from the completecontent, so I guess the 
answer to your question will be \setuplist.

There I have set

\setupcombinedlist[content][list=chapter]%  [list={chapter,section}]
\setupcombinedlist[section][list=section]

Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main toc 
giving the chapters, whereas in the seperate chapters the sections therin 
should appear in their own toc.

Hans van der Meer



On 6 dec. 2013, at 14:44, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 06.12.2013 um 13:53 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 In the table of contents my items are numbers 1, 2, etc. At the number the 
 aligning is wrong, the tens are shifted to the right. I tried to remedy with 
 a setup:
 \setupitemgroup[itemize][each][5,autointro][…]
 But changing width, distance, textdistance, itemalign do not have effect on 
 the toc.
 How to accomplish?
 
 Where is the problem, in your table of contents which is controlled by 
 \setuplist or in your itemize which is controlled by \setupitemgroup?
 
 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] wider item numbering in toc

2013-12-06 Thread Wolfgang Schuster

Am 06.12.2013 um 14:59 schrieb H. van der Meer h.vanderm...@uva.nl:

 The table of contents results from:
 
 \startfrontmatter
   \input front
   \let\ChapterTOC\relax   % Only then chapters typeset !?
   \completecontent
 \stopfrontmatter
 
 The table of contents is typeset from the completecontent, so I guess the 
 answer to your question will be \setuplist.
 
 There I have set
 
 \setupcombinedlist[content][list=chapter]%[list={chapter,section}]
 \setupcombinedlist[section][list=section]
 
 Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main 
 toc giving the chapters, whereas in the seperate chapters the sections therin 
 should appear in their own toc.


Which numbers are wrong, the section numbers or the page numbers?

\starttext

\title{Table of contents}

\placecontent[list=chapter]

\dorecurse{20}
  {\chapter{Chapter #1}
   \placecontent % lists are local unless you use criterium=all
   \dorecurse{5}
 {\section{Section #1.##1}}}

\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] wider item numbering in toc

2013-12-06 Thread Wolfgang Schuster

Am 06.12.2013 um 17:32 schrieb H. van der Meer h.vanderm...@uva.nl:

 
 Which numbers are wrong, the section numbers or the page numbers?
 
 The chapter numbers. See the jpg below. The 10 with its separator  is too far 
 to the right.

This is normal because the numbers are aligned on the left margin, when the 
space for the number
is too narrow you have to increase the width value, e.g. 
\setuplist[chapter][width=3em].

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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
Indeed, \setuplist[chapter][width=3em] makes the chapternumber set in a wider 
field.

But the alignment is as bad as it was: flushleft, i.e. the 1 of chapter 10 
still aligns with the units from the lower chapters instead of aligning to the 
zero.

I looked up \setuplist in the command catalogue but cannot find a parameter to 
align this number, either to the right or to the left. It just seems to stick 
with the builtin default.

I tried something like \setupitemgroup[chapter][][][itemalign=left (also tried 
right)] but to no avail.

 Hans van der Meer



On 6 dec. 2013, at 17:41, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 06.12.2013 um 17:32 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 
 Which numbers are wrong, the section numbers or the page numbers?
 
 The chapter numbers. See the jpg below. The 10 with its separator  is too 
 far to the right.
 
 This is normal because the numbers are aligned on the left margin, when the 
 space for the number
 is too narrow you have to increase the width value, e.g. 
 \setuplist[chapter][width=3em].
 
 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] wider item numbering in toc

2013-12-06 Thread Wolfgang Schuster

Am 06.12.2013 um 20:20 schrieb H. van der Meer h.vanderm...@uva.nl:

 Indeed, \setuplist[chapter][width=3em] makes the chapternumber set in a wider 
 field.
 
 But the alignment is as bad as it was: flushleft, i.e. the 1 of chapter 10 
 still aligns with the units from the lower chapters instead of aligning to 
 the zero.
 
 I looked up \setuplist in the command catalogue but cannot find a parameter 
 to align this number, either to the right or to the left. It just seems to 
 stick with the builtin default.

\define[1]\ChapterListNumber
  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}

\setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]

\starttext

\title{Table of contents}

\placecontent

\dorecurse{20}{\chapter{Chapter #1}}

\stoptext

 I tried something like \setupitemgroup[chapter][][][itemalign=left (also 
 tried right)] but to no avail.

Why do you think lists use the itemgroup/itemize mechanism?

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] wider item numbering in toc

2013-12-06 Thread H. van der Meer
 \define[1]\ChapterListNumber
  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
 
 \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]

This now gives a toc looking the way I like.
May I lay at your foot a plea for a change/additional parameter here? 
\setuplist[][itemalign=left/right] or something in that sense.
For numbered chapters I consider an alignment as below most natural, although 
opinions may differ.
 8
 9
10
11
instead of
8
9
10
11

By the way, the \define[1] eludes me. Why this particular [1] there?

 Why do you think lists use the itemgroup/itemize mechanism?

I didn’t think that exactly, but just tried it in despair and having the idea 
that toc items are set as an itemized list (it looks that way, isn’t it?).

Hans van der Meer



On 6 dec. 2013, at 20:36, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 06.12.2013 um 20:20 schrieb H. van der Meer h.vanderm...@uva.nl:
 
 Indeed, \setuplist[chapter][width=3em] makes the chapternumber set in a 
 wider field.
 
 But the alignment is as bad as it was: flushleft, i.e. the 1 of chapter 10 
 still aligns with the units from the lower chapters instead of aligning to 
 the zero.
 
 I looked up \setuplist in the command catalogue but cannot find a parameter 
 to align this number, either to the right or to the left. It just seems to 
 stick with the builtin default.
 
 \define[1]\ChapterListNumber
  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
 
 \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]
 
 \starttext
 
 \title{Table of contents}
 
 \placecontent
 
 \dorecurse{20}{\chapter{Chapter #1}}
 
 \stoptext
 
 I tried something like \setupitemgroup[chapter][][][itemalign=left (also 
 tried right)] but to no avail.
 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] ToC - right-alignment of roman numerals

2013-11-25 Thread Hans Hagen

On 11/24/2013 10:49 PM, Jan Tosovsky wrote:

On 2013-11-18 Jan Tosovsky wrote:

On 2013–06–03 Jan Tosovsky wrote:
in fresh MkIV I use the following commands for building ToC, but I
have no idea how to align the label (roman numeral) to the right.


I am almost there, but things get complicated when chapters are
combined with preface/index titles without numbering and thus aligned
improperly:

\setupcombinedlist[content][list=chapter, alternative=c]
\setupcombinedlist[chapter][
distance=1em,
width=1cm,

numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

\starttext
\completecontent

\startfrontmatter
\chapter{Preface}text
\stopfrontmatter

\startbodymatter
\chapter{Chapter}text\index{primary}
\stopbodymatter

\startbackmatter
\completeindex
\stopbackmatter

\stoptext

Is there any way how to indent these non-numbered titles so that they
start where the chapter title starts?


I've fixed it by applying a margin to everything and setting a negative width 
to the numbers (distance = -width):

\setupcombinedlist[chapter][
distance=0.5cm,
width=-0.5cm,
margin=2cm,
numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

I don't know exactly why it works, but it works :-)



\setupcombinedlist
  [content]
  [list=chapter,
   alternative=c]

\setuplist
  [chapter]
  [aligntitle=yes,
   distance=1em,
   width=1cm]

-
  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] ToC - right-alignment of roman numerals

2013-11-25 Thread Jan Tosovsky
On 2013-11-25 Hans Hagen wrote:
 On 11/24/2013 10:49 PM, Jan Tosovsky wrote:
  On 2013-11-18 Jan Tosovsky wrote:
  On 2013–06–03 Jan Tosovsky wrote:
 
  in fresh MkIV I use the following commands for building ToC, but I
  have no idea how to align the label (roman numeral) to the right.
 
  I am almost there, but things get complicated when chapters are
  combined with preface/index titles without numbering and thus
  aligned improperly:
 
  \setupcombinedlist[content][list=chapter, alternative=c]
  \setupcombinedlist[chapter][
  distance=1em,
  width=1cm,
 
 numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
  ]
 
  \starttext
  \completecontent
 
  \startfrontmatter
  \chapter{Preface}text
  \stopfrontmatter
 
  \startbodymatter
  \chapter{Chapter}text\index{primary}
  \stopbodymatter
 
  \startbackmatter
  \completeindex
  \stopbackmatter
 
  \stoptext
 
  Is there any way how to indent these non-numbered titles so that
  they start where the chapter title starts?
 
  I've fixed it by applying a margin to everything and setting a
  negative width to the numbers (distance = -width):
 
  \setupcombinedlist[chapter][
  distance=0.5cm,
  width=-0.5cm,
  margin=2cm,
 
 numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
  ]
 
  I don't know exactly why it works, but it works :-)
 
 
 \setupcombinedlist
[content]
[list=chapter,
 alternative=c]
 
 \setuplist
[chapter]
[aligntitle=yes,
 distance=1em,
 width=1cm]
 

Thanks for this alternative, but I am getting something different. Desired 
output can be produced with this code:

\setuphead[chapter][conversion=Romannumerals]
%\setupheadnumber[chapter][48] % this is ignored when a preface is defined
\setupcombinedlist[content][alternative=c]
\setupcombinedlist[chapter][
   distance=1em,
   width=-1em,
   margin=15mm,
   numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]

\starttext
\completecontent

\startfrontmatter
\chapter{Preface}
\stopfrontmatter

\startbodymatter
\chapter{Chapter1}
\chapter{Chapter2}
\chapter{Chapter3}
\chapter{Chapter4}
\stopbodymatter

\stoptext
If there is a less cumbersome method, thanks for sharing.

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

Re: [NTG-context] No page break between chapter-title and section-title in TOC

2013-10-02 Thread Wolfgang Schuster

Am 02.10.2013 um 12:14 schrieb H. Özoguz h.oezo...@mmnetz.de:

 This one is still open, is there maybe a workaround to prevent page-breaks in 
 the TOC between chapter- and sections-titles (or part- and chaptertitles).

\setuplist
   [chapter]
   [before={\testpage[4]\blank}]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Confounding colour conundrums

2013-09-22 Thread Thangalin
Hi,

In the attached example, I thought the word *Website* should be *orange*,
but it is *blue*.

If *color=blue* is removed (from \setupinteraction[state=start]), then the
word *Website* is *dark green*, which is also unexpected, because the only
place *dark green* occurs is in the setuplist for the chapter's page number
(i.e., pagecolor=darkgreen). It appears that the default colour for links
embedded with \useurl bucks trendy traditional *blue* hyperlinks, favouring
*dark green*. (*Black* would also make sense as a default.)

I am confounded because the code explicitly contains the line:

\setupurl[color=orange]

I thought that that would set the external hyperlink colour to *orange*.

In the same document, how do I set:

   - hyperlink colours to *orange*;
   - index page number colours to *red*;
   - table of contents text to *dark cyan*; and
   - table of contents page numbers to *dark green*.

Many thanks.

Kindest regards.


ex.tex
Description: TeX 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] EPUB XHTML Format

2013-09-05 Thread Hans Hagen

On 9/4/2013 7:55 PM, Thangalin wrote:

Hi.

of course we could alternatively export all as div
class=tag-subtag-... but i don't like that too much; html itself
is not rich enough for our purpose

What about giving developers the ability to change the destination
element? For example:

\setuplist[chapter][
   xml={\starttag[h1]#1\stoptag}
]

Would produce, upon export:

h1Chapter/h1


export doesn't happen at that level; something like that would add an 
ugly overhead; it's way easier to make some xslt script that converts 
the rather systematic export to something like that and it only has to 
be written once by someone (not me)



Or (using export instead of xml; I don't care what it is named):

\setuplist[chapter][


export={\starttag[div]\startattribute[class]{chapter}#1\stopattribute\stoptag}}
]

Similarly, this would produce:

div class=chapterChapter/div


you use some tex syntax but it all happens in lua; also, the only way to 
provide some kind of different tagging is to support plugins (read: lua 
functions) that could override default behaviour (but again, it's quite 
easy to do that as a postprocessing step)



This would offer the flexibility of custom XML documents without
affecting the default behaviour.

   * Generates XHTML headers (including !DOCTYPE and html...)

not needed as we're 'standalone'

Having the ability to produce the !DOCTYPE... and htmnl elements
could be as simple as:

\setupexport[
   standalone=no,
]

   * Produces images as img tags, rather than float tags.

the css can deal with them (info is written to files for that)

Yes, but they aren't standard. There is an ecosystem of tools (e.g.,
Calibre, normalizing CSS templates, etc.), not to mention a widespread
knowledge-base, that groks the minimal XHTML specification. Plus, using
XML tags that are not in the minimal XHTML spec. means more testing on
more devices to make sure that their XHTML parsers render correctly.


most of the xml we get here is a funny mix of whatever tags and html 
(often for tables) and normaly there is way more structure than in the 
average html document; the export is meant to be close to the source and 
turning it into some html / div mixture makes it messy


for instance, we have more levels than H1..H6, so how to do H7? if 
someone has to deal with that, he/she can as well transform all into H1 
with some class which is a local solution then



xhtml has no typical tags .. it's xml + css (or xslt) ...
unfortunately browsers have

That is, a Strictly Conforming XHTML Document, as per:

http://www.w3.org/TR/2000/REC-xhtml1-2126/#docconf

the export of context is in fact just xml, and by tagging it as
xhtml we can apply css to it; but if someone has a workflow for
producing epub an option if to postprocess that xml file into
whatever epub one wants


indeed. that was the idea: export xml, tag it as xhtml (with the option 
to provide hyperlinks, an exception), provide some standard css as 
starter and then let users deal with matters the way they like; you can 
be pretty sure that what you want is not the same as what someone else 
wants; and if more people want it, they can together write a 
transformation script (or hire someone)


keep in mind that the export itself is already tricky enough and for me 
it doesn't pay off to provide tons of additional functionality (well, it 
doesn't pay of to export anyway)



I could transform the ConTeXt-generated XML into strictly conforming
XHTML, but it was a step I was hoping to avoid. Right now my process is:

 1. Convert XML data to a ConTeXt .tex file.
 2. Convert ConTeXt to either PDF or EPUB.
 3. Stylize EPUB using CSS.


but writing the transform that suits you is just one step (with yuou 
spending the time on it) while extending the export into a complete 
transformation and configuration thing would put the burden on me -)



I want to use ConTeXt here (instead of going directly from XML data to
EPUB) because ConTeXt provides functionality such as multiple indexes,
table-of-contents, and bundling the .epub. Having an extra step to
generate strictly conforming XHTML is architecturally painful as it
means transforming the document three times (XML - ConTeXt, ConTeXt -
XML, then XML - XHTML).


why is it painful? the export if quite generic and will not change; it 
is also flexible as it honors user defined sectioning and styling



Everytime we look into epub there's another issue ... it's not a
standard but reversed engineered application mess (happen soften
with xml: turn some application data structures into xml and call it
a standard)


Some book vendors only accept validating EPUBs. ConTeXt is documented as
being able to generate EPUBs. The documentation should state the EPUBs
do not validate and do not generate strictly conforming XHTML.


well, i, luigi and some others did tests: the thing is that epub is 
evolving

Re: [NTG-context] EPUB XHTML Format

2013-09-04 Thread Thangalin
Hi.

of course we could alternatively export all as div class=tag-subtag-...
 but i don't like that too much; html itself is not rich enough for our
 purpose


What about giving developers the ability to change the destination element?
For example:

\setuplist[chapter][
  xml={\starttag[h1]#1\stoptag}
]


Would produce, upon export:

h1Chapter/h1


Or (using export instead of xml; I don't care what it is named):

\setuplist[chapter][

export={\starttag[div]\startattribute[class]{chapter}#1\stopattribute\stoptag}}
]


Similarly, this would produce:

div class=chapterChapter/div


This would offer the flexibility of custom XML documents without affecting
the default behaviour.

  * Generates XHTML headers (including !DOCTYPE and html...)

 not needed as we're 'standalone'


Having the ability to produce the !DOCTYPE... and htmnl elements could
be as simple as:

\setupexport[
  standalone=no,
]



   * Produces images as img tags, rather than float tags.

 the css can deal with them (info is written to files for that)


Yes, but they aren't standard. There is an ecosystem of tools (e.g.,
Calibre, normalizing CSS templates, etc.), not to mention a widespread
knowledge-base, that groks the minimal XHTML specification. Plus, using XML
tags that are not in the minimal XHTML spec. means more testing on more
devices to make sure that their XHTML parsers render correctly.


 xhtml has no typical tags .. it's xml + css (or xslt) ... unfortunately
 browsers have


That is, a Strictly Conforming XHTML Document, as per:

http://www.w3.org/TR/2000/REC-xhtml1-2126/#docconf

the export of context is in fact just xml, and by tagging it as xhtml we
 can apply css to it; but if someone has a workflow for producing epub an
 option if to postprocess that xml file into whatever epub one wants


I could transform the ConTeXt-generated XML into strictly conforming XHTML,
but it was a step I was hoping to avoid. Right now my process is:

   1. Convert XML data to a ConTeXt .tex file.
   2. Convert ConTeXt to either PDF or EPUB.
   3. Stylize EPUB using CSS.

I want to use ConTeXt here (instead of going directly from XML data to
EPUB) because ConTeXt provides functionality such as multiple indexes,
table-of-contents, and bundling the .epub. Having an extra step to generate
strictly conforming XHTML is architecturally painful as it means
transforming the document three times (XML - ConTeXt, ConTeXt - XML, then
XML - XHTML).


 Everytime we look into epub there's another issue ... it's not a standard
 but reversed engineered application mess (happen soften with xml: turn some
 application data structures into xml and call it a standard)


Some book vendors only accept validating EPUBs. ConTeXt is documented as
being able to generate EPUBs. The documentation should state the EPUBs do
not validate and do not generate strictly conforming XHTML.

I have spent the last three weeks converting documents from LaTeX to
ConTeXt because the documentation stated that ConTeXt can produce EPUBs.
While true, the documentation did not mention its shortcomings. Had I known
in advance, I probably would have gone straight to EPUB using Java or, with
a little revulsion, PHP classes. ;-) That said, I probably should have
tested this feature sooner. :-)

as i have no real use/demand for epub it's not something i look into on a
 daily basis


How can I help resolve these issues?

Merely testing (which I am happy to do) isn't going to produce a strictly
conforming XHTML document.

Kindest regards.
___
If your question is of interest to others as well, please add an 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] Another issue with my magazine

2013-09-03 Thread Mikoláš Štrajt
% Hello All!
%
% In the folowing style, I need to do some whitespace tweaks. Unfortunately, I 
didn't found solutions in manual, so I am asking here.
%
% I need:
%
% - make first paragraph after author name noindented, i tried to put some 
\nointdent here, but without any effect
% - make vertical space between article head and author name shorter (also in 
general : modify vertical spaces of heads)
%
% Regards Mikoláš Štrajt
%
% PS: You can use this e-mail as source code of my solution. :-D


%%%
%%% FOLLOWING IS STYLE AS IS USED IN REAL LIFE %%%
%%%

% Čeština
\enableregime[utf]

% Fonty
\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec]
\definetypeface [antykwa] [rm] [serif] [antykwa-torunska] [default] 
[encoding=ec]
\usetypescript[modern][ec]
\setupbodyfont[ss,10pt]

% Papír a číslování řádek

\mainlanguage[cz]

\setuppapersize[A4][A4]
\setuppagenumbering[location={footer,middle}]

% Struktura

\definehead[kochapter][chapter]
\setuphead[title][style=\antykwa, number=no]
\setuphead[kochapter][placehead=empty,before=,after=,number=no]
\setuphead[section][page=no,style=\tfb\iwona\grave,number=no]

\def\rubrika #1{\kochapter{#1}}

\def\prispevek #1#2{
\section{#2}
{\noindent \rm \sc #1} \noindent \endgraf \noindent
}

% Hlavička a patička

\setupheadertexts[]
\setupheadertexts[\setups{hlavicka}][][][\setups{hlavicka}]

\startsetups[hlavicka]
  \zanrO{\getmarking[kochapter]}
\stopsetups


% Odstavce
\setupindenting[yes, small]
\setupheads[indentnext=no]

% Záložky a PDF
\placebookmarks[kochapter,section][force=yes]
\setupinteractionscreen[option=bookmark]
\setupinteraction[state=start,
  title={Neslyšný kočkopes},
  author={Psanci}]

% TOC

\setupcombinedlist[content][list={kochapter,section,subsection}]
\setuplist[kochapter][interaction=text,color=green,textcommand=\WORD]
\setuplist[section][interaction=text,color=green]

% Barvy

\setupcolors[state=start]
\definecolor[indigo][r=.0, g=0.0, b=0.5]
\definecolor[green][r=0, g=0.5, b=0]
\definecolor[ruda][r=0.5, g=0, b=0]
\definecolor[grave][r=0.5, g=0.5, b=0.5]

% Makra

\def\citat #1#2{
{\it
#1
\blank[1*halfline]
\rightaligned{--- #2}
}}

\def\trojtecka {
{\bf \ruda \tt...}
}

\def \robotitulka{
\startstandardmakeup
\title{Neslyšný kočkopes - \getvariable[cislo]}
\placecontent
\stopstandardmakeup
\page
}

\def\zanrO #1{
\framed[
  background=color,
  backgroundcolor=grave,
  foreground=color,
  foregroundcolor=white,
  frame=off.
  width=\hsize
  ]{\antykwa \rightaligned{\WORD{#1}~~}}
}

\setupdelimitedtext[blockquote][style=\slx,before={\setupinterlinespace[line=2.4ex]}]

%%%
%%% FOLLOWING IS EXAMPLE TEXT %%%
%%%

%%% `rubrika` is section of magazine
\rubrika{Example}

%%% `pripevek` is article
%%% syntax is \prispevek{author name}{article name}

\prispevek{Steve W. Hawking}{The Universe in a Nutshell}

\dorecurse{10}{\input hawking\par}
___
If your question is of interest to others as well, please add an 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] TOC: Chapter-titles without page-numbers

2013-08-26 Thread Wolfgang Schuster

Am 26.08.2013 um 12:20 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Hi there,
 
 in the attachment you see an example of a toc (of some german bestseller) I 
 want to reproduce in ConText.
 
 The only problem left, I could not achieve myself, is: How to set the 
 chapter-titles in the toc without pagenumbers (as you see in the attached 
 jpg)?

\setuplist[chapter][pagenumber=no]

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] Problem with horizontal space in List of Figures

2013-08-25 Thread Wolfgang Schuster

Am 25.08.2013 um 22:21 schrieb Robert Blackstone blackstone.rob...@gmail.com:

 Dear list,
 
 Using Hans' nice method to place in a document several figures with the same 
 number, separated by text or on different pages, I run into difficulties with 
 the List of Figures.  Apparently ConTeXt does not make enough space to 
 accommodate the figure numbers and the groupsuffix, as the example shows. 
 (Sorry for the large number of figures but I needed a double digit number of 
 them to show the problem. None of the other elements, titles, captions etc. 
 has any significance for this problem.)
 
 In this problem the chosen font, Verdana, seems to be an essential factor. 
 With many sans fonts there is no problem, for example not with Iwona, Arila, 
 Helvetica, Calibri. Optima, Trebuchet MS. But others, for example Lucida Sans 
 and Sathu give the same problem as Verdana.
 Unfortunately I have to use Verdana for my project. 
 
 What can I do to create a little more space for the first column of the List 
 of Figures?

\setuplist[figure][width=4em]

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] Problem with horizontal space in List of Figures

2013-08-25 Thread Robert Blackstone

On 25 aug. 2013, at 22:24, Wolfgang Schuster schuster.wolfg...@gmail.com wrote
 
 
 Am 25.08.2013 um 22:21 schrieb Robert Blackstone 
 blackstone.rob...@gmail.com:
 
 Dear list,
 
 What can I do to create a little more space for the first column of the List 
 of Figures?
 
 \setuplist[figure][width=4em]
 
 Wolfgang

Thank you very much, Wolfgang, for this incredibly fast and effective response.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Hiding \part completely except for in the ToC

2013-08-06 Thread Marco Patzer
On 2013–08–06 Alexander van Ratingen wrote:

 I'm having a little problem and I'm hoping you can help. For my table of
 contents, I need to group my sections, but I don't want any heads for this
 in the text. Now, I've been using \part for this but unfortunately I cannot
 get rid of the empty space it leaves.

Please provide an example next time. It's hard to tell what space
you're talking about.

 The only way I've been able to get rid of the empty space is by setting:
   \setuphead[part][placehead=empty]
 But then it's not in the ToC either.
 
 Alternatively, when setting placehead to any other value, it still leaves
 an empty line in the text.

Example please.

 Is it possible to have both, ie \part's in the ToC without any space taken
 by it in the text?

\definehead
  [sectiongroup]
  [part]
  [placehead=empty,
   page=no,
   number=no]

\setuphead
  [chapter]
  [sectionresetset=none,
   sectionsegments=chapter]

\setuplist
  [sectiongroup]
  [pagenumber=no]

\defineresetset
  [none] [] [0]

\setupcombinedlist
  [content]
  [list={sectiongroup, chapter}]

\starttext

\completecontent

\startsectiongroup [title=First]
  \startchapter [title=Foo]
  \stopchapter
  \startchapter [title=Bar]
  \stopchapter
\stopsectiongroup

\startsectiongroup [title=Second]
  \startchapter [title=Alpha]
  \stopchapter
  \startchapter [title=Beta]
  \stopchapter
\stopsectiongroup

\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] Appendix Numbering and TOC value

2013-08-02 Thread Wolfgang Schuster

Am 02.08.2013 um 01:28 schrieb Lance Larsen lance.c.lar...@gmail.com:

 I have a document with an appendix included:
  
 \setuplabeltext[appendix=APPENDIX~]
 \starttext
 \placecontent
 \chapter{One}
 \startappendices
 \chapter{In Appendix}
 \stopappendices
 \stoptext
  
 I would like to have the table of contents show:
  
 Appendix A  In Appendix
  
 But I get:
  
 A In Appendix
  
 How do I get the table of contents to show the heading ‘Appendix’ before A?

You have to enable the label in the TOC with 
\setuplist[chapter][label=yes,width=7em].

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] Appendix Numbering and TOC value

2013-08-02 Thread Lance Larsen
Thanks, Wolfgang. That was just what I needed. I appreciate the help.

-Lance

From: Wolfgang Schuster schuster.wolfg...@gmail.com

 I have a document with an appendix included:
  
 \setuplabeltext[appendix=APPENDIX~]
 \starttext
 \placecontent
 \chapter{One}
 \startappendices
 \chapter{In Appendix}
 \stopappendices
 \stoptext
  
 I would like to have the table of contents show:
  
 Appendix A  In Appendix
  
 But I get:
  
 A In Appendix
  
 How do I get the table of contents to show the heading ?Appendix? before
A?

You have to enable the label in the TOC with
\setuplist[chapter][label=yes,width=7em].

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] Chapter number in list colored (setuplist)

2013-07-09 Thread Zenlima
Hi,

I want to color the chapter number in the table of content. The
attribute numbercolor does not exist in setuplist. So I tried to
color the chapter number via numberstlye (numbercommand is also not
working):

---8

\define[1]\listChapterColor{\color[bordeaux]{X #1}}

\setuplist[chapter][color=black,numberstyle=\listChapterColor]

8--

The X appears in the new color (bordeaux), but the chapter number is
still uncolored - same color like rest of that line (black).

What am I doing wrong here?

H.
___
If your question is of interest to others as well, please add an 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] Chapter number in list colored (setuplist)

2013-07-09 Thread Aditya Mahajan

On Tue, 9 Jul 2013, Zenlima wrote:


Hi,

I want to color the chapter number in the table of content. The
attribute numbercolor does not exist in setuplist. So I tried to
color the chapter number via numberstlye (numbercommand is also not
working):

---8

\define[1]\listChapterColor{\color[bordeaux]{X #1}}

\setuplist[chapter][color=black,numberstyle=\listChapterColor]

8--

The X appears in the new color (bordeaux), but the chapter number is
still uncolored - same color like rest of that line (black).

What am I doing wrong here?


(Untested): Have you tried `numbercolor=bordeaux`?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in list colored (setuplist)

2013-07-09 Thread Wolfgang Schuster

Am 09.07.2013 um 18:08 schrieb Zenlima p...@zenlima.eu:

 Hi,
 
 I want to color the chapter number in the table of content. The
 attribute numbercolor does not exist in setuplist. So I tried to
 color the chapter number via numberstlye (numbercommand is also not
 working):
 
 ---8
 
 \define[1]\listChapterColor{\color[bordeaux]{X #1}}
 
 \setuplist[chapter][color=black,numberstyle=\listChapterColor]
 
 8--
 
 The X appears in the new color (bordeaux), but the chapter number is
 still uncolored - same color like rest of that line (black).
 
 What am I doing wrong here?


1. You forgot a minimal example which demonstrates the problem.

2. You didn’t test numbercolor.

\setuplist
  [chapter]
  [color=green,
   numbercolor=red,
  %pagecolor=orange,
   textcolor=blue]

\starttext
\completecontent
\chapter{Test}
\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] Chapter number in list colored (setuplist)

2013-07-09 Thread Zenlima
Am Tue, 9 Jul 2013 12:20:18 -0400 (EDT)
schrieb Aditya Mahajan adit...@umich.edu:

 numbercolor=bordeaux

I am so sorry.. I tried that too but I must have mistyped it then.. now it 
works :)

Thanks
___
If your question is of interest to others as well, please add an 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] Chapter number in list colored (setuplist)

2013-07-09 Thread Zenlima
 2. You didn’t test numbercolor.

You are correct: after my mistyped try'n'error I did not checked it
any further as the documentation in the wiki. I updated it with that
missing attribute.

thanks


signature.asc
Description: PGP 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] compilation problem (TeXLive 2013)

2013-07-03 Thread Manuel González Suárez
There is the example:

\enableregime[utf]

\usemodule[ancientgreek][font=GFSPorson,scale=1.1]

\mainlanguage[es]

\setuppapersize[A4]

\setupbodyfont[12pt]

%\setupbodyfont[ber,pos]

\setupindenting[medium]\indenting[always]

\usemodule[lettrine]

%\usetypescript [palatino] [ec]

%\switchtotypeface [palatino] [14pt]



\setuplist

[chapter]

[before=\blank,after=\blank,style=bold]

\setuplist

[section]

[alternative=d,left=(,right=),pagestyle=slanted,prefix=no]


\setupheader[style=\sc,color=gris]

\setupfooter[style=\sc]

\setupheadertexts[Ilíada][pagenumber]

\setupfootertexts[chapter][]

\setupinteraction[state=start]

\setupcolors[state=start]

\setuppagenumbering [location=,alternative=doublesided]

\setupinmargin[style=\bfx]

\definecolor [gris] [s=0.50]

\definecolor[grisoscuro][s=0.40]


\setuphead

[chapter]

[color=darkblue,numberstyle=bold,alternative=inmargin,

textstyle={\bf\sc},

before=\hairline\blank,

after=\nowhitespace\hairline]

\setuphead

[section]

[color=grisoscuro,numberstyle=bold,

textstyle={\sc\bf}]

\setuphead

[subsection]

[color=grisoscuro,textstyle=\sc]


%\define[2]\dos{%

% \bTABLE

% \setupTABLE[align=middle]

% \setupTABLE[r][1][style=\**small]

% \setupTABLE[r][2][style={\**small\small\em}]

% \bTR\bTD#1\eTD\eTR

% \bTR\bTD#2\eTD\eTR

% \eTABLE

% }



\unexpanded\def\dos#1#2%

{\dontleavehmode

\begingroup

\setbox0\struttedbox{\ix\em#1}%

\setbox2\struttedbox{\localgreek{#2}}%

\ifdim\wd0\wd2

\setbox2\hbox to \wd0{\hss\box2\hss}%

\else

\setbox0\hbox to \wd2{\hss\box0\hss}%

\fi

\box0

\kern-\wd2

\raise\lineheight\box2

\endgroup}

\indenting[never]

\setuplinenumbering[step=5]



\starttext

\chapter{Canto 1}


\startlinenumbering[]

\dos{La cólera}{M~hnin} \dos{canta}{'aeide} \dos{diosa}{je`a} \dos{del
hijo de Peleo}{Phlhi'adew} \dos{Aquiles}{Aqil~hoc}\crlf

\dos{funesta,}{oulom'enhn,} \dos{la que}{`h} \dos{muchos}{mur'i''} \dos{a
los aqueos}{Aqaio~ic} \dos{dolores}{'alge''} \dos{impuso,}{'ejhke,}\crlf

\dos{y muchas}{poll`ac d''} \dos{generosas}{ifj'imouc} \dos{almas}{yuq`ac}
\dos{al Hades}{'Aidi} \dos{arrojó}{pro'iayen} \crlf

\dos{de héroes,}{hr'wwn,} \dos{y a ellos}{auto`uc d`e}
\dos{despojos}{el'wria} \dos{hizo}{te~uqe} \dos{para los
perros}{k'unessin} \crlf

\dos{y las aves rapaces}{oiwno~is'i te} \dos{todas,}{p~asi,} \dos{de
Zeus}{Di`oc} \dos{-}{d''} \dos{se cumplía}{etele'ieto} \dos{el
plan,}{boul'h,} \crlf

\dos{desde}{ex} \dos{que}{o~u} \dos{ya}{d`h} \dos{a lo}{t`a}
\dos{primero}{pr~wta} \dos{se distanciaron}{diast'hthn}
\dos{disputando}{er'isante} \crlf

\dos{el hijo de Atreo}{Atre'idhc} \dos{-}{te} \dos{soberano}{'anax}
\dos{de hombres}{andr~wn} \dos{y}{ka`i} \dos{el divino}{d~ioc}
\dos{Aquiles.}{Aqille'uc.} \crlf

\dos{¿Quién}{T'ic} \dos{entonces}{t'ar} \dos{a ellos}{sfwe} \dos{de los
dioses}{je~wn} \dos{a la riña}{'eridi} \dos{lanzó}{xun'ehke} \dos{a
combatir?}{m'aqesjai?}\crlf

\dos{De Leto}{Lhto~uc} \dos{y}{ka`i} \dos{de Zeus}{Di`oc} \dos{el
hijo;}{ui'oc;} \dos{éste}{`o} \dos{pues}{g`ar} \dos{con el
rey}{basil~hi} \dos{encolerizado}{qolwje`ic} \crlf

\dos{una peste}{no~uson} \dos{por}{an`a} \dos{el campamento}{strat`on}
\dos{provocó}{'orse} \dos{mala,}{kak'hn,} \dos{y morían}{ol'ekonto d`e}
\dos{las huestes,}{lao'i,} \crlf

\dos{porque}{o'uneka} \dos{a aquel}{t`on} \dos{Crises}{Qr'ushn}
\dos{deshonró}{ht'imasen} \dos{al sacerdote}{arht~hra} \crlf

\dos{el hijo de Atreo;}{Atre'idhc;} \dos{éste}{`o} \dos{pues}{g`ar}
\dos{llegó}{~hlje} \dos{rápidas}{jo`ac} \dos{a}{ep`i} \dos{las
naves}{n~hac} \dos{de los aqueos}{Aqai~wn} \crlf

\stoplinenumbering

\stoptext


And there is the error:


\dos ...de \begingroup \setbox 0\struttedbox {\ix

\em #1}\setbox 2\struttedb...

l.78 \dos{La cólera}{M~hnin}

\dos{canta}{'aeide} \dos{diosa}{je`a} \dos{del ...

?


2013/7/3 Wolfgang Schuster schuster.wolfg...@gmail.com


 Am 03.07.2013 um 23:52 schrieb MANUEL GONZALEZ SUAREZ 
 gonzalezsman...@uniovi.es:

 *
 *
 *Hello everyone.*
 *I recently changed from TeXLive 2011 to TeXLive 2013 (Windows Vista) and
 the editor TeXworks. For translations word for word, I have these two codes
 provided by Hans on this list, but none of them works now:*

 *\define[2]\dos{%
 \bTABLE
   \setupTABLE[align=middle]
   \setupTABLE[r][1][style=\**small]
   \setupTABLE[r][2][style={\**small\small\em}]
  \bTR\bTD#1\eTD\eTR
   \bTR\bTD#2\eTD\eTR
 \eTABLE
  }
 And the othe code:*

 *\unexpanded\def\dos#1#2%
{\dontleavehmode
 \begingroup
 \setbox0\struttedbox{#1}%
 \setbox2\struttedbox{#2}%
 \ifdim\wd0\wd2
   \setbox2\hbox to \wd0{\hss\box2\hss}%
 \else
   \setbox0\hbox to \wd2{\hss\box0\hss}%
 \fi
 \box0
 \kern-\wd2
 \raise\lineheight\box2
 \endgroup}*

 *Thank you for your attention.*


 1. Provide a working minimal example.

 2. What doesn’t work or which error message do you get?

 Wolfgang



 ___
 If your question

Re: [NTG-context] Page break in ToC between parts?

2013-06-26 Thread Wolfgang Schuster

Am 26.06.2013 um 16:01 schrieb Sander Maijers s.n.maij...@student.ru.nl:

 Is there an nice way in MKIV to force a page break in the table of contents 
 between items on the parts level (\part)?

It depends on the list alternative but you can try this: 
\setuplist[part][before=\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] Page break in ToC between parts?

2013-06-26 Thread Sander Maijers

On 26-06-13 16:07, Wolfgang Schuster wrote:


Am 26.06.2013 um 16:01 schrieb Sander Maijers s.n.maij...@student.ru.nl:


Is there an nice way in MKIV to force a page break in the table of contents 
between items on the parts level (\part)?


It depends on the list alternative but you can try this: 
\setuplist[part][before=\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
___



This works for me, thanks. I need to rethink it because I prefer to have 
page break between parts (I have two) and not before every part (because 
then I also have one between a few initial titles and the first part). 
I'll try a horizontal rule then, for the same separation effect but more 
unobtrusive.

___
If your question is of interest to others as well, please add an 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] Suppressing page number for part in ToC

2013-06-12 Thread Wolfgang Schuster

Am 12.06.2013 um 12:19 schrieb Sander Maijers s.n.maij...@student.ru.nl:

 How do you suppress/hide the page number in the ToC for Parts, but not for 
 other headers and without removing page numbers from footers anywhere?

\setuplist[part][pagenumber=no]

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] [***SPAM***] unwanted space and error in combination of writebetweenlist and placecontent[criterium= local]

2013-05-12 Thread Zenlima
Hi,

I ran into one error and one problem during building a part as two
columns into the toc.

1. Extra line: I am getting an unwanted extra empty line at the bottom
   of two columns with an even number of total lines - with an odd
   number of total lines no extra empty line appears. How can I get rid
   of it? (see attached example)

2. This error only appears only with \placecontent[criterium=local] in
   combination with a beginning line of \writebetweenlist; with a global
   \placecontent and \writebetweenlist it works fine. To reproduce this
   uncomment the line %\placecontent[criterium=local] in the attached
   example.

(Sorry that I was not able to make the example shorter, I needed some
meat to fill the toc for the showcases)

Thanks,
H. 

--8

\usemodule[subsub]

\definehead[paragraphHead][alternative=myheader,section=section-8,number=no]
\defineheadalternative
  [myheader]
  [alternative=horizontal,
   renderingsetup=setup:myheader]

\startsetups [setup:myheader]
  \inouter{\headtextcontent}
\stopsetups


\setuplist[chapter][style=bold,before=\blank,alternative=b,width=1.5em,color=HeadColor]
\setuplist[section][margin=1.5em,width=2em]
\setuplist[subsection][margin=3.5em,width=3em]
\setuplist[paragraphHead][alternative=c,style=\tfx]

\def\startParagraphTocColumns{%

\writebetweenlist[paragraphHead][location=here]{\setupnarrower[left=2em]\startnarrower[left]\startcolumns[n=2,distance=0mm,balance=yes]}%
\ignorespaces}

\def\stopParagraphTocColumns{%

\writebetweenlist[paragraphHead][location=here]{\stopcolumns\stopnarrower}%
\ignorespaces}

\starttext

\setupcombinedlist[content][list={chapter,section,subsection,textdividerHead,paragraphHead}]
\completecontent

\startParagraphTocColumns

\dorecurse{5}{\paragraphHead{Hasselt makes headlines}
\input tufte}

\stopParagraphTocColumns

\chapter{Lorem ipsum}
\section{Sed eram}

\chapter{Lorem ipsum}
%\placecontent[criterium=local]
\section{Sed eram}
\section{Sed eram}

\startParagraphTocColumns
\dorecurse{5}{\paragraphHead{Hasselt makes headlines}
\input tufte}
\stopParagraphTocColumns

\section{Sed eram}
\section{Sed eram}

\startParagraphTocColumns
\dorecurse{4}{\paragraphHead{Hasselt makes headlines}
\input tufte}
\stopParagraphTocColumns

\section{Sed eram}
\startParagraphTocColumns
\dorecurse{3}{\paragraphHead{Hasselt makes headlines}
\input tufte}
\stopParagraphTocColumns

\section{Sed eram}
\section{Sed eram}

\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] Alternative rendering of some TOC levels

2013-05-04 Thread Wolfgang Schuster

Am 03.05.2013 um 16:27 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:

 Hello,
 
 how to change the way (alternative) how a particular level - e.g. sections 
 - are rendered in TOC?
 
 I tried:
 
 
 \setupcombinedlist
  [content]
  [alternative=c]
 
 \setuplist
  [section]
  [alternative=b]
 
 %\setupcombinedlist
 %  [content]
 %  [section]
 %  [alternative=b]
 
 \starttext
  \placecontent
 
  \chapter{Ch}
\section{Sec}
  \subsection{SSec}
\input knuth
 \stoptext
 
 
 This should change the alternative for section to be b (i.e. page numbers 
 without filling dots), whilst the default look should be alternative c 
 (i.e. dots and page numbers).

When you use \setupcombinedlist to change the alternative values this applies 
to all levels and individual settings are ignored.

The global setup can be better done with \setuplist[alternative=c].

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] Alternative rendering of some TOC levels

2013-05-04 Thread Lukáš Procházka

On Sat, 04 May 2013 09:31:45 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:



Am 03.05.2013 um 16:27 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:


Hello,

how to change the way (alternative) how a particular level - e.g. sections - 
are rendered in TOC?

I tried:


\setupcombinedlist
 [content]
 [alternative=c]

\setuplist
 [section]
 [alternative=b]

%\setupcombinedlist
%  [content]
%  [section]
%  [alternative=b]

\starttext
 \placecontent

 \chapter{Ch}
   \section{Sec}
 \subsection{SSec}
   \input knuth
\stoptext


This should change the alternative for section to be b (i.e. page numbers without filling 
dots), whilst the default look should be alternative c (i.e. dots and page numbers).


When you use \setupcombinedlist to change the alternative values this applies 
to all levels and individual settings are ignored.

The global setup can be better done with \setuplist[alternative=c].

Wolfgang


... OK, thanks for explanation.

Best regards,

Lukas


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Alternative rendering of some TOC levels

2013-05-03 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

how to change the way (alternative) how a particular level - e.g. sections - 
are rendered in TOC?

I tried:


\setupcombinedlist
  [content]
  [alternative=c]

\setuplist
  [section]
  [alternative=b]

%\setupcombinedlist
%  [content]
%  [section]
%  [alternative=b]

\starttext
  \placecontent

  \chapter{Ch}
\section{Sec}
  \subsection{SSec}
\input knuth
\stoptext


This should change the alternative for section to be b (i.e. page numbers without filling 
dots), whilst the default look should be alternative c (i.e. dots and page numbers).

But my code doesn't produce the desired result - all TOC members are using alternative 
c.

What is the true way to achieve it?

TIA.

Best regads,

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 244 062 238
Fax: +420 244 461 038

t.mkiv
Description: Binary data


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

[NTG-context] select TOC elements

2013-04-16 Thread Meer, H. van der
With \placecontents I am able to put the TOC for a chapter right after the 
chapter heading. So far so good. But now I would like to suppress in the 
overall TOC all elements below the chapters. 
How to? 
At the moment I am using \completecontent for calling up the TOC. I looked in 
the ConTeXtGarden but the explanation for \completecontent didn't make me any 
wiser.For example, I do not understand the meaning of the three successive 
[]-pairs in \completecontent[..][..][..] and the link to \setuplist didn't help 
me out.

Hans van der Meer



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] select TOC elements

2013-04-16 Thread Wolfgang Schuster

Am 16.04.2013 um 10:46 schrieb Meer, H. van der h.vanderm...@uva.nl:

 With \placecontents I am able to put the TOC for a chapter right after the 
 chapter heading. So far so good. But now I would like to suppress in the 
 overall TOC all elements below the chapters. 
 How to? 
 At the moment I am using \completecontent for calling up the TOC. I looked in 
 the ConTeXtGarden but the explanation for \completecontent didn't make me any 
 wiser.For example, I do not understand the meaning of the three successive 
 []-pairs in \completecontent[..][..][..] and the link to \setuplist didn't 
 help me out.

The syntax description is wrong, \placecontent has only one optional argument 
which expects a assignment, e.g. alternative=a.

To place only TOC entry for certain headings you have to use \placelist, e.g. 
\placelist[section].

\starttext

\chapter{One}
\placelist[section]
\section{First}
\section{Second}
\chapter{Two}
\placelist[section]
\section{Third}
\section{Fourth}
\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] Deactivating gridsetting for TOC

2013-04-15 Thread Wolfgang Schuster

Am 15.04.2013 um 19:34 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Am 15.04.2013 19:03, schrieb ntg-context-requ...@ntg.nl:
 Is there maybe another trick to deactivate gridsetting, analogical to
 placeongrid, or tricks with tables, or so? I am experimenting here, too,
 of course:)
 
 Huseyin
 
 Ok, maybe it is possible with a combination of \placeongrid and a command, 
 which forces page-break of the toc on specified titles, or lines. Is there a 
 pissibility to manually page-break the toc?

%\setuplayout[grid=yes]

\showgrid

\setuplist[chapter][style=\tfb]
\setuplist[section][style=\tfa]

\starttext

\setuplayout[grid=no]

\completecontent

\page

\setuplayout[grid=yes]

\dorecurse{10}
  {\chapter{Chapter #1}
   \dorecurse{10}
 {\section{Section #1.##1}
  \input ward\par}}

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] float combinations

2013-04-13 Thread Robert Blackstone
Dear all,
A few days ago (10 April 2013, Vol.106, Issue 25) I posted a question about 
giving related but not necessarily adjacent floats the same number, as for 
example Fig. 2a and Fig. 2b.
In the meantime I found a, not very elegant, solution that only partly 
satisfies me.
Here is a working example: (I trust the cow and the mill can be found).
 %---
\useexternalfigure[SmallCow][cow.pdf][height=2cm] 
\useexternalfigure[MediumCow][cow.pdf][height=3cm] 
\useexternalfigure[Mill][mill.png][height=3cm] 
\definelist[figure]
\setuplist[figure][prefix=yes,label=yes,alternative=c]

\starttext
This file is for testing the possibility of giving two related musical examples 
(in old and modern notation respectively) the same figure number with a. and b. 
as suffixes to the number proper. 

\placefigure[here][SmallCow1]{A small cow.}
{\externalfigure[SmallCow]}  

A cow again, in two sizes.

\in{Figure}[SmallCow2]a shows the same cow as \in{Figure}[SmallCow1]. 
\placefigure[here][SmallCow2]{{\bf a}. Another small cow.}
{\externalfigure[SmallCow]} 
And here a larger cow (\in{Figure}[MediumCow1]b).

\setnumber[figure][1]
\placefigure[here][MediumCow1]{{\bf b}. A larger  cow.}
{\externalfigure[MediumCow]} 

And here comes a mill.
\placefigure[here][Mill1]{A mill.}
{\externalfigure[Mill]}  

\page
{\bf List of Figures}
\placelist[figure]
\completecontent
\stoptext 

%
This way a and b become part of the caption text, resulting in: Figure 2
 a  A small ….. etc., and: Figure 2 b  A larger …etc. Likewise in the List 
of Figures. This is not what I would like.

Is there a possibility, when not using Combinations, to get: Figure 2aA 
small …..  etc?

Wherever possible I use Combinations but in some cases examples to be combined 
are very different in size and shape and/or too large to fit on one page 
together, so that one of them gets cut off.
Is there a possibility, when using a combination of figures, to split it, in 
other words, to separate the figures spatially, to allow them to appear on 
consecutive pages, and maybe even allowing some text in between?

Thanks in advance.

Best regards, 

Robert Blackstone



___
If your question is of interest to others as well, please add an 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] single spacing TOC

2013-04-04 Thread john Culleton
On Thu, 4 Apr 2013 06:36:55 +0200
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 03.04.2013 um 21:28 schrieb john Culleton j...@wexfordpress.com:
 
  
  
  Working with TOC layout and the new manual. The default layout
  leaves a blank line between section entries. I want to reduce this
  to zero. I tried this:
  
  \setuplist[section]
  [alternative=a,before=,after=,distance=1pt]
  \completecontent
  
  but this didn't remove the extra space. Hints?
 
 There are no blank lines between the entries.
 
 \starttext
 
 \completecontent
 
 \page
 
 \dorecurse{12}{\section{Section #1}}
 
 \stoptext
 
 Wolfgang

I had a line \setupwhitespace[medium] in the preamble to the
file. I moved it to occur after \startbodymatter and all was fine. 

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.html
___
If your question is of interest to others as well, please add an 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] single spacing TOC

2013-04-03 Thread john Culleton


Working with TOC layout and the new manual. The default layout
leaves a blank line between section entries. I want to reduce this to
zero. I tried this:

\setuplist[section]
[alternative=a,before=,after=,distance=1pt]
\completecontent

but this didn't remove the extra space. Hints?

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.html
___
If your question is of interest to others as well, please add an 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] single spacing TOC

2013-04-03 Thread Wolfgang Schuster

Am 03.04.2013 um 21:28 schrieb john Culleton j...@wexfordpress.com:

 
 
 Working with TOC layout and the new manual. The default layout
 leaves a blank line between section entries. I want to reduce this to
 zero. I tried this:
 
 \setuplist[section]
 [alternative=a,before=,after=,distance=1pt]
 \completecontent
 
 but this didn't remove the extra space. Hints?

There are no blank lines between the entries.

\starttext

\completecontent

\page

\dorecurse{12}{\section{Section #1}}

\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] \setuphead [bodypartlabel=]

2013-03-26 Thread Wolfgang Schuster

Am 26.03.2013 um 19:15 schrieb Alan BRASLAU alan.bras...@cea.fr:

 \setuplabeltext [chapter=Chapter ]
 
 enables a label in chapter headings.
 
 Sometimes, one wants to have an unnumbered chapter-level structure that
 otherwise appears in the table of contents, bookmarks, marking, etc.
 without having to make many special definitions.
 
 One suggests:
 \definehead [NOchapter] [chapter]
 \setuphead [NOchapter] [incrementnumber=no,number=no,bodypartlabel=]
 
 \starttext
 \startNOchapter [title=Introduction]
 \stopNOchapter
 \startchapter [title=First chapter]
 \stopchapter
 \stoptext

\startnamedsection[NOchapter][title=…]
…
\stopnamedsection
\startnamedsection[chapter][title=…]
…
\stopnamedsection

 And then adding NOchapter to the contents combined list, to the
 bookmarks, and so on, not to speak about marking. Ugh!
 
 Much easier would be the occasional use of
 \startchapter [title=Introduction,incrementnumber=no,number=no,bodypartlabel=]
 \stopchapter
 but this does not work! One gets: Chapter Introduction.
 That this does not work I suppose might be somewhat of a bug...
 
 Even better, more coherent, more logical, would be
 \startchapter [title=Introduction,incrementnumber=no,number=no,label=no]
 \stopchapter
 (Note that label=no is used for lists).
 
 This would also have the advantage of allowing the chapter labeltext to be 
 defined
 for each language, rather than be empty, so that it could then be simply 
 turned on or off.

\setuplabeltext[en][chapter=…]
\setuplabeltext[nl][chapter=…]

 In fact, label=no would be the default setup.

\setuplist[chapter][label=yes|no|none|NAME]

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] \setuphead [bodypartlabel=]

2013-03-26 Thread Alan BRASLAU
On Tue, 26 Mar 2013 19:25:27 +0100
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 26.03.2013 um 19:15 schrieb Alan BRASLAU alan.bras...@cea.fr:
 
  \setuplabeltext [chapter=Chapter ]
  
  enables a label in chapter headings.
  
  Sometimes, one wants to have an unnumbered chapter-level structure
  that otherwise appears in the table of contents, bookmarks,
  marking, etc. without having to make many special definitions.
  
  One suggests:
  \definehead [NOchapter] [chapter]
  \setuphead [NOchapter] [incrementnumber=no,number=no,bodypartlabel=]
  
  \starttext
  \startNOchapter [title=Introduction]
  \stopNOchapter
  \startchapter [title=First chapter]
  \stopchapter
  \stoptext
 
 \startnamedsection[NOchapter][title=…]
 …
 \stopnamedsection
 \startnamedsection[chapter][title=…]
 …
 \stopnamedsection
 
  And then adding NOchapter to the contents combined list, to the
  bookmarks, and so on, not to speak about marking. Ugh!
  
  Much easier would be the occasional use of
  \startchapter
  [title=Introduction,incrementnumber=no,number=no,bodypartlabel=]
  \stopchapter but this does not work! One gets: Chapter
  Introduction. That this does not work I suppose might be somewhat
  of a bug...
  
  Even better, more coherent, more logical, would be
  \startchapter
  [title=Introduction,incrementnumber=no,number=no,label=no]
  \stopchapter (Note that label=no is used for lists).
  
  This would also have the advantage of allowing the chapter
  labeltext to be defined for each language, rather than be empty, so
  that it could then be simply turned on or off.
 
 \setuplabeltext[en][chapter=…]
 \setuplabeltext[nl][chapter=…]
 
  In fact, label=no would be the default setup.
 
 \setuplist[chapter][label=yes|no|none|NAME]
 
 Wolfgang

All of this does not take care of handling NOchapter in marking,
bookmarks, contents, etc. Consider:
\setupheadertexts [chapter]
\placebookmarks [chapter,section] [chapter]
\definecombinedlist [content] [chapter,section,subsection]

Nor the fact that labeltext chapter is empty by default,
rather than simply disabled or turned-off.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bibliography (interaction)

2013-03-21 Thread Hans Hagen

On 3/21/2013 10:32 PM, Thomas A. Schmitz wrote:

On 03/21/2013 10:14 PM, Alan BRASLAU wrote:

Hello,

1. Is there some way to enable interaction with bibliographies? (i.e.
hyperlinks from the citations to the list.)

2. Can one create an index of author names, for example, listing the
pages of citations?

Alan


Hi Alan,

1. should work by default when you have \setupinteraction[state=start]
in your document preamble. 2. is not possible, AFAIK.


In principle you could mess with the list as bib's are using them:

\definelist
  [pubs]

\setuplist
  [pubs]
  [\c!state=\v!start,
   \c!criterium=\@@pbcriterium,
   \c!headnumber=\v!always,
   \c!width=]

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
___


Re: [NTG-context] TOC: Chapters with and without page-numbers

2013-03-15 Thread H. Özoguz

Maybe I have not made it clear, what I mean?

My Minexample is:

\setuplist[chapter][pagenumber=no]
\starttext
\completecontent
\chapter{Chapter 1}
\section{Section 1}
\chapter{Chapter 2}
\stoptext

Now Chapter 1 is without pagenumber in the TOC, correct, because it has 
a section after the chapter-title! But Chapter 2 has no sections, so it 
need a page number, how to do that?


Regards,
Huseyin
___
If your question is of interest to others as well, please add an 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] TOC: Chapters with and without page-numbers

2013-03-15 Thread Keith J. Schultz
Hi,

I could find any options to do what you want.

I assume you would have to redefine completecontent command to get
the functionality you need.

I have not checked, but I assume that completecontent accesses a Lua-table
with the TOC information. It should be easy enough to use this table to create
the effect you want.

regards
Keith.

Am 15.03.2013 um 07:46 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Maybe I have not made it clear, what I mean?
 
 My Minexample is:
 
 \setuplist[chapter][pagenumber=no]
 \starttext
 \completecontent
 \chapter{Chapter 1}
 \section{Section 1}
 \chapter{Chapter 2}
 \stoptext
 
 Now Chapter 1 is without pagenumber in the TOC, correct, because it has a 
 section after the chapter-title! But Chapter 2 has no sections, so it need a 
 page number, how to do that?

___
If your question is of interest to others as well, please add an 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] TOC: Chapters with and without page-numbers

2013-03-15 Thread john Culleton
On Fri, 15 Mar 2013 09:07:33 +0100
Keith J. Schultz keithjschu...@web.de wrote:

 Hi,
 
 I could find any options to do what you want.
 
 I assume you would have to redefine completecontent command to get
 the functionality you need.
 
 I have not checked, but I assume that completecontent accesses a
 Lua-table with the TOC information. It should be easy enough to use
 this table to create the effect you want.
 
 regards
   Keith.
 
 Am 15.03.2013 um 07:46 schrieb H. Özoguz h.oezo...@mmnetz.de:
 
  Maybe I have not made it clear, what I mean?
  
  My Minexample is:
  
  \setuplist[chapter][pagenumber=no]
  \starttext
  \completecontent
  \chapter{Chapter 1}
  \section{Section 1}
  \chapter{Chapter 2}
  \stoptext
  
  Now Chapter 1 is without pagenumber in the TOC, correct, because it
  has a section after the chapter-title! But Chapter 2 has no
  sections, so it need a page number, how to do that?
 
 ___
 If your question is of interest to others as well, please add an
 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
 ___


With other versions of TeX (eplain comes to mind) You can edit the
TOC file external to the tex program, and then take a second run
without recording page numbers. There is a command for this.
With Context this might be too complex. 

I see no problem with having a page number on chapter 1 however.
Most books look that way. The Chicago Manual of Style  has:

Proofs (a chapter)   91
Introduction (a section)  91


-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.html
___
If your question is of interest to others as well, please add an 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] TOC: Chapters with and without page-numbers

2013-03-15 Thread Jonathan Barchi
On Fri, Mar 15, 2013 at 11:53 AM, john Culleton j...@wexfordpress.com wrote:
 On Fri, 15 Mar 2013 09:07:33 +0100
 Keith J. Schultz keithjschu...@web.de wrote:

 Hi,

 I could find any options to do what you want.

 I assume you would have to redefine completecontent command to get
 the functionality you need.

 I have not checked, but I assume that completecontent accesses a
 Lua-table with the TOC information. It should be easy enough to use
 this table to create the effect you want.

 regards
   Keith.

 Am 15.03.2013 um 07:46 schrieb H. Özoguz h.oezo...@mmnetz.de:

  Maybe I have not made it clear, what I mean?
 
  My Minexample is:
 
  \setuplist[chapter][pagenumber=no]
  \starttext
  \completecontent
  \chapter{Chapter 1}
  \section{Section 1}
  \chapter{Chapter 2}
  \stoptext
 
  Now Chapter 1 is without pagenumber in the TOC, correct, because it
  has a section after the chapter-title! But Chapter 2 has no
  sections, so it need a page number, how to do that?

 ___
 If your question is of interest to others as well, please add an
 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
 ___


 With other versions of TeX (eplain comes to mind) You can edit the
 TOC file external to the tex program, and then take a second run
 without recording page numbers. There is a command for this.
 With Context this might be too complex.

 I see no problem with having a page number on chapter 1 however.
 Most books look that way. The Chicago Manual of Style  has:

 Proofs (a chapter)   91
 Introduction (a section)  91


 --
 John Culleton
 Wexford Press
 Free list of books for self-publishers:
 http://wexfordpress.net/shortlist.html
 PDF e-book: Create Book Covers with Scribus
 available at http://www.booklocker.com/books/4055.html
 ___
 If your question is of interest to others as well, please add an 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
 ___


I think you may be able to do this with a combination of \setupheads
and \setuphead commands, along with possibly defining a new head that
inherits from chapter (\definehead[name][chapter], then
\setuphead[name]).

I don't really have time to play much with this now, but see the
following links for a bunch more information on the commands above and
on section heads in general. There are several arguments to
setupheads/setuphead that modify how numbering is handled.

1. http://wiki.contextgarden.net/Category:Command/Sections
2. http://wiki.contextgarden.net/Titles

The second article, in particular, has been very helpful for me in
setting up some of the headers for my dissertation.

Jon
___
If your question is of interest to others as well, please add an 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] TOC: Chapters with and without page-numbers

2013-03-15 Thread Wolfgang Schuster

Am 15.03.2013 um 07:46 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Maybe I have not made it clear, what I mean?
 
 My Minexample is:
 
 \setuplist[chapter][pagenumber=no]
 \starttext
 \completecontent
 \chapter{Chapter 1}
 \section{Section 1}
 \chapter{Chapter 2}
 \stoptext
 
 Now Chapter 1 is without pagenumber in the TOC, correct, because it has a 
 section after the chapter-title! But Chapter 2 has no sections, so it need a 
 page number, how to do that?


You can play with the following solution, it’s a bit dirty because you have to 
save the values of the chapter entry before you check for section entries.

\setuplist[chapter][alternative=mychapter]

\definelistalternative[mychapter][renderingsetup=list:mychapter]

\startsetups[list:mychapter]

  \par

  \setbox\scratchboxone\hbox{\currentlistentrynumber \quad 
\currentlistentrytitle \quad \currentlistentrypagenumber}
  \setbox\scratchboxtwo\hbox{\currentlistentrynumber \quad 
\currentlistentrytitle}

  \determinelistcharacteristics[section]

  \ifnum\listlength=0
\box\scratchboxone
  \else
\box\scratchboxtwo
  \fi

  \par

\stopsetups

\starttext
\completecontent
\chapter{Chapter 1}
\section{Section 1}
\chapter{Chapter 2}
\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
___


[NTG-context] TOC: Chapters with and without page-numbers

2013-03-13 Thread H. Özoguz

Hello there,

normally I use

\setuplist[chapter][pagenumber=no]

to prevent pages for chapters in the TOC, because normally (!) after 
every chapter-titel comes a section-title, directly, without text 
between the two titles. And so it is in this case enough to give the 
page-number for the section-titles only.
But now I have an book with one single chapter, which do not have 
sections. So with


\setuplist[chapter][pagenumber=no]

it has no page-number in the TOC. I want to have the page-number for 
this single chapter-title only, but for the other chapter-titles (which 
have section-titles after them) I want still the above setting. How to 
do that?


Thank you!
Huseyin
___
If your question is of interest to others as well, please add an 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] TOC: Chapters with and without page-numbers

2013-03-12 Thread H. Özoguz

Hello there,

normally I use

\setuplist[chapter][pagenumber=no]

to prevent pages for chapters in the TOC, because normally (!) after 
every chapter-titel comes a section-title, directly, without text 
between the two titles. And so it is in this case enough to give the 
page-number for the section-titles only.
But now I have an book with one single chapter, which do not have 
sections. So with


\setuplist[chapter][pagenumber=no]

it has no page-number in the TOC. I want to have the page-number for 
this single chapter-title only, but for the other chapter-titles (which 
have section-titles after them) I want still the above setting. How to 
do that?


Thank you!
Huseyin

PS.: Sorry for sending this question with the wrong email-adress one 
minute before, it awaits moderation, but can be deleted, of course.

___
If your question is of interest to others as well, please add an 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] \startnarrower and ToC

2013-02-07 Thread Marco Patzer
On 2013–02–07 Markus Finke wrote:

 \startnarrower doesn’t work for the left margin in lists. What is
 wrong in my minimal example?

I did not check why it doesn't work. But to add a left margin you
can use:

\setuplist [margin=3cm]


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
___

<    1   2   3   4   5   6   7   8   9   >