Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-17 Thread Alan BRASLAU
On Tuesday 16 February 2010 23:21:31 Hans Hagen wrote:
 On 16-2-2010 22:39, Mojca Miklavec wrote:
  While you keep Hans and others busy, here's another thing that puzzled
  me:
 
  \definehead[appendix][chapter]
  \definehead[subappendix][section]
 
  \starttext
 
  \startappendices
  \appendix{one}
  \subappendix{one.one}
  \appendix{two}
  \subappendix{two.one}
  \stopappendices
 
  \stoptext
 
  In mkii it gives A.1 and B.1 for numbering, but in mkiv it gives A.1
  and B.2 (it forgets to reset the counter for subappendix).
 
 \definestructureresetset  [\v!appendix:\s!default] [] [1] % why was
 this 0

Why \definehead[appendix][chapter]?
Why not use \chapter{} and \section{}
within \startappendices\stopappendices?

\chapter{} and \section{} get put into the TOC.
 (However, there is a bug and they do not get the proper label:
  \setlabeltext [appendix=Appendix ] in the head;
  \setlabeltext [chapter=Chapter ] in the list.)

\appendix{} does not get put into the TOC
so it works like \title{} rather than \chapter{}

Another (related) bug:
within \startbackmatter\stopbackmatter
\chapter{} (also coming from \completecontent)
indeed does not add the labeltext to the head (and are unnumbered)
but does add the \setlabeltext [chapter=Chapter ] to the TOC yielding:
Chapter  References
Chapter  Index
Chapter  Table of Contents

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

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


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-17 Thread Mojca Miklavec
On Wed, Feb 17, 2010 at 18:44, Alan BRASLAU wrote:

 Why \definehead[appendix][chapter]?
 Why not use \chapter{} and \section{}
 within \startappendices\stopappendices?

I don't remember exactly (and it was bug anyway even if my code could
have been optimized), but I wanted to have different font size,
different position, different placement in TOC (Appendix A - Title
instea of just A Title), different page breaking, ... Though I still
didn't figure out how to have Appendix A - also printed out in TOC
(instead of plain A).

So I simply defined another type of section (faster solution than
figuring out how to change appearance of chapter in appendices only).

 \chapter{} and \section{} get put into the TOC.
  (However, there is a bug and they do not get the proper label:
  \setlabeltext [appendix=Appendix ] in the head;
  \setlabeltext [chapter=Chapter ] in the list.)

 \appendix{} does not get put into the TOC
 so it works like \title{} rather than \chapter{}

I defined the second list for that purpose (really ugly, but the
fastest way to get it done). But there was a tiny problem with that as
well (mkii more problematic) - I didn't manage to get the spacing
between two consecutive lists right. For example (compare mkii and
mkiv):

\definecombinedlist
[contenta]
[chapter,section]
[level=section,
 criterium=all,alternative=c,aligntitle=yes,width=2.5em]

\setuplist
[chapter]
[style=bold]

\setupwhitespace[big]

\starttext

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]
\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\blank % no effect in mkii at all - remains too narrow

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\blank\blank[big]

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\crlf % too big

\placecontenta [alternative=c,aligntitle=yes,width=2.5em]

\chapter{a}
\section{a.1}
\section{a.2}
\chapter{b}
\section{b.1}
\section{b.2}

\stoptext

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] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-17 Thread Hans Hagen

On 17-2-2010 22:30, Mojca Miklavec wrote:


I defined the second list for that purpose (really ugly, but the
fastest way to get it done). But there was a tiny problem with that as
well (mkii more problematic) - I didn't manage to get the spacing
between two consecutive lists right. For example (compare mkii and
mkiv):


concerning tricks ... today i defined the hybrids between chapter/title, 
section/subject etc


\definehead[chaptle]  [chapter]
\definehead[suction]  [section]
\definehead[subsuction]   [subsection]
\definehead[subsubsuction][subsubsection]

\setuphead
  [chaptle,suction,subsuction,subsubsuction]
  [incrementnumber=list]

no numbers but title goes to toc.

I might even add them to the core some day

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


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-16 Thread Mojca Miklavec
On Mon, Feb 15, 2010 at 16:31, Alan BRASLAU wrote:
 1. Setting the labeltext appendix=Appendix  with \startappendices
   is broken in mkiv; somewhat works in mkii. What am I doing wrong?
 2. How to set the label correctly in the TOC?

 Alan

 Minimal example

 \setuplabeltext [chapter=Chapter ]   % with trailing space; blank by default
 \setuplabeltext [appendix=Appendix ] % with trailing space; blank by default
 \setuphead [chapter] [placehead=yes]
 \setuplist [chapter] [label=yes,width=5em,alternative=c]

 \starttext

 \startfrontmatter
 \completecontent
 \stopfrontmatter

 \startbodymatter
 \chapter {one}
 \input knuth
 \stopbodymatter

 \startappendices
 \chapter {first}
 \input knuth
 \stopappendices

 \stoptext

While you keep Hans and others busy, here's another thing that puzzled me:

\definehead[appendix][chapter]
\definehead[subappendix][section]

\starttext

\startappendices
\appendix{one}
\subappendix{one.one}
\appendix{two}
\subappendix{two.one}
\stopappendices

\stoptext

In mkii it gives A.1 and B.1 for numbering, but in mkiv it gives A.1
and B.2 (it forgets to reset the counter for subappendix).

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] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-16 Thread Hans Hagen

On 16-2-2010 22:39, Mojca Miklavec wrote:

\definehead[appendix][chapter]
\definehead[subappendix][section]

\starttext

\startappendices
\appendix{one}
\subappendix{one.one}
\appendix{two}
\subappendix{two.one}
\stopappendices

\stoptext


hm, looks like startappendices has no proper reset list
--

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


Re: [NTG-context] \setuplabeltext [appendix=Appendix ] broken mkiv

2010-02-16 Thread Hans Hagen

On 16-2-2010 22:39, Mojca Miklavec wrote:


While you keep Hans and others busy, here's another thing that puzzled me:

\definehead[appendix][chapter]
\definehead[subappendix][section]

\starttext

\startappendices
\appendix{one}
\subappendix{one.one}
\appendix{two}
\subappendix{two.one}
\stopappendices

\stoptext

In mkii it gives A.1 and B.1 for numbering, but in mkiv it gives A.1
and B.2 (it forgets to reset the counter for subappendix).


\definestructureresetset  [\v!appendix:\s!default] [] [1] % why was 
this 0


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


Re: [NTG-context] last chapter number

2010-01-17 Thread Andreas Harder

Am 17.01.2010 um 09:13 schrieb Wolfgang Schuster:

 
 Am 16.01.2010 um 23:08 schrieb Andreas Harder:
 
 can you try \convertedstructurecounter[chapter][type=last]
 
 Hello Wolfgang,
 
 I tried, but it only outputs nothing visible.
 
 Sorry, my fault. Section numbering use their own system to save and get the 
 numbers.
 
 What you can do is to save the number of the last chapter at the end of the 
 document
 with two pass data (\definetwopasslist) and use the result in the second run 
 or you
 what for a solution from Hans.

Thank you Wolfgang! You pointed me to \definetwopasslist and that brought me to 
the following solution (without \definetwopasslist):

\newcounter\ChapNum
\def\NofChaps{0}

\definehead
  [chapter]
  [before=\increment\ChapNum,
after=\savecurrentvalue\NofChaps{\countervalue{ChapNum}}]

\starttext
Dieses Dokument besteht aus \NofChaps\ Kapiteln.
\dorecurse{9}{\chapter{Kapitel #1}}
\stoptext

Nonetheless the needed information is already present even more if one uses a 
table of contents …


Andreas
___
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] Removing vertical space before heading within framed layer

2009-12-26 Thread luigi scarso
On Sat, Dec 26, 2009 at 10:41 PM, Oliver Buerschaper
oliver.buerscha...@mpq.mpg.de wrote:
 slowly getting to grips with layer etc. However, some vertical space at the 
 top of my framed layer appears whenever the first element is a heading:

 you can find in the details manual better ways to set heading texts with a 
 layer

 Well, actually I don't want to get a fancy heading using layers but rather 
 I'd like to use layers like DTP text frames and fill them with (unnumbered) 
 headings, paragraphs, formulas etc. Just like small pages I can position on 
 the parent page arbitrarily.

 The issue arises whenever a heading (say \subject) happens to be the first 
 piece of material I put into a layer. Any ideas to get rid of the leading 
 vertical space?

 Actually, instead of a true heading I'd probably be fine with another command 
 that gives me consistent style, line space, alignment, leading and trailing 
 vertical space etc. After all, I'm going to use this in a poster, so I won't 
 need an entry in the TOC, nor any markers, anchors to the heading etc.

my 1cent

\definelayer
   [text]
   [width=\paperwidth,
height=\paperheight]

\setupbackgrounds
   [page]
   [background=text]
\definehead[Subject][section]
\setuphead[Subject][before=\vskip-2pt,number=no]

\startbuffer[test]
\Subject{Lorem ipsum dolor sit amet, consectetur, sadipisci\dots}
\input zapf
\stopbuffer

\setuphead
   [subject]
   [before=,
after=,
align=right]



\starttext


\setlayerframed
   [text]
   [x=1cm,
y=3cm]
   [width=7cm,
align=normal,
offset=overlay]
   {\getbuffer[test]}

\page[empty]


\stoptext

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


Re: [NTG-context] A few questions

2009-11-13 Thread Bernhard Rosensteiner
Hello,

following the new structure code the answer for your second question is:

\definestructureprefixset[figureprefix][section-3]
\definestructureseparatorset [septest][--,--,--,---][?]
\setupstructurecountering[way=bysection, prefixset=figureprefix, 
prefixseparatorset=septest, prefixconnector=--]

explanation: with definestructureprefixset you declare a new prefix which is 
always inserted when it is invoked with the prefixset key (in this case 
section-3 is the section while section-2 is for example the chapter and so 
on... look in the source code for more) you can have 
\definestructureprefixset[figureprefix][section-2,section-3,section-4] for 
example and the prefix gets inserted at the right place in your figure number. 
\definestructureseparatorset [septest][--,--,--,---][?] works similar (the [?] 
is in this case the fallback when no specific separator is defined for that 
position). the prefixconnector is the character which gets inserted between the 
figure number and the rest of the prefixes. All that prefixthings you can also 
do with pagenumbers and section numbers...

i don´t know if this code will see some changes in newer context mkiv versions 
because i think it is still experimental but at the moment it works.

third question: you could define a new head with \definehead then it gets a new 
counter. When you only want that a specific sectionnumber is different from the 
others than do: \startsection [title=dritte section, ownnumber=243]

first question: i don´t know because i don´t needed it.

hope this helps

best regards
Bernhard


Am 13.11.2009 um 01:10 schrieb Vyatcheslav Yatskovsky:

 Hello,
 
 I have a few (I suppose easy) questions:
 
 1) asking about this again and again... how to setup itemization so that the 
 first line were indented too?
 
 2) how to setup figure captions so that  they include section number, like
 sectionNumber.figureNumber
 (no sub-sub-subsections)?
 
 3) How to start section numbering from, say, second section?
 
 Regards,
 Vyatcheslav
 ___
 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] Define exercise captions

2009-11-01 Thread Vyatcheslav Yatskovsky

Hello,

I need to define a Exercise command that will enumerate exercises and provide
  captions.

  For example,

  \exercise{Conversion from hex to dec}

  should produce

  Exercise 1.1. Conversion from hex to dec.

  What is the best way to achieve that? Use \definehead or another command?
 

\defineenumeration[exercise][title=yes,way=bysection]
   


Thank you Aditya, but the result is rather shoking )
Please, try

\starttext
\defineenumeration[exercise][title=yes, text=Вправа, way=bysection, 
width=broad]


\exercise{Розрахунок кривої, яка з'єднує три точки на площині}
\stoptext


The Вправа is putted twice, next time inside some strange brackets. 
The text gets out of the page.



How to setup so that numeration will be done by subsection (1.1, 1.2, etc.)?

Reards,
Vyatcheslav


___
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] Define exercise captions

2009-11-01 Thread Aditya Mahajan

On Sun, 1 Nov 2009, Vyatcheslav Yatskovsky wrote:


Hello,
I need to define a Exercise command that will enumerate exercises and 

provide

  captions.

  For example,

  \exercise{Conversion from hex to dec}

  should produce

  Exercise 1.1. Conversion from hex to dec.

  What is the best way to achieve that? Use \definehead or another 

command?



\defineenumeration[exercise][title=yes,way=bysection]



Thank you Aditya, but the result is rather shoking )
Please, try

\starttext
\defineenumeration[exercise][title=yes, text=Вправа, way=bysection, 
width=broad]


\exercise{Розрахунок кривої, яка з'єднує три точки на площині}
\stoptext


The Вправа is putted twice, next time inside some strange brackets. 
The text gets out of the page.


Looks like a bug in mkiv. Hans, text need to be handled differently in 
descriptions and enumerations.



How to setup so that numeration will be done by subsection (1.1, 1.2, etc.)?


prefix=yes,

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

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


[NTG-context] Define exercise captions

2009-10-31 Thread Vyatcheslav Yatskovsky

Hello,

I need to define a Exercise command that will enumerate exercises and 
provide captions.


For example,

\exercise{Conversion from hex to dec}

should produce

Exercise 1.1. Conversion from hex to dec.

What is the best way to achieve that? Use \definehead or another command?

Best regards,
Vyatcheslav
___
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] embed fonts

2009-10-17 Thread R. Bastian
 map file: t5-base
{/usr/local/texlive/2007/texmf-dist/fonts/map/pdftex/context/t5-base.map}
fonts   : using map file: original-ams-base
{/usr/local/texlive/2007/texmf-dist/fonts/map/pdftex/context/original-ams-base.
map}
fonts   : using map file: original-ams-euler
{/usr/local/texlive/2007/texmf-dist/fonts/map/pdftex/context/original-ams-euler
.map}
fonts   : using map file: original-public-lm
{/usr/local/texlive/2007/texmf-dist/fonts/map/pdftex/context/original-public-lm
.map} [1.1] [2.2]
systems : end file vorlage at line 54
system  : cont-err loaded
(/usr/local/texlive/2007/texmf-dist/tex/context/base/cont-err.tex
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
) ) 
Here is how much of TeX's memory you used:
 1482 strings out of 57405
 25409 string characters out of 535698
 4598478 words of memory out of 5526626
 41227 multiletter control sequences out of 1+5
 130420 words of font info for 64 fonts, out of 120 for 2000
 192 hyphenation exceptions out of 8191
 47i,18n,56p,254b,507s stack positions out of 5000i,500n,6000p,20b,5000s
{/usr/local/texlive/2007/texmf-dist/fonts/enc/dvips/lm/lm-ec.enc}/usr/local
/texlive/2007/texmf-dist/fonts/type1/public/lm/lmss10.pfb
Output written on vorlage.pdf (2 pages, 25377 bytes).
PDF statistics:
 17 PDF objects out of 1000 (max. 8388607)
 11 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 1 (max. 1000)

\enableregime[utf]
\parindent 0mm
\parskip 6mm

%\showframe
\setupbodyfont[sansserif, 10pt]
\definepapersize[monpapier][width=210mm,height=297mm]
\setuppapersize[monpapier][monpapier] % A4
\setuplayout[textwidth=16cm, textheight=25cm, topspace=1cm, leftmargin=5mm, rightmargin=5mm, leftmargindistance=3mm]
\setupheadertexts[chapter]
% marginedge pousse vers le milieu
\setuppagenumbering[alternative=doublesided,location={footer,inleft}]
\language[fr]
\setuphead[chapter][page=no, textstyle=cap, numberstyle=bold, after={\blank\hrule\blank}]
\setuphead[title][after={\blank\hrule\blank}]
\def\auteur#1{\hfill#1\blank}
\definehead[sujet][subject]
\setuphead[sujet][textstyle=bold]

\definehead[masection][section]
\setuphead[masection][textstyle=bold, 
  %before=\noindent\hairline, 
  alternative=inmargin,
  after=\nowhitespace\hairline]


\starttext
\title[nmkk]{Neue Methoden der Klangkonstruktion}
\auteur{René Bastian -- 26.10.2009}

Betrachtet man die Landschaft der elektro-akustischen Musik in diesen
digitalen Zeiten, so kann man oder darf noch feststellen, dass sie
entweder brach liegt oder, dass sie, genauso wie immense
Landstriche, digital sterilisert wurde.  

Für Industrie \ Handel, hinter dem Vorwand von Europa \ Kultur,
ist das Ziel erreicht. Der Restbestand an Musikkritik ist so 
vor der Musik geflohen, dass die Landschaft der elektro-akustischen Musik
fast widerstandslos von Industrie \ Handel bewirtschaftet werden.
Auch wenn sich zur Zeit fast kein Gedankchen muckst, besteht die
Möglichkeit eines Widerstandes gegen diese Sterilisierung
in der Konjunktion von offener Algorithmik und 
experimenteller Musik.

Um die ontologische und gerontologische Entsorgung dieser
Ideologien zu vollziehen, heisst es zuerst die Grundlagen der
Digitalisierung mit ihrer impliziten Ideologie zu konfrontieren und
dann daraus der experimentellen Musik neue Wege vorzuschlagen.



  
\stoptext
{\it beste möglich Welt}
%Alles scheint bestens, wie auch der politische Butter.
%
%Im digitalen Umfeld sind neue Methoden der Klangkonstruktion
%gefragt. Dies ist nur möglich indem die Grundlagen der Digitalisierung
%mit ihrer impliziten Ideologie konfrontiert werden. TINA,
%{\it There Is No Alternative}, ist ein fester Bestandsteil dieser
%Ideologien. 
___
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 setup

2009-10-17 Thread Janneman

Martin Scholz skrev:

Am Fri, 16 Oct 2009 21:06:01 +0200 schrieb Mojca Miklavec:

  

On Tue, Oct 13, 2009 at 19:05, Martin Scholz wrote:


Hi List,

I'm trying to setup a new document in Context, and a newbee, so I now
want to setup the section head as following

§ Secnum - Sectitle

Where the § Secnum part is set up in the margin and the Sectitle over
the Text is there any solution how to get it done?
  

Not to be taken too seriously: you need to ask a more complex
(challenging) questions to get a better chance for an answer :) :) :)

It's best to study chapter 8 of cont-eni.pdf from pragma-ade.com to get
the idea of how to handle section modifications.

Here's one possible solution:

\def\mynumbercommand#1{§ #1 --}
\setuphead
[section]
[numbercommand=\mynumbercommand,
 alternative=inmargin]

You may get a bit too big distance, but you can do one of the following
tricks: a) shorten the distance between margin and text b) instead of
just -- you can use something like
\hbox to 0.2mm{--\hss}
to fake negative spacing or add explicit negative kerning.

Mojca



Hi Mojca,

I'm a type of learner by reading the sourcecode, so it is easier for me 
if I see examples in the code then reading manuals... thanks for you 
help, will try your example later that day...


Thanks and greetings

Martin

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

Maybe a more simplified solution

\definehead[paragraf][section]
\setuphead[paragraf][before= {\crlf \S},after=,style=bold]
% or style=something else

\starttext

\paragraf[ref]{Paragraf title}

\input tufte

\stoptext


Cheers

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

2009-10-17 Thread Wolfgang Schuster


Am 17.10.2009 um 16:58 schrieb Janneman:


Maybe a more simplified solution

\definehead[paragraf][section]
\setuphead[paragraf][before= {\crlf \S},after=,style=bold]


don't do this, before and after are meant for vertical material like  
\blank or \thinrule etc.


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 setup

2009-10-17 Thread Janneman

Janneman skrev:

Martin Scholz skrev:

Am Fri, 16 Oct 2009 21:06:01 +0200 schrieb Mojca Miklavec:

 

On Tue, Oct 13, 2009 at 19:05, Martin Scholz wrote:
   

Hi List,

I'm trying to setup a new document in Context, and a newbee, so I now
want to setup the section head as following

§ Secnum - Sectitle

Where the § Secnum part is set up in the margin and the Sectitle over
the Text is there any solution how to get it done?
  

Not to be taken too seriously: you need to ask a more complex
(challenging) questions to get a better chance for an answer :) :) :)

It's best to study chapter 8 of cont-eni.pdf from pragma-ade.com to get
the idea of how to handle section modifications.

Here's one possible solution:

\def\mynumbercommand#1{§ #1 --}
\setuphead
[section]
[numbercommand=\mynumbercommand,
 alternative=inmargin]

You may get a bit too big distance, but you can do one of the following
tricks: a) shorten the distance between margin and text b) instead of
just -- you can use something like
\hbox to 0.2mm{--\hss}
to fake negative spacing or add explicit negative kerning.

Mojca



Hi Mojca,

I'm a type of learner by reading the sourcecode, so it is easier for 
me if I see examples in the code then reading manuals... thanks for 
you help, will try your example later that day...


Thanks and greetings

Martin

___ 

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
___ 

  

Maybe a more simplified solution

\definehead[paragraf][section]
\setuphead[paragraf][before= {\crlf \S},after=,style=bold]
% or style=something else

\starttext

\paragraf[ref]{Paragraf title}

\input tufte

\stoptext


Cheers

Janneman
___ 

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
___ 


Understood! ;-)

\definehead[paragraf][section]
\def\mynumbercommand#1{\bf{\S} #1 --}
\setuphead[paragraf][numbercommand=\mynumbercommand,alternative=inmargin]

\starttext

\paragraf[ref]{TEST}

\input tufte


\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] Section setup

2009-10-17 Thread Wolfgang Schuster


Am 17.10.2009 um 17:46 schrieb Janneman:


Understood! ;-)

\definehead[paragraf][section]
\def\mynumbercommand#1{\bf{\S} #1 --}


\define[1]\MyNumberCommand{§ #1 –} % let's use the right signs when  
possible :)


\setuphead[paragraf][numbercommand= 
\mynumbercommand,alternative=inmargin]


\setuphead[paragraf][numbercommand= 
\MyNumberCommand,numberstyle=bold,alternative=inmargin]


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 setup

2009-10-17 Thread Aditya Mahajan

On Sat, 17 Oct 2009, Janneman wrote:


\definehead[paragraf][section]
\def\mynumbercommand#1{\bf{\S} #1 --}
\setuphead[paragraf][numbercommand=\mynumbercommand,alternative=inmargin]

\starttext

\paragraf[ref]{TEST}

\input tufte


\stoptext


Another option:

\definehead[paragraph][section]
\setuphead[paragraph][alternative=inmargin]

\setuplabeltext[paragraph={{§ },{ –}}]

\starttext

\dorecurse{5}
{\paragraph{A repeated quote}
\input knuth \endgraf}

\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] Numbering of sub-header

2009-09-25 Thread Wolfgang Schuster


Am 23.09.2009 um 09:15 schrieb Flavien Lambert:

Dear all, I am using Mark IV from the minimals. I have a problem  
concerning the numbering fo my sub-header. I defined exercices in  
the following way :


% Titres
\setuphead[subject][textstyle={\bfc},align=left,after=\hairline]

% Commandes
\def\exnu#1{%
  \framed 
[width 
= 
1.5em 
,corner 
= 
06 
,background 
=color,backgroundcolor=myGray,foreground=color,foregroundcolor=white] 
{#1}%

}
\definehead[exercice][subsection]
\setuphead[exercice][textstyle={\bf},numberstyle={},numbercommand= 
\exnu]


A few months ago, when using Mark II, the numbering of exercice was  
continuous even if new sujects were introduced. But now, the  
numbering is reinitialized when I put a subject. Can I go back to  
the previous behaviour ?


Example!

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] Numbering of sub-header

2009-09-23 Thread Flavien Lambert
Dear all, I am using Mark IV from the minimals. I have a problem concerning
the numbering fo my sub-header. I defined exercices in the following way :

% Titres
\setuphead[subject][textstyle={\bfc},align=left,after=\hairline]

% Commandes
\def\exnu#1{%

\framed[width=1.5em,corner=06,background=color,backgroundcolor=myGray,foreground=color,foregroundcolor=white]{#1}%
}
\definehead[exercice][subsection]
\setuphead[exercice][textstyle={\bf},numberstyle={},numbercommand=\exnu]

A few months ago, when using Mark II, the numbering of exercice was
continuous even if new sujects were introduced. But now, the numbering is
reinitialized when I put a subject. Can I go back to the previous behaviour
?

Sincerely,

-- 
Flavien.

Quantum objects are completely crazy but, at least, they are all crazy in
the same way. R.P. Feynman.
___
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] Numbering of sub-header

2009-09-23 Thread Flavien Lambert
I condirmed that using MarkII of the minimals, numbering is continuous. Any
hint ?

2009/9/23 Flavien Lambert petit.lep...@gmail.com

 Dear all, I am using Mark IV from the minimals. I have a problem concerning
 the numbering fo my sub-header. I defined exercices in the following way :

 % Titres
 \setuphead[subject][textstyle={\bfc},align=left,after=\hairline]

 % Commandes
 \def\exnu#1{%

 \framed[width=1.5em,corner=06,background=color,backgroundcolor=myGray,foreground=color,foregroundcolor=white]{#1}%
 }
 \definehead[exercice][subsection]
 \setuphead[exercice][textstyle={\bf},numberstyle={},numbercommand=\exnu]

 A few months ago, when using Mark II, the numbering of exercice was
 continuous even if new sujects were introduced. But now, the numbering is
 reinitialized when I put a subject. Can I go back to the previous behaviour
 ?

 Sincerely,

 --
 Flavien.
 
 Quantum objects are completely crazy but, at least, they are all crazy in
 the same way. R.P. Feynman.




-- 
Flavien.

Quantum objects are completely crazy but, at least, they are all crazy in
the same way. R.P. Feynman.
___
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] Why are pretty printer names uppercased?

2009-08-26 Thread Hans Hagen

Matthijs Kooijman wrote:

Hi all,

according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:


because want uppercase

\startTEX
\stopTEX

\startMP
\stopMP

\startLUA
\stopLUA


  \installprettytype [PHP][PHP]

Referring to them should be uppercased as well:
  \definetyping[PHP]   [option=PHP]


defining indeed, as it is an instance, but option also accepts lowercase


However, the filename should be lowercase, e.g. pret-php.lua and the pretty
printer should register itself in lowercase as well:
buffers.newvisualizer(lua). The first thing that happens to the arguments of
installprettytype is to lowercase them, and every option= argument that points
to a pretty printer is lowercased by setvisualizer in lua before being used.


indeed. as i don't like casing in filenames, and function names


If everything is lowercased, why do we still recommend the arguments to
\installprettytype and option= to be uppercase? IMHO this makes things
confusing when trying to understand which PHP refers to which php or PHP in
the greater picture of things. 


because they generate commands and it's quite valid to say

\definetyping[myphp]

etc


Why not recommend people to use lowercase identifiers instead, since we're
changing everything into lowercase anyway? Or perhaps go a bit further and
remove the lowercasing code alltogether, since I don't see any real gain. If
the strings / filenames should just match exactly, things will get a lot more
predictable?


actually, the advice is that user definitions use uppercase

\definehead[MySection][section]

etc, just to avoid clashes with built in commands

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] Why are pretty printer names uppercased?

2009-08-26 Thread Matthijs Kooijman
Hi Hans,


 according to the wiki, and the current code, the arguments to
 \installprettytype should be uppercased. E.g.:

   \installprettytype [PHP][PHP]
 because want uppercase

 \startTEX
 \stopTEX

Well, those would be coming from the first argument of definetyping. AFAIU,
neither argument to installprettytype is related to these commands.

   \definetyping[PHP]   [option=PHP]

 indeed. as i don't like casing in filenames, and function names
Agreed, me neither.

 actually, the advice is that user definitions use uppercase

 \definehead[MySection][section]

 etc, just to avoid clashes with built in commands
That makes sense for commands, which is not what I'm proposing to change. I
would propose making it look like the following:

\installprettytype [php][php]
\definetyping  [PHP][option=php]

Here, the second php refers to pret-php.lua, the first and last php
refer to each other and to the php in newvisualizer(php).

The command defined is still \startPHP, but now the values that refer to other
lowercase things (filename, pretty printer name) are lowercase consistently.

How's this?

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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] Why are pretty printer names uppercased?

2009-08-26 Thread Hans Hagen

Matthijs Kooijman wrote:

Hi Hans,



according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:

  \installprettytype [PHP][PHP]

because want uppercase

\startTEX
\stopTEX


Well, those would be coming from the first argument of definetyping. AFAIU,
neither argument to installprettytype is related to these commands.



sure but they are somewhat related (also with the color palets then)


  \definetyping[PHP]   [option=PHP]



indeed. as i don't like casing in filenames, and function names

Agreed, me neither.


actually, the advice is that user definitions use uppercase

\definehead[MySection][section]

etc, just to avoid clashes with built in commands

That makes sense for commands, which is not what I'm proposing to change. I
would propose making it look like the following:

\installprettytype [php][php]
\definetyping  [PHP][option=php]

Here, the second php refers to pret-php.lua, the first and last php
refer to each other and to the php in newvisualizer(php).

The command defined is still \startPHP, but now the values that refer to other
lowercase things (filename, pretty printer name) are lowercase consistently.

How's this?


in order to get that working and remain compatible, we'd also need to 
redefine


\definepalet [TEXcolorpretty] [colorpretty]
\definepalet [TEXgraypretty]  [graypretty]

(ans use some nasty trickery to let texcolorpretty and TEXcolorpretty 
both be valid)


etc and as users themselves seldom see the low level definitions it's 
not worth the trouble


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
___


[NTG-context] referenced titles + special characters

2009-08-23 Thread Črt Gorup

Hi

I am having some problems with referenced titles and our special  
characters.


In my document I have the following definition - \mysection[pri:seed] 
{Priloga C: Tabela ovrednotenih MeSH označb}. Title is generally (in  
the table of contents and in the document) rendered fine, but when I  
use it as a reference -   glej \about[pri:seed], stran  
\at[pri:seed]   the output in the pdf is wrong -   glej »Priloga C:  
Tabela ovrednotenih MeSH oznaÄŊb«, stran 36. Does anybody have any  
idea how to fix it?


My settings which might have an influence to this problem:

\enableregime[utf8]
\mainlanguage[sl]
\definehead[mysection][section]
\setuphead [mysection][coupling=section,incrementnumber=list]
\setuphead[mysection][command=\MySectionStyle, header=high, style={}]
\def\MySectionStyle#1#2{
{\tfa#2}
}

Thanks, Crt

smime.p7s
Description: S/MIME cryptographic signature
___
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] referenced titles + special characters

2009-08-23 Thread Mojca Miklavec
On Sun, Aug 23, 2009 at 17:35, Črt Gorup wrote:
 Hi

 I am having some problems with referenced titles and our special characters.

 In my document I have the following definition -
 \mysection[pri:seed]{Priloga C: Tabela ovrednotenih MeSH označb}. Title is
 generally (in the table of contents and in the document) rendered fine, but
 when I use it as a reference -   glej \about[pri:seed], stran \at[pri:seed]
   the output in the pdf is wrong -   glej »Priloga C: Tabela ovrednotenih
 MeSH oznaÄŊb«, stran 36. Does anybody have any idea how to fix it?

It seems to work OK here (I guess you are talking about mkii). Do you
have a longer document with multiple files being included? Can you
post a minimal example?

(I could imagine that at some point in a longer multiple-source-file
document ConTeXt forgets to use the right encoding at some point
since it seems to work fine for a simple example.)

 My settings which might have an influence to this problem:

 \enableregime[utf8]
 \mainlanguage[sl]
 \definehead[mysection][section]
 \setuphead [mysection][coupling=section,incrementnumber=list]
 \setuphead[mysection][command=\MySectionStyle, header=high, style={}]
 \def\MySectionStyle#1#2{
 {\tfa#2}
 }

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] Initialisation problem enumeration and way=bysection

2009-08-19 Thread Hans Hagen

B. Vogel wrote:

Hi all,

I have an enumeration: example that will reset by section. 

Using my own header: Mysection the enumeration is not reset by section. 
The second instance shows the failure.


However, after a \section it suddenly works.  



And there is a problem with the sectioncounter as well.
The headingnumbers are 1 2 1 2 3 4 5 6 instead of 1 2 3 4 5 6 7 8.


can you try this patch (strc-sec.mkiv)

\def\dodefineclonedstructurehead#1#2% class parent
  {\def\currentstructurehead{#1}%
   \presetlabeltext[#1=]%
   \doifelse{#1}{#2}
 {\getparameters[\??nh#1][\c!label=#1]%
  \doifundefined{\??li#1}{\definelist[#1][\c!prefix=\v!no]}}% 
definestructurelist ?


{\getparameters[\??nh#1][\s!parent=\??nh#2,\c!label=#1,\c!coupling=#2]%
  \definemarking[#1][#2]%
  \definemarking[#1\v!number][#2\c!number]%
  \doifundefined{\??li#1}{\definelist[#1][#2][\c!prefix=\v!no]}}% 
definestructurelist ?

   \the\everystructureheadsetup}


See the example below.


nice example


Regard, Bernard


%MTXrun | current version: 2009.08.17 19:06
% linux-32

\definehead[Mysection][section]

\defineenumeration[example]
  [way=bysection,
  location=left]

\def\test{%
  \ifnum\currentenumerationfullnumber=\recurselevel\relax
\currentenumerationfullnumber = \recurselevel\ PASS%
  \else
\currentenumerationfullnumber \not= \recurselevel\ FAIL%
  \fi
}

\starttext

\dorecurse {2} {
  \dorecurse {2} {
\Mysection{Mysection}
\dorecurse {3} {\startexample \test \stopexample}
  }

  \dorecurse {2} {
\section{Section}
\dorecurse {3} {\startexample \test \stopexample}
  }
} 


\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
-
___
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] Initialisation problem enumeration a nd way=bysection

2009-08-19 Thread B. Vogel
On Wednesday 19 August 2009, Hans Hagen wrote:
 B. Vogel wrote:
  Hi all,
 
  I have an enumeration: example that will reset by section.
 
  Using my own header: Mysection the enumeration is not reset by section.
  The second instance shows the failure.
 
  However, after a \section it suddenly works.
 
 
  And there is a problem with the sectioncounter as well.
  The headingnumbers are 1 2 1 2 3 4 5 6 instead of 1 2 3 4 5 6 7 8.

 can you try this patch (strc-sec.mkiv)

Problem solved. Thanks.


 \def\dodefineclonedstructurehead#1#2% class parent
{\def\currentstructurehead{#1}%
 \presetlabeltext[#1=]%
 \doifelse{#1}{#2}
   {\getparameters[\??nh#1][\c!label=#1]%
\doifundefined{\??li#1}{\definelist[#1][\c!prefix=\v!no]}}%
 definestructurelist ?

 {\getparameters[\??nh#1][\s!parent=\??nh#2,\c!label=#1,\c!coupling=#2]%
\definemarking[#1][#2]%
\definemarking[#1\v!number][#2\c!number]%
\doifundefined{\??li#1}{\definelist[#1][#2][\c!prefix=\v!no]}}%
 definestructurelist ?
 \the\everystructureheadsetup}

  See the example below.

 nice example

Thanks. 


  Regard, Bernard
 
 
  %MTXrun | current version: 2009.08.17 19:06
  % linux-32
 
  \definehead[Mysection][section]
 
  \defineenumeration[example]
[way=bysection,
location=left]
 
  \def\test{%
\ifnum\currentenumerationfullnumber=\recurselevel\relax
  \currentenumerationfullnumber = \recurselevel\ PASS%
\else
  \currentenumerationfullnumber \not= \recurselevel\ FAIL%
\fi
  }
 
  \starttext
 
  \dorecurse {2} {
\dorecurse {2} {
  \Mysection{Mysection}
  \dorecurse {3} {\startexample \test \stopexample}
}
 
\dorecurse {2} {
  \section{Section}
  \dorecurse {3} {\startexample \test \stopexample}
}
  }
 
  \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

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


[NTG-context] Initialisation problem enumeration and way=bysection

2009-08-18 Thread B. Vogel
Hi all,

I have an enumeration: example that will reset by section. 

Using my own header: Mysection the enumeration is not reset by section. 
The second instance shows the failure.

However, after a \section it suddenly works.  


And there is a problem with the sectioncounter as well.
The headingnumbers are 1 2 1 2 3 4 5 6 instead of 1 2 3 4 5 6 7 8.
 

See the example below.

Regard, Bernard


%MTXrun | current version: 2009.08.17 19:06
% linux-32

\definehead[Mysection][section]

\defineenumeration[example]
  [way=bysection,
  location=left]

\def\test{%
  \ifnum\currentenumerationfullnumber=\recurselevel\relax
\currentenumerationfullnumber = \recurselevel\ PASS%
  \else
\currentenumerationfullnumber \not= \recurselevel\ FAIL%
  \fi
}

\starttext

\dorecurse {2} {
  \dorecurse {2} {
\Mysection{Mysection}
\dorecurse {3} {\startexample \test \stopexample}
  }

  \dorecurse {2} {
\section{Section}
\dorecurse {3} {\startexample \test \stopexample}
  }
} 

\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] enumerations and definehead

2009-08-08 Thread B. Vogel
Hi all,

How do I reset an enumeration with my own header?

See the example below.
The build-in section works and my own header fails.

Tia,

Bernard


% MKIV beta
% MTXrun | current version: 2009.08.07 11:22
% linux-32

\definehead[Mysection][section]

\setuphead[Mysection]
  [after=\nowhitespace\hairline]

\defineenumeration[example]
  [way=bysection]

\starttext

\dorecurse {3} {
  \Mysection{Mysection \recurselevel}
  \dorecurse {3} {\startexample \recurselevel \stopexample}} 
\page

\dorecurse {3} {
  \section{Section \recurselevel}
  \dorecurse {3} {\startexample \recurselevel \stopexample}} 

\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] I can't change startitemize[n]-- startitemize[1]

2009-07-23 Thread Aditya Mahajan

On Thu, 23 Jul 2009, Wolfgang Schuster wrote:



Am 23.07.2009 um 17:05 schrieb Aditya Mahajan:

I think an easier thing to do will be to follow latex's style of 
\newcommand and \renewcommand. That is, all \definecommands should check if 
the macro is previously defined or not. If it is defined, issue a warning 
or an error.


There is \define and \redefine.


I know. What I am asking is that the core macros like \definedescription, 
\defineitemgroups, \definehead, which have the general form


\def\defineSOMETHING%
  {\dodoubleargument\dodefineSOMETHING}

\def\dodefineSOMETHING[#1][#2]%
 {\setvalue{#1}{\dododefineSOMETHING[#2]}

should do some check before the \setvalue. Maybe a universal solution will 
be to change \setvalue so that it uses \define (or a check like define) 
internally.


And maybe have some hook to disable the warning/error for those who know 
what they are doing.


In this case you can use \def, \edef ...


I meant with commands like \defineSOMETHING above. For example, I once did 
\definecolor[page][s=0.9] instead of what I normally do: 
\definecolor[pagecolor][s=0.9]. Took a while to figure out what was going 
wrong. Some of Xan's error were due to similar things, 
\defineSOMETHING[note], \defineSOMETHING[symbol], etc. If all these 
commands issued a warning that you are redefining existing macro, 
debugging will be much easier. And if you know what you are doing, we 
could have


\redefinecolor[page][s=0.9]

that does not issue a warning. Or the easier to implemnet:

\setupcolors[check=error|warn|ignore]

for all \setupSOMETHING commands where the equivalent \defineSOMETHING 
defines a control sequence.


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

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


Re: [NTG-context] I can't change startitemize[n]-- startitemize[1]

2009-07-23 Thread luigi scarso
On Thu, Jul 23, 2009 at 5:52 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 23 Jul 2009, Wolfgang Schuster wrote:


 Am 23.07.2009 um 17:05 schrieb Aditya Mahajan:

  I think an easier thing to do will be to follow latex's style of
 \newcommand and \renewcommand. That is, all \definecommands should check if
 the macro is previously defined or not. If it is defined, issue a warning or
 an error.


 There is \define and \redefine.


 I know. What I am asking is that the core macros like \definedescription,
 \defineitemgroups, \definehead, which have the general form

 \def\defineSOMETHING%
  {\dodoubleargument\dodefineSOMETHING}

 \def\dodefineSOMETHING[#1][#2]%
  {\setvalue{#1}{\dododefineSOMETHING[#2]}

 should do some check before the \setvalue. Maybe a universal solution will
 be to change \setvalue so that it uses \define (or a check like define)
 internally.

Or maybe
\Usersetvalue
I  think to an user-space
and a kernel-space

-- 
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] another sectioning problem in beta

2009-06-03 Thread Henning Hraban Ramm

MkIV 2009.06.03 11:48

If I use \chapter and \section, numbering is ok (1 Chapter, 1.1  
Section, 1.2 Section, 2 Chapter etc.), but when I define my own  
sectioning levels, everything gets running numbers (1 Chapter, 2  
Section, 3 Section, 4 Chapter etc.).


--- snip ---
\setuphead[chapter][page=no]

\definehead[Kapitel][chapter]
\definehead[Abschnitt][section]

\starttext

\dorecurse{20}{%
\expanded{\Kapitel{My chapter \recurselevel}}
\expanded{\Abschnitt{My Zapf \recurselevel}}
\input zapf
\expanded{\Abschnitt{My Tufte \recurselevel}}
\input tufte
}

\completecontent[criterium=all]

\stoptext
--- snip ---


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Latest beta and MKII problem

2009-05-29 Thread Bowen Alan C.
The latest beta (ConTeXt  ver: 2009.05.28 14:36 MKII  fmt: 2009.5.28   
int: english/english) no longer processes my files: all I get is  
complaints about an extra \else. That is,


\definehead[LevelCHead][chapter]
\setuphead[LevelCHead][style={\tf 
\it},alternative=text,number=no,page=no]


\starttext

Hello world!

\LevelCHead{Hello world!} Donec placerat. Nullam nibh dolor, blandit  
sed, fermentum id, imperdiet sit amet, neque. Nam mollis ultrices  
justo. Sed tempor.


\stoptext

gets

! Extra \else.
\doplaceheadtext ...er #2}\makestrutofbox 0 \else
  \setbox 0= 
\ifvertical \vbo...


\dodododoconstructhead ...{\finalsectionnumber }}}
  \writesection {#1} 
{-}{#4}\...

l.9 \LevelCHead{Hello world!}
  Donec placerat. Nullam nibh dolor,  
blandit sed...


?


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] sections, subsections, indenting, startnarrower, alignment

2009-05-26 Thread Amaël Broustet
Wouldn't be easier to achieve this using section personalized section
numbering ?

Best,
Amaël  


Le vendredi 22 mai 2009 à 14:40 -0700, afsmith a écrit :
 Hi again ntg-context.
 
 I have been working on my own CV/Resume module. Up until now I've just
 been asking about specific bits of the implementation of this thing I
 want to do, but perhaps that was a mistake as it hasn't really helped
 progress much, so:
 What I am trying to achieve is to define some three-argument command
 to give a section/subject header and a date, and then a block of text.
 The header and date should be on the same line, but aligned in either
 direction (subject aligned left, date aligned right)
 This block of text underneath it should be indented and able to
 include an instance of the same command. Let me try to explain the
 desired output in a little monospaced text diagram..
 
 |(Subject)___(Date)|
 |__(Subsubject)__(Date)|
 |texttexttexttexttexttexttexttext__|
 |textmoretextmoretextmoretexttext__|
 |__(Subsubject)__(Date)|
 |texttexttexttexttexttextexttext___|
 |textmoretextmoretextmoretexttext__|
 
 The subject and subsubject parts don't need to literally use
 \subject , for example I also tried to use \start(description){...
 for this purpose as well but that failed equally. Just something that
 works reasonably as a section header.
 
 I promise I have looked in the archives before asking :) for example
 http://www.mail-archive.com/ntg-context@ntg.nl/msg2.html
 http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
 http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
 http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html
 
 And here is an example of something I was playing with...
 
 ---
 \definehead[mysubject][subject]
 
 \defineframed[lrframe][
 width=\localhsize,
 align=normal,
 rulethickness=1pt]
 
 \setuphead[mysubject][style={\bf}]
 \define[3]\CHRONSUBJ
 {\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
 \startnarrower[left]{#3}\stopnarrower}
 
 \showframe[text]
 \starttext
 \CHRONSUBJ
   {This happened from June 08 to June 09}
   {06/08--06/09}
   {\CHRONSUBJ
 {This happened from June 08 to December 08}
 {06/08--12/08}
 {\input tufte }
   \CHRONSUBJ
 {This happened from January 09 to June 09}
 {01/09--06/09}
 {\input zapf }}
 \stoptext
 ---
 
 -A
 ___
 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
___


[NTG-context] sections, subsections, indenting, startnarrower, alignment

2009-05-26 Thread afsmith
I do not understand what you mean. Could you explain?

I stopped trying to use sections because I read somewhere in the
archives that sections cannot be used 'recursively' like this.
I have instead been trying to use definitions.


With regards to other approaches,  I have been trying to use several
different dimensions to solve this problem  but none of them seem to
work as expected inside the head of a definition inside a narrowed,
such as \localhsize and \makeupwidth, which mangle things in
unexpected ways.

Can anyone tell me however if there is some dimension that corresponds
to the local amount of indentation (made with narrower)?

-A




 Wouldn't be easier to achieve this using section personalized section
 numbering ?

 Best,
 Amaël


 Le vendredi 22 mai 2009 à 14:40 -0700, afsmith a écrit :
  Hi again ntg-context.
 
  I have been working on my own CV/Resume module. Up until now I've just
  been asking about specific bits of the implementation of this thing I
  want to do, but perhaps that was a mistake as it hasn't really helped
  progress much, so:
  What I am trying to achieve is to define some three-argument command
  to give a section/subject header and a date, and then a block of text.
  The header and date should be on the same line, but aligned in either
  direction (subject aligned left, date aligned right)
  This block of text underneath it should be indented and able to
  include an instance of the same command. Let me try to explain the
  desired output in a little monospaced text diagram..
 
  |(Subject)___(Date)|
  |__(Subsubject)__(Date)|
  |texttexttexttexttexttexttexttext__|
  |textmoretextmoretextmoretexttext__|
  |__(Subsubject)__(Date)|
  |texttexttexttexttexttextexttext___|
  |textmoretextmoretextmoretexttext__|
 
  The subject and subsubject parts don't need to literally use
  \subject , for example I also tried to use \start(description){...
  for this purpose as well but that failed equally. Just something that
  works reasonably as a section header.
 
  I promise I have looked in the archives before asking :) for example
  http://www.mail-archive.com/ntg-context@ntg.nl/msg2.html
  http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
  http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
  http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html
 
  And here is an example of something I was playing with...
 
  ---
  \definehead[mysubject][subject]
 
  \defineframed[lrframe][
  width=\localhsize,
  align=normal,
  rulethickness=1pt]
 
  \setuphead[mysubject][style={\bf}]
  \define[3]\CHRONSUBJ
  {\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
  \startnarrower[left]{#3}\stopnarrower}
 
  \showframe[text]
  \starttext
  \CHRONSUBJ
{This happened from June 08 to June 09}
{06/08--06/09}
{\CHRONSUBJ
  {This happened from June 08 to December 08}
  {06/08--12/08}
  {\input tufte }
\CHRONSUBJ
  {This happened from January 09 to June 09}
  {01/09--06/09}
  {\input zapf }}
  \stoptext
  ---
 
  -A
___
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, subsections, indenting, startnarrower, alignment

2009-05-22 Thread afsmith
Hi again ntg-context.

I have been working on my own CV/Resume module. Up until now I've just
been asking about specific bits of the implementation of this thing I
want to do, but perhaps that was a mistake as it hasn't really helped
progress much, so:
What I am trying to achieve is to define some three-argument command
to give a section/subject header and a date, and then a block of text.
The header and date should be on the same line, but aligned in either
direction (subject aligned left, date aligned right)
This block of text underneath it should be indented and able to
include an instance of the same command. Let me try to explain the
desired output in a little monospaced text diagram..

|(Subject)___(Date)|
|__(Subsubject)__(Date)|
|texttexttexttexttexttexttexttext__|
|textmoretextmoretextmoretexttext__|
|__(Subsubject)__(Date)|
|texttexttexttexttexttextexttext___|
|textmoretextmoretextmoretexttext__|

The subject and subsubject parts don't need to literally use
\subject , for example I also tried to use \start(description){...
for this purpose as well but that failed equally. Just something that
works reasonably as a section header.

I promise I have looked in the archives before asking :) for example
http://www.mail-archive.com/ntg-context@ntg.nl/msg2.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html

And here is an example of something I was playing with...

---
\definehead[mysubject][subject]

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUBJ
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]
\starttext
\CHRONSUBJ
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUBJ
{This happened from June 08 to December 08}
{06/08--12/08}
{\input tufte }
  \CHRONSUBJ
{This happened from January 09 to June 09}
{01/09--06/09}
{\input zapf }}
\stoptext
---

-A
___
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] re-posting example of header at page bottom

2009-05-20 Thread Jos van Gisbergen
Hi,

I'm re-posting my previous reply to a request from Wolfgang Schuster to supply
an example that exhibits the problem of headers at page bottom.  In my previous
reply the attached example was more or less obscurely hidden in a link at the
bottom of the Digest.

This time I included the example in the e-mail -- it's a bit long I'm afraid.


Here's an example of a ConTeXt file where a header occurs at page bottom.
The subsection named Perl snippet occurs at the bottom of page 2, followed
by framed text on page 3. It would be much nicer if the header would be
written on page 3. Note: I extracted this example from a real-life text; for 
some reason
the frames in the example are drawn wrongly, but this is beside the point.

Run the example with texexec --pdf test.tex

These are the outputs of pdfetex --version and texexec --version on my system 
(Fedora Core 6):

  texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
  texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
  tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
  context : ver: 2005.01.31
  cont-en : ver: 2005.01.31  fmt: 2009.1.26  mes: english

  pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
  kpathsea version 3.5.4


    Example  -  


\def\Doctitle{
  Yoyo reference guide
}

\def\Author{
  Flavius Aurelius
}

\def\Copyrightyear{
  2023
}

\def\Revision{
  (revision 0.1)
}

\def\Footertext{
  {\copyright} {\Copyrightyear} Yoyomatic {\Revision}
}

\installlanguage[en]

%--  Set papersize  
\setuppapersize[A4]

%--  Define layout geometry  ---
\definelayout[myCustomLayout][
 header=10mm,% height of header
 footer=10mm,% height of footer
 topspace=8mm,   % space above header
 bottomspace=\topspace,  % space below footer
 backspace=25mm,
 cutspace=20mm,
 width=middle,
 height=middle,
 marking=on, % enable the marking of text
 grid=no,
]

\setuplayout[myCustomLayout]

% Experimental
\definelayout[TitlePageLayout][header=0pt,
   footer=0pt,
   backspace=0.25\paperwidth,
   topspace=0.25\paperheight]

\definestartstop
  [TitlePageLayout]
  [before={\setuplayout[TitlePageLayout]},
   after={\page[left]\setuplayout[reset]}]

%--  Page numbering  ---
\setuppagenumbering [alternative=doublesided,
 location={footer,right},  % where should page number appear
 left={Page }] % text to the left of page number

%--  Custom colors  
\setupcolors[state=start]
\definecolor[DarkYellow] [r=0.5,g=0.5,b=0.1]
\definecolor[LightYellow][r=1.0,g=1.0,b=0.8]
\definecolor[LightBlue]  [r=0.1,g=0.1,b=1.0]
\definecolor[VeryLightBlue]  [r=0.9,g=0.9,b=1.0]
\definecolor[DarkBlue]   [r=0.0,g=0.0,b=0.4]
\definecolor[LightBlack] [r=0.4,g=0.4,b=0.4]
\definecolor[DarkWhite]  [r=0.8,g=0.8,b=0.9]

%-  Custom font definitions  ---
% Define custom fonts for title, chapter etc.
\definebodyfont [10pt,11pt,12pt][rm][chapterFont=SansBold at 36pt,
 sectionFont=SansBold at 24pt,
 subsectionFont=SansBold at 24pt,
 subsubsectionFont=SansBold at 18pt,
 titleFont=SansBold at 36pt]

% The following setup defines the attributes for drawing horizontal lines
% across the page. These lines are drawn with macros \thinline and \hairline.
%\setupthinrules[color=black,rulethickness=0.5mm]
\setupthinrules[color=black]


\setuphead[title][style=\titleFont,
  color=black]
\setuphead[chapter]  [before=\crlf, % insert empty line before chapter title
  style=\chapterFont,
  color=black,
  prefix=+]
\setuphead[section]  [before=\crlf,
  style=\sectionFont,
  color=black,
  prefix=+]
\setuphead[subsection]   [before=\crlf,
  style=\subsectionFont,
  color=black,
  prefix=+]
\setuphead[subsubsection][before=\crlf,
  style=\subsubsectionFont,
  color=black,
  prefix=+]

\definehead[myhead][section]
\setuphead[myhead] [before=\crlf,
page=yes, % start on new page
number=no,
style=\subsectionFont,
color=black]

\definehead[submyhead][myhead]
\setuphead[submyhead] [page=no, % don't

Re: [NTG-context] header at page bottom example

2009-05-19 Thread Jos van Gisbergen
Hi,

Here's an example of a ConTeXt file where a header occurs at page bottom.
The subsection named Perl snippet occurs at the bottom of page 2, followed
by framed text on page 3. It would be much nicer if the header would be
written on page 3. Note: I extracted this example from a real-life text; for 
some reason
the frames in the example are drawn wrongly, but this is beside the point.

Run the example with texexec --pdf test.tex

These are the outputs of pdfetex --version and texexec --version on my system 
(Fedora Core 6):

   texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
   texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
   tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
   context : ver: 2005.01.31
   cont-en : ver: 2005.01.31  fmt: 2009.1.26  mes: english

   pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
   kpathsea version 3.5.4

Thanks in advance,

Jos






From: ntg-context-requ...@ntg.nl ntg-context-requ...@ntg.nl
To: ntg-context@ntg.nl
Sent: Monday, May 18, 2009 2:55:18 PM
Subject: ntg-context Digest, Vol 59, Issue 99

Send ntg-context mailing list submissions to
ntg-context@ntg.nl

To subscribe or unsubscribe via the World Wide Web, visit
http://www.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: how to prevent header at page bottom (Wolfgang Schuster)
   2. Re: interlinespace (Thomas A. Schmitz)
   3. Re: formula-style alignment (afsmith)
   4. Re: columns(ets) and itemize[columns] (Alan BRASLAU)
   5. Re: replacing words by underlines (Alan Stone)
   6. Re: Fresh install  t-letter module (Markus Hubig)


--

Message: 1
Date: Mon, 18 May 2009 12:12:00 +0200
From: Wolfgang Schuster schuster.wolfg...@googlemail.com
Subject: Re: [NTG-context] how to prevent header at page bottom
To: mailing list for ConTeXt users ntg-context@ntg.nl
Message-ID: 47526efc-131b-4ad0-a804-d5c98155f...@gmail.com
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


Am 18.05.2009 um 12:07 schrieb Jos van Gisbergen:

 Hi Aditya,

 Your solution works for normal text following the header.
 But if I have a framed text with a background, which also
 has a before={\testpage[3]} (\definetextbackground[FramedText][
 ...,before={\testpage[3]},...]) and the section starts with such a  
 framed
 text, it can still go wrong. And I guess it can also go wrong if a  
 section
 starts with a figure. Is there some way to specify that if less than a
 certain number of items (lines of text, frames, figures etc.) fit on  
 the
 remainder of the current page, the next page should be taken?

Send a example.

Wolfgang


--

Message: 2
Date: Mon, 18 May 2009 12:45:27 +0200
From: Thomas A. Schmitz thomas.schm...@uni-bonn.de
Subject: Re: [NTG-context] interlinespace
To: mailing list for ConTeXt users ntg-context@ntg.nl
Message-ID: 4115ff75-aa44-4355-ab30-1532b7fa1...@uni-bonn.de
Content-Type: text/plain; charset=US-ASCII; format=flowed


On May 18, 2009, at 11:56 AM, Taco Hoekwater wrote:

 {\switchtobodyfont[10pt]
 \setupinterlinespace[line=12pt] \input tufte \par }

*palmforehead*

Thanks, Taco and Wolfgang! Painful...

All best

Thomas


--

Message: 3
Date: Mon, 18 May 2009 03:53:15 -0700
From: afsmith adventurecompl...@gmail.com
Subject: Re: [NTG-context] formula-style alignment
To: ntg-context ntg-context@ntg.nl
Message-ID:
5df5befa0905180353t7e3036b6s7092d1c6d5d6e...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

Thanks Wolfgang. That works...

Now how about inside a definition or subject header?

Here is an example. \localhsize in this case seems to resolve to a
width of 0, making the contained text break as often as it can...

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuplayout[header=0pt,footer=0pt]
\definedescription[topdesc][
inbetween={\blank[none]},
headstyle={\bf},
style={\tf\rm},
location=top,
width=broad]

\define[3]\CHRONDESC
{\starttopdesc
{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower
\stoptopdesc}

\definehead[mysubject][subject]
\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUB
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]

\starttext

\startnarrower[left]
\dontleavehmode\lrframe[width=broad]
{leftleftleft \hfill right rightrightright}
\stopnarrower \crlf

\startnarrower[left]
\dontleavehmode\lrframe[width=\localhsize]
{leftleftleftleft\hfill right rightrightright}
\stopnarrower \crlf

\CHRONDESC

Re: [NTG-context] how to prevent header at page bottom

2009-05-18 Thread Jos van Gisbergen
Hi Aditya,

Your solution works for normal text following the header.
But if I have a framed text with a background, which also
has a before={\testpage[3]} (\definetextbackground[FramedText][
...,before={\testpage[3]},...]) and the section starts with such a framed
text, it can still go wrong. And I guess it can also go wrong if a section
starts with a figure. Is there some way to specify that if less than a
certain number of items (lines of text, frames, figures etc.) fit on the
remainder of the current page, the next page should be taken?

Thanks in advance,

Jos





From: ntg-context-requ...@ntg.nl ntg-context-requ...@ntg.nl
To: ntg-context@ntg.nl
Sent: Thursday, May 14, 2009 5:21:26 PM
Subject: ntg-context Digest, Vol 59, Issue 85

Send ntg-context mailing list submissions to
ntg-context@ntg.nl

To subscribe or unsubscribe via the World Wide Web, visit
http://www.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: How to prevent header at page bottom (Aditya Mahajan)
   2. Re: beta: figure boundingbox (Hans Hagen)
   3. Re: bugs in beta (footnotes) (Hans Hagen)
   4. Re: docs (Mari Voipio)
   5. Re: Updating bug: linux-64 (bbvo...@home.nl)
   6. Re: Updating bug: linux-64 (Taco Hoekwater)
   7. Re: docs (R. Bastian)
   8. Re: beta (12.05.2009,22:36): footnote marker and
  overprinting (Hans Hagen)
   9. Re: Updating bug: linux-64 (Arthur Reutenauer)


--

Message: 1
Date: Thu, 14 May 2009 10:02:32 -0400 (EDT)
From: Aditya Mahajan adit...@umich.edu
Subject: Re: [NTG-context] How to prevent header at page bottom
To: mailing list for ConTeXt users ntg-context@ntg.nl
Message-ID: alpine.lnx.2.00.0905141001180.6...@ybpnyubfg.ybpnyqbznva
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 14 May 2009, Jos van Gisbergen wrote:

 Hi,

 I have defined my own header:
  \definehead[myhead][subsection]
  \setuphead[myhead][ page=no, number=no ]
 All works fine, except sometimes the head appears at page bottom and
 the text starts on the next page. How can I specify that if less than, say,
 3 lines of text fit on the current page below the head, the head and text
 should start on the next page.

\testpage[3] checks that you have space for atleast 3 lines in the current 
page. So you can use

\setuphead[myhead][before={\testpage[3]\blank}]

Aditya


--

Message: 2
Date: Thu, 14 May 2009 16:09:24 +0200
From: Hans Hagen pra...@wxs.nl
Subject: Re: [NTG-context] beta: figure boundingbox
To: mailing list for ConTeXt users ntg-context@ntg.nl
Message-ID: 4a0c2614.1040...@wxs.nl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Peter Rolf wrote:
 Hans Hagen schrieb:
 Peter Rolf wrote:
 Hi,

 while comparing the PDF of mkii and mkiv I noticed a slight differ in 
 the boundingboxes (bb) of MP figures.
 While all mkii bb have the form [0 0 w h], the mkiv counterparts use 
 [-1 -1 w+1 h+1]. So the bb of mkiv is enlarged 1bp in all directions. 
 Is this intended?

 harmless ... it prevents clipping of lines
 mh, you mean if something is \framed (with default frame settings)?

if the bbox goes through the middle of a line in an xform then you get 
(in acrobat) clipped lines so this avoids that problem


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


--

Message: 3
Date: Thu, 14 May 2009 16:08:13 +0200
From: Hans Hagen pra...@wxs.nl
Subject: Re: [NTG-context] bugs in beta (footnotes)
To: mailing list for ConTeXt users ntg-context@ntg.nl
Message-ID: 4a0c25cd.6030...@wxs.nl
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Wolfgang Schuster wrote:
 
 Am 12.05.2009 um 19:07 schrieb Henning Hraban Ramm:
 
 Only footnotes in section titles don't work - should they?

 [...]

 I couldn't construct a minimal failing example - any hints?
 
 
 No solution but here is a test file:
 
 \setupinteraction[state=start]
 \starttext
 \section{foo\footnote{bar}}
 \stoptext

repaired


-
   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

Re: [NTG-context] formula-style alignment

2009-05-18 Thread afsmith
Thanks Wolfgang. That works...

Now how about inside a definition or subject header?

Here is an example. \localhsize in this case seems to resolve to a
width of 0, making the contained text break as often as it can...

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuplayout[header=0pt,footer=0pt]
\definedescription[topdesc][
inbetween={\blank[none]},
headstyle={\bf},
style={\tf\rm},
location=top,
width=broad]

\define[3]\CHRONDESC
{\starttopdesc
{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower
\stoptopdesc}

\definehead[mysubject][subject]
\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUB
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]

\starttext

\startnarrower[left]
\dontleavehmode\lrframe[width=broad]
{leftleftleft \hfill right rightrightright}
\stopnarrower \crlf

\startnarrower[left]
\dontleavehmode\lrframe[width=\localhsize]
{leftleftleftleft\hfill right rightrightright}
\stopnarrower \crlf

\CHRONDESC
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONDESC
{This happened from June 08 to December 08}
{06/08--12/08}
{\input tufte }
  \CHRONDESC
{This happened from January 09 to June 09}
{01/09--06/09}
{\input zapf }}
\CHRONDESC
  {This happened from June 09 to July 09}
  {06/09-07/09}
  {\input knuth }
\crlf

\CHRONSUB
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUB
{This happened from June 08 to December 08}
{06/08--12/08}
{\input tufte }
  \CHRONSUB
{This happened from January 09 to June 09}
{01/09--06/09}
{\input zapf }}
\crlf

\stoptext



 Am 17.05.2009 um 21:23 schrieb afsmith:

  Hey again, ntg-context.
 
  I would like to align one piece of a line to the left, and another
  piece of the same line to the right, sort of like numbered math
  equations, except not math.
  Additionally I would like to do this inside a narrowed block

 \starttext

 \input knuth

 \startnarrower

 \input knuth

 \dontleavehmode\framed[width=\localhsize,align=normal]{left\hfill right}

 \stopnarrower

 \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 prevent header at page bottom

2009-05-14 Thread Jos van Gisbergen
Hi,

I have defined my own header:
  \definehead[myhead][subsection]
  \setuphead[myhead][ page=no, number=no ]
All works fine, except sometimes the head appears at page bottom and
the text starts on the next page. How can I specify that if less than, say,
3 lines of text fit on the current page below the head, the head and text
should start on the next page.

Thanks in advance,

Jos



  ___
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 prevent header at page bottom

2009-05-14 Thread Aditya Mahajan

On Thu, 14 May 2009, Jos van Gisbergen wrote:


Hi,

I have defined my own header:
 \definehead[myhead][subsection]
 \setuphead[myhead][ page=no, number=no ]
All works fine, except sometimes the head appears at page bottom and
the text starts on the next page. How can I specify that if less than, say,
3 lines of text fit on the current page below the head, the head and text
should start on the next page.


\testpage[3] checks that you have space for atleast 3 lines in the current 
page. So you can use


\setuphead[myhead][before={\testpage[3]\blank}]

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

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


[NTG-context] [***SPAM***] Bug? \getmarking fails under some circumstances

2009-05-12 Thread Oliver Heins
Hello,

I'm new to ConTeXt, so this is perhaps not a bug but a fault on my side.

Under some circumstances, the living column heads fail to refer to the
subsubject.  As you can see from the attached minimal example

\startsetups[header]
  \getmarking[subject]\ $\cdot$ \getmarking[subsubject]
\stopsetups

will yield something like »Mikrotypografie *«, though it should be
»Mikrotypografie * Absatzumbruch«.

If you uncomment the \subsubject-line at the end of the example,
everything works as expected unless you uncomment the former line, too.

A workaround is to add a \vfill\eject just before the next \subject.

Best regards,
 olli


You probably can ignore the environments used in the minimal example, they
are copied from the document from which I ran into the problem and are
just dummy text.  I hope I have stripped down the preamble to an
acceptable amount of lines.

---

% interface=en output=pdftex

\usetypescript[fourier][ec]
\setupbodyfont[fourier,12pt]

\setuppapersize
  [A4][A4]

\usemodule[layout]
\chardef\charwidthmethod=3
\def\charwidthlanguage{\currentmainlanguage}
\setuplayout
  [width=70\averagecharwidth,
  height=middle,
  grid=yes]

\startsetups[header]
  \hfill
  \getmarking[subject]\ $\cdot$ \getmarking[subsubject]
  \hfill
\stopsetups

\setupheadertexts[\setups{header}]

\setuphead
  [title]
  [before=\hairline,
   after=\blank\leftline{\tfa Ein
   Beispieldokument}\blank\leftline{\tfa Oliver Heins
 \ss$\langle$\from[email]$\rangle$}
 \bigskip\hairline]

\definehead[subject][section]
\setuphead[subject][number=no]
\definehead[subsubject][subsection]
\setuphead[subsubject][number=no]

\setuphead
  [subject]
  [style=\tfb]


% Text

\starttext


\startlinecorrection
\title{Mikrotypografie und Interaktivität}
\stoplinecorrection

\setupindenting[medium, yes]
\setupwhitespace[none]

\vskip-\baselineskip

\subject{Mikrotypografie}

Besonderes Augenmerk legt scriptorium adp auf die typografische
Qualität der erzeugten Dokumente.  Die von uns verwendeten
Textsatzsysteme aus der Programmfamilie \TeX{} ermöglichen einen
besonders hochwertigen Satz.

\subsubject{Mathematiksatz}

Der Mathematiksatz von \TeX{} ist legendär.  Kein Wunder, wurde \TeX{}
doch vom amerikanischen Informatikprofessor und Turing-Preisträger
Donald Knuth entwickelt, der mit der immer schlechter werdenden
Qualität seiner Buchreihe \quotation{The Art of Computer Programming}
unzufrieden war, seit von Hand- auf Fotosatz umgestellt worden war.

Von 1977 bis 1986 entwickelte Knuth \TeX{}: {\en\quotation{Ever since
those beginnings in 1977, the TeX research project that I embarked
on was driven by two major goals.  The first goal was quality: we
wanted to produce documents that were not just nice, but actually
the best. {\dots} The second major goal was archival: to create
systems that would be independent of changes in printing
technology as much as possible.  When the next generation of
printing devices came along, I wanted to be able to retain the
same quality already achieved, instead of having to solve all the
problems anew.  I wanted to design something that would be still
usable in 100 years.}}\footnote{Donald E. Knuth, {\it Digital
typography.} Stanford, Calif.: CSLI Publications, 1999, S.~559.}

\TeX{} stellt im engeren Sinn lediglich eine Programmiersprache
bereit, mit der sich Textsatzsysteme entwickeln lassen. Knuth
entwickelte ein erstes mit dem sogenannten plain-\TeX-Format, weitere
wie {\LaTeX} oder {\ConTeXt} folgten.  scriptorium adp setzt die
beiden letztgenannten Formate ein.

Hier ein Beispiel für den Mathematiksatz von \TeX{}:

\startlinecorrection
\vskip-.5\baselineskip
\placeformula
\startformula
  \startmathalignment[m=2,distance=2em]%Notice distance=2em
   \NC \nabla\cdot \bf E \NC= \frac{\rho}{\varepsilon_0},
   \NC \nabla\times \bf E \NC= -\frac{\partial \bf B}{\partial t}, \NR[+]
   \NC \nabla\cdot \bf B \NC= 0,
   \NC \nabla\times \bf B \NC= \mu_0{\bf j}+\varepsilon_0\mu_0
   \frac{\partial \bf E}{\partial t}. \NR[+]
 \stopmathalignment
\stopformula
\vskip-.5\baselineskip
\stoplinecorrection


Auch im Fließtext ist Mathematik problemlos möglich.

\startlinecorrection
\placeformula
\startformula
  f(x) =
  \startmathcases[style=\displaystyle]
\NC \int_0^x g(y)\,dy,\NC if $x \ge 0$; \NR
\NC \int_{-x}^0 g(y)\,dy, \NC otherwise.\NR
  \stopmathcases
\stopformula
\stoplinecorrection


\subsubject{Absatzumbruch}

Hervorzuheben ist insbesondere der absatzbasierte {\it
  Total|-|Fit}|-|Umbruchalgorithmus: nach einem raffinierten
Optimierungsverfahren werden alle möglichen Zeilenumbrüche (inklusive
Worttrennung) im Absatz gleichzeitig bestimmt und bewertet.  Der
Umbruch, der den besten optischen Gesamteindruck verspricht, wird dann
vom System benutzt.  Im Vergleich mit dem verbreiteten {\it
  First|-|Fit}|-|Algorithmus, der die Zeilenumbrüche Zeile für Zeile

Re: [NTG-context] What happened with sectionworld?

2009-04-29 Thread Wolfgang Schuster


Am 29.04.2009 um 17:07 schrieb Idris Samawi Hamid ادريس سماوي  
حامد:



Hi Wolfgang,

On Wed, 29 Apr 2009 06:54:50 -0600, Wolfgang Schuster schuster.wolfg...@googlemail.com 
 wrote:



Anyway: which is the best method to get the list of all params
one can give to \startSOMETHING  (in this case \startchapter and
the meanings of this params (some are obvious : title= ..., but  
not all).


http://pragma-ade.nl/show-man-10.htm


I did not see the ne sectioning there... Anyway


You're welcome to add missing command to cont-en.xml


\startchapter[title=,reference=,bookmark=,...][optional user data]

Could you [or someone] give a couple of example of how to use

[optional user data]

Also, where in the base files does this stuff get defined? I could  
not find it.


strc-sec.tex

start/stop commands are created with \definehead automatically

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] What happened with sectionworld?

2009-04-29 Thread Idris Samawi Hamid ادريس سماوي ح امد
On Wed, 29 Apr 2009 12:14:38 -0600, Wolfgang Schuster  
schuster.wolfg...@googlemail.com wrote:



\startchapter[title=,reference=,bookmark=,...][optional user data]

Could you [or someone] give a couple of example of how to use

[optional user data]

Also, where in the base files does this stuff get defined? I could not  
find it.


strc-sec.tex

start/stop commands are created with \definehead automatically


ok, thnx! OTOH, I did not see any illustrative examples of the use of
[optional user data]

:-)

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] What happened with sectionworld?

2009-04-29 Thread Hans Hagen

Idris Samawi Hamid ادريس سماوي حامد wrote:
On Wed, 29 Apr 2009 12:14:38 -0600, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:



\startchapter[title=,reference=,bookmark=,...][optional user data]

Could you [or someone] give a couple of example of how to use

[optional user data]

Also, where in the base files does this stuff get defined? I could 
not find it.


strc-sec.tex

start/stop commands are created with \definehead automatically


ok, thnx! OTOH, I did not see any illustrative examples of the use of
[optional user data]

:-)


of course not .. its; new -)

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


[NTG-context] Cannot turn big letters to small

2009-03-30 Thread Vyatcheslav Yatskovsky

Hello,

I have heads typed in capital letters, but I want first letters of each 
word to be capitalized and the rest small.


For example, I have

\faculty{ФАКУЛЬТЕТ АЕРОКОСМІЧНИХ СИСТЕМ УПРАВЛІННЯ}

but actually I need the result that would be produced by

\faculty{Факультет Аерокосмічних Систем Управління }


I have played a lot with \Word, \Words, \Cap, etc, but they don't work.
Current \word command turns all letters to small, but this is not 
acceptable.


\definehead[faculty][chapter]
\setuphead [faculty][
incrementnumber=list, page=yes, number=no, align=right,
style={\switchtobodyfont[impact]\bfb\word}]

Best,
Vyatcheslav
___
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] Cannot turn big letters to small

2009-03-30 Thread Hans Hagen

Vyatcheslav Yatskovsky wrote:

Hello,

I have heads typed in capital letters, but I want first letters of each 
word to be capitalized and the rest small.


For example, I have

\faculty{ФАКУЛЬТЕТ АЕРОКОСМІЧНИХ СИСТЕМ УПРАВЛІННЯ}

but actually I need the result that would be produced by

\faculty{Факультет Аерокосмічних Систем Управління }


I have played a lot with \Word, \Words, \Cap, etc, but they don't work.
Current \word command turns all letters to small, but this is not 
acceptable.


\definehead[faculty][chapter]
\setuphead [faculty][
incrementnumber=list, page=yes, number=no, align=right,
style={\switchtobodyfont[impact]\bfb\word}]


mkii or mkiv?



-
  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] Cannot turn big letters to small

2009-03-30 Thread Vyatcheslav Yatskovsky


  I have heads typed in capital letters, but I want first letters of each
  word to be capitalized and the rest small.
  
  For example, I have
  
  \faculty{BIG HEAD}
  
  but actually I need the result that would be produced by
  
  \faculty{Big Head}
  
  
  I have played a lot with \Word, \Words, \Cap, etc, but they don't work.

  Current \word command turns all letters to small, but this is not
  acceptable.
  
  \definehead[faculty][chapter]

  \setuphead [faculty][
  incrementnumber=list, page=yes, number=no, align=right,
  style={\switchtobodyfont[impact]\bfb\word}]
   


mkii or mkiv?
   

Sure, mkiv. This is the only engine I use :)

Vyatcheslav
___
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] font switch in 'style' stopped working

2009-03-26 Thread Vyatcheslav Yatskovsky

Thank you, Hans.  luatools --generate eliminated the error.

But, font switch in 'style' stopped working.
For example,

\definehead[faculty][chapter]
\setuphead [faculty][
  incrementnumber=list, page=yes, number=no, align=middle, style=\bfb]

produces bold but normal size font. \tfa also gives normal font.

Help!

Vyatcheslav



___
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] font switch in 'style' stopped working

2009-03-26 Thread Wolfgang Schuster


Am 27.03.2009 um 00:25 schrieb Vyatcheslav Yatskovsky:


Thank you, Hans.  luatools --generate eliminated the error.

But, font switch in 'style' stopped working.
For example,

\definehead[faculty][chapter]
\setuphead [faculty][
 incrementnumber=list, page=yes, number=no, align=middle, style=\bfb]

produces bold but normal size font. \tfa also gives normal font.

Help!


Looks correct to me.

\definehead[faculty][chapter]
\setuphead [faculty] 
[incrementnumber=list,page=yes,number=no,align=middle,style=\bfb]


\starttext

\faculty{faculty}

{\tf text \tfa text \tfb text \tfc text}

{\bf text \bfa text \bfb text \bfc 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] remove blank after head

2009-03-24 Thread Vyatcheslav Yatskovsky




Hello,



How to get rid of break
after section head? I need to glue it with author's information
(italic).




\definehead[exhibitname][subsection]
\setuphead [exhibitname][
incrementnumber=list, number=no, align=middle, style=\bf]

 \def\exhibit#1#2%
 {
 {\exhibitname{#1}}
 %\blank
 {\rightaligned{\it#2}}
 \blank[line]} 




___
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] Content head

2009-01-28 Thread Wolfgang Werners-Lucchini
Hallo,

I would like to def a costum head, but I also want the
pure word 'Inhaltsverzeichnis' as content head.

I tryed:

\def\Vortrag#1#2{#1~Vortrag:~#2}%
\setuphead[chapter][command=\Vortrag ]
\definehead[contenthead][title]

\starttext

\contenthead{Inhaltsverzeichnis}
\placecontent

\chapter{Bla}
blub

\stoptext


But the content head is still prefixed with 'Vortrag:'.
What is the solution for this?

Gruß, 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] Content head

2009-01-28 Thread Wolfgang Schuster


Am 28.01.2009 um 12:24 schrieb Wolfgang Werners-Lucchini:


I would like to def a costum head, but I also want the
pure word 'Inhaltsverzeichnis' as content head.

I tryed:

\def\Vortrag#1#2{#1~Vortrag:~#2}%
\setuphead[chapter][command=\Vortrag ]
\definehead[contenthead][title]

\starttext

\contenthead{Inhaltsverzeichnis}
\placecontent

\chapter{Bla}
blub

\stoptext


But the content head is still prefixed with 'Vortrag:'.
What is the solution for this?


\setuphead
  [chapter]
  [numbercommand=\groupedcommand{}{~Vortrag:},
   distance=\spaceamount]

Viele Grüße,
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] 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] How to avoid a page break?

2008-11-05 Thread Wolfgang Schuster
2008/11/5 Marcin Borkowski [EMAIL PROTECTED]:
 Hi!

 And yet another question on this topic: how to avoid a page break after

 \chapter[...]

 ?

 (I decided to define a new head, derived from chapter, which does not
 begin on a page of its own, but the heading should never be at the page
 bottom alone!)

\definehead[marcin][chapter]

\setuphead
  [marcin]
  [page=no]

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] Extra space before itemize

2008-10-12 Thread Hans Hagen
Aditya Mahajan wrote:
 On Sat, 11 Oct 2008, Hans Hagen wrote:
 
 Aditya Mahajan wrote:
 Hi,

 I am setting up a head which simply puts its contents in a layer, so that
 I can control where to place the head. If the head is followed by an
 itemize, I get spurious white space. See the following test file. Page 1
 is head followed by text, which is OK. Page 2 is head followed by itemize,
 which has extra space. page 3 is just itemize which is ok.

 \definelayer[test]
  [width=\paperwidth,
  height=\paperheight,
  x=5cm,y=1cm]

 \def\mylayer#1#2{\setlayer[test]{#1#2}}

 \definehead[testhead][subject]

 \setuphead[testhead]
 [before=,
 after=,
 alternative=text,
 command=\mylayer]

 \setupbackgrounds[page][background=test]

 \showframe
 \showboxes

 \starttext

 \testhead{First}

 \input knuth

 \page

 \testhead{Hello}

 \startitemize
\item A
\item B
 \stopitemize

 \page

 \startitemize
\item A
\item B
 \stopitemize


 \stoptext


 How do I get rid of the extra space?
 hack

 \def\mylayer#1#2{\startnointerference\setlayer[test]{#1#2}\stopnointerference}

 \definehead[testhead][subject]

 \setuphead[testhead]
 [page=,
  before=,
  after={\topskipcorrection\vskip-\topskip \blank[disable]},
  alternative=normal,
  command=\mylayer]
 
 Thanks. I think that in this case it will be cleaner to not use heads in 
 this case and implement color, style, align interface by hand. I will 
 wikify your answer.

you can achieve the same effect by just header=high and using a layer in 
the command and flush it then

-
   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] Extra space before itemize

2008-10-11 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi,
 
 I am setting up a head which simply puts its contents in a layer, so that 
 I can control where to place the head. If the head is followed by an 
 itemize, I get spurious white space. See the following test file. Page 1 
 is head followed by text, which is OK. Page 2 is head followed by itemize, 
 which has extra space. page 3 is just itemize which is ok.
 
 \definelayer[test]
  [width=\paperwidth,
  height=\paperheight,
  x=5cm,y=1cm]
 
 \def\mylayer#1#2{\setlayer[test]{#1#2}}
 
 \definehead[testhead][subject]
 
 \setuphead[testhead]
 [before=,
 after=,
 alternative=text,
 command=\mylayer]
 
 \setupbackgrounds[page][background=test]
 
 \showframe
 \showboxes
 
 \starttext
 
 \testhead{First}
 
 \input knuth
 
 \page
 
 \testhead{Hello}
 
 \startitemize
\item A
\item B
 \stopitemize
 
 \page
 
 \startitemize
\item A
\item B
 \stopitemize
 
 
 \stoptext
 
 
 How do I get rid of the extra space?

hack

\def\mylayer#1#2{\startnointerference\setlayer[test]{#1#2}\stopnointerference}

\definehead[testhead][subject]

\setuphead[testhead]
 [page=,
  before=,
  after={\topskipcorrection\vskip-\topskip \blank[disable]},
  alternative=normal,
  command=\mylayer]


-
   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] Extra space before itemize

2008-10-11 Thread Aditya Mahajan
On Sat, 11 Oct 2008, Hans Hagen wrote:

 Aditya Mahajan wrote:
 Hi,

 I am setting up a head which simply puts its contents in a layer, so that
 I can control where to place the head. If the head is followed by an
 itemize, I get spurious white space. See the following test file. Page 1
 is head followed by text, which is OK. Page 2 is head followed by itemize,
 which has extra space. page 3 is just itemize which is ok.

 \definelayer[test]
  [width=\paperwidth,
  height=\paperheight,
  x=5cm,y=1cm]

 \def\mylayer#1#2{\setlayer[test]{#1#2}}

 \definehead[testhead][subject]

 \setuphead[testhead]
 [before=,
 after=,
 alternative=text,
 command=\mylayer]

 \setupbackgrounds[page][background=test]

 \showframe
 \showboxes

 \starttext

 \testhead{First}

 \input knuth

 \page

 \testhead{Hello}

 \startitemize
\item A
\item B
 \stopitemize

 \page

 \startitemize
\item A
\item B
 \stopitemize


 \stoptext


 How do I get rid of the extra space?

 hack

 \def\mylayer#1#2{\startnointerference\setlayer[test]{#1#2}\stopnointerference}

 \definehead[testhead][subject]

 \setuphead[testhead]
 [page=,
  before=,
  after={\topskipcorrection\vskip-\topskip \blank[disable]},
  alternative=normal,
  command=\mylayer]

Thanks. I think that in this case it will be cleaner to not use heads in 
this case and implement color, style, align interface by hand. I will 
wikify your answer.

Aditya

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

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


[NTG-context] Extra space before itemize

2008-10-10 Thread Aditya Mahajan
Hi,

I am setting up a head which simply puts its contents in a layer, so that 
I can control where to place the head. If the head is followed by an 
itemize, I get spurious white space. See the following test file. Page 1 
is head followed by text, which is OK. Page 2 is head followed by itemize, 
which has extra space. page 3 is just itemize which is ok.

\definelayer[test]
 [width=\paperwidth,
 height=\paperheight,
 x=5cm,y=1cm]

\def\mylayer#1#2{\setlayer[test]{#1#2}}

\definehead[testhead][subject]

\setuphead[testhead]
[before=,
after=,
alternative=text,
command=\mylayer]

\setupbackgrounds[page][background=test]

\showframe
\showboxes

\starttext

\testhead{First}

\input knuth

\page

\testhead{Hello}

\startitemize
   \item A
   \item B
\stopitemize

\page

\startitemize
   \item A
   \item B
\stopitemize


\stoptext


How do I get rid of the extra space?

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

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


[NTG-context] Pagenumbering on the first page of a section/chapter/...

2008-09-22 Thread Marcin Borkowski
Hi,

I'd like to define a section-like thing (with \definehead) in a way that
prevents ConTeXt from putting the pagenumber on the _first_ page of this
section.  How do I do this?

Greets

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)
___
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] Pagenumbering on the first page of a section/chapter/...

2008-09-22 Thread Marcin Borkowski
Dnia Mon, Sep 22, 2008 at 07:27:28PM +0200, Marcin Borkowski napisa#322;(a):
 Hi,
 
 I'd like to define a section-like thing (with \definehead) in a way that
 prevents ConTeXt from putting the pagenumber on the _first_ page of this
 section.  How do I do this?

ok, I've got it:

\setuphead[something]
[footer=empty]

 
 Greets
 
 -- 
 Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)
 ___
 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
 ___

-- 
Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl)

If Microsoft ever makes anything which doesn't suck,
it will be a vacuum cleaner.
___
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
___


[NTG-context] placing section heads in toc

2008-08-10 Thread Idris Samawi Hamid ادريس سماوي ح امد
Dear gang,

This used to work:

=
\definehead[intro][chapter]
\setuphead [intro][numberstyle=normal,
  number=no,
  ownnumber=no,
  incrementnumber=no,
  continue=no,
  placehead=yes]
\definecombinedlist[mycontent][intro,chapter]   
\setupcombinedlist [mycontent][alternative=c]

\starttext
\title{Table of Contents}
\placemycontent

\intro{Preface}

\chapter{Test}

\chapter{Test}

\stoptext
=

The \intro head does not appear in the toc unless I first comment  
incrementnumber=no, which, of course, ruins the numbering. Is this a bug  
or is there a new protocol? Both mkiv and mkii diplay the same behavior.

using ConTeXt  ver: 2008.08.09

Is this a bug? If not, how can I get a non-numbered head into the toc?

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
___


[NTG-context] Custom Section / Table of contents inside a table

2008-08-08 Thread Demian Gutierrez
Hi folks,

I'm making a document with a lot of tables. I have templates for all
the kinds of tables, so authors only have to use the predefined macros
to fill the tables. That is working pretty well, but I still have two
little problems.

The first one, is that some of the author filled fields in the tables
should be part of the content table of the document, but in the filled
table itself, they should still look as normal text. To do so, I have
defined my own section, this way:

\definehead[fieldNameSection][subsection]
\setuphead[fieldNameSection][number=no, textstyle=\tfe]

And made a table of contents:

\definecombinedlist[content][fieldNameSection,myheader,subsection,subsubsection][textstyle=\tf]
\setupcombinedlist [content][alternative=c,textstyle=\tf]

So if I do:

\fieldNameSection{Some Title}

And then:

\placecontent

It works well and shows the entry in the table of contents. But when I
do it inside the table macro definition, and then use the macro:

\def\bCrudCampo{
  \doifnothing{\getvariable{CrudCampo}{CrudCampo}}
  {\section{Descripción de Campos}}
  \setvariables[CrudCampo][CrudCampo=FLG]

  \bgroup
  \def\bNombreCampoGUI##1\eNombreCampoGUI{
\setvariables[CrudCampo][NombreCampoGUIVAL={##1}]
\setvariables[CrudCampo][NombreCampoGUIFLG=FLG]
  }
}

\def\eCrudCampo{
  \def\keyNombreCampoGUI{Nombre del Campo (GUI):}

  \setupTABLE[c][1][width=0.2\textwidth]
\setupTABLE[c][2][width=0.8\textwidth]
\bTABLE[frame=on]
\bTR
  \bTD {\bf \keyNombreCampoGUI} \eTD
  \bTD

% COMENTED --
% \doifelsenothing{\getvariable{CrudCampo}{NombreCampoGUIFLG}}
% {\EMPTY}{\getvariable{CrudCampo}{NombreCampoGUIVAL}}
% COMENTED --

\fieldNameSection{*\getvalue{CrudCampo:NombreCampoGUIVAL}*}
  \eTD
\eTR
\eTABLE
\vskip2mm
\egroup
}

So when I use the

\fieldNameSection{*\getvalue{CrudCampo:NombreCampoGUIVAL}*}

in the previous code I get nothing but an empty entry in the table of
contents (well in fact with the * before and after I get just **).
The entry is shown in the TOC, but I don't see the text, only the dots
and the page number. It's like at some point the variable is empty at
the moment of generating the table of contents or something like that.
I really have not a clue about what I'm doing wrong...

The second issue is that the previous commented code:

\doifelsenothing{\getvariable{CrudCampo}{NombreCampoGUIFLG}}
{\EMPTY}{\getvariable{CrudCampo}{NombreCampoGUIVAL}}

Is the best way I've found so far to show an EMPTY in one of the
table fields when the author forgets to fill a row when using the
template. I've tried a lot of combinations of \setvariable, \setvalue,
and several \doifSOMETHING, but at this point it only works if the
author omits the \bNombreCampoGUI \eNombreCampoGUI pair, but if he
puts the commands, but left the content empty, then I don't get
EMPTY as result in the table and only got an empty string (nothing)
and I would like to have the EMPTY in both cases. Also I don't like
to use the variable NombreCampoGUIFLG, I think it's just a dirty
trick, but is the only solution I found so far. Is there a better way
to do the empty test there to achieve the desired behavior?

Thanks in advance, for any opinion, suggestion, critics or help :-)

Best Regards,
Demián.
___
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] \blank[inhibit] broken ???

2008-07-25 Thread Steffen Wolfrum
Hi,

looking for a reliable soluion to the problem of keeping section heads  
with following paragraphs I found the email below from Hans 2003.

But using it gives an error (see below):


\starttext

\definehead[myhead][section]
\setuphead[myhead][after={\blank[big]\blank[inhibit]}]

\input tufte \par
\input knuth \par
\input tufte \par
\input knuth \par

\myhead{Sektion}

\index{Index}

\subsection{Subsektion}

\input knuth \par


\stoptext


Is inhibit broken?


Steffen (still on mkii)


--

! Missing number, treated as zero.
to be read again
i
argument i
 nhibit
\redoblank ...\else \global \advance \blankskip #1
   \relax \fi \fi \fi
\dodorepeatwithcommand ...repeatwithcommand [#1]#5
   \else  
\dododorepeatwithcom...

\next1 ...lse \dorepeatwithcommand [#1]\redoblank
   \fi \fi \fi
\rawprocesscommaitem ...commalevel \endcsname {#1}
   \expandafter  
\rawprocessco...
...
l.17 \myhead{Sektion}

?


--
--


Am 10.04.2003 um 18:17 schrieb Hans Hagen:
NTG-context] keep section head with following paragraphs


 At 15:17 09/04/2003 -0700, you wrote:

 my question:
 how do i make sure that section heads will not be alone at the  
 bottom of
 the page, with the following paragraphs at the start of the next  
 page? i
 want the section head to stay with the first paragraph (or at least  
 the
 first two lines) of the paragraph immediately following the section  
 head.

 (1) use the sectioning commands, so

   \definehead[myhead][subsubsection]
   \setuphead[myhead][style=bold]

 instead of

   \def\myhead#1{{\bf#1}}

 since the sectioning commands will keep successive heads together as  
 well
 discourage a pagebreak after a head; only lower level heads are kept
 together, while sam elevel heads may break (makes sense)

 (2) this game is spoiled when the head is followed by a command like
 \blank; a way out can be:

   \setuphead[myhead][after={\blank[big]\blank[inhibit]}]

 another option is:

   \setuphead[myhead][before={\testpage[4]}]

 which will break if there are less than 4 lines left

 Hans



 -
   Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
   Ridderstraat 27 | 8061 GH Hasselt | The  
 Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
 -
information: http://www.pragma-ade.com/roadmap.pdf
 documentation: http://www.pragma-ade.com/showcase.pdf
 -



___
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] \blank[inhibit] broken ???

2008-07-25 Thread Wolfgang Schuster
On Fri, Jul 25, 2008 at 9:58 AM, Steffen Wolfrum [EMAIL PROTECTED] wrote:
 Hi,

 looking for a reliable soluion to the problem of keeping section heads with
 following paragraphs I found the email below from Hans 2003.

 But using it gives an error (see below):


 \starttext

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[big]\blank[inhibit]}]

 \input tufte \par
 \input knuth \par
 \input tufte \par
 \input knuth \par

 \myhead{Sektion}

 \index{Index}

 \subsection{Subsektion}

 \input knuth \par


 \stoptext


 Is inhibit broken?

'inhibit' is no legal value for \blank.

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] \blank[inhibit] broken ???

2008-07-25 Thread Steffen Wolfrum
... yes, but Hans said so (see my email quoting him)!!!

What did he mean?
Do you know an other solution?

St.


Am 25.07.2008 um 10:08 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 9:58 AM, Steffen Wolfrum [EMAIL PROTECTED] 
  wrote:
 Hi,

 looking for a reliable soluion to the problem of keeping section  
 heads with
 following paragraphs I found the email below from Hans 2003.

 But using it gives an error (see below):


 \starttext

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[big]\blank[inhibit]}]

 \input tufte \par
 \input knuth \par
 \input tufte \par
 \input knuth \par

 \myhead{Sektion}

 \index{Index}

 \subsection{Subsektion}

 \input knuth \par


 \stoptext


 Is inhibit broken?

 'inhibit' is no legal value for \blank.

 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] \blank[inhibit] broken ???

2008-07-25 Thread Wolfgang Schuster
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
[EMAIL PROTECTED] wrote:
 ... yes, but Hans said so (see my email quoting him)!!!

 What did he mean?
 Do you know an other solution?

\defineblankmethod [nobreak] {\penalty\plustenthousand}
\defineblankmethod [endgraf] {\endgraf}

\definehead[myhead][section]
\setuphead[myhead][after={\blank[endgraf,nobreak,big]}]

Not sure about the order in the blank command but this should work.

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] \blank[inhibit] broken ???

2008-07-25 Thread Steffen Wolfrum

Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:
 ... yes, but Hans said so (see my email quoting him)!!!

 What did he mean?
 Do you know an other solution?

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]

 Not sure about the order in the blank command but this should work.


Hmm, I think I have tried all possible combination now but it does not  
work.
Did you try?


\starttext

\defineblankmethod [nobreak] {\penalty\plustenthousand}
\defineblankmethod [endgraf] {\endgraf}

\definehead[myhead][section]
\setuphead[myhead][after={\blank[nobreak,endgraf,big]}]

\input tufte \par
\input knuth \par
\input tufte \par
\input knuth \par

\myhead{Sektion}

\index{Index}

test

\stoptext


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] \blank[inhibit] broken ???

2008-07-25 Thread Wolfgang Schuster
On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
[EMAIL PROTECTED] wrote:

 Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 ... yes, but Hans said so (see my email quoting him)!!!

 What did he mean?
 Do you know an other solution?

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]

 Not sure about the order in the blank command but this should work.

 Hmm, I think I have tried all possible combination now but it does not work.
 Did you try?

 \starttext

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]

 \input tufte \par
 \input knuth \par
 \input tufte \par
 \input knuth \par

 \myhead{Sektion}

 \index{Index}

 test

 \stoptext

 Steffen

You're looking for http://wiki.contextgarden.net/Registers#Technical_note

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] \blank[inhibit] broken ???

2008-07-25 Thread Steffen Wolfrum

Am 25.07.2008 um 10:39 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 ... yes, but Hans said so (see my email quoting him)!!!

 What did he mean?
 Do you know an other solution?

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]

 Not sure about the order in the blank command but this should work.

 Hmm, I think I have tried all possible combination now but it does  
 not work.
 Did you try?

 \starttext

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]

 \input tufte \par
 \input knuth \par
 \input tufte \par
 \input knuth \par

 \myhead{Sektion}

 \index{Index}

 test

 \stoptext

 Steffen

 You're looking for http://wiki.contextgarden.net/Registers#Technical_note


ok, but this was just one easily reproducible example of troubling  
situations.

For another is \vskip, as sometimes the distance between two heading  
must be smaller than the normal space above or below:

\subsection ...
\vskip-14pt
\subsubsection ...

In this situation I always experience the same problem: you have a  
heading at bottom of page :o(

I just didn't manage to show this with an minimal example.

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] \blank[inhibit] broken ???

2008-07-25 Thread Wolfgang Schuster
On Fri, Jul 25, 2008 at 10:52 AM, Steffen Wolfrum
[EMAIL PROTECTED] wrote:

 Am 25.07.2008 um 10:39 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 ... yes, but Hans said so (see my email quoting him)!!!

 What did he mean?
 Do you know an other solution?

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]

 Not sure about the order in the blank command but this should work.

 Hmm, I think I have tried all possible combination now but it does not
 work.
 Did you try?

 \starttext

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]

 \input tufte \par
 \input knuth \par
 \input tufte \par
 \input knuth \par

 \myhead{Sektion}

 \index{Index}

 test

 \stoptext

 Steffen

 You're looking for http://wiki.contextgarden.net/Registers#Technical_note


 ok, but this was just one easily reproducible example of troubling
 situations.

 For another is \vskip, as sometimes the distance between two heading must be
 smaller than the normal space above or below:

 \subsection ...
 \vskip-14pt
 \subsubsection ...

 In this situation I always experience the same problem: you have a heading
 at bottom of page :o(

 I just didn't manage to show this with an minimal example.

\newsignal\sectionsignal

\setuphead
  [section]
  [before={\blank[big]},
   after={\blank[2*big]\vskip\sectionsignal}]

\def\subsectionbefore
  {\ifdim\lastskip=\sectionsignal
 %\blank[-medium]%
 \vskip-\medskipamount
   \else
 \blank[big]%
   \fi}

\setuphead
  [subsection]
  [before=\subsectionbefore,
   after={\blank[big]}]

\showgrid

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


Re: [NTG-context] \blank[inhibit] broken ???

2008-07-25 Thread Steffen Wolfrum
wow ... the power of programming.

st.


Am 25.07.2008 um 13:22 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:52 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 Am 25.07.2008 um 10:39 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:

 On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
 [EMAIL PROTECTED] wrote:

 ... yes, but Hans said so (see my email quoting him)!!!

 What did he mean?
 Do you know an other solution?

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]

 Not sure about the order in the blank command but this should  
 work.

 Hmm, I think I have tried all possible combination now but it  
 does not
 work.
 Did you try?

 \starttext

 \defineblankmethod [nobreak] {\penalty\plustenthousand}
 \defineblankmethod [endgraf] {\endgraf}

 \definehead[myhead][section]
 \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]

 \input tufte \par
 \input knuth \par
 \input tufte \par
 \input knuth \par

 \myhead{Sektion}

 \index{Index}

 test

 \stoptext

 Steffen

 You're looking for http://wiki.contextgarden.net/Registers#Technical_note


 ok, but this was just one easily reproducible example of troubling
 situations.

 For another is \vskip, as sometimes the distance between two  
 heading must be
 smaller than the normal space above or below:

 \subsection ...
 \vskip-14pt
 \subsubsection ...

 In this situation I always experience the same problem: you have a  
 heading
 at bottom of page :o(

 I just didn't manage to show this with an minimal example.

 \newsignal\sectionsignal

 \setuphead
  [section]
  [before={\blank[big]},
   after={\blank[2*big]\vskip\sectionsignal}]

 \def\subsectionbefore
  {\ifdim\lastskip=\sectionsignal
 %\blank[-medium]%
 \vskip-\medskipamount
   \else
 \blank[big]%
   \fi}

 \setuphead
  [subsection]
  [before=\subsectionbefore,
   after={\blank[big]}]

 \showgrid

 \starttext
 \section{Section}
 \subsection{Subsection}
 text
 \section{Section}
 text
 \subsection{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  : 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
___


[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] Adding custom key/value pairs

2008-04-17 Thread Wolfgang Schuster
On Tue, Apr 15, 2008 at 5:34 PM, Aditya Mahajan [EMAIL PROTECTED] wrote:
 Hi Wolfgang,


 On Tue, 15 Apr 2008, Wolfgang Schuster wrote:

  On Mon, Apr 14, 2008 at 6:11 PM, Aditya Mahajan [EMAIL PROTECTED] wrote:
  On Mon, 14 Apr 2008, Taco Hoekwater wrote:
 
  Wolfgang Schuster wrote:
 
  Why not, I have nothing against a few predefined title pages layouts.
 
  Somewhat related: it would be nice if there was some common code for
  titles (books as well as articles).
 
  [snip]
 
  Anyway, the maps module contains all the code to do everything. And
  the same is true for the TUG module. And for quite a few others I have
  laying around. Lots of duplicate code all over, so a common framework
  would be great. I've been meaning to write one for a long time, but
  somehow I never quite get around to actually doing it.
 
  Just saying this to let you know that I would really welcome a module
  with commands like \setuptitle, \definetitle, and \placetitle.
 
  I agree with that. It will be really nice to have a module that does a few
  simple titles (alternate=(a|b|c), etc.) For one of my personal modules,
  I was following something along the lines of the maps module. But I find
  Wolfgang's solution on the wiki to be more ConTeXtish than what all other
  modules use.
 
  Hi Aditya,
 
  could you use a few lines what do you expect from a 
  placetitle/placetitlepage
  command or a titlepage environment.

 Some of the things that I use \placetitle for:

 * Writing academic papers. Currenly, I have a macro that I use like this:

 \article
[title ={...},
 author={...},
publication={...},% This just goes to pdf subtitle
date={...},
bottom={...}, %text placed at page bottom,
  %usually current revision number
thanks={...}, %placed on the footer of the first page
]

 \startabstract
 ...
 \stopabstract

 \startkeywords
 
 \stopkeywords

 The abstract environment places a head (Abstract) followed by its
 content. The formatting depends on whether it is a journal article, or a
 conference article.

 keyword also places a head followed by its content.

 Currently, what I have is that \article places all its contents, and so do
 abstract and keyword. So, I do not have to store anything.

 * TUGBoat articles: This uses a style file originally by Hans, which I
 have modified considerably, but still uses the same interface.

 This uses

 \setvariables
[tugboat]
[title={...},
 author={...},
 address={...},
 email={...},
 year={...},
 volume={..},
 number={...},
 page={...}]

 The title and the author go to the document title. The address and email
 go at the end of the article. The year, volume, number, and page go to the
 header and footer of the article.

 The rest of the article is somethng like

 \starttext
 \startArticle

 \startAbstract
 
 \stopAbstract
 ...

 \stopArticle
 \stoptext

 This structure is the reason I think something like \setuptitle (or
 \setupdocumenttitle) is needed.

 * Practex journal, which uses

 http://wiki.contextgarden.net/Modules/Pracjourn

 * My Ways which use

 http://wiki.contextgarden.net/Modules/MyWay

 * and finally Maps which use

 http://wiki.contextgarden.net/Modules/Maps

 

 Notice that almost all of them so similar things, but in slightly
 different manner. What I wish for is a common interface, and I really like
 your idea of \setuptitle. In fact, I think that something like that should
 be part of the core.

I module should be enogh for the start, makes it easier to test without
the need to create a new relase or replace one of the core files and to
generate a new format file.

 The module does not need to take care of all the formatting requirements:
 just provide the interface. For a particular publications, the module for
 that publication can modify the \placetitle command to do what they want.
 With this, the user documentation can just say that use

 \setuptitle[title=...,author=..., date=] %and maybe setups={...}

 So, we will have a consistent user inteferface for all documents.

  What should we do with the abstract, did it depend on the document title ...

 In general, the formatting of the abstract will depend on the kind of the
 document. Just need something like

 \definetitlesubstructure% or something more appropriate
   [abstract]
   [headtext={Abstract},
headstyle=bold,
headcolor=blue,
headalign=middle,
inbetween=\blank,%between the head and the body
style=small, %for the contents
color=black, %for the contents
   ]

I would replace headetext with \setuphead[abstract] and the format
for the table of content (is this what do you mean with for the content)
with \setuplist but should abstract use a own command to place the
title \definehead[abstract]  or can we use one of the predefined ones
(title -- new page or subject -- if you need a abstract in different languages
on one page).

 This should

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] interaction query

2008-02-15 Thread Wolfgang Schuster
On Fri, Feb 15, 2008 at 2:35 PM, Alan Bowen [EMAIL PROTECTED] wrote:
 Thanks, Hans. That is good to know.

  The cross-reference however is still in the wrong color. Is it a
  problem just on my box?

What do you want is not supported but you define your own command
with a colored pagenumber.

\setupcolors[state=start]

\setupinteraction[state=start,contrastcolor=blue,color=blue,style=rm]

\definereferenceformat
  [givepage]
  [command=\at,
   left={\color[blue]}]

\definehead[LevelBHead][subject]
\setupsectionblock[LevelBHead][number=no,page=right]
\setuphead[LevelBHead][style={\tf\rm},interaction=yes]

\starttext
\dorecurse{2}{\input knuth\par}\reference[Reference]{}
\dorecurse{3}{\input knuth\par}

\LevelBHead{B{-}Header\hfill\givepage[Reference]}
\dorecurse{2}{\input knuth\par}
\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
___


Re: [NTG-context] interaction query

2008-02-15 Thread Hans Hagen
Wolfgang Schuster wrote:
 On Fri, Feb 15, 2008 at 2:35 PM, Alan Bowen [EMAIL PROTECTED] wrote:
 Thanks, Hans. That is good to know.

  The cross-reference however is still in the wrong color. Is it a
  problem just on my box?
 
 What do you want is not supported but you define your own command
 with a colored pagenumber.
 
 \setupcolors[state=start]
 
 \setupinteraction[state=start,contrastcolor=blue,color=blue,style=rm]
 
 \definereferenceformat
   [givepage]
   [command=\at,
left={\color[blue]}]

hm, this left=comecolor is kind of tricky ... efectively you can get

\color[blue]123 == \color[blue]{1}


 \definehead[LevelBHead][subject]
 \setupsectionblock[LevelBHead][number=no,page=right]
 \setuphead[LevelBHead][style={\tf\rm},interaction=yes]
 
 \starttext
 \dorecurse{2}{\input knuth\par}\reference[Reference]{}
 \dorecurse{3}{\input knuth\par}
 
 \LevelBHead{B{-}Header\hfill\givepage[Reference]}
 \dorecurse{2}{\input knuth\par}
 \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
 ___


-- 

-
   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] interaction query

2008-02-15 Thread Alan Bowen
Wolfgang,

Many thanks for this. It does the job perfectly. I supplemented your  
suggestion (following your lead) with

\definereferenceformat
[givenote]
[command=\in,
left={\color[blue]}]

which gives me references formatted exactly as I need.

All best, Alan

On Feb 15, 2008, at 09;05,18 , Wolfgang Schuster wrote:

 On Fri, Feb 15, 2008 at 2:35 PM, Alan Bowen [EMAIL PROTECTED]  
 wrote:
 Thanks, Hans. That is good to know.

 The cross-reference however is still in the wrong color. Is it a
 problem just on my box?

 What do you want is not supported but you define your own command
 with a colored pagenumber.

 \setupcolors[state=start]

 \setupinteraction[state=start,contrastcolor=blue,color=blue,style=rm]

 \definereferenceformat
  [givepage]
  [command=\at,
   left={\color[blue]}]

 \definehead[LevelBHead][subject]
 \setupsectionblock[LevelBHead][number=no,page=right]
 \setuphead[LevelBHead][style={\tf\rm},interaction=yes]

 \starttext
 \dorecurse{2}{\input knuth\par}\reference[Reference]{}
 \dorecurse{3}{\input knuth\par}

 \LevelBHead{B{-}Header\hfill\givepage[Reference]}
 \dorecurse{2}{\input knuth\par}
 \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
 ___

___
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] interaction query

2008-02-14 Thread Alan Bowen
In my preface, I have

\setupinteraction[state=start,color=blue,style=rm]

\definehead[LevelBHead][subject]
\setupsectionblock[LevelBHead][number=no,page=right]
\setuphead[LevelBHead][style={\tf\rm},interaction=yes]

and in the source file proper,

\LevelBHead{Comment 3: {\em In de caelo} {\tf 481.12--15}\hfill
ref.\ 
\at[fnComment3]n\in[fnComment3]}

When I compile the file I get the proper heading and the cross- 
reference works as it should. What is odd is that this reference is  
not in blue. All my other kinds of cross-references look and behave as  
they should.

Any remedies for this admittedly minor problem will be greatly  
appreciated.

Cheers, Alan

PS I am using mkii. A.

___
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] interaction query

2008-02-14 Thread Alan Bowen
Thanks, Hans, but i still cannot get this to work.

Here is a simple file that conveys the problem (working link, but  
wrong color).

Alan

~

\setupinteraction[state=start,contrastcolor=blue,color=blue,style=rm]

\definehead[LevelBHead][subject]
\setupsectionblock[LevelBHead][number=no,page=right]
\setuphead[LevelBHead][style={\tf\rm},interaction=yes]

\starttext
\dorecurse{2}{\input knuth}\reference[Reference]{} \dorecurse{3} 
{\input knuth}.

\LevelBHead{B{-}Header\hfill\at[Reference]}
\dorecurse{2}{\input knuth}
\stoptext

~



On Feb 14, 2008, at 17;39,01 , Hans Hagen wrote:

 Alan Bowen wrote:
 In my preface, I have

 \setupinteraction[state=start,color=blue,style=rm]

 add contrastcolor=blue

 When I compile the file I get the proper heading and the cross-
 reference works as it should. What is odd is that this reference is
 not in blue. All my other kinds of cross-references look and behave  
 as
 they should.

 same page refs get contrastcolor

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

___
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] header to register

2008-01-28 Thread Wolfgang Schuster
On Jan 23, 2008 10:04 PM, Henning Hraban Ramm [EMAIL PROTECTED] wrote:
 Am 2008-01-22 um 11:31 schrieb Wolfgang Schuster:
  You could try to write \expanded{index{#1}} and use
  deeptextcommand=\TitleFrame.

 Thank you, I always forget about \expanded, and I didn't know about
 deeptextcommand at all...

 But it doesn't work, it stops with:

 TitelNoToc  : - Inhalt
 (./prd_creator.tuo
 ! Argument of \textormathspace has an extra }.
 inserted text
  \par
 to be read again
 }
 \doregistertexthowto ...?id #1\c!textcommand }{#2}
\dostopattributes
 \dohandleregisterentry ...exthowto {\v!index }{#1}
\fi \egroup \!!
 doneafalse
 \c!entrya ...urround \z@ \ldots \textormathspace }
\global
 \firstregisterentr...
 argument \c!entrya
   \c!entryb \c!entryc \c!entryd
 ...
 l.177 ...age{index}{,}{21}{2--0-6-0-0-0-0-0--5}{7}

 probably caused by \dots in:
 \Titel{Wach nun auf\dots}


 with those definitions:

 --- 8 ---
 \def\dots{\thinspace.\thinspace.\thinspace.\thinspace}

 \definehead[Titel][chapter]
 \definehead[TitelNoToc][chapter]
 \definehead[TitelNoPage][chapter]
 \definehead[TitelKlein][chapter]
 \def\TitelFrame#1{\expanded{\index{#1}}%
 \framed[
 width=\textwidth,
 height=7.5mm,
 frame=off,
 align={right,high},
 after={}, before={}]%
 {\switchtobodyfont[12pt]\hw\tfa #1}}
 \def\TitelFrameKlein#1{\expanded{\index{#1}}%
 \framed[
 width=\textwidth,
 height=5mm,
 frame=off,
 align={right,high},
 after={}, before={}]%
 {\switchtobodyfont[10pt]\hw\tfb #1}}
 \setuphead[Titel][page=yes, number=no, deeptextcommand=\TitelFrame]
 \setuphead[TitelNoToc][page=yes, number=no, deeptextcommand=\TitelFrame]
 \setuphead[TitelNoPage][page=no, number=no, deeptextcommand=\TitelFrame]
 \setuphead[TitelKlein][page=no, number=no, deeptextcommand=
 \TitelFrameKlein]

 --- 8 ---

 Does that mean that must not use any commands (like \dots) in my
 \expanded{\index{#1}}?

You could use \unknown

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] header to register

2008-01-23 Thread Henning Hraban Ramm
Am 2008-01-22 um 11:31 schrieb Wolfgang Schuster:
 You could try to write \expanded{index{#1}} and use
 deeptextcommand=\TitleFrame.

Thank you, I always forget about \expanded, and I didn't know about  
deeptextcommand at all...

But it doesn't work, it stops with:

TitelNoToc  : - Inhalt
(./prd_creator.tuo
! Argument of \textormathspace has an extra }.
inserted text
 \par
to be read again
}
\doregistertexthowto ...?id #1\c!textcommand }{#2}
   \dostopattributes
\dohandleregisterentry ...exthowto {\v!index }{#1}
   \fi \egroup \!! 
doneafalse
\c!entrya ...urround \z@ \ldots \textormathspace }
   \global  
\firstregisterentr...
argument \c!entrya
  \c!entryb \c!entryc \c!entryd
...
l.177 ...age{index}{,}{21}{2--0-6-0-0-0-0-0--5}{7}

probably caused by \dots in:
\Titel{Wach nun auf\dots}


with those definitions:

--- 8 ---
\def\dots{\thinspace.\thinspace.\thinspace.\thinspace}

\definehead[Titel][chapter]
\definehead[TitelNoToc][chapter]
\definehead[TitelNoPage][chapter]
\definehead[TitelKlein][chapter]
\def\TitelFrame#1{\expanded{\index{#1}}%
\framed[
width=\textwidth,
height=7.5mm,
frame=off,
align={right,high},
after={}, before={}]%
{\switchtobodyfont[12pt]\hw\tfa #1}}
\def\TitelFrameKlein#1{\expanded{\index{#1}}%
\framed[
width=\textwidth,
height=5mm,
frame=off,
align={right,high},
after={}, before={}]%
{\switchtobodyfont[10pt]\hw\tfb #1}}
\setuphead[Titel][page=yes, number=no, deeptextcommand=\TitelFrame]
\setuphead[TitelNoToc][page=yes, number=no, deeptextcommand=\TitelFrame]
\setuphead[TitelNoPage][page=no, number=no, deeptextcommand=\TitelFrame]
\setuphead[TitelKlein][page=no, number=no, deeptextcommand= 
\TitelFrameKlein]

--- 8 ---

Does that mean that must not use any commands (like \dots) in my  
\expanded{\index{#1}}?


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Bug or feature? Strange counter behaviour in macro

2008-01-12 Thread Aditya Mahajan

Hi Carsten,

On Fri, 11 Jan 2008, Carsten Fechtmann wrote:


first off: I am new to ConTeXt (even if not so new to LaTeX)
and would like to transfer some of my old macros to ConTeXt...

I am well aware, that this means re-programming (most) of them.
So be it.


Have you looked at enumerations? They provide a way to something very 
similar to what you want.



If one places \NewIssue[Some Time] somewhere in the text, it should
result in a new (issue / timestamp) to be generated, which can then
placed in a list of issues / changes.


\defineenuemration[Issue][title=yes]

\Issue[one]{January 9, 2008} blah blah blah

\Issue[two]{January 10, 2008} more blah blah blah

In issue \in[one] we wrote what we did on \about[one]


I also want to be able to make use of the last value Issue to be
placed in the header, same goes for the last timestamp


Another option may to think of issue as a section (or subsection)

\definehead[Issue][section]

\Issue {Jan 9, 2008} What we did at that time.

\Issue {Jan 10, 2008} something else

\stoptext

Then you can use \setupheadertexts[issue] to get the current issue in the 
header.



Now this is how I went out to do this in ConTeXt (maybe wrongly so?)
following the manual and some examples on contextwiki


I haven't looked at your code below. First check if one the in-built 
stuctural environments of ConTeXt do what you want.


Aditya


%---  code below  ---
\definesynonyms[Issue][issues][\IssueText][\IssueDate]
\setupsynonyms[Issue][criterium=all]

\newcounter\IssueCounter

\definenumber[IssueNumber]

\def\TempIssueText{%
%% This was the (seemingly) only way to get any value beside 0
%%  from \getnumber within doAddIssue
%% Original place for
\incrementnumber[IssueNumber]
Issue~\getnumber[IssueNumber]:
}
\def\NewIssue{\dosingleargument\doNewIssue}
\def\doNewIssue[#1]{%
\increment\IssueCounter  % This one works correctly.
%% Alternative place for
%\incrementnumber[IssueNumber]

%% if placed here instead of in \TempIssueText
%% a DIFFERENT, but still wrong result comes out
%% that is: Debug shows the right progression,
%% but ALL Issue x Numbers are set to the last one
Debug: \IssueCounter / \getnumber[IssueNumber]%
%% but alas I can't seem to make this work with the following lines :-(
\doifempty{#1}{\Issue[\IssueCounter]{\TempIssueText}{\currentdate}}
\doifnotempty{#1}{\Issue[\IssueCounter]{\TempIssueText}{#1}}
%% Note: Using \dofiemptyelse gives the same result,
%% I just wanted to make sure here that I am /really/ not calling it
twice,
%% somehow, by being able to disable each case, separately and
definitely.
-- \IssueCounter / \getnumber[IssueNumber]
\crlf
}
% -- -- -- -- -- --
\starttext
\NewIssue[January 9, 2008]
\NewIssue[January 10, 2008]
\NewIssue   % January 11, 2008

List of issue \# and dates:

\placelistofissues \blank

\IssueDate{\IssueCounter} % produces correct result in either case

\stoptext
%---  code above  ---

 Result as printed out by original version
--
 Debug: 1/ 0 – 1/ 0
 Debug: 2/ 0 – 2/ 0
 Debug: 3/ 0 – 3/ 0

 List of issue # and dates:
 Issue 2: January 9, 2008
 Issue 4: January 10, 2008
 Issue 6: January 11, 2008

 January 11, 2008
--
So while \IssueCounter is updated correctly and used with the right
values,
\getnumber[IssueNumber] always sees / reports the original value
However, the value in \placelistofissues are twice what they should be?!

This is changed if one places \incrementnumber[IssueNumber] INSIDE of
\doAddIssue
Here, \getnumber[IssueNumber] does report the right value (same as
IssueCounter)
However, in that case the result looks like this:

 Result as printed out by alternative version
--
Debug: 1/ 1 – 1/ 1
Debug: 2/ 2 – 2/ 2
Debug: 3/ 3 – 3/ 3

List of issue # and dates:

Issue 3: January 9, 2008
Issue 3: January 10, 2008
Issue 3: January 11, 2008

January 11, 2008

In short, while now the value of \getnumber[IssueNumber] is correct
before and after,
its value in \placelistofissues is always the last value, i.e. equal
to the total number of issues.

And this does NOT even change, when one replaces
Issue~\getnumber[IssueNumber]:
Issue~\IssueCounter:
in \TempIssueText

So for some reason, \TempIssueText is called twice ? How? Where?

Unfortunately, my ConTeXt.foo is not yet good enough to make it over
the TeX.bar here
as I haven't found a way to make this work (preferably with
\IssueCounter
as all this \XXXnumber stuff does not seem to work the way I think it
should, anyway...)

And yes, ANY help with this is very welcome by now

Sincerely
Carsten


P.S: Context version is 2007.01.12 15:56 / TeXlive / OS X


___
If your question is of interest to others as well

Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
OK, it's been a fun day's work, but here's the current working version of 
the context.cwl file.

What it does include:
* all the commands with all the fields mentioned on texshow.contextgarden.net
* the rest of the commands that I used from the list Idris sent me are 
currently commented out, until I find out they're valid (although not on 
texshow)
* all the fields have short descriptions
* all the \start* commands end with appropriate \stop* commands
* some of the fields (where it was simple to do it) use a '|' character as a 
separator inside fields

What it does not include:
* a syntax completely as Kile's README.cwl would want to have (especially 
because of my misuse of \start* \stop* in the same command and Mojca's 
separator suggestion)
* a completely coherent and Kile-valid syntax is still missing, although as 
it is, the file is usable
* some commands are commented out, as mentioned above

Installation:
copy or link the file to /usr/share/apps/kile/complete/tex/ (or the 
appropriate kile/complete/tex/ directory) and add context.cwl in Kile's 
settings under Kile-Complete-TeX/LaTeX

I hope anyone finds it useful and that I manage to get it working 
perfectly/validly soon.


Cheers,
Matija

-- 
gsm: +386 41 849 552
e-mail: [EMAIL PROTECTED]
www: http://matija.suklje.name

aim: hookofsilver
icq: 110183360
jabber/g-talk: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]
yahoo: matija_suklje
# ConTeXt commands
# Matija silverhook Šuklje, 02. Jan. 2008 — [EMAIL PROTECTED]
# URL: todo

\about{text}[reference]
\adaptlayout[number][dimensions]
\adding[size]
# \aftersplitstring
# \and
\appendix[references]{text}
# \appendtoks
# \AR
\arg{text}
\at{text}{text}[reference]
\atpage[reference]
\background
# \bbox
# \beforesplitstring
# \begstrut
\blackrule[settings]
\blackrules[settings]
\blank[size]
# \blockquote
\bookmark[name]{text}
# \bTABLE
# \bTABLEbody
# \bTABLEfoot
# \bTABLEhead
# \bTABLEnext
# \bTD
# \bTH
# \bTR
\but[reference]
\button[settings]{text}[references]
\bypassblocks[names][names]
\CAP{text}
\Cap{text}
\cap{text}
\Caps{text}
\chapter[references]{text}
\Character{text}
\character{text}
\Characters{text}
\characters{text}
\chem{text}{text}{text}
\clip[settings]{text}
\clonefield[name][names][name][names]
\color[text{text}
\column
# \commalistelement
\comment[name][settings]{text}
\comparecolorgroup[name]
\comparepalet[name]
\completecombinedlist[name][settings]
\completelistoffloats
\completelistofsorts
\completelistofsynonyms
\completeregister[settings]
# \component
# \ConTeXt
# \Context
# \convertargument
# \convertcommand
\convertnumber{text}{text}
\copyfield[name][names]
\correctwhitespace{text}
# \countXMLchildren
\coupledocument[name][file][name]
\coupledregister[text]{text}
\couplemarking[name][name]
\couplepage[names][options]
\couplepaper[name]
\coupleregister[name]
\crlf
\currentdate[syntax]
\currentheadnumber
\date[date][syntax]
\decouplemarking[name]
# \decrement
\define[number]\command{text}
\defineblank[name][settings]
\defineblock[name]
\definebodyfont[font size][type][files]
\definebodyfontenvironment[font size][dimensions]
\definebuffer[name]
# \definecollector
\definecolor[name]{colour values}
\definecolorgroup[name][colour model][colour values]
\definecombinedlist[name][list][settings]
\defineconversion[name][command]
\definedescription[name][settings]
# \definedfont
\defineenumeration[names][name][settings]
# \defineexternalfigure
\definefield[reference][widget type][setup name][names][initial content]
\definefieldstack[name][names][settings]
\definefiguresymbol[name][text][settings]
\definefloat[singular][plural]
\definefont[name][file]
# \definefontsynonym
\defineframed[name][settings]
# \defineframedcontent
\defineframedtext[name][settings]
\definehead[name][section]
# \definehspace
\defineindenting[name][settings]
\defineinteractionmenu[position|names][options and settings]
\defineinteractionmenu[position|name][position|name][settings]
\definelabel[name][text and options]
# \definelayer
# \definelayerpreset
# \definelayout
\definelist[name][name][settings]
\definelogo[name][position][position][command][state]
# \definemainfield
\definemakeup[name][settings]
\definemarking[name][name]
# \definemeasure
# \defineoutput[name][specials]
\defineoverlay[names][command]
# \definepagebreak
\definepalet[name][name]
\definepapersize[name][dimenstions]
\defineparagraphs[name][options and settings]
\defineprofile[names][names]
\defineprogram[name][text][text]
# \definepushbutton
# \definepushsymbol
\definerawfont[name][file][settings]
\definereference[name][references]
\definereferenceformat[name][options]
\definereferencelist[name][settings]
\defineregister[singular][plural]
\definerule[name][settings]
\definesection[name]
\definesectionblock[name][settings]
\definesorting[singular][plural][command]
\definestartstop[name][commands]
\definesubfield[name][name][names]
\definesymbol[name][text]
\definesynonyms[singular][plural][command][command]
\definetabletemplate[name][text][text][text

Re: [NTG-context] chapter without number but in table of contents

2007-12-17 Thread Wolfgang Schuster
2007/12/15, Patrick Gundlach [EMAIL PROTECTED]:
 Hello Wolfgang,

  I know that this must be an faq and I seem to have lost my context
  knowledge:
 
  I'd like to get an unnumbered chapter, but it should appear in the
  table of contents. This is what I've tried so far:
 
  --
  \completecontent
  [alternative=c]
 
  \definehead[mychapter][chapter]
  \setuphead [mychapter][number=no]
 
  add incrementnumber=list to \setuphead

 This doesn't seem to work:

 --
 \starttext

 \completecontent
 [alternative=c]

 \chapter{chapter1}
 \chapter{chapter2}
 \chapter{chapter3}

 \definehead[mychapter][chapter]
 \setuphead [mychapter][number=no,incrementnumber=list]

 \mychapter{chapter4}

 \stoptext
 --

 I'd like to have an (unnumbered) entry for 'chapter4' in the table of
 contents.


 Did I misunderstand your suggestion perhaps?

 My version is:
 ConTeXt  ver: 2007.01.12 15:56 MKII  fmt: 2007.10.10  int: english/english

 Patrick


You should take a look into core sec and you will see you need
also the coupling key, the following setup did work.

\definehead[mychapter][chapter]
\setuphead [mychapter][coupling=chapter,incrementnumber=list]

\starttext

\completecontent

\chapter{Chapter 1}
\mychapter{Chapter 2}

\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] chapter without number but in table of contents

2007-12-15 Thread Patrick Gundlach
Hi,

I know that this must be an faq and I seem to have lost my context
knowledge:

I'd like to get an unnumbered chapter, but it should appear in the
table of contents. This is what I've tried so far:


--
\completecontent
[alternative=c]

\definehead[mychapter][chapter]
\setuphead [mychapter][number=no]

\mychapter [sec:somechapter]{Some Chapter Without A Number}
\input tufte


The chapter heading looks fine, but the entry is missing from the
table of contents. Any idea?



Patrick
-- 
ConTeXt wiki and more: 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] chapter without number but in table of contents

2007-12-15 Thread Patrick Gundlach
Hello Wolfgang,

 I know that this must be an faq and I seem to have lost my context
 knowledge:

 I'd like to get an unnumbered chapter, but it should appear in the
 table of contents. This is what I've tried so far:

 --
 \completecontent
 [alternative=c]

 \definehead[mychapter][chapter]
 \setuphead [mychapter][number=no]

 add incrementnumber=list to \setuphead

This doesn't seem to work:

--
\starttext 

\completecontent
[alternative=c]

\chapter{chapter1}
\chapter{chapter2}
\chapter{chapter3}

\definehead[mychapter][chapter]
\setuphead [mychapter][number=no,incrementnumber=list]

\mychapter{chapter4}

\stoptext
--

I'd like to have an (unnumbered) entry for 'chapter4' in the table of
contents.


Did I misunderstand your suggestion perhaps? 

My version is: 
ConTeXt  ver: 2007.01.12 15:56 MKII  fmt: 2007.10.10  int: english/english

Patrick

-- 
ConTeXt wiki and more: 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] chapter without number but in table of contents

2007-12-15 Thread Henning Hraban Ramm
Am 2007-12-15 um 17:33 schrieb Patrick Gundlach:

 \starttext

 \completecontent
 [alternative=c]

 \chapter{chapter1}
 \chapter{chapter2}
 \chapter{chapter3}

 \definehead[mychapter][chapter]
 \setuphead [mychapter][number=no,incrementnumber=list]

 \mychapter{chapter4}

 \stoptext
 --

 I'd like to have an (unnumbered) entry for 'chapter4' in the table of
 contents.



I'd setup my own combinedlist on mychapter.

 From my last project:

\setuphead[Titel][style={\hw\tfa}, page=yes, number=no, textcommand= 
\TitelFrame]
\setuphead[TitelNoToc][style={\hw\tfa}, page=yes, number=no,  
textcommand=\TitelFrame]
\setuphead[TitelNoPage][style={\hw\tfa}, page=no, number=no,  
textcommand=\TitelFrame]
\setuphead[TitelKlein][style={\hw\tfb}, page=no, number=no,  
textcommand=\TitelFrameKlein]

% define combined table of contents
\definecombinedlist [inhalt]
[Titel, TitelKlein, TitelNoPage]
[level=Titel, placehead=yes, criterium=all,
alternative=b,
offset=none]
\setupcombinedlist  [inhalt] [partnumber=no]

\placeinhalt


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] PDF Bookmarks on unnumbered subjects/titles etc

2007-12-12 Thread Wolfgang Schuster
2007/12/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Has anyone managed to get ConTeXt to generate PDF bookmarks for
 the unnumbered headings such as \title, \subject, etc?

 I saw the examples on the wiki page but unfortunately they
 did nothing.

 http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers

 \setupinteraction[state=start]
 \placebookmarks[chapter]
 \setupinteractionscreen[option=bookmark]
 \starttext
 \chapter{some chapter}
 \bookmark{a title}
 some text
 \stoptext

 The above example correctly generates bookmarks in the PDF.

 I can't, however, get the same thing to work when using
 \subject. Even explicitly placing bookmarks with \bookmark
 doesn't work:

 \setupinteraction[state=start]
 \placebookmarks[chapter] % didn't add subject here as the wiki
  % says it doesn't work, and it's correct
 \setupinteractionscreen[option=bookmark]
 \starttext
 \subject{some chapter}
 \bookmark{a title}
 some text
 \stoptext

You can to play with the following code, I don't know why it produce multiple
bookmark entries and even more with text between the headers but it's funny.

\setupinteraction[state=start]
\def\sectionbookmark#1{\bookmark[section]{#1}#1}
\def\subjectbookmark#1{\bookmark[subject]{#1}#1}
\setuphead[section][deeptextcommand=\sectionbookmark]
\setuphead[subject][deeptextcommand=\subjectbookmark]
\placebookmarks[chapter,section,subject]
\setupinteractionscreen[option=bookmark]
\starttext
\chapter{Chapter}
\section{Section}
\subject{Subject}
\section{Another section}
\chapter{Second Chapter}
text
\section{First section in second chapter}
text
\subject{Another Subject}
text
\section{Last section}
text
\stoptext

 The wiki page also has this:

 \definehead[Title][Chapter]
 \setuphead[Title][number=no]

 But that doesn't make the slightest difference.

 Anybody got any ideas how to get this to work? I'm using:

 pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
 TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
 texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
 tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
 context : ver: 2005.01.31
 cont-en : ver: 2005.01.31 fmt: 2007.5.21 mes: english

You ConTeXt is ancient and you should update to the current version.

 Apologies if my replies to this list are apparently nonexistent.
 So far it seems as if most of them have bounced with a strange
 unrouteable address error.

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] PDF Bookmarks on unnumbered subjects/titles etc

2007-12-11 Thread mir_ctx
Has anyone managed to get ConTeXt to generate PDF bookmarks for
the unnumbered headings such as \title, \subject, etc?

I saw the examples on the wiki page but unfortunately they
did nothing.

http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers

\setupinteraction[state=start]
\placebookmarks[chapter]
\setupinteractionscreen[option=bookmark]
\starttext
\chapter{some chapter}
\bookmark{a title}
some text
\stoptext

The above example correctly generates bookmarks in the PDF.

I can't, however, get the same thing to work when using
\subject. Even explicitly placing bookmarks with \bookmark
doesn't work:

\setupinteraction[state=start]
\placebookmarks[chapter] % didn't add subject here as the wiki
 % says it doesn't work, and it's correct
\setupinteractionscreen[option=bookmark]
\starttext
\subject{some chapter}
\bookmark{a title}
some text
\stoptext

The wiki page also has this:

\definehead[Title][Chapter]
\setuphead[Title][number=no]

But that doesn't make the slightest difference.

Anybody got any ideas how to get this to work? I'm using:

pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
context : ver: 2005.01.31
cont-en : ver: 2005.01.31 fmt: 2007.5.21 mes: english

Apologies if my replies to this list are apparently nonexistent.
So far it seems as if most of them have bounced with a strange
unrouteable address error.
-- 
  
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html

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

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


Re: [NTG-context] cv templates

2007-09-14 Thread Andrea Valle

(added to wiki)
http://wiki.contextgarden.net/Sample_documents#Simple_Documents

-a-


On 14 Sep 2007, at 09:02, Bert Trüger wrote:


Hi frantisek,

this Context-CV-Example was send over this mailing list a year or  
so ago..


Kind regards,

Chris





%% Ein Context-Skript als Vorlage für einen Lebenslauf

%D \module

\setuppapersize[letter][letter]

\setuplayout[backspace=1.5in,width=5.5in,margin=2.5em]

\setuppagenumbering[location=footer]

\setupinmargin[align=right]

\setupitemize[1][paragraph,atmargin,unpacked][symbol=n,indentnext=no,]
\setupitemize[2][symbol=a][indentnext=no]
%\setupitemize[3][symbol=a][indentnext=no]

\definehead[CVHEAD][subject]
\setuphead[subject][style=\bfa,after={\blank[medium]}]

\definehead[SUBCVHEAD][subsubject]
\setuphead[subsubject][style=\bf,after={\blank[small]},before= 
{\blank[small]}]


\defineparagraphs[ContactColumns][n=2]
\setupparagraphs[ContactColumns][each][rule=off,distance=0pt]

\define[2]\CVTITLE{\midaligned{\framed[frame=off,align=middle]
{{\bfa
#1}\blank[medium]{\tfb#2}}}\blank[small]}

\define[1]\CVEMAIL{{\bf Email:}{ \type{#1}}\blank}

% \framed is good for testing or fine-tuning \CONTACT
\define[2]\CONTACT{%\framed 
[frame=off,width=broad,align=right,strut=no,

 %offset=none,height=fit]
 %{%
\startalignment[middle]
\startContactColumns
 {\bf Office:}\crlf
 {#1}
 \ContactColumns
 {\bf Home:}\crlf
 {#2}
\stopContactColumns
\stopalignment}
%}

% \framed is used to prevent pagebreaks within an \ITEM

\define[5]\EDUITEM{\framed[frame=off,align=right,width=broad]
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\blank[small]}}
\define[6]\EDUITEMMA{\framed[frame=off,align=right,width=broad]
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\crlf
 {\bf Thesis:} {\em #6}.
 \blank[small]}}
\define[7]\EDUITEMPHD{\framed[frame=off,align=right,width=broad]
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\crlf
 {\bf Dissertation:} {\em #6}.\crlf
 {\bf Advisor:} #7.
 \blank[small]}}

\define[4]\ACADITEM{\framed[frame=off,align=right,width=broad]
 {{\bf Location:}\inmargin{\it #1}\ #2.\crlf
 {\bf Position:} #3.\crlf
 {\bf Responsibilities:} #4.
 \blank[small]}}

\define[2]\GRANTITEM{\framed[frame=off,align=right,width=broad]
 {\inmargin{\it #1} #2.}}

\setupbodyfont[11pt] % 11pt seems pretty standard for cv's

\endinput
=

===cv-resume.tex=
\usemodule[resume]

\starttext

\CVTITLE{Curriculum Vitae}{Idris Samawi Hamid}

\CONTACT{Department of \TeX\ Studies\crlf
  % 221 Eddy Hall\crlf
  \TeX\ State University\crlf
  Fort Collins, CO 80523 \crlf USA\crlf
  (970) 491-2406/6315
 }
 {1234 \TeX\ Road\crlf
  \TeX{}ville, CO 80555 \crlf USA\crlf
  (800) TEX-\crlf}

[EMAIL PROTECTED] }

\CVHEAD{Education}

\EDUITEMPHD
 {PhD}
 {2007}
 {\TeX\ Studies}
 {\TeX\ University}
 {Amherst, NY}
 {Arabic Critical Editions}
 {\TeX\ Distinguished Professor Hans Hagen}

\EDUITEMMA
 {MA}
 {1996}
 {Physics}
 {University at Buffalo, State University of New York}
 {Amherst, NY}
 {G\{o}del's Universe, the Mach Principle, and the Cosmological
Principle:
 Considerations for the Philosophy of Physics}

\EDUITEM{BSc}{1990}{Physics; minor, Mathematics}{Georgia State
University}{Atlanta, GA}


%% positions
% academic positions
\CVHEAD{Academic Positions}

\ACADITEM
 {2001--2007}
 {\TeX\ State University, \TeX{}ville, CO}
 {Associate Professor}
 {Instruction and research, especially
 the development of upper-level courses in \TeX\ and \Context}

\CVHEAD{Areas of Specialization}

Metaphysics of \TeX, Islamic Philosophy, Philosophy of Mysticism,
Philosophy of Science.

\CVHEAD{Philosophic Interests}

\TeX\ Logic, Category Theory, Chinese Philosophy.

% other skills

\CVHEAD{Languages and Technical Skills}

Arabic, French, and the professional computer typesetting language
\TeX, including the major dialects \LaTeX, \Context, as well as
the minor dialects Arab\TeX (for typesetting in Arabic script) and
EDMAC (for critical edition typesetting). I am also developing a
new Arabic-script system for scholarly typesetting, {\sc Oriental
\TeX}, based upon \TeX\ and \Context.

% patents

\CVHEAD{Publications}

\SUBCVHEAD{Books Authored}

\startitemize

\item Idris Samawi Hamid, 2006, {\it The Cosmology of \TeX

Re: [NTG-context] cv templates

2007-09-14 Thread Bert Trüger
Hi frantisek,

this Context-CV-Example was send over this mailing list a year or so ago..

Kind regards,

Chris





%% Ein Context-Skript als Vorlage für einen Lebenslauf

%D \module

\setuppapersize[letter][letter]

\setuplayout[backspace=1.5in,width=5.5in,margin=2.5em]

\setuppagenumbering[location=footer]

\setupinmargin[align=right]

\setupitemize[1][paragraph,atmargin,unpacked][symbol=n,indentnext=no,]
\setupitemize[2][symbol=a][indentnext=no]
%\setupitemize[3][symbol=a][indentnext=no]

\definehead[CVHEAD][subject]
\setuphead[subject][style=\bfa,after={\blank[medium]}]

\definehead[SUBCVHEAD][subsubject]
\setuphead[subsubject][style=\bf,after={\blank[small]},before={\blank[small]}]

\defineparagraphs[ContactColumns][n=2]
\setupparagraphs[ContactColumns][each][rule=off,distance=0pt]

\define[2]\CVTITLE{\midaligned{\framed[frame=off,align=middle]
{{\bfa
#1}\blank[medium]{\tfb#2}}}\blank[small]}

\define[1]\CVEMAIL{{\bf Email:}{ \type{#1}}\blank}

% \framed is good for testing or fine-tuning \CONTACT
\define[2]\CONTACT{%\framed[frame=off,width=broad,align=right,strut=no,
 %offset=none,height=fit]
 %{%
\startalignment[middle]
\startContactColumns
 {\bf Office:}\crlf
 {#1}
 \ContactColumns
 {\bf Home:}\crlf
 {#2}
\stopContactColumns
\stopalignment}
%}

% \framed is used to prevent pagebreaks within an \ITEM

\define[5]\EDUITEM{\framed[frame=off,align=right,width=broad]
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\blank[small]}}
\define[6]\EDUITEMMA{\framed[frame=off,align=right,width=broad]
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\crlf
 {\bf Thesis:} {\em #6}.
 \blank[small]}}
\define[7]\EDUITEMPHD{\framed[frame=off,align=right,width=broad]
 {{\bf #1}\inmargin{\it #2}\ (#3).\crlf
 {\bf #4}, #5.\crlf
 {\bf Dissertation:} {\em #6}.\crlf
 {\bf Advisor:} #7.
 \blank[small]}}

\define[4]\ACADITEM{\framed[frame=off,align=right,width=broad]
 {{\bf Location:}\inmargin{\it #1}\ #2.\crlf
 {\bf Position:} #3.\crlf
 {\bf Responsibilities:} #4.
 \blank[small]}}

\define[2]\GRANTITEM{\framed[frame=off,align=right,width=broad]
 {\inmargin{\it #1} #2.}}

\setupbodyfont[11pt] % 11pt seems pretty standard for cv's

\endinput
=

===cv-resume.tex=
\usemodule[resume]

\starttext

\CVTITLE{Curriculum Vitae}{Idris Samawi Hamid}

\CONTACT{Department of \TeX\ Studies\crlf
  % 221 Eddy Hall\crlf
  \TeX\ State University\crlf
  Fort Collins, CO 80523 \crlf USA\crlf
  (970) 491-2406/6315
 }
 {1234 \TeX\ Road\crlf
  \TeX{}ville, CO 80555 \crlf USA\crlf
  (800) TEX-\crlf}

[EMAIL PROTECTED]

\CVHEAD{Education}

\EDUITEMPHD
 {PhD}
 {2007}
 {\TeX\ Studies}
 {\TeX\ University}
 {Amherst, NY}
 {Arabic Critical Editions}
 {\TeX\ Distinguished Professor Hans Hagen}

\EDUITEMMA
 {MA}
 {1996}
 {Physics}
 {University at Buffalo, State University of New York}
 {Amherst, NY}
 {G\{o}del's Universe, the Mach Principle, and the Cosmological
Principle:
 Considerations for the Philosophy of Physics}

\EDUITEM{BSc}{1990}{Physics; minor, Mathematics}{Georgia State
University}{Atlanta, GA}


%% positions
% academic positions
\CVHEAD{Academic Positions}

\ACADITEM
 {2001--2007}
 {\TeX\ State University, \TeX{}ville, CO}
 {Associate Professor}
 {Instruction and research, especially
 the development of upper-level courses in \TeX\ and \Context}

\CVHEAD{Areas of Specialization}

Metaphysics of \TeX, Islamic Philosophy, Philosophy of Mysticism,
Philosophy of Science.

\CVHEAD{Philosophic Interests}

\TeX\ Logic, Category Theory, Chinese Philosophy.

% other skills

\CVHEAD{Languages and Technical Skills}

Arabic, French, and the professional computer typesetting language
\TeX, including the major dialects \LaTeX, \Context, as well as
the minor dialects Arab\TeX (for typesetting in Arabic script) and
EDMAC (for critical edition typesetting). I am also developing a
new Arabic-script system for scholarly typesetting, {\sc Oriental
\TeX}, based upon \TeX\ and \Context.

% patents

\CVHEAD{Publications}

\SUBCVHEAD{Books Authored}

\startitemize

\item Idris Samawi Hamid, 2006, {\it The Cosmology of \TeX}, \TeX\
University Press, 240 pp.

\stopitemize

\SUBCVHEAD{Articles}

\startitemize

\item Idris Samawi Hamid,  2005, {\it Installing Expert Fonts

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
___


<    1   2   3   4   5   6   >