Re: [NTG-context] ntg-context Digest, Vol 180, Issue 23

2019-06-23 Thread Andres Conrado
Thanks, Pablo. I am assuming I need to have Utopia installed in my usual
font folder. I tried with Erewhon (I have otf files for that) and it works.
Thank you.

In a related note, is there any reasonable way to use the latex math font *Math
Times Pro 2* (https://www.pctex.com/mtpro2.html)? I know a latex user who
bought that font and I wonder if I can convince him to get on the ConTeXt
boat.

Andrés Conrado Montoya
http://chiquitico.org


El dom., 23 jun. 2019 a las 5:00,  escribió:

> Send ntg-context mailing list submissions to
> ntg-context@ntg.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
> ntg-context-requ...@ntg.nl
>
> You can reach the person managing the list at
> ntg-context-ow...@ntg.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
>
>
> Today's Topics:
>
>1. Re: is it useful to use the option "--fonts=all" when running
>   first-setup-sh? (Pablo Rodriguez)
>2. Re: crosswords puzzles (Wolfgang Schuster)
>3. mkii to mkiv - section numbering with minimal example
>   (Duncan Hothersall)
>4. Re: mkii to mkiv - section numbering with minimal example
>   (Hans Hagen)
>
>
> --
>
> Message: 1
> Date: Sat, 22 Jun 2019 12:03:38 +0200
> From: Pablo Rodriguez 
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] is it useful to use the option
> "--fonts=all" when running first-setup-sh?
> Message-ID: <9a3757f9-04d5-ae8b-655f-160c9bc91...@gmx.es>
> Content-Type: text/plain; charset=utf-8
>
> On 6/20/19 10:39 PM, Andres Conrado Montoya wrote:
> > As the subject says. I've been experimenting with having a by-project
> > context folder, so I can have a "frozen" version for each project. I see
> > there's an option to install more fonts (including utopia, useful for a
> > project I'm working on). However, I have no idea how to use these fonts.
> > Are they available in mkiv? only for mkii? Do we have typescripts for
> > those fonts? If so, how are they called? Are those fonts actually usable
> > or are they just remains from a past era?
>
> Hi Andrés,
>
> this sample works fine with both MkIV and LMTX (no --fonts=all required):
>
> \definefontfamily[mainface][rm][Utopia]
> \setupbodyfont[mainface]
> \starttext
> \input zapf
> \stoptext
>
> Just in case it helps,
>
> Pablo
> --
> http://www.ousia.tk
>
>
> --
>
> Message: 2
> Date: Sat, 22 Jun 2019 12:05:13 +0200
> From: Wolfgang Schuster 
> To: mailing list for ConTeXt users , DesdeChaves
> 
> Subject: Re: [NTG-context] crosswords puzzles
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> DesdeChaves schrieb am 22.06.2019 um 11:42:
> > Dear sirs,
> >
> > Is there a way to make crosswords  or word puzzles in context?
> > In my hippocampus I have a vague idea that this has already been
> > tried, but I can't find this code anymore.
> AFAIK there are only packages for LaTeX to create crossword but you can
> use natural or extreme tables to create them. For the input Lua can be a
> better choice because you can put your words (or numbers) in a Lua table
> and use a loop to create a table for TeX.
>
> Wolfgang
>
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190622/ff819017/attachment-0001.html
> >
>
> --
>
> Message: 3
> Date: Sun, 23 Jun 2019 09:26:04 +0100
> From: Duncan Hothersall 
> To: mailing list for ConTeXt users 
> Subject: [NTG-context] mkii to mkiv - section numbering with minimal
> example
> Message-ID:
>  t...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Further to my previous query about updating from mkii to mkiv, I have
> solved some of the issues by trial and error but am beginning to identify
> the ones I can't resolve. My first minimal example is below.
>
> I want the sections and subsections not to prefix the part and chapter
> numbering, giving me this output:
>
> Part 1
> Chapter 1.1
> Section 1
> Subsection 1.1
>
> The line that used to achieve this result was
>
> \setupsection[section-3][previousnumber=no]
>
> and there was also
>
> \setuphead[section][partnumber=no,chapternum

Re: [NTG-context] mkii to mkiv - section numbering with minimal example

2019-06-23 Thread Hans Hagen

On 6/23/2019 10:26 AM, Duncan Hothersall wrote:
Further to my previous query about updating from mkii to mkiv, I have 
solved some of the issues by trial and error but am beginning to 
identify the ones I can't resolve. My first minimal example is below.


I want the sections and subsections not to prefix the part and chapter 
numbering, giving me this output:


Part 1
Chapter 1.1
Section 1
Subsection 1.1

The line that used to achieve this result was

\setupsection[section-3][previousnumber=no]

and there was also

\setuphead[section][partnumber=no,chapternumber=no]

but neither of these seems to work in mkiv


Minimal example:

\setupsection[section-3][previousnumber=no]
\setuphead[section][partnumber=no,chapternumber=no]

\starttext
\part{Part}
Part
\chapter{Chapter}
Chapter
\section{Section}
Section
\subsection{Subsection}
Subsection
\stoptext

Many thanks for any pointers.
in the test suite there are all kind of examples (zip can be downloaded 
from the website)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] mkii to mkiv - section numbering with minimal example

2019-06-23 Thread Duncan Hothersall
Further to my previous query about updating from mkii to mkiv, I have
solved some of the issues by trial and error but am beginning to identify
the ones I can't resolve. My first minimal example is below.

I want the sections and subsections not to prefix the part and chapter
numbering, giving me this output:

Part 1
Chapter 1.1
Section 1
Subsection 1.1

The line that used to achieve this result was

\setupsection[section-3][previousnumber=no]

and there was also

\setuphead[section][partnumber=no,chapternumber=no]

but neither of these seems to work in mkiv


Minimal example:

\setupsection[section-3][previousnumber=no]
\setuphead[section][partnumber=no,chapternumber=no]

\starttext
\part{Part}
Part
\chapter{Chapter}
Chapter
\section{Section}
Section
\subsection{Subsection}
Subsection
\stoptext

Many thanks for any pointers.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Latest changes in some size registers

2019-02-25 Thread Wolfgang Schuster

Martin Bruchanov schrieb am 25.02.19 um 17:39:

I have just done some manual  changes to solve this:

  before={\blank[1*small]} to  before={\blank[-5pt]},%

Btw, is there any way to display values of these visual attributes when 
I need to debug "setupsection" setting?


(I am usually changing a lot of stuff and comparing it with Wiki and 
output, but it is quite lame approach.)


\usemodule [setups]

\starttext

% \setuphead [..,..=..,..]
\showrootvalues [head]

% \setuphead [chapter] [..,..=..,..]
\showinstancevalues [head] [chapter]

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Latest changes in some size registers

2019-02-25 Thread Martin Bruchanov

I have just done some manual  changes to solve this:

 before={\blank[1*small]} to  before={\blank[-5pt]},%

Btw, is there any way to display values of these visual attributes when 
I need to debug "setupsection" setting?


(I am usually changing a lot of stuff and comparing it with Wiki and 
output, but it is quite lame approach.)


Regards,

BruXy


On 2019-02-21 11:37 p.m., Martin Bruchanov wrote:

Hi all,

I have some very condensed documents which should fit on one page:

http://gnulinux.guru/bash_cheatsheet.pdf

Without any major change in style definition, there is more space 
around sections or itemize:


http://gnulinux.guru/bash_cheatsheet_diff.pdf

Source code is here:

https://github.com/BruXy/gnulinux.guru/tree/master/bash_tahak

Did I miss some update which has introduced some different length 
settings?


I have version: 2019.02.14 16:57

Regards,

BruXy

___ 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Wolfgang Schuster

Michael Guravage 
14. April 2016 um 09:46
Greetings,

I would like to use a variable for the value of the list argument in, 
e.g., the \startsection command. If you compile my little example you 
will see that the first 'literal' assignment works, while the second 
'variable' assignment does not. What am I missing here?



ConTeXt saves by default the list entries without expanding them
which means you get "\getvariable{TOC}{list}" as entry in the table
of contents for your section section entry but at this moment you
haven’t set a value for this variable.

To get the content of the variable in the list entry you have to expand
the argument of the list key, one way is the use of the \expanded
command as shown by Marco but you also let ConTeXt do this for
you (no need for \expanded{…}) when you add

\setuphead[section][expansion=yes]

at the begin of your document.

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] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Marco Patzer
On Thu, 14 Apr 2016 09:46:34 +0200
Michael Guravage  wrote:

> I would like to use a variable for the value of the list argument in,
> e.g., the \startsection command. If you compile my little example you
> will see that the first 'literal' assignment works, while the second
> 'variable' assignment does not. What am I missing here?
> 
> Cheers,
> 
> Michael
> 
> 
> \starttext
> 
>   \placecontent
> 
>   \setvariables[TOC][list=Second Section]
> 
>   \startsection [title={First}, list={First Section}]
> This is the first section.
>   \stopsection
> 
>   \startsection [title={Second}, list={\getvariable{TOC}{list}}]

I suspect issues with the order of expansion because it works with

  \expanded{\startsection [title={Second}, list={\getvariable{TOC}{list}}]}

Marco
___
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] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Michael Guravage
Greetings,

I would like to use a variable for the value of the list argument in, e.g.,
the \startsection command. If you compile my little example you will see
that the first 'literal' assignment works, while the second 'variable'
assignment does not. What am I missing here?

Cheers,

Michael


\starttext

  \placecontent

  \setvariables[TOC][list=Second Section]

  \startsection [title={First}, list={First Section}]
This is the first section.
  \stopsection

  \startsection [title={Second}, list={\getvariable{TOC}{list}}]
This is the \getvariable{TOC}{list}
  \stopsection

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

[NTG-context] Assigning a variable to the list argument in \setupsection

2016-04-14 Thread Michael Guravage
Greetings,

I would like to use a variable for the value of the list argument in, e.g.,
the \startsection command. If you compile my little example you will see
that the first 'literal' assignment works, while the second 'variable'
assignment does not. What am I missing here?

Cheers,

Michael


\starttext

  \placecontent

  \setvariables[TOC][list=Second Section]

  \startsection [title={First}, list={First Section}]
This is the first section.
  \stopsection

  \startsection [title={Second}, list={\getvariable{TOC}{list}}]
This is the \getvariable{TOC}{list}
  \stopsection

\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] How not to print the chapter number

2015-08-07 Thread Tomas Hala
Hello Eric,

try the following:

\definehead[mysect][section]
\setuphead[mysect][number=no]

\starttext
\mysect{Foo}
\subsection{Bar one}
\subsubsection{Barbar one}
\subsubsection{Barbar two}
\stoptext

Best wishes,

Tomas


Fri, Aug 07, 2015 ve 03:04:04PM +0200 Eric Détrez napsal(a):
# I wish to print my texte as
# 
# I Foo
# 
# 1 Bar one
# 
# 1.1 barbar one
# 
# 1.2 barbar two
# 
# 2 Bar two
# 
# 2.1 foofoo one
# 
# 2.2 foofoo two
# 
# I don't want the Roman I printed in the numbering.
# 
# With contextmark II I just added
# \setupsection[section-3][previousnumber=no]
# but it doesn't seem to work in mark IV.
# 
# Is there a way to do it ?
# 
# 
# -- 
# 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
# 
___

 Tomáš Hála

Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28

http://akela.mendelu.cz/~thala
___
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 not to print the chapter number

2015-08-07 Thread Eric Détrez

Le 07-08-2015 15:04, Eric Détrez a écrit :

I wish to print my texte as

I Foo

1 Bar one

1.1 barbar one

1.2 barbar two

2 Bar two

2.1 foofoo one

2.2 foofoo two

I don't want the Roman I printed in the numbering.

With contextmark II I just added
\setupsection[section-3][previousnumber=no]
but it doesn't seem to work in mark IV.

Is there a way to do it ?


An answer (in the mailing-list archives) and also in the wiki (I didn't 
read it well enough)


\setuphead[section][sectionsegments=section]
\setuphead[subsection][sectionsegments=section:subsection]
\setuphead[subsubsection][sectionsegments=section:subsubsection]


\starttext
\chapter{Eric}
\section{Foo 1}
\subsection{Bar one}
\subsubsection{Barbar one }
\subsubsection{Barbar two}
\subsection{Bar two}
\subsubsection{Barbar one}
\subsubsection{Barbar two}
\section{Foo 2}
\subsection{Bar one}
\subsubsection{Barbar one}
\subsubsection{Barbar two}
\stoptext


As once you changed one you have to change the lower ones ...




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

[NTG-context] How not to print the chapter number

2015-08-07 Thread Eric Détrez

I wish to print my texte as

I Foo

1 Bar one

1.1 barbar one

1.2 barbar two

2 Bar two

2.1 foofoo one

2.2 foofoo two

I don't want the Roman I printed in the numbering.

With contextmark II I just added
\setupsection[section-3][previousnumber=no]
but it doesn't seem to work in mark IV.

Is there a way to do it ?


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

[NTG-context] Subsection number independant of section

2014-05-02 Thread Fabrice Couvreur
Hi,
I would get a dial like this :

A. Section one
1. Subsection one

With the code below, I get :

A. Section one
A. A. Subsection one

\setupsection
  [section]
  [conversion=Character]


\setuplabeltext
  [section={{},{.}},
   subsection={{},{.}}]


\setupsection
  [subsection]
  [previousnumber=no]

\setupbodyfont[pagella,11pt]

\starttext
\section{Définitions}
\subsection{Approche de la loi binomiale}
\stoptext

Why ?
Regards,
Fabrice
___
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] Roman numbers for chapters in chapter lines but not in section lines

2011-05-23 Thread Wolfgang Schuster

Am 23.05.2011 um 04:33 schrieb Mathieu DUPONT:

 
 Hi,
 
 I am trying to obtain the following result :
 
 CHAPITRE I Title of chapter
 1.1   Title of section
 1.1.1 Title of subsection
 
 In other words, I need my chapter numbers to be in roman number, but not in 
 the numbers of the sections and subsections (1.1.1 and not I.1.1).
 
 Here is the base code :
 
 \setuplist [chapter] [label=yes,style={\blank[0cm]}]
 \setupsection[section-2][conversion=Romannumerals]
 \setuplabeltext[chapter=CHAPITRE~]
 
 \starttext
 
 \placecontent
 
 \chapter{Title of chapter}
 \section{Title of section}
 \subsection{Title of subsection}
 
 \stoptext 
 
 which results in :
 
 CHAPITRE I Title of chapter
 I.1   Title of section
 I.1.1 Title of subsection
 
 Any idea ?
 All help is greatly appreciated.

MkIV:

\setuplabeltext[chapter=CHAPITRE~]
\definestructureconversionset[mathieu][numbers,Romannumerals][numbers]
\setuphead[chapter][sectionconversionset=mathieu]
\setuplist[chapter][label=yes,width=7em]

\starttext

\placecontent

\chapter{Title of chapter}
\section{Title of section}
\subsection{Title of subsection}

\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] Roman numbers for chapters in chapter lines but not in section lines

2011-05-22 Thread Mathieu DUPONT


Hi,
I am trying to obtain the following result :
CHAPITRE I Title of chapter1.1  Title of section1.1.1   Title of subsection
In other words, I need my chapter numbers to be in roman number, but not in the 
numbers of the sections and subsections (1.1.1 and not I.1.1).
Here is the base code :
\setuplist [chapter] 
[label=yes,style={\blank[0cm]}]\setupsection[section-2][conversion=Romannumerals]\setuplabeltext[chapter=CHAPITRE~]
\starttext
\placecontent
\chapter{Title of chapter}\section{Title of section}\subsection{Title of 
subsection}
\stoptext 
which results in :
CHAPITRE I Title of chapterI.1  Title of sectionI.1.1   Title of subsection
Any idea ?All help is greatly appreciated.
Thanks a bunch,

Mathieu

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

2011-04-19 Thread Willi Egger
Herbert,

I tried to find out. I remembered that there was this discussion already 
earlier on this list.

on  2010-08-30 Hans Hagen wrote the following:

...
 while it should keep A.1 instead of 1.1 for the section numbering. 

The new way is: 

\definestructureconversionset[MySet][numbers,Characters][numbers] % [per 
level] [default] 

\setupsection 
[chapter] 
[sectionconversionset=MySet] 

\starttext 

\chapter{first} 
\section{subfirst} 

\stoptext
...

I thought that it must be found along these lines. However I could not get the 
example working properly.

Willi

(This is LuaTeX, Version beta-0.66.0-2011041318 (rev 4144) 
/Users/willi/Documents/TEXdata/TEST/test-sectionnumbeconversion.tex}




test-sectionnumbeconversion.tex
Description: Binary data


On 18 Apr 2011, at 11:05, Herbert Voss wrote:

 no one has an idea?
 
 Am 09.04.2011 20:55, schrieb Herbert Voss:
 With the following code I get
 
 1. Teil foo
 § 1 1 bar
 i baz
 
 but I need
 
 1. Teil foo
 § 1 A. bar
 I. baz
 
 I cannot get the needed information from the wiki and the documentation.
 
 \def\PartNo#1{#1.\,Teil}
 \def\ChapterNo#1{§ \headnumber[part]
 \determineheadnumber[chapter]\currentheadnumber}
 \def\SectionNo#1{\determineheadnumber[section]\romannumeral\currentheadnumber}
 
 \setuphead[part][number=yes,after=\blank,numbercommand=\PartNo,
 style={\tfc\ss\bf},placehead=yes]
 \setuphead[chapter][before=\blank,after=\blank,conversion=Characters,
 numbercommand=\ChapterNo,
 continue=yes,style={\tfb\ss\bf}]
 \setuphead[section][conversion=Romannumerals,
 numbercommand=\SectionNo,style={\tfb\ss\bf}]
 
 \starttext
 
 \part{foo}
 \chapter{bar}
 \section{baz}
 \stoptext
 
 
 Herbert
 ___
 
 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
 ___

___
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 conversion gets lost in MKIV

2010-08-31 Thread Cedric Mauclair
Hi,

Is there a documentation and/or extensive example of the conversionset
feature (and others) somewhere? The comments in the source files (on
the wiki) are kind of scarce and I can't quite figure out how to use
them.

Thanks.

-- Cédric



On Mon, Aug 30, 2010 at 13:23, Hans Hagen pra...@wxs.nl wrote:
 On 30-8-2010 10:34, Mojca Miklavec wrote:

 Dear list,

 Here's a minimal example that work correct in MKII, but wrong in MKIV:

 \setupsection
        [chapter]
        [conversion=Characters]
 \setupsection
        [section]
        [conversion=]

 \starttext
 \chapter{first}
 \section{subfirst}
 \stoptext

 It results in
     A first
     1.1 subfirst
 while it should keep A.1 instead of 1.1 for the section numbering.

 The new way is:

 \definestructureconversionset[MySet][numbers,Characters][numbers] % [per
 level] [default]

 \setupsection
  [chapter]
  [sectionconversionset=MySet]

 \starttext

 \chapter{first}
 \section{subfirst}

 \stoptext

 What you observe is 'conversion' being inherited and makins both the
 conversionsets and conversion work as you want will mess up much code so I
 think that I will remove the 'conversion' key completely in favor of the
 set. Keep in mind that we now keep more status info around and more or less
 local conversion settings (after all then can be changed each moment) is not
 part of that.

 So, a next release will drop 'conversion' ... better not that unpredictable.

 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
 ___

___
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 conversion gets lost in MKIV

2010-08-30 Thread Mojca Miklavec
Dear list,

Here's a minimal example that work correct in MKII, but wrong in MKIV:

\setupsection
[chapter]
[conversion=Characters]
\setupsection
[section]
[conversion=]

\starttext
\chapter{first}
\section{subfirst}
\stoptext

It results in
A first
1.1 subfirst
while it should keep A.1 instead of 1.1 for the section numbering.

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
___


Re: [NTG-context] section conversion gets lost in MKIV

2010-08-30 Thread Hans Hagen

On 30-8-2010 10:34, Mojca Miklavec wrote:

Dear list,

Here's a minimal example that work correct in MKII, but wrong in MKIV:

\setupsection
[chapter]
[conversion=Characters]
\setupsection
[section]
[conversion=]

\starttext
\chapter{first}
\section{subfirst}
\stoptext

It results in
 A first
 1.1 subfirst
while it should keep A.1 instead of 1.1 for the section numbering.


The new way is:

\definestructureconversionset[MySet][numbers,Characters][numbers] % [per 
level] [default]


\setupsection
  [chapter]
  [sectionconversionset=MySet]

\starttext

\chapter{first}
\section{subfirst}

\stoptext

What you observe is 'conversion' being inherited and makins both the 
conversionsets and conversion work as you want will mess up much code so 
I think that I will remove the 'conversion' key completely in favor of 
the set. Keep in mind that we now keep more status info around and more 
or less local conversion settings (after all then can be changed each 
moment) is not part of that.


So, a next release will drop 'conversion' ... better not that 
unpredictable.


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] \numstr errors out in chapter star logic

2010-06-30 Thread Tom



Am 28.06.10 23:33, schrieb Tom:
 The lazy method below yields eleven pages, each of which is headed by n
 Chapter n, where n represents the numerals from 1 to 11. The text version
of
 the chapter numbers do not appear.


\defineconversion[numstring][One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Te
 n,Eleven]

 \setuphead[chapter]
   [conversion=numstring]


How should i know you're using mkii! Replace \setuphead with \setupsection:

\setupsection[chapter][conversion=numstring]

Wolfgang

The following example converts chapter numbers to words for the \chapter
logic but also converts chapter numbers to words in unwanted places such as
in the TOC and section numbers in the text.

\defineconversion[numstring][One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Te
n,Eleven]

\setupsection[chapter]
 [conversion=numstring]  

\starttext

\completecontent
\dorecurse{11}{\chapter{Chapter #1}\par\section{Example section}}

\stoptext

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey



___
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] \numstr errors out in chapter star logic

2010-06-29 Thread Tom
\setupsection[chapter][conversion=numstring]

Wolfgang

This change produces the desired results on the first page of each chapter
but also has some, in my case, undesired side-effects. Chapter numbers in
the table of contents are now spelled out (I prefer numerals in the TOC) and
section numbers in the text begin with the words rather than the numerals
(again, I prefer numerals for section numbers). The documentation probably
explains how to deal with this, but I haven't been able to find it.  All I
want to do is make a cosmetic change to the tops of the chapter start pages.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey







___
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] lost in documentation

2010-01-17 Thread Wolfgang Werners-Lucchini
 Can you make a minimal example or should we waste our time to write
 one for you?
 
 Wolfgang

Sorry, here it is:

\starttext
From texshow-web
{
\setuphead[section-3][bodypartconversion=Characters]
\section{One}
}
but this does not work. I deleted the 's' from Characters
{
\setuphead[section-3][bodypartconversion=Character]
\section{Two}
}
but that is not working too.

At the garden page 'titles' I found
{
\setupsection[section-3][bodypartconversion=Character]
\section{Three}
}
that works, but it does not correspont to the syntaxdescription in
texshow-web, which is

\starttyping
\setupsection[...][...][...,...=...,...]
[...]   name
[...]   name
conversion  numbers characters Characters romannumerals Romannumerals
previousnumber  yes no
\stoptyping

The second parameter should be a 'name' and bodypartconversion is not
a parameter at all.

Looking at the description, my problem should be solved by
{
\setupsection[section-3][][conversion=Characters]
\section{four}
}
and this works. But the version
{
\setupsection[section-3][conversion=Characters]
\section{five}
}
works too. Why? And what is the difference to the first solution?
\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] lost in documentation

2010-01-16 Thread Wolfgang Werners-Lucchini
Hallo,

this are the things which driving me nuts:

Suppose I want to numerate my sections with uppercase characters.
In texshow-web I found

\setuphead[section-3][bodypartconversion=Characters]

but this does not work. I deleted the 's' from Characters

\setuphead[section-3][bodypartconversion=Character]

but that is not working too.

At the garden page 'titles' I found

\setupsection[section-3][bodypartconversion=Character]

that works, but it does not correspont to the syntaxdescription in 
texshow-web, which is

\setupsection[...][...][...,...=...,...]
[...]   name
[...]   name
conversion  numbers characters Characters romannumerals Romannumerals
previousnumber  yes no 

The second parameter should be a 'name' and bodypartconversion is not 
a parameter at all.

Looking at the description, my problem should be solved by

\setupsection[section-3][][conversion=Characters]

and this works. But the version

\setupsection[section-3][conversion=Characters]

works too. Why? And what is the difference to the first solution?

So much open questions. So much lost time.

Wolfgang, a little bit frustrated.

___
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] lost in documentation

2010-01-16 Thread Wolfgang Schuster

Am 16.01.2010 um 15:44 schrieb Wolfgang Werners-Lucchini:

 Hallo,
 
 this are the things which driving me nuts:
 
 Suppose I want to numerate my sections with uppercase characters.
 In texshow-web I found
 
 \setuphead[section-3][bodypartconversion=Characters]
 
 but this does not work. I deleted the 's' from Characters
 
 \setuphead[section-3][bodypartconversion=Character]
 
 but that is not working too.
 
 At the garden page 'titles' I found
 
 \setupsection[section-3][bodypartconversion=Character]
 
 that works, but it does not correspont to the syntaxdescription in 
 texshow-web, which is
 
 \setupsection[...][...][...,...=...,...]
 [...] name
 [...] name
 conversionnumbers characters Characters romannumerals Romannumerals
 previousnumberyes no 
 
 The second parameter should be a 'name' and bodypartconversion is not 
 a parameter at all.
 
 Looking at the description, my problem should be solved by
 
 \setupsection[section-3][][conversion=Characters]
 
 and this works. But the version
 
 \setupsection[section-3][conversion=Characters]
 
 works too. Why? And what is the difference to the first solution?
 
 So much open questions. So much lost time.

Can you make a minimal example or should we waste our time to write one for you?

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] Section labels in appendices (appendixlabel=)

2009-08-26 Thread Wolfgang Schuster


Am 24.08.2009 um 12:29 schrieb Mojca Miklavec:


Hello,

I have some problems interpreting the ConTeXt manual. If I want to
have the appendices labeled as

Appendix A: My first appendix
Appendix B: My second appendix

... what is wrong with the following approach?

\setupsection
[section]
[appendixconversion=Character,
 appendixlabel=appendix]


strc-sec.mkii:

\setuphead
  [\v!section]
  [\v!appendix\c!label=\v!section,
   \v!bodypart\c!label=\v!section]   %   bijlageconversie= 
\Character


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Section labels in appendices (appendixlabel=)

2009-08-26 Thread Wolfgang Schuster


Am 26.08.2009 um 10:33 schrieb Mojca Miklavec:


On Wed, Aug 26, 2009 at 10:08, Wolfgang Schuster wrote:


\setuphead
 [\v!section]
 [\v!appendix\c!label=\v!section,
  \v!bodypart\c!label=\v!section]   %   bijlageconversie= 
\Character


I'm sorry, but I'm blind ... :( :( :(
Doesn't it also say appendixlabel= here? I just don't see it how it's
used. Maybe I should use something else but section?


Enable the label with \setuphead, not \setupsection.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Section labels in appendices (appendixlabel=)

2009-08-26 Thread Mojca Miklavec
On Wed, Aug 26, 2009 at 10:39, Wolfgang Schuster wrote:

 Am 26.08.2009 um 10:33 schrieb Mojca Miklavec:

 On Wed, Aug 26, 2009 at 10:08, Wolfgang Schuster wrote:

 \setuphead
  [\v!section]
  [\v!appendix\c!label=\v!section,
  \v!bodypart\c!label=\v!section]       %   bijlageconversie=\Character

 I'm sorry, but I'm blind ... :( :( :(
 Doesn't it also say appendixlabel= here? I just don't see it how it's
 used. Maybe I should use something else but section?

 Enable the label with \setuphead, not \setupsection.

Arghhh ... Where on earth did I take \setupsection from? (I was
probably reading the manual and saw it used for conversion, but I
never noticed it was \setupsection and not \setuphead that I have been
using for a long time.)

I'm sorry. It sometimes takes someone to look at one's minor mistakes
from a distance (in the meantime I just did an ugly hack to solve the
problem). Thanks a lot and sorry again :(

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Section labels in appendices (appendixlabel=)

2009-08-24 Thread Mojca Miklavec
Hello,

I have some problems interpreting the ConTeXt manual. If I want to
have the appendices labeled as

Appendix A: My first appendix
Appendix B: My second appendix

... what is wrong with the following approach?

\setupsection
[section]
[appendixconversion=Character,
 appendixlabel=appendix]
\setuplabeltext
[sl]
[appendix=Priloga~]
\mainlanguage[sl]

\starttext
\startappendices
\section{My first appendix}
\stopappendices
\stoptext

I know that I can use something like
\setuplabeltext
[sl]
[section=Priloga~]
and will probably do that at the end (by defining my own header type),
I'm just wondering what I'm missing in the approach above.

Also, I suspect that conversion to Character doesn't work in MKIV (but
I don't need it at the moment).

Thanks,
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bugs in beta

2009-05-08 Thread Alan BRASLAU
On Thursday 07 May 2009 23:17:38 Hans Hagen wrote:
 Alan BRASLAU wrote:
  I still get a major sectioning bug using the new beta mkiv
  1. minimals from the garden
  2. beta from http://pragma-ade.nl/context/beta/cont-tmf.zip
 
  Am I alone in seeing this?

 i'm still strugling with defaults (it's not so much a matter of not
 working but more of how to set up the defaults with reasonable
 inheritance) so it will take a while before things stabelize

 i uploaded a beta with a (temp) fix

OK, it sort-of works. I get:

1 first section
1.1 first subsection of first section
1.1.1 subsubsection
1.2 second subsection of first section
2 second section
2.1 first subsection of second section
2.2 second subsection of second section

But now I am being difficult:

\setupsection[section-3][bodypartconversion=Character]
\setupsection[section-4][previousnumber=no,bodypartconversion=number]
\setupsection[section-5][previousnumber=no,bodypartconversion=character]
\starttext
\section{first section}
\subsection{first subsection of first section}
\subsubsection{subsubsection}
\subsection{second subsection of first section}
\section{second section}
\subsection{first subsection of second section}
\subsection{second subsection of second section}
\stoptext

which yields (in mkii):

A first section
1 first subsection of first section
a subsubsection
2 second subsection of first section
B second section
1 first subsection of second section
2 second subsection of second section

but not in mkiv...

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bugs in beta

2009-05-08 Thread Hans Hagen

Alan BRASLAU wrote:

On Thursday 07 May 2009 23:17:38 Hans Hagen wrote:

Alan BRASLAU wrote:

I still get a major sectioning bug using the new beta mkiv
1. minimals from the garden
2. beta from http://pragma-ade.nl/context/beta/cont-tmf.zip

Am I alone in seeing this?

i'm still strugling with defaults (it's not so much a matter of not
working but more of how to set up the defaults with reasonable
inheritance) so it will take a while before things stabelize

i uploaded a beta with a (temp) fix


OK, it sort-of works. I get:

1 first section
1.1 first subsection of first section
1.1.1 subsubsection
1.2 second subsection of first section
2 second section
2.1 first subsection of second section
2.2 second subsection of second section

But now I am being difficult:

\setupsection[section-3][bodypartconversion=Character]
\setupsection[section-4][previousnumber=no,bodypartconversion=number]
\setupsection[section-5][previousnumber=no,bodypartconversion=character]


see top of strc-def.tex ... you need to define sets

no documentation yet

Hans




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Sample farsi file

2009-01-09 Thread Mehdi Omidali
No, Xepersian is a macro package for xelatex. MKIV is also excellent for
typesseting persian.
You can use the following module for persian or arabic

%-persian-env.tex---

%This file is designed by Mehdi Omidali for easy typesetting persian in
Context

%File Versin:2008-7-20



\startenvironment persian-env

\usemodule[lang-pe]

\mainlanguage[pe]

% Font setup

\definefontfeature

[persian]

[mode=node,language=dflt,script=arab,

init=yes,medi=yes,fina=yes,isol=yes,

liga=yes,dlig=yes,rlig=yes,clig=yes,

mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [persian]

\definefontsynonym [Persian-Regular] [name:XB Zar.ttf] [features=persian]

\definefontsynonym [Persian-Bold] [name:XB Zar Bd.ttf] [features=persian]

\definefontsynonym [Persian-Italic] [name:XB Zar It.ttf] [features=persian]

\definefontsynonym [Persian-BoldItalic] [name:XB Zar BdIt.ttf]
[features=persian]

\stoptypescript

\starttypescript [sans] [persian]

\definefontsynonym [Persian-Regular-sans] [name:XM Traffic.ttf]
[features=persian]

\definefontsynonym [Persian-Bold-sans] [name:XM Traffic Bd.ttf]
[features=persian]

\definefontsynonym [Persian-Italic-sans] [name:XM Traffic It.ttf]
[features=persian]

\definefontsynonym [Persian-BoldItalic-sans] [name:XM Traffic BdIt.ttf]
[features=persian]

\stoptypescript

\starttypescript [mono] [persian]

\definefontsynonym [Persian-Regular-mono] [name:XB Roya.ttf]
[features=persian]

\definefontsynonym [Persian-Bold-mono] [name:XB Roya Bd.ttf]
[features=persian]

\definefontsynonym [Persian-Italic-mono] [name:XB Roya It.ttf]
[features=persian]

\definefontsynonym [Persian-BoldItalic-mono] [name:XB Roya BdIt.ttf]
[features=persian]

\stoptypescript



\starttypescript [serif][persian][name]

\usetypescript[serif][persian]

\definefontsynonym [Serif] [Persian-Regular] [features=persian]

\definefontsynonym [SerifBold] [Persian-Bold] [features=persian]

\definefontsynonym [SerifItalic] [Persian-Italic] [features=persian]

\definefontsynonym [SerifBoldItalic] [Persian-BoldItalic] [features=persian]

\stoptypescript

\starttypescript [sans][persian][name]

\usetypescript[sans][persian]

\definefontsynonym [Sans] [Persian-Regular-sans] [features=persian]

\definefontsynonym [SansBold] [Persian-Bold-sans] [features=persian]

\definefontsynonym [SansItalic] [Persian-Italic-sans] [features=persian]

\definefontsynonym [SansBoldItalic] [Persian-BoldItalic-sans]
[features=persian]

\stoptypescript

\starttypescript [mono][persian][name]

\usetypescript[mono][persian]

\definefontsynonym [Mono] [Persian-Regular-mono] [features=persian]

\definefontsynonym [MonoBold] [Persian-Bold-mono] [features=persian]

\definefontsynonym [MonoItalic] [Persian-Italic-mono] [features=persian]

\definefontsynonym [MonoBoldItalic] [Persian-BoldItalic-mono]
[features=persian]

\stoptypescript

\starttypescript [Persian]

\definetypeface[Persian][rm][serif][persian][default]

\definetypeface[Persian][rm][sans][persian][default]

\definetypeface[Persian][rm][mono][persian][default]

\stoptypescript

\def\PersianGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}

\def\PersianParDir {\textdir TRT\pardir TRT}

\def\PersianTextDir {\textdir TRT}

\def\LatinParDir {\textdir TLT\pardir TLT}

\def\LatinTextDir {\textdir TLT}

\def\LatinGlobalDir {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}

\definestartstop[persiandocument][commands={\usetypescript[Persian]%

\setupbodyfont[Persian,12pt]%

\PersianGlobalDir}]

\definestartstop

[persianpar]

[commands=\Persian\PersianParDir]

\define[1]\RT

{{\Persian\PersianTextDir#1}}

\define\setlatin

{\LatinGlobalDir%

\usetypescript[lm]%

\setupbodyfont[lm,18pt]}

\definestartstop

[latinpar]

[commands=\Persian\LatinParDir]

\define[1]\LT

{{\LatinTextDir#1}}



% \setuphead

% [chapter]

% [ page=yes,

% before=\hairline\blank,

% after=\nowhitespace\hairline,

% header=nomarking,

% textstyle=bold,

% numberstyle=bold,

% ]

\setupheads[separator=\LT{--}]

\setupheadertexts[]%We put here because we want to define headertexts next.

\setupheadertexts[][pagenumber]

 \setupsection [chapter][conversion=persiannumerals]

 \setupsection [section][conversion=persiannumerals]

 \setupsection [subsection][conversion=persiannumerals]

 \setupsection [subsubsection][conversion=persiannumerals]

 \setupfootnotes[conversion=persiannumerals]

 \setupnumbering[conversion=persiannumerals]

 \setupformulas[conversion=persiannumerals]

 \setuppagenumbering[conversion=persiannumerals]

 \setupcaptions[conversion=persiannumerals]

\setupdirections[bidi=global]

\stopenvironment

-end

A sample is this
sample.tex%%%

\starttext
\startpersiandocument
من بی می ناب زیستن نتوانم

بی باده کشید بار تن نتوانم

\placeformula[Eq:eq1]$$x^2+2x$$

\stoppersiandocument

\stoptext



On 1/9/09, Hans Hagen pra...@wxs.nl wrote:

 Ilda Khaki wrote:

 Is it possible

Re: [NTG-context] Sample farsi file

2009-01-09 Thread Mehdi Omidali
I resend the file


%-persian-env.tex---
%This file is designed by Mehdi Omidali for easy typesetting persian in Context
%File Versin:2008-7-20


\startenvironment persian-env
\usemodule[lang-pe]
\mainlanguage[pe]

% Font setup

\definefontfeature
[persian]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [persian]
\definefontsynonym [Persian-Regular]  [name:XB Zar.ttf]  [features=persian]
\definefontsynonym [Persian-Bold]  [name:XB Zar Bd.ttf]  [features=persian]
\definefontsynonym [Persian-Italic]  [name:XB Zar It.ttf]  [features=persian]
\definefontsynonym [Persian-BoldItalic] [name:XB Zar BdIt.ttf]
[features=persian]
\stoptypescript

\starttypescript [sans] [persian]
\definefontsynonym [Persian-Regular-sans]  [name:XM Traffic.ttf]
[features=persian]
\definefontsynonym [Persian-Bold-sans]   [name:XM Traffic Bd.ttf]
[features=persian]
\definefontsynonym [Persian-Italic-sans]   [name:XM Traffic It.ttf]
[features=persian]
\definefontsynonym [Persian-BoldItalic-sans]  [name:XM Traffic
BdIt.ttf] [features=persian]
\stoptypescript

\starttypescript [mono] [persian]
\definefontsynonym [Persian-Regular-mono]  [name:XB Roya.ttf]
[features=persian]
\definefontsynonym [Persian-Bold-mono]   [name:XB Roya Bd.ttf]
[features=persian]
\definefontsynonym [Persian-Italic-mono]   [name:XB Roya It.ttf]
[features=persian]
\definefontsynonym [Persian-BoldItalic-mono]  [name:XB Roya BdIt.ttf]
[features=persian]
\stoptypescript


\starttypescript [serif][persian][name]
\usetypescript[serif][persian]
\definefontsynonym [Serif]   [Persian-Regular] [features=persian]
\definefontsynonym [SerifBold]  [Persian-Bold]  [features=persian]
\definefontsynonym [SerifItalic]  [Persian-Italic]  [features=persian]
\definefontsynonym [SerifBoldItalic]  [Persian-BoldItalic] [features=persian]
\stoptypescript

\starttypescript [sans][persian][name]
\usetypescript[sans][persian]
\definefontsynonym [Sans]   [Persian-Regular-sans] [features=persian]
\definefontsynonym [SansBold]  [Persian-Bold-sans]  [features=persian]
\definefontsynonym [SansItalic]  [Persian-Italic-sans]  [features=persian]
\definefontsynonym [SansBoldItalic]  [Persian-BoldItalic-sans]
[features=persian]
\stoptypescript

\starttypescript [mono][persian][name]
\usetypescript[mono][persian]
\definefontsynonym [Mono]   [Persian-Regular-mono] [features=persian]
\definefontsynonym [MonoBold]  [Persian-Bold-mono]  [features=persian]
\definefontsynonym [MonoItalic]  [Persian-Italic-mono]  [features=persian]
\definefontsynonym [MonoBoldItalic]  [Persian-BoldItalic-mono]
[features=persian]
\stoptypescript

\starttypescript [Persian]
\definetypeface[Persian][rm][serif][persian][default]
\definetypeface[Persian][rm][sans][persian][default]
\definetypeface[Persian][rm][mono][persian][default]

\stoptypescript
\def\PersianGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\PersianParDir {\textdir TRT\pardir TRT}
\def\PersianTextDir {\textdir TRT}
\def\LatinParDir {\textdir TLT\pardir TLT}
\def\LatinTextDir {\textdir TLT}
\def\LatinGlobalDir {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}

\definestartstop[persiandocument][commands={\usetypescript[Persian]%
\setupbodyfont[Persian,12pt]%
\PersianGlobalDir}]

\definestartstop
[persianpar]
[commands=\Persian\PersianParDir]

\define[1]\RT
{{\Persian\PersianTextDir#1}}

\define\setlatin
{\LatinGlobalDir%
\usetypescript[lm]%
\setupbodyfont[lm,18pt]}

\definestartstop
[latinpar]
[commands=\Persian\LatinParDir]

\define[1]\LT
{{\LatinTextDir#1}}


% \setuphead
% [chapter]
% [page=yes,
% before=\hairline\blank,
% after=\nowhitespace\hairline,
% header=nomarking,
% textstyle=bold,
% numberstyle=bold,
% ]
\setupheads[separator=\LT{--}]
\setupheadertexts[]%We put here because we want to define headertexts next.
%\setupheadertexts[][pagenumber]
\setupsection [chapter][conversion=persiannumerals]
\setupsection [section][conversion=persiannumerals]
\setupsection [subsection][conversion=persiannumerals]
\setupsection [subsubsection][conversion=persiannumerals]
\setupfootnotes[conversion=persiannumerals]
\setupnumbering[conversion=persiannumerals]
\setupformulas[conversion=persiannumerals]
\setuppagenumbering[conversion=persiannumerals]
\setupcaptions[conversion=persiannumerals]
\setupwhitespace[none]
\setupdirections[bidi=global]
\stopenvironment
-end
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki

Re: [NTG-context] Sample farsi file

2009-01-09 Thread Mehdi Omidali
Sorry, something is wrong with my email setting.
%-persian-env.tex---
%This file is designed by Mehdi Omidali for easy typesetting persian in
Context
%File Versin:2008-7-20


\startenvironment persian-env
\usemodule[lang-pe]
\mainlanguage[pe]

% Font setup

\definefontfeature
[persian]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [persian]
\definefontsynonym [Persian-Regular]  [name:XB Zar.ttf]  [features=persian]
\definefontsynonym [Persian-Bold]  [name:XB Zar Bd.ttf]  [features=persian]
\definefontsynonym [Persian-Italic]  [name:XB Zar
It.ttf]  [features=persian]
\definefontsynonym [Persian-BoldItalic] [name:XB Zar
BdIt.ttf] [features=persian]
\stoptypescript

\starttypescript [sans] [persian]
\definefontsynonym [Persian-Regular-sans]  [name:XM
Traffic.ttf]  [features=persian]
\definefontsynonym [Persian-Bold-sans]   [name:XM Traffic
Bd.ttf] [features=persian]
\definefontsynonym [Persian-Italic-sans]   [name:XM Traffic
It.ttf] [features=persian]
\definefontsynonym [Persian-BoldItalic-sans]  [name:XM Traffic
BdIt.ttf] [features=persian]
\stoptypescript

\starttypescript [mono] [persian]
\definefontsynonym [Persian-Regular-mono]  [name:XB
Roya.ttf]  [features=persian]
\definefontsynonym [Persian-Bold-mono]   [name:XB Roya
Bd.ttf] [features=persian]
\definefontsynonym [Persian-Italic-mono]   [name:XB Roya
It.ttf]  [features=persian]
\definefontsynonym [Persian-BoldItalic-mono]  [name:XB Roya
BdIt.ttf] [features=persian]
\stoptypescript


\starttypescript [serif][persian][name]
\usetypescript[serif][persian]
\definefontsynonym [Serif]   [Persian-Regular] [features=persian]
\definefontsynonym [SerifBold]  [Persian-Bold]  [features=persian]
\definefontsynonym [SerifItalic]  [Persian-Italic]  [features=persian]
\definefontsynonym [SerifBoldItalic]
 [Persian-BoldItalic] [features=persian]
\stoptypescript

\starttypescript [sans][persian][name]
\usetypescript[sans][persian]
\definefontsynonym [Sans]   [Persian-Regular-sans] [features=persian]
\definefontsynonym [SansBold]  [Persian-Bold-sans]  [features=persian]
\definefontsynonym [SansItalic]  [Persian-Italic-sans]  [features=persian]
\definefontsynonym [SansBoldItalic]
 [Persian-BoldItalic-sans] [features=persian]
\stoptypescript

\starttypescript [mono][persian][name]
\usetypescript[mono][persian]
\definefontsynonym [Mono]   [Persian-Regular-mono] [features=persian]
\definefontsynonym [MonoBold]  [Persian-Bold-mono]  [features=persian]
\definefontsynonym [MonoItalic]  [Persian-Italic-mono]  [features=persian]
\definefontsynonym [MonoBoldItalic]
 [Persian-BoldItalic-mono] [features=persian]
\stoptypescript

\starttypescript [Persian]
\definetypeface[Persian][rm][serif][persian][default]
\definetypeface[Persian][rm][sans][persian][default]
\definetypeface[Persian][rm][mono][persian][default]

\stoptypescript
\def\PersianGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\PersianParDir {\textdir TRT\pardir TRT}
\def\PersianTextDir {\textdir TRT}
\def\LatinParDir {\textdir TLT\pardir TLT}
\def\LatinTextDir {\textdir TLT}
\def\LatinGlobalDir {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}

\definestartstop[persiandocument][commands={\usetypescript[Persian]%
\setupbodyfont[Persian,12pt]%
\PersianGlobalDir}]

\definestartstop
[persianpar]
[commands=\Persian\PersianParDir]

\define[1]\RT
{{\Persian\PersianTextDir#1}}

\define\setlatin
{\LatinGlobalDir%
\usetypescript[lm]%
\setupbodyfont[lm,18pt]}

\definestartstop
[latinpar]
[commands=\Persian\LatinParDir]

\define[1]\LT
{{\LatinTextDir#1}}


% \setuphead
% [chapter]
% [page=yes,
% before=\hairline\blank,
% after=\nowhitespace\hairline,
% header=nomarking,
% textstyle=bold,
% numberstyle=bold,
% ]
\setupheads[separator=\LT{--}]
\setupheadertexts[]%We put here because we want to define headertexts next.
%\setupheadertexts[][pagenumber]
\setupsection [chapter][conversion=persiannumerals]
\setupsection [section][conversion=persiannumerals]
\setupsection [subsection][conversion=persiannumerals]
\setupsection [subsubsection][conversion=persiannumerals]
\setupfootnotes[conversion=persiannumerals]
\setupnumbering[conversion=persiannumerals]
\setupformulas[conversion=persiannumerals]
\setuppagenumbering[conversion=persiannumerals]
\setupcaptions[conversion=persiannumerals]
\setupwhitespace[none]
\setupdirections[bidi=global]
\stopenvironment
-end
___
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  : https://foundry.supelec.fr

Re: [NTG-context] specific document layout with ConTeXt

2008-12-28 Thread Aditya Mahajan
.
% \def\raggedspaceamount{0.25em}


% Change footnote font size to 8pt.
\setupfootnotes[bodyfont=8pt,width=\textwidth,rule=]
\setupfootnotes[location=lastcolumn]
% }}}

% Section Formatting {{{

\defineblank  [section:before] [1.5ex plus 1.5ex minus 0.5ex]
\defineblank  [section:after]  [0.7ex plus 1ex minus 0ex]

\setupsection [section-3]
  [bodypartconversion=Romannumerals,
  appendixconversion=Characters]

\setupsection [section-4]
  [bodypartconversion=Character,
   previousnumber=no]

\setupsection [section-5]
  [bodypartconversion=numbers,
   previousnumber=no]

\setupsection [section-6]
  [bodypartconversion=character,
   previousnumber=no]

\setuplabeltext [section={{},{.}},
 subsection={{},{.}},
 appendix={{Appendix },{.}}]

\setupsectionblock [appendix]  [page=]

\setupheads[indentnext=yes]

\setuphead[section,subject]
  [  align=middle,
   style=\sectionfont,
   appendixlabel=appendix,
  placehead=yes,
  before={\blank[section:before]},
   after={\blank[section:after]},
  ]

\setuphead[subsection]
  [ align=normal,
style=italic,
   before={\blank[section:before]},
after={\blank[section:after]},
  ]

\setuphead  [subsubject]  [style=italic,alternative=text,distance=1ex]

%  }}}

% Page Layout {{{
\setuppapersize[letter][letter]

\setuplayout[
 width=middle,
height=middle,
  location=middle,
  topspace=.75in,
   bottomspace=0.75in,
  bottomdistance=.25in,
  bottom=.25in,
 backspace=0.75in,
  cutspace=0.75in,
leftmargin=0in,
   rightmargin=0in,
leftmargindistance=0in,
   rightmargindistance=0in,
header=0in,
footer=0in,
 headerdistace=0in,
footerdistance=.15in,
  ]


% No page numbering
\setuppagenumbering[location=]

\setupcolumns[n=2,distance=0.2in,column=lastcolumn]

% }}}

% Variables {{{
\setvariables[article][title=]
\setvariables[article][author=]
\setvariables[article][institute=]
\setvariables[article][email=]

% }}}

% Title {{{
\setuplabeltext[abstract=Abstract,keyword=Keyword]

\startsetups  IEEE:abstract:setup
  \switchtobodyfont[9pt]
\stopsetups

\startsetups IEEE:title:after
\startalignment[middle]
\doifsomething{\getvariable{article}{author}}
 \bgroup
  \blank[big]
  \tfa\setupinterlinespace
  \getvariable{article}{author}
  \endgraf\egroup
 \doifsomething{\getvariable{article}{institute}}
 {
 \let\\\crlf
 \blank[small]
 \tf\setupinterlinespace
 \getvariable{article}{institute}
 }
   \stopalignment
   \blank[1.4em]
\stopsetups

\startsetups IEEE:headerandfooters
  \doifsomething{\getvariable{article}{bottom}}
  {\setupbottomtexts
[\getvariable{article}{bottom}]
  \setupbottomtexts
[][pagenumber]}
\stopsetups

\startsetups IEEE:interaction
  \setupinteraction
   [
   title={\getvariable{article}{title}},
subtitle={\getvariable{article}{conference}},
  author={\getvariable{article}{author}}]
\stopsetups
\setuphead  [title]
[align={middle,broad},
 style=\titlefont,
 before={\blank[force,0.2em]},after=]
\def\article
  {\dosingleargument\doarticle}

\def\doarticle[#1]%
  {\setvariables[article][#1]
   \title{\getvariable{article}{title}}
   \setups[IEEE:title:after]
   \setups[IEEE:headerandfooters]
   \setups[IEEE:interaction]
   \startcolumns
   \appendtoks \stopcolumns \to \everystoptext}

\definestartstop[abstract]
  [before={\bgroup\blank[small]\setups[IEEE:abstract:setup]
  \bold\bgroup{\bolditalic \labeltext{abstract}}---\,},
   after={\egroup\endgraf\egroup\blank[small]}]

% }}}

% Theorems and Proofs {{{

\unprotect
\setvalue{@@descriptionIEEE}[#1]#2%
  {\@@dostartdescription[#1]{\def\\{\crlf}}{#2}%
   \doindenting
   \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox
   \hskip\!!widthb % toegevoegd
   \@@dodescription}

\setvalue{@@descriptionIEEEproof}[#1]#2%
  {\@@dostartdescription[#1]{\def\\{\crlf}}{#2}%
   \noindent\hskip 2em
   \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox
   \hskip\!!widthb % toegevoegd
   \@@dodescription}
\protect

\setupenumerations
  [location=IEEE,
   sectionnumber=no,
   stopper=:\ ,
   headstyle=italic,
   titlestyle=italic,
   titledistance=1ex,
   title=yes,
   style=normal,
   before={\blank[2pt plus 1pt minus 1pt]},
   after={\blank[2pt plus 1pt minus 1pt]}]
   

\defineenumeration [problem][text=Problem]
\defineenumeration [definition] [text=Definition]
\defineenumeration [theorem][text=Theorem]
\defineenumeration [lemma]  [text=Lemma]
\defineenumeration [corollary]  [text=Corollary]
\defineenumeration [example][text=Example

Re: [NTG-context] chapter-like headings with separate numbering

2008-11-26 Thread luigi scarso
On Tue, Nov 25, 2008 at 4:08 AM, Sanjoy Mahajan [EMAIL PROTECTED] wrote:

 I'm experimenting with making a heading that is like a chapter in format
 but has its own numbering (or lettering).  The purpose to have an
 interlude, or extended example, every few chapters.  The following
 almost-minimal example almost does so.  However, the second interlude is
 numbered with 'A' instead of 'B'.  Is there a missing key=value pair, or
 is the approach completely wrong?

It seem that interlude is like a section,
so it's correct that at every chapter there is a reset of the
alphabetical counter



 \definesection[nc]
 \setupsection[nc][conversion=Characters]
 \definehead[interlude][section=nc,default=chapter]
 \setuphead[interlude][incrementnumber=yes]

 \starttext

 \title{Contents}
 \placelist[chapter,interlude]

 \chapter{Chap 1}

 \interlude{Interlude 1}

 \chapter{Chap 2}

 \interlude{Interlude 2}

 \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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___




-- 
luigi
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] chapter-like headings with separate numbering

2008-11-24 Thread Sanjoy Mahajan
I'm experimenting with making a heading that is like a chapter in format
but has its own numbering (or lettering).  The purpose to have an
interlude, or extended example, every few chapters.  The following
almost-minimal example almost does so.  However, the second interlude is
numbered with 'A' instead of 'B'.  Is there a missing key=value pair, or
is the approach completely wrong?

\definesection[nc]
\setupsection[nc][conversion=Characters]
\definehead[interlude][section=nc,default=chapter]
\setuphead[interlude][incrementnumber=yes]

\starttext

\title{Contents}
\placelist[chapter,interlude]

\chapter{Chap 1}

\interlude{Interlude 1}

\chapter{Chap 2}

\interlude{Interlude 2}

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning

2008-11-13 Thread Wolfgang Schuster
On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise
[EMAIL PROTECTED] wrote:
 Wolfgang,  thanks so much for your help so far.

 I was able to take the code and make it work correctly to stretch the chapter
 title.  What I want is two lines for a chapter head.  For example,
 Line 1: Chapter One
 Line 2: Title for Chap 1

 I want line 1 to be stretched.  Everything I have tried does not work.  I can
 get the Chapter word to stretch, but not the whole line (and it should
 probably be treated as a whole line when stretching).  I was never able to get
 the chapter number (now a word) to stretch.

 So how do I grab the output for line 1 and then stretch it?

 Here's a sample of what I have without any stretching:

 \def\Myheader#1#2{%
\framedtext[width=0.60\textwidth, frame=off, align=middle]{%
\vbox{\headtext{chapter}~#1 \blank #2}}}

 \def\englishnumbers#1{
\ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
 \defineconversion[englishnumbers][\englishnumbers]

 \setupsection[chapter][conversion=englishnumbers]
 \setuphead [chapter][
command=\Myheader,
textcommand=\bfd,
 ]
 \setupheadtext[chapter=CHAPTER] % used by \headtext
 \starttext
 \chapter{Title for Chap 1}
 \processfile{tufte}
 \stoptext

\def\Myheader#1#2%
 {\framed
[width=0.60\textwidth,
frame=off,
align=middle]
{\determineheadnumber[chapter]
 
\expanded{\stretchednormalcase{CHAPTER~\convertnumber{englishnumbers}{\currentheadnumber}}}
 \blank#2}}

\def\englishnumbers#1{
  \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}

\defineconversion[englishnumbers][\englishnumbers]

\setuphead
 [chapter]
 [command=\Myheader,
  deeptextcommand=\stretchednormalcase,
  textstyle=\bfd]

 P.S. If there's a better way to do the number-word conversion, let me know.

Search for \numprint in the list archive.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning

2008-11-13 Thread Bart C. Wise
Wolfgang,

Thanks so much for your help!  It works exactly as I desire.

Bart

On Thursday 13 November 2008 01:36:11 am Wolfgang Schuster wrote:
 On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise

 [EMAIL PROTECTED] wrote:
  Wolfgang,  thanks so much for your help so far.
 
  I was able to take the code and make it work correctly to stretch the
  chapter title.  What I want is two lines for a chapter head.  For
  example, Line 1: Chapter One
  Line 2: Title for Chap 1
 
  I want line 1 to be stretched.  Everything I have tried does not work.  I
  can get the Chapter word to stretch, but not the whole line (and it
  should probably be treated as a whole line when stretching).  I was never
  able to get the chapter number (now a word) to stretch.
 
  So how do I grab the output for line 1 and then stretch it?
 
  Here's a sample of what I have without any stretching:
 
  \def\Myheader#1#2{%
 \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
 \vbox{\headtext{chapter}~#1 \blank #2}}}
 
  \def\englishnumbers#1{
 \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
  \defineconversion[englishnumbers][\englishnumbers]
 
  \setupsection[chapter][conversion=englishnumbers]
  \setuphead [chapter][
 command=\Myheader,
 textcommand=\bfd,
  ]
  \setupheadtext[chapter=CHAPTER] % used by \headtext
  \starttext
  \chapter{Title for Chap 1}
  \processfile{tufte}
  \stoptext

 \def\Myheader#1#2%
  {\framed
 [width=0.60\textwidth,
 frame=off,
 align=middle]
 {\determineheadnumber[chapter]
 
 \expanded{\stretchednormalcase{CHAPTER~\convertnumber{englishnumbers}{\curr
entheadnumber}}} \blank#2}}

 \def\englishnumbers#1{
   \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}

 \defineconversion[englishnumbers][\englishnumbers]

 \setuphead
  [chapter]
  [command=\Myheader,
   deeptextcommand=\stretchednormalcase,
   textstyle=\bfd]

  P.S. If there's a better way to do the number-word conversion, let me
  know.

 Search for \numprint in the list archive.

 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning

2008-11-13 Thread Bart C. Wise
On Thursday 13 November 2008 12:46:27 am Hans Hagen wrote:
 Bart C. Wise wrote:
  Wolfgang,  thanks so much for your help so far.
 
  I was able to take the code and make it work correctly to stretch the
  chapter title.  What I want is two lines for a chapter head.  For
  example, Line 1: Chapter One
  Line 2: Title for Chap 1
 
  I want line 1 to be stretched.  Everything I have tried does not work.  I
  can get the Chapter word to stretch, but not the whole line (and it
  should probably be treated as a whole line when stretching).  I was never
  able to get the chapter number (now a word) to stretch.
 
  So how do I grab the output for line 1 and then stretch it?
 
  Here's a sample of what I have without any stretching:
 
  \def\Myheader#1#2{%
  \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
  \vbox{\headtext{chapter}~#1 \blank #2}}}
 
  \def\englishnumbers#1{
  \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
  \defineconversion[englishnumbers][\englishnumbers]
 
  \setupsection[chapter][conversion=englishnumbers]
  \setuphead [chapter][
  command=\Myheader,
  textcommand=\bfd,
  ]
  \setupheadtext[chapter=CHAPTER] % used by \headtext
  \starttext
  \chapter{Title for Chap 1}
  \processfile{tufte}
  \stoptext
 
 
  P.S. If there's a better way to do the number-word conversion, let me
  know.
 
  On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote:
  Am 12.11.2008 um 18:03 schrieb Bart C. Wise:
  Okay, it works until I place an an argument in the stretched command.
 
  def\MyChapterCommand#1#2{
\framed[align=center,frame=off,width=\textwidth]{
\vbox{
  fails--  \stretched{#2}
  works--  \stretched{This is a Test}
}
}
  \setuphead[chapter][
command=\MyChapterCommand
  }
 
 
  I get the following error when I run texexec:
 
  ! Missing \endcsname inserted.
  to be read again
\let
  \nextprocessedtoken ...oup \ifincolor \ifcsname #1
   #3\endcsname \let
  \dostopa...
 
  \dodoprocesstokens ...token \let \before \between
   \fi \let
  \nextprocessedtok...
  argument This is a test: \dostartattributes
   {\??ko \v!title }\c!style
  \c!c...
 
  \processtokens ...fore \before \doprocesstokens #5
   \lastcharacter
  \endgroup
  \stretched ... \relax \hss \relax {\hss \hss }{#1}
   \egroup
  ...
 
  How can I use the #1  #2 arguments in the stretched command?
 
  You could use it only with \deeptextcommand, here is a old mail
  with a example from Hans (you could ignore the other code).
 
  http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.htm
 l

 look for the property mechanism

 \startproperty[stretch]stretched\stopproperty

 token processing is always tricky since the parser does not know what to
 expect; properties use a pdf trick; in mkiv we have more clever stretching



Hans,

I tried the above code and it failed.  I looked around on the ConTeXt site and 
the web in general.  It seems like a \defineproperty[stretch] needs to be 
declared, but I can't find it anywhere.  You'll have to excuse my ignorance, 
but will you be explicit on how to use the \startproperty[stretch] stretch 
\stopproperty.

Bart
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning

2008-11-12 Thread Bart C. Wise
Wolfgang,  thanks so much for your help so far.

I was able to take the code and make it work correctly to stretch the chapter 
title.  What I want is two lines for a chapter head.  For example,
Line 1: Chapter One
Line 2: Title for Chap 1

I want line 1 to be stretched.  Everything I have tried does not work.  I can 
get the Chapter word to stretch, but not the whole line (and it should 
probably be treated as a whole line when stretching).  I was never able to get 
the chapter number (now a word) to stretch.

So how do I grab the output for line 1 and then stretch it?

Here's a sample of what I have without any stretching:

\def\Myheader#1#2{%
\framedtext[width=0.60\textwidth, frame=off, align=middle]{%
\vbox{\headtext{chapter}~#1 \blank #2}}}

\def\englishnumbers#1{
\ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
\defineconversion[englishnumbers][\englishnumbers]

\setupsection[chapter][conversion=englishnumbers]
\setuphead [chapter][
command=\Myheader,
textcommand=\bfd,
]
\setupheadtext[chapter=CHAPTER] % used by \headtext
\starttext
\chapter{Title for Chap 1}
\processfile{tufte}
\stoptext


P.S. If there's a better way to do the number-word conversion, let me know.


On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote:
 Am 12.11.2008 um 18:03 schrieb Bart C. Wise:
  Okay, it works until I place an an argument in the stretched command.
 
  def\MyChapterCommand#1#2{
\framed[align=center,frame=off,width=\textwidth]{
  \vbox{
  fails--\stretched{#2}
  works--\stretched{This is a Test}
  }
  }
  \setuphead[chapter][
command=\MyChapterCommand
  }
 
 
  I get the following error when I run texexec:
 
  ! Missing \endcsname inserted.
  to be read again
\let
  \nextprocessedtoken ...oup \ifincolor \ifcsname #1
   #3\endcsname \let
  \dostopa...
 
  \dodoprocesstokens ...token \let \before \between
   \fi \let
  \nextprocessedtok...
  argument This is a test: \dostartattributes
   {\??ko \v!title }\c!style
  \c!c...
 
  \processtokens ...fore \before \doprocesstokens #5
   \lastcharacter
  \endgroup
  \stretched ... \relax \hss \relax {\hss \hss }{#1}
   \egroup
  ...
 
  How can I use the #1  #2 arguments in the stretched command?

 You could use it only with \deeptextcommand, here is a old mail
 with a example from Hans (you could ignore the other code).

 http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.html

 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning

2008-11-12 Thread Hans Hagen
Bart C. Wise wrote:
 Wolfgang,  thanks so much for your help so far.
 
 I was able to take the code and make it work correctly to stretch the chapter 
 title.  What I want is two lines for a chapter head.  For example,
 Line 1: Chapter One
 Line 2: Title for Chap 1
 
 I want line 1 to be stretched.  Everything I have tried does not work.  I can 
 get the Chapter word to stretch, but not the whole line (and it should 
 probably be treated as a whole line when stretching).  I was never able to 
 get 
 the chapter number (now a word) to stretch.
 
 So how do I grab the output for line 1 and then stretch it?
 
 Here's a sample of what I have without any stretching:
 
 \def\Myheader#1#2{%
 \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
 \vbox{\headtext{chapter}~#1 \blank #2}}}
 
 \def\englishnumbers#1{
 \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
 \defineconversion[englishnumbers][\englishnumbers]
 
 \setupsection[chapter][conversion=englishnumbers]
 \setuphead [chapter][
 command=\Myheader,
 textcommand=\bfd,
 ]
 \setupheadtext[chapter=CHAPTER] % used by \headtext
 \starttext
 \chapter{Title for Chap 1}
 \processfile{tufte}
 \stoptext
 
 
 P.S. If there's a better way to do the number-word conversion, let me know.
 
 
 On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote:
 Am 12.11.2008 um 18:03 schrieb Bart C. Wise:
 Okay, it works until I place an an argument in the stretched command.

 def\MyChapterCommand#1#2{
   \framed[align=center,frame=off,width=\textwidth]{
 \vbox{
 fails--\stretched{#2}
 works--\stretched{This is a Test}
 }
 }
 \setuphead[chapter][
   command=\MyChapterCommand
 }


 I get the following error when I run texexec:

 ! Missing \endcsname inserted.
 to be read again
   \let
 \nextprocessedtoken ...oup \ifincolor \ifcsname #1
  #3\endcsname \let
 \dostopa...

 \dodoprocesstokens ...token \let \before \between
  \fi \let
 \nextprocessedtok...
 argument This is a test: \dostartattributes
  {\??ko \v!title }\c!style
 \c!c...

 \processtokens ...fore \before \doprocesstokens #5
  \lastcharacter
 \endgroup
 \stretched ... \relax \hss \relax {\hss \hss }{#1}
  \egroup
 ...

 How can I use the #1  #2 arguments in the stretched command?
 You could use it only with \deeptextcommand, here is a old mail
 with a example from Hans (you could ignore the other code).

 http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.html

look for the property mechanism

\startproperty[stretch]stretched\stopproperty

token processing is always tricky since the parser does not know what to 
expect; properties use a pdf trick; in mkiv we have more clever stretching


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] vertical position of framed sucks!

2008-08-29 Thread Steffen Wolfrum
Hi,

sorry for my foggy post last night (02:50h ...)

Hopefully this example makes it clearer:
--

\starttext
\showframe

\definehead[EbeneFuenf] [subsubsubsection]
\setupsection[section-6][conversion=characters,previousnumber=yes]
\def\FuenfCommand#1{#1.}

\def\CurrentEbeneFuenfNumber#1#2%
{\hbox to \hsize\bgroup%
\tbox{\midaligned 
\framed[offset=-0.5pt,frame=on,align=middle,width=0.85\textwidth] 
{{\FuenfCommand{\convertnumber{characters} 
{\countervalue{@@sesection-6{\kern0.75em}#2}}%
\egroup}

\setuphead[EbeneFuenf][command=\CurrentEbeneFuenfNumber]% using this  
command moves the line 2mm down?!

\EbeneFuenf{Test}

\stoptext

--
I wanted to define a command with a fixed width in order to determine  
a maximum width for a section.
But using this command (i.e. the framed) also moves the section down  
about 2mm!

How can this be avoided?

Steffen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] vertical position of framed sucks!

2008-08-29 Thread Peter Rolf
Steffen Wolfrum schrieb:
 Hi,
 
 sorry for my foggy post last night (02:50h ...)
 
 Hopefully this example makes it clearer:
 -- 
 
 \starttext
 \showframe
 
 \definehead[EbeneFuenf][subsubsubsection]
 \setupsection[section-6][conversion=characters,previousnumber=yes]
 \def\FuenfCommand#1{#1.}
 
 \def\CurrentEbeneFuenfNumber#1#2%
 {\hbox to \hsize\bgroup%
 \tbox{\midaligned\framed[offset=-0.5pt,frame=on,align=middle,width=0.85\textwidth]{{\FuenfCommand{\convertnumber{characters}{\countervalue{@@sesection-6{\kern0.75em}#2}}%
 
 \egroup}
 
 \setuphead[EbeneFuenf][command=\CurrentEbeneFuenfNumber]% using this
 command moves the line 2mm down?!


% insert here
\showboxes % see differences between \tbox and \hbox

 \EbeneFuenf{Test}
 
 \stoptext
 
 -- 
 I wanted to define a command with a fixed width in order to determine a
 maximum width for a section.
 But using this command (i.e. the framed) also moves the section down
 about 2mm!
 
 How can this be avoided?


have you tried my solution?

same answer :)

the \tbox does exactly what it should do (see p.85, context manual).
use a \hbox instead and the text is (nearly, exactly?) on the same
vertical position as plain text. but this highly depends on the offset
of \framed.

btw: you need the outer \hbox for the right total width and the inner
\framed for the frame and alignment. why the \tbox or any additional box?

best wishes, peter

 Steffen
 

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] vertical position of framed sucks!

2008-08-29 Thread Steffen Wolfrum

Am 29.08.2008 um 11:18 schrieb Peter Rolf:

 Steffen Wolfrum schrieb:
 Hi,

 sorry for my foggy post last night (02:50h ...)

 Hopefully this example makes it clearer:
 --  

 \starttext
 \showframe

 \definehead[EbeneFuenf][subsubsubsection]
 \setupsection[section-6][conversion=characters,previousnumber=yes]
 \def\FuenfCommand#1{#1.}

 \def\CurrentEbeneFuenfNumber#1#2%
 {\hbox to \hsize\bgroup%
 \tbox{\midaligned 
 \framed[offset=-0.5pt,frame=on,align=middle,width=0.85\textwidth] 
 {{\FuenfCommand{\convertnumber{characters} 
 {\countervalue{@@sesection-6{\kern0.75em}#2}}%

 \egroup}

 \setuphead[EbeneFuenf][command=\CurrentEbeneFuenfNumber]% using this
 command moves the line 2mm down?!


 % insert here
 \showboxes % see differences between \tbox and \hbox

 \EbeneFuenf{Test}

 \stoptext

 -- 
 I wanted to define a command with a fixed width in order to  
 determine a
 maximum width for a section.
 But using this command (i.e. the framed) also moves the section  
 down
 about 2mm!

 How can this be avoided?


 have you tried my solution?


yes, thank you, it just didn't work as expected: there still was a  
small vertical skip.

this (provided by Wolfgang) is what i wanted to achieve:

\def\CurrentEbeneFuenfNumber#1#2%
  {\midaligned{\inframed[width=.85\textwidth,align=middle] 
{#1\kern0.75em#2}}}

thanks again for your efforts,

steffen



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Passing unicode characters

2008-07-22 Thread Mehdi Omidali
Dear Idris,
سلام
I tested your file. What I mean is more than that. In your file if I
write 1 then it is printed as one. But I mean something like
conversion command. For example look at the output of your file. The
page number is 1. But what I mean is that engine prints every 1 as one
for example. Let me explain in a different way. I declare
\setupsection [chapter][conversion=persiannumerals]
and the engine puts persiandecimalseparator character E8C8 between
chapter numbers and section numbers. I am not satisfied with this
character and like the separator character to be a period 002E. In
XeTeX one of the font features is to assign the value of E8C8 to
002E. Then the engine automatically prints 002E whenever it has to
print E8C8 (except in math mode for which there is a \XeTeXmathcode
command).
Best wishes
On 7/22/08, Idris Samawi Hamid ادريس سماوي حامد [EMAIL PROTECTED] wrote:
 Dear Mehdi,
 سلام

 On Tue, 22 Jul 2008 08:48:46 -0600, Mehdi Omidali [EMAIL PROTECTED]
 wrote:

 Hi everyone,
 Is it possible to pass a character to another in MKIV, I mean, like
 XeTeX in which one can pass one unicode character to another one (this
 is done in some mapping files with some lines in it of the form
 U+0030  U+06F0 )

 I'm not quite sure I understand you, but there is a mechanism so that you
 can write your own feature file with your own gsubs and gposs and then
 pass those along to luatex.

 This was broken in earlier versions of luatex; seems to be working now --
 just checked. See below.

 Best wishes
 Idris

 ===verbose.fea==
 lookup NumericLookupDFLT {
  lookupflag 0 ;
  sub zero  by z e r o ;
  sub one   by o n e ;
  sub two   by t w o ;
  sub three by t h r e e ;
  sub four  by f o u r ;
  sub five  by f i v e ;
  sub six   by s i x ;
  sub seven by s e v e n ;
  sub eight by e i g h t ;
  sub nine  by n i n e ;
 } NumericLookupDFLT ;

 feature verb {

  script DFLT ;
  language dflt ;
  lookup NumericLookupDFLT ;

  script latn;
  language dflt ;
  lookup NumericLookupDFLT ;
  language AZE exclude_dflt ;
  lookup NumericLookupDFLT ;
  language CRT exclude_dflt ;
  lookup NumericLookupDFLT ;
  language MOL exclude_dflt ;
  lookup NumericLookupDFLT ;
  language ROM exclude_dflt ;
  lookup NumericLookupDFLT ;
  language TRK exclude_dflt ;
  lookup NumericLookupDFLT ;

 } verb ;
 

 =verb.tex===
 % engine=luatex

 % \setupoutput[pdftex]

 \starttext

 \installfontfeature[otf][verb]

 \definefontfeature
 [test][mode=node,language=dflt,script=latn,verb=yes,featurefile=verbose.fea]

 \font\test=lmroman10-regular*test at 20pt

 \test 1 2 3 4

 \stoptext
 
 --
 Professor Idris Samawi Hamid, Editor-in-Chief
 International Journal of Shi`i Studies
 Department 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Passing unicode characters

2008-07-22 Thread Idris Samawi Hamid
On Tue, 22 Jul 2008 12:14:30 -0600, Mehdi Omidali [EMAIL PROTECTED]  
wrote:

 Dear Idris,
 سلام
 I tested your file. What I mean is more than that. In your file if I
 write 1 then it is printed as one. But I mean something like
 conversion command. For example look at the output of your file. The
 page number is 1. But what I mean is that engine prints every 1 as one
 for example. Let me explain in a different way. I declare
 \setupsection [chapter][conversion=persiannumerals]
 and the engine puts persiandecimalseparator character E8C8 between
 chapter numbers and section numbers. I am not satisfied with this
 character and like the separator character to be a period 002E. In
 XeTeX one of the font features is to assign the value of E8C8 to
 002E. Then the engine automatically prints 002E whenever it has to
 print E8C8 (except in math mode for which there is a \XeTeXmathcode
 command).

سلام Mehdi,

Well, the easy way is to make E8C8 active then \define E8C8 to be the  
character 002E. It sounds like XeTeX has a dedicated mechanism. But since  
I don't use XeTeX maybe Mojca or one of the other XeTeX experts can look  
at this.

You may not even need active char's: There should be a way to control the  
separator char in \setupsection. I'm at work right now but maybe I can  
look at this later.

Can you send a sample file?

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Passing unicode characters

2008-07-22 Thread Mehdi Omidali
Dear Idris,
سلام
you are right. I found that \setupheads[separator=something] works,
but I found a mysterious bug. Whatever one declares as a separator,
when you make a reference to the chapter, section, etc, lua writes the
number with periods.compile the attached file and look at the
reference.
Best regards,
ps: I sent a test file, but it needs a moderator confirmation. I will
send it to your email.
%%
% engine=luatex
\setupheads[separator=--]
\starttext
\font\test=lmroman10-regular*test at 20pt
\chapter{First}
\section[one]{one}
No matter what you have declared as section separator, here I am \in[one].
\stoptext
%%

On 7/22/08, Idris Samawi Hamid [EMAIL PROTECTED] wrote:
 On Tue, 22 Jul 2008 12:14:30 -0600, Mehdi Omidali [EMAIL PROTECTED]
 wrote:

 Dear Idris,
 سلام
 I tested your file. What I mean is more than that. In your file if I
 write 1 then it is printed as one. But I mean something like
 conversion command. For example look at the output of your file. The
 page number is 1. But what I mean is that engine prints every 1 as one
 for example. Let me explain in a different way. I declare
 \setupsection [chapter][conversion=persiannumerals]
 and the engine puts persiandecimalseparator character E8C8 between
 chapter numbers and section numbers. I am not satisfied with this
 character and like the separator character to be a period 002E. In
 XeTeX one of the font features is to assign the value of E8C8 to
 002E. Then the engine automatically prints 002E whenever it has to
 print E8C8 (except in math mode for which there is a \XeTeXmathcode
 command).

 سلام Mehdi,

 Well, the easy way is to make E8C8 active then \define E8C8 to be the
 character 002E. It sounds like XeTeX has a dedicated mechanism. But since
 I don't use XeTeX maybe Mojca or one of the other XeTeX experts can look
 at this.

 You may not even need active char's: There should be a way to control the
 separator char in \setupsection. I'm at work right now but maybe I can
 look at this later.

 Can you send a sample file?

 Best wishes
 Idris

 --
 Professor Idris Samawi Hamid, Editor-in-Chief
 International Journal of Shi`i Studies
 Department 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Passing unicode characters

2008-07-22 Thread Mehdi Omidali
Hi,
Please look at the attached file. Why numbering starts from zero?

%
%-lang-far.tex

\writestatus{loading}{Farsi Languages}
\unprotect
\setupheadtext [content=فهرست مطالب]
\setupheadtext [tables=ليست جداول]
\setupheadtext [figures=ليست تصاوير]
\setupheadtext [graphics=ليست اشکال]
\setupheadtext [index=نمايه]
\setupheadtext [abbreviations=اختصارات]
\setupheadtext [units=واحدها]
\setuplabeltext [table=جدول ]
\setuplabeltext [figure=شكل ]
\setuplabeltext [graphic=طرح ]
%D We don't set these here. One can do that in a style.
\setuplabeltext [chapter=فصل ] % Chapter
\setuplabeltext [section=بخش ]
\setuplabeltext [subsection=زيربخش ]
\setuplabeltext [subsubsection=زيرزيربخش ]
\setuplabeltext [subsubsubsection=زيرزيرزيربخش ]
\setuplabeltext [appendix=پيوست ] % Appendix
\setuplabeltext [part=قسمت ]
\setuplabeltext [line=خط ]
\setuplabeltext [lines=خطهاي ]
\setuplabeltext [january=ژانويه]
\setuplabeltext [february=فوريه]
\setuplabeltext  [march=مارس]
\setuplabeltext  [april=آوريل]
\setuplabeltext  [may=مي]
\setuplabeltext  [june=ژوئن]
\setuplabeltext  [july=ژوييه]
\setuplabeltext  [august=آگوست]
\setuplabeltext  [september=سپتامبر]
\setuplabeltext  [october=اکتبر]
\setuplabeltext  [november=نوامبر]
\setuplabeltext  [december=دسامبر]

\setuplabeltext  [sunday=يک‌شنبه]
\setuplabeltext  [monday=دوشنبه]
\setuplabeltext  [tuesday=سه‌شنبه]
\setuplabeltext  [wednesday=چهارشنبه]
\setuplabeltext  [thursday=پنج‌شنبه]
\setuplabeltext  [friday=جمعه]
\setuplabeltext  [saturday=شنبه]
%D Rather new ...
\setuplabeltext  [page=صفحه]
\setuplabeltext  [atpage=در صفحهٔ ]
%\setuplabeltext  [hencefore=كما وضحنا سابقا]
%\setuplabeltext  [hereafter=كما نوضح لاحقا]
\setuplabeltext  [see=نگاه کنيد به]
%D ... and to be completed!
\protect
\endinput
%-end
%-far-env.tex---
%This file is designed by Mehdi Omidali for easy typesetting farsi in Context
%File Versin:2008-7-20


\startenvironment far-env
\usemodule[lang-far]
\mainlanguage[arabic]

% Font setup

\definefontfeature
   [arabic]
   [mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=yes,dlig=yes,rlig=yes,clig=yes,
mark=yes,mkmk=yes,kern=yes,curs=yes,futerfile=verbose.fea]

\starttypescript [serif] [arabic]
\definefontsynonym [Farsi-Light][name:ScheherazadeRegOT.ttf]
[features=arabic]
\definefontsynonym [Farsi-Bold] [name:ScheherazadeRegOT.ttf]
[features=arabic]
\definefontsynonym [Farsi-Italic]   [name:ScheherazadeRegOT.ttf]
[features=arabic]
\definefontsynonym [Farsi-Bold-Italic]  [name:ScheherazadeRegOT.ttf]
[features=arabic]
\stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif] [Farsi-Light]   
[features=arabic]
 \definefontsynonym [SerifItalic]   [Farsi-Italic]  
[features=arabic]
 \definefontsynonym [SerifBold] [Farsi-Bold]
[features=arabic]
 \definefontsynonym [SerifBoldItalic]   [Farsi-Bold-Italic] 
[features=arabic]
\stoptypescript

\starttypescript [Farsi]
  \definetypeface [Farsi] [rm] [serif] [arabic] [default]
\stoptypescript

\def\FarsiGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
\def\FarsiParDir{\textdir TRT\pardir TRT}
\def\FarsiTextDir   {\textdir TRT}
\def\LatinParDir {\textdir TLT\pardir TLT}
\def\LatinTextDir{\textdir TLT}
\def\LatinGlobalDir  {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT}

\define\setfarsi
  {\FarsiGlobalDir%
   \usetypescript[Farsi]%
   \setupbodyfont[Farsi,18pt]}

\definestartstop
  [farsipar]
  [commands=\Farsi\FarsiParDir]

\define[1]\RT
  {{\Farsi\FarsiTextDir#1}}

\define\setlatin
  {\LatinGlobalDir%
   \usetypescript[lm]%
   \setupbodyfont[lm,18pt]}

\definestartstop
  [latinpar]
  [commands=\Farsi\LatinParDir]

\define[1]\LT
  {{\LatinTextDir#1}}


\setuphead
[chapter]
[   page=yes,
before=\hairline\blank,
after=\nowhitespace\hairline,
header=nomarking,
textstyle=bold,
numberstyle=bold,
]
\setupheads[separator=\LT{--}]
\setuppagenumbering[conversion=persiannumerals]
\setupheadertexts[]%We put here because we want to define headertexts next.
%\setupheadertexts[][pagenumber]
\setupsection [chapter]
[conversion=persiannumerals]
\setupsection [section]
[conversion=persiannumerals]
\setupsection [subsection]
[conversion=persiannumerals]
\setupsection [subsubsection]
[conversion=persiannumerals]
\setupfootnotes
[conversion=persiannumerals]



\stopenvironment
-end
% engine=luatex
\setupinteraction
[state=start,
title

Re: [NTG-context] \startfrontmatter Co.

2008-07-18 Thread John Devereux
Alan Stone [EMAIL PROTECTED] writes:

 On page 17, the ConTeXt manual mentions the commands

 \startfrontmatter - \stopfrontmatter
 \startbodymatter - \stopbodymatter
 \startbackmatter - \stopbackmatter

 What's the precise use and benefit of these commands, other
 a cleaner project structure ?

I used them because it lets me use \setupsection and
\setupsectionblock to customise the appearance of each part, in the
setup area (rather than in the document).

http://texshow.contextgarden.net/command/detail/298

http://texshow.contextgarden.net/command/detail/296


-- 

John Devereux
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] urgent reference problem (full path)

2008-04-24 Thread Steffen Wolfrum
Hi,

my current project is set up like shown below.

A serious problem is the section-reference: while section numbering  
should be in general (text and TOC) without previous number, it must  
show the full path when referenced (otherwise nobody will find 2).

Is there help?


Thank you very much,

Steffen


\definehead[EbeneEins]  [chapter]

\setupsection[section-3][conversion=Characters,previousnumber=no]
\setupsection[section-4][conversion=Romannumerals,previousnumber=no]
\setupsection[section-5][conversion=numbers,previousnumber=no]
%
%\setupsection[section-3][conversion=Characters,previousnumber=yes]
%\setupsection[section-4][conversion=Romannumerals,previousnumber=yes]
%\setupsection[section-5][conversion=numbers,previousnumber=yes]

%\def\NummerGewStyle{\switchtobodyfont[rm,10pt] 
\setupinterlinespace[line=12pt]\mr}
\def\KapitelZweiCommand#1#2%
  {\vbox \bgroup
 \framed[align=middle,frame=off,offset=0pt,width=\textwidth] 
{Abschnitt  #1\blank [6pt]}%
 \framed[align=middle,frame=off,offset=0pt,width=\textwidth]{#2}%
   \egroup}
\setuphead[EbeneEins]
[header=empty,page=yes,command= 
\KapitelZweiCommand 
,style 
=,alternative=paragraph,before={\blank[24pt]},after={\blank[14pt]}]

\starttext
\EbeneEins{Eins}
\subsection{Zuerst}
\subsubsection{Test}
\subsubsection[MyRef]{Here reference test}
\subsubsection{Test}
\subsection{Danach}
\subsubsection{Test}
\subsubsection{Test}
\section{Zwei}
\subsection{Und dann}
\subsubsection{Test}
In \in[MyRef] % should be: Abschnitt 1 I.2
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] urgent reference problem (full path)

2008-04-24 Thread Steffen Wolfrum

I don't know how the section number (with/without previous number) is  
build internally, but I hope there could be a hack, with ...

setupsection[...][previousnumber=yes]% so that referencing gets the  
full path

... but a section-design like previousnumber=no, made with ...

\setuphead[...][command=\PreviousNumberNo]


Could this be done?


Steffen



Am 24.04.2008 um 10:51 schrieb Steffen Wolfrum:

 Hi,

 my current project is set up like shown below.

 A serious problem is the section-reference: while section numbering
 should be in general (text and TOC) without previous number, it must
 show the full path when referenced (otherwise nobody will find 2).

 Is there help?


 Thank you very much,

 Steffen


 \definehead[EbeneEins][chapter]

 \setupsection[section-3][conversion=Characters,previousnumber=no]
 \setupsection[section-4][conversion=Romannumerals,previousnumber=no]
 \setupsection[section-5][conversion=numbers,previousnumber=no]
 %
 %\setupsection[section-3][conversion=Characters,previousnumber=yes]
 %\setupsection[section-4][conversion=Romannumerals,previousnumber=yes]
 %\setupsection[section-5][conversion=numbers,previousnumber=yes]  

 %\def\NummerGewStyle{\switchtobodyfont[rm,10pt]
 \setupinterlinespace[line=12pt]\mr}
 \def\KapitelZweiCommand#1#2%
  {\vbox \bgroup
 \framed[align=middle,frame=off,offset=0pt,width=\textwidth]
 {Abschnitt  #1\blank [6pt]}%
 \framed[align=middle,frame=off,offset=0pt,width=\textwidth]{#2}%
   \egroup}
 \setuphead[EbeneEins]
 [header=empty,page=yes,command=
 \KapitelZweiCommand
 ,style
 =,alternative=paragraph,before={\blank[24pt]},after={\blank[14pt]}]

 \starttext
 \EbeneEins{Eins}
 \subsection{Zuerst}
 \subsubsection{Test}
 \subsubsection[MyRef]{Here reference test}
 \subsubsection{Test}
 \subsection{Danach}
 \subsubsection{Test}
 \subsubsection{Test}
 \section{Zwei}
 \subsection{Und dann}
 \subsubsection{Test}
 In \in[MyRef] % should be: Abschnitt 1 I.2
 \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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] urgent reference problem (full path)

2008-04-24 Thread Wolfgang Schuster
On Thu, Apr 24, 2008 at 2:55 PM, Steffen Wolfrum [EMAIL PROTECTED] wrote:

 I don't know how the section number (with/without previous number) is build
 internally, but I hope there could be a hack, with ...

 setupsection[...][previousnumber=yes]% so that referencing gets the full
 path

 ... but a section-design like previousnumber=no, made with ...

 \setuphead[...][command=\PreviousNumberNo]


 Could this be done?

I hope we get a better interface in the future.

\def\CurrentChapterNumber#1#2%
  {\countervalue{@@sesection-2}:#2}

\def\CurrentSectionNumber#1#2%
  {\countervalue{@@sesection-3}:#2}

\setuphead[chapter][command=\CurrentChapterNumber]
\setuphead[section][command=\CurrentSectionNumber]

\starttext
\chapter{text}
\section[label]{text}
\section{text}
\section{text}
\chapter{text}
\in{Section}[label]
\section{text}
\section{text}
\section{text}
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] how to NOT reset subsection ONLY ??

2008-04-03 Thread Steffen Wolfrum
Hi,


please have a look a this:


\setupsection[section-2][conversion=numbers]
\setupsection[section-3][conversion=numbers,previousnumber=no]
\setupsection[section-4][conversion=numbers,previousnumber=no]
\setupsection[section-5][conversion=numbers,previousnumber=no]

\setuphead[section][resetnumber=no]


\starttext

\chapter{aa}
\section{bbb}
\subsection{ccc}
\section{bbb}
\subsection{ccc}
\subsubsection{sss}

\chapter{aa}
\section{bbb}
\subsection{(-should be 3) ccc}
\section{bbb}
\subsection{(-should be 4) ccc}
\subsubsection{ddd}

\stoptext



trying to avoid resetting subsection by \setuphead[section] 
[resetnumber=no] fails:
chapter resets everything! but chapter should only reset section and  
not subsection too!!

any idea how to solve this problem (without fiddling with every  
appearance of subsection individually)??


Thank you,

Steffen
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to NOT reset subsection ONLY ??

2008-04-03 Thread Wolfgang Schuster
On Thu, Apr 3, 2008 at 10:51 AM, Steffen Wolfrum [EMAIL PROTECTED] wrote:
 Hi,


 please have a look a this:


 \setupsection[section-2][conversion=numbers]
 \setupsection[section-3][conversion=numbers,previousnumber=no]
 \setupsection[section-4][conversion=numbers,previousnumber=no]
 \setupsection[section-5][conversion=numbers,previousnumber=no]

 \setuphead[section][resetnumber=no]


 \starttext

 \chapter{aa}
 \section{bbb}
 \subsection{ccc}
 \section{bbb}
 \subsection{ccc}
 \subsubsection{sss}

 \chapter{aa}
 \section{bbb}
 \subsection{(-should be 3) ccc}
 \section{bbb}
 \subsection{(-should be 4) ccc}
 \subsubsection{ddd}

 \stoptext



 trying to avoid resetting subsection by \setuphead[section]
 [resetnumber=no] fails:
 chapter resets everything! but chapter should only reset section and
 not subsection too!!

 any idea how to solve this problem (without fiddling with every
 appearance of subsection individually)??

You could define subsection as a copy from section.

\setupsection[section][conversion=numbers,previousnumber=no]

\definehead[subsection][section]
\setuphead[subsection][style=]

I tried to get this effect also with ConTeXt's subhead and setupsection
commands but failed to get the desired effect. The only way to know
and understand the keys for both commands is to read the source :-(

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Sections, cross-references and separators

2008-04-01 Thread Taco Hoekwater
Duncan Hothersall wrote:
 What I am aiming for is a style where:
 Parts are labelled A, B, C [done],
 Chapters are labelled A1, A2, A3 [done, but...],
 Cross-references to Chapters call them A1, A2, A3 [not done: I'm 
 getting A.1]
 Figures are labelled A1.1, A1.2 [not done; I'm getting A.11 (eek!)]
 Cross-references to Figures call them A1.1, A1.2 [not done: I'm 
 getting A.11]

In this case it is easier to make the actual chapter number include
the 'A'. That way, you won't have to worry about separator at all
(which is good, because its use is confusing).

Try this:

@@ -1,4 +1,4 @@
-\setupheads[separator=] %-- this can't be right
  \setupreferencing[state=start,chapternumber=yes,global=yes]
-\setupsection[section-1][conversion=Characters]
-\setupsection[section-2][previousnumber=yes]
+\def\Mychapter#1{\convertnumber{Characters}{\getvalue{@@sesection-1}}#1}
+\defineconversion[MyChapter][\Mychapter]
+\setupsection[section-2][conversion=MyChapter]


Question for Hans: is there a nicer way to get at the part number?
The explicit @@se is a bit too low-level for my taste ...

Best wishes,
Taco
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Sections, cross-references and separators

2008-04-01 Thread Duncan Hothersall
Taco wrote:
 In this case it is easier to make the actual chapter number include
 the 'A'. That way, you won't have to worry about separator at all
 (which is good, because its use is confusing).

 Try this:

 @@ -1,4 +1,4 @@
 -\setupheads[separator=] %-- this can't be right
   \setupreferencing[state=start,chapternumber=yes,global=yes]
 -\setupsection[section-1][conversion=Characters]
 -\setupsection[section-2][previousnumber=yes]
 +\def\Mychapter#1{\convertnumber{Characters}{\getvalue{@@sesection-1}}#1}
 +\defineconversion[MyChapter][\Mychapter]
 +\setupsection[section-2][conversion=MyChapter]
   
Ah, thanks so much Taco, never thought of that approach - works like a 
charm. (I also thought that macros with @ in their names could only be 
used in protected mode, so that's two things I have learned for the 
price of one.)

Do you think this is general interest enough to warrant wikifying?

Thanks very much.

Duncan

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Sections, cross-references and separators

2008-04-01 Thread Taco Hoekwater


Duncan Hothersall wrote:
 Taco wrote:
 In this case it is easier to make the actual chapter number include
 the 'A'. That way, you won't have to worry about separator at all
 (which is good, because its use is confusing).

 Try this:

 @@ -1,4 +1,4 @@
 -\setupheads[separator=] %-- this can't be right
   \setupreferencing[state=start,chapternumber=yes,global=yes]
 -\setupsection[section-1][conversion=Characters]
 -\setupsection[section-2][previousnumber=yes]
 +\def\Mychapter#1{\convertnumber{Characters}{\getvalue{@@sesection-1}}#1}
 +\defineconversion[MyChapter][\Mychapter]
 +\setupsection[section-2][conversion=MyChapter]
   
 Ah, thanks so much Taco, never thought of that approach - works like a 
 charm. (I also thought that macros with @ in their names could only be 
 used in protected mode, so that's two things I have learned for the 
 price of one.)

As far as TeX is concerned, I am not actually using the macro myself,
just mentioning its name. The \getvalue macro then constructs the actual
macro name internally. That works always, but usually macro calls look
funny when used in that way.

I just found  \rawsectionnumber, so with this change it should also work 
(and look less low-level, which is good if you want to wikify it):

   \def\Mychapter#1%
  {\convertnumber{Characters}{\rawsectionnumber{section-1}}#1}

Best wishes,
Taco
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Sections, cross-references and separators

2008-03-31 Thread Duncan Hothersall
Dear all,

I am confused. Here is a minimal version of my problem:

---
\setupheads[separator=] %-- this can't be right
\setupreferencing[state=start,chapternumber=yes,global=yes]
\setupsection[section-1][conversion=Characters]
\setupsection[section-2][previousnumber=yes]
\setuphead[part][placehead=yes,resetnumber=yes,page=no]
\setuphead[chapter][page=no]
\setuphead[section][number=no]
\setuppagenumbering[partnumber=no]
\starttext
\placelist[part,chapter,section][alternative=b,partnumber=no]
\part[ptest]{Ptest}
\chapter[ctest]{Ctest}
\section[stest]{Stest}
See \in{Chapter}[ctest] (should say A1) and \in{Figure}[ftest] (should 
say A1.1).
\placefigure[here][ftest]{Ftest (should be called A1.1)}{}
\stoptext
---

What I am aiming for is a style where:
Parts are labelled A, B, C [done],
Chapters are labelled A1, A2, A3 [done, but...],
Cross-references to Chapters call them A1, A2, A3 [not done: I'm 
getting A.1]
Figures are labelled A1.1, A1.2 [not done; I'm getting A.11 (eek!)]
Cross-references to Figures call them A1.1, A1.2 [not done: I'm 
getting A.11]

It seems to me that the line
\setupheads[separator=]
can't possibly be right and is almost certainly causing the missing dot 
in the Figure number, but it was the only way I could find to remove the 
dot between the A and the 1 in the chapter label. I have toiled a little 
with the core-ref code and cannot fathom how any of the variety of uses 
of the word separator make sense, or indeed if they really have 
anything to do with it... :-)

I'm testing on the garden, using pdfTeX. I'd be *really* grateful for 
some help with this one.

Thanks,

Duncan

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
# \processaction
# \processallactionsinset
\processblocks[names][names]
# \processcommacommand
# \processcommalist
# \processfirstactioninset
\processpage[names][yes|no]
# \processXMLbuffer
# \processXMLelement
# \processXMLfile
# \processXMLfilegrouped
# \product
\program[name]
# \project
# \protect
\publication[reference]
\quotation{text}
\quote{text}
\ran{text}
# \readfile
\ref[t|p|r|s|e][reference]
\reference[reference]{text}
\referral[options]
\referraldate
\register[text]{register+register+register}
\reservefloat[options][text][references]{text}
\reset[names]
# \resetlayer
\resetmarking[name]
\rightaligned{text}
\Romannumerals{text}
\romannumerals{text}
\rotate[settings]{text}
# \saveXMLasdata
# \saveXMLdata
# \saveXMLelement
# \sbox
\scale[options]{text}
# \scratchbox
# \scratchcounter
# \scratchdimen
# \scratchskip
\screen
\section[references]{text}
\seeregister[text]{text}{text+text+text}
\selectblocks[names][names][critererium]
\selectpaper[options]
\selectversion
# \setcollector
# \setevalue
# \setevariables
# \setflag
# \setfontstrut
# \setgvalue
# \setgvariables
# \setlayer
# \setlayerframed
# \setlocalhsize
# \setstrut
\settextvariable[name]{text}
\setupalign[options]
\setuparranging[options]
# \setupattachments
\setupbackground[options]
\setupbackgrounds[position][position][state][settings]
\setupblackrules[options]
\setupblank[options]
\setupblock[names][options]
\setupbodyfont[options]
\setupbodyfontenvironment[settings][settings]
\setupbottom[settings][settings]
\setupbottomtexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setupbuffer[name][options]
\setupbuttons[state][settings]
\setupcapitals[title=yes|no][sc=yes|no]
\setupcaption[name][settings]
\setupcaptions[options]
\setupclipping[options]
\setupcolor[name]
\setupcolors[options]
\setupcolumns[options]
\setupcombinations[options]
\setupcombinedlist[name][levels and options]
\setupcomment[options]
\setupdescriptions[names][options]
# \setupencoding
\setupenumerations[names][settings]
\setupexternalfigures[options]
\setupfield[name][label|horizontal|vertical|frame][settings]
\setupfields[names][reset|label|horizontal|vertical|frame][options][settings][settings]
\setupfillinlines[options]
\setupfillinrules[options]
\setupfloat[name][options]
\setupfloats[options]
\setupfloatsplitting[options]
# \setupFLOWcharts
# \setupFLOWlines
# \setupFLOWshapes
# \setupfontsynonym
\setupfooter[text|margin|edge][options]
\setupfootertexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setupfootnotedefinition[settings]
\setupfootnotes[options]
\setupforms[method=HTML|FDF]
\setupformulae[options]
\setupframed[options]
\setupframedtexts[options]
\setuphead[sections][options]
\setupheader[text|margin|edge][options]
\setupheadertexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setupheadnumber[section][number|+number|-number]
\setupheads[options]
\setupheadtext[language code][name=text]
\setuphyphenmark[sign=-|--|---|( )|=|/]
\setupindentations[names][options]
\setupindenting[none|small|medium|big|next|first|normal|odd|even|dimension]
\setupinmargin[left|right|number][options]
\setupinteraction[options]
\setupinteractionbar[options]
\setupinteractionscreen[options]
\setupinterlinespace[reset|small|medium|auto|big|on|off][options]
\setupitemgroup[name][number|each][options][options]
\setupitems[options]
\setuplabeltext[language code][name=text]
\setuplanguage[language code][settings]
# \setuplayer
\setuplayout[options]
\setuplegend[options]
\setuplinenumbering[options]
\setuplines[options]
\setuplinewidth[dimension]
\setuplist[names][options]
\setupmakeup[name][options]
\setupmarginblocks[options]
\setupmarginrules[level=number|rulethickness=dimension]
\setupmarking[name][options]
\setupnarrower[options]
\setupnumbering[options]
\setupoppositeplacing[options]
\setupoutput[names]
\setuppagenumber[number][state=start|stop|keep]
\setuppagenumbering[options]
\setuppagetransitions[options]
\setuppalet[name]
\setuppaper[options]
\setuppapersize[typesetting papersize][printing papersize]
\setupparagraphnumbering[options]
\setupparagraphs[name][number|each][options]
\setuppositioning[options]
\setupprofiles[options]
\setupprograms[directory=text]
\setuppublications[options]
\setupquote[options]
\setupreferencelist[names][options]
\setupreferencing[options]
\setupregister[singular][name][options]
\setuprotate[options]
\setuprule[name][options]
# \setups
\setupscreens[options]
\setupsection[name][name][options]
\setupsectionblock[name][options]
\setupsorting[name][options]
\setupspacing[broad|packed]
\setupstrut[yes|no|cap|text]
\setupsubpagenumber[options]
\setupsymbolset[name]
\setupsynchronization[state=start|stop]
\setupsynchronizationbar[options]
\setupsynonyms[name][options]
\setupsystem[options]
\setuptab[options]
# \setupTABLE
\setuptables[options]
\setuptabulate[name][options]
\setuptext[text|margin|edge][options

Re: [NTG-context] subsection number independent of section

2007-08-27 Thread Wolfgang Schuster
2007/8/27, Michael [EMAIL PROTECTED]:

 Hi, I am trying to write up a legal document, in which I want the numbers
 for section and subsection look like:

 ,
 | I. A Section Title
 |
 | A. A Subsection Title
 `


 So far, I can only get

 ,
 | I. A Section Title
 |
 | I.A. A Subsection Title
 `

 Commend used:

 \setupsection[section-3][conversion=Romannumerals]
 \setuplabeltext[section={{},{.}}]
 \setuphead[section]
   [style=bold,alternative=normal,textcommand=\uppercase]
 \setupsection[section-4][conversion=Character]

 How can I get what I need?  Thanks.

 Michael

Hi Michael,

you need previousnumber=no in setupsection.

\setupsection
  [section]
  [conversion=Romannumerals]

\setuplabeltext
  [section={{},{.}},
   subsection={{},{.}}]

\setuphead
  [section]
  [style=bold,
   alternative=normal,
   textcommand=\uppercase]

\setupsection
  [subsection]
  [previousnumber=no,
   conversion=Character]

\starttext
\section{A Section Title}
\subsection{A Subsection Title}
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] subsection number independent of section

2007-08-26 Thread Michael

Hi, I am trying to write up a legal document, in which I want the numbers
for section and subsection look like:

,
| I. A Section Title
| 
| A. A Subsection Title
`


So far, I can only get 

,
| I. A Section Title
| 
| I.A. A Subsection Title
`

Commend used:

\setupsection[section-3][conversion=Romannumerals]
\setuplabeltext[section={{},{.}}]
\setuphead[section]
  [style=bold,alternative=normal,textcommand=\uppercase]
\setupsection[section-4][conversion=Character]

How can I get what I need?  Thanks.

Michael

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] subsection number independent of section

2007-08-26 Thread Idris Samawi Hamid
Hi,

On Sun, 26 Aug 2007 17:02:59 -0600, Michael [EMAIL PROTECTED] wrote:

 ,
 | I. A Section Title
 |
 | A. A Subsection Title
 `


 So far, I can only get

 ,
 | I. A Section Title
 |
 | I.A. A Subsection Title
 `

 Commend used:

 \setupsection[section-3][conversion=Romannumerals]
 \setuplabeltext[section={{},{.}}]
 \setuphead[section]
   [style=bold,alternative=normal,textcommand=\uppercase]
 \setupsection[section-4][conversion=Character]

Why do you need literal subsections? Why not roll your own section in  
tandem with \section?

The following produces what you want:


\setuphead[section][conversion=Romannumerals]
\definehead[SUBsection][section]
\setuphead[SUBsection][conversion=Character]

\setuplabeltext[section={{},{.}}]
\setuplabeltext[SUBsection={{},{.}}]

\starttext

\section{A Section Title}

\SUBsection{A Subsection Title}

\stoptext


-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] itemize with zero start

2007-07-31 Thread Wolfgang Werners-Lucchini
Hallo,

has nobody tested this with 
ConTeXt version = 2007.07.03 19:38 MKII?

Wolfgang

 Here is an other example!
 Remove the three-line-comment, and the error is gone!
 Strange what?
 
 Wolfgang
 -
 \setupbodyfont[sansserif,11pt]
 \setuphead[section][style=ssb]
 \setupsection[section][conversion=Romannumerals]
 
 \setupitemize[each][a][stopper=:]
 
 \definestartstop[Beweis][
   before={{\bf Beweis:}\endgraf\blank},
   after={\rightaligned{{\bf q.e.d.}}}
   ]
 
 \starttext
 
 \section{Zofff}
 
 \startBeweis
 \startitemize
 \item zack
 \item zong
 \stopitemize
 \stopBeweis
 %
 %==
 %
 \section{Bamm}
 
 \startitemize
 \item bla
 \item blub
 \item bautz
 \stopitemize
 
 \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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] itemize with zero start

2007-07-29 Thread Wolfgang Werners-Lucchini
Hallo!

 Here is a minimal example of how this happens. I had posted it
 sometime back.
 
 \starttext
 \setupitemize[each][][stopper=:]
 \bTABLE
 \bTR
 \bTD
 \startitemize[a]
 \item Bla
 \item Blub
 \item Bautz
 \stopitemize
 \eTD
 \eTR
 \eTABLE
 \stoptext

Here is an other example!

Remove the three-line-comment, and the error is gone!

Strange what?

Wolfgang
-
\setupbodyfont[sansserif,11pt]
\setuphead[section][style=ssb]
\setupsection[section][conversion=Romannumerals]

\setupitemize[each][a][stopper=:]

\definestartstop[Beweis][
  before={{\bf Beweis:}\endgraf\blank},
  after={\rightaligned{{\bf q.e.d.}}}
  ]

\starttext

\section{Zofff}

\startBeweis
\startitemize
\item zack
\item zong
\stopitemize
\stopBeweis
%
%==
%
\section{Bamm}

\startitemize
\item bla
\item blub
\item bautz
\stopitemize

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] broken section number

2007-04-12 Thread Wolfgang Werners-Lucchini
Hallo!

I need help with referencing a subsubsection-number
and the following setup:
---
\setuphead[chapter][number=no]
\setuphead[subsection][resetnumber=no]
\setuphead[subsubsection][
  numbercommand={\determineheadnumber[section]\currentheadnumber .}]
\setupsection[section][previousnumber=no,conversion=Romannumerals]
\setupsection[subsection][previousnumber=no,conversion=Characters]
\setupsection[subsubsection][previousnumber=no]

\starttext
\section{Eins}
\subsection{Zuerst}
\subsubsection{Test}
\subsubsection[LAB]{Test}
\subsubsection{Test}
\subsection{Danach}
\subsubsection{Test}
\subsubsection{Test}
\section{Zwei}
\subsection{Und dann}
\subsubsection{Test}
In \in[LAB] %  problem
\stoptext
---
The numbering of the subsub's is prefixed (arabic, not roman) and 
reset by the section-number (not the subsection-number). This works.

The problem is, that section-number-prefix is not used for the 
reference. 

What is the solution?

Btw. I have not found any explanations for the 'prefix' and the 
'ownnumber' options. Where can I read and learn about these options?

Wolfgang
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] header labels

2007-03-19 Thread Thomas A. Schmitz
Hi all,

I've just hit some rather interesting interaction. I wanted my  
sections numbered A. Title, B. Title etc. This works, unless I choose  
language [deo]. Here's a short test document that demonstrates the  
behavior:

\mainlanguage[de]

\setupsection[section][conversion=A]
\setuplabeltext[section={{},{.~}}]

\starttext

\section{Number One}
dummy
\section{Number Two}
dummy
\section{Number Three}
dummy

\stoptext

If you replace language[deo] with language[de], things work as  
expected. Any explanation for this behavior?

Best

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] header labels

2007-03-19 Thread Aditya Mahajan
On Mon, 19 Mar 2007, Thomas A. Schmitz wrote:

 Hi all,

 I've just hit some rather interesting interaction. I wanted my
 sections numbered A. Title, B. Title etc. This works, unless I choose
 language [deo]. Here's a short test document that demonstrates the
 behavior:

 \mainlanguage[de]

 \setupsection[section][conversion=A]
 \setuplabeltext[section={{},{.~}}]

 \starttext

 \section{Number One}
 dummy
 \section{Number Two}
 dummy
 \section{Number Three}
 dummy

 \stoptext

 If you replace language[deo] with language[de], things work as
 expected. Any explanation for this behavior?

(Untested)

\setuplabeltext[de][section=]

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A couple of questions on heads.

2007-01-03 Thread Elliot Clifton

 Message: 8
 Date: Tue, 2 Jan 2007 20:20:31 -0500 (EST)
 From: Aditya Mahajan [EMAIL PROTECTED]
 Subject: Re: [NTG-context] A couple of questions on heads.
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Message-ID: [EMAIL PROTECTED]
 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

 On Tue, 2 Jan 2007, Elliot Clifton wrote:

  I'm typesetting a journal. I use \chapter to divide it into articles.
  I've defined my own heads, and I need to redefine \appendix, however
  despite reading the manual I cant get them behave as I want.
 
  Problems:
 
  1. Each article may have appendices. I've tried defining my own
  'appendix' head to replace the default one, but I can't decide which
  to use, should I derive from chapter or section? The problem with
  using section as the base, is that the count from my previous sections
  is inherited.  I don't want numbers of the form 1.1, 1.2, etc, either.
  I want to number my appendices independently, starting from 1 without
  the chapter  number. Also, I would like to use roman numerals.

 You can separate the appendices by a section block. For example

 % appendix is already a section block. By default, a section
 % block starts a new page, you may not want that in a journal
 \setupsectionblock[appendix][page=]


 % Change the conversion for sections in appendices.
 \setupsection
[section-3]
[appendixconversion=Romannumerals]


 \starttext

 \section{Test}

 \startappendices
 \section{An Appendix}
 \stopappendices

 \stoptext



 HTH,


Yep. Thanks.

I am now using section blocks to create meta-sections, so that inside
the body-matter sections have no numbers whilst the appendices do. It
works great.

One minor problem though. I need the appendices to have labels, like:
Appendix I, etc..

\setuplabeltext[appendix=Appendix] does not work in this situation
what is the correct way of doing it?

Thanks,

Elliot
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A couple of questions on heads.

2007-01-03 Thread Aditya Mahajan
On Wed, 3 Jan 2007, Elliot Clifton wrote:

 
  Message: 8
  Date: Tue, 2 Jan 2007 20:20:31 -0500 (EST)
  From: Aditya Mahajan [EMAIL PROTECTED]
  Subject: Re: [NTG-context] A couple of questions on heads.
  To: mailing list for ConTeXt users ntg-context@ntg.nl
  Message-ID: [EMAIL PROTECTED]
  Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
 
  On Tue, 2 Jan 2007, Elliot Clifton wrote:
 
   I'm typesetting a journal. I use \chapter to divide it into articles.
   I've defined my own heads, and I need to redefine \appendix, however
   despite reading the manual I cant get them behave as I want.
  
   Problems:
  
   1. Each article may have appendices. I've tried defining my own
   'appendix' head to replace the default one, but I can't decide which
   to use, should I derive from chapter or section? The problem with
   using section as the base, is that the count from my previous sections
   is inherited.  I don't want numbers of the form 1.1, 1.2, etc, either.
   I want to number my appendices independently, starting from 1 without
   the chapter  number. Also, I would like to use roman numerals.
 
  You can separate the appendices by a section block. For example
 
  % appendix is already a section block. By default, a section
  % block starts a new page, you may not want that in a journal
  \setupsectionblock[appendix][page=]
 
 
  % Change the conversion for sections in appendices.
  \setupsection
 [section-3]
 [appendixconversion=Romannumerals]
 
 
  \starttext
 
  \section{Test}
 
  \startappendices
  \section{An Appendix}
  \stopappendices
 
  \stoptext
 
 
 
  HTH,
 
 
 Yep. Thanks.
 
 I am now using section blocks to create meta-sections, so that inside
 the body-matter sections have no numbers whilst the appendices do. It
 works great.
 
 One minor problem though. I need the appendices to have labels, like:
 Appendix I, etc..
 
 \setuplabeltext[appendix=Appendix] does not work in this situation
 what is the correct way of doing it?

You also need to tell context to use the labeltext, by saying

\setuphead
   [section]
   [appendixlabel=appendix,
placehead=yes]

% Make sure that \setuplabeltext[section=] is empty.
% By default it is empty.

Aditya


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A couple of questions on heads.

2007-01-03 Thread Elliot Clifton
 Message: 2
 Date: Wed, 3 Jan 2007 12:32:30 -0500 (EST)
 From: Aditya Mahajan [EMAIL PROTECTED]
 Subject: Re: [NTG-context] A couple of questions on heads.
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Message-ID: [EMAIL PROTECTED]
 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

 On Wed, 3 Jan 2007, Elliot Clifton wrote:

  
   Message: 8
   Date: Tue, 2 Jan 2007 20:20:31 -0500 (EST)
   From: Aditya Mahajan [EMAIL PROTECTED]
   Subject: Re: [NTG-context] A couple of questions on heads.
   To: mailing list for ConTeXt users ntg-context@ntg.nl
   Message-ID: [EMAIL PROTECTED]
   Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
  
   On Tue, 2 Jan 2007, Elliot Clifton wrote:
  
I'm typesetting a journal. I use \chapter to divide it into articles.
I've defined my own heads, and I need to redefine \appendix, however
despite reading the manual I cant get them behave as I want.
   
Problems:
   
1. Each article may have appendices. I've tried defining my own
'appendix' head to replace the default one, but I can't decide which
to use, should I derive from chapter or section? The problem with
using section as the base, is that the count from my previous sections
is inherited.  I don't want numbers of the form 1.1, 1.2, etc, either.
I want to number my appendices independently, starting from 1 without
the chapter  number. Also, I would like to use roman numerals.
  
   You can separate the appendices by a section block. For example
  
   % appendix is already a section block. By default, a section
   % block starts a new page, you may not want that in a journal
   \setupsectionblock[appendix][page=]
  
  
   % Change the conversion for sections in appendices.
   \setupsection
  [section-3]
  [appendixconversion=Romannumerals]
  
  
   \starttext
  
   \section{Test}
  
   \startappendices
   \section{An Appendix}
   \stopappendices
  
   \stoptext
  
  
  
   HTH,
  
 
  Yep. Thanks.
 
  I am now using section blocks to create meta-sections, so that inside
  the body-matter sections have no numbers whilst the appendices do. It
  works great.
 
  One minor problem though. I need the appendices to have labels, like:
  Appendix I, etc..
 
  \setuplabeltext[appendix=Appendix] does not work in this situation
  what is the correct way of doing it?

 You also need to tell context to use the labeltext, by saying

 \setuphead
[section]
[appendixlabel=appendix,
 placehead=yes]

 % Make sure that \setuplabeltext[section=] is empty.
 % By default it is empty.


Thanks. That does the trick.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] A couple of questions on heads.

2007-01-02 Thread Aditya Mahajan
On Tue, 2 Jan 2007, Elliot Clifton wrote:

 I'm typesetting a journal. I use \chapter to divide it into articles.
 I've defined my own heads, and I need to redefine \appendix, however
 despite reading the manual I cant get them behave as I want.

 Problems:
 
 1. Each article may have appendices. I've tried defining my own
 'appendix' head to replace the default one, but I can't decide which
 to use, should I derive from chapter or section? The problem with
 using section as the base, is that the count from my previous sections
 is inherited.  I don't want numbers of the form 1.1, 1.2, etc, either.
 I want to number my appendices independently, starting from 1 without
 the chapter  number. Also, I would like to use roman numerals.

You can separate the appendices by a section block. For example

% appendix is already a section block. By default, a section
% block starts a new page, you may not want that in a journal
\setupsectionblock[appendix][page=]


% Change the conversion for sections in appendices.
\setupsection
   [section-3]
   [appendixconversion=Romannumerals]


\starttext

\section{Test}

\startappendices
\section{An Appendix}
\stopappendices

\stoptext


 2. I derived \Author from \section with expectation that
 \setupheadertexts[Papertitle][Author] would yield a header containing
 the author's name and the paper's title, however I get the title of
 the most recent section instead of the author. What can I do about
 this?

You need not redrive \Author from section. You can use use totally 
different markings, as shown below.


% Define your own marking.

\definemarking[Papertitle]
\definemarking[Author]

% Set that marking.

\marking[Papertitle]{This is a \CONTEXT\ example}
\marking[Author]{Aditya Mahajan}

% Allow ConTeXt to do the rest :-)

\setupheadertexts[Papertitle][Author]

\starttext test \stoptext

HTH,

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Header number separator

2006-11-15 Thread Aditya Mahajan
On Wed, 15 Nov 2006, Hans Hagen wrote:

 Aditya Mahajan wrote:
 On Tue, 14 Nov 2006, Hans Hagen wrote:

 Jeff Smith wrote:
 On 11/7/06, Aditya Mahajan [EMAIL PROTECTED] wrote:



 I need this functionality for a project (IEEE conference style), so
 here is hack to get the feature. The referencing also works.

 Use with caution, can break existing macros.


 Wow, thanks a lot! This works as expected. In what situation can it
 break existing macros? I intend to use that extensively but in a
 fairly simple document (a thesis... yeah, another one in ConTeXt!). Is
 there anything I should _not_ do?

 hm, can on esummarize what will break macros? (i was away for a week
 with time for email)

 A patch that I sent to Jeff. There is a problem with separators and
 setuphead. I have summarized the problem and a possible patch in the
 attached file. However, I do not know if it will break something in
 multi-lingual documents (esp. Arabic), so I sent the patch with a
 disclaimer.
 i took a quick look at it; the problem is that it will mess up other things; 
 the period in fullsectionnumber is a placeholder that will be replaced later 
 on; the actual code where things happen in \doseparatednumber and it's not 
 that easy to hook level dependent separators in there

 (i will reimplement sectionnumbering some day soon due to some other pending 
 issues)

 anyhow, here's another approach:
 [snip]

This does not work with references, \in[ref] still gives . as the 
separator. Consider IEEE's journal and conference requirements

In the head only show the current number

SectionI.
Subsection B.
Subsubsection  3)
paragraph  a)

While refereing to a section, use

Section   I
SubsectionI-A
subsubsection I-A.1
paragraph I-A.1.a


The first part is easy

\setupsection[section-3][bodypartconversion=Romannumerals]
\setupsection[section-4][bodypartconversion=Character,
  previousnumber=no]
\setupsection[section-5][bodypartconversion=numbers,
  previousnumber=no]
\setupsection[section-6][bodypartconversion=character,
  previousnumber=no]

\setuphead[section]
   [numbercommand={\groupedcommand{}{.}}]

\setuphead[subsection]
   [numbercommand={\groupedcommand{}{)}}]


I could never get the second part working and had to go back to Latex 
:-( Hoping that your reimplementation is before my next deadline.


Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Header number separator

2006-11-14 Thread Aditya Mahajan

On Tue, 14 Nov 2006, Hans Hagen wrote:


Jeff Smith wrote:

On 11/7/06, Aditya Mahajan [EMAIL PROTECTED] wrote:




I need this functionality for a project (IEEE conference style), so
here is hack to get the feature. The referencing also works.

Use with caution, can break existing macros.



Wow, thanks a lot! This works as expected. In what situation can it
break existing macros? I intend to use that extensively but in a
fairly simple document (a thesis... yeah, another one in ConTeXt!). Is
there anything I should _not_ do?


hm, can on esummarize what will break macros? (i was away for a week with time 
for email)


A patch that I sent to Jeff. There is a problem with separators and 
setuphead. I have summarized the problem and a possible patch in the 
attached file. However, I do not know if it will break something in 
multi-lingual documents (esp. Arabic), so I sent the patch with a 
disclaimer.


Aditya\starttext

%D Suppose I have a document with three levels of headings|| chapter,
%D section, and subsection. I want different separators for different levels,
%D say 1,2, etc. for chapter; 1-1, 1-2, etc., for sections and 1-1.1, 1-1.2
%D etc., for subsections. The present context approach of using
%D \starttyping
%D \setuphead[section][separator=-]
%D \setuphead[subsection][separator=.]
%D \stoptyping
%D does not work properly. See the output of the following

\setuphead[section][separator=-]
\setuphead[subsection][separator=.]


\chapter[chap]{First Chapter}
\section[sec]{First Section}
\subsection[subsec]{First Subsection}
As you may have noticed, \in[subsec] is the first subsubsection of
\in[sec], which in turn is the first section of \in[chap].

Notice that the all the separators in the subsection have changed, and the
separator is not honored in the references.

The reason that this happens is \tex{@@longsectionnumber} can not 
keep track of sectioning levels. One way to overcome this is to associate
the separator with \mono{section-x} rather than with \mono{head}. The
following patch does this, but I am not sure if it will break anything or
not.

\page

% Begin Patch

\setupsection[section-1][separator=.]
\setupsection[section-2][separator=.]
\setupsection[section-3][separator=.]
\setupsection[section-4][separator=.]
\setupsection[section-5][separator=.]
\setupsection[section-6][separator=.]
   
\unprotect
\def\@@longsectionnumber#1%
  {\ifreversesectionnumbers
 \@@shortsectionnumber{#1}%
 \ifnum\countervalue{\??se\previoussection{#1}}\zerocount
  \csname\??se#1\c!separator\endcsname
   \csname\previoussection{#1}\c!number\endcsname
 \fi
   \else
 \ifnum\countervalue{\??se\previoussection{#1}}\zerocount
 \csname\previoussection{#1}\c!number\endcsname%
 \csname\??se#1\c!separator\endcsname%
 \fi
 \@@shortsectionnumber{#1}%
   \fi}
\protect

% End Patch

%D Now let us see how we can get the desired output.
%D \startbuffer
%D \setupsection[section-3][separator=-]
%D \stopbuffer
%D \typebuffer
%D which gives the output o the next page
%D \getbuffer
%D \chapter[chap new]{First Chapter}
%D \section[sec new]{First Section}
%D \subsection[subsec new]{First Subsection}
%D As you may have noticed, \in[subsec new] is the first subsubsection of
%D \in[sec new], which in turn is the first section of \in[chap new].
%D \page

% Begin Patch

\setupsection[section-1][separator=.]
\setupsection[section-2][separator=.]
\setupsection[section-3][separator=.]
\setupsection[section-4][separator=.]
\setupsection[section-5][separator=.]
\setupsection[section-6][separator=.]
   
\unprotect
\def\@@longsectionnumber#1%
  {\ifreversesectionnumbers
 \@@shortsectionnumber{#1}%
 \ifnum\countervalue{\??se\previoussection{#1}}\zerocount
  \csname\??se#1\c!separator\endcsname%AM: was .
   \csname\previoussection{#1}\c!number\endcsname
 \fi
   \else
 \ifnum\countervalue{\??se\previoussection{#1}}\zerocount
 \csname\previoussection{#1}\c!number\endcsname%
 \csname\??se#1\c!separator\endcsname%AM: was .
 \fi
 \@@shortsectionnumber{#1}%
   \fi}
\protect

% End Patch

%D Now let us see how we can get the desired output.
%D \starttyping
%D \setupsection[section-3][separator=-]
%D \stoptyping
%D which gives the output on the next page

\setupsection[section-3][separator=-]

\chapter[chap new]{First Chapter}
\section[sec new]{First Section}
\subsection[subsec new]{First Subsection}
As you may have noticed, \in[subsec new] is the first subsubsection of
\in[sec new], which in turn is the first section of \in[chap new].

Notice that the section numbering as well as the reference numbering is
correct.

\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Header number separator

2006-11-07 Thread Aditya Mahajan
On Tue, 7 Nov 2006, Jeff Smith wrote:

 Hi,

 Some time ago I had a query on the list about roman numbering in
 headers. Once I got my answer, I asked something else relatively
 unrelated but in the same thread. It's probably bad etiquette, so I
 figure that is why it has remained unheeded. I'd like to submit my
 second query again.

 I have a problem with the separator in header numbers. I want to
 use a different separator between chapter and section numbers (-), than 
 between
 section and subsection numbers (.).

 So, assuming I'm using roman numerals for chapters, I'd like numering
 of sections to be I-1, I-2, I-3, etc., of subsections to be I-1.1,
 I-1.2, I-2.1, I-2.2, I-2.3, etc.

 Is there a way to achieve what I want to do?

Yes, as long as you do not want to refer to your sections :) The 
separator seems to be broken while refering anyways.

\setupsection[section-2][bodypartconversion=Romannumerals]

\setuphead
[subsection]
[numbercommand=\mysubsectionnumber]

\setuphead[section][separator=-]

\unprotect

\def\mysubsectionnumber#1%
   {\@@shortsectionnumber{section-2}-%
\@@shortsectionnumber{section-3}.%
\@@shortsectionnumber{section-4}}

\protect

\starttext

\chapter{Test}

\section[sec]{section test}

\subsection[sub]{test}

The separator is not honored in \in Section[sec] and in \in 
subsection[sub].

\stoptext

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Header number separator

2006-11-07 Thread Aditya Mahajan
On Tue, 7 Nov 2006, Aditya Mahajan wrote:

 On Tue, 7 Nov 2006, Jeff Smith wrote:

 Hi,

 Some time ago I had a query on the list about roman numbering in
 headers. Once I got my answer, I asked something else relatively
 unrelated but in the same thread. It's probably bad etiquette, so I
 figure that is why it has remained unheeded. I'd like to submit my
 second query again.

 I have a problem with the separator in header numbers. I want to
 use a different separator between chapter and section numbers (-), than 
 between
 section and subsection numbers (.).

 So, assuming I'm using roman numerals for chapters, I'd like numering
 of sections to be I-1, I-2, I-3, etc., of subsections to be I-1.1,
 I-1.2, I-2.1, I-2.2, I-2.3, etc.

 Is there a way to achieve what I want to do?

 Yes, as long as you do not want to refer to your sections :) The
 separator seems to be broken while refering anyways.

I need this functionality for a project (IEEE conference style), so 
here is hack to get the feature. The referencing also works.

Use with caution, can break existing macros.

\setupsection[section-1][separator=-]
\setupsection[section-2][separator=-]
\setupsection[section-3][separator=-] %section
\setupsection[section-4][separator=.] %subsection
\setupsection[section-5][separator=-]
\setupsection[section-6][separator=-]

\setupsection[section-2][bodypartconversion=Romannumerals]

\unprotect
\def\@@longsectionnumber#1%
   {\ifreversesectionnumbers
  \@@shortsectionnumber{#1}%
  \ifnum\countervalue{\??se\previoussection{#1}}\zerocount
   \csname\??se#1\c!separator\endcsname%AM: was .
\csname\previoussection{#1}\c!number\endcsname
  \fi
\else
  \ifnum\countervalue{\??se\previoussection{#1}}\zerocount
  \csname\previoussection{#1}\c!number\endcsname%
  \csname\??se#1\c!separator\endcsname%AM: was .
  \fi
  \@@shortsectionnumber{#1}%
\fi}

\protect

\starttext

\chapter{Test}

\section[sec]{section test}

\subsection[sub]{test}

The separator is honored in \in Section[sec] and in \in 
subsection[sub].

\stoptext

Basically, section numbers are built according to \??se 
(\setupsection, etc), while separators are specified using \??ko 
(\setuphead, etc), so any interaction is very difficult. I defined 
separators according to \setupsection, and use while generating the 
number.


Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Roman numerals in headers

2006-10-26 Thread Aditya Mahajan
On Thu, 26 Oct 2006, Jeff Smith wrote:

 Hi again,

 I've been searching through various docs in order to find how I can
 have roman numbering with headers (namely, chapter titles), but I've
 been unsuccessful. I'm sure it's possible! How does one do it?


\setupsection[section-2][bodypartconversion=Romannumerals]

section-1 is parts
section-2 is chapter/title
section-3 is section

etc.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Roman numerals in headers

2006-10-26 Thread Marcus Vinicius Mesquita de So
\setupsection[chapter][conversion=Romannumerals](you get I, II, III, IV... )or\setupsection[chapter][conversion=romannumerals](you get i, ii, iii, iv ... )MarcusJeff Smith [EMAIL PROTECTED] wrote: Hi again,I've been searching through various docs in order to find how I canhave roman numbering with headers (namely, chapter titles), but I'vebeen unsuccessful. I'm sure it's possible! How does one do it?Thank you in advance,Jeff___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context 
		 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] using \doifnumberelse in a ToC numbercommand=

2006-08-16 Thread Mojca Miklavec
On 8/16/06, Stuart Jansen wrote:
 I asked this question a couple of days ago, but didn't get any takers. I
 don't want to be a pest, but it's frustrating to be so close yet unable
 to solve this final problem. Let's see if rephrasing the question helps.

 I'm trying to use \doifnumberelse in a \setuplist numbercommand= but it
 isn't working.

 The simplified example below shows the very specific table of contents
 layout I'm trying to accomplish. You will note that both the chapter
 number and the appendix letter are labeled with Appendix when in fact
 I want the chapter to be labeled Chapter.

 Does anyone know either (a) how to get \doifnumberelse to work in this
 situation or (b) if there's a better way I should have done this
 instead.

My guess is that \doifnunmberelse won't work since it's not only the
number hidden there, but also formatting, conversion, ... etc.

But I have no idea how to do it in some other way. You may take a look
at the following, but it has the side-effect that it will not only be
used in TOC, but also in text which is most probably not what you
want:

\def\mychapterlistnumber#1{\vbox{#1\crlf}}
\def\mysectionlistnumber#1{\emspace\emspace}
\def\mysectionlisttext#1{%
 \doifelse{#1}{Lab Tasks}{\hskip-1em\bf#1\hfilll}{#1}}
\setuplist[chapter][width=1em,numberstyle=bold,%
 numbercommand=\mychapterlistnumber,textstyle=bold]
\setuplist[section][width=2em,numbercommand=\mysectionlistnumber,%
 textcommand=\mysectionlisttext]

\unprotect

\setupsection
  [\s!section-2]
  [\v!appendix\c!conversion=appendixconversion,
   \c!conversion=chapterconversion,]

\protect

\def\appendixconversion#1{Appendix #1}
\defineconversion[appendixconversion][\appendixconversion]

\def\chapterconversion#1{Chapter #1}
\defineconversion[chapterconversion][\chapterconversion]

\starttext
\bgroup{}Table of Contents\egroup\par
\startcolumns[n=2,distance=.3in,balance=no]
\bgroup
\placelist[chapter,section][criterium=all,alternative=b]
\egroup
\stopcolumns
\page
\chapter{Foo}
\section{Bar}
\input knuth
\startappendices
\chapter{Corge}
\section{Grault}
\input zapf
\stopappendices
\stoptext


Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Different formatting of section numbers for title and references.

2006-08-16 Thread Aditya Mahajan
Hi,
  I want a setup in which section numbers are Roman (I, II, etc.) and 
subsection numbers are Character (A, B, etc. without the section 
number prefixed). This is easy to achieve using

\setupsection[section-3][bodypartconversion=Romannumerals]
\setupsection[section-4][bodypartconversion=Character,
  previousnumber=no]

However, when I reference these sections, I want
\in[section] to give I (which it does happens) and \in[subsection] to 
give I-A. How can I achieve the correct reference numbering for 
subsections?

Thanks,
Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to achieve: (a) sectiontitle

2006-07-30 Thread Steffen Wolfrum
Hi,

I am confused about the ) and setupsection or setuphead:

What I need is a section that looks like this
a) text
b) text

and a section like this
(aa) text
(bb) text

The conversion is clear but what about ), resp. ( before and )  
after the sectionnumber.
How and where is this called?

Steffen
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] How to achieve: (a) sectiontitle

2006-07-30 Thread Aditya Mahajan
On Sun, 30 Jul 2006, Steffen Wolfrum wrote:

 Hi,

 I am confused about the ) and setupsection or setuphead:

 What I need is a section that looks like this
 a) text
 b) text

 and a section like this
 (aa) text
 (bb) text

 The conversion is clear but what about ), resp. ( before and )
 after the sectionnumber.

 How and where is this called?

You can use numbercommand to format the number. For example

\setupsection[section-3][conversion=character]
\setuphead[section][numbercommand=\MyCommand]
\def\MyCommand#1{#1)}

gives you

a) text
b) text

and

\setupsection[section-3][conversion=character]
\setuphead[section][numbercommand=\MyCommand]
\def\MyCommand#1{(#1#1)}

gives you

(aa) text
(bb) text


Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] sectionnumber conversion redux

2006-06-28 Thread Taco Hoekwater
Idris Samawi Hamid wrote:
 I sent this a week ago, still awaiting help :-)

Sorry, missed it. This fixes the page numbers in the headers

   \setupsection [section-1][conversion=Romannumerals]

I do not (yet) know how to fix the TOC.


 Idris
 
 On Tue, 20 Jun 2006 19:20:58 -0600, Idris Samawi Hamid  
 [EMAIL PROTECTED] wrote:
 
 Dear fellow gangsters,
 
 Consider the following test file; partnumber=on. I would like partnumber
 to be converted to capital roman numerals while the page numeral remains
 as an Arabic numeral. Viz., instead of
 
 1--1, 1--2 etc.
 
 in the TOC and pagenumbers I would like
 
 I--1, I--2 etc.
 
 in the TOC and pagenumbers. Is there a command like
 
 \setupsectionnumbering[conversion=Romannumerals]? Then I would say,
 
 \setuppartnumbering[conversion=Romannumerals]
 
 The test file is below.
 
 Best
 Idris
 
 ===part-test.tex==
 % output=pdf interface=en
 
 \def\PartTitle#1{\noheaderandfooterlines
\vbox{\blank[force,7\bodyfontsize]
\switchtobodyfont[14.4pt]
\midaligned{\cgd #1}
}}
 
 \setuphead[part][number=no,
ownnumber=yes,
style=\itd,
textcommand=\PartTitle,
placehead=yes]
 
 \setupsection [section2]
 [appendixconversion=Character, % Watch the capital
 previousnumber=no]
 
 %\setuppagenumbering[way=bytext,partnumber=no]
 %\setupcombinedlist[content][partnumber=no]
 
 \starttext
 
 \startbodymatter
 
 \placecontent
 
 \part{I}{Body}
 
 \chapter{The Body Stuff}
 
 \stopbodymatter
 
 \startappendices
 
 \setupheadnumber[part][+]
 
 \part{II}{Appendices}
 
 \chapter{Appendix}
 
 \stopappendices
 
 \stoptext
 
 ==
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] sectionnumber conversion redux

2006-06-27 Thread Idris Samawi Hamid
I sent this a week ago, still awaiting help :-)

Idris

On Tue, 20 Jun 2006 19:20:58 -0600, Idris Samawi Hamid  
[EMAIL PROTECTED] wrote:

Dear fellow gangsters,

Consider the following test file; partnumber=on. I would like partnumber
to be converted to capital roman numerals while the page numeral remains
as an Arabic numeral. Viz., instead of

1--1, 1--2 etc.

in the TOC and pagenumbers I would like

I--1, I--2 etc.

in the TOC and pagenumbers. Is there a command like

\setupsectionnumbering[conversion=Romannumerals]? Then I would say,

\setuppartnumbering[conversion=Romannumerals]

The test file is below.

Best
Idris

===part-test.tex==
% output=pdf interface=en

\def\PartTitle#1{\noheaderandfooterlines
   \vbox{\blank[force,7\bodyfontsize]
   \switchtobodyfont[14.4pt]
   \midaligned{\cgd #1}
   }}

\setuphead[part][number=no,
   ownnumber=yes,
   style=\itd,
   textcommand=\PartTitle,
   placehead=yes]

\setupsection [section2]
[appendixconversion=Character, % Watch the capital
previousnumber=no]

%\setuppagenumbering[way=bytext,partnumber=no]
%\setupcombinedlist[content][partnumber=no]

\starttext

\startbodymatter

\placecontent

\part{I}{Body}

\chapter{The Body Stuff}

\stopbodymatter

\startappendices

\setupheadnumber[part][+]

\part{II}{Appendices}

\chapter{Appendix}

\stopappendices

\stoptext

==

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] continuous numbering of subsection

2006-06-26 Thread Ulf Martin
Hi

Hans Hagen schrieb:
 \setuphead   [chapter][resetnumber=no]
 \setupsection[section][previousnumber=no]

I do not quite understand the reseting mechanism.

I want a lowest level section-like subdivision that has a running number 
which is unaffected by any of the above levels irrespective of the 
existence of higher levels. The higher levels should be numbered 
hierarchically as usual.

When I try

\setuphead[section][resetnumber=no]
\setuphead[subsection][resetnumber=no]
\setupsection[subsubsection][previousnumber=no]

The subsubsection number is indeed not reset if *all* higher levels are 
present; but if I leave one out, it is reset; additionally the 
subsection is of course not reset, which I don't want:

\section{One}
\subsection{Oneone}
\subsubsection{Topicone}% number = 1, OK
\subsection{Onetwo}
\subsubsection{Topictwo}% number = 2, OK
\section{Two}
\subsubsection{Topicthree}  % number = 1, wrong
\subsection{Twoone} % number = 2.3, wrong
\subsubsection{Topicfour}   % number = 2, wrong
\subsection{Twotwo} % number = 2.4, wrong
\subsubsection{Topicfive}   % number = 3, wrong

With this:

\setuphead[section][resetnumber=yes]
\setuphead[subsection][resetnumber=no]
\setupsection[subsubsection][previousnumber=no]

I get:

\section{One}
\subsection{Oneone}
\subsubsection{Topicone}% number = 1, OK
\subsection{Onetwo}
\subsubsection{Topictwo}% number = 2, OK
\section{Two}
\subsubsection{Topicthree}  % number = 1, wrong
\subsection{Twoone} % number = 2.1, now OK
\subsubsection{Topicfour}   % number = 2, wrong
\subsection{Twotwo} % number = 2.2, now OK
\subsubsection{Topicfive}   % number = 3, wrong

So the numbering of \subsubsection{Topicthree} is reset by 
\section{Two}, irrespective of the latter's resetnumber option.

Here are examples of what I'd really like (here § indicates a topic, 
the actual section-level names (like chapter etc.) are not important):

I. ... Chapter
  § 1 ...
 1 ... Section
  § 2 ...  Topic in section
   1.1 ... Subsection
  § 3 ...  Topic in subsection
  § 4 ...
   1.2  ...
  § 5 ...
 2 ...
  § 6 ...
  § 7 ...
   2.1  ...
  § 8 ...
II. ...
  § 9 ...  Topic in chapter
 1 ...
  § 10 ...
  § 11 ...
   1.1  ...
  § 12 ...

Of course, referencing, entry in TOC, index etc. should be correct.

It would be even more preferable if one could attach the topic
numbering to a specified level. If the topic were attached to chapters 
then the above example would become:

I. ... Chapter
  § 1 ...  Topic in chapter
 1 ... Section
  § 2 ...  Topic in section
   1.1 ... Subsection
  § 3 ...  Topic in subsection
  § 4 ...
   1.2  ...
  § 5 ...
 2 ...
  § 6 ...
  § 7 ...
   2.1  ...
  § 8 ...
II. ...
  § 1 ...  First topic in second chapter
 1 ...
  § 2
  § 3
   1.1  ...
  § 4  ...

One could summarize it this way: §'s are conceptually the lowest level 
of subsections, their number is reset by a subsection of some higher 
level (or never).

In LaTeX one can get this kind of behaviour because the numbering is 
controlled by counters. The increment of one counter may be used to 
reset another counter independent of the actual section level they are 
used for.

Bye  Thank you all

Ulf

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] continuous numbering of subsection

2006-06-25 Thread Hans Hagen
Ulf Martin wrote:
 Dear ConTeXt Experts

 I am still sometimes confused about how to set up simple things...

 I want to have a subsection level head type (topic) with a numbering 
 that runs undependently from the section numbering, like so:

 1. First Topic
 ...

 I. Section One
 ...

 2. Second Topic
 ...

 3. Third Topic
 ...

 4. Fourth Topic
 ...

 II. Section Two

 5. Fifth Topic
 ...

 6. Sixth Topic
 ...

 III. Section Three
 ...

 And so on.

 ConTeXtgarden, the manual, etc. show in great detail how to set up the 
 /appearence/ of head parts (incl. numbercommand), but I cannot find an 
 explanation of the handling of the LaTeX equivalent to counters (their 
 definition, incrementing, resetting, etc.). The explanation of 
 \setupheadnumber in the manual (p. 172) is quite obscure to me -- how do 
 I specify that I do not want higher levels of head to reset my numbering?
   

i admit that it's a bit fuzzy ... (some day i'll make this more 
transparent)

\setuphead   [chapter][resetnumber=no]
\setupsection[section][previousnumber=no]

\chapter{Section One}
\section{Second Topic}
\section{Third Topic}
\section{Fourth Topic}

\chapter{Section Two}
\section{Fifth Topic}
\section{Sixth Topic}

\chapter{Section Three}

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] continuous numbering of subsection

2006-06-25 Thread Ulf Martin
Hi

Hans Hagen schrieb:
  \setuphead   [chapter][resetnumber=no]
  \setupsection[section][previousnumber=no]

Ok, I undestand. I apologise that my example was too short. I'd like to 
have things more flexible:

If an arbitrary and irregular number of levels is introduced (sections, 
subsections, etc., numbered hierarchically as usual), the topic 
numbering should remain continuous and unaffected
(that's why I thought, a separate definition, as in 
\definehead[topic][...], would be appropriate).

Conceptually, though, topic is a section-like subdivision, so, for 
example, should appear in the TOC.

This is typical e.g. in (German) law texts (here with § as a topic 
marker but this is not the point), Example:

I. ... Chapter
 § 1 ...
1 ... Section
 § 2 ...  Topic in section
  1.1 ... Subsection
 § 3 ...  Topic in subsection
 § 4 ...
  1.2  ...
 § 5 ...
2 ...
 § 6 ...
 § 7 ...
  2.1  ...
 § 8 ...
II. ...
 § 9 ...  Topic in chapter
1 ...
 § 10 ...
 § 11 ...
  1.1  ...
 § 12 ...

Of course, referencing, entry in TOC, index etc. should be correct.

It would be even more preferable if one could attach the topic 
numbering to a specified level, say, chapters. The above example then 
would become:

I. ... Chapter
 § 1 ...  Topic in chapter
1 ... Section
 § 2 ...  Topic in section
  1.1 ... Subsection
 § 3 ...  Topic in subsection
 § 4 ...
  1.2  ...
 § 5 ...
2 ...
 § 6 ...
 § 7 ...
  2.1  ...
 § 8 ...
II. ...
 § 1 ...  First topic in second chapter
1 ...
 § 2
 § 3
  1.1  ...
 § 4  ...


Thank you  sorry for the incomplete first question!
Ulf


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] sectionnumber conversion

2006-06-20 Thread Idris Samawi Hamid
Dear fellow gangsters,

Consider the following test file; partnumber=on. I would like partnumber  
to be converted to capital roman numerals while the page numeral remains  
as an Arabic numeral. Viz., instead of

1--1, 1--2 etc.

in the TOC and pagenumbers I would like

I--1, I--2 etc.

in the TOC and pagenumbers. Is there a command like

\setupsectionnumbering[conversion=Romannumerals]? Then I would say,

\setuppartnumbering[conversion=Romannumerals]

The test file is below.

Best
Idris

===part-test.tex==
% output=pdf interface=en

\def\PartTitle#1{\noheaderandfooterlines
  \vbox{\blank[force,7\bodyfontsize]
  \switchtobodyfont[14.4pt]
  \midaligned{\cgd #1}
  }}

\setuphead[part][number=no,
  ownnumber=yes,
  style=\itd,
  textcommand=\PartTitle,
  placehead=yes]

\setupsection [section2]
[appendixconversion=Character, % Watch the capital
previousnumber=no]

%\setuppagenumbering[way=bytext,partnumber=no]
%\setupcombinedlist[content][partnumber=no]

\starttext

\startbodymatter

\placecontent

\part{I}{Body}

\chapter{The Body Stuff}

\stopbodymatter

\startappendices

\setupheadnumber[part][+]

\part{II}{Appendices}

\chapter{Appendix}

\stopappendices

\stoptext

==

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Page Numbers in TOC; setuplabeltext

2006-06-01 Thread Aditya Mahajan
On Thu, 1 Jun 2006, Neal Lester wrote:

 Is there a way to change the subsubsubsection numbers to letters?

\setupsection[section-6][bodypartconversion=Character] should do the 
trick

section-1 corresponds to part, section-2 to chapter, and so on.


Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread Hans Hagen
nico wrote:
 On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED] wrote:

   
 3. How to obtain (I,II,III,IV) for part numbering ?
 

 \setupsection[section-1][conversion=Romannumerals]

 seems ok, but I would find more natural to be able to write the following,  
 at least to make the conversion local to parts (not applied to any other  
 heading defined with the same level):

 \setuphead[part][conversion=Romannumerals]
   
\starttext

\definehead[xx][chapter]

\def\sectionofhead#1{\executeifdefined{\??ko#1\c!section}\s!unknown}

\sectionofhead{chapter}
\sectionofhead{xx}

\setupsection[\sectionofhead{part}][conversion=Romannumerals]

\stoptext


in a next release i'll implement auto-indirectness so that 

setupsection[chapter][conversion=greek]
\setupsection[section][conversion=characters]

will work as well (rather trivial patch) 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread nico
On Sat, 22 Apr 2006 10:24:58 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED]  
 wrote:


 3. How to obtain (I,II,III,IV) for part numbering ?


 \setupsection[section-1][conversion=Romannumerals]

 seems ok, but I would find more natural to be able to write the  
 following,
 at least to make the conversion local to parts (not applied to any other
 heading defined with the same level):

 \setuphead[part][conversion=Romannumerals]

 \starttext

 \definehead[xx][chapter]

 \def\sectionofhead#1{\executeifdefined{\??ko#1\c!section}\s!unknown}

 \sectionofhead{chapter}
 \sectionofhead{xx}

 \setupsection[\sectionofhead{part}][conversion=Romannumerals]

 \stoptext


 in a next release i'll implement auto-indirectness so that

 setupsection[chapter][conversion=greek]
 \setupsection[section][conversion=characters]

 will work as well (rather trivial patch)

Ok, but then

\definehead[xx][chapter]

\setupsection[\sectionofhead{chapter}][conversion=Romannumerals]
\setupsection[\sectionofhead{xx}][conversion=Character]

will put Character conversion for both chapter and xx heading. That's why  
i thought it could be interesting to have the conversion option also for  
setuphead, to limit the conversion to one heading.

btw, it seems strange to have so many setuphead command options  
(textcommand, numbercommand, deepnumbercommand) to format completely the  
head rendering, and not the ability to change only the head number  
conversion without changing the whole global section level.

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread Hans Hagen
nico wrote:
 On Sat, 22 Apr 2006 10:24:58 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

   
 nico wrote:
 
 On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED]  
 wrote:


   
 3. How to obtain (I,II,III,IV) for part numbering ?

 
 \setupsection[section-1][conversion=Romannumerals]

 seems ok, but I would find more natural to be able to write the  
 following,
 at least to make the conversion local to parts (not applied to any other
 heading defined with the same level):

 \setuphead[part][conversion=Romannumerals]

   
 \starttext

 \definehead[xx][chapter]

 \def\sectionofhead#1{\executeifdefined{\??ko#1\c!section}\s!unknown}

 \sectionofhead{chapter}
 \sectionofhead{xx}

 \setupsection[\sectionofhead{part}][conversion=Romannumerals]

 \stoptext


 in a next release i'll implement auto-indirectness so that

 setupsection[chapter][conversion=greek]
 \setupsection[section][conversion=characters]

 will work as well (rather trivial patch)
 

 Ok, but then

 \definehead[xx][chapter]

 \setupsection[\sectionofhead{chapter}][conversion=Romannumerals]
 \setupsection[\sectionofhead{xx}][conversion=Character]

 will put Character conversion for both chapter and xx heading. That's why  
 i thought it could be interesting to have the conversion option also for  
 setuphead, to limit the conversion to one heading.

 btw, it seems strange to have so many setuphead command options  
 (textcommand, numbercommand, deepnumbercommand) to format completely the  
 head rendering, and not the ability to change only the head number  
 conversion without changing the whole global section level.
   
it can be done at the sectionblock level (see chinese) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-22 Thread nico
On Sat, 22 Apr 2006 12:16:10 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 nico wrote:

 \setuphead[part][conversion=Romannumerals]
 [...]
 Ok, but then

 \definehead[xx][chapter]

 \setupsection[\sectionofhead{chapter}][conversion=Romannumerals]
 \setupsection[\sectionofhead{xx}][conversion=Character]

 will put Character conversion for both chapter and xx heading. That's  
 why
 i thought it could be interesting to have the conversion option also for
 setuphead, to limit the conversion to one heading.

 btw, it seems strange to have so many setuphead command options
 (textcommand, numbercommand, deepnumbercommand) to format completely the
 head rendering, and not the ability to change only the head number
 conversion without changing the whole global section level.

 it can be done at the sectionblock level (see chinese)

Hm, I've missed something. I see nothing about sectionblock in chinese,  
but at page 10 there is:

\setuphead [section] [conversion=chinese]

\setuphead [chapter] [conversion=]
\setuphead [section] [conversion=numbers]

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Document Structuring

2006-04-21 Thread nico
On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED] wrote:

 3. How to obtain (I,II,III,IV) for part numbering ?

\setupsection[section-1][conversion=Romannumerals]

seems ok, but I would find more natural to be able to write the following,  
at least to make the conversion local to parts (not applied to any other  
heading defined with the same level):

\setuphead[part][conversion=Romannumerals]

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chapter with letters rather than numbers?

2006-04-18 Thread Aditya Mahajan

On Fri, 14 Apr 2006, Renaud AUBIN wrote:
 Johannes Graumann a écrit :

 Hi,

 How would I use \setuphead[chapter] to have consecutive letters 
 rather than numbers assigned to chapters (in my appendix)?

 Use the following structure:

 \startfrontmatter ... \stopfrontmatter
 \startbodymatter ... \stopbodymatter
 \startappendices ... \stopappendices
 \startbackmatter ... \stopbackmatter

which is the right way to do things. However, if you do want to change 
chapter numbering,

  \setupsection
 [section-2]
 [bodypartconversion=Character]

will do the trick.

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Section Numbering

2006-02-05 Thread Taco Hoekwater
Aditya Mahajan wrote:
 Well this should be very easy to do in context, but I can not seem to 
 find the right switches. For a document that I am writing, I want 
 section and subsection numbers to display as follows
 
 A. Section 1
 A-1 Section 1, subsection 1
 
 B. Section 2
 
 and  so on. What is the magic command?

This will give A, B etc. section numbers. I do not know about the rest

\setupsection
   [section-3]
   [bodypartconversion=Character]

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Section Numbering

2006-02-05 Thread Aditya Mahajan
--- On Feb 5, Taco Hoekwater wrote ---

 Aditya Mahajan wrote:
 Well this should be very easy to do in context, but I can not seem to
 find the right switches. For a document that I am writing, I want
 section and subsection numbers to display as follows

 A. Section 1
 A-1 Section 1, subsection 1

 B. Section 2

 and  so on. What is the magic command?

 This will give A, B etc. section numbers. I do not know about the rest

 \setupsection
   [section-3]
   [bodypartconversion=Character]


Thanks a lot. This gives me A, B, etc. I added

\setuphead[subsection]
   [separator=-]

to get a dash between the section number and subsection. In the 
context manual, separator is not documented in \setuphead but rather 
in \setupheads. I just tried it, crossed my fingers and it worked :)

Thanks,
Aditya
-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re[2]: [NTG-context] No partial contents for parts after the first

2005-11-26 Thread Giuseppe Bilotta
Friday, November 25, 2005 Giuseppe Bilotta wrote:

 Thursday, November 24, 2005 Giuseppe Bilotta wrote:

 I'm using the latest ConTeXt reported here, and I'm noticing
 that partial contents for the second, third etc part are not
 available. I have a bunch of files each of which goes like

 \part{some part}

 Some text (not always)

 \placecontent

 \chapter{some chapter}

 Each of this file is \input from the master file. However,
 only in the first part you actually see the (part-specific)
 content: every other part reports

 system  : part,chapter,section,subsection not found/processed


 The setup for the contents is as follows:

 \setupcombinedlist[content]
   [interaction=all,
partnumber=no,
alternative=c,
level=subsection]

 \setuphead[part][alternative=middle,placehead=yes,resetnumber=no]

 The problem is the 'resetnumber': if I take that off,
 everything works perfectly.

 I've been debugging this, and the reason for the thing not
 coming up for parts after the first is that when
 resetnumber=no the current level is not properly detected:
 in one case you get

 \currentlevel -:1

 in the other

 \currentlevel -:2:2:4:2

 Which is obviously wrong. Indeed, the problem is here:

 \listentry{part}{1}{1}{Introduction}{2::1:0:0:0:0:0:0::7}{8}
 \listentry{chapter}{2}{1}{Presentation}{2::1:1:0:0:0:0:0::8}{9}
 \listentry{section}{3}{1.1}{History and
 motivation}{2::1:1:1:0:0:0:0::8}{9}
 \listentry{chapter}{11}{2}{The
 basics}{2::1:2:0:0:0:0:0::12}{13}
 \listentry{section}{12}{2.1}{Notation}{2::1:2:1:0:0:0:0::12}{13}
 (more stuff)
 \listentry{subsection}{78}{2.4.2}{Scaling the
 coordinate system}{2::1:2:4:2:0:0:0::31}{32}
 \listentry{part}{79}{2}{Mathematical
 tools}{2::2:2:4:2:0:0:0::34}{35}
 \listentry{chapter}{82}{3}{Bézier cubic
 analysis}{2::2:3:0:0:0:0:0::35}{36}

 OOOPSIE! Since resetnumber=no, the listentry keeps the old
 settings for chapter, section  the like. This is obviously
 wrong. Even if the number is not reset, the sectionformat
 *must* be reset, since at the beginning of the new
 higher section(level) you are not in the previous one
 anymore. So for example when starting a new part (with
 resetnumber=no), and until
 the first chapter of the new part is started we are in
 chapter 0 for that part, not in chapter
 'last-chapter-from-previous-part'.

 Can this be fixed?


Ok, I came up with a solution that seems to work:

\def\definesection[#1]%
  {\doifundefined{\??se#1}
 {\doifelsenothing\firstsection
{\def\firstsection{#1}%
 \setevalue{\??se#1\c!before}{\v!text}%
 \setevalue{\??se\v!text\c!after}{#1}}
{\setevalue{\??se\commalistelement\c!after}{#1}%
 \setevalue{\??se#1\c!before}{\lastsection}%
 \setevalue{\??se\lastsection\c!after}{#1}}%
  \advance\nofsections \plusone
  \setevalue{\??se#1\c!level}{\the\nofsections}%
  \letvalue{\??se#1\c!after}\empty
  \setvalue{\e!next#1}{\@@nextsectionnumber{#1}}%
  \setvalue{#1\c!number}{\@@longsectionnumber{#1}}%
  \setvalue{#1\s!format}{\@@longformatnumber{#1}}%
  \setevalue{\??by#1}{#1}%
  \setevalue{\??by\v!by#1}{#1}%
  \makecounter{\??se#1}%
  \makecounter{\??se lastvalueof#1}% GB
  \edef\lastsection{#1}%
  \setvalue{\??sk#1}{#1}%
  \letvalue{\??se#1\c!marking}\empty
  \setupsection[#1][\c!previousnumber=\v!yes]}}%

% New command preserves the value of the next sectionlevel
% when resetnumber=no

\def\checkpreservevalueafter#1%
  {\ifnum\getvalue{\??se#1\c!level}\the\nofsections
 \edef\preservedsection{\getvalue{\??se#1\c!after}}%
 \ifconditional\@@resetsubheadnumbers
   \setcounter{\??se lastvalueof\preservedsection}%
  {0}%
 \else
   \setcounter{\??se lastvalueof\preservedsection}%
  {\countervalue{\??se\preservedsection}}%
 \fi
   \fi}

\def\@@setsectionnumber#1#2%
  {\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean
   \setcounter{\??se#1}{#2}%
   \checkpreservevalueafter{#1}
   \resetsectioncounters{#1}
   \checkpagecounter}

\def\@@nextsectionnumber#1%
  {\letgvalueempty{\??se#1\s!start}% signal i.p.v. boolean
   \ifnum\countervalue{\??se lastvalueof#1}\zerocount
 \setcounter{\??se#1}{\countervalue{\??se lastvalueof#1}}
 \setcounter{\??se lastvalueof#1}{0}
   \fi
   \pluscounter{\??se#1}%
   \checkpreservevalueafter{#1}
   \resetsectioncounters{#1}
   \checkpagecounter}

This has been tested in a fairly complex document (some
levels with resetnumber=no, some with the usual resetnumber;
sectionblocks etc). It works, and fixes the placecontent not
working. Will this go into mainline?

-- 
Giuseppe Oblomov Bilotta

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Getting ToC to match page numbering

2005-08-01 Thread Duncan Hothersall
I have three issues where page number formatting in the table of
contents is wrong compared to the pages themselves:

1. The separator character in the actual pagenumbers is /. In the ToC
it displays as a -.

2. I used left=A on the pagenumbering command in the appendices
because appendices are numbered A1, A2 etc. This gives the required
output for the actual pagenumbers, but there is no 'A' prefix in the ToC.

3. Similarly in the backmatter I have added a 'I/' prefix to the
pagenumber (left={I/}), which works on the pages but is not reflected
in the ToC.

The overall question is how to get each of these page numbering features
repeated in the table of contents?

Thanks. Minimal file follows.

Duncan



%% Tested on live.contextgarden
\setupoutput[pdftex]
%% change appendix numbering from Character to numbers
\setupsection[section-2][appendixconversion=numbers]
%% define new chapter-like heads for different sections
\definehead[Frontchapter][chapter]
\definehead[Appchapter][chapter]
\definehead[Backchapter][chapter]
%% set up individual content lists and labels
\setuplist[Frontchapter][pagenumber=yes]
\setuplabeltext[en][chapter={Module }]
\setuplist[chapter][pagenumber=yes,chapternumber=yes,label=yes]
\setuplabeltext[en][Appchapter={Appendix }]
\setuplist[Appchapter][pagenumber=yes,chapternumber=yes,label=yes]
\setuplist[Backchapter][pagenumber=yes]
%% set up the combined list
\definecombinedlist[Xontents]
[part,Frontchapter,chapter,Appchapter,Backchapter,section]
[level=section,criterium=local]
\setupcombinedlist[Xontents][alternative=b,aligntitle=yes,distance=4em]
%% page numbering is output using the explicit \completepagenumber
%% command in the footer because the final output has rather
%% complicated footers which incorporate the page number.
\setupfootertexts[text]
[][{\inframed{\kern.3em\completepagenumber\kern.3em}}]
[][{\inframed{\kern.3em\completepagenumber\kern.3em}\hfill}]
\starttext
\startfrontmatter
%% page numbering is set up for each section
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=,chapternumber=no,partnumber=no,conversion=romannumerals]
\title{Contents}
\placecombinedlist[Xontents]
\Frontchapter{Test Intro}
\dorecurse{3}{\input tufte\par}
\stopfrontmatter
\startbodymatter
%% for the body and appendices we prefix the chapternumber and a '/'
\setuppagenumbering[state=start,alternative={singlesided,doublesided},location=,
way=bychapter,partnumber=no,chapternumber=yes,numberseparator={/}]
\chapter{Test Chapter}
\dorecurse{3}{\input tufte\par}
\chapter{Another Test Chapter}
\dorecurse{3}{\input tufte\par}
\stopbodymatter
\startappendices
\setuppagenumbering[state=start,alternative={singlesided,doublesided},location=,
way=bychapter,partnumber=no,left=A,chapternumber=yes,numberseparator={/}]
\Appchapter{Test Appendix}
\dorecurse{3}{\input tufte\par}
\stopappendices
\startbackmatter
%% for the backmatter we just prefix I/ (it's going to be the index)
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=,way=bychapter,left={I/}]
\setuppagenumber[number=1]
\Backchapter{Index}
\dorecurse{3}{\input tufte\par}
\stopbackmatter
\stoptext


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Getting ToC to match page numbering

2005-08-01 Thread Hans Hagen

Duncan Hothersall wrote:


I have three issues where page number formatting in the table of
contents is wrong compared to the pages themselves:
 

i admit that this is a bit tricky; has to do with how numbers are used 
for selective purposed; maybe i'll rewrite that part some day (no need 
to be efficient nowadays)



1. The separator character in the actual pagenumbers is /. In the ToC
it displays as a -.
 


\start
\setuppagenumbering[numberseparator=/]
\placecombinedlist[Xontents]
\stop


2. I used left=A on the pagenumbering command in the appendices
because appendices are numbered A1, A2 etc. This gives the required
output for the actual pagenumbers, but there is no 'A' prefix in the ToC.
 

indeed, since left/right is cosmetics an dit's easier to add that than 
to remov eit when you dont wan it, so:


\setuplist[Appchapter][pagecommand=A]

% or cleaner: pagecommand=\AppPrefix and \def\AppPrefix#1{A\enspace#1}


3. Similarly in the backmatter I have added a 'I/' prefix to the
pagenumber (left={I/}), which works on the pages but is not reflected
in the ToC.
 


now you know how to do that

wikiable:


%% Tested on live.contextgarden
\setupoutput[pdftex]
%% change appendix numbering from Character to numbers
\setupsection[section-2][appendixconversion=numbers]
%% define new chapter-like heads for different sections
\definehead[Frontchapter][chapter]
\definehead[Appchapter][chapter]
\definehead[Backchapter][chapter]
%% set up individual content lists and labels
\setuplist[Frontchapter][pagenumber=yes]
\setuplabeltext[en][chapter={Module }]
\setuplist[chapter][pagenumber=yes,chapternumber=yes,label=yes]
\setuplabeltext[en][Appchapter={Appendix }]
\setuplist[Appchapter][pagenumber=yes,chapternumber=yes,label=yes]
\setuplist[Backchapter][pagenumber=yes]
%% set up the combined list
\definecombinedlist[Xontents]
   [part,Frontchapter,chapter,Appchapter,Backchapter,section]
[level=section,criterium=local]
\setupcombinedlist[Xontents][alternative=b,aligntitle=yes,distance=4em]
%% page numbering is output using the explicit \completepagenumber
%% command in the footer because the final output has rather
%% complicated footers which incorporate the page number.
\setupfootertexts[text]
[][{\inframed{\kern.3em\completepagenumber\kern.3em}}]
[][{\inframed{\kern.3em\completepagenumber\kern.3em}\hfill}]
\starttext
\startfrontmatter
%% page numbering is set up for each section
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=,chapternumber=no,partnumber=no,conversion=romannumerals]
\title{Contents}
\placecombinedlist[Xontents]
\Frontchapter{Test Intro}
\dorecurse{3}{\input tufte\par}
\stopfrontmatter
\startbodymatter
%% for the body and appendices we prefix the chapternumber and a '/'
\setuppagenumbering[state=start,alternative={singlesided,doublesided},location=,
way=bychapter,partnumber=no,chapternumber=yes,numberseparator={/}]
\chapter{Test Chapter}
\dorecurse{3}{\input tufte\par}
\chapter{Another Test Chapter}
\dorecurse{3}{\input tufte\par}
\stopbodymatter
\startappendices
\setuppagenumbering[state=start,alternative={singlesided,doublesided},location=,
way=bychapter,partnumber=no,left=A,chapternumber=yes,numberseparator={/}]
\Appchapter{Test Appendix}
\dorecurse{3}{\input tufte\par}
\stopappendices
\startbackmatter
%% for the backmatter we just prefix I/ (it's going to be the index)
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=,way=bychapter,left={I/}]
\setuppagenumber[number=1]
\Backchapter{Index}
\dorecurse{3}{\input tufte\par}
\stopbackmatter
\stoptext
 



-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Getting ToC to match page numbering

2005-08-01 Thread Duncan Hothersall
 \start
 \setuppagenumbering[numberseparator=/]
 \placecombinedlist[Xontents]
 \stop

Ah, I see, \placecombinedlist uses the value of numberseparator active
at the time it is called! Thanks.

 indeed, since left/right is cosmetics an dit's easier to add that than
 to remov eit when you dont wan it, so:
 
 \setuplist[Appchapter][pagecommand=A]
 
 % or cleaner: pagecommand=\AppPrefix and \def\AppPrefix#1{A\enspace#1}

I had experimented with that, and it certainly works (I chose the second
option, but dropped the \enspace), BUT... the page numbers column in the
table of contents is now mis-aligned. I've pasted my revised minimal
test file below, and if you run that you can see that things have gone
squiggly. The frontmatter and appendices are aligned further to the
right than the chapters and backmatter. Weird.

I looked at the source and as far as I can tell the default pagecommand
is just \strut#1, so I don't understand how alignment has been changed
by redefining it, but it certainly seems to have.

 wikiable:

Will do; would be great to fix (or at least understand) the alignment
before I do though, for completeness. :-)

Thanks,

Duncan


Minimal test, now mostly working thanks to Hans:


%% Tested on live.contextgarden
\setupoutput[pdftex]
%% change appendix numbering from Character to numbers
\setupsection[section-2][appendixconversion=numbers]
%% define new chapter-like heads for different sections
\definehead[Frontchapter][chapter]
\definehead[Appchapter][chapter]
\definehead[Backchapter][chapter]
%% set up individual content lists and labels
\setuplist[Frontchapter][pagenumber=yes]
\setuplabeltext[en][chapter={Module }]
\setuplist[chapter][pagenumber=yes,chapternumber=yes,label=yes]
\setuplabeltext[en][Appchapter={Appendix }]
\def\AppPrefix#1{A#1}
\setuplist[Appchapter][pagenumber=yes,chapternumber=yes,label=yes,pagecommand=\AppPrefix]
\def\BackPrefix#1{I/#1}
\setuplist[Backchapter][pagenumber=yes,pagecommand=\BackPrefix]
%% set up the combined list
\definecombinedlist[Xontents]
[part,Frontchapter,chapter,Appchapter,Backchapter,section]
[level=section,criterium=local]
\setupcombinedlist[Xontents][alternative=b,aligntitle=yes,distance=4em]
%% page numbering is output using the explicit \completepagenumber
%% command in the footer because the final output has rather
%% complicated footers which incorporate the page number.
\setupfootertexts[text]
[][{\inframed{\kern.3em\completepagenumber\kern.3em}}]
[][{\inframed{\kern.3em\completepagenumber\kern.3em}\hfill}]
\starttext
\startfrontmatter
%% page numbering is set up for each section
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=,chapternumber=no,partnumber=no,conversion=romannumerals]
\title{Contents}
\setuppagenumbering[numberseparator=/]
\placecombinedlist[Xontents]
\Frontchapter{Test Intro}
\dorecurse{3}{\input tufte\par}
\stopfrontmatter
\startbodymatter
%% for the body and appendices we prefix the chapternumber and a '/'
\setuppagenumbering[state=start,alternative={singlesided,doublesided},location=,
way=bychapter,partnumber=no,chapternumber=yes,numberseparator={/}]
\chapter{Test Chapter}
\dorecurse{3}{\input tufte\par}
\chapter{Another Test Chapter}
\dorecurse{3}{\input tufte\par}
\stopbodymatter
\startappendices
\setuppagenumbering[state=start,alternative={singlesided,doublesided},location=,
way=bychapter,partnumber=no,left=A,chapternumber=yes,numberseparator={/}]
\Appchapter{Test Appendix}
\dorecurse{3}{\input tufte\par}
\stopappendices
\startbackmatter
%% for the backmatter we just prefix I/ (it's going to be the index)
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=,way=bychapter,left={I/}]
\setuppagenumber[number=1]
\Backchapter{Index}
\dorecurse{3}{\input tufte\par}
\stopbackmatter
\stoptext


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


  1   2   >