Re: [NTG-context] Structure of titles in MkIV

2014-10-19 Thread Alan BRASLAU
The following seems to work well for me.

Unfortunately, I do not remember what references.bookmarks.preroll
accomplishes but searching the sources (and the mailing list archives)
should help answer this question...

%
% make chapter bookmarks visible when opening document
%
\setupinteraction[state=start,option=bookmark,contrastcolor=interactioncolor]
\setupinteractionscreen[option=bookmark]
\placebookmarks[part,chapter,title,section,subject,subsection][part,chapter,title]
\enabledirectives[references.bookmarks.preroll]


I must point-out that whereas adobe reader handles bookmarks, many
other pdf viewers do not.

Alan




On Sat, 18 Oct 2014 13:57:23 +0200
Michał Goliński golin...@amu.edu.pl wrote:

 Thank you very much for the example. Indeed, now the structure of the 
 table of contents looks OK. Unfortunately, it breaks the PDF
 bookmarks (which was initially my main concern). For this file (based
 on your MWE), I get only Prologue in the bookmarks, although the
 links in the table of contents work perfectly:
 
 \setupinteraction[state=start]
 \placebookmarks[part,chapter][part,chapter][number=no]
 
 \starttext
 \placecontent
 
 \startfrontmatter
   \startchapter[title=Prologue]
   \input knuth
   \stopchapter
 \stopfrontmatter
 
 \startpart[title={Part A}]
   \startchapter[title=One]
   \input knuth
   \stopchapter
 \stoppart
 
 \startbackmatter
   \startchapter[title=Epilogue]
   \input knuth
   \stopchapter
 \stopbackmatter
 
 \stoptext
 
 
 Regards
 Michał
 
 W dniu 2014-10-15 14:25, Keith Schultz napisał(a):
  
  Below I have a MWE to show the FLAW.
  
  MWE:
  
  \starttext
  \placecontent
  
   %\startfrontmatter  % uncomment line to show what you would expect
  
  
  \startchapter[title=Prologue]
  \input knuth
  \stopchapter
  
  %\stopfrontmatter % uncomment line to show what you would expect
  
  \startpart[title={Part A}]
   \startchapter[title=One]
   \input knuth
   \stopchapter
  \stoppart
  
  % FLAW: sectioned under Part A should expect sectioning  level 1
  % or throw error that part needed here!
  \startchapter[title={not at top level}]
  \input knuth
  \stopchapter
  
  \startpart[title={Part B}]
   \startchapter[title=One]
   \input knuth
   \stopchapter
  \stoppart
  
  % \startbackmatter  % uncomment line to show what you would expect
  
  
  % FLAW:  sectioned under Part B should expect sectioning  level 1
  % or throw error that part needed here!
  \startchapter[title=Epilogue]
  \input knuth
  \stopchapter
  
  
  %\stopbackmatter % uncomment line to show what you would expect
  
  \stoptext
  
  regards
  Keith.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Structure of titles in MkIV

2014-10-18 Thread Michał Goliński
Thank you very much for the example. Indeed, now the structure of the 
table of contents looks OK. Unfortunately, it breaks the PDF bookmarks 
(which was initially my main concern). For this file (based on your 
MWE), I get only Prologue in the bookmarks, although the links in the 
table of contents work perfectly:


\setupinteraction[state=start]
\placebookmarks[part,chapter][part,chapter][number=no]

\starttext
\placecontent

\startfrontmatter
 \startchapter[title=Prologue]
 \input knuth
 \stopchapter
\stopfrontmatter

\startpart[title={Part A}]
 \startchapter[title=One]
 \input knuth
 \stopchapter
\stoppart

\startbackmatter
 \startchapter[title=Epilogue]
 \input knuth
 \stopchapter
\stopbackmatter

\stoptext


Regards
Michał

W dniu 2014-10-15 14:25, Keith Schultz napisał(a):


Below I have a MWE to show the FLAW.

MWE:

\starttext
\placecontent

 %\startfrontmatter  % uncomment line to show what you would expect


\startchapter[title=Prologue]
\input knuth
\stopchapter

%\stopfrontmatter % uncomment line to show what you would expect

\startpart[title={Part A}]
 \startchapter[title=One]
 \input knuth
 \stopchapter
\stoppart

% FLAW: sectioned under Part A should expect sectioning  level 1
% or throw error that part needed here!
\startchapter[title={not at top level}]
\input knuth
\stopchapter

\startpart[title={Part B}]
 \startchapter[title=One]
 \input knuth
 \stopchapter
\stoppart

% \startbackmatter  % uncomment line to show what you would expect


% FLAW:  sectioned under Part B should expect sectioning  level 1
% or throw error that part needed here!
\startchapter[title=Epilogue]
\input knuth
\stopchapter


%\stopbackmatter % uncomment line to show what you would expect

\stoptext

regards
Keith.

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

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

Re: [NTG-context] Structure of titles in MkIV

2014-10-17 Thread Alan BRASLAU
No, I have not been using ConTeXt for ten years and I am still learning!
I am just referring to the fact pointed out by Herbert Simon (The
Architecture of Complexity) that it takes about 10 years for anyone to
learn any new subject.

I have come to understand that ConTeXt's speed in processing does not
have to do with our patience, like waiting for a dot-matrix printer.
(By the way, I started doing text processing using teletypes way
before TeX was even invented. Remember nroff?)
ConTeXt is also used for automated text-processing on the fly and this
has to be fast.

It is said that clang gives many more and much better error and warning
messages than gcc. ConTeXt has all sorts of trackers that can be
enabled if desired to get lots of debugging information.
http://wiki.contextgarden.net/Trackers

Maybe there is room for someone to write a program (or script in lua!)
similar to lint that can check for errors. I do not believe that it is
worth the effort, though, as it will quickly become obsolete.

Alan



On Thu, 16 Oct 2014 11:32:29 +0200
Keith J. Schultz schul...@gmx.net wrote:

 Hi Alan,
 
 In a way I agree one can live without the added syntax and semantic
 error reporting, But, as you say you have been using it for ten years.
 All are not that lucky. Then there are those beginners that simply
 have no idea what is going on. Because they do not know ConTeXt, TeX,
 or LaTeX, etc. This problem is more severe due to the fact that IMHO
 the documentation for ConTeXt does not state many things!
 
 Error checking should not be given up for performance sake!
 That is not good practice. If one can not wait a minute longer
 for a 500 page document, somebody has to learn to chill down.
 
 Been around Computers since the mid 80s, so I know what it is like
 to wait 5 minutes for a three page document, waiting for a TeX system
 render and create all those files to print it on a dot-matrix printer.
 Not, to mention the printing itself in graphics mode for the best
 quality.
 
 regards
   Keith.
 
 
 Am 15.10.2014 um 16:10 schrieb Alan BRASLAU alan.bras...@cea.fr:
 
  On Wed, 15 Oct 2014 14:25:11 +0200
  Keith Schultz keithjschu...@icloud.com wrote:
  
  BUT, Michal I believe has a point. Or should I say has come across
  a FLAW, according to my view of things. ConTeXt should warn...
  
  I was warned (a few years ago) on the mailing list NOT to place any
  text outside of structure elements. For example,
  
 [snip, snip]
  I cannot remember the example of what had gone haywire, but I
  leaned my lesson (and started systematically using \start\stop for
  everything, well, not for paragraphs as I find that a bit too
  heavy...).
  
  As to WARNINGS: ConTeXt generally silently ignores incorrect coding,
  unknown options, etc. One might call for all sorts of bells and
  whistles but these come at a performance cost so I have also
  learned to do without them. Of course, this sometimes makes
  debugging one's errors a bit more difficult, but after 10 years or
  so of practice one will no longer make many errors! (one of my
  favorites still is \startext) ;-)

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

2014-10-16 Thread Keith J. Schultz
Hi Alan,

In a way I agree one can live without the added syntax and semantic
error reporting, But, as you say you have been using it for ten years.
All are not that lucky. Then there are those beginners that simply have
no idea what is going on. Because they do not know ConTeXt, TeX, or LaTeX, etc.
This problem is more severe due to the fact that IMHO the documentation for
ConTeXt does not state many things!

Error checking should not be given up for performance sake!
That is not good practice. If one can not wait a minute longer
for a 500 page document, somebody has to learn to chill down.

Been around Computers since the mid 80s, so I know what it is like
to wait 5 minutes for a three page document, waiting for a TeX system
render and create all those files to print it on a dot-matrix printer.
Not, to mention the printing itself in graphics mode for the best quality.

regards
Keith.


Am 15.10.2014 um 16:10 schrieb Alan BRASLAU alan.bras...@cea.fr:

 On Wed, 15 Oct 2014 14:25:11 +0200
 Keith Schultz keithjschu...@icloud.com wrote:
 
 BUT, Michal I believe has a point. Or should I say has come across a
 FLAW, according to my view of things. ConTeXt should warn...
 
 I was warned (a few years ago) on the mailing list NOT to place any
 text outside of structure elements. For example,
 
[snip, snip]
 I cannot remember the example of what had gone haywire, but I leaned my
 lesson (and started systematically using \start\stop for everything,
 well, not for paragraphs as I find that a bit too heavy...).
 
 As to WARNINGS: ConTeXt generally silently ignores incorrect coding,
 unknown options, etc. One might call for all sorts of bells and
 whistles but these come at a performance cost so I have also learned
 to do without them. Of course, this sometimes makes debugging one's
 errors a bit more difficult, but after 10 years or so of practice one
 will no longer make many errors! (one of my favorites still is
 \startext) ;-)
 

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

2014-10-16 Thread Hans Hagen

On 10/16/2014 11:32 AM, Keith J. Schultz wrote:

Hi Alan,

In a way I agree one can live without the added syntax and semantic
error reporting, But, as you say you have been using it for ten years.
All are not that lucky. Then there are those beginners that simply have
no idea what is going on. Because they do not know ConTeXt, TeX, or LaTeX, etc.
This problem is more severe due to the fact that IMHO the documentation for
ConTeXt does not state many things!

Error checking should not be given up for performance sake!
That is not good practice. If one can not wait a minute longer
for a 500 page document, somebody has to learn to chill down.


well, i can't wait a minute longer

anyway, as there are many ways to invalidate structure the amount of 
checking would not only become enourmous but also make the code pretty 
much unreadable


also, having chapters outside parts can happen ... you really don't know 
how often i have to write styles that violate all principles of 
structuring (including consistent font usage)


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] Structure of titles in MkIV

2014-10-16 Thread Keith Schultz
Hi Hans,

I am aware of the process and code involved. 

I am also, aware that one can have chapters outside of parts.
It is just that the inexperienced are not aware of the sectioning levels
and how they works, and are surprised by the results. 

I can ive with the way things are. Just a thought.

Keep up the good work.

regards
Keith.

Am 16.10.2014 um 13:25 schrieb Hans Hagen pra...@wxs.nl:

[snip, snip.]
 anyway, as there are many ways to invalidate structure the amount of checking 
 would not only become enourmous but also make the code pretty much unreadable
 
 also, having chapters outside parts can happen ... you really don't know how 
 often i have to write styles that violate all principles of structuring 
 (including consistent font usage)
 
 Hans
 

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

2014-10-15 Thread Alan BRASLAU
Hello,

Structure (sectioning) is a question of hierarchical level, there is
nothing special about the names part or chapter except setups that
reflect common usage.

I place Prologue and Epilogue at the part level. Better yet, I
situate them in frontmatter and backmatter. Maybe my use is
incorrect but this is how I understand things.

There is a mechanism for automatic section level which is very nice.
Hans describes this in: levels-001.tex and levels-002.tex in the test
suite to see how to use relative sectioning.

Alan


On Tue, 14 Oct 2014 13:49:36 +0200
Michał Goliński golin...@amu.edu.pl wrote:

 Given a file:
 
 \setupinteraction[state=start]
 \placebookmarks[part,chapter][part,chapter]
 
 \starttext
 
 \startchapter[title=Prologue, number=no]
 \input knuth
 \stopchapter
 
 \startpart[title={Part A}]
\startchapter[title=One]
\input knuth
\stopchapter
 \stoppart
 
 \startchapter[title=Epilogue]
 \input knuth
 \stopchapter
 
 \stoptext
 
 I would expect to have the logical structure of titles as follows:
 
 + Prologue
 + Part A
 - + One
 + Epilogue
 
 i.e., Epilogue should be at the highest level, as Prologue is.
 Context gives me an Epilogue that is a child of Part A.
 
 Is it possible to have the chapter Epilogue not be a child of Part 
 A?
 
 Best regards
 Michał Goliński

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

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

Re: [NTG-context] Structure of titles in MkIV

2014-10-15 Thread Alan BRASLAU
Quoting from the thread Adaptive section structuring of September
2012:

 %\definesectionlevels[default][section,subsection,subsubsection]
 \definesectionlevels[mine][title,subject,subsubject]
 
 \starttext
 
 \startsectionlevel [title=Alpha]
   \startsectionlevel [title=Beta]
 \startsectionlevel [title=Gamma]
 \stopsectionlevel
   \stopsectionlevel
 \stopsectionlevel
 
 \startsectionlevel [mine] [title=One]
   \startsectionlevel [mine] [title=Two]
 \startsectionlevel [mine] [title=Three]
 \stopsectionlevel
   \stopsectionlevel
 \stopsectionlevel
 
 \stoptext
 
 Wolfgang

Alan



On Wed, 15 Oct 2014 09:42:19 +0200
Alan BRASLAU alan.bras...@cea.fr wrote:

 Hello,
 
 Structure (sectioning) is a question of hierarchical level, there is
 nothing special about the names part or chapter except setups that
 reflect common usage.
 
 I place Prologue and Epilogue at the part level. Better yet, I
 situate them in frontmatter and backmatter. Maybe my use is
 incorrect but this is how I understand things.
 
 There is a mechanism for automatic section level which is very nice.
 Hans describes this in: levels-001.tex and levels-002.tex in the test
 suite to see how to use relative sectioning.
 
 Alan
 
 
 On Tue, 14 Oct 2014 13:49:36 +0200
 Michał Goliński golin...@amu.edu.pl wrote:
 
  Given a file:
  
  \setupinteraction[state=start]
  \placebookmarks[part,chapter][part,chapter]
  
  \starttext
  
  \startchapter[title=Prologue, number=no]
  \input knuth
  \stopchapter
  
  \startpart[title={Part A}]
 \startchapter[title=One]
 \input knuth
 \stopchapter
  \stoppart
  
  \startchapter[title=Epilogue]
  \input knuth
  \stopchapter
  
  \stoptext
  
  I would expect to have the logical structure of titles as follows:
  
  + Prologue
  + Part A
  - + One
  + Epilogue
  
  i.e., Epilogue should be at the highest level, as Prologue is.
  Context gives me an Epilogue that is a child of Part A.
  
  Is it possible to have the chapter Epilogue not be a child of
  Part A?
  
  Best regards
  Michał Goliński
 



-- 
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@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] Structure of titles in MkIV

2014-10-15 Thread Keith Schultz
Hello All,

First, let me say that the semantics of Book-making can be confusing as
certain terms are used differently by different professionals.
What has made it worse these terms have been convoluted by the
computational adaptation of Book-making.

A book generally has three divisions frontmatter, backmatter, and main 
text/body.
These are made up of parts.  What belongs in these divisions are dependent on 
your field,
tradition, and publishers style! 

Basically, Alan is on the mark.


Second, Michal TeX and ConTeXt has a section leveling. That is part is the 
highest level. and chapters are always
part of a part. So, you want the effect you need, you should either enclose the 
Prologue and
Epilogue in the frontmatter and backmatter parts respectively, (See MWE below) 
or wrap them in a part environment.

BUT, Michal I believe has a point. Or should I say has come across a FLAW, 
according to my view of things.
ConTeXt should warn that once you use a chapter the part command should not be 
mixed. That is if one uses parts
that Chapters must be embedded a Part! 



I adjusted Michals MWE and we get basically, what he expects, that is Prologue 
and Epilogue on the same
level. But, without it surrounding part the Epilogue is set at an level that is 
under Part A-level the Epilogue.
This would mean that the \stoppart for Part A or my inserted Part B is not 
being recognize and the
sectioning Counter being adjusted properly! Or an error should be flagged! 
Yes, there are easy work arounds!

This FLAW is intrinsic to the intelligence of ConTeXt. Most of us would be 
using front- and backmatter, sectioning commands,
numbering schemes and thereby avoiding it. But, ConTeXt should warn of the 
false behaviour.

Below I have a MWE to show the FLAW.

MWE:

\starttext
\placecontent

 %\startfrontmatter  % uncomment line to show what you would expect


\startchapter[title=Prologue]
\input knuth
\stopchapter

%\stopfrontmatter % uncomment line to show what you would expect

\startpart[title={Part A}]
 \startchapter[title=One]
 \input knuth
 \stopchapter
\stoppart

% FLAW: sectioned under Part A should expect sectioning  level 1
% or throw error that part needed here!
\startchapter[title={not at top level}]  
\input knuth
\stopchapter

\startpart[title={Part B}]
 \startchapter[title=One]
 \input knuth
 \stopchapter
\stoppart

% \startbackmatter  % uncomment line to show what you would expect


% FLAW:  sectioned under Part B should expect sectioning  level 1
% or throw error that part needed here!
\startchapter[title=Epilogue] 
\input knuth
\stopchapter


%\stopbackmatter % uncomment line to show what you would expect

\stoptext 

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

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

Re: [NTG-context] Structure of titles in MkIV

2014-10-15 Thread Alan BRASLAU
On Wed, 15 Oct 2014 14:25:11 +0200
Keith Schultz keithjschu...@icloud.com wrote:

 BUT, Michal I believe has a point. Or should I say has come across a
 FLAW, according to my view of things. ConTeXt should warn...

I was warned (a few years ago) on the mailing list NOT to place any
text outside of structure elements. For example,

\starttext
This is a forward.
\startchapter[title=First chapter]
\input tufte
\stopchapter
This is a an afterthought.
\stoptext

Of course, this works, but I was warned that everything might not work
correctly as expected outside of the structure, since such text is
nowhere.

I cannot remember the example of what had gone haywire, but I leaned my
lesson (and started systematically using \start\stop for everything,
well, not for paragraphs as I find that a bit too heavy...).

As to WARNINGS: ConTeXt generally silently ignores incorrect coding,
unknown options, etc. One might call for all sorts of bells and
whistles but these come at a performance cost so I have also learned
to do without them. Of course, this sometimes makes debugging one's
errors a bit more difficult, but after 10 years or so of practice one
will no longer make many errors! (one of my favorites still is
\startext) ;-)

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
___