Re: [NTG-context] ToC depth (and headers) per section block

2014-07-05 Thread Hans Hagen

On 7/5/2014 5:52 AM, Rik Kabel wrote:

How can I specify different section depths for different parts in a
document in the TOC? That is, if the document structure is:

   Front Matter
   Body Matter
Part 1
  Chapter 1
   Section 1
  Chapter 2
   Section 1
   Section 2
Part 2
  Chapter 1
   Section 1
   Section 2
  Chapter 2
   Section 1
Appendices
  Chapter 1
   Section 1
  Chapter 2
   Section 1
Back Matter
  Notes
  Bibliography

How can I generate chapter and section entriess in the TOC for Part 1,
but chapter entries only (no section entries) for Part 2 and the
Appendices.

I currently do this by defining a new header equivalent to section and
using that for Part 2 and Appendix sections. Since it is not included in
the lists used by the contents combinedlist, it does not get set.

Is this the best way to do this?


\definehead[silentsection][section]

\starttext

\placelist[chapter,section]

\chapter{first}
\section{first}

\chapter{first}
\silentsection{first}

\stoptext


If instead I want one depth for all body matter parts and a different
depth for the appendices, is there a solution that could be keyed on
system modes or on section blocks, thus moving all of the styling to the
preamble (to use a LaTeX term)? I currently do that to support different
header formats in the body matter and appendices, using the following
method, but I suspect that there may be a more effective way to do that
as well.

   \startsetups[Header]
 \startallmodes[print,*bodypart]
   {\color[PrintHeaderColor]{\PrintHeaderFont
{\llap{\getmarking[chapternumber]~}\getmarking[chapter]}}
 \stopallmodes
 \startallmodes[print,*appendix]
   \color[PrintHeaderColor]{\PrintHeaderFont
 {\getmarking[chapter]}}
 \stopallmodes
   \stopsetups
   \setupheadertexts   []
   \setupheadertexts [\setups{Header}][][][\setups{Header}]

Again, I prefer a method that can be implemented in the preamble. (MKIV
only.)




--

-
  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] Prevent hyphenation of the last word on a page

2014-07-05 Thread H. Özoguz
If its not possible at all, a small hint to this fact would help, too. 
So I could stop to search :)


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

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


Re: [NTG-context] Orphans/Widows in the Index

2014-07-05 Thread Jan Tosovsky
On 2014-06-25 Jan Tosovsky wrote:
 On 2014-06-23 Jan Tosovsky wrote:
  On 2014-04-23 Jan Tosovsky wrote:
  
   There are also few cases of orphans:
   ...
   ...
   Josef 29
  
   K
   Karel 69 (! alone !)
    (end page) -
  
 
 I've found the corresponding code in strc-reg.mkiv:
 
 \setvalue{\??registerindicator a}#1%
   {\registerparameter\c!before
% bugged, why does leftskip gets set:
 \vskip\lineheight\goodbreak\vskip-\lineheight
\begingroup
\useregisterstyleandcolor\c!style\c!color
\dontleavehmode
\strut
\iflocation
  \dosetdirectpagereference{\currentregister:\v!section:#1}%
\fi
\registerparameter\c!command{#1}%
\endgroup
\blank[\v!samepage]%
\registerparameter\c!after
\par
\nobreak}
 
 That (2) case can be fixed by a small change:
 \testcolumn[3]\registerparameter\c!command{#1}%
 
 But when tested on this MWE, you can see a drawback - the first 
 letter (p) starts always on the second line (not on the first one):
 
 \setupregister[balance=yes]
 \starttext
 \index{primary+secondary+tertiary}
 \index[primary long]{\dorecurse{5}{primary long }}
 \index[primary longer]{\dorecurse{5}{primary longer }}
 \input{tufte}
 \completeindex
 \stoptext

I've realized that empty line is placed before every Index section where
\testcolumn command is placed (by my patch).

Is there any way to use \testcolumn and avoid producing that empty line?

Thanks, Jan

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

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


[NTG-context] No new paragraph after framedtext

2014-07-05 Thread Flavien Lambert
Dear all, I was wondering if there was a way to avoid a new paragraph after
a framed text. For example, the following code

\starttext
\framedtext[width=6em]{abc}\framedtext[width=6em]{abc}
\stoptext

produces two boxes on top of each other. Is it possible to make them side
by side?

I could use a table but I would like to keep the possibility of playing
with the framebox size as much as I want (like a patchwork of boxes of
different sizes that would span part of the pages).

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

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

Re: [NTG-context] No new paragraph after framedtext

2014-07-05 Thread Wolfgang Schuster

Am 05.07.2014 um 13:07 schrieb Flavien Lambert petit.lep...@gmail.com:

 Dear all, I was wondering if there was a way to avoid a new paragraph after a 
 framed text. For example, the following code
 
 \starttext
 \framedtext[width=6em]{abc}\framedtext[width=6em]{abc}
 \stoptext
 
 produces two boxes on top of each other. Is it possible to make them side by 
 side?
 
 I could use a table but I would like to keep the possibility of playing with 
 the framebox size as much as I want (like a patchwork of boxes of different 
 sizes that would span part of the pages).

Add \dontleavehmode before the first \framedtext.

\starttext
\dontleavehmode\framedtext[width=6em]{abc}\framedtext[width=6em]{abc}
\stoptext

When you want more control about the horizontal placement put them in a line 
alignment environment:

\starttext
\startlinealignment[middle]
  \framedtext[width=6em]{abc}\framedtext[width=6em]{abc}
\stoplinealignment
\stoptext

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

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


Re: [NTG-context] ToC depth (and headers) per section block

2014-07-05 Thread Rik Kabel

On 2014-07-05 05:43, Hans Hagen wrote:

On 7/5/2014 5:52 AM, Rik Kabel wrote:

How can I specify different section depths for different parts in a
document in the TOC? That is, if the document structure is:

   Front Matter
   Body Matter
Part 1
  Chapter 1
   Section 1
  Chapter 2
   Section 1
   Section 2
Part 2
  Chapter 1
   Section 1
   Section 2
  Chapter 2
   Section 1
Appendices
  Chapter 1
   Section 1
  Chapter 2
   Section 1
Back Matter
  Notes
  Bibliography

How can I generate chapter and section entriess in the TOC for Part 1,
but chapter entries only (no section entries) for Part 2 and the
Appendices.

I currently do this by defining a new header equivalent to section and
using that for Part 2 and Appendix sections. Since it is not included in
the lists used by the contents combinedlist, it does not get set.

Is this the best way to do this?


\definehead[silentsection][section]

\starttext

\placelist[chapter,section]

\chapter{first}
\section{first}

\chapter{first}
\silentsection{first}

\stoptext

Yes, that is just what I do now, except that I use \completecontent and 
not \placelist[chapter,section], having excluded lower-level sectioning 
headers via \setupcombinedlist. I am asking if there is a way to take 
advantage of user-defined or system modes, or section blocks, to 
accomplish this without requiring explicit markup (silentsection in your 
example) in the text. I suspect that it is possible, particularly if I 
want the silentsections only in certain section blocks.


The document is set differently for print and screen, and minimizing the 
differences after \starttext seems to me to be generally advantageous.



If instead I want one depth for all body matter parts and a different
depth for the appendices, is there a solution that could be keyed on
system modes or on section blocks, thus moving all of the styling to the
preamble (to use a LaTeX term)? I currently do that to support different
header formats in the body matter and appendices, using the following
method, but I suspect that there may be a more effective way to do that
as well.

   \startsetups[Header]
 \startallmodes[print,*bodypart]
   {\color[PrintHeaderColor]{\PrintHeaderFont
{\llap{\getmarking[chapternumber]~}\getmarking[chapter]}}
 \stopallmodes
 \startallmodes[print,*appendix]
   \color[PrintHeaderColor]{\PrintHeaderFont
 {\getmarking[chapter]}}
 \stopallmodes
   \stopsetups
   \setupheadertexts   []
   \setupheadertexts [\setups{Header}][][][\setups{Header}]

Again, I prefer a method that can be implemented in the preamble. (MKIV
only.)


--
Rik Kabel

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

2014-07-05 Thread Jan Tosovsky
Dear All,

I am hacking the context index entry rendering... ;-)
... but I am stuck with a simple comparison

How can I test the given entry if it equals to the specified one?

The following code has no effect.

\unexpanded\def\defaultregisterentry#1#2#3#4% 
% #1:processor #2:internal #3:seeindex #4:word
  {\def\currentregisterpageindex{#2}%
   % start hacking
   \def\myword{#4}%
   \ifx\myword{My Primary}
  \column % do something
   \fi
   % stop hacking
   \strc_register_injector_process
   ...

What is the proper syntax?

Thanks, Jan

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

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


Re: [NTG-context] Testing the param value

2014-07-05 Thread Wolfgang Schuster

Am 05.07.2014 um 16:47 schrieb Jan Tosovsky j.tosov...@email.cz:

 Dear All,
 
 I am hacking the context index entry rendering... ;-)
 ... but I am stuck with a simple comparison
 
 How can I test the given entry if it equals to the specified one?
 
 The following code has no effect.
 
 \unexpanded\def\defaultregisterentry#1#2#3#4% 
 % #1:processor #2:internal #3:seeindex #4:word
  {\def\currentregisterpageindex{#2}%
   % start hacking
   \def\myword{#4}%
   \ifx\myword{My Primary}
  \column % do something
   \fi
   % stop hacking
   \strc_register_injector_process
   ...
 
 What is the proper syntax?


This should be possible without hacks but without a example I can’t provide 
more than a simple example code.

\newconditional\IndexState

\define[1]\IndexInternalCommand
  
{\doifelse{#1}{MyPrimary}{\global\settrue\IndexState}{\global\setfalse\IndexState}#1}

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

\setupregister
  [index]
  [textcommand=\IndexCommand,
   deeptextcommand=\IndexInternalCommand]

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

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


Re: [NTG-context] [garden] luatex git mirror out of sync

2014-07-05 Thread Mojca Miklavec
On Sat, Jul 5, 2014 at 2:29 PM, Philipp Gesang wrote:
 Hi all,

 there’s been a lot of changes lately to the Luatex SVN but the
 mirror on the Garden doesn’t appear to match pace. Here’s the
 experimental branch on the Garden and on supelec:

 http://git.contextgarden.net/context/luatex/commits/origin/experimental
 
 https://foundry.supelec.fr/scm/viewvc.php/branches/experimental/?root=luatexsortby=date#dirlist

 Commits after 25 Apr are missing on the former.

I was experimenting with svn2git during BachoTeX, but I didn't set it
up properly and the way I made the conversion isn't working properly
for incremental updates.

This means that I would need to change the strategy to convert from
SVN, but I didn't take time yet to take a look into it. There is no
cron job. But if anyone would like to get it done, feel free to reply
off-list and I can try to fix it, maybe with your help.

 Perhaps a cron job is broken somewhere?

No. It has never worked in the first place.

 Also I noticed that if I click the “compare” button on this form:

 
 http://git.contextgarden.net/context/luatex/compare?from=masterto=experimental

 I get a 500 (“We’re sorry, …”). Can anybody reproduce this?

Yes. I can reproduce this.

GitLab seems nice and powerful, but there are bugs and problems. And
sometimes it works very very slow.

I need to figure out whether something went wrong on the server or if
there's a bug in GitLab.

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

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