Re: [NTG-context] How to use \setuplist for formatting a chapter entry?

2015-02-06 Thread Rob Heusdens

 Am 04.02.2015 um 15:33 schrieb Rob Heusdens robh...@xs4all.nl:


 You have to write a working minimal example for further help.

 Wolfgang


 So this is the example:

 […]

 You can remove the following lines:

 \definefiller[ChapterFiller]

 \define[1]\ChapterNumberToc%
   {Hoofdstuk #1 -- }

 \define[3]\ChapterToc%
  {\vbox{\bf Hoofdstuk #1 -- #2 \filler[ChapterFiller] #3}}

 \define[1]\AppendixToc%
  {Bijlage -- #1}

 \define[1]\BackToc%
{Noten -- #1}

 […]

 and replace these list setups

 \setuplist[chapter][headnumber=yes,style=bold,width=17ex,numbercommand=\ChapterNumberToc]
 %\setuplist[chapter][headnumber=yes,style=bold,alternative=command,command=\ChapterToc]
 \setuplist[appendix][headnumber=no,style=bold,textcommand=\AppendixToc]
 \setuplist[back][headnumber=no,style=bold,textcommand=\BackToc]

 with the following definitions:

 \setuplist [chapter]
 [width=fit,style=bold,numbercommand=\groupedcommand{Hoofdstuk }{ – }]
 \setuplist [appendix] [style=bold,textcommand=\groupedcommand{Bijlage –
 }{}]
 \setuplist [back] [style=bold,textcommand=\groupedcommand{Noten –
 }{}]

 Wolfgang


This works!


Thank you Wolfgang.

I finally completed my document now!

Rob

___
If your question is of interest to others as well, please add an 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] How to use \setuplist for formatting a chapter entry?

2015-02-04 Thread Rob Heusdens

 You have to write a working minimal example for further help.

 Wolfgang


So this is the example:

\setupinteraction[state=start]

\definehead[intro][chapter]
\definehead[back][chapter]
\definehead[appendix][chapter]

\definecombinedlist[content][chapter,intro,appendix,back]
\setupcombinedlist[content][alternative=c]


\setupheadtext[content=Inhoud]
\setupheadtext[chapter=Hoofdstuk]
\setupheadtext[appendix=Bijlage]
\setupheadtext[back=Noten]

\definefiller[ChapterFiller]

\define[1]\MyContentCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]\Word{#1

\define[1]\MyIntroCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]\Word{#1

\define[2]\MyChapterCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]{\small \headtext{chapter}
#1}\blank\unhyphenated{#2

\define[1]\MyAppendixCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]{\small \headtext{appendix}}\blank\unhyphenated{#1

\define[1]\MyBackCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]{\small \headtext{back}}\blank\unhyphenated{#1

\definefiller[ChapterFiller]

\define[1]\ChapterNumberToc%
 {Hoofdstuk #1 -- }

\define[3]\ChapterToc%
{\vbox{\bf Hoofdstuk #1 -- #2 \filler[ChapterFiller] #3}}

\define[1]\AppendixToc%
{Bijlage -- #1}

\define[1]\BackToc%
{Noten -- #1}

\setuphead[intro][number=no,header=nomarking,command=\MyIntroCommand]
\setuphead[chapter][header=nomarking,command=\MyChapterCommand,aligntitle=yes,align={flushleft,nothyphenated,verytolerant}]
\setuphead[title][command=,textcommand=\MyContentCommand]
\setuphead[appendix][number=no,header=nomarking,command=,textcommand=\MyAppendixCommand,align={flushleft,nothyphenated,verytolerant}]
\setuphead[back][number=no,header=nomarking,command=,textcommand=\MyBackCommand,align={flushleft,nothyphenated,verytolerant}]

\setuplist[chapter][headnumber=yes,style=bold,width=17ex,numbercommand=\ChapterNumberToc]
%\setuplist[chapter][headnumber=yes,style=bold,alternative=command,command=\ChapterToc]
\setuplist[appendix][headnumber=no,style=bold,textcommand=\AppendixToc]
\setuplist[back][headnumber=no,style=bold,textcommand=\BackToc]

\starttext
\completecontent
\startfrontmatter
\intro{Intro}
\stopfrontmatter
\startbodymatter
\dorecurse{5}{
\chapter {Knuth} \input knuth
\chapter {Zapf}  \input zapf}
\stopbodymatter
\startappendices
\appendix{Appendix}
\stopappendices
\startbackmatter
\back{Back}
\stopbackmatter
\stoptext

As you can see, starting from chapter 10 (there are 21 chapters in the
real document) there is now no space between the endash and the title,
like it is for the first 9 chapters.

So, instead of using the numbercommand for the \setuplist[chapter] I tried
using:

\setuplist[chapter][headnumber=yes,style=bold,alternative=command,command=\ChapterToc]

(by uncommenting that line and commenting out the old \setuplist[chapter]

with the command \ChapterToc already defined in the MWE.

However, that does not produce the desired result.

Can you give a clue?

Thanks,

Rob

___
If your question is of interest to others as well, please add an 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] How to use \setuplist for formatting a chapter entry?

2015-02-03 Thread Rob Heusdens
Hello list,

I have one little problem that I need to solve to finish my work on a
document. I want to format a list entry for the TOC for chapters like
this:

Hoofdstuk #1 -- #2 . . . . . . . . #3

Where #1 is the chapter number, #2 is the title and #3 the page number
where the chapter begins.

Of course the . . .  entry is just like the normal cases where the dots
fill the rest of the line.

I have an *almost* correct solution using numbercommand and setting the
width for the title, but this leaves a gap between the formatted chapter
number and the title, because chapter 9 and chapter 10 don't take the
same width.

So, some other solution is needed. I tried using the command option, which
needs 3 arguments, but could not get it to work.

Here is how it looks now:

\define[1]\ChapterNumberToc%
 {Hoofdstuk #1 -- }

\definecombinedlist[content][chapter]
\setupcombinedlist[content][level=4, alternative=c]
\setuplist[chapter][headnumber=yes,style=bold,width=8em,numbercommand=\ChapterNumberToc]
\starttext
\completecontent
\dorecurse{5}{
\chapter {Knuth} \input knuth
\chapter {Zapf}  \input zapf}
\stoptext

As you can see, there is a different between the 9-th and 10-th chapter,
because title is set at a specific width, and doesn't adapt to the width
of the formatted chapter number entry.

How to solve this, so that the title is placed directly after the
Hoofdstuk #1 --  entry, thereafter the filler with dots and finally the
page number at the location where it is now.

Thanks,

Rob

___
If your question is of interest to others as well, please add an 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] How to use \setuplist for formatting a chapter entry?

2015-02-03 Thread Rob Heusdens

 You have to write your own layout for the complete list entry. When you
 don’t
 need hyperlinks for the list entries you can use “alternative=command”
 instead
 of “alternative=interactive” for \setuplist.

 \setupcombinedlist[content][list=chapter]

 \definefiller[ChapterFiller]

 \define[3]\ChapterListEntry
   {\vbox{Hoofdstuk #1 – #2 \filler[ChapterFiller] #3}}

 \setuplist[chapter][alternative=interactive,command=\ChapterListEntry]

 \starttext
 \completecontent
 \dorecurse{5}{
 \chapter {Knuth} \input knuth
 \chapter {Zapf}  \input zapf}
 \stoptext

 Wolfgang


Hello Wolfgang,

The example works. However, if I do the same changes you made to my
example to my actual document, the result is different for some reason.

The chapter entry in the list (TOC) gets printed like:

#1   #2 . . . . . . . . . . .  #3

So the Hoofdstuk and  --  element is not printed, and title is on a
fixed position. The entry IS interactive (printed green but not bold).

Here are my changes (replaced \ChapterToc for \ChapterListEntry)

\definefiller[ChapterFiller]

\define[3]\ChapterToc%
{\vbox{\bf Hoofdstuk #1 -- #2 \filler[ChapterFiller] #3}}

\setuplist[chapter][alternative=interactive,command=\ChapterToc]

And my list is defined like this:

\definecombinedlist[content][chapter,section,intro,summary,appendix,back]
\setupcombinedlist[content][level=4, alternative=c]

I don't understand why making the same changes you did to the example,
performed on my document, makes a difference.

Can other \setuplist  definitions have something to do with it?

Here are some other definitions I used:

\definehead[intro][chapter]
\definehead[back][chapter]
\definehead[appendix][chapter]
\definehead[summary][section]


\setuplist[chapter][alternative=interactive,command=\ChapterToc]
\setuplist[section][headnumber=no]
\setuplist[summary][headnumber=no]
\setuplist[appendix][headnumber=no,style=bold,textcommand=\AppendixToc]
\setuplist[back][headnumber=no,style=bold,textcommand=\BackToc]


Entries for appendix chapter and back chapter get printed correctyly but
they don't have chapter number, only normal chapters have that.

Still puzzled by this...

Rob

___
If your question is of interest to others as well, please add an 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] How to use \setuplist for formatting a chapter entry?

2015-02-03 Thread Rob Heusdens

 Remove the line above (the level key down’t work with MkIV) and use
 \setuplist
 to set “alternative=c” for the list entries where you want to apply
 this layout.

 Wolfgang


I commented out the \setupcombinedlist  command and placed alternative=c
into the other \setuplist  entries (except for \setuplist[chapter] which
has alternative=interactive

Then the result is even worse:

* the Introduction entry gets printed strangely like this:
[intro: — Inleiding — 13]

* the chapther entries are NOT interactive (black instead of green, but do
have bold), and while containing the right entries, they are indented to
the right. Other entries do print ok.

If I also set alternative=c for the chapter list entry, the other errors
go away, but the chapter line again looks like this:

#1   #2 . . . . . #3

and interactive (green) but not bold.

Still puzzled.

Rob

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens

 Am 31.01.2015 um 17:42 schrieb Rob Heusdens robh...@xs4all.nl:

 \starttitlepagemakeup
 BIG TITLE
 \stoptitlepagemakeup % - empty page inserted after here, so page number
 becomes 5
 \setcounter[userpage][5] % - without this, the page number = 3

 You don’t need this manual setting for the pagenumber when you set
 „pagestate=start”
 for the markup environment. Below you can see that the second makeup
 environment
 increments the page number.

 \starttext

 \startmakeup[standard]
 Standardmakeup page
 \stopmakeup

 \input knuth

 \startmakeup[standard][pagestate=start]
 Standardmakeup page
 \stopmakeup

 \input knuth

 \stoptext

 Wolfgang



Wolfgang

Thank you.

But the real issue is still that page jumps from the interactive table of
contents (at least, only those I have tried and noticed their
misbehaviour) are always off by 1 page too far.

I will try to make a MWE for this (the other code I sent, did not expose
the error), and will try to see if \enabletrackers can point me to where
the problem might be located (but first I have some other glitches I need
to repair).

greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 Hi Rob,

 there is a minimal sample:

 \setupcolors[state=start]
 \setupinteraction[state=start, focus=standard]
 \setupinteractionscreen[width=fit]
 \definecombinedlist[content][all]
 \setuphead[part][placehead=yes]
 \starttext
 \completecontent
 \dorecurse{5}
 {\part{Part}
 \input zapf
 \chapter{Chapter}
 \input zapf
 \section{Section}
 \input zapf
 \subsection{Subsection}
 \input zapf}
 \stoptext

 It doesn’t show what you meant, the link destination is not on the
 heading itself, but on the next paragraph.

 I think this should be improved. And I guess it goes unnoticed, because
 after clicking on a link, the browser fits view to page.

 Can anyone guid me on where to look or what to try to solve this nasty
 problem?

 All you can do is to copy your file to a temporary version and start
 commenting commands from the preamble in that temporary version.

 This is trial and error. Remove individual commands from preamble,
 compile the document and check the error.

 When the error dissapeared, you have probably found its cause. If you
 report it to the mailing list, people will tell whether it is a bug or
 your code needs improvements.

 Don’t do any other changes to that temporary file. After the bug
 hunting, you should delete that file.

 Sorry, but (I’m afraid) this is the best way I know to hunt undefined
 bugs.

 I hope it helps,


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

The code looks likes this, but this examples does not exhibit the same
faulty off-by-1-page interactive page jump behaviour. In the chapters in
the body matter, always directly after a new chapter a section begins (in
this example omitted).

\setupinteraction[state=start]
\setuppagenumbering[location=,alternative=doublesided]
\definemakeup
  [titlepage]
  [align=middle,style=\bf]
\starttext
\startfrontmatter
Small title
\page
\phantom{x}\vfill
Colofon
\page
\starttitlepagemakeup
BIG TITLE
\stoptitlepagemakeup % - empty page inserted after here, so page number
becomes 5
\setcounter[userpage][5] % - without this, the page number = 3
\setuppagenumbering[location={footer,middle}]
\completecontent
\chapter{Introduction} \dorecurse{4}{\input zapf}
\stopfrontmatter
\startbodymatter
\setuppagenumbering[location={header,middle}]
\dorecurse{21}{\chapter{Knuth} \dorecurse{10}{\input knuth}}
\stopbodymatter
\startappendices
\chapter{Appendix} \dorecurse{4}{\input zapf}
\stopappendices
\startbackmatter
\chapter{Notes} \dorecurse{4}{\input zapf}
\stopbackmatter
\stoptext

I'#314;l start trying \enabletrackers...

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 such references don't use user pagenumbers (often automated references
 use internal numbers or real page numbers or a symbolic name)

 so, either something is really wrong or your browser is bad

 Hans

Hans,

No, it can't be a browser thing (I think). In  the code I sent, using the
same setups and document structure as the actual document, the browser
jumpt to the correct page. So it is not the browser which is in error,
supposedly.

I will try to make a minimal example that exposes the same behaviour, but
so far I could not reproduce it (and working on some other glitches that
needs repair, so it may take some time).

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 On 01/31/2015 05:42 PM, Rob Heusdens wrote:
 [...]
 The code looks likes this, but this examples does not exhibit the same
 faulty off-by-1-page interactive page jump behaviour. In the chapters in
 the body matter, always directly after a new chapter a section begins
 (in
 this example omitted).

 Hi Rob,

 include in your preamble the following command to avoid makeups not
 being numbered as pages:

 \setupmakeup[pagestate=start]

 So you don’t have to worry about setting counters for userpage.

 I don’t see any special problem here.

 You could define a colophon makeup for the colophon:

 \definemakeup[colophon][bottom=]

 (BTW, I thought colophons were at the end of the book.)

 I wonder what makes your links point to the next page from their
 destinations.

 BTW, which OS and PDF interpreter are you using?


 Pablo


Hello Pablo,

The problem is NOT that the pagenumber as displayed on the page and the
page counter in the viewer ar not in sync (because that is repairable by
either setting the pagestate=start in the makeup, or by setting the page
counter directly, as I did as temoporary workaround).

The problem is that the viewer sends me to the wrong page (always off by 1
page too far) in the interactive table of contents.

So far I have not figured out where to look for, or make a MWE that
exposes the same problem.

The code I sent, resembling the setups I use and document structure I use,
did NOT expose that error, so I conclude that the problem is (most likely)
not viewer related.

I use an Evince Document Viewer 3.10.3 on Ubuntu.

If I have time I will use the \enabletrackers to see if that can direct me
to where the problem may be located.

Greetings  thanks,

Rob




___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 On 01/31/2015 07:28 PM, Rob Heusdens wrote:
 [...]
 If I have time I will use the \enabletrackers to see if that can direct
 me
 to where the problem may be located.

 Hi Rob,

 \enabletrackers[*destinations*] will visually display (adding a grey
 background to) the destination where the link points to.

 I’m afraid that I won’t be surprised that the trackers display the
 areas
 where destinations are supposed to be, but actual destinations are
 different. (I would be happy to be proven wrong.)

 Checking it is really simple. At first, I thought I had to dive into the
 log file, but the PDF document itself shows the results.

 Just in case it helps,


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


Hello Pablo,

I am sorry, I had not yet tried the \enabletrackers...

Anyway, the problem resides in the settings for \setupinteraction which I
use to set the page in the viewer to fit the width. Unfortunately is also
leads to the off by one page too far error.

If I omit those settings, it jumps to the right page, but then
unfortunately does not do fit width but fit height (which is not what I
want...).


Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 focus=width is the problematic part. Replace it with focus=standard
 and it will work better (it isn’t perfect either [there is a bug
 reported before]).

 \enabletrackers[*destinations*]
 \setupinteraction[state=start, focus=standard]
 \starttext
 \completecontent
 \chapter{Chapter}
 \dorecurse{5}{\input knuth}
 \stoptext

 It took me a while to realized the problem, because I didn’t have
 continious view enabled in evince.

 I hope it is solved now.

 Best,


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


In other words the focus=width option causes the bug, and the workaround
is to set it to focus=standard, so at least you go to the right page

Well that is at least a solution for publicing my material.

But I hope one day someone finds time to repair the bug.

Thanks,

Rob

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 On 01/31/2015 01:36 PM, Hans Hagen wrote:
 On 1/31/2015 1:12 PM, Pablo Rodriguez wrote:
 [...]
 It doesn’t show what you meant, the link destination is not on the
 heading itself, but on the next paragraph.

 \enabletrackers[*references*]
 \enabletrackers[*destinations*]

 Hi Hans,

 many thanks for your reply.

 I’m afraid there might be something wrong with this. I have been using
 poppler-glib-demo to check it (and this is the first time I use it, so I
 might be wrong as well).

 The minimal sample:

 \enabletrackers[*destinations*]
 \setupinteraction[state=start, focus=standard]
 \setupinteractionscreen[width=fit]
 \starttext
 \completecontent
 \chapter{Chapter}
 \stoptext

 Link destination for “Chapter” seems to be:

  /D [27 0 R /XYZ 70.867 689.409 null]

 But both chapter headings are placed at x,y (70.87, 122.22), according
 to poppler-glib-demo.

 Anyway, there is a proof that something might be rotten, because the
 link itself has a higher box (an it is lower in the page):

  /Subtype /Link /Dest (#2) /F 4
 /Rect [70.867 652.344 496.06 666.772] /Border [0 0 0]

 I cannot give a more accurate description (the PDF spec is all Greek to
 me), but I think there is something wrong with link destinations (they
 seem to be lower than they should be).

 BTW, does the sample above work right with Adobe? (I’m don’t have it
 installed.) It doesn’t work with either evince-3.10.3 or mupdf-1.6.

 I think this should be improved. And I guess it goes unnoticed, because
 after clicking on a link, the browser fits view to page.

 this is also a bit browser dependent i think

 I guess this is caused by the link destination syntax (section 12.3.2.2
 of the PDF specification).

 Withouth specifying focus=standard in the sample above, the link is:

  /Subtype /Link /Dest [13 0 R /Fit] /F 4
 /Rect [70.867 652.344 496.06 666.772] /Border [0 0 0]

 /Fit specifies that the page should be so that its entire width and
 height are magnified enough so that they fit in the window.

 Having said that, I cannot see why it makes sense that ConTeXt generates
 documents with this default.

 I mean, the default paper size is A4, if the default behavior after
 cliciking on a link is to fit page height (or width in landscape), one
 needs a huge screen not to render the text unreadable.

 Sorry, but I cannot see the gain in this default. Would it be possible
 that the default would be the behaviour set by focus=standard?

 Could you consider both suggestions?

 Many thanks for your help,


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



What I forgot to include in the code ex, was this settings:

\setupinteraction
  [state=start,
  title={Leerboek politieke economie},
  subtitle={politieke economie},
  author={Academie der Wetenschappen van de Sovjet-Unie},
  keyword={economie, politieke economie, marxisme, marxisme-leninisme},
  openaction=FitWidth,
  focus=width,
  date={31 januari 2015}]

I will replace this with:

\setupinteraction[state=start]

and see if that makes a difference...

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-31 Thread Rob Heusdens
 focus=width is the problematic part. Replace it with focus=standard
 and it will work better (it isn’t perfect either [there is a bug
 reported before]).

 \enabletrackers[*destinations*]
 \setupinteraction[state=start, focus=standard]
 \starttext
 \completecontent
 \chapter{Chapter}
 \dorecurse{5}{\input knuth}
 \stoptext

 It took me a while to realized the problem, because I didn’t have
 continious view enabled in evince.

 I hope it is solved now.

 Best,


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


 In other words the focus=width option causes the bug, and the workaround
 is to set it to focus=standard, so at least you go to the right page

 Well that is at least a solution for publicing my material.

 But I hope one day someone finds time to repair the bug.

 Thanks,

 Rob

One last word on this...

Actually the focus=standard is fine, it keeps the viewer in the same
status (fit width or fit height) as you had when clicking on the link.

So this works fine.

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-01-31 Thread Rob Heusdens
When using \setuphead[section][alternative=text] I noticed two things:

1. There is an extra space (horizontally) directly after the section
heading. I can't get a grip on how to get rid of it.
2. A different type of section (define with \definehead[summary][section]
seems to alter it's behaviour due to a \setuphead[section][..]. Shouldn't
the summary behaviour be independend of what one sets for section?

Here is a MWE that shows the problem:

example 1:

\defineblank[sprong][.5cm]
\definehead[summary][section]
\setuphead[section][number=no,style=bold,before={\blank[sprong]},after=,alternative=text,indentnext=no]
\setuphead[summary][number=no,style=bold,before=,after={\blank[sprong]},beforesection={\noindentation\page\starttextbackground[SummaryBackground]},aftersection={\stoptextbackground\page}]
\setupwhitespace[none]
\setupindenting[yes, small, next]
\definetextbackground
  [SummaryBackground]
  [frame=off,frameoffset=0pt,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex]
\starttext
\section{First sentence. Second sentence.}\input zapf
\summary{Summary}\input zapf
\stoptext


example 2:

\defineblank[sprong][.5cm]
\definehead[summary][section]
\setuphead[section][number=no,style=bold,before={\blank[sprong]},after=,alternative=text,indentnext=no]
\setuphead[summary][number=no,style=bold,before=,alternative=paragraph,after={\blank[sprong]},beforesection={\noindentation\page\starttextbackground[SummaryBackground]},aftersection={\stoptextbackground\page}]
\setupwhitespace[none]
\setupindenting[yes, small, next]
\definetextbackground
  [SummaryBackground]
  [frame=off,frameoffset=0pt,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex]
\starttext
\section{First sentence. Second sentence.}\input zapf
\summary{Summary}\input zapf
\stoptext

Adding [alternative=paragraph] for summary solves this problem, and is at
least a workaround, but that should not be necessary.

My main problem though is how to get rid of that extra horizontal space
after the normal section heading. The next sentence should align just like
the section is a normal sentence itself (only typeset as bold).

Is there a solution for that?

Many thanks.

Greeting,

Rob

-- attached (example 1 = test5a.pdf; example 2 = test5b.pdf)

test5a.pdf
Description: Adobe PDF document


test5b.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-01-31 Thread Rob Heusdens
I forgot to add the basic example, with neither for section nor for
summary an option set in \setuphead[..] for alternative.

So, read this as example 0: = test5.pdf

Example 0:

\defineblank[sprong][.5cm]
\definehead[summary][section]
\setuphead[section][number=no,style=bold,before={\blank[sprong]},after=,indentnext=no]
\setuphead[summary][number=no,style=bold,before=,after={\blank[sprong]},beforesection={\noindentation\page\starttextbackground[SummaryBackground]},aftersection={\stoptextbackground\page}]
\setupwhitespace[none]
\setupindenting[yes, small, next]
\definetextbackground
  [SummaryBackground]
  [frame=off,frameoffset=0pt,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex]
\starttext
\section{First sentence. Second sentence.}\input zapf
\summary{Summary}\input zapf
\stoptext



Example 0 = Example 1

Setting the alternative=text for section also causes a change in behaviour
of the summary section.


test5c.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] More headache with \setuphead

2015-01-31 Thread Rob Heusdens
Related post:
section with \sethupead[section][alternative=text]; other type of section
misbehaves..


Hello list,

It seems I have more problems with \setuphead, which I can't get hold on.

This time content misbehaves in way I can't understand.

Here are the relevant definitions/commands:

\setuphead[chapter]
   [header=nomarking,
   command=\MyChapterCommand,
   aligntitle=yes,
   align={flushleft,nothyphenated,verytolerant}]

\setuphead[content]
   [command=,
textcommand=\MyContentCommand]

What I expect this set of definitions to do is to indeed perform
\MyChapterCommand for a chapter to typeset the title of a chapter.

For the table of contents, I hoped that it would not do the command, which
I set for chapter (by clearing that option with =,), and instead perform
the textcommand \MyContentCommand.

However from my output it is clear that the table of content still does
\MyChapterCommand.

As a workaround, I postponed setting \setuphead for chapter till after the
content.

But why does this not work?

Even if content is supposedly doing the same thing as chapter does, it I
make thereafter changes to content, and in fact undo the command setting
and instead direct it to perform a textcommand, I don't expect it to still
perform \MyChapterCommand. But it does that.

Below the definitions for both commands:

\define[1]\MyContentCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]\Word{#1


\define[2]\MyChapterCommand%
  {\framed[frame=off,offset=none,frameoffset=0pt]
 {\vbox{\blank[4cm]{\small \headtext{chapter}
#1}\blank\unhyphenated{#2


Can anyone advise?

Thanks,

Rob

___
If your question is of interest to others as well, please add an 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] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-01-31 Thread Rob Heusdens
 On 01/31/2015 09:37 PM, Rob Heusdens wrote:
 When using \setuphead[section][alternative=text] I noticed two things:

 1. There is an extra space (horizontally) directly after the section
 heading. I can't get a grip on how to get rid of it.

 Hi Rob,

 distance=1ex (or similar) should do the job.

I'll try that. Thanks!


 2. A different type of section (define with
 \definehead[summary][section]
 seems to alter it's behaviour due to a \setuphead[section][..].
 Shouldn't
 the summary behaviour be independend of what one sets for section?

 If you define summary as a duplicate of section, the former will inherit
 properties from the latter.

 All you have to do is refine the unwanted features in summary.

 A very stupid example:

 \definehead[summary][section]
 \setuphead[section][number=no,style=\bf]
 \setuphead[summary][number=yes, style=\it]
 \starttext
 \section{Section}
 \summary{Summary}
 \stoptext

 BTW, alternative=paragraph puts the heading in a separate paragraph in
 latest beta.

 Just in case it helps,


Are you sure that is the way it is supposed to work?

My interpretation of it would be that:

First, once you have defined summary with \define[summary][section], at
that moment in time it has the properties set to whatever section has.

But afterwards, the objects section and summary should lead seperate
lives so to speak, and making adjustments to one, should not result in
changes to the other. At least, that is how I understood it to be, and
seems to me logical. If that is not the way it is implemented, I think

Or, in ordinary programming languages syntax as metaphor.

int y = 1;
int x = y;
y = 4;
printf(y = %d, x = %d\n, y, x);

will print y = 4, x = 1

Since changing y won't change the value of x.

However, if we change the order of statements:

int y = 1;
y = 4;
int x = y;
printf(y = %d, x = %d\n, y, x);

then of course, x will print as 4, because x got it's value AFTER we
already changed y. But after assigning the value of y to x, any changes of
y won't effect x.

So that is how I understand statements in Context like this:

\definehead[summary][section]
\setuphead[section][alternative=text]
\setuphead[summary][style=\bf]

to be, namely that setting alternative to text for section, does NOT
change the value of summary for section.

\setuphead[section][alternative=text]
\definehead[summary][section]
\setuphead[summary][style=\bf]

However in the above case, when we change the order of definitions,
section is already changed BEFORE we assign it to summary, and THEN of
course, also summary acquires those properties from section.

At least such a behaviour would seem to me the most logical and intuitive
behaviour. I didn't expect for summary to behave differently because I
changed section. section and summary should behave like independend
objects.


But maybe that is NOT the way it works in Context?  I think that would be 
unintuitive, since it would cause unwanted side effect. Who wants that?

If you want to have summary inherit some properties from section, then you
first set those properties to section and only THEN you define summary as
to be some other section, inherting the properties from section as they
exist at the moment you define summary.

Anything that occurs later to section should not change the behaviour of
summary.

But maybe for good reasons I don't quite understand, Context implements
this differently.

At least I think such 'unexpected' behaviour (for me at least, coming from
a programming background it is), should be cleary documented on the wiki.

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Grey background for pages belonging to last section of every chapter

2015-01-30 Thread Rob Heusdens
Hello list,

For the last section of every chapter I want a grey background for the
text, which otherwise should look the same as every other section, except
that it starts on a new page (I can set that by defining my own section
command).

The last section summarizes the chapter.

My current implementation is using a frame:


\defineframed[achtergrond]
[frame=off,
background=color,
backgroundcolor=gray,
width=fit,
height=fit,
offset=2ex,
align={flushleft,nothyphenated,verytolerant}]

And use it as:

\achtergrond{
\section{Last section}

\startitemize[n]
\item ...
\stopitemize
}

But this does not accomodate sections longer then a page. And I can't
place \page command in the middle of an itemize, and using \stopitemize,
\startitemize[continue] makes the pages vary in sizes.

Is there some way to achieve the desired effect (grey background behind
the text, and otherwise page layour identical to other sections) without
the problem that text exceeds the page size?

Greetings,

Rob

PS. The defined frame is also used elsewhere, but the last section should
in fact not have normal alignment like the other sections.


___
If your question is of interest to others as well, please add an 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] Grey background for pages belonging to last section of every chapter

2015-01-30 Thread Rob Heusdens
 Hello list,

 For the last section of every chapter I want a grey background for the
 text, which otherwise should look the same as every other section, except
 that it starts on a new page (I can set that by defining my own section
 command).

 The last section summarizes the chapter.

 My current implementation is using a frame:


 \defineframed[achtergrond]
 [frame=off,
 background=color,
 backgroundcolor=gray,
 width=fit,
 height=fit,
 offset=2ex,
 align={flushleft,nothyphenated,verytolerant}]

 And use it as:

 \achtergrond{
 \section{Last section}

 \startitemize[n]
 \item ...
 \stopitemize
 }

 But this does not accomodate sections longer then a page. And I can't
 place \page command in the middle of an itemize, and using \stopitemize,
 \startitemize[continue] makes the pages vary in sizes.

 Is there some way to achieve the desired effect (grey background behind
 the text, and otherwise page layour identical to other sections) without
 the problem that text exceeds the page size?

 Greetings,

 Rob

 PS. The defined frame is also used elsewhere, but the last section should
 in fact not have normal alignment like the other sections.




What perhaps fixes this problem is defining my own section command like this:

\definehead[summary][section]

\setuphead[summary]
 [
 number=no,
 style=bold,
 before={\page\setupbackgrounds[text][text][state=start]
   [background=color,backgroundcolor=gray]},
 after={\setupbackgrounds[text][text][state=stop]}
 ]

According to the wiki
(http://wiki.contextgarden.net/Command/setupbackgrounds) that should work,
but Context doesn't seem to understand the syntax and prints the part:
[background=color,backgroundcolor=gray] before the section title.

What did I do wrong?

Greetings,

Rob



___
If your question is of interest to others as well, please add an 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] Strange bug in interactive table of content...

2015-01-30 Thread Rob Heusdens
 On 01/30/2015 04:02 PM, Rob Heusdens wrote:
 [...]
 I am using a recent version.
 [...]
 So, I should upgrade to the newest beta?

 Using a beta from 2014.11.26 21:43 shows the bug you described.

 Upgrading to latest beta makes sense in this case.

 If you allow me an opinion, I try to keep ConTeXt updated (I have just
 updated it), so I can enjoy the latest features and report the possible
 issues I might face.


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


Hello Pablo,

I can imagine people sticking to the latest stable release only instead of
picking up the latest beta.

I have a workaround, so it is not so important (and this kind of bug
almost never shows up, I just accidently ran into it, and I was just
amazed by the peculiarity of it).

Just to be sure, how can I upgrade to latest beta?

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Grey background for pages belonging to last section of every chapter

2015-01-30 Thread Rob Heusdens

 Am 30.01.2015 um 17:18 schrieb Rob Heusdens robh...@xs4all.nl:

 Hello list,

 For the last section of every chapter I want a grey background for the
 text, which otherwise should look the same as every other section,
 except
 that it starts on a new page (I can set that by defining my own section
 command).

 The last section summarizes the chapter.

 My current implementation is using a frame:


 \defineframed[achtergrond]
[frame=off,
background=color,
backgroundcolor=gray,
width=fit,
height=fit,
offset=2ex,
align={flushleft,nothyphenated,verytolerant}]

 And use it as:

 \achtergrond{
 \section{Last section}

 \startitemize[n]
 \item ...
 \stopitemize
 }

 But this does not accomodate sections longer then a page. And I can't
 place \page command in the middle of an itemize, and using
 \stopitemize,
 \startitemize[continue] makes the pages vary in sizes.

 Is there some way to achieve the desired effect (grey background behind
 the text, and otherwise page layour identical to other sections)
 without
 the problem that text exceeds the page size?

 Greetings,

 Rob

 PS. The defined frame is also used elsewhere, but the last section
 should
 in fact not have normal alignment like the other sections.




 What perhaps fixes this problem is defining my own section command like
 this:

 \definehead[summary][section]

 \setuphead[summary]
 [
 number=no,
 style=bold,
 before={\page\setupbackgrounds[text][text][state=start]
   [background=color,backgroundcolor=gray]},
 after={\setupbackgrounds[text][text][state=stop]}
 ]

 According to the wiki
 (http://wiki.contextgarden.net/Command/setupbackgrounds
 http://wiki.contextgarden.net/Command/setupbackgrounds) that should
 work,
 but Context doesn't seem to understand the syntax and prints the part:
 [background=color,backgroundcolor=gray] before the section title.

 What did I do wrong?

 1. Put both assignments in the same argument, i.e. change

 
 \setupbackgrounds[text][text][state=start][background=color,backgroundcolor=gray]

 to

 
 \setupbackgrounds[text][text][state=start,background=color,backgroundcolor=gray]

 2. You have to finish the page before you disable the coloured background.

   after={\page\setupbackgrounds[…]}

 Wolfgang

Hello Wolfgang,

Yes, of course! I misinterpreted it, but now I see there is in fact only 3
options, not 4. I was misdirected by the 4 lines displayed below the
command explaining the syntax.

Problem is however resetting the background. In the after option of
\setuphead will not work, the \page is ejected directly after the section
title. I want to reset to normal background after the section itself
finishes. After this special section (summary) always a new chapter begins
(except perhaps the last summary).

Should I add that manually as the last command of every summary (where
also the chapter ends), or is there some way to perform a command after
the summary itself (at the location where one would place \stopsummary if
using the \startsummary syntax) ends?

The background should only be displayed behind the text itself, not the
whole text area (so if a section ends halfway of the page, the bottom part
should have no background) with some extra space surrounding it
(above,below,left,right) using the offset or perhaps backgroundoffset
options of \setupframed).


Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Grey background for pages belonging to last section of every chapter

2015-01-30 Thread Rob Heusdens
 Make a working minimal example which shows the problem because I’cant
 reproduce the problems you mention.

 Wolfgang

Hello Wofgang,

So far I am unable of re-producing the missing bold description for
summary section titles (and all of  sudden, the summary titles no longer
show up in the TOC either even though 'summary' is included in the
definedcombinedlist , although the page still shows with empty title).

This example does however show that the alignment to the section title of
summary sections does not line up properly with normal section text. It's
a bit too low. How to fix that?

And another thing, the background sometimes extends to a new page even
though there is no text, which looks silly. Deleting the \blank in the
\setupheads entry for the option after does not help.

Below is the code.

Greetings,

Rob

% test background
\setupwhitespace[none]
\setupindenting[yes, small, next]
\setuppagenumbering[alternative=doublesided]

\definetextbackground
  [SummaryBackground]
  [frame=off,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex]

\definehead[summary][section]

\setuphead
  [summary]
  [number=no,
   style=bold,
   before=,
   beforesection={\noindentation\page\starttextbackground[SummaryBackground]},
   aftersection={\stoptextbackground\blank}]

\setuphead[section][number=no,style=bold]


\definecombinedlist[content][section,summary]
\setupcombinedlist[content][level=4, alternative=c]

\starttext
\completecontent
\page
\dorecurse{9}{
\startsection[title={Knuth -- \recurselevel}]

\input{knuth}

\stopsection
}

\startsummary[title=Samenvatting]

\input{zapf}

\stopsummary

\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] Grey background for pages belonging to last section of every chapter

2015-01-30 Thread Rob Heusdens
Correction, I added offset=none,frameoffset=0pt, to the parameters for
the textbackground frame.

Code again with correction:

% test background
\setupwhitespace[none]
\setupindenting[yes, small, next]
\setuppagenumbering[alternative=doublesided]

\definetextbackground
  [SummaryBackground]
  [frame=off,offset=none,frameoffset=0pt,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex]

\definehead[summary][section]

\setuphead
  [summary]
  [number=no,
   style=bold,
   before=,
   beforesection={\noindentation\page\starttextbackground[SummaryBackground]},
   aftersection={\stoptextbackground\blank}]

\setuphead[section][number=no,style=bold]


\definecombinedlist[content][section,summary]
\setupcombinedlist[content][level=4, alternative=c]

\starttext
\completecontent
\page
\dorecurse{9}{
\startsection[title={Knuth -- \recurselevel}]

\input{knuth}

\stopsection
}

\startsummary[title=Samenvatting]

\input{zapf}

\stopsummary

\stoptext



Still the summary title is a bit lower on the page then other text.


___
If your question is of interest to others as well, please add an 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] Grey background for pages belonging to last section of every chapter

2015-01-30 Thread Rob Heusdens
 Use text backgrounds.

 \definetextbackground
   [SummaryBackground]
   [frame=off,
background=color,
backgroundcolor=gray]

 \definehead[summary][section]

 \setuphead
   [summary]
   [before=,
beforesection={\blank\starttextbackground[SummaryBackground]},
aftersection={\stoptextbackground\blank}]

 \starttext

 \startsection[title=Knuth]

 \input{knuth}

 \stopsection

 \startsummary[title=Zapf]

 \input{zapf}

 \stopsummary

 \stoptext

 Wolfgang

Hello Wolfgang,

Your example works. After adjusting the \summary to using \startsummary,
\stopsummary, and using your code, with only minor additions, as below:

\definetextbackground
  [SummaryBackground]
  [frame=off,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex] % - added

\definehead[summary][section]

\setuphead[summary]
[number=no, % - added
style=bold, % - added
before=,
beforesection={\page\starttextbackground[SummaryBackground]}, % -
changed \blank to \page
aftersection={\stoptextbackground\page}] % - changed \blank to \page

I get some unwanted result. See the picture.

The bold does not show up, and a small portion of the topleft corner of
the background frame is missing

Changing bold to italic also has no effect.

Something strange

Also trying with \blank instead of \page, the background then starts right
after the previous section, and it seems the indentation causes the
missing background on the first line.

So I placed \noindentation\page into beforesection (replacing \blank)
and get the background result I want, but still the bold is missing in the
summary title, and too much whitespace appears before the section title.

The title should be placed in the same position as normal text would
appear (and as a side note: in fact I am copying a style that was used in
a printed book that I typeset, in which each section title - except for
the summary - is just a normal sentence (or 2) typeset bold, with the rest
of the text appearing after the section title just as after a normal
sentence, so no vertical space between title and first sentence of the
section. Since it appears in the content also, I had to use section
commands, but is this behaviour duplicatable using setuphead for section?)


How can I adjust that?

Greetings,

Rob

(my context version is  2014.12.03 18:26)___
If your question is of interest to others as well, please add an 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] Interactive table of content -- jumps always 1 page too far

2015-01-30 Thread Rob Heusdens
Hello list,

Having the problem that if I jump to a chapter or section by clicking on
the interactive table of content (while the page numbers presented do
match the actual page number where the chapter or section begins) always
leads me to jumping one page too far.

I've tried to produce a MWE, but failed so far, even if I add all the
commands and setups which could affect page numbering, it doesn't
reproduce the error.

I didn't do setting the userpage number by hand. In fact the page number
is off by 2 from the real page number, caused by a makeup title page,
which does not do page counting (btw. is there a way to force a custom
title page makeup to DO count the page number?) and an extra page coming
right after it before the table of contents. Setting the right page number
on the table of contents page solves that, but clicking an entry in the
table of contents still sends me one page too far.

Can anyone guid me on where to look or what to try to solve this nasty
problem?

Thanks.

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Strange bug in interactive table of content...

2015-01-30 Thread Rob Heusdens
 On 01/30/2015 03:18 AM, Rob Heusdens wrote:
 A right parenthesis ')' shows up as black in the interactive table of
 contents (which otherwise displays as green).

 Here is a MWE:

 \setupcolors[state=start]
 \setupinteraction[state=start]
 \definecombinedlist[content][chapter]
 \setupcombinedlist[content][level=4, alternative=c]
 \setbreakpoints[compound]
 \starttext
 \completecontent
 \chapter{Noten bij de digitale (her)uitgave}
 \chapter{Noten bij de digitale (her)\-uitgave}
 \chapter{Tries: her)uit}
 \chapter{Tries: her)ui}
 \chapter{Tries: er)uit}
 \stoptext
 [...]
 Output in attachement.

 Hi Rob,

 using beta from 2015.01.26 11:39 displays all characters in green
 (tested in Fedora 20 with evince-3.10.3 and mupdf-1.6).

 If there was a bug, I guess it might have been fixed.

 I hope it helps,


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


I am using a recent version.

mtx-context | ConTeXt Process Management 0.61
mtx-context |
mtx-context | main context file:
/home/ubuntu/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2014.12.03 18:26


So, I should upgrade to the newest beta?

greetings,

Rob

___
If your question is of interest to others as well, please add an 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] Strange bug in interactive table of content...

2015-01-29 Thread Rob Heusdens
A right parenthesis ')' shows up as black in the interactive table of
contents (which otherwise displays as green).

Here is a MWE:

\setupcolors[state=start]
\setupinteraction[state=start]
\definecombinedlist[content][chapter]
\setupcombinedlist[content][level=4, alternative=c]
\setbreakpoints[compound]
\starttext
\completecontent
\chapter{Noten bij de digitale (her)uitgave}
\chapter{Noten bij de digitale (her)\-uitgave}
\chapter{Tries: her)uit}
\chapter{Tries: her)ui}
\chapter{Tries: er)uit}
\stoptext


If I comment \setbreakpoint[compound] the bug does not show. It seems to
matter what characters come before and after the right parenthesis for
this bug to show up.

To bypass the problem, one can use \- after the rparen, and then the bug
does not show up, but I don't think anyone encountered this small and
particular bug...

Greetings,

Rob

Output in attachement.___
If your question is of interest to others as well, please add an 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] How to draw this picture?

2015-01-17 Thread Rob Heusdens
I am working on an economic book, which I convert from a paper edition
into a digital edition, which contains some figures I want to recreate
using context or other tool.

In logical terms, the picture represents some economic figures and
visualizes how some figure (e.g. National income and the amount) is the
sum of some other figures, in which it can be split up.

In logic terms the figure then explains that:

A can be split up into B and C. B can be split up into D and E. D is F. E
can be split into G,H,I and K.

Graphically this is depicted like a table containing 4 columns and 5 rows,
and the split into is drawn as two diagonal lines (one right-up and
another righ down) which shows how the element on the left column is split
up into the elements on the right column using the diagonal lines that
center in the left element, drawn to the right top and right bottom
element.

I worked this out into context as a simple table, and used instead of the
diagonal lines only vertical lines. Which is less expressive, but still
visualizes the splitting sufficiently I hope.

But I would like to rework this picture, using a brace instead of a
vertical line, similar to how in a formula one uses mathcases.

I tried to use mathcases, but it seems mathcases can't be nested??

I was thinking of other solutions, like replacing the vertical line with a
small column in which to put a vertical stretched brace symbol, at the
appriopriate lowered cell, but don't know how the vertical stretch a
glyph.

What is the best way to code this in ConText? (preferred is to use the
symbol left brace.)

Greetings,

Rob

---

context code now used:

\starttable[s0|cp(.2\textwidth)|cp(.2\textwidth)|cp(.2\textwidth)|cp(.25\textwidth)|]
\NC \NC \VL Variabel\\ kapitaal\\ 10 \VL Arbeidsloon v/d\\
productie-arbeiders\\ 10 \NC \AR
\NC \NC \VL  \NC \NC \AR
\NC \NC \VL  \NC \NC \AR
\NC \VL Nationaal\\ inkomen\\ 30 \VL \VL Winst van de\\ industriële
kapitalist\\ 10 \NC \AR
\NC \VL \VL  \VL \NC \AR
\NC \VL \VL \VL Commerciële\\ winst\\ 3 \NC \AR
\NC Totaal\\ maatschappelijk\\ product\\ 90 \VL \VL Meerwaarde\\ 20 \VL 
Rente\\ 2 \NC \AR
\NC \VL \VL  \VL Grondrente\\ 5 \NC \AR
\NC \VL \NC  \NC  \NC \AR
\NC \VL Vervanging \\ v/h verbruikte \\ constante\\ kapitaal\\ 60 \NC \NC 
\NC \AR
\stoptable

___
If your question is of interest to others as well, please add an 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] \head: broken?

2014-07-18 Thread Rob Heusdens
Thanks. I think I could have figured out that one myself. I guess it's my
own head a bit broken atm...
But I should mention that the contextgarden article mentions only one
option for \startitemize, perhaps that is why I got misleaded there.

(http://wiki.contextgarden.net/Command/startitemize)

Greetings,

Rob


 You can’t mix keywords and assignment in the same argument of a
 setup-command, e.g.

 \staritemize[packed,headstyle=bold]

 but some commands have multiple arguments which you use for both types,
 e.g.

 \startitemize[packed][headstyle=bold]

 BTW: A minimal example should be compilable (i.e. you need \starttext and
 \stoptext) which isn’t the case with your 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
 ___



___
If your question is of interest to others as well, please add an 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] Fonthandling/protrusion question: handling of left margin

2014-07-18 Thread Rob Heusdens
Short question about the font feature protrusion. This handles certain
characters that get shifted into the right margin to make a more visable
straight right margin. But can this font feature also handle left margin?
For example, sentences that start in the left margin and begin with a
quotation, there you would want the same effect also in the left margin.
I currently use \kern-1ex to achieve the same effect for a sentence that
commences on the left margin and starts with a quotation.

Greetings,

Rob

___
If your question is of interest to others as well, please add an 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] \head: broken?

2014-07-16 Thread Rob Heusdens
Hello All,

Still having problem with \head in \setupitemize.

- When I set the headstyle in \setupitemize, the numbering disappears and
the symbol appear (like when I used '1' instead of 'n'). (ex. 1: MNWE)

- If I comment the headstyle out, numbers do appear. (ex. 2: MWE).

Why is that?

Greetings,

Rob


MWE:


\startitemize[n,packed,]%headstyle=bold]
\head End notes at end of each part.

In the original text and first \CONTEXT\ version this was done without the
footnote mechanism.
This is now being tranformed to the footnote mechanism, which provides
clicable, interactive links to notes.

\head Bibliography.

The full list of referenced literature (Bibliography) is transformed into
the Bib\TEX\ format used by \CONTEXT.\textnote{Notes often refer to
Bibliography entries. Currently these references are set as endnote, but
the Bib\TEX\ mechanism (cite reference) could be used instead. This would
show the Bib\TEX{}-key linked to the Bibliography.}

\head Index.

All items (often used terms, names of persons) are indexed.

\head Emphasis.

Where used in the {\sc html} version, {\em emphasis} is set in the
\CONTEXT\ version. In addition: titles (of books, etc.) are {\em
emphasized}.

\head List of contents per part  per chapter.

At the beginning of each part a list of chapters and in the beginning of
each chapter a list of sections using the standard list mechanism of
\CONTEXT\ (clickable, interactive links as used in the master contents,
instead of normal text).

\stopitemize


MNWE:



\startitemize[n,packed,headstyle=bold]
\head End notes at end of each part.

In the original text and first \CONTEXT\ version this was done without the
footnote mechanism.
This is now being tranformed to the footnote mechanism, which provides
clicable, interactive links to notes.

\head Bibliography.

The full list of referenced literature (Bibliography) is transformed into
the Bib\TEX\ format used by \CONTEXT.\textnote{Notes often refer to
Bibliography entries. Currently these references are set as endnote, but
the Bib\TEX\ mechanism (cite reference) could be used instead. This would
show the Bib\TEX{}-key linked to the Bibliography.}

\head Index.

All items (often used terms, names of persons) are indexed.

\head Emphasis.

Where used in the {\sc html} version, {\em emphasis} is set in the
\CONTEXT\ version. In addition: titles (of books, etc.) are {\em
emphasized}.

\head List of contents per part  per chapter.

At the beginning of each part a list of chapters and in the beginning of
each chapter a list of sections using the standard list mechanism of
\CONTEXT\ (clickable, interactive links as used in the master contents,
instead of normal text).

\stopitemize



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

2014-07-16 Thread Rob Heusdens

 I agree that it would be awesome if there was complete documentation
 available + maybe three manuals/tutorials from beginner to master, but
 you cannot expect it from Hans to do all the work on his own.

 Mojca


I think that part of the work has to be done by other volunteers (users),
who have enough experience to write in good style user documentation. That
kind of work does not depend on Hans or Taco alone. I think their
important task is to have the technical documentation up-to-date and/or
provide well enough information about the changes in releases, that others
can write good user-documentation.

First priority I guess would be to have the contextgarden Wiki up-to-date:
many commands and/or parameters are not touched there. There are many
outdate pages (with broken links, etc.), and definatately I would guess a
better split is needed between MkII and MkIV wherever applicable.

If time and experience-level allows me, I would like to start working on
that kind of things. Someday I would also like to write a user-manual for
Context novices (and ppl. new to Tex in general). But first I need to sort
out some things myself, esp. about the whole font-mechanism, and how
Context handles it. And as of yet I have no clue on what is what in the
Context/Tex tree and where to find all the sources. Keeps me busy some
time...

Greetings,

Rob

PS. And also material on 'good typography' would come in handy as weblinks
and in Context user-manuals. Yesterday, I read this online typography
manual, which contains some usefull tips about Typography. See:
http://practicaltypography.com/index.html#toc

I see that he also uses protrusion in the left-margin for quotations (when
you start a sentence on a new line with a quotation), something which
Context atm. does not do, only in the right margin, but the result is
good. Definately some feature request.

___
 If your question is of interest to others as well, please add an 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] Bibliography: criterium=all

2014-07-16 Thread Rob Heusdens
Hello,

This is more a 'side-comment', but anytime I see an application that wants
in fact to query data from some dataresource, I ask myself: why is that
not implemented as a real relational database?

BibTex is some weird implementation for a problem that in facts requests a
real relational dababase approach, in which your data does not reside in a
file, but a couple of tables. Like PUBLISHER (the organisation that
publishes the article/book/journal, etc.), PUBLICATION, EDITION,
AUTHOR/CONTRIBUTOR (a person making a contribution to a PUBLICATION, like
author, co-author, editor) etc.

For example: every author that has contributed to a publication (or
edition thereof) has only one record in the AUTHOR table, and for each
contribution to a PUBLICATION/EDITION there is a record in the
CONTRIBUTION table, with the foreign keys to the primary key of
AUTHOR/CONTRIBUTOR and to the PUBLICATION/EDITION table.

A data-model for such must exist in the real-world, somewhere, I guess.
But Tex and other implementors have choosen to implement this in a simple
flat-file system, and which I think is part of the problem, because the
implemenation as flat file has certain limits. Esp. when more demanding
features are requested.

Still thinking that ultimately that would be the best way to implement
BibTex, using a relational database as repository instead of flat files.
And you could implement many other 'nice' featueres, like querying other
works related to the works you want to cite (for instance at the basis of
relevant key/reference words or other).

Would be do-able I guess (LuaTex can access dabatases), only problem is
you have to convert al these .bib files into the database format.

But don't know if anyone has thought about implementing Bibtex as a database.

Greetings,

Rob

 Hans,

 Sorting simply by year (or, rather, year then author then title ...)
 could be useful. Take, for example, a pluriannual report having many
 references. One might wish to display a list of publications by year.
 Should this be selected using sorttype=year?

 Another possible syntax could be
   sorttype={author,year,title,page}
 and this would be the default for APA.
 Of course, the other common sorting is sorttype=cite.

 Furthermore,
   sorttype={year,author,title,page}
 would be another variant, and I can even imagine using:
   sorttype={journal,volume,number,page}
 or
   sorttype={publisher,year,title}
 and I am sure that users may need something totally unanticipated.

 The change from the present is that sortype=author implies
 {author,year,title,page}. I suppose that it could default to this order
 if no other order is specified. Just like sorttype=year could default
 to something sane like {year,author,title,page} unless a different
 order is explicitly given, etc.

 A subtlety is how to handle missing fields, say in a mixture of
 articles and books where articles have journal titles (journal) and
 article titles (title) and books have book titles (title). Should
 missing journal fields (books) come before or after articles or should
 title then be taken into account, as in {journal|title}? Do we need to
 allow such logic?

 We can continue to discuss this with Thomas and Luigi but I mention it
 here on the mailing list as Flavien Lambert brought up the question.

 Alan




 On Wed, 16 Jul 2014 11:52:15 +0200
 Hans Hagen pra...@wxs.nl wrote:

 On 7/16/2014 11:31 AM, Flavien Lambert wrote:
  The sort by author is perfect.

 fyi, sorting authors is kind of complex as we need to take all name
 elements into account (initials, firstnames, surnames, vons,
 juniors); of course there can be multiple authors; add to the extra
 axes year journal, title and page

 the torture test is a list with 400K author specifications (taken
 from a bunch of bib databases) which eventually produces a 5500 page
 document

 in practice, certainly when we have smaller databases, load time can
 be neglected (here it is .4 sec luatex vs .3 sec luajittex); sort
 preparation and processing of that bunch takes 35 sec for luatex and
 19 sec for luajittex but of course for normal cases you won't even
 noticed it .. bib databases with 400K entries are probably not used
 often

 (i have no clue if bibtex can handle these numbers)

  Thanks,
  F.
 
  On 16 Jul 2014 17:16, Hans Hagen pra...@wxs.nl
  mailto:pra...@wxs.nl wrote:
 
  On 7/16/2014 10:10 AM, Flavien Lambert wrote:
 
  Great! Thanks a lot!
 
  And concerning sorting by date?
 
 
  sorttype=author
 
  sorts by author,year,journal,title,page
 
  so what do you mean with 'by year'
 
  Hans


 --
 Alan Braslau
 CEA DSM-IRAMIS-SPEC
 CNRS URA 2464
 Orme des Merisiers
 91191 Gif-sur-Yvette cedex FRANCE
 tel: +33 1 69 08 73 15
 fax: +33 1 69 08 87 86
 mailto:alan.bras...@cea.fr
 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : 

[NTG-context] Bibliography issue (using \cite) and endnote typesetting

2014-07-14 Thread Rob Heusdens
Hello all,

I am working on a document (source=HTML) which has as an appendix a
complete Bibliography (which I did with BibTex, and works fine), but it
also has endnotes (after every \part) which (most often) reference the
Bibliography.

I did this now as simple endnotes and using the literal text of the notes,
since sometimes they do not refer to anything in the Bibliography,
therefore I would need to keep them as endnotes and not as cite reference.

But for entries that do, my question is:
- How to setup \cite so that it displays the fields I want (author, title,
address) in the style I want (title=italics).
- How to give extra information (like the page reference).

And how are notes with Ibid. (referring to a same cite as a previous
footnote) dealt with, is there any mechanism that does that (probably
not)?

Related to this I have also the following problem with endnotes.
I managed to get the notes in the text and where the endnotes are places
converted to diplay: [1] (instead of a superscript without the brackets).

But how can I configure it to have the same amount of identation for every
endnote text. The indentation is now different for notes starting with
[10], etc., and the footnote text lines are only indented the first line,
following lines starting non-indented. The overall effect I want is that
the endnote + endnote text look like being typeset as a tabulation.

How can one do that?

Many thanks.

Rob.




___
If your question is of interest to others as well, please add an 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] \head: broken?

2014-07-12 Thread Rob Heusdens
Hello to all,

I don't know if it is due to -the weather- or -the Worldchampionships-
or other but in my Context release [ConTeXt  ver: 2014.07.11 12:20 MKIV
beta  fmt: 2014.7.12  int: english/english] \head is broken.

Is that a feature or a bug?

greetings,

Rob
---

\head: broken?

When the \head command is used without a following line of normal text, it
will result in a context-error.

MNWE:
\startitemize[n]
\head x
\stopitemize

MWE:
\startitemize[n]
\head x
anything
\stopitemize


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