Re: [NTG-context] put titles in toc

2015-09-09 Thread John Culleton
On Tue, 8 Sep 2015 20:55:04 +0200
Pablo Rodriguez  wrote:

> On 09/08/2015 08:25 PM, John Culleton wrote:
> > In thew frontmatter there are several titles
> > headings that i want to see in the TOC
> > Here is a
> > stripped down version of my file:
> 
> Hi John,
> 
> I think this might do what you want:
> 
> \definehead[titleintoc][chapter][number=no]
> \starttext
> \noheaderandfooterlines
> \title{Contents}
> \placelist[chapter,titleintoc]
> \chapter{foo}
> \input knuth.tex
> \titleintoc{bar}
> \input knuth.tex
> \stoptext
> 
> I hope it helps,
> 
> 
> Pablo

Simple elegant, works. Thanks for your help!

-- 
John Culleton
Wexford Press
Book layout, typesetting and Indexing
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] beta

2015-09-09 Thread Hans Hagen

Hi,

I uploaded a beta with the usual fixes and improvements (mentioned on 
the list). I also redid some of the marginal anchoring, so problems 
might show up there. The reason for this 'upgrade' is that I want more 
control over right2left typesetting (especially because we have mixed use).


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] \emptylines non-functional

2015-09-09 Thread Wolfgang Schuster

Aditya Mahajan 
9. September 2015 16:19
On Wed, 9 Sep 2015, Hans Hagen wrote:


How does this differ from \blank[2*line] etc? vertical glue?
1. When the empty lines are inserted at a line break they are kept with 
\emptylines but when you use \blank the glue disappears at the begin of 
the page.


2. When you use \blank to insert empty lines before (or after) another 
environment which uses \blank to insert vertical space only the larger 
value is used.


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] \emptylines non-functional

2015-09-09 Thread Aditya Mahajan

On Wed, 9 Sep 2015, Hans Hagen wrote:


On 9/9/2015 2:17 AM, Rik Kabel wrote:

On 2015-09-08 17:52, Hans Hagen wrote:

\def\spac_lines_empty[#1]%
  {\endgraf
   \begingroup
   \forgetall
   \scratchcounter\iffirstargument#1\else3\fi\relax
   \ifhmode
  \crlf
  \advance\scratchcounter\minusone
   \fi
   \dorecurse\scratchcounter{\strut\crlf}%
   \endgroup}

Hmmm. I think that the mode test and added \crlf can go, but the
decrement has to be there, at least if my test with and without \crlf in
the example tests that properly, so:

\def\spac_lines_empty[#1]%
   {\endgraf
\begingroup
\forgetall
\scratchcounter\iffirstargument#1\else3\fi\relax
\advance\scratchcounter\minusone
\dorecurse\scratchcounter{\strut\crlf}%
\endgroup}

Of course, I did not run through more tests and do not know if anything
else depends on this that should be tested.


\def\spac_lines_empty[#1]%
  {\endgraf
   \begingroup
  %\forgetall % debatable
   \ifhmode
  \crlf % finish the current line
   \fi
   \dorecurse{\iffirstargument#1\else3\fi}{\strut\crlf}%
   \endgroup}


\starttext

x1 \emptylines[0] x1
x2 \emptylines[1] x2
x3 \emptylines[2] x3
x4 \emptylines[3] x4

x1 \par \emptylines[0] x1
x2 \par \emptylines[1] x2
x3 \par \emptylines[2] x3
x4 \par \emptylines[3] x4

\stoptext


How does this differ from \blank[2*line] etc? vertical glue?

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

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

Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)

2015-09-09 Thread Wolfgang Schuster

Hans Hagen 
9. September 2015 01:43
On 9/8/2015 9:04 PM, Wolfgang Schuster wrote:

Hans Hagen 
11. August 2015 11:48


i have no clue what you're talking about

There is a bug in the reference mechanism between documents.


not so much a bug but the current mechanism assumes a 
project/component struture


i'll see if i can catch the non structured variant

The same happens when you link from on product to another.

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] \setupheadnumber and zero

2015-09-09 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... Great, thanks for the answer. Lukas


On Tue, 08 Sep 2015 21:10:51 +0200, Wolfgang Schuster 
 wrote:


Procházka Lukáš Ing. - Pontex s. r. o. 
29. August 2015 16:11
Hello,

can a section head be generated with the number 0 (or less)?

Sometimes I need to prepend a section while keeping existing section
head numbers...

Example:


\starttext
  \setupheadnumber[chapter][-1]
  \chapter{Ch0} % Getting "Ch0" instead of "0. Ch0"?
  \chapter{Ch1}
\stoptext


Here, "0. Ch0" is not generated, the zero is not displayed; why?

You can't set a negative number for the start of the counter but you can
change the appereance.

\defineexpandable[1]\PreviousNumber
   {\number\numexpr#1-1\relax}

\defineconversion[PreviousNumber][\PreviousNumber]

\defineconversionset[zerostart][n,PreviousNumber][n]

\setuphead[chapter,section][sectionconversionset=zerostart]

\starttext
\chapter{First chapter}
\chapter{Second chapter}
\stoptext

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] cross-references between documents in a project (using \useexternaldocument)

2015-09-09 Thread Jens Bertram

On 09.09.2015 01:43, Hans Hagen wrote:

On 9/8/2015 9:04 PM, Wolfgang Schuster wrote:

Hans Hagen 
11. August 2015 11:48


i have no clue what you're talking about

There is a bug in the reference mechanism between documents.


not so much a bug but the current mechanism assumes a project/component
struture



Hi,
I'm also struggeling with cross-referencing in a project/component 
layout. I attached a minimal example that resembles the layout I use.

If you compile xr-prod1 and xr-prod2 all cross-references are simply empty.

I looked at the lua code to see if I'm able to fix it myself and 
stumbled over the 'identify_inner(set,var,prefix,collected,derived)' 
function in strc-ref.lua (at around line 1396 in MKVI from 2015.09.04 
11:00). It look like identify_inner gets sometimes called with 'prefix' 
set to nil while 'derived' is also undefined (at 1493 and 1514). If I 
get the program flow right this looks suspicious, as it always retuns 
'false' from 'identify_inner'. If I add 'prefix = prefix or ""' to 
'identify_inner' I actually get references printed in the test case. 
However the links are not working and for the figure the section number 
is wrong.


Finally looking at the uncompressed PDF I can see that references are 
set not prefixed in xr-prod2.pdf (i.e. link to 'plain'), but are 
prefixed in xr-prod1.pdf (anchor is 'xr-comp1-1:plain').


Maybe these informations can help in resolving the issue. :)


i'll see if i can catch the non structured variant


When you produce a PDF from the attached documents you can use the
hyperlinks to jump to the chapter page in the other document but no
information is printed because the information with the section number,
page number or title isn’t loaded (can be seen in the tracker
information in the log).

Wolfgang



\enabletrackers[
	system.jobfiles,
	structures.referencing,
	structures.referencing.importing,
	structures.referencing.identifying]
\setupinteraction[state=start]
\useexternaldocument[xr1][xr-prod1][XR Product One]
\useexternaldocument[xr2][xr-prod2][XR Product Two]
\nopdfcompression

\startproject xr-proj
	\product xr-prod1
	\product xr-prod2
\stopproject

\startcomponent xr-comp2-1
	\starttext
		plain\\
		ABOUT: \about[xr1::plain]\\
		IN: \in[xr1::plain]\\
		AT: \at[xr1::plain]
		
		page2\\
		ABOUT: \about[xr1::pagetwo]\\
		IN: \in[xr1::pagetwo]\\
		AT: \at[xr1::pagetwo]
		
		figone\\
		ABOUT: \about[xr1::figone]\\
		IN: \in[xr1::figone]\\
		AT: \at[xr1::figone]
		
		figtwo\\
		ABOUT: \about[xr1::figtwo]\\
		IN: \in[xr1::figtwo]\\
		AT: \at[xr1::figtwo]
	\stoptext
\stopcomponent

\setupinteraction[state=start]
\startcomponent xr-comp1-1
	\startchapter[reference=plain, title={Plain chapter}]
		Lorem ipsum dolor sit amet, consectetur adipiscing elit.
	\stopchapter
	\page
	\startchapter[reference=pagetwo, title={Plain chapter page two}]
		Lorem ipsum dolor sit amet, consectetur adipiscing elit.
		\startsection[reference=secwithpic, title={Section with image}]
			\startplacefigure[reference=figone, title={Figure 1}]
\externalfigure[cow.pdf]
			\stopplacefigure
		\stopsection
	\stopchapter

	\startchapter[reference=chaptwo, title={Plain chapter two}]
		Lorem ipsum dolor sit amet, consectetur adipiscing elit.
		\startsection[reference=sectwowithpic, title={Section chap2 with image}]
			\startplacefigure[reference=figtwo, title={Figure 2}]
\externalfigure[cow.pdf]
			\stopplacefigure
		\stopsection
	\stopchapter
\stopcomponent

\project xr-proj
\startproduct xr-prod1
	\component xr-comp1-1
\stopproduct

\project xr-proj
\startproduct xr-prod2
	\component xr-comp2-1
\stopproduct

___
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] \emptylines non-functional

2015-09-09 Thread Hans Hagen

On 9/9/2015 2:17 AM, Rik Kabel wrote:

On 2015-09-08 17:52, Hans Hagen wrote:

\def\spac_lines_empty[#1]%
  {\endgraf
   \begingroup
   \forgetall
   \scratchcounter\iffirstargument#1\else3\fi\relax
   \ifhmode
  \crlf
  \advance\scratchcounter\minusone
   \fi
   \dorecurse\scratchcounter{\strut\crlf}%
   \endgroup}

Hmmm. I think that the mode test and added \crlf can go, but the
decrement has to be there, at least if my test with and without \crlf in
the example tests that properly, so:

\def\spac_lines_empty[#1]%
   {\endgraf
\begingroup
\forgetall
\scratchcounter\iffirstargument#1\else3\fi\relax
\advance\scratchcounter\minusone
\dorecurse\scratchcounter{\strut\crlf}%
\endgroup}

Of course, I did not run through more tests and do not know if anything
else depends on this that should be tested.


\def\spac_lines_empty[#1]%
  {\endgraf
   \begingroup
  %\forgetall % debatable
   \ifhmode
  \crlf % finish the current line
   \fi
   \dorecurse{\iffirstargument#1\else3\fi}{\strut\crlf}%
   \endgroup}


\starttext

x1 \emptylines[0] x1
x2 \emptylines[1] x2
x3 \emptylines[2] x3
x4 \emptylines[3] x4

x1 \par \emptylines[0] x1
x2 \par \emptylines[1] x2
x3 \par \emptylines[2] x3
x4 \par \emptylines[3] x4

\stoptext

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