[NTG-context] Numbering subformulas broken?

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

Hello,

the following example (based on 
http://wiki.contextgarden.net/Math/Display#Automatic_Sub-Formula_Numbering ):


\starttext
  \startsubformulas[eq:1]
\placeformula[eq:1a]
  \startformula
c^2 = a^2 + b^2
  \stopformula

\placeformula[eq:1b]
  \startformula
c^2 = a^2 + b^2
  \stopformula

\placeformula[eq:1c]
  \startformula
c^2 = a^2 + b^2
  \stopformula
  \stopsubformulas

  Formula (\in[eq:1]) states the Pythagora's Theorem twice,
once in (\in[eq:1a]) and again in (\in[eq:1b]) and \in[eq:1c].
\stoptext


has two faults:

- subformulas 1b and 1c are not numbered (obviously, references to them show 
??),
- vertical distance between 1c and 1b is somehow bigger that that between 1b 
and 1c.

How to fix it?

(Compiled with: ConTeXt  ver: 2015.07.28 19:12 MKIV beta  fmt: 2015.7.30  int: 
english/english.)

Best regards,

Lukas


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

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

SubForm.mkiv
Description: Binary data


SubForm.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] Using JDF w/in ConTeXt?

2015-08-01 Thread William Adams
Is this possible?

I need to make a .pdf to print specific pages of a .pdf to specific trays.

William
___
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] Register customization for backmatter page numbers

2015-08-01 Thread Pablo Rodriguez
Hi Rik,

sorry for top-posting, but I’m not sure whether I understand your request.

I wonder whether the following sample points in the right direction:

\setuppapersize[A6]
\setuppagenumber[way=bypart, prefix=yes, prefixset=chapter]
\startsectionblockenvironment[bodypart]
\setuppagenumber[number=1]
\stopsectionblockenvironment
\startsectionblockenvironment[appendix]
\setuppagenumber[number=1]
\stopsectionblockenvironment
\starttext
\completecontent
\startbodymatter
\dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}}
\stopbodymatter
\startappendices
\dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}}
\title{Index}
\placeindex
\stopappendices
\stoptext

Just in case it helps,

Pablo


On 08/01/2015 04:20 AM, Rik wrote:
 List,
 
 I have a book with frontmatter, bodymatter, and backmatter. The 
 frontmatter is pagenumbered with lc roman, and the bodymatter and 
 backmatter are numbered, all by block.
 
 The backmatter contain a glossary, pagenotes, bibliography, and an 
 index. In addition to the frontmatter and the bodymatter, both the 
 glossary and the pagenotes contain items that are indexed.
 
 I need to distinguish pagenumbers that appear in the index so that the 
 reader can identify where in the book the page is located. For the 
 frontmatter, that is not a problem. For items that appear in the 
 bodymatter or backmatter, however, page numbers are not unique.
 
 One method that has been suggested is to prefix the pagenumber displayed 
 in the index with a mark to indicate that the page is in the backmatter, 
 or to italicize it, or to use an alternate font. I have looked at the 
 defineconversionset and defineprocessor documentation and find no way to 
 mark index entries appropriately.
 
 Can anyone suggest a way to do this, or some other method? Perhaps a 
 pagecommand that compares the register item real page number to the 
 highest real page number of the body? I would prefer a solution that 
 does not require changing the register commands (\index) in the text.
 
 Continuous numbering across the frontmatter, bodymatter, and backmatter 
 is not wanted, although as a last resort I might be able to argue for 
 continuous numbering in the bodymatter and backmatter.
 


-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] r2l alignment and linenumbering conflict?

2015-08-01 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear Talal,
Salaam.

Your tex file linertl.tex appears to be corrupted, could you either repost  
it or send it to me off list?


I was also going to write something similar to Pablo. My suggestion is to  
move forward with the rest of your project and this will almost certainly  
be solved before you're done. Unless Hans says that there is no chance of  
a fix, which I *highly* doubt. Send a reminder to the list every few days  
or so, as you did today.


Proceeding this way produces an uneasy feeling; believe me, I know. But  
I've been in your shoes more times than I can count and it always worked  
out in the end.


Best wishes
Idris

On Sat, 01 Aug 2015 09:37:57 -0600, tala...@fastmail.fm  
tala...@fastmail.fm wrote:


Sorry to pester, but this problem is barring me from moving my book  
project into ConTeXt this weekend.


The use of linenumbers seems to throw off the R2L mechanism. Example of  
the problem attached.





On 30 Jul 2015, at 16:30, tala...@fastmail.fm wrote:

There seems to be some limitation (or bug) in right-to-left (r2l)  
alignment, when used alongside linenumbering. Consider the following:



\setuppapersize[A6]
\starttext \showframe

\section{Incorrect}
\startlinenumbering
\startalignment[r2l]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque  
molestie dictum quam non congue. Integer ut dolor vel mi vestibulum  
molestie vel et nulla.

\stopalignment
\stoplinenumbering

\section{Correct}
\startalignment[r2l]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque  
molestie dictum quam non congue. Integer ut dolor vel mi vestibulum  
molestie vel et nulla.

\stopalignment

\stoptext


The RTL alignment works correctly on its own. However, when you  
introduce another factor — here,  linenumbers — the RTL alignment is  
ignored.


Perhaps this linked to the problem with of RTL footnotes being  
discussed here: gmane.comp.tex.context/92113  
http://article.gmane.org/gmane.comp.tex.context/92113?


Best wishes,
Talal
___
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
___





--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] r2l alignment and linenumbering conflict?

2015-08-01 Thread Pablo Rodriguez
On 08/01/2015 05:37 PM, tala...@fastmail.fm wrote:
 Sorry to pester, but this problem is barring me from moving my book
 project into ConTeXt this weekend.
 
 The use of linenumbers seems to throw off the R2L mechanism. Example
 of the problem attached. 

Hi Talal,

I’m afraid that I don’t have a fix for what it might be a bug in ConTeXt.

If you want to work on you book before a fix is released, I’d suggest
you to add the following line at the top of your document:

\definestartstop[linenumbering]

This will deactivate line numbering and it will allow you to work on the
rest of the book without having to add any code later.

If your book is already finished, you only have to wait for the fix ;-).

Just in case it helps,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] r2l alignment and linenumbering conflict?

2015-08-01 Thread tala...@fastmail.fm
Sorry to pester, but this problem is barring me from moving my book project into ConTeXt this weekend.The use of linenumbers seems to throw off the R2L mechanism. Example ofthe problem attached.

linertl.pdf
Description: Adobe PDF document


linertl.tex
Description: application/applefile
On 30 Jul 2015, at 16:30, tala...@fastmail.fm wrote:There seems to be some limitation (or bug) in right-to-left (r2l) alignment, when used alongside linenumbering. Consider the following:\setuppapersize[A6]\starttext \showframe\section{Incorrect}\startlinenumbering\startalignment[r2l]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla.\stopalignment\stoplinenumbering\section{Correct}\startalignment[r2l]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla.\stopalignment\stoptextThe RTL alignment works correctly on its own. However, whenyou introduce another factor — here, linenumbers — the RTL alignment is ignored.Perhaps this linked to the problem with of RTL footnotes being discussed here:gmane.comp.tex.context/92113?Best wishes,Talal___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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : 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] Solved, was Re: Register customization for backmatter page numbers

2015-08-01 Thread Rik Kabel

On 2015-08-01 13:54, Pablo Rodriguez wrote:

Hi Rik,

sorry for top-posting, but I’m not sure whether I understand your request.

I wonder whether the following sample points in the right direction:

 \setuppapersize[A6]
 \setuppagenumber[way=bypart, prefix=yes, prefixset=chapter]
 \startsectionblockenvironment[bodypart]
 \setuppagenumber[number=1]
 \stopsectionblockenvironment
 \startsectionblockenvironment[appendix]
 \setuppagenumber[number=1]
 \stopsectionblockenvironment
 \starttext
 \completecontent
 \startbodymatter
 \dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}}
 \stopbodymatter
 \startappendices
 \dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}}
 \title{Index}
 \placeindex
 \stopappendices
 \stoptext

Just in case it helps,

Pablo


On 08/01/2015 04:20 AM, Rik wrote:

List,

I have a book with frontmatter, bodymatter, and backmatter. The
frontmatter is pagenumbered with lc roman, and the bodymatter and
backmatter are numbered, all by block.

The backmatter contain a glossary, pagenotes, bibliography, and an
index. In addition to the frontmatter and the bodymatter, both the
glossary and the pagenotes contain items that are indexed.

I need to distinguish pagenumbers that appear in the index so that the
reader can identify where in the book the page is located. For the
frontmatter, that is not a problem. For items that appear in the
bodymatter or backmatter, however, page numbers are not unique.

One method that has been suggested is to prefix the pagenumber displayed
in the index with a mark to indicate that the page is in the backmatter,
or to italicize it, or to use an alternate font. I have looked at the
defineconversionset and defineprocessor documentation and find no way to
mark index entries appropriately.

Can anyone suggest a way to do this, or some other method? Perhaps a
pagecommand that compares the register item real page number to the
highest real page number of the body? I would prefer a solution that
does not require changing the register commands (\index) in the text.

Continuous numbering across the frontmatter, bodymatter, and backmatter
is not wanted, although as a last resort I might be able to argue for
continuous numbering in the bodymatter and backmatter.
Thank you, Pablo. That does meet the requirements as stated, but having 
the chapter number as a prefix for the body entries is overly verbose 
and will not pass muster. (Failure of my specifications.)


I have found a solution, however. By placing these in the environment:

   \defineprocessor[Back][style=slanted,right=n]
   \defineprocessor[Front][style=normal]
   \def\Where{Front}
   \def\Index{\index[\Where-]}

And this at the start of the backmatter:

   \def\Where{Back}

I can index items with \Index{item} and the value of \Where when the 
entry is processed will be used. This meets the requirement that no 
change to the indexing is required in the text (except to change \index 
to \Index), and I can further distinguish notes from glossary entries if 
needed. I could even eliminate that last change by defining my own 
register Index and using \def\index{\Index[\Where-] (and an appropriate 
\placeregister).


I still haven't played with this a lot, so I don't know yet if it will 
handle all the optional bits of register entries, but it should suffice 
for my current needs.


--
Rik

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

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

[NTG-context] Process contents of xmlflush in context

2015-08-01 Thread Xan
Hi,

I use MKIV. I want to follow Schmitz tutorial 
[http://www.ntg.nl/maps/42/12.pdf]. My problem is that when my xml contents has 
ConTeXt commands, it are ignored (printing as verbose not interpreted). How can 
I achieve that:

?xml version=1.0 standalone='yes'?
?xml encoding='UTF-8'?
activitats
  activitat id=1 tema=funcions continguts=funció afí, dependència lineal, 
funcions a trossos
presentacio tipus=tradicional sintaxi=context verbs=modelitzacióLa 
fitxa blava i la fitxa vermella es mouen de la manera següent:
  \startitemize
\item la blava recorre
  \stopitemize
/presentacio
  /activitat
/activitats


is interpreted? I want that {\start,\stop}itemize is processed.

My setup is:

\startenvironment processadorxml

\xmlloadonly{rebost}{dades/activitats.xml}{}

\def\Activitat#1%
  {\xmlfilter{rebost}
{/activitats/activitat[@id=='#1']/presentacio/command(xml:choose)}
  }
  
  
\startxmlsetups xml:choose
  \startitem
{\dontleavehmode{\xmlflush{#1}}}
  \stopitem
\stopxmlsetups

\stopenvironment


Thanks a lot,
Xan

PS: Please, CCme.
___
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] noheaderandfooterlines messes with colors

2015-08-01 Thread Aditya Mahajan

On Sat, 1 Aug 2015, Eric Détrez wrote:


Here is a minimal example :

\usemodule[tikz]
\starttext
\noheaderandfooterlines
\starttikzpicture
  \draw(0,2) node[color=red]{This should be red};
  \draw(0,0) node[color=red]{This is red};
\stoptikzpicture
\stoptext

The first line is written in black
but when I comment \noheaderandfooterlines both lines are red

This seems a curious effect


Using \forcecolorhack works for this example:

\starttikzpicture
  \forcecolorhack
   \draw(0,2) node[color=red]{This should be red};
   \draw(0,0) node[color=red]{This is red};
\stoptikzpicture

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
___

[NTG-context] noheaderandfooterlines messes with colors

2015-08-01 Thread Eric Détrez

Here is a minimal example :

\usemodule[tikz]
\starttext
\noheaderandfooterlines
\starttikzpicture
  \draw(0,2) node[color=red]{This should be red};
  \draw(0,0) node[color=red]{This is red};
\stoptikzpicture
\stoptext

The first line is written in black
but when I comment \noheaderandfooterlines both lines are red

This seems a curious effect

The goal is to get a nice front page with tikz drawings and text at the 
right place.

Please don't tell me to use metaFun.
--
Eric Détrez
Informatique
Lycée Faidherbe, Lille
http://eric-detrez.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] footnotes when using RtL (Arabic)

2015-08-01 Thread tala...@fastmail.fm
I’ve run into a hiccup. In the previous MWE that worked with Woflgang and Hans’ 
patch, the notes were footnotes. However, if make them into linenotes, we run 
into a strange problem: the first note is typeset correctly, but all the 
remaining linenotes in that stream are typeset on the bottom left corner of the 
page. See attached files.

Best wishes,
Talal



linenotes r2l.tex
Description: Binary data


linenotes r2l.pdf
Description: Adobe PDF document


 On 31 Jul 2015, at 12:07, tala...@fastmail.fm wrote:
 
 Excellent. This seems to solve the problem completely. I even tried mixing 
 Arabic and English text in the RTL footnotes, switched on the 
 “alternative=serried” option, and defined my own custom note streams — 
 everything worked very well. The only thing that didn’t work is to mix, in 
 the same stream, footnotes that are LTR with footnotes that are RTL. But I 
 did not expect this to work, and I cannot think of a real world scenario in 
 which such footnotes would/should be mixed in the same stream.
 
 Attached are both the .tex file and the PDF with a perfectly working example. 
 Many thanks to you both, Wolfgang and Hans. Hans, I assume we’ll know if the 
 patch eventually makes it into a beta? 
 
 Best,
 Talal
 
 RTL-paragraphed-footnotes.texRTL-paragraphed-footnotes.pdf
 
 On 31 Jul 2015, at 09:39, Hans Hagen pra...@wxs.nl wrote:
 
 On 7/31/2015 1:51 AM, tala...@fastmail.fm wrote:
 You’re right. The patch gets us half way to the desired behaviour
 (namely, correct ordering of the footnotes within the paragraph). But it
 seems that the ‘paragraph’ option doesn’t play well with RTL generally,
 resulting in the second note disappearing when using
 \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups.
 
 can you try
 
 \unprotect
 
 \unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}
 
 \def\strc_notes_flush_global
 {\begingroup
  \useinterlinespaceparameter\noteparameter
  \doifelse{\noteparameter\c!paragraph}\v!yes
{\leftorrightvbox
   {\starthboxestohbox
 \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber
\stophboxestohbox}}
 {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}%
  \endgroup}
 
 \protect
 
 
 On 30 Jul 2015, at 20:04, Wolfgang Schuster
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote:
 
 tala...@fastmail.fm mailto:tala...@fastmail.fm
 30. Juli 2015 20:37
 I’ve come across a snag. When using parentheses in Arabic footnotes, they 
 are flipped. In any earlier email 
 (http://article.gmane.org/gmane.comp.tex.context/91501/match=setupdirections+bidi+global),
  you had advised adding the following:
 
 \startsetups[note:footnote]
  \setupdirections[bidi=global]
 \stopsetups
 
 \setupnote[footnote][setups=note:footnote] % align=righttoleft
 However, if one does this with your patch, the second footnote gets 
 dropped. Here is the MWE:
 
 The second note disappears even without the patch, the problem this
 the paragraph option for the notes.
 
 Wolfgang
 ___
 If your question is of interest to others as well, please add an entry
 to the Wiki!
 
 maillist : ntg-context@ntg.nl mailto: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
 ___
 
 
 
 -- 
 
 -
 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] Solved, was Re: Register customization for backmatter page numbers

2015-08-01 Thread Rik Kabel

On 2015-08-01 14:42, Rik Kabel wrote:

On 2015-08-01 13:54, Pablo Rodriguez wrote:

Hi Rik,

sorry for top-posting, but I’m not sure whether I understand your request.

I wonder whether the following sample points in the right direction:

 \setuppapersize[A6]
 \setuppagenumber[way=bypart, prefix=yes, prefixset=chapter]
 \startsectionblockenvironment[bodypart]
 \setuppagenumber[number=1]
 \stopsectionblockenvironment
 \startsectionblockenvironment[appendix]
 \setuppagenumber[number=1]
 \stopsectionblockenvironment
 \starttext
 \completecontent
 \startbodymatter
 \dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}}
 \stopbodymatter
 \startappendices
 \dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}}
 \title{Index}
 \placeindex
 \stopappendices
 \stoptext

Just in case it helps,

Pablo


On 08/01/2015 04:20 AM, Rik wrote:

List,

I have a book with frontmatter, bodymatter, and backmatter. The
frontmatter is pagenumbered with lc roman, and the bodymatter and
backmatter are numbered, all by block.

The backmatter contain a glossary, pagenotes, bibliography, and an
index. In addition to the frontmatter and the bodymatter, both the
glossary and the pagenotes contain items that are indexed.

I need to distinguish pagenumbers that appear in the index so that the
reader can identify where in the book the page is located. For the
frontmatter, that is not a problem. For items that appear in the
bodymatter or backmatter, however, page numbers are not unique.

One method that has been suggested is to prefix the pagenumber displayed
in the index with a mark to indicate that the page is in the backmatter,
or to italicize it, or to use an alternate font. I have looked at the
defineconversionset and defineprocessor documentation and find no way to
mark index entries appropriately.

Can anyone suggest a way to do this, or some other method? Perhaps a
pagecommand that compares the register item real page number to the
highest real page number of the body? I would prefer a solution that
does not require changing the register commands (\index) in the text.

Continuous numbering across the frontmatter, bodymatter, and backmatter
is not wanted, although as a last resort I might be able to argue for
continuous numbering in the bodymatter and backmatter.
Thank you, Pablo. That does meet the requirements as stated, but 
having the chapter number as a prefix for the body entries is overly 
verbose and will not pass muster. (Failure of my specifications.)


I have found a solution, however. By placing these in the environment:

\defineprocessor[Back][style=slanted,right=n]
\defineprocessor[Front][style=normal]
\def\Where{Front}
\def\Index{\index[\Where-]}

And this at the start of the backmatter:

\def\Where{Back}

I can index items with \Index{item} and the value of \Where when the 
entry is processed will be used. This meets the requirement that no 
change to the indexing is required in the text (except to change 
\index to \Index), and I can further distinguish notes from glossary 
entries if needed. I could even eliminate that last change by defining 
my own register Index and using \def\index{\Index[\Where-] (and an 
appropriate \placeregister).


I still haven't played with this a lot, so I don't know yet if it will 
handle all the optional bits of register entries, but it should 
suffice for my current needs.



And a more robust solution that takes into account index sort keys:

   % macros=mkvi
   \starttexdefinition unexpanded index
  \dosingleempty\doStartindex
   \stoptexdefinition
   \starttexdefinition doStartindex [#sortkey]
  \doifmodeelse{*backpart}
 {\Index[Back-#sortkey]}
 {\Index[notBack-#sortkey]}
   \stoptexdefinition
   \defineprocessor[Back][style=slanted,right=n]
   \defineprocessor[notBack] [style=normal]
   \defineregister [Index]
   \setupregister  [Index]   [n=2,command=\Word,balance=no,compress=yes]


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

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

Re: [NTG-context] r2l alignment and linenumbering conflict?

2015-08-01 Thread Wolfgang Schuster

tala...@fastmail.fm mailto:tala...@fastmail.fm
1. August 2015 17:37
Sorry to pester, but this problem is barring me from moving my book 
project into ConTeXt this weekend.


The use of linenumbers seems to throw off the R2L mechanism. Example 
of the problem attached.




The culprit is the function boxed.stage_two in page.lua which output 
each text line in the line numbering
environment in left to right mode. When you have justified lines 
everything is fine but when you have a ragged
line (e.g. the last line in a paragraph) ConTeXt aligns the context with 
the left margin.


\starttext \showframe

\startalignment[righttoleft,flushleft]

\input ward

\blank

\startlinenumbering
\input ward
\stoplinenumbering

\stopalignment

\stoptext

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

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

[NTG-context] ending every paragraph

2015-08-01 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Suppose I want to end the last line of every paragraph with a command,  
say, \thinrule, or a string of dots. Is there a straightforward way to do  
that? TeX has \everypar but I'm not aware of any, say, \endeverypar  
command.


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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
___