Re: [NTG-context] setuppage is ignored

2014-05-08 Thread Thomas Friedrich
Thanks Wolfgang, it does work now!

I didn't now that the counter would be called 'userpage'.  It thought
I had to set the page-counter (\setconter[page][1]), as I was using

\setuppagenumber[numberconversion=numbers,state=start]

and not

\setupuserpagenumber[numberconversion=numbers,state=start]

It seems as if both commands have the same effect. Are these synonyms?

Is there a way for an end-user (like me) to infer from a command as
\setuppagenumber that the corresponding counter is called "userpage"?
I am just asking so I may get an understanding of how ConTeXt works,
and I don't have to bother the list with so many questions.

Thanks in advance.

Best
Thomas


2014-05-07 14:25 GMT+02:00 Wolfgang Schuster :
>
> Am 07.05.2014 um 10:57 schrieb Thomas Möbius :
>
>> Dear list,
>>
>> it seems as if \setupnumber is ignored or I am using the wrong way to
>> reset the page numbering.
>>
>> How to start the page numbering at 1 in the body matter?
>
> You have to change the value of the “userpage” counter, i.e. 
> \setcounter[userpage][1] is needed.
>
> 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
> ___



-- 
Thomas Möbius
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedr...@statistik.tu-dortmund.de
___
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] Force two figures to appear on the same page

2014-05-07 Thread Thomas Friedrich
Thank you Wolfgang, it works like a bliss!

Best
Thomas


2014-05-06 12:49 GMT+02:00 Wolfgang Schuster :
>
> Am 06.05.2014 um 12:36 schrieb Thomas Friedrich 
> :
>
>> Unfortunately, this is not what I am looking for: Both figures have
>> there own caption and shall appear as separate figures in the "list of
>> figures" at the end of the document.
>
>
> You can use the floatcombination environment to put many floats into a single 
> block,
> the figure environment around the combination environment where I disabled
> the counter is used to center the block.
>
> \setupexternalfigures[location=default]
>
> \starttext
>
> \input knuth
>
> \startplacefigure[location=nonumber]
> \startfloatcombination[1*2]
> \startplacefigure[title={Dutch cow}]
> \externalfigure[cow][width=4cm]
> \stopplacefigure
> \startplacefigure[title={English cow}]
> \externalfigure[cow][width=4cm]
> \stopplacefigure
> \stopfloatcombination
> \stopplacefigure
>
> \input ward
>
> \stoptext
>
> Wolfgang
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___



-- 
Thomas Möbius
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedr...@statistik.tu-dortmund.de
___
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] Force two figures to appear on the same page

2014-05-06 Thread Thomas Friedrich
Unfortunately, this is not what I am looking for: Both figures have
there own caption and shall appear as separate figures in the "list of
figures" at the end of the document.

2014-04-30 22:39 GMT+02:00 Andres Conrado :
> Maybe combinations is what you are looking for? It works very well for me.
> http://wiki.contextgarden.net/Command/startcombination
>
> Andres
>
> ___
> 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
> ___



-- 
Thomas Möbius
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedr...@statistik.tu-dortmund.de
___
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] setupenumerations overwriting setupitemize

2014-02-20 Thread Thomas Friedrich
2014-02-20 14:52 GMT+01:00 Wolfgang Schuster :
>
> Am 20.02.2014 um 14:45 schrieb Thomas Möbius :
>
>> A general question.  I use setupenumerations to define theorem-,
>> lemma-, and definition-environments for my document.  I realised that
>> setupenumerations is overwriting keys that are set in setupitemize
>> (and groups defined by defineitemgroup).
>>
>> ~~~snip~~~
>> \setupenumerations [numberconversion=numbers]
>>
>> \starttext
>> \startitemize[a]
>>  \item Text Text
>>  \item Text Text
>> \stopitemize
>> \stoptext
>> ~~~snip~~~
>>
>> vs.
>>
>> ~~~snip~~~
>> %\setupenumerations [numberconversion=numbers]
>>
>> \starttext
>> \startitemize[a]
>>  \item Text Text
>>  \item Text Text
>> \stopitemize
>> \stoptext
>> ~~~snip~~~
>>
>> This is unintuitive for me.. Is this expected behavior??
>
> What is the problem, I can’t see a difference in the output of both examples?
>
> Wolfgang

Interesting..

In the first example I see

1. Text Text
2. Text Text

in the second, I see

a. Text Text
b. Text Text

I am using the context version from the Ubuntu package manager.

% context --version

mtx-context | ConTeXt Process Management 0.52
mtx-context |
mtx-context | main context file: /usr/share/texmf/tex/contex
t/base/context.mkiv
mtx-context | current version: 2012.05.30 11:26

Probably, I should update.
___
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] Numbering enumerations in mkiv

2013-07-22 Thread Thomas Friedrich
Hello,

the mechanism for how to share the numbering of enumerations seems to
have changed from mkii to mkiv. I used the following code to typeset
theorems and lemmata in mkii. The typeset is very different when
complied with mkiv: In the following code, for example, the lemma is
missing its number, and there is an additional line break after each
theorem title.

~~~ snip ~~~
\setupcolors[state=start]

\setupframedtexts
[width=\makeupwidth,
frame=off,
bottomframe=on,
topframe=on,
background=screen,
backgroundscreen=.95]

\setupenumerations
[title=yes,
style=normal,
list=all,
before={\blank[big]},
after={\blank[big]},
location=serried,
width=broad,
distance=0.5em,
headstyle=bold,
titlestyle=bold,
way=bychapter,
conversion=numbers,
before=\startframedtext,
after=\stopframedtext]

\defineenumeration
[theorem]
[text=Theorem, listtext={Theorem }]

\defineenumeration
[lemma]
[text=Lemma, listtext={Lemma }, number=theorem]

\starttext
\theorem Something $a=bc$.

\theorem Something else.

\lemma And something.

\theorem And something else.

\stoptext
~~~ snip ~~~

How can I mimic the original typeset produced by 'texexec', so I can use mkiv?

Thank you a lot!

Thomas
___
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] Table cell spanning multiple columns in tabulate

2013-07-16 Thread Thomas Friedrich
2013/7/16 Sietse Brouwer :
> Thomas Friedrich wrote:
>>> I am switching from texexec to context, and from table to tabulate.
>>> Question: What is the equivalent for \use{2}\ReFormat[c]{text} in the
>>> \table environment, when you what to do the same in the \tabulate
>>> environment? I couldn't find the answer in the context garden.
>
> Wolfgang Schuster wrote:
>> The tabulate environment has no support for spanned cells.
>
> The TABLE mechanism does, though, and that is probably the mkiv
> standard for writing non-trivial tables. It's a bit more verbose, but
> it can do an enormous number of things -- including many things that
> the tabulate mechanism can't. Wiki link:
> http://wiki.contextgarden.net/TABLE
>
> The equivalent of \use{2}\ReFormat[c]{text} would be this (rest of
> table code added to make this example self-contained and compilable):
>
> \bTABLE
>   \bTR
> \bTD[nc=2, align=center] text \eTD
>   \eTR
>   \bTR
> \bTD apples \eTD
> \bTD oranges \eTD
>   \eTR
> \eTABLE
>
> Hope this help!
> Cheers,
> Sietse

Thanks for pointing this out, and I did indeed rewrite the code, so it
would work with the TABLE mechanism. It's a bit like breaking a
butterfly with a wheel. Please have a look at the following code, as I
think I may have found bug in the TABLE mechanism.

The following code does exactly what I want but it has a pretty bad
hack on line 7, where I reference all columns by
[1,2,3,4,5,6,7,8][1,2,3] rather than using the [r][1,2,3], since the
latter does not work as expected.  It seems that statements concerning
columns take precedence before statements that concern rows.  In the
example below, \setupTABLE[c][1,2,3][align=right] overwrites
\setupTABLE[r][1,2][align=center] --- no matter where you put the
latter (before or after the former statement). At least for me, this
is rather unintuitive.

~~~ snip ~~~
\enableregime[utf-8]
\starttext
\placetable[here][tab:bcg-study-data]{The table shows results}{%

\bTABLE
\setupTABLE[r][each][align=left]
\setupTABLE[1,2,3,4,5,6,7,8][1,2][align=center]
%%% The following should be equivalest to the line above:
%\setupTABLE[r][1,2][align=center]

\setupTABLE[c][1,2,3][align=right]
\setupTABLE[c][4,5,6,7][width=17mm]
\setupTABLE[r][2][height=\lineheight]

\setupTABLE[frame=off]
\setupTABLE[4,5,6,7][2][bottomframe=on]
\setupTABLE[r][first][topframe=on]
\setupTABLE[r][last][bottomframe=on]
\setupTABLE[r][4][topframe=on]

\bTABLEhead
\bTR
  \bTD[nr=3] Trial \eTD
  \bTD[nr=3] Author \eTD
  \bTD[nr=3] Year \eTD
  \bTD[nc=4] Infected when\eTD
  \bTD[nr=3] {Absolute\\ latitute}\eTD
\eTR
\bTR
  \bTD[nc=2] vaccinated \eTD
  \bTD[nc=2] not vaccinated \eTD
\eTR
\bTR
  \bTD yes \eTD
  \bTD no \eTD
  \bTD yes \eTD
  \bTD no \eTD
\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTD A \eTD\bTD Aronson   \eTD\bTD 1948 \eTD\bTD 4 \eTD\bTD 119
\eTD\bTD 11 \eTD\bTD 128  \eTD\bTD 44 \eTD\eTR
\bTR\bTD B \eTD\bTD Ferguson  \eTD\bTD 1949 \eTD\bTD 6 \eTD\bTD 300
\eTD\bTD 129 \eTD\bTD 274 \eTD\bTD 55 \eTD\eTR
\bTR\bTD C \eTD\bTD Rosenthal \eTD\bTD 1960 \eTD\bTD 3 \eTD\bTD 228
\eTD\bTD 11 \eTD\bTD 2090 \eTD\bTD 442 \eTD\eTR
\bTR\bTD D \eTD\bTD Hart \eTD\bTD 1977 \eTD\bTD 656 \eTD\bTD 13536
\eTD\bTD 248 \eTD\bTD 12619 \eTD\bTD 52 \eTD\eTR
\eTABLEbody
\eTABLE}
\stoptext
~~~ snip ~~~


Is this a bug? Is this a feature?

Thanks.

Thomas








> On 15 July 2013 16:49, Wolfgang Schuster  wrote:
>>
>> Am 15.07.2013 um 16:39 schrieb Thomas Friedrich 
>> :
>>
>>> Hello ConTeXt users,
>>>
>>> I am switching from texexec to context, and from table to tabulate.
>>> Question: What is the equivalent for \use{2}\ReFormat[c]{text} in the
>>> \table environment, when you what to do the same in the \tabulate
>>> environment? I couldn't find the answer in the context garden.
>>
>> The tabulate environment has no support for spanned cells.
>>
>> 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
>> ___
> ___
> 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.ne

Re: [NTG-context] Chapter-Names and Section-Names in Header don't work as expected

2013-07-15 Thread Thomas Friedrich
Ah, cool, thanks, I really had no idea, this would be the problem.

I had a look at

http://wiki.contextgarden.net/Command/setupheader

and, thus, thought that I would need to put the 'style=small'
statement in a second pair of squared brackets.

Cheers,
Thomas


2013/7/15 Wolfgang Schuster :
>
> Am 15.07.2013 um 16:23 schrieb Thomas Friedrich 
> :
>
>> Does the job. I also realised that \setupheader[][style=small] doesn't
>> have an effect, too. So, I am using
>
> Use \setupheader[style=small]. Empty arguments can be problematic because
> some commands do different things depending on the number of arguments.
>
> 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
> _______



-- 
Thomas Friedrich
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedr...@statistik.tu-dortmund.de
___
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] Table cell spanning multiple columns in tabulate

2013-07-15 Thread Thomas Friedrich
Hello ConTeXt users,

I am switching from texexec to context, and from table to tabulate.
Question: What is the equivalent for \use{2}\ReFormat[c]{text} in the
\table environment, when you what to do the same in the \tabulate
environment? I couldn't find the answer in the contextgarden.

Thank you for your help.

Please have a look at the following code.

~~~ snip ~~~
\enableregime[utf-8]

\starttext
\placetable[here][tab:tabulate]{Data of $13$ clinical trials
evaluating the efficacy of the Bacillus Calmette-Guérin
vaccine.}{\tfxx

\starttabulatehead
\FL
\NC Trial \NC Author \NC Year \NC Vaccinated\NC\NC Non
vaccinated\NC\NC Absolute \FR
\NC\NC\NC\NC Disease \NC No disease \NC  Disease \NC No disease \NC Latitude \LR
\HL
\stoptabulatehead

\starttabulate[|r|l|r|r|r|r|r|r|]
\HL
\NC A \NC Aronson  \NC 1948 \NC   4 \NC 119   \NC  11 \NC
128   \NC 44 \FR
\NC B \NC Ferguson \& Simes\NC 1949 \NC   6 \NC 300   \NC  29 \NC
274   \NC 55 \MR
\NC C \NC Rosenthal et al  \NC 1960 \NC   3 \NC 228   \NC  11 \NC
209   \NC 42 \MR
\NC D \NC Hart \& Sutherland   \NC 1977 \NC  62 \NC 13536 \NC 248 \NC
12619 \NC 52 \MR
\NC E \NC Frimodt-Moller et al \NC 1973 \NC  33 \NC 5036  \NC  47 \NC
5761  \NC 13 \MR
\NC F \NC Stein \& Aronson \NC 1953 \NC 180 \NC 1361  \NC 372 \NC
1079  \NC 44 \MR
\NC G \NC Vandiviere et al \NC 1973 \NC   8 \NC 2537  \NC  10 \NC
619   \NC 19 \MR
\NC H \NC TPT Madras   \NC 1980 \NC 505 \NC 87886 \NC 499 \NC
87892 \NC 13 \MR
\NC I \NC Coetzee \& Berjak\NC 1968 \NC  29 \NC 7470  \NC  45 \NC
7232  \NC 27 \MR
\NC J \NC Rosenthal et al  \NC 1961 \NC  17 \NC 1699  \NC  65 \NC
1600  \NC 42 \MR
\NC K \NC Comstock et al   \NC 1974 \NC 186 \NC 50448 \NC 141 \NC
27197 \NC 18 \MR
\NC L \NC Comstock \& Webster  \NC 1969 \NC   5 \NC 2493  \NC   3 \NC
2338  \NC 33 \MR
\NC M \NC Comstock et al   \NC 1976 \NC  27 \NC 16886 \NC  29 \NC
17825 \NC 33 \LR
\LL
\stoptabulate}

\placetable [here] [tab:table] {Data of $13$ clinical trials
evaluating the efficacy of the Bacillus Calmette-Guérin vaccine.}
{\tfxx
\starttable[|r|l|r|r|r|r|r|r|]
\HL
\NC Trial \NC Author \NC Year \NC \use{2}\ReFormat[c]{Vaccinated} \NC
\use{2}\ReFormat[c]{Non vaccinated} \NC Absolute \FR
\NC \NC  \NC  \NC Disease \NC No disease  \NC  Disease \NC No disease
\NC Latitude \LR
\HL
\NC A \NC Aronson  \NC 1948 \NC   4 \NC 119   \NC  11 \NC
128   \NC 44 \FR
\NC B \NC Ferguson \& Simes\NC 1949 \NC   6 \NC 300   \NC  29 \NC
274   \NC 55 \MR
\NC C \NC Rosenthal et al  \NC 1960 \NC   3 \NC 228   \NC  11 \NC
209   \NC 42 \MR
\NC D \NC Hart \& Sutherland   \NC 1977 \NC  62 \NC 13536 \NC 248 \NC
12619 \NC 52 \MR
\NC E \NC Frimodt-Moller et al \NC 1973 \NC  33 \NC 5036  \NC  47 \NC
5761  \NC 13 \MR
\NC F \NC Stein \& Aronson \NC 1953 \NC 180 \NC 1361  \NC 372 \NC
1079  \NC 44 \MR
\NC G \NC Vandiviere et al \NC 1973 \NC   8 \NC 2537  \NC  10 \NC
619   \NC 19 \MR
\NC H \NC TPT Madras   \NC 1980 \NC 505 \NC 87886 \NC 499 \NC
87892 \NC 13 \MR
\NC I \NC Coetzee \& Berjak\NC 1968 \NC  29 \NC 7470  \NC  45 \NC
7232  \NC 27 \MR
\NC J \NC Rosenthal et al  \NC 1961 \NC  17 \NC 1699  \NC  65 \NC
1600  \NC 42 \MR
\NC K \NC Comstock et al   \NC 1974 \NC 186 \NC 50448 \NC 141 \NC
27197 \NC 18 \MR
\NC L \NC Comstock \& Webster  \NC 1969 \NC   5 \NC 2493  \NC   3 \NC
2338  \NC 33 \MR
\NC M \NC Comstock et al   \NC 1976 \NC  27 \NC 16886 \NC  29 \NC
17825 \NC 33 \LR
\HL
\stoptable}
\stoptext
~~~ snip ~~~

Thomas
___
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] Chapter-Names and Section-Names in Header don't work as expected

2013-07-15 Thread Thomas Friedrich
Does the job. I also realised that \setupheader[][style=small] doesn't
have an effect, too. So, I am using

\setupheadertexts
  [{\tfx{\getmarking[sectionnumber].~\getmarking[section]}}]
  [{\tfx\pagenumber}]
  [{\tfx\pagenumber}]
  [{\tfx{\getmarking[chapternumber].~\getmarking[chapter]}}]

now. Thank you, Wolfgang.

Thomas



2013/7/15 Wolfgang Schuster :
>
> Am 15.07.2013 um 12:17 schrieb Thomas Friedrich 
> :
>
>> Hello everybody,
>>
>> learning my lesson for asking questions only with a minimal example
>> attached, please have a look at the following code
>>
>> ~~~ snip ~~~
>> \setuphead[chapter][page=yes,header=empty]
>> \setuppagenumbering[start=start,alternative=doublesided,location=]
>> \setupheader[][style=small]
>> \setupheadertexts[section][pagenumber][pagenumber][chapter]
>
> \setupheadertexts
>   [{\getmarking[sectionnumber]~\getmarking[section]}]
>   [pagenumber]
>   [pagenumber]
>   [{\getmarking[chapternumber]~\getmarking[chapter]}]
>
> 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
> ___



-- 
Thomas Friedrich
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedr...@statistik.tu-dortmund.de
___
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] Chapter-Names and Section-Names in Header don't work as expected

2013-07-15 Thread Thomas Friedrich
Hello everybody,

learning my lesson for asking questions only with a minimal example
attached, please have a look at the following code

~~~ snip ~~~
\setuphead[chapter][page=yes,header=empty]
\setuppagenumbering[start=start,alternative=doublesided,location=]
\setupheader[][style=small]
\setupheadertexts[section][pagenumber][pagenumber][chapter]

\starttext
\chapter{Anfang}
\section{Eins}
\input knuth \input knuth \input knuth
\section{Zwei}
\input knuth \input knuth \input knuth
\section{Drei}
\input knuth \input knuth \input knuth
\chapter{Mitte}
\section{Eins}
\input knuth \input knuth \input knuth
\section{Zwei}
\input knuth \input knuth \input knuth
\section{Drei}
\input knuth \input knuth \input knuth
\section{Vier}
\input knuth \input knuth \input knuth
\chapter{Ende}
\section{Eins}
\input knuth \input knuth \input knuth
\section{Zwei}
\input knuth \input knuth \input knuth
\section{Drei}
\input knuth \input knuth \input knuth
\stoptext
~~~ snip ~~~

How can I get the chapter number and section number to also appear in
the header in front of the respected chapter title and chapter number?
I couldn't find the answer in the online documentation.

Thank you for your help.

Thomas






2013/5/31 Wolfgang Schuster :
>
> Am 31.05.2013 um 15:31 schrieb Thomas Friedrich 
> :
>
>> Hello,
>>
>> I would like to put the \chapter and \section names, including their
>> respected numbers, in the header of my document, in small script and
>> separated from the main text by a horizontal line, the width of
>> \textwidth. On uneven pages the chapter-names, on even pages the
>> section names. Reading the manual (4.16 Headers and Footers), I
>> thought this should work:
>>
>> \setuppagenumbering[start=start,alternative=doublesided,location=]
>> \setupheader[][style=small,after=\hrule]
>> \setupheadertexts[section][pagenumber][pagenumber][chapter]
>>
>> Problems: 1) the mark "chapter" does not work. The section title
>> appears but not the chapter title.
>> 2) The chapter-number and the section-number don't appear in the header.
>> 3) \hrule draws a line from the very left to the very right of the page.
>>
>> My Questions: i) What is the "mark-mechanism" that is mentioned in the
>> manual (couldn't find any information about that).
>> ii) Why does chapter not work?
>> iii) \hrule is probably not the best command here?
>>
>> I found the following somewhere in the web:
>>
>> \setupheadertexts[{\tfx\fetchmark[section][first]}][][][{\tfx\fetchmark[chapter][current]}]
>>
>> which gives me indeed the chapter-name.  Why "current" instead of
>> "first"? What do I have to add to get the numbers?
>
> It does help when you can show us a minimal example for your document.
>
> Wolfgang
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
___
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] Enclosing the year in round brackets in online citation.

2013-05-31 Thread Thomas Friedrich
Hello,

A question to the \cite command. Following,

http://wiki.contextgarden.net/Bibliography

I defined

\def\onlinecite{\cite[left=,right=]}

so that I can cite bib-entries online in the text.  However, I need to
enclose the year of a citation in round-brackets.

At the moment, I get: Jon Doe, 2013, has shown that...
But I need: Jon Doe (2013) has shown that..., as this is required.

I couldn't find any reference what I can do with \cite and what
possibilities there are. Any idea?

Thank you for your help.

Thomas
___
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] Chapter-Names and Section-Names in Header don't work as expected

2013-05-31 Thread Thomas Friedrich
Hello,

I would like to put the \chapter and \section names, including their
respected numbers, in the header of my document, in small script and
separated from the main text by a horizontal line, the width of
\textwidth. On uneven pages the chapter-names, on even pages the
section names. Reading the manual (4.16 Headers and Footers), I
thought this should work:

\setuppagenumbering[start=start,alternative=doublesided,location=]
\setupheader[][style=small,after=\hrule]
\setupheadertexts[section][pagenumber][pagenumber][chapter]

Problems: 1) the mark "chapter" does not work. The section title
appears but not the chapter title.
2) The chapter-number and the section-number don't appear in the header.
3) \hrule draws a line from the very left to the very right of the page.

My Questions: i) What is the "mark-mechanism" that is mentioned in the
manual (couldn't find any information about that).
ii) Why does chapter not work?
iii) \hrule is probably not the best command here?

I found the following somewhere in the web:

\setupheadertexts[{\tfx\fetchmark[section][first]}][][][{\tfx\fetchmark[chapter][current]}]

which gives me indeed the chapter-name.  Why "current" instead of
"first"? What do I have to add to get the numbers?

Thank you for your help!

Thomas

PS. I am using mkii, I belive, (texexec ...)
___
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] usemodule[letter]

2012-07-23 Thread Thomas Friedrich
I really had no idea that ConTeXt is so strict when assigning values.
I always used this notation, since it helps you to _not_ forget any
commas. I always thought the value-string would end with the last '}'.
 Thanks for pointing this out, Aditya. That is really good to know.

Thomas


2012/7/20 Aditya Mahajan :
> On Fri, 20 Jul 2012, Thomas Friedrich wrote:
>
>> Hello together,
>>
>> my old set-up was an Ubuntu/tex-live installation, but I recently
>> (finally) did a reset-up, and I am now running ArchLinux together with
>> the context-minimals-git from AUR [1]. This should contain the latest
>> build.
>
>
> Yes, context-minimals-git is just a wrapper around first-setup.sh to make it
> easier to install and uninstall the context package.
>
>
>> As I understand it, there has been an update to the
>> letter-module, but there is currently no updated documentation
>> available. Is this correct?
>>
>> Please have a look at the following minimal example
>>
>> -- >8 -- min-ex.tex
>> \enableregime[utf]
>> \mainlanguage[de]
>>
>> \usemodule[letter]
>>
>> \setupletter
>>[ toname={Max Musterman}
>>, toaddress={Musterstraße 10}
>>, fromname={Me}
>>, fromaddress={Muster Weg 10}
>>, phone={0123-45678}
>>, mobile={0175-31689}
>>, date=\currentdate
>>, list={phone,mobile,date}
>>, subject={This is a minimal example with missing reference list}
>>, opening={Sehr geehrter Mustermann,}
>>, closing={Mit freundlichen Grüßen,}
>>, signature={Me}
>>]
>
>
> Note that ConTeXt has a very strict way of specifying key-value options. You
> need
>
> \setupletter
>[
>  
>  key=value,
>  
>]
>
> You cannot have any space around the "=" sign **or** the ",". For the last
> option, you must either have a comma on the same line or the closing bracket
> on the same line. So, use
>
> \setupletter
>[
>  
>  signature={Me},
>
>]
>
>
>> \startletter
>> \input knuth
>> \stopletter
>> -- >8 --
>>
>> $ texexec min-ex.tex
>>
>> or
>>
>> $ context min-ex.tex
>>
>> will only display the current date on the very right, but no phone or
>> mobile number.
>
>
> Perhaps because the list is set to "{phone,mobile,date}\n".
>
>
>> 1) What is the new way of setting up the reference line?
>> 2) Please also note the "space" between the addresser and his/her
>> address in the addressee field. Is there a way to get rid of this
>> 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  : 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] usemodule[letter]

2012-07-23 Thread Thomas Friedrich
Thank you so much, Wolfgang, it worked!

However, even though the mobile number shows on page, it comes without
a header "Mobile" above it.  Is there a list of what references are
recognised by the letter-module in the reference list when using "de"
as the main language?

Cheers,
Thomas


2012/7/20 Wolfgang Schuster :
>
> Am 20.07.2012 um 12:39 schrieb Thomas Friedrich:
>
>> Hello together,
>>
>> my old set-up was an Ubuntu/tex-live installation, but I recently
>> (finally) did a reset-up, and I am now running ArchLinux together with
>> the context-minimals-git from AUR [1].  This should contain the latest
>> build.  As I understand it, there has been an update to the
>> letter-module, but there is currently no updated documentation
>> available. Is this correct?
>>
>> Please have a look at the following minimal example
>>
>> -- >8 -- min-ex.tex
>> \enableregime[utf]
>> \mainlanguage[de]
>>
>> \usemodule[letter]
>>
>> \setupletter
>>[ toname={Max Musterman}
>>, toaddress={Musterstraße 10}
>>, fromname={Me}
>>, fromaddress={Muster Weg 10}
>>, phone={0123-45678}
>>, mobile={0175-31689}
>>, date=\currentdate
>>, list={phone,mobile,date}
>>, subject={This is a minimal example with missing reference list}
>>, opening={Sehr geehrter Mustermann,}
>>, closing={Mit freundlichen Grüßen,}
>>, signature={Me}
>>]
>>
>> \startletter
>> \input knuth
>> \stopletter
>> -- >8 --
>>
>> $ texexec min-ex.tex
>>
>> or
>>
>> $ context min-ex.tex
>>
>> will only display the current date on the very right, but no phone or
>> mobile number.
>>
>> 1) What is the new way of setting up the reference line?
>
> \setupletterlayer[reference][list={…}]
>
>> 2) Please also note the "space" between the addresser and his/her
>> address in the addressee field. Is there a way to get rid of this
>> space?
>
>
> Put the comma to separate the entries at the end of the line and not at the 
> begin of the next because the end of the line results otherwise in a space.
>
> \enableregime[utf]
> \mainlanguage[de]
>
> \usemodule[letter]
>
> \setupletterlayer
>   [reference]
>   [list={phone,mobile,date}]
>
> \setupletter
>   [toname={Max Musterman},
>toaddress={Musterstraße 10},
>fromname={Me},
>fromaddress={Muster Weg 10},
>phone={0123-45678},
>mobile={0175-31689},
>   %date=\currentdate,
>subject={This is a minimal example with reference list},
>opening={Sehr geehrter Mustermann,},
>closing={Mit freundlichen Grüßen,},
>signature={Me}]
>
>
> \startletter
> \input knuth
> \stopletter
>
> 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
> ___
___
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] usemodule[letter]

2012-07-20 Thread Thomas Friedrich
Hello together,

my old set-up was an Ubuntu/tex-live installation, but I recently
(finally) did a reset-up, and I am now running ArchLinux together with
the context-minimals-git from AUR [1].  This should contain the latest
build.  As I understand it, there has been an update to the
letter-module, but there is currently no updated documentation
available. Is this correct?

Please have a look at the following minimal example

-- >8 -- min-ex.tex
\enableregime[utf]
\mainlanguage[de]

\usemodule[letter]

\setupletter
[ toname={Max Musterman}
, toaddress={Musterstraße 10}
, fromname={Me}
, fromaddress={Muster Weg 10}
, phone={0123-45678}
, mobile={0175-31689}
, date=\currentdate
, list={phone,mobile,date}
, subject={This is a minimal example with missing reference list}
, opening={Sehr geehrter Mustermann,}
, closing={Mit freundlichen Grüßen,}
, signature={Me}
]

\startletter
\input knuth
\stopletter
-- >8 --

$ texexec min-ex.tex

or

$ context min-ex.tex

will only display the current date on the very right, but no phone or
mobile number.

1) What is the new way of setting up the reference line?
2) Please also note the "space" between the addresser and his/her
address in the addressee field. Is there a way to get rid of this
space?

Thank you very much for your help.

Thomas


[1] http://aur.archlinux.org/packages.php?ID=30398
___
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] Typesetting >> in verbatim

2011-09-08 Thread Thomas Friedrich
Am Donnerstag, den 08.09.2011, 10:57 +0200 schrieb luigi scarso:
> On Thu, Sep 8, 2011 at 10:39 AM, Thomas Friedrich  wrote:
> 
> > Question: Is there a way to replace the ">>" and "<<" strings in
> > the typesetting environment by something else?  Or another work around?
> >
> maybe
> \startHaskell
> foo = bar =/BTEX< foo = bar =/BTEX$<<$/ETEX print
> \stopHaskell
> 
> 
> -- 
> luigi

For anyone who's interested, I
will do the following now:

\startHaskell
foo /BTEX{\tt >>\!=}/ETEX  bar
foo /BTEX>>\!=/ETEX  bar
bar /BTEX{\tt =\!<<}/ETEX  foo
bar /BTEX=\!<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] Typesetting >> in verbatim

2011-09-08 Thread Thomas Friedrich
Am Donnerstag, den 08.09.2011, 09:59 +0200 schrieb Wolfgang Schuster:
> Am 08.09.2011 um 09:55 schrieb Aditya Mahajan:
> 
> > On Wed, 7 Sep 2011, Thomas Friedrich wrote:
> > 
> >> Hi,
> >> 
> >> I am having problems typing ">>" when typesetting code within a
> >> \definetyping environment.
> >> 
> >> I hope someone might be able to give me a hint.  My code looks as
> >> follows:
> >> 
> >> \definetyping
> >>  [Haskell]
> >>  [ option=commands,
> >>before={\startframedtext[width=\makeupwidth,
> >>  frame=off,bottomframe=on,topframe=on,
> >>  background=screen,backgroundscreen=.90]},
> >>after={\stopframedtext},
> >>bodyfont=9pt,
> >>margin=1.5em]
> >> 
> >> \startHaskell
> >> main = foo >>= bar
> >> \stopHaskell
> >> 
> >> Whenever ConTeXt comes across >> anywhere in the text, it just doesn't
> >> typeset anything.  So in the above case, I get the output:
> >> 
> >> main = foo = bar
> > 
> > Confirmed. >> are eaten in MkII but everything works fine with MkIV. My 
> > guess is because of automatic ligatures for >>. My usual trick for 
> > disabling such ligatures in MkII is
> > 
> >\usetypescript [modern] [texnansi]
> >\setupbodyfont [modern]
> > 
> > but that does not work in this case. There were some discussions in the 
> > past about disabling ligatures in typewriter font, but I don't remember the 
> > exact solution.
> 
> No, the culprit is “option=commands" which gobbles “>>”.
> 
> Wolfgang

You are absolutely right, Wolfgang.  When removing the "option=commands"
from the definition, the ">>" won't get eaten.  (Thanks!)  However, my
whole code consists of things such as

\startHaskell
  main = f1 /BTEX$\circ$/ETEX  f2 >>= hey
\stopHaskell

How comes that the ">>" are gobbled?  Even worse, something like

\startHaskell
  foo = bar =<< print 
\stopHaskell

won't even compile.  It doesn't like "<<".

Question: Is there a way to replace the ">>" and "<<" strings in
the typesetting environment by something else?  Or another work around?

Thanks,
Thomas





> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___


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

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

[NTG-context] Typesetting >> in verbatim

2011-09-08 Thread Thomas Friedrich
Hi,

I am having problems typing ">>" when typesetting code within a
\definetyping environment.

I hope someone might be able to give me a hint.  My code looks as
follows:

\definetyping
   [Haskell]
   [ option=commands,
 before={\startframedtext[width=\makeupwidth,
   frame=off,bottomframe=on,topframe=on,
   background=screen,backgroundscreen=.90]},
 after={\stopframedtext},
 bodyfont=9pt,
 margin=1.5em]

\startHaskell
main = foo >>= bar
\stopHaskell

Whenever ConTeXt comes across >> anywhere in the text, it just doesn't
typeset anything.  So in the above case, I get the output:

main = foo = bar

Thanks for you help!

Thomas


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