Re: [NTG-context] Some questions regarding math typesetting

2020-02-29 Thread TeXnician
Bump

On 06.12.19 14:59, Hans Hagen wrote:
> On 12/6/2019 9:24 AM, TeXnician wrote:
>> Dear list,
>>
>> while doing some math typesetting, I have found the following features not
>> working in LMTX:
>>
>> 3. \startformulas does not allow numbering formulas because the number will 
>> run
>>     into the next column. I have posted this at
>>
>> https://tex.stackexchange.com/questions/518262/context-number-formulas-side-by-side
>>
>>     and Henri Menke tested that it broke in 2017. Aditya Mahajan mentioned 
>> that
>>     it is a bug.
> 
> This one is for Aditya who knows more about these math alignments (needs) 
> than I
> do.
> 
> Aditya: when we comment the \aligntab it's ok but i'm hesitant to do that 
> patch
> ... so do you see bad consequences?
> 
> \def\math_alignment_NR_indeed[#1][#2]%
>   {%\aligntab % HERE
>    \dostoptagged % finish cell
>    \strc_formulas_place_number_nested{#1}{#2}%
>    \math_number_right_of_eqalign
>    \global\settrue\c_math_eqalign_first
>    \crcr
>    \dostoptagged} % finish row
> 
> Hans
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Some questions regarding math typesetting

2019-12-06 Thread Hans Hagen

On 12/6/2019 9:24 AM, TeXnician wrote:

Dear list,

while doing some math typesetting, I have found the following features not
working in LMTX:

1. Non-displaystyle operators are simply not shown (try \sum or \lim in text or
scriptstyle). This works in MkIV (and iirc in LMTX versions from before
november).


fixed in next beta (relates to some new stuff in the engine related to 
some border case but often happening math spacing)



2. \underbrace{x}_{y} stopped working. It produces an underbrace but the
subscript is not centered below the brace. It will show up as right
subscript. This works in MkIV.


idem


3. \startformulas does not allow numbering formulas because the number will run
into the next column. I have posted this at

https://tex.stackexchange.com/questions/518262/context-number-formulas-side-by-side
and Henri Menke tested that it broke in 2017. Aditya Mahajan mentioned that
it is a bug.


This one is for Aditya who knows more about these math alignments 
(needs) than I do.


Aditya: when we comment the \aligntab it's ok but i'm hesitant to do 
that patch ... so do you see bad consequences?


\def\math_alignment_NR_indeed[#1][#2]%
  {%\aligntab % HERE
   \dostoptagged % finish cell
   \strc_formulas_place_number_nested{#1}{#2}%
   \math_number_right_of_eqalign
   \global\settrue\c_math_eqalign_first
   \crcr
   \dostoptagged} % finish row


For the upper two cases: Is anything wrong with my LMTX installation or did I
miss some upgrade instructions for math in LMTX?

will be fixed

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Some questions regarding math typesetting

2019-12-06 Thread Otared Kavian
Hi,

Regarding the first two issues your are reporting on, your file typesets 
correctly with my installation of LMTX (version 2019.12.04 21:35). I get the 
three different sizes of \sum as expected, and the underbrace has $n$ under the 
middle of the brace.

The third issue is present, as you are saying in your message. But I don't know 
what you are trying to achieve with two \startalign...\stopalign in the same 
formula.

Best regards: OK

> On 6 Dec 2019, at 09:24, TeXnician  wrote:
> 
> Dear list,
> 
> while doing some math typesetting, I have found the following features not
> working in LMTX:
> 
> 1. Non-displaystyle operators are simply not shown (try \sum or \lim in text 
> or
>   scriptstyle). This works in MkIV (and iirc in LMTX versions from before
>   november).
> 2. \underbrace{x}_{y} stopped working. It produces an underbrace but the
>   subscript is not centered below the brace. It will show up as right
>   subscript. This works in MkIV.
> 3. \startformulas does not allow numbering formulas because the number will 
> run
>   into the next column. I have posted this at
> 
> https://tex.stackexchange.com/questions/518262/context-number-formulas-side-by-side
>   and Henri Menke tested that it broke in 2017. Aditya Mahajan mentioned that
>   it is a bug.
> 
> For the upper two cases: Is anything wrong with my LMTX installation or did I
> miss some upgrade instructions for math in LMTX?
> 
> Many thanks for an answer.
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Some questions regarding math typesetting

2019-12-06 Thread TeXnician
Dear list,

while doing some math typesetting, I have found the following features not
working in LMTX:

1. Non-displaystyle operators are simply not shown (try \sum or \lim in text or
   scriptstyle). This works in MkIV (and iirc in LMTX versions from before
   november).
2. \underbrace{x}_{y} stopped working. It produces an underbrace but the
   subscript is not centered below the brace. It will show up as right
   subscript. This works in MkIV.
3. \startformulas does not allow numbering formulas because the number will run
   into the next column. I have posted this at

https://tex.stackexchange.com/questions/518262/context-number-formulas-side-by-side
   and Henri Menke tested that it broke in 2017. Aditya Mahajan mentioned that
   it is a bug.

For the upper two cases: Is anything wrong with my LMTX installation or did I
miss some upgrade instructions for math in LMTX?

Many thanks for an answer.
\starttext
\section{One}
\startitemize
\item \type{\displaystyle}: $\displaystyle\sum\lim$
\item \type{\textstyle}: $\sum\lim$
\item \type{\scriptstyle}: $\scriptstyle\sum\lim$
\stopitemize

\section{Two}

$\underbrace{xyz}_{n}$

\section{Three}
also posted at https://tex.stackexchange.com/questions/518262/context-number-formulas-side-by-side

\placeformula
\startformulas
  \startformula
\startalign[number=auto]
  \NC a \NC= b \NR
\stopalign
  \stopformula
  \startformula
\startalign[number=auto]
  \NC a \NC= b \NR
\stopalign
  \stopformula
\stopformulas
\stoptext

mwe-math.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Fabrice Couvreur
Hello,
Thank you for your suggestions.
Fabrice

Le dim. 26 août 2018 à 15:19, Aditya Mahajan  a écrit :

> On Sun, 26 Aug 2018, Wolfgang Schuster wrote:
>
> > The normal alignment of figures is with the bottom of the figure on the
> > baseline.
> >
> > You can control the vertical alignment with a few box commands but what
> you
> > should use depends on the context, in tables I would use 2 while in
> running
> > text 3 can be better. Which alignment you’re using is your choice.
> >
> >
> > \useMPlibrary[dum]
> >
> > \defineexternalfigure[dummy][width=4cm,height=3cm]
> >
> > \setuplayout[grid=yes]
> >
> > \showgrid
> >
> > \starttext
> >
> > Default: \externalfigure[dummy]
> >
> > %1: \bottomrightbox{\externalfigure[dummy]}\quad
> > 1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
> > 2: \tbox{\externalfigure[dummy]}\quad
> > 3: \bbox{\externalfigure[dummy]}
> >
> > \stoptext
>
> Another option is to use the `location` key for `\externalfigure`:
>
>
> \useMPlibrary[dum]
> \defineexternalfigure[dummy][width=4cm,height=3cm]
> \setuplayout[grid=yes]
>
> \showgrid
>
> \starttext
>
> Default: \externalfigure[dummy]
>
> 1: \externalfigure[dummy][location=top]\quad
> 2: \tbox{\externalfigure[dummy]}
>
> \stoptext
>
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Aditya Mahajan

On Sun, 26 Aug 2018, Wolfgang Schuster wrote:

The normal alignment of figures is with the bottom of the figure on the 
baseline.


You can control the vertical alignment with a few box commands but what you 
should use depends on the context, in tables I would use 2 while in running 
text 3 can be better. Which alignment you’re using is your choice.



\useMPlibrary[dum]

\defineexternalfigure[dummy][width=4cm,height=3cm]

\setuplayout[grid=yes]

\showgrid

\starttext

Default: \externalfigure[dummy]

%1: \bottomrightbox{\externalfigure[dummy]}\quad
1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
2: \tbox{\externalfigure[dummy]}\quad
3: \bbox{\externalfigure[dummy]}

\stoptext


Another option is to use the `location` key for `\externalfigure`:


\useMPlibrary[dum]
\defineexternalfigure[dummy][width=4cm,height=3cm]
\setuplayout[grid=yes]

\showgrid

\starttext

Default: \externalfigure[dummy]

1: \externalfigure[dummy][location=top]\quad
2: \tbox{\externalfigure[dummy]}

\stoptext

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

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Wolfgang Schuster
The normal alignment of figures is with the bottom of the figure on the 
baseline.


You can control the vertical alignment with a few box commands but what 
you should use depends on the context, in tables I would use 2 while in 
running text 3 can be better. Which alignment you’re using is your choice.



\useMPlibrary[dum]

\defineexternalfigure[dummy][width=4cm,height=3cm]

\setuplayout[grid=yes]

\showgrid

\starttext

Default: \externalfigure[dummy]

%1: \bottomrightbox{\externalfigure[dummy]}\quad
1: \aligned[bottom,right]{\externalfigure[dummy]}\quad
2: \tbox{\externalfigure[dummy]}\quad
3: \bbox{\externalfigure[dummy]}

\stoptext


Wolfgang



Fabrice Couvreur schrieb am 26.08.18 um 10:50:

Hi Wolfgang,
Thank you but is not it better that the top of the figure is on the 
baseline of the label ?

Fabrice

@Mikael I meant : is the macro robust ?

Le dim. 26 août 2018 à 09:58, Wolfgang Schuster 
> a écrit :


Number them by hand (or replace the descriptions I used with
enumerations).

The alignment of the graphics can be improved with the \tbox
command, which raises the argument by the height of a strut.


\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\setuplayout
  [topspace=10mm,
   header=10mm,
   footer=10mm,
   height=middle,
   backspace=20mm,
   width=middle]

\definedescription
  [Item]
  [width=1.5em,
   distance=none]

\starttext

\startxtable[bodyfont=10pt]
\startxrow
\startxcell[width=2cm]
Expression\\\m{B'(x)}
\stopxcell
\startxcell
\startItem{a.}\m{B'(x)=-x²+24x-117}\stopItem
\stopxcell
\startxcell
\startItem{b.}\m{B'(x)=-3x²+48x-117}\stopItem
\stopxcell
\startxcell
\startItem{c.}\m{B'(x)=-3x²+48x-317}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
\stopxcell
\startxcell
\startItem{d.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{e.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{f.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de\\variations\\de \m{B}
\stopxcell
\startxcell
\startItem{g.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{h.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{i.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\stopxtable

\stoptext

Wolfgang


Fabrice Couvreur schrieb am 26.08.18 um 01:49:

Hello,
In the table, how to have a. b. c. in each line instead of a. a. a ?
Is the macro to place the figures on the baseline of the labels
to be improved ?
Thanks.
Fabrice

\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}

\setuplayout
[topspace=10mm,
header=10mm,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

\starttext
 \startxtable[frame=on,bodyfont=10pt]
\startxrow
  \startxcell[width=2cm]
Expression \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-x²+24x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-317}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{{\externalfigure[dummy]}}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
  

Re: [NTG-context] Some questions about an extreme table

2018-08-26 Thread Wolfgang Schuster

Number them by hand (or replace the descriptions I used with enumerations).

The alignment of the graphics can be improved with the \tbox command, 
which raises the argument by the height of a strut.



\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\setuplayout
  [topspace=10mm,
   header=10mm,
   footer=10mm,
   height=middle,
   backspace=20mm,
   width=middle]

\definedescription
  [Item]
  [width=1.5em,
   distance=none]

\starttext

\startxtable[bodyfont=10pt]
\startxrow
\startxcell[width=2cm]
Expression\\\m{B'(x)}
\stopxcell
\startxcell
\startItem{a.}\m{B'(x)=-x²+24x-117}\stopItem
\stopxcell
\startxcell
\startItem{b.}\m{B'(x)=-3x²+48x-117}\stopItem
\stopxcell
\startxcell
\startItem{c.}\m{B'(x)=-3x²+48x-317}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
\stopxcell
\startxcell
\startItem{d.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{e.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{f.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\startxrow
\startxcell
Tableau de\\variations\\de \m{B}
\stopxcell
\startxcell
\startItem{g.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{h.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\startxcell
\startItem{i.}\tbox{\externalfigure[dummy]}\stopItem
\stopxcell
\stopxrow
\stopxtable

\stoptext

Wolfgang


Fabrice Couvreur schrieb am 26.08.18 um 01:49:

Hello,
In the table, how to have a. b. c. in each line instead of a. a. a ?
Is the macro to place the figures on the baseline of the labels to be 
improved ?

Thanks.
Fabrice

\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}

\setuplayout
[topspace=10mm,
header=10mm,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

\starttext
 \startxtable[frame=on,bodyfont=10pt]
\startxrow
  \startxcell[width=2cm]
Expression \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-x²+24x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-317}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{{\externalfigure[dummy]}}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ variations\\de \m{B}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\stopxtable

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

Re: [NTG-context] Some questions about an extreme table

2018-08-25 Thread Mikael P. Sundqvist
On Sun, Aug 26, 2018 at 1:49 AM Fabrice Couvreur <
fabrice1.couvr...@gmail.com> wrote:

> Hello,
> In the table, how to have a. b. c. in each line instead of a. a. a ?
> Is the macro to place the figures on the baseline of the labels to be
> improved ?
> Thanks.
> Fabrice
>
> \useMPlibrary[dum]
>
> \switchtobodyfont[pagella,12pt]
>
> \unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}
>
> \setuplayout
>[topspace=10mm,
> header=10mm,
> footer=10mm,
> height=middle,
> backspace=20mm,
> width=middle]
>
> \starttext
>  \startxtable[frame=on,bodyfont=10pt]
> \startxrow
>   \startxcell[width=2cm]
> Expression \\ \m{B'(x)}
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \m{B'(x)=-x²+24x-117}
>   \stopitem
> \stopitemize
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \m{B'(x)=-3x²+48x-117}
>   \stopitem
> \stopitemize
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \m{B'(x)=-3x²+48x-317}
>   \stopitem
> \stopitemize
>   \stopxcell
> \stopxrow
> \startxrow
>   \startxcell
> Tableau de \\ signes de  \\ \m{B'(x)}
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \Item{{\externalfigure[dummy]}}
>   \stopitem
> \stopitemize
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \Item{\externalfigure[dummy]}
>   \stopitem
> \stopitemize
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \Item{\externalfigure[dummy]}
>   \stopitem
> \stopitemize
>   \stopxcell
> \stopxrow
> \startxrow
>   \startxcell
> Tableau de \\ variations\\de \m{B}
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \Item{\externalfigure[dummy]}
>   \stopitem
> \stopitemize
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \Item{\externalfigure[dummy]}
>   \stopitem
> \stopitemize
>   \stopxcell
>   \startxcell
> \startitemize[packed,a]
>   \startitem
> \Item{\externalfigure[dummy]}
>   \stopitem
> \stopitemize
>   \stopxcell
> \stopxrow
>   \stopxtable
>
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___


For the first one, I think you look for \startitemize[packed,a,continue].

For the second question, I don't understand if the output now looks as you
want it or not?

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Some questions about an extreme table

2018-08-25 Thread Fabrice Couvreur
Hello,
In the table, how to have a. b. c. in each line instead of a. a. a ?
Is the macro to place the figures on the baseline of the labels to be
improved ?
Thanks.
Fabrice

\useMPlibrary[dum]

\switchtobodyfont[pagella,12pt]

\unexpanded\def\Item#1{\framed[frame=off,location=hanging]{#1}}

\setuplayout
   [topspace=10mm,
header=10mm,
footer=10mm,
height=middle,
backspace=20mm,
width=middle]

\starttext
 \startxtable[frame=on,bodyfont=10pt]
\startxrow
  \startxcell[width=2cm]
Expression \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-x²+24x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-117}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\m{B'(x)=-3x²+48x-317}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ signes de  \\ \m{B'(x)}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{{\externalfigure[dummy]}}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
\startxrow
  \startxcell
Tableau de \\ variations\\de \m{B}
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
  \startxcell
\startitemize[packed,a]
  \startitem
\Item{\externalfigure[dummy]}
  \stopitem
\stopitemize
  \stopxcell
\stopxrow
  \stopxtable

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

Re: [NTG-context] Some questions about the presentation of a book

2018-07-21 Thread Pablo Rodriguez
On 07/21/2018 11:41 AM, Fabrice Couvreur wrote:
> Hello,
> To center the titles, we must add the key alternative = middle

Hi Fabrice,

no, you should add:

  \setuphead[chapter][align=center]

> However for the title of the summary, it is correct because a single
> word but for the titles of chapters, it is not correct because I get :
> 
> Chapitre I :
> First chapter
> 
> instead of :Chapitre I : First chapter

Fixed with the option above.

> 2018-07-20 23:55 GMT+02:00 Fabrice Couvreur:
> 
> Hello,
> I would like to modify the file below to :
> 
> - center the title "Sommaire"
> - delete the line of the first page
> - center the title of each chapter
> - delete the line on each page with the title of the chapter

As far as I can remember, "\setuphead[chapter][header=none]" removed the
header only in the page where the chapter heading is placed.

But I must be missing something, since it doesn’t work.

I hope it helps,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about the presentation of a book

2018-07-21 Thread Fabrice Couvreur
Hello,
To center the titles, we must add the key alternative = middle
However for the title of the summary, it is correct because a single word
but for the titles of chapters, it is not correct because I get :

Chapitre I :
First chapter

instead of : Chapitre I : First chapter

​Thanks
Fabrice​




2018-07-20 23:55 GMT+02:00 Fabrice Couvreur :

> Hello,
> I would like to modify the file below to :
>
> - center the title "Sommaire"
> - delete the line of the first page
> - center the title of each chapter
> - delete the line on each page with the title of the chapter
>
> Thanks for your help
> Fabrice
>
> 
> ##
> \usemodule[visual]
>
> \mainlanguage[fr]
>
> \setuphead[chapter][commandbefore={:\,},header=empty]
>
> \setuphead[subsection][style=bold]
>
> \setuphead[section]
>   [distance=\zeropoint,
>style=bold,
>commandbefore={\space\endash\space}]
>
> \setuphead[title][commandbefore={}]
>
> \setuplayout
>   [height=middle,
>width=middle,
>backspace=2cm,
>topspace=10mm,
>bottomspace=10mm,
>header=10mm,
>footer=10mm,
>footerdistance=10mm,
>headerdistance=10mm]
>
> \definelayout
>   [firstpage]
>   [header=empty]
>
>
> \setupbackgrounds[header][text][bottomframe=on]
>
> \setupheadertexts[{\getmarking[section]}]
>  [pagenumber]
>  [{\getmarking[chapter]}]
>  [pagenumber]
>
>
> \setuppagenumbering[alternative=,location=]
>
>
> \setuplabeltext[fr][chapter=Chapitre ]
>
> \definestructureconversionset
>   [structure]
>   [n, R, n, n, n]
>
> \definestructureconversionset
>   [digits]
>   [n, n, n, n, n]
>
> \setupheads[sectionconversionset=structure]
>
> \setuplist[chapter][style=bold,width=5mm]
>
> \starttext
>
> \starttitle[title={\bf Sommaire}]
> \placelist
>   [chapter,section,subsection]
>   [criterium=all,
>alternative=c]
>
> \stoptitle
>
> \startchapter[title=First chapter]
> \startsection[title=Fist section]
> \startsubsection[title=First subsection]
>  \dorecurse{10}{\fakewords{120}{120}\par}
> \stopsubsection
> \stopsection
> \stopchapter
> \startchapter[title=Second chapter]
> \startsection[title=Second section]
> \startsubsection[title=Second subsection]
> \dorecurse{10}{\fakewords{120}{120}\par}
> \stopsubsection
> \stopsection
> \stopchapter
> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Some questions about the presentation of a book

2018-07-20 Thread Fabrice Couvreur
Hello,
I would like to modify the file below to :

- center the title "Sommaire"
- delete the line of the first page
- center the title of each chapter
- delete the line on each page with the title of the chapter

Thanks for your help
Fabrice

##
\usemodule[visual]

\mainlanguage[fr]

\setuphead[chapter][commandbefore={:\,},header=empty]

\setuphead[subsection][style=bold]

\setuphead[section]
  [distance=\zeropoint,
   style=bold,
   commandbefore={\space\endash\space}]

\setuphead[title][commandbefore={}]

\setuplayout
  [height=middle,
   width=middle,
   backspace=2cm,
   topspace=10mm,
   bottomspace=10mm,
   header=10mm,
   footer=10mm,
   footerdistance=10mm,
   headerdistance=10mm]

\definelayout
  [firstpage]
  [header=empty]


\setupbackgrounds[header][text][bottomframe=on]

\setupheadertexts[{\getmarking[section]}]
 [pagenumber]
 [{\getmarking[chapter]}]
 [pagenumber]


\setuppagenumbering[alternative=,location=]


\setuplabeltext[fr][chapter=Chapitre ]

\definestructureconversionset
  [structure]
  [n, R, n, n, n]

\definestructureconversionset
  [digits]
  [n, n, n, n, n]

\setupheads[sectionconversionset=structure]

\setuplist[chapter][style=bold,width=5mm]

\starttext

\starttitle[title={\bf Sommaire}]
\placelist
  [chapter,section,subsection]
  [criterium=all,
   alternative=c]

\stoptitle

\startchapter[title=First chapter]
\startsection[title=Fist section]
\startsubsection[title=First subsection]
 \dorecurse{10}{\fakewords{120}{120}\par}
\stopsubsection
\stopsection
\stopchapter
\startchapter[title=Second chapter]
\startsection[title=Second section]
\startsubsection[title=Second subsection]
\dorecurse{10}{\fakewords{120}{120}\par}
\stopsubsection
\stopsection
\stopchapter
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about my document

2017-08-27 Thread Fabrice Couvreur
Hi Pablo,
Thank you, it's very clear and it finally corresponds to what I want.
The road is long in the learning of this formidable tool !
Fabrice

2017-08-27 12:43 GMT+02:00 Pablo Rodriguez :

> On 08/27/2017 12:29 PM, Fabrice Couvreur wrote:
> > Hi Pablo,
> >
> > " You have to define a new conversion set and use it for the prefix
> > segments "
> > It seems to me that's what I did.
>
> Hi Fabrice,
>
> I don’t think so. Two different conversion sets are required: one for
> \setupheads[sectionconversionset=numbers] and a different one for
> \defineenumeration[remark][prefixconversionset=digits].
>
> If there is no different conversion set for the enumeration, you get the
> default for the head.
>
> Here is the full sample:
>
> \mainlanguage[fr]
> \setuphead[chapter][commandbefore={: }]
> \setuphead[section][distance=\zeropoint,
> commandbefore={\space\endash\space}]
> \setuplabeltext[fr][chapter=Chapitre ]
>
> \definestructureconversionset
>   [structure]
>   [n, R, n, n, n]
>
> \definestructureconversionset
>   [digits]
>   [n, n, n, n, n]
>
> \setupheads[sectionconversionset=structure]
>
> \defineenumeration
>   [remark]
>   [
> text=Remark,
> location=serried,
> width=fit,
> right={.~},
> prefix=yes,
> prefixsegments=chapter,
> prefixconversionset=digits,
> %~ prefixsegments=section
>   ]
>
> \setupnumber[remark][way=bychapter]
>
>
> \starttext
> \dorecurse{3}{\startchapter
>   [title={First chapter}]
> \dorecurse{3}{\startsection
>   [title={First section}]
>   \dorecurse{3}{\startremark \input ward \stopremark}
> \stopsection}
> \stopchapter}
> \stoptext
>
> I hope it is clear now. Let me know if it isn’t.
>
> Cheers,
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about my document

2017-08-27 Thread Pablo Rodriguez
On 08/27/2017 12:29 PM, Fabrice Couvreur wrote:
> Hi Pablo,
> 
> " You have to define a new conversion set and use it for the prefix
> segments "
> It seems to me that's what I did.

Hi Fabrice,

I don’t think so. Two different conversion sets are required: one for
\setupheads[sectionconversionset=numbers] and a different one for
\defineenumeration[remark][prefixconversionset=digits].

If there is no different conversion set for the enumeration, you get the
default for the head.

Here is the full sample:

\mainlanguage[fr]
\setuphead[chapter][commandbefore={: }]
\setuphead[section][distance=\zeropoint,
commandbefore={\space\endash\space}]
\setuplabeltext[fr][chapter=Chapitre ]

\definestructureconversionset
  [structure]
  [n, R, n, n, n]

\definestructureconversionset
  [digits]
  [n, n, n, n, n]

\setupheads[sectionconversionset=structure]

\defineenumeration
  [remark]
  [
text=Remark,
location=serried,
width=fit,
right={.~},
prefix=yes,
prefixsegments=chapter,
prefixconversionset=digits,
%~ prefixsegments=section
  ]

\setupnumber[remark][way=bychapter]


\starttext
\dorecurse{3}{\startchapter
  [title={First chapter}]
\dorecurse{3}{\startsection
  [title={First section}]
  \dorecurse{3}{\startremark \input ward \stopremark}
\stopsection}
\stopchapter}
\stoptext

I hope it is clear now. Let me know if it isn’t.

Cheers,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about my document

2017-08-27 Thread Fabrice Couvreur
Hi Pablo,

" You have to define a new conversion set and use it for the prefix
segments "
It seems to me that's what I did :

\definestructureconversionset
  [structure]
  [numbers, Romannumerals, numbers, numbers, numbers]
  [numbers]

\setupheads [sectionconversionset=structure]

\defineenumeration
  [remark]
  [
text=Remark,
location=serried,
width=fit,
right={.~},
prefix=yes,
prefixsegments=chapter,
  ]

\setupnumber[remark][way=bychapter]


Only I get (which is normal according to the numbering chosen for the
chapters : Romannumerals)

Remark I.1.

and I want this :

Remark 1.1.

Fabrice



2017-08-27 11:03 GMT+02:00 Pablo Rodriguez :

> On 08/27/2017 12:14 AM, Fabrice Couvreur wrote:
> > " I would like to have this :
> >
> > Chapitre I : Espaces probabilisés
> >
> > I.1 - Expérience aléatoire et univers "
> >
> > I did this :
> >
> > \setuphead[chapter][commandbefore={: }]
> > \setuphead[section][distance=\zeropoint,commandbefore={\
> space\endash\space}]
> > \setuplabeltext[en][chapter=Chapitre ]
>
> Hi Fabrice,
>
> I think it would be better to use French:
>
> \mainlanguage[fr]
> \setuplabeltext[fr][chapter=Chapitre ]
>
> > But for this
> >
> > Remark 1.1.
> > Remark 1.2
> > Remark 1.3
> >
> > I do not find !
>
> You have to define a new conversion set and use it for the prefix
> segments (I added the section to the numbering):
>
> \definestructureconversionset
>   [digits]
>   [n, n, a, n, n]
>   [numbers]
>
> \defineenumeration
>   [remark]
>   [
> text=Remark,
> location=serried,
> width=fit,
> right={.~},
> prefix=yes,
> prefixsegments=chapter:section,
> prefixconversionset=digits,
>   ]
>
> I hope it helps,
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about my document

2017-08-27 Thread Pablo Rodriguez
On 08/27/2017 12:14 AM, Fabrice Couvreur wrote:
> " I would like to have this :
> 
> Chapitre I : Espaces probabilisés
> 
> I.1 - Expérience aléatoire et univers "
> 
> I did this :
> 
> \setuphead[chapter][commandbefore={: }]
> \setuphead[section][distance=\zeropoint,commandbefore={\space\endash\space}]
> \setuplabeltext[en][chapter=Chapitre ]

Hi Fabrice,

I think it would be better to use French:

\mainlanguage[fr]
\setuplabeltext[fr][chapter=Chapitre ]

> But for this
> 
> Remark 1.1.
> Remark 1.2
> Remark 1.3
> 
> I do not find !

You have to define a new conversion set and use it for the prefix
segments (I added the section to the numbering):

\definestructureconversionset
  [digits]
  [n, n, a, n, n]
  [numbers]

\defineenumeration
  [remark]
  [
text=Remark,
location=serried,
width=fit,
right={.~},
prefix=yes,
prefixsegments=chapter:section,
prefixconversionset=digits,
  ]

I hope it helps,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about my document

2017-08-26 Thread Fabrice Couvreur
" I would like to have this :

Chapitre I : Espaces probabilisés

I.1 - Expérience aléatoire et univers "


I did this :

\setuphead[chapter][commandbefore={: }]
\setuphead[section][distance=\zeropoint,commandbefore={\space\endash\space}]
\setuplabeltext[en][chapter=Chapitre ]

But for this

Remark 1.1.
Remark 1.2
Remark 1.3

I do not find !

Fabrice

2017-08-26 12:27 GMT+02:00 Fabrice Couvreur :

> Hi,
> I have simplified the code, but I get :
>
> Remark I.1.
> Remark I.2.
> Remark I.3.
>
> instead :
>
> Remark 1.1.
> Remark 1.2
> Remark 1.3
>
> Thanks
> Fabrice
>
> %
> \definestructureconversionset
>   [structure]
>   [numbers, Romannumerals, numbers, numbers, numbers]
>   [numbers]
>
> \setupheads [sectionconversionset=structure]
>
> \defineenumeration
>   [remark]
>   [
> text=Remark,
> location=serried,
> width=fit,
> right={.~},
> prefix=yes,
> prefixsegments=chapter,
>   ]
>
> \setupnumber[remark][way=bychapter]
>
> \starttext
> \startchapter
>   [title={First chapter}]
> \startsection
>   [title={First section}]
>   \dorecurse{3}{\startremark \input ward \stopremark}
> \stopsection
> \stopchapter
> \stoptext
> %
>
> 2017-08-24 14:53 GMT+02:00 Fabrice Couvreur :
>
>> Hello,
>> I would like to have this :
>>
>> 
>>
>> Chapitre I : Espaces probabilisés
>>
>> I.1 - Expérience aléatoire et univers
>>
>> Définition 1.1
>>
>> Définition 1.2
>>
>> 
>>
>> Thank you
>> Fabrice
>>
>> %
>>
>> \definestructureconversionset
>>   [structure]
>>   [numbers, Romannumerals, numbers, numbers, numbers]
>>   [numbers]
>>
>> \setupheads [sectionconversionset=structure]
>>
>> \setupenumerations
>> [
>> before={\blank[big]},
>> after={\blank[big]},
>> alternative=serried,
>> width=broad,
>> distance=0.5em,
>> headstyle=bold,
>> titlestyle=bold,
>> prefix=chapter,
>> way=bychapter,
>> conversion=numbers]
>>
>> \defineenumeration
>> [definition]
>> [
>> text=Définition,
>> title=yes,
>> style=italic,
>> list=all,
>> listtext={Définition}]
>>
>> \starttext
>> \startchapter[title=Espaces probabilisés]
>> \startsection[title=Expérience aléatoire  et univers]
>> \startdefinition
>>   On appelle expérience aléatoire une expérience sur un système dont le
>> résultat n'est pas connu d'avance et peut varier si on répète cette
>> expérience.
>> \stopdefinition
>> \startdefinition
>>   On appelle univers l'ensemble des résultats possibles. Il est noté
>> \math{\Omega}.
>> \stopdefinition
>> \stopchapter
>> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about my document

2017-08-26 Thread Fabrice Couvreur
Hi,
I have simplified the code, but I get :

Remark I.1.
Remark I.2.
Remark I.3.

instead :

Remark 1.1.
Remark 1.2
Remark 1.3

Thanks
Fabrice

%
\definestructureconversionset
  [structure]
  [numbers, Romannumerals, numbers, numbers, numbers]
  [numbers]

\setupheads [sectionconversionset=structure]

\defineenumeration
  [remark]
  [
text=Remark,
location=serried,
width=fit,
right={.~},
prefix=yes,
prefixsegments=chapter,
  ]

\setupnumber[remark][way=bychapter]

\starttext
\startchapter
  [title={First chapter}]
\startsection
  [title={First section}]
  \dorecurse{3}{\startremark \input ward \stopremark}
\stopsection
\stopchapter
\stoptext
%

2017-08-24 14:53 GMT+02:00 Fabrice Couvreur :

> Hello,
> I would like to have this :
>
> 
>
> Chapitre I : Espaces probabilisés
>
> I.1 - Expérience aléatoire et univers
>
> Définition 1.1
>
> Définition 1.2
>
> 
>
> Thank you
> Fabrice
>
> %
>
> \definestructureconversionset
>   [structure]
>   [numbers, Romannumerals, numbers, numbers, numbers]
>   [numbers]
>
> \setupheads [sectionconversionset=structure]
>
> \setupenumerations
> [
> before={\blank[big]},
> after={\blank[big]},
> alternative=serried,
> width=broad,
> distance=0.5em,
> headstyle=bold,
> titlestyle=bold,
> prefix=chapter,
> way=bychapter,
> conversion=numbers]
>
> \defineenumeration
> [definition]
> [
> text=Définition,
> title=yes,
> style=italic,
> list=all,
> listtext={Définition}]
>
> \starttext
> \startchapter[title=Espaces probabilisés]
> \startsection[title=Expérience aléatoire  et univers]
> \startdefinition
>   On appelle expérience aléatoire une expérience sur un système dont le
> résultat n'est pas connu d'avance et peut varier si on répète cette
> expérience.
> \stopdefinition
> \startdefinition
>   On appelle univers l'ensemble des résultats possibles. Il est noté
> \math{\Omega}.
> \stopdefinition
> \stopchapter
> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Some questions about my document

2017-08-24 Thread Fabrice Couvreur
Hello,
I would like to have this :



Chapitre I : Espaces probabilisés

I.1 - Expérience aléatoire et univers

Définition 1.1

Définition 1.2



Thank you
Fabrice

%

\definestructureconversionset
  [structure]
  [numbers, Romannumerals, numbers, numbers, numbers]
  [numbers]

\setupheads [sectionconversionset=structure]

\setupenumerations
[
before={\blank[big]},
after={\blank[big]},
alternative=serried,
width=broad,
distance=0.5em,
headstyle=bold,
titlestyle=bold,
prefix=chapter,
way=bychapter,
conversion=numbers]

\defineenumeration
[definition]
[
text=Définition,
title=yes,
style=italic,
list=all,
listtext={Définition}]

\starttext
\startchapter[title=Espaces probabilisés]
\startsection[title=Expérience aléatoire  et univers]
\startdefinition
  On appelle expérience aléatoire une expérience sur un système dont le
résultat n'est pas connu d'avance et peut varier si on répète cette
expérience.
\stopdefinition
\startdefinition
  On appelle univers l'ensemble des résultats possibles. Il est noté
\math{\Omega}.
\stopdefinition
\stopchapter
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-07 Thread Fabrice Couvreur
Hi Hans,
Thank you for responding to my request, it's really nice. By cons I do not
understand what you mean 
some day textext might handle it okay
Fabrice

2015-08-07 14:26 GMT+02:00 Hans Hagen pra...@wxs.nl:

 On 8/6/2015 11:38 PM, Fabrice Couvreur wrote:

 Hi,
 The following code (Metafun documentation, thanks again Hans !) is fully
 understood and works very well. Sorry if I insist, but can we create a
 counter to avoid writing \FrameTitle{Définition 1},
 \FrameTitle{Définition 2}... ?
 Thus, the only invocation \startMyText ... \stopMyText, \startMyText ...
 \stopMyText... this return Définition 1, Définition 2 ...

 Thank you,
 Fabrice


 \setupbodyfont [palatino,11pt]

 \setupcolors[state=start,cmyk=yes]

 \definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
 \definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \defineframedtext
 [MyText]
 [frame=off,
  background=MyFrame,
  width=\textwidth,
  location=right]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \def\StartFrame{\startMyText}
 \def\StopFrame{\startMyText}

 \def\FrameTitle#1{\setMPtext{MyFrame}{\hbox spread
 1em{\hss\strut{\bf\feature[+][f:smallcaps]}#1\hss}}}

 \setMPtext{MyFrame}{}

 \startuseMPgraphic{MyFrame}
 path a ;
 path b ;
 picture p ;
 o := BodyFontSize ;
 p :=textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (2o,OverlayHeight-ypart center p) ;
 a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
 fill a withcolor \MPcolor{MyColor} ;
 b := boundingbox p ;
 fill b withcolor \MPcolor{myColor} ;
 draw p withcolor white ;
 \stopuseMPgraphic
 \starttext
 \FrameTitle{Définition 1}
 \startMyText
 \input knuth
 \stopMyText
 \FrameTitle{Définition 2}
 \startMyText
 \input knuth
 \stopMyText
 \stoptext


 \setupbodyfont [palatino,11pt]

 \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
 \definecolor[MyColorA][.75(MyColorB,white)]  %c=0.00, m=0.10, y=0.20,
 k=0.00]

 \defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=\textwidth,
location=right]

 \defineoverlay
   [MyFrame]
   [\useMPgraphic{MyFrame}]

 \definelabel
   [Définition]
   [headstyle=\bf\smallcaps]

 \startuseMPgraphic{MyFrame}
 path b ;
 picture p ;
 p := textext.rt(\white\Définition) ; % some day textext might handle
 it okay
 p := p shifted (2BodyFontSize,OverlayHeight-ypart center
 p+.25ExHeight) ;
 b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
 fill OverlayBox withcolor \MPcolor{MyColorA} ;
 fill b withcolor \MPcolor{MyColorB} ;
 draw p ;
 \stopuseMPgraphic

 \starttext

 \startMyText
 \input knuth
 \stopMyText

 \startMyText
 \input knuth
 \stopMyText

 \stoptext

 2015-08-04 21:30 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com
 mailto:fabrice1.couvr...@gmail.com:

 Hi Aditya,
 Thank you, I have already thought of this solution, but I do not
 know to use with the environment that I created.
 Fabrice

 2015-08-04 18:02 GMT+02:00 Aditya Mahajan adit...@umich.edu
 mailto:adit...@umich.edu:

 On Tue, 4 Aug 2015, Fabrice Couvreur wrote:

 How to have Definition 1, Definition 2, Definition 3 ... ?


 \defineenumeration[definition][text=Definition]

 Aditya

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

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

 ___






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

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

 ___



 --

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

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

 maillist : ntg-context@ntg.nl /
 

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-07 Thread Hans Hagen

On 8/6/2015 11:38 PM, Fabrice Couvreur wrote:

Hi,
The following code (Metafun documentation, thanks again Hans !) is fully
understood and works very well. Sorry if I insist, but can we create a
counter to avoid writing \FrameTitle{Définition 1},
\FrameTitle{Définition 2}... ?
Thus, the only invocation \startMyText ... \stopMyText, \startMyText ...
\stopMyText... this return Définition 1, Définition 2 ...
Thank you,
Fabrice


\setupbodyfont [palatino,11pt]

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
[MyText]
[frame=off,
 background=MyFrame,
 width=\textwidth,
 location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\def\FrameTitle#1{\setMPtext{MyFrame}{\hbox spread
1em{\hss\strut{\bf\feature[+][f:smallcaps]}#1\hss}}}

\setMPtext{MyFrame}{}

\startuseMPgraphic{MyFrame}
path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;
\stopuseMPgraphic
\starttext
\FrameTitle{Définition 1}
\startMyText
\input knuth
\stopMyText
\FrameTitle{Définition 2}
\startMyText
\input knuth
\stopMyText
\stoptext



\setupbodyfont [palatino,11pt]

\definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
\definecolor[MyColorA][.75(MyColorB,white)]  %c=0.00, m=0.10, y=0.20, 
k=0.00]


\defineframedtext
  [MyText]
  [frame=off,
   background=MyFrame,
   width=\textwidth,
   location=right]

\defineoverlay
  [MyFrame]
  [\useMPgraphic{MyFrame}]

\definelabel
  [Définition]
  [headstyle=\bf\smallcaps]

\startuseMPgraphic{MyFrame}
path b ;
picture p ;
p := textext.rt(\white\Définition) ; % some day textext might 
handle it okay
p := p shifted (2BodyFontSize,OverlayHeight-ypart center 
p+.25ExHeight) ;

b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
fill OverlayBox withcolor \MPcolor{MyColorA} ;
fill b withcolor \MPcolor{MyColorB} ;
draw p ;
\stopuseMPgraphic

\starttext

\startMyText
\input knuth
\stopMyText

\startMyText
\input knuth
\stopMyText

\stoptext


2015-08-04 21:30 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com
mailto:fabrice1.couvr...@gmail.com:

Hi Aditya,
Thank you, I have already thought of this solution, but I do not
know to use with the environment that I created.
Fabrice

2015-08-04 18:02 GMT+02:00 Aditya Mahajan adit...@umich.edu
mailto:adit...@umich.edu:

On Tue, 4 Aug 2015, Fabrice Couvreur wrote:

How to have Definition 1, Definition 2, Definition 3 ... ?


\defineenumeration[definition][text=Definition]

Aditya

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

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

___





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

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-06 Thread Fabrice Couvreur
Hi,
The following code (Metafun documentation, thanks again Hans !) is fully
understood and works very well. Sorry if I insist, but can we create a
counter to avoid writing \FrameTitle{Définition 1},
\FrameTitle{Définition 2}... ?
Thus, the only invocation \startMyText ... \stopMyText,  \startMyText ... \
stopMyText ... this return Définition 1, Définition 2 ...
Thank you,
Fabrice


\setupbodyfont [palatino,11pt]

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=\textwidth,
location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\def\FrameTitle#1{\setMPtext{MyFrame}{\hbox spread
1em{\hss\strut{\bf\feature[+][f:smallcaps]}#1\hss}}}

\setMPtext{MyFrame}{}

\startuseMPgraphic{MyFrame}
path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;
\stopuseMPgraphic
\starttext
\FrameTitle{Définition 1}
\startMyText
\input knuth
\stopMyText
\FrameTitle{Définition 2}
\startMyText
\input knuth
\stopMyText
\stoptext


2015-08-04 21:30 GMT+02:00 Fabrice Couvreur fabrice1.couvr...@gmail.com:

 Hi Aditya,
 Thank you, I have already thought of this solution, but I do not know to
 use with the environment that I created.
 Fabrice

 2015-08-04 18:02 GMT+02:00 Aditya Mahajan adit...@umich.edu:

 On Tue, 4 Aug 2015, Fabrice Couvreur wrote:

 How to have Definition 1, Definition 2, Definition 3 ... ?


 \defineenumeration[definition][text=Definition]

 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
___

[NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
 Hi,
How to have Definition 1, Definition 2, Definition 3 ... ?

Is it possible to translate the image p until the left edge of the text area
?

Thank you,
Fabrice

\showframe

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
   [MyText]
   [frame=off,
background=MyFrame,
width=0.9\textwidth,
location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
{\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

\startuseMPgraphic{MyFrame}

path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;

\stopuseMPgraphic

\starttext
\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

\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] Some questions about an environment (Metafun)

2015-08-04 Thread Hans Hagen

On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:

Hi,
How to have Definition 1, Definition 2, Definition 3 ...?

Is it possible to translate the image p until the left edge of the text
area ?



\startuseMPgraphic{MyFrame}
picture p ;
p := textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
fill OverlayBox leftenlarged .1TextWidth withcolor \MPcolor{MyColor} ;
fill boundingbox p withcolor \MPcolor{myColor} ;
draw p withcolor white ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic




Thank you,
Fabrice

\showframe

\setupcolors[state=start,cmyk=yes]

\definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
\definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

\setupbodyfont[11pt]
\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\defineframedtext
[MyText]
[frame=off,
 background=MyFrame,
 width=0.9\textwidth,
 location=right]

\defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

\def\StartFrame{\startMyText}
\def\StopFrame{\startMyText}

\setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
{\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

\startuseMPgraphic{MyFrame}

path a ;
path b ;
picture p ;
o := BodyFontSize ;
p :=textext.rt(\MPstring{MyFrame}) ;
p := p shifted (0,OverlayHeight-ypart center p) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
fill a withcolor \MPcolor{MyColor} ;
b := boundingbox p ;
fill b withcolor \MPcolor{myColor} ;
draw p withcolor white ;

\stopuseMPgraphic

\starttext
\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

\startlinecorrection[blank]
\startMyText
\input knuth
\stopMyText
\stoplinecorrection

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Fabrice Couvreur
Hi Hans,
Thank you for your suggestion, but it's not what I want, but I probably
misstated my request. For me, the image p contains the text Définition 1, and
this is what I want orange rectangle translate to the left edge of the text
area.
Am I more clearly ?
Fabrice

2015-08-04 20:08 GMT+02:00 Hans Hagen pra...@wxs.nl:

 On 8/4/2015 5:04 PM, Fabrice Couvreur wrote:

 Hi,
 How to have Definition 1, Definition 2, Definition 3 ...?

 Is it possible to translate the image p until the left edge of the text
 area ?



 \startuseMPgraphic{MyFrame}
 picture p ;
 p := textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 fill OverlayBox leftenlarged .1TextWidth withcolor \MPcolor{MyColor} ;
 fill boundingbox p withcolor \MPcolor{myColor} ;
 draw p withcolor white ;
 setbounds currentpicture to OverlayBox ;
 \stopuseMPgraphic



 Thank you,
 Fabrice

 \showframe

 \setupcolors[state=start,cmyk=yes]

 \definecolor[MyColor][c=0.00, m=0.10, y=0.20, k=0.00]
 \definecolor[myColor][c=0.00, m=0.62, y=1.00, k=0.00]

 \setupbodyfont[11pt]
 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \defineframedtext
 [MyText]
 [frame=off,
  background=MyFrame,
  width=0.9\textwidth,
  location=right]

 \defineoverlay[MyFrame][\useMPgraphic{MyFrame}]

 \def\StartFrame{\startMyText}
 \def\StopFrame{\startMyText}

 \setMPtext{MyFrame}{\hbox spread 1em {\hss\strut
 {\bf\feature[+][f:smallcaps]  Définition 1 }\hss}}}

 \startuseMPgraphic{MyFrame}

 path a ;
 path b ;
 picture p ;
 o := BodyFontSize ;
 p :=textext.rt(\MPstring{MyFrame}) ;
 p := p shifted (0,OverlayHeight-ypart center p) ;
 a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
 fill a withcolor \MPcolor{MyColor} ;
 b := boundingbox p ;
 fill b withcolor \MPcolor{myColor} ;
 draw p withcolor white ;

 \stopuseMPgraphic

 \starttext
 \startlinecorrection[blank]
 \startMyText
 \input knuth
 \stopMyText
 \stoplinecorrection

 \startlinecorrection[blank]
 \startMyText
 \input knuth
 \stopMyText
 \stoplinecorrection

 \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

 ___



 --

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


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

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

 ___

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

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

Re: [NTG-context] Some questions about an environment (Metafun)

2015-08-04 Thread Aditya Mahajan

On Tue, 4 Aug 2015, Fabrice Couvreur wrote:


How to have Definition 1, Definition 2, Definition 3 ... ?


\defineenumeration[definition][text=Definition]

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

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

Re: [NTG-context] Some questions on float combinations

2014-01-07 Thread Alexey Kryukov
On Mon, 06 Jan 2014 11:43:51 +0100
Hans Hagen wrote:

 It all depends on it being floats or not (floatign indeed). One
 option is to package a set of floats in a bTABLE .. eTABLE and put
 a..z subcaptions under it that way and then have the whole as a float

Well, I actually don't need floats, because each image has a fixed
position. However the problem is to get captions properly formatted and
numbered. Again, in LaTeX it would be easy to output captions
separately from the corresponding images, but I haven't found how to do
that in ConTeXt. That's what causes me to use floats (and pack them
into floatcombinations if necessary).

 anyway ... you have more chance onan answer if you provide small
 examples

My code currently looks like the following:

\defineparagraphs[DoubleL][n=2]

\starttext

\centerline{\rotate[rotation=90]{
  \startDoubleL
\placefigure[force]
  {My first caption}
  {\externalfigure[dummy][width=1in,height=3in]}
  \nextDoubleL
\placefigure[force]
  {My second caption}
  {\externalfigure[dummy][width=1in,height=1in]}
\placefigure[force]
  {My third caption}
  {\externalfigure[dummy][width=1in,height=1in]}
  \stopDoubleL
}}

\stoptext

As I have explained, this works, but it would prefer to use a
floatcombination syntax to describe this type of layout just like I
would use it for two images placed side-by-side. I. e. it would be nice
if ConTeXt supported something like the following:

\startfloatcombination[2*1]
   \placefigure[force]
  {My first caption}
  {\externalfigure[dummy][width=1in,height=3in]}
  \startfloatcombination[1*2]
\placefigure[force]
  {My second caption}
  {\externalfigure[dummy][width=1in,height=1in]}
\placefigure[force]
  {My third caption}
  {\externalfigure[dummy][width=1in,height=1in]}
  \stopfloatcombination
\stopfloatcombination

Another small problem is that combinations and floatcombinations,
unlike single floats, have no 'rotation' parameter, so that I have to
embed them into a rotation command. This seems just a bit inconsistent.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
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] Some questions on float combinations

2014-01-06 Thread Hans Hagen

On 1/3/2014 8:17 PM, Alexey Kryukov wrote:

Hi all,

recently I finished typesetting a block of inset illustrations for a
journal on history, which I first implemented in LaTeX and then moved
to ConTeXt (I am using a version from TeXLive 2013 packaged with
openSUSE 13.1). Basically I am greatly satisfied with the result, as the
code looks much clearer now. However, I still see some things
which can be done in LaTeX by a more natural way.

First of all, is there a dedicated method to rotate an entire
combination or floatcombination by 90 degrees? I see floats have a
special option to control this, but float combinations don't (am I
right here?). And if I enclose a float combination into a \rotate
command, then the height of the rotated block seems to be incorrectly
calculated, so that about a half of the block goes outside of the upper
page boundary.

Second, not all image combinations can be described by a simple matrix,
and the documentation doesn't explain what to do in such more complex
cases (nor the Wiki does). For example, in my document some pages have
three images ordered in two columns: one relatively tall image
side-by-side with two smaller ones. To make the things worse such
combinations are usually placed on landscape pages. The obvious solution
here seems to be to somewhow group two smaller images and then put them
into a float combination. Unfortunately, this doesn't work, as
floatcombination seems to ignore all enclosed boxing
commands/environments and even nested float combinations.

Finally I managed to achieve the desired layout by defining a set of
parallel paragraphs, which fortunately worked even inside a \rotate
command (columns and columnsets with embedded floats didn't). Still it
would be nice to have a special interface allowing to combine floats
and float combinations into larger blocks.


It all depends on it being floats or not (floatign indeed). One option 
is to package a set of floats in a bTABLE .. eTABLE and put a..z 
subcaptions under it that way and then have the whole as a float


anyway ... you have more chance onan answer if you provide small examples

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Some questions on float combinations

2014-01-03 Thread Alexey Kryukov
Hi all,

recently I finished typesetting a block of inset illustrations for a
journal on history, which I first implemented in LaTeX and then moved
to ConTeXt (I am using a version from TeXLive 2013 packaged with
openSUSE 13.1). Basically I am greatly satisfied with the result, as the
code looks much clearer now. However, I still see some things
which can be done in LaTeX by a more natural way.

First of all, is there a dedicated method to rotate an entire
combination or floatcombination by 90 degrees? I see floats have a
special option to control this, but float combinations don't (am I
right here?). And if I enclose a float combination into a \rotate
command, then the height of the rotated block seems to be incorrectly
calculated, so that about a half of the block goes outside of the upper
page boundary.

Second, not all image combinations can be described by a simple matrix,
and the documentation doesn't explain what to do in such more complex
cases (nor the Wiki does). For example, in my document some pages have
three images ordered in two columns: one relatively tall image
side-by-side with two smaller ones. To make the things worse such
combinations are usually placed on landscape pages. The obvious solution
here seems to be to somewhow group two smaller images and then put them
into a float combination. Unfortunately, this doesn't work, as
floatcombination seems to ignore all enclosed boxing
commands/environments and even nested float combinations.

Finally I managed to achieve the desired layout by defining a set of
parallel paragraphs, which fortunately worked even inside a \rotate
command (columns and columnsets with embedded floats didn't). Still it
would be nice to have a special interface allowing to combine floats
and float combinations into larger blocks.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
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] Some questions about the letter module

2013-07-18 Thread Wolfgang Schuster

Am 18.07.2013 um 03:12 schrieb Michael Ash m...@econs.umass.edu:

 Dear Wolfgang,
 
 Thank you very much.  This is very helpful.
 
 One note is that to center the footer required 
 
 \setupletterframe[foot][align=middle]

Of course, the alignment is a framed feature.

 (NOT \setupletterlayer.  Per http://wiki.contextgarden.net/Letter#Setup)
 
 
 A couple more questions.
 (1) is there a more efficient way to indent only the content of the letter:
 
 \setupindenting[yes,small]
 \setuplettersection[opening][indenting=no]
 \setuplettersection[subject][indenting=no]
 \setuplettersection[closing][indenting=no]
 \setuplettersection[signature][indenting=no]

You can use \setupletteroptions[indenting=…] which only passed to the content 
section.

 (2) The following did not properly left-justify the date (the date was 
 towards the left but was not perfectly aligned with the other left-justified 
 text):
 \setupletterlayer[reference][alternative=e]

This should be alternative c and not e.


\usemodule[letter]

\setupletterlayer[reference][alternative=c]

%\setupletterlayer[reference][alternative=c,list=reference] % default: list=date
%\setupletter[reference=\currentdate]

\setupletteroptions[indenting={yes,medium,next}]

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

Re: [NTG-context] Some questions about the letter module (Wolfgang Schuster)

2013-07-18 Thread Michael Ash
Thank you very much; this was again very helpful.   I am still having a
problem with left-justifying the date:

\setupletterlayer[reference][alternative=c]

does not properly left-justify the date; the date is towards the left but
is aligned several mm to the right of the other text.  (This was true on
the mwe that Wolfgang sent.)

BTW are the values for the alternative key (example, e, c, etc.)
documented somewhere?

Thank you again.

Best,
Michael




 Message: 5
 Date: Thu, 18 Jul 2013 14:57:33 +0200
 From: Wolfgang Schuster schuster.wolfg...@gmail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Some questions about the letter module
 Message-ID: aaec0b67-ca76-4b98-95ed-e3bbc7916...@gmail.com
 Content-Type: text/plain; charset=windows-1252


 Am 18.07.2013 um 03:12 schrieb Michael Ash m...@econs.umass.edu:

  Dear Wolfgang,
 
  Thank you very much.  This is very helpful.
 
  One note is that to center the footer required
 
  \setupletterframe[foot][align=middle]

 Of course, the alignment is a framed feature.

  (NOT \setupletterlayer.  Per http://wiki.contextgarden.net/Letter#Setup)
 
 
  A couple more questions.
  (1) is there a more efficient way to indent only the content of the
 letter:
 
  \setupindenting[yes,small]
  \setuplettersection[opening][indenting=no]
  \setuplettersection[subject][indenting=no]
  \setuplettersection[closing][indenting=no]
  \setuplettersection[signature][indenting=no]

 You can use \setupletteroptions[indenting=?] which only passed to the
 content section.

  (2) The following did not properly left-justify the date (the date was
 towards the left but was not perfectly aligned with the other
 left-justified text):
  \setupletterlayer[reference][alternative=e]

 This should be alternative c and not e.


 \usemodule[letter]

 \setupletterlayer[reference][alternative=c]

 %\setupletterlayer[reference][alternative=c,list=reference] % default:
 list=date
 %\setupletter[reference=\currentdate]

 \setupletteroptions[indenting={yes,medium,next}]

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

Re: [NTG-context] Some questions about the letter module

2013-07-17 Thread Wolfgang Schuster

Am 15.07.2013 um 18:34 schrieb Michael Ash m...@econs.umass.edu:

 Dear all,
 
 (This is a repeat post. I apologize if that's rude, but I would appreciate 
 some assistance with the letter module or a pointer to documentation. Thanks.)
 
 
 I am using the letter module that came with context.   A sample of a basic 
 letter is below; I have put in dummy for the logo and the signature, but 
 these are working fine when I include the files. 
 
 I have several questions:
 to center the footer.  
You can use the align key but you have to use a valid value, e.g. middle.

\setupletterlayer[foot][align=middle]
 to lower the  footer (closer to the bottom of the page)
You can control the distance between the margins and the footer block with the 
x and y keys for \setupletterlayer.

\setupletterlayer[foot][y=10pt]
 to delete the word Date above the date.
There is no key for \setupletterstyle etc. to disable/enable the label but you 
can clear the label text.

\setuplettertext[en][date=]
 to put the date above the recipient address (and how in general do I adjust 
 the vertical space here).
Move the layer up with the \setupletterlayer command.

\setupletterlayer[reference][y=4cm]
 to left-justify the date.
When you want only the date in the reference line without the label use 
alternative “e” (you don’t even have to clear the label because it isn’t used).

\setupletterlayer[reference][alternative=e]

\setupletter[reference=\currentdate]
 to control the foldmarks (for US-letter-size paper, omit, etc.)
You can disable the marks with \setupletteroptions[marking=no], the position 
can be changed with \setupletterlayer[topmark][y=7cm] and 
\setupletterlayer[topmark][y=14cm].

 I have consulted http://wiki.contextgarden.net/Letter but there are many 
 things I don't understand.   What is the meaning  of alternative=example;

With the alternative key you select one of the predefined or used defined 
styles for the reference, footer etc. blocks.

 what is the option preset=  in \setuplayer[foot] ?

When you want to change the origin for a layer from the top left margin to the 
bottom left you have to change the value of the location and corner keys. As 
there are  few often used combination for the four corners Hans predefined the 
with the \definelayerpreset command. These predefined setups can be loaded with 
the preset key which saves some typing. Below is a short example where I set 
first the arguments myself and later use the predefined setups.

\definelayer[test][width=\textwidth,height=\textheight]

\starttext

\setlayer[test][corner={left,top},location={right,bottom}]{LT 1}

\setlayer[test][corner={right,top},location={left,bottom}]{RT 1}

\setlayer[test][corner={left,bottom},location={right,top}]{LB 1}

\setlayer[test][corner={right,bottom},location={left,top}]{RB 1}

\flushlayer[test]

\setlayer[test][preset=lefttop]{LT 2}

\setlayer[test][preset=righttop]{RT 2}

\setlayer[test][preset=leftbottom]{LB 2}

\setlayer[test][preset=rightbottom]{RB 2}

\flushlayer[test]

\stoptext


 Also is there a better way to manage color?  I \definecolor, \startcolor, 
 \stopcolor, but maybe there is a better way to indicate that certain sections 
 of the letter should be in a color.  Thanks.

All block elements provide color and style keys which can be used to set the 
font and color for them, e.g. \setupletterlayer[foot][color=blue,style=sans].

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] Some questions about the letter module

2013-07-17 Thread Michael Ash
Dear Wolfgang,

Thank you very much.  This is very helpful.

One note is that to center the footer required

\setupletterframe[foot][align=middle]

(NOT \setupletterlayer.  Per http://wiki.contextgarden.net/Letter#Setup)


A couple more questions.
(1) is there a more efficient way to indent only the content of the letter:

\setupindenting[yes,small]
\setuplettersection[opening][indenting=no]
\setuplettersection[subject][indenting=no]
\setuplettersection[closing][indenting=no]
\setuplettersection[signature][indenting=no]


(2) The following did not properly left-justify the date (the date was
towards the left but was not perfectly aligned with the other
left-justified text):
\setupletterlayer[reference][alternative=e]

Thank you again.

Best,
Michael



On Wed, Jul 17, 2013 at 4:08 PM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 15.07.2013 um 18:34 schrieb Michael Ash m...@econs.umass.edu:

 Dear all,

 (This is a repeat post. I apologize if that's rude, but I would appreciate
 some assistance with the letter module or a pointer to documentation.
 Thanks.)


 I am using the letter module that came with context.   A sample of a basic
 letter is below; I have put in dummy for the logo and the signature, but
 these are working fine when I include the files.

 I have several questions:

1. to center the footer.

 You can use the align key but you have to use a valid value, e.g. middle.

 \setupletterlayer[foot][align=middle]


1. to lower the  footer (closer to the bottom of the page)

 You can control the distance between the margins and the footer block with
 the x and y keys for \setupletterlayer.

 \setupletterlayer[foot][y=10pt]


1. to delete the word Date above the date.

 There is no key for \setupletterstyle etc. to disable/enable the label but
 you can clear the label text.

 \setuplettertext[en][date=]


1. to put the date *above *the recipient address (and how in general
do I adjust the vertical space here).

 Move the layer up with the \setupletterlayer command.

 \setupletterlayer[reference][y=4cm]


1. to left-justify the date.

 When you want only the date in the reference line without the label use
 alternative “e” (you don’t even have to clear the label because it isn’t
 used).

 \setupletterlayer[reference][alternative=e]

 \setupletter[reference=\currentdate]


1. to control the foldmarks (for US-letter-size paper, omit, etc.)

 You can disable the marks with \setupletteroptions[marking=no], the
 position can be changed with \setupletterlayer[topmark][y=7cm]
 and \setupletterlayer[topmark][y=14cm].

 I have consulted http://wiki.contextgarden.net/Letter but there are many
 things I don't understand.   What is the meaning  of alternative=example;


 With the alternative key you select one of the predefined or used defined
 styles for the reference, footer etc. blocks.

 what is the option preset=  in \setuplayer[foot] ?


 When you want to change the origin for a layer from the top left margin to
 the bottom left you have to change the value of the location and corner
 keys. As there are  few often used combination for the four corners Hans
 predefined the with the \definelayerpreset command. These predefined setups
 can be loaded with the preset key which saves some typing. Below is a short
 example where I set first the arguments myself and later use the predefined
 setups.

 \definelayer[test][width=\textwidth,height=\textheight]

 \starttext

 \setlayer[test][corner={left,top},location={right,bottom}]{LT 1}

 \setlayer[test][corner={right,top},location={left,bottom}]{RT 1}

 \setlayer[test][corner={left,bottom},location={right,top}]{LB 1}

 \setlayer[test][corner={right,bottom},location={left,top}]{RB 1}

 \flushlayer[test]

 \setlayer[test][preset=lefttop]{LT 2}

 \setlayer[test][preset=righttop]{RT 2}

 \setlayer[test][preset=leftbottom]{LB 2}

 \setlayer[test][preset=rightbottom]{RB 2}

 \flushlayer[test]

 \stoptext


 Also is there a better way to manage color?  I \definecolor, \startcolor,
 \stopcolor, but maybe there is a better way to indicate that certain
 sections of the letter should be in a color.  Thanks.


 All block elements provide color and style keys which can be used to set
 the font and color for them, e.g.
 \setupletterlayer[foot][color=blue,style=sans].

 Wolfgang




-- 
Michael Ash, Chair, Department of Economics
Professor of Economics and Public Policy
University of Massachusetts Amherst
Amherst, MA 01003
Email m...@econs.umass.edu
Tel +1-413-545-2590 Twitter https://twitter.com/michaelaoash
___
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] Some questions about the letter module

2013-07-15 Thread Michael Ash
Dear all,

(This is a repeat post. I apologize if that's rude, but I would appreciate
some assistance with the letter module or a pointer to documentation.
Thanks.)


I am using the letter module that came with context.   A sample of a basic
letter is below; I have put in dummy for the logo and the signature, but
these are working fine when I include the files.

I have several questions:

   1. to center the footer.
   2. to lower the  footer (closer to the bottom of the page)
   3. to delete the word Date above the date.
   4. to put the date *above *the recipient address (and how in general do
   I adjust the vertical space here).
   5. to left-justify the date.
   6. to control the foldmarks (for US-letter-size paper, omit, etc.)

I have consulted http://wiki.contextgarden.net/Letter but there are many
things I don't understand.   What is the meaning  of alternative=example;
what is the option preset=  in \setuplayer[foot] ?

Also is there a better way to manage color?  I \definecolor, \startcolor,
\stopcolor, but maybe there is a better way to indicate that certain
sections of the letter should be in a color.  Thanks.

Thank you very much for your guidance.

Yours,
Michael








\usemodule[letter]
\setuppapersize[letter][letter]
\definecolor[maroon][h=990033]

\setuplanguage [en] [date={dd, month, year}]

\setupletteroptions
[language=english,
bodyfont={rm,12pt},
]

% Define logo for the first page
\defineletterelement[layer][head][example]%
{\framed[background=logohead,height=25mm,frame=off,align=left]%
{\externalfigure[dummy]}}

% We put our logo in the head
\setupletterlayer[head]
[alternative=example,
x=9mm,
y=10mm
]

\defineletterelement[layer][foot][example]%
{\startcolor[maroon] \ss  \tfx The University of
Massachusetts is an Affirmative Action/Equal Opportunity Institution.
\stopcolor}
   \setupletterlayer[foot][
 align=centerbottom,
 alternative=example]

\setupletter[
name={Michael Ash},
dept={Department of Economics},
building={Thompson Hall},
street={200 Hicks Way},
city={Amherst, MA 01003-9277},
phone={+1-413-545-2590},
fax={+1-413-545-2921},
email={m...@econs.umass.edu}
]

   \defineletterelement[layer][location][example]%
   {\setuptabulate[bodyfont=normal]
 \startcolor[maroon]
   \starttabulate[|lw(.4\textwidth)|rw(.55\textwidth)|]
   \NC \tfa \sc University of Massachusetts   \NC
  \NR
   \NC \tfa \sc Amherst   \NC
 \correspondenceparameter{dept} \NR
   \NC   \NC
  \NR
   \NC\correspondenceparameter{building} \NC  tel
\correspondenceparameter{phone} \NR
   \NC\correspondenceparameter{street} \NC fax
\correspondenceparameter{fax}\NC\NR
   \NC\correspondenceparameter{city} \NC
\correspondenceparameter{email} \NC\NR
   \stoptabulate
 \stopcolor}

 \setupletterlayer[location]
 [alternative=example,
 x=42mm,
 y=4mm
 ]


\starttext

   \startletter[
   toname={Professor Addressee},
   toaddress={123 West Home Ave.\\Chicago, IL 60614},
   opening={Dear Dr. Addressee,},
   subject={A test letter},
   closing={Best regards,},
   signature={\externalfigure[dummy]\\Michael Ash}
   ]


 Thank you very much for the invitation I am truly honored by the
 opportunity and delighted to attend. I look forward to meeting
 you.  Thank you again for the invitation.


   \stopletter

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

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

[NTG-context] Some questions about the letter module

2013-07-12 Thread Michael Ash
Dear all,

I am using the letter module that came with context.   A sample of a basic
letter is below; I have put in dummy for the logo and the signature, but
these are working fine when I include the files.

I have several questions:

   1. to center the footer.
   2. to lower the  footer (closer to the bottom of the page)
   3. to delete the word Date above the date.
   4. to put the date *above *the recipient address (and how in general do
   I adjust the vertical space here).
   5. to left-justify the date.
   6. to control the foldmarks (for US-letter-size paper, omit, etc.)

I have consulted http://wiki.contextgarden.net/Letter but there are many
things I don't understand.   What is the meaning  of alternative=example;
what is the option preset=  in \setuplayer[foot] ?

Also is there a better way to manage color?  I \definecolor, \startcolor,
\stopcolor, but maybe there is a better way to indicate that certain
sections of the letter should be in a color.  Thanks.

Thank you very much for your guidance.

Yours,
Michael








\usemodule[letter]
\setuppapersize[letter][letter]
\definecolor[maroon][h=990033]

\setuplanguage [en] [date={dd, month, year}]

\setupletteroptions
[language=english,
bodyfont={rm,12pt},
]

% Define logo for the first page
\defineletterelement[layer][head][example]%
{\framed[background=logohead,height=25mm,frame=off,align=left]%
{\externalfigure[dummy]}}

% We put our logo in the head
\setupletterlayer[head]
[alternative=example,
x=9mm,
y=10mm
]

\defineletterelement[layer][foot][example]%
{\startcolor[maroon] \ss  \tfx The University of
Massachusetts is an Affirmative Action/Equal Opportunity Institution.
\stopcolor}
   \setupletterlayer[foot][
 align=centerbottom,
 alternative=example]

\setupletter[
name={Michael Ash},
dept={Department of Economics},
building={Thompson Hall},
street={200 Hicks Way},
city={Amherst, MA 01003-9277},
phone={+1-413-545-2590},
fax={+1-413-545-2921},
email={m...@econs.umass.edu}
]

   \defineletterelement[layer][location][example]%
   {\setuptabulate[bodyfont=normal]
 \startcolor[maroon]
   \starttabulate[|lw(.4\textwidth)|rw(.55\textwidth)|]
   \NC \tfa \sc University of Massachusetts   \NC
  \NR
   \NC \tfa \sc Amherst   \NC
 \correspondenceparameter{dept} \NR
   \NC   \NC
  \NR
   \NC\correspondenceparameter{building} \NC  tel
\correspondenceparameter{phone} \NR
   \NC\correspondenceparameter{street} \NC fax
\correspondenceparameter{fax}\NC\NR
   \NC\correspondenceparameter{city} \NC
\correspondenceparameter{email} \NC\NR
   \stoptabulate
 \stopcolor}

 \setupletterlayer[location]
 [alternative=example,
 x=42mm,
 y=4mm
 ]


\starttext

   \startletter[
   toname={Professor Addressee},
   toaddress={123 West Home Ave.\\Chicago, IL 60614},
   opening={Dear Dr. Addressee,},
   subject={A test letter},
   closing={Best regards,},
   signature={\externalfigure[dummy]\\Michael Ash}
   ]


 Thank you very much for the invitation I am truly honored by the
 opportunity and delighted to attend. I look forward to meeting
 you.  Thank you again for the invitation.


   \stopletter

\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] Some questions about the letter module

2013-07-12 Thread Michael Ash
PS Would it be feasible to add a PDF-certificate-signer so that ConTeXt
prompts for a passphrase and produces a signed PDF?  This would be
particularly useful in the letter module but would in fact be welcome
throughout.

I have been using http://portablesigner.sourceforge.net/ to sign finished
PDF files, but it would be neat to have the process integrated in ConTeXt.

Best,
Michael


On Fri, Jul 12, 2013 at 10:11 AM, Michael Ash m...@econs.umass.edu wrote:

 Dear all,

 I am using the letter module that came with context.   A sample of a basic
 letter is below; I have put in dummy for the logo and the signature, but
 these are working fine when I include the files.

 I have several questions:

1. to center the footer.
2. to lower the  footer (closer to the bottom of the page)
3. to delete the word Date above the date.
4. to put the date *above *the recipient address (and how in general
do I adjust the vertical space here).
5. to left-justify the date.
6. to control the foldmarks (for US-letter-size paper, omit, etc.)

 I have consulted http://wiki.contextgarden.net/Letter but there are many
 things I don't understand.   What is the meaning  of alternative=example;
 what is the option preset=  in \setuplayer[foot] ?

 Also is there a better way to manage color?  I \definecolor, \startcolor,
 \stopcolor, but maybe there is a better way to indicate that certain
 sections of the letter should be in a color.  Thanks.

 Thank you very much for your guidance.

 Yours,
 Michael








 \usemodule[letter]
 \setuppapersize[letter][letter]
 \definecolor[maroon][h=990033]

 \setuplanguage [en] [date={dd, month, year}]

 \setupletteroptions
 [language=english,
 bodyfont={rm,12pt},
 ]

 % Define logo for the first page
 \defineletterelement[layer][head][example]%
 {\framed[background=logohead,height=25mm,frame=off,align=left]%
 {\externalfigure[dummy]}}

 % We put our logo in the head
 \setupletterlayer[head]
 [alternative=example,
 x=9mm,
 y=10mm
 ]

 \defineletterelement[layer][foot][example]%
 {\startcolor[maroon] \ss  \tfx The University of
 Massachusetts is an Affirmative Action/Equal Opportunity Institution.
 \stopcolor}
\setupletterlayer[foot][
  align=centerbottom,
  alternative=example]

 \setupletter[
 name={Michael Ash},
 dept={Department of Economics},
 building={Thompson Hall},
 street={200 Hicks Way},
 city={Amherst, MA 01003-9277},
 phone={+1-413-545-2590},
 fax={+1-413-545-2921},
 email={m...@econs.umass.edu}
 ]

\defineletterelement[layer][location][example]%
{\setuptabulate[bodyfont=normal]
  \startcolor[maroon]
\starttabulate[|lw(.4\textwidth)|rw(.55\textwidth)|]
\NC \tfa \sc University of Massachusetts   \NC
 \NR
\NC \tfa \sc Amherst   \NC
  \correspondenceparameter{dept} \NR
\NC   \NC
   \NR
\NC\correspondenceparameter{building} \NC  tel
 \correspondenceparameter{phone} \NR
\NC\correspondenceparameter{street} \NC fax
 \correspondenceparameter{fax}\NC\NR
\NC\correspondenceparameter{city} \NC
 \correspondenceparameter{email} \NC\NR
\stoptabulate
  \stopcolor}

  \setupletterlayer[location]
  [alternative=example,
  x=42mm,
  y=4mm
  ]


 \starttext

\startletter[
toname={Professor Addressee},
toaddress={123 West Home Ave.\\Chicago, IL 60614},
opening={Dear Dr. Addressee,},
subject={A test letter},
closing={Best regards,},
signature={\externalfigure[dummy]\\Michael Ash}
]


  Thank you very much for the invitation I am truly honored by the
  opportunity and delighted to attend. I look forward to meeting
  you.  Thank you again for the invitation.


\stopletter

 \stoptext




-- 
Michael Ash, Chair, Department of Economics
Professor of Economics and Public Policy
University of Massachusetts
Amherst, MA 01003
Email m...@econs.umass.edu
Tel +1-413-545-2590 Twitter @michaelaoash
___
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] Some questions about the letter module

2013-07-12 Thread Hans Hagen

On 7/12/2013 4:26 PM, Michael Ash wrote:

PS Would it be feasible to add a PDF-certificate-signer so that ConTeXt
prompts for a passphrase and produces a signed PDF?  This would be
particularly useful in the letter module but would in fact be welcome
throughout.

I have been using http://portablesigner.sourceforge.net/ to sign
finished PDF files, but it would be neat to have the process integrated
in ConTeXt.


afaik it has to be done on a finished document (postprocessing) so best 
if to call a program like qpdf afterwards or so


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Some questions

2013-01-25 Thread Alain Delmotte

 Hi,

 Now some questions to solve the problems I have when I try 
to follow the tutorial ConTeXt an excursion.
 I think it is for mkII and I use mkIV and that there has 
been many changes in between.


 - The example at the bottom of page 11 and page 12 gives 
me an error:

 ! Argument of \head has an extra }.

system   tex  error on line 52 in file 
travail.tex: Argument of  ...


42 Hasselt lies in the province of Overijssel and there 
are a number of customs that are typical of this province.

43 \startitemize
44 \head kraamschudden \hfill (child welcoming)
45 When a child is born the neighbours come to visit the 
new parents. The women come to admire the baby and the men 
come to judge the baby (if it is a boy) if he will become a 
strong man.
46 The neighbours will bring a {\em krentenwegge} along. 
A krentenwegge is a loaf of currant bread of about 1 \Meter\ 
long. Of course the birth is celebrated with {\em jenever}.

47 \head nabuurschap (naberschop) \hfill (neighbourship)
48 Smaller communities used to be very dependent on the 
cooperation among the members for their well being. Members 
of the {\em nabuurschap} helped each other in difficult 
times during harvest times, funerals or any hardship that 
fell upon the community.

49 \head Abraham \ Sarah  \hfill (identical)
50 When people turn 50 in Hasselt it is said that they 
see Abraham or Sarah. The custom is to give these people a 
{\em speculaas} Abraham or a Sarah. Speculaas is a kind of 
hard spiced biscuit.

51 \stopitemize
52 

- The tables pages 30-31-32-35 are not at the right position 
on the page, mostly they are to the right and not centered.


- The chemical formulae give an error (pages 37-38), but 
I'll come back to that later on, but what is the manual 
about it?


- The boxes on page 45, second example are not at the right 
position, particularly the second is on the same line as the 
first.

\leftaligned
{\inframed[width=fit]{People in Hasselt}}
\midaligned
{\inframed[height=1.5cm,frame=off]{have a}}
\rightaligned
{\inframed[background=screen]{historic background}}

What are the up todate manuals for MkIV?

OK It's enough bothering you for the moment.

Thanks in advance,

Alain Delmotte

___
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] Some questions

2013-01-25 Thread Marco Patzer
On 2013–01–25 Alain Delmotte wrote:

  I think it is for mkII and I use mkIV and that there has been many
 changes in between.

Indeed.

  - The example at the bottom of page 11 and page 12 gives me an
 error:
  ! Argument of \head has an extra }.

\starttext
\startitemize
  \starthead kraamschudden\hfill (child welcoming) \stophead
When a child is born the neighbours come to visit the new
parents. The women come to admire the baby and the men come to
judge the baby (if it is a boy) if he will become a strong man.
The neighbours will bring a {\em krentenwegge} along. A
krentenwegge is a loaf of currant bread of about \unit{1 meter}
long. Of course the birth is celebrated with {\em jenever}.
  \starthead nabuurschap (naberschop) \hfill (neighbourship) \stophead
Smaller communities used to be very dependent on the
cooperation among the members for their well being. Members of
the {\em nabuurschap} helped each other in difficult times
during harvest times, funerals or any hardship that fell upon
the community.
  \starthead Abraham \ Sarah \hfill (identical) \stophead
When people turn 50 in Hasselt it is said that they see Abraham
or Sarah. The custom is to give these people a {\em speculaas}
Abraham or a Sarah. Speculaas is a kind of hard spiced biscuit.
\stopitemize
\stoptext


 - The tables pages 30-31-32-35 are not at the right position on the
 page, mostly they are to the right and not centered.

I did not try all example, but this seems to work here. Can you
provide a minimal example and say what you expect to be different?

 - The chemical formulae give an error (pages 37-38), but I'll come
 back to that later on, but what is the manual about it?

Hans and Alan are in the process of completely re-writing the
chemical macros. I don't know the current state.

 - The boxes on page 45, second example are not at the right
 position, particularly the second is on the same line as the first.
 \leftaligned
 {\inframed[width=fit]{People in Hasselt}}
 \midaligned
 {\inframed[height=1.5cm,frame=off]{have a}}
 \rightaligned
 {\inframed[background=screen]{historic background}}

In MkIV there's a new syntax you can use:

\startlinealignment [left]
  \inframed[width=fit]{People in Hasselt}
\stoplinealignment

\startlinealignment [middle]
  \inframed[height=1.5cm,frame=on]{have a}
\stoplinealignment

\startlinealignment [right]
  \inframed[background=screen]{historic background}
\stoplinealignment

I did not investigate why the middle alignment is on the same line
as the left alignment and if that's intended or not.

 What are the up todate manuals for MkIV?

I'm afraid there are none (and probably never will be). The wiki
improved an awful lot during the last months, especially the command
reference. There's also the revised manual, tex.stackexchange and of
course the mailing list.

Marco


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

Re: [NTG-context] Some questions

2013-01-25 Thread Alan BRASLAU
On Fri, 25 Jan 2013 15:47:56 +0100
Marco Patzer home...@lavabit.com wrote:

  - The chemical formulae give an error (pages 37-38), but I'll come
  back to that later on, but what is the manual about it?  
 
 Hans and Alan are in the process of completely re-writing the
 chemical macros. I don't know the current state.

I have written a new manual that will be made available (soon),
once I manage to find some time with Hans to finish a few points...

I see that in the example from the ConTeXt Excursion manual, PB:...PE currently 
gives some errors.
I will look into this this weekend (I prefer to use SAVE...RESTORE, but I see 
that it is indeed
important to keep PB:...PE working to insure some backwards compatibility).

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] Some questions

2013-01-25 Thread Alain Delmotte

Hi,

Le 25/01/2013 15:47, Marco Patzer a écrit :

On 2013–01–25 Alain Delmotte wrote:

  - The example at the bottom of page 11 and page 12 gives me an
error:
  ! Argument of \head has an extra }.


\starttext
\startitemize
   \starthead kraamschudden\hfill (child welcoming) \stophead

[...]

 Abraham or a Sarah. Speculaas is a kind of hard spiced biscuit.
\stopitemize
\stoptext


Thanks, it works.




- The tables pages 30-31-32-35 are not at the right position on the
page, mostly they are to the right and not centered.


I did not try all example, but this seems to work here. Can you
provide a minimal example and say what you expect to be different?


In another example before, the locations for floats was 
changed to right and so all tables where to the right, 
except the last which had a location=left.



- The chemical formulae give an error (pages 37-38), but I'll come
back to that later on, but what is the manual about it?


Hans and Alan are in the process of completely re-writing the
chemical macros. I don't know the current state.


OK I'll wait


- The boxes on page 45, second example are not at the right
position, particularly the second is on the same line as the first.
\leftaligned
{\inframed[width=fit]{People in Hasselt}}
\midaligned
{\inframed[height=1.5cm,frame=off]{have a}}
\rightaligned
{\inframed[background=screen]{historic background}}


In MkIV there's a new syntax you can use:

\startlinealignment [left]
   \inframed[width=fit]{People in Hasselt}
\stoplinealignment

\startlinealignment [middle]
   \inframed[height=1.5cm,frame=on]{have a}
\stoplinealignment

\startlinealignment [right]
   \inframed[background=screen]{historic background}
\stoplinealignment

I did not investigate why the middle alignment is on the same line
as the left alignment and if that's intended or not.


OK, it works, but I do not get the result of the book, I'll 
investigate.




What are the up todate manuals for MkIV?


I'm afraid there are none (and probably never will be). The wiki
improved an awful lot during the last months, especially the command
reference. There's also the revised manual, tex.stackexchange and of
course the mailing list.


Waiting the book announced by Alan, I'll try to use the wiki 
and existing modified books.


Thanks a lot for your help,

Alain


___
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] Some questions

2013-01-25 Thread Alan BRASLAU
On Fri, 25 Jan 2013 20:17:38 +0100
Alain Delmotte espera...@swing.be wrote:

 Waiting the book announced by Alan

A manual *only* describing the chemical macros...
perhaps to be considered as a chapter of the official documentation...

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
___


[NTG-context] some questions related to sorting in registers

2010-11-28 Thread Vianney le Clément
Hello,

There has been some discussion about this lately, but I have some
questions about the sort order in registers. Consider this example:

\starttext
\index{42 numbers}
\index{'apostrophe}
\index{‘apostrophe}
\index{’apostrophe}
\index{quote}
\index{“quote}
\index{”quote}
\index{Oo}
\index{ob}
\index{oz}
\index{Öa}
Test
\subject{Method zm}
\placeindex[method=zm]
\subject{Method zc}
\placeindex[method=zc]
\stoptext

First of all, common to both methods, I'd like the unicode apostrophes
and quotes to be ignored just like their straight counterpart. Is
there a method to do so, apart from specifying the key manually?

Using the zm method, entries beginning with a number appear at the
very bottom of the index, which is quite a strange place especially as
there is no separation with the previous letter. Using the zc method,
the numbers are at the right place, but now entries beginning with an
accented character appear wrongly in a separate group after the
unaccented letters. Is there a way to get the best of both methods?

Thanks,
Vianney
___
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] Some questions about TeX Gyre support in minimals

2008-10-24 Thread Hans Hagen
Marcin Borkowski wrote:
 Dnia Thu, Oct 23, 2008 at 11:07:46PM +0400, Oleg Kolosov napisa#322;(a):
 Attached the resulting type-otf.tex. Maybe this'll save a few minutes for 
 someone.
 
 Wow!  I don't have the time to test it now with Polish, but I'll do it
 soon probably.  I guess it is usable only in MkIV...?  If yes, I'll have
 to switch;).
 
 Hans, any chance to have this code included someday soon in the
 minimals?

i just wait till mojca sends me a new file since she's managing these 
polish treasures

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] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Wolfgang Schuster
On Thu, Oct 23, 2008 at 12:31 AM, Oleg Kolosov [EMAIL PROTECTED] wrote:
 Hello Everyone!

 I've started to experiment with MkIV in ConTeXt minimals recently trying to
 make TeX Gyre fonts work with as few definitions as possible. Here is the list
 of problems I've encountered:

 1. No small-caps in any font (gyre fonts doesn't have that yet?)

\usetypescript[palatino]
\setupbodyfont[palatino]

\def\os{\groupedcommand{\setfontfeature{oldstyle}}{}}

\starttext

0123456789 {\os 0123456789}

\stoptext

Test the other fonts by yourself.

 2. adventor have italic but slanted displays as normal (roman)

 3. cursor have only roman script (no bold, slanted, etc.)

 Is this due to lack of fonts in Gyre package, some omissions in type-otf.tex
 or my typescript definitions are not complete?

 Here is the test file which I've used (some cyrillic text also):
 
 \starttypescript[mygyre]
 % change font last arg according to definitions in type-otf.tex
 % pagella, termes, bonum, schola
 \definetypeface [mygyre] [rm] [serif] [pagella]
 % heros, adventor
 \definetypeface [mygyre] [ss] [sans]  [adventor]
 \definetypeface [mygyre] [tt] [sans]  [cursor]
 \definetypeface [mygyre] [mm] [math]  [palatino]
 \stoptypescript

 \startbuffer[tests]
 \starttabulate
 \NC \tf tf \NC \tf Нормальный текст \NC\AR
 \NC \bf bf \NC \bf Полужирный текст \NC\AR
 \NC \it it \NC \it Курсивный текст  \NC\AR
 \NC \sl sl \NC \sl Наклонный текст  \NC\AR
 \NC \bi bi \NC \bi Полужирный курсив\NC\AR
 \NC \bs bs \NC \bs Полужирынй наклонный \NC\AR
 \NC \sc sc \NC \sc Пробный текст\NC\AR
 \stoptabulate
 \stopbuffer

 \usetypescript[mygyre]
 \setupbodyfont[mygyre]

 \starttext
 \section{roman (rm)}
 {\rm \getbuffer[tests]}

 \section{sans-serif (ss)}
 {\ss \getbuffer[tests]}

 \section{teletype (tt)}
 {\tt \getbuffer[tests]}

 \stoptext
 

 I'll update Russian section in the wiki, once these points are clarified.

 --
 Regards,
 Oleg Kolosov

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] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Aditya Mahajan

On Thu, 23 Oct 2008, Wolfgang Schuster wrote:


On Thu, Oct 23, 2008 at 12:31 AM, Oleg Kolosov [EMAIL PROTECTED] wrote:

Hello Everyone!

I've started to experiment with MkIV in ConTeXt minimals recently trying to
make TeX Gyre fonts work with as few definitions as possible. Here is the list
of problems I've encountered:

1. No small-caps in any font (gyre fonts doesn't have that yet?)


\usetypescript[palatino]
\setupbodyfont[palatino]

\def\os{\groupedcommand{\setfontfeature{oldstyle}}{}}


Shouldn't that be just

\def\os{\setufontfeature{oldstyle}}

Aditya


\starttext

0123456789 {\os 0123456789}

\stoptext

Test the other fonts by yourself.


2. adventor have italic but slanted displays as normal (roman)

3. cursor have only roman script (no bold, slanted, etc.)

Is this due to lack of fonts in Gyre package, some omissions in type-otf.tex
or my typescript definitions are not complete?

Here is the test file which I've used (some cyrillic text also):

\starttypescript[mygyre]
% change font last arg according to definitions in type-otf.tex
% pagella, termes, bonum, schola
\definetypeface [mygyre] [rm] [serif] [pagella]
% heros, adventor
\definetypeface [mygyre] [ss] [sans]  [adventor]
\definetypeface [mygyre] [tt] [sans]  [cursor]
\definetypeface [mygyre] [mm] [math]  [palatino]
\stoptypescript

\startbuffer[tests]
\starttabulate
\NC \tf tf \NC \tf Нормальный текст \NC\AR
\NC \bf bf \NC \bf Полужирный текст \NC\AR
\NC \it it \NC \it Курсивный текст  \NC\AR
\NC \sl sl \NC \sl Наклонный текст  \NC\AR
\NC \bi bi \NC \bi Полужирный курсив\NC\AR
\NC \bs bs \NC \bs Полужирынй наклонный \NC\AR
\NC \sc sc \NC \sc Пробный текст\NC\AR
\stoptabulate
\stopbuffer

\usetypescript[mygyre]
\setupbodyfont[mygyre]

\starttext
\section{roman (rm)}
{\rm \getbuffer[tests]}

\section{sans-serif (ss)}
{\ss \getbuffer[tests]}

\section{teletype (tt)}
{\tt \getbuffer[tests]}

\stoptext


I'll update Russian section in the wiki, once these points are clarified.

--
Regards,
Oleg Kolosov


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] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Wolfgang Schuster
On Thu, Oct 23, 2008 at 3:33 PM, Aditya Mahajan [EMAIL PROTECTED] wrote:
 On Thu, 23 Oct 2008, Wolfgang Schuster wrote:

 On Thu, Oct 23, 2008 at 12:31 AM, Oleg Kolosov [EMAIL PROTECTED] wrote:

 Hello Everyone!

 I've started to experiment with MkIV in ConTeXt minimals recently trying
 to
 make TeX Gyre fonts work with as few definitions as possible. Here is the
 list
 of problems I've encountered:

 1. No small-caps in any font (gyre fonts doesn't have that yet?)

 \usetypescript[palatino]
 \setupbodyfont[palatino]

 \def\os{\groupedcommand{\setfontfeature{oldstyle}}{}}

 Shouldn't that be just

 \def\os{\setufontfeature{oldstyle}}

I don't know what the best method is, I never user them in this way.

Hans suggested this method.

http://archive.contextgarden.net/message/20080920.104922.1b864b2b.en.html

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

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


Re: [NTG-context] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Hans Hagen
Aditya Mahajan wrote:
 On Thu, 23 Oct 2008, Wolfgang Schuster wrote:
 
 On Thu, Oct 23, 2008 at 12:31 AM, Oleg Kolosov [EMAIL PROTECTED] 
 wrote:
 Hello Everyone!

 I've started to experiment with MkIV in ConTeXt minimals recently 
 trying to
 make TeX Gyre fonts work with as few definitions as possible. Here is 
 the list
 of problems I've encountered:

 1. No small-caps in any font (gyre fonts doesn't have that yet?)

 \usetypescript[palatino]
 \setupbodyfont[palatino]

 \def\os{\groupedcommand{\setfontfeature{oldstyle}}{}}
 
 Shouldn't that be just
 
 \def\os{\setufontfeature{oldstyle}}

the grouped variant permits \os{123} and {\os 123}

-
   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] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Oleg Kolosov
Mojca Miklavec wrote:
 1. No small-caps in any font (gyre fonts doesn't have that yet?)
 
 I didn't check yet, but it's probably a global problem in mkiv
 smallcaps support.
 

Tried with MkII and MkIV. No small caps in sans-serif only if text is written
in english. In MkIV with gyre smallcaps are available only in normal script.
But with cyrillic no smallcaps in every case.

If you need I can test every combination and make a more detailed report.

 2. adventor have italic but slanted displays as normal (roman)
 
 in type-otf.tex at least this is missing:
 
 \starttypescript [sans] [adventor] % and possibly others
 \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular]
 
 
 The same is true for mono.
 

Great! These definitions fixed the most problems. One note: previously
cyrillic should be smallcaps text displayed as roman, now it is missing
completely, but latin works fine. Is there a workaround to remap this somehow?
I didn't learn about typescripts enough yet to do this myself (but working on 
it).

 3. cursor have only roman script (no bold, slanted, etc.)
 \definetypeface [mygyre] [tt] [sans]  [cursor]
 
 Try
\definetypeface [mygyre] [tt] [mono]  [cursor]
 
 Also, in type-otf.tex one needs to fix
 \starttypescript [sans] [cursor] [name]
 into
 \starttypescript [sans] [mono] [name]
 

Possibly this should be: \starttypescript [mono] [cursor] [name] ?

 (I'm just afraid that you'll find so many problem in the Cyrillic part
 of Gyre ...)

Except for missing small-caps (this is not critical at all) and with addition
of your definitions in type-otf.tex TeX Gyre support is enough to write in
Russian language (tested all fonts). I've compiled big documents and not found
any deficiencies so far.

Attached the resulting type-otf.tex. Maybe this'll save a few minutes for 
someone.

-- 
Regards,
Oleg Kolosov
%D \module
%D   [   file=type-otf,
%Dversion=2007.07.30,
%D  title=\CONTEXT\ Typescript Macros,
%D   subtitle=Opentype Definitions,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA / Hans Hagen \ Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Actually, \LUATEX\ does not need all these definitions since it can
%D consult its database. However, here we use the names that we used
%D in good old \TEX, and these may differ a bit. Here we also see
%D some oldstyle definitions which normally are done with features.

\starttypescriptcollection[examples]

\starttypescript [fallback]
\definetypeface [] [rm] [serif] [modern] [computer-modern]
\definetypeface [] [ss] [sans]  [modern] [computer-modern]
\definetypeface [] [tt] [mono]  [modern] [computer-modern]
\definetypeface [] [mm] [math]  [modern] [computer-modern]
\quittypescriptscanning
\stoptypescript

\starttypescript [modern]
\definetypeface [modern] [rm] [serif] [modern] [computer-modern]
\definetypeface [modern] [ss] [sans]  [modern] [computer-modern]
\definetypeface [modern] [tt] [mono]  [modern] [computer-modern]
\definetypeface [modern] [mm] [math]  [modern] [computer-modern]
\quittypescriptscanning
\stoptypescript

\starttypescript [modern-base]
\definetypeface [modern] [rm] [serif] [modern] [default]
\definetypeface [modern] [ss] [sans]  [modern] [default]
\definetypeface [modern] [tt] [mono]  [modern] [default]
\definetypeface [modern] [mm] [math]  [modern] [default]
\quittypescriptscanning
\stoptypescript

\starttypescript [postscript]
\definetypeface [postscript] [rm] [serif] [times] [default]
\definetypeface [postscript] [ss] [sans]  [helvetica] [default] [rscale=.9]
\definetypeface [postscript] [tt] [mono]  [courier]   [default] [rscale=1.1]
\definetypeface [postscript] [mm] [math]  [times] [default]
\quittypescriptscanning
\stoptypescript

\starttypescript [times]
\definetypeface [times] [rm] [serif] [times] [default]
\definetypeface [times] [ss] [sans]  [helvetica] [default] [rscale=0.9]
\definetypeface [times] [tt] [mono]  [modern][default] [rscale=1.05]
\definetypeface [times] [mm] [math]  [times] [default]
\quittypescriptscanning
\stoptypescript

\starttypescript [palatino]
\definetypeface [palatino] [rm] [serif] [palatino] [default]
\definetypeface [palatino] [ss] [sans]  [modern]   [default] [rscale=1.075]
\definetypeface [palatino] [tt] [mono]  [modern]   [default] [rscale=1.075]
\definetypeface [palatino] [mm] [math]  [palatino] [default]
\quittypescriptscanning
\stoptypescript

\starttypescript [modernvariable]
\definetypeface [modernvariable] [rm] [serif] [simple] [default]
\definetypeface [modernvariable] [ss] [sans]  [modern] [default]
\definetypeface [modernvariable] [tt] [mono]  [modern] [default]
\definetypeface [modernvariable] [mm] [math]  [modern] [default]
\quittypescriptscanning

Re: [NTG-context] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Marcin Borkowski
Dnia Thu, Oct 23, 2008 at 11:07:46PM +0400, Oleg Kolosov napisa#322;(a):
 
 Attached the resulting type-otf.tex. Maybe this'll save a few minutes for 
 someone.

Wow!  I don't have the time to test it now with Polish, but I'll do it
soon probably.  I guess it is usable only in MkIV...?  If yes, I'll have
to switch;).

Hans, any chance to have this code included someday soon in the
minimals?

 Regards,
 Oleg Kolosov

Greets

-- 
Marcin Borkowski (http://mbork.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] Some questions about TeX Gyre support in minimals

2008-10-23 Thread Mojca Miklavec
On Fri, Oct 24, 2008 at 12:53 AM, Marcin Borkowski  wrote:
 Dnia Thu, Oct 23, 2008 at 11:07:46PM +0400, Oleg Kolosov napisa#322;(a):

 Attached the resulting type-otf.tex. Maybe this'll save a few minutes for 
 someone.

 Wow!  I don't have the time to test it now with Polish, but I'll do it
 soon probably.  I guess it is usable only in MkIV...?  If yes, I'll have
 to switch;).

If there are problems with mkii, type-gyr.tex should be fixed as well.
Just point to the problems.

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

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


[NTG-context] Some questions about TeX Gyre support in minimals

2008-10-22 Thread Oleg Kolosov
Hello Everyone!

I've started to experiment with MkIV in ConTeXt minimals recently trying to
make TeX Gyre fonts work with as few definitions as possible. Here is the list
of problems I've encountered:

1. No small-caps in any font (gyre fonts doesn't have that yet?)

2. adventor have italic but slanted displays as normal (roman)

3. cursor have only roman script (no bold, slanted, etc.)

Is this due to lack of fonts in Gyre package, some omissions in type-otf.tex
or my typescript definitions are not complete?

Here is the test file which I've used (some cyrillic text also):

\starttypescript[mygyre]
% change font last arg according to definitions in type-otf.tex
% pagella, termes, bonum, schola
\definetypeface [mygyre] [rm] [serif] [pagella]
% heros, adventor
\definetypeface [mygyre] [ss] [sans]  [adventor]
\definetypeface [mygyre] [tt] [sans]  [cursor]
\definetypeface [mygyre] [mm] [math]  [palatino]
\stoptypescript

\startbuffer[tests]
\starttabulate
\NC \tf tf \NC \tf Нормальный текст \NC\AR
\NC \bf bf \NC \bf Полужирный текст \NC\AR
\NC \it it \NC \it Курсивный текст  \NC\AR
\NC \sl sl \NC \sl Наклонный текст  \NC\AR
\NC \bi bi \NC \bi Полужирный курсив\NC\AR
\NC \bs bs \NC \bs Полужирынй наклонный \NC\AR
\NC \sc sc \NC \sc Пробный текст\NC\AR
\stoptabulate
\stopbuffer

\usetypescript[mygyre]
\setupbodyfont[mygyre]

\starttext
\section{roman (rm)}
{\rm \getbuffer[tests]}

\section{sans-serif (ss)}
{\ss \getbuffer[tests]}

\section{teletype (tt)}
{\tt \getbuffer[tests]}

\stoptext


I'll update Russian section in the wiki, once these points are clarified.

-- 
Regards,
Oleg Kolosov
___
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] Some questions about TeX Gyre support in minimals

2008-10-22 Thread Mojca Miklavec
On Thu, Oct 23, 2008 at 12:31 AM, Oleg Kolosov wrote:
 Hello Everyone!

Hello,

 I've started to experiment with MkIV in ConTeXt minimals recently trying to
 make TeX Gyre fonts work with as few definitions as possible. Here is the list
 of problems I've encountered:

 1. No small-caps in any font (gyre fonts doesn't have that yet?)

I didn't check yet, but it's probably a global problem in mkiv
smallcaps support.

 2. adventor have italic but slanted displays as normal (roman)

in type-otf.tex at least this is missing:

\starttypescript [sans] [adventor] % and possibly others
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular]
 [file:texgyre\typescriptprefix{f:\typescripttwo}-regular]
[features=default]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic]
 [file:texgyre\typescriptprefix{f:\typescripttwo}-italic]
[features=default]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold]
 [file:texgyre\typescriptprefix{f:\typescripttwo}-bold]
[features=default]
\definefontsynonym
[\typescriptprefix{n:\typescripttwo}-BoldItalic]
[file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic]
[features=default]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps]
 [file:texgyre\typescriptprefix{f:\typescripttwo}-regular]
[features=oldstyle]
\definefontsynonym
[\typescriptprefix{n:\typescripttwo}-ItalicCaps]
[file:texgyre\typescriptprefix{f:\typescripttwo}-italic]
[features=oldstyle]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps]
 [file:texgyre\typescriptprefix{f:\typescripttwo}-bold]
[features=oldstyle]
\definefontsynonym
[\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
[file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic]
[features=oldstyle]
\definefontsynonym [\typescriptprefix{n:\typescripttwo}-Slanted]
 [\typescriptprefix{n:\typescripttwo}-Italic]
[features=default]
\definefontsynonym
[\typescriptprefix{n:\typescripttwo}-BoldSlanted]
[\typescriptprefix{n:\typescripttwo}-BoldItalic]
[features=default]
\stoptypescript

The same is true for mono.

 3. cursor have only roman script (no bold, slanted, etc.)
 \definetypeface [mygyre] [tt] [sans]  [cursor]

Try
   \definetypeface [mygyre] [tt] [mono]  [cursor]

Also, in type-otf.tex one needs to fix
\starttypescript [sans] [cursor] [name]
into
\starttypescript [sans] [mono] [name]


Thanks a lot for pointing out all the problems.

Mojca

(I'm just afraid that you'll find so many problem in the Cyrillic part
of Gyre ...)
___
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] Some questions about the taspresent module

2008-05-18 Thread Jean Magnan de Bornier
Hi all (especially Thomas)

I have played these days with the last version of the taspresent
presentation module, to see how it can be used as such and/or with
emacs-muse.
I have discovered that due to the \Maketitle macros, which did not exist
in the first versions, it is quite easy to have a muse style and nearly
everything works quite well.

I use mkiv from minimals.

I have a few concerns though:

- On some of the styles, page numbering is like this: 1 of 10, 2 of 10,
  etc. Is there a way, as I have to write in french more often than not,
  to modify that in my tex file without changing the style file (which I
  prefer not to do)?
- With the greenblue style the title page is produced with its layout, but
  no text appears on that page... 
- The embossed style doesn't compile, apparently due some missing font
  (Emblem); is it some rare font, and if not where can I find it? I have
  installed a file called Emblem Regular.ttf but that didn't change
  things; here is the error message (AucTeX):

..
ERROR: Font \**Emblem**:=uhvb8r at 30pt not loadable: metric data not found or 
bad.

--- TeX said ---
to be read again 
   \relax 
\dododefinefont ...ontspec {#2}\rawfontidentifier 
  \let \localrelativefontsiz...
l.1 ...t,top=\vss ,bottom=\vss ,frame=off]{\Emblem
   \color [c]{Made with C\CM...
--- HELP ---
You requested a family/series/shape/size combination that is totally
unknown.  There are two cases in which this error can occur:
  1) You used the \size macro to select a size that is not available.
  2) If you did not do that, go to your local `wizard' and
 complain fiercely that the font selection tables are corrupted!
..


I will soon update the muse page on the wiki, but I wish these problems
could be solved before :-)

best
-- 
Jean
___
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] Some questions about the taspresent module

2008-05-18 Thread Hans Hagen
Jean Magnan de Bornier wrote:
 Hi all (especially Thomas)
 
 I have played these days with the last version of the taspresent
 presentation module, to see how it can be used as such and/or with
 emacs-muse.
 I have discovered that due to the \Maketitle macros, which did not exist
 in the first versions, it is quite easy to have a muse style and nearly
 everything works quite well.
 
 I use mkiv from minimals.
 
 I have a few concerns though:
 
 - On some of the styles, page numbering is like this: 1 of 10, 2 of 10,
   etc. Is there a way, as I have to write in french more often than not,
   to modify that in my tex file without changing the style file (which I
   prefer not to do)?

use labeltexts (grep a bit for 'chapter', 'figure' and such) since they 
adapt to the language (lang-*.tex)

 - With the greenblue style the title page is produced with its layout, but
   no text appears on that page... 

test file needed; keep in mind that some of these styles may use box 
copying tricks and in such cases attributes (like color) may not carry over

 - The embossed style doesn't compile, apparently due some missing font
   (Emblem); is it some rare font, and if not where can I find it? I have
   installed a file called Emblem Regular.ttf but that didn't change
   things; here is the error message (AucTeX):

hm, type 1 font mess (can be the name, map file, encoding ...)


-
   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] Some questions about the taspresent module

2008-05-18 Thread Thomas A. Schmitz

On May 18, 2008, at 4:12 PM, Jean Magnan de Bornier wrote:

 Hi all (especially Thomas)

 I have played these days with the last version of the taspresent
 presentation module, to see how it can be used as such and/or with
 emacs-muse.
 I have discovered that due to the \Maketitle macros, which did not  
 exist
 in the first versions, it is quite easy to have a muse style and  
 nearly
 everything works quite well.

Hear hear -- glad to see that you're testing the module.


 I use mkiv from minimals.

 I have a few concerns though:

 - On some of the styles, page numbering is like this: 1 of 10, 2 of  
 10,
  etc. Is there a way, as I have to write in french more often than  
 not,
  to modify that in my tex file without changing the style file  
 (which I
  prefer not to do)?

OK, Hans suggested to use labeltexts; I'll have to learn how to use  
it. The basic idea seems to be to have something like this in the  
module:

\setuplabeltext [\s!fr]   [\v!of=de]

and then use \v!of in the code, is that about right, Hans? Jean: in  
French, would you say 1 sur 10 or 1 de 10?

 - With the greenblue style the title page is produced with its  
 layout, but
  no text appears on that page...

I was going for a Zen-look... :-) Seriously: it works here, I get  
normal output for the title page - can you send a small test file?


 - The embossed style doesn't compile, apparently due some missing font
  (Emblem); is it some rare font, and if not where can I find it? I  
 have
  installed a file called Emblem Regular.ttf but that didn't change
  things; here is the error message (AucTeX):

Ah Ok, that's because luaTeX doesn't use the tfm files, so it can't  
find this font. OK, I have a problem here and may need help. Two  
solutions are possible:

1. Use the same font via afm/pfb. This would mean I have to refer to  
the font like so:


\beginLUATEX
\definefontsynonym [BigBoss] [name:NimbusSanL-Bold]
\definefont[Emblem] [BigBoss at 30pt]
\endLUATEX

However, there is a problem with this font; I get this error:

/usr/local/texlive/2007/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb
! Emergency stop.
* ./08_05_20_b.tex

fclose: Bad file descriptor
fclose: Bad file descriptor
!  == Fatal error occurred, no output PDF file produced!

Hans, Taco, any idea what's going wrong here?

2. Use an OpenType font instead; specifically the TeXGyreHeros. This  
would mean:

\beginLUATEX
\definefontsynonym [BigBoss] [name:TeXGyreHeros-Bold]
\definefont[Emblem] [BigBoss at 30pt]
\endLUATEX

Problem here: this switch messes up the spacing; with all TeXGyre  
font, the graphic doesn't respect its position on the page. I'm not  
sure if it is the font or mkiv in general or MPlib. I'll have to  
investigate that and will look into it, but I can't promise that it  
will be very soon.

Thanks for testing , all best

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


Re: [NTG-context] Some questions about the taspresent module

2008-05-18 Thread Hans Hagen
Thomas A. Schmitz wrote:

 \setuplabeltext [\s!fr]   [\v!of=de]
 
 and then use \v!of in the code, is that about right, Hans? Jean: in  
 French, would you say 1 sur 10 or 1 de 10?

indeed; best start making a list of languages and \v!of ... so that we 
have a support for more then en/de/fr

mayeb use 'ofpage' instead (and atpage)

 \beginLUATEX
 \definefontsynonym [BigBoss] [name:NimbusSanL-Bold]
 \definefont[Emblem] [BigBoss at 30pt]
 \endLUATEX
 
 However, there is a problem with this font; I get this error:
 
 /usr/local/texlive/2007/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb
 ! Emergency stop.
 * ./08_05_20_b.tex
 
 fclose: Bad file descriptor
 fclose: Bad file descriptor
 !  == Fatal error occurred, no output PDF file produced!
 
 Hans, Taco, any idea what's going wrong here?

no .. a small test file will help us -)

 Problem here: this switch messes up the spacing; with all TeXGyre  
 font, the graphic doesn't respect its position on the page. I'm not  
 sure if it is the font or mkiv in general or MPlib. I'll have to  
 investigate that and will look into it, but I can't promise that it  
 will be very soon.

hm, puzzled

-
   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] Some questions about the taspresent module

2008-05-18 Thread Thomas A. Schmitz

On May 18, 2008, at 6:36 PM, Hans Hagen wrote:

 no .. a small test file will help us -)

Sure thing:

\starttext

{\font\test=name:NimbusSanL-Bold \test Hello world!}

\stoptext

Same error:
/usr/local/texlive/2007/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb
! Emergency stop.
* ./test.tex

fclose: Bad file descriptor
fclose: Bad file descriptor
!  == Fatal error occurred, no output PDF file produced!

___
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] Some questions about the taspresent module

2008-05-18 Thread Jean Magnan de Bornier
Le 18 mai à 18:09:29 Thomas A. Schmitz [EMAIL PROTECTED] écrit notamment:

| OK, Hans suggested to use labeltexts; I'll have to learn how to use  
| it. The basic idea seems to be to have something like this in the  
| module:

| \setuplabeltext [\s!fr]   [\v!of=de]

| and then use \v!of in the code, is that about right, Hans? Jean: in  
| French, would you say 1 sur 10 or 1 de 10?

Great! There is a way to do it!
1 sur 10 is definitely much better (but it is not very elegant either)
I need more thinking about that...

Here is my minimal example:
...
\usemodule[taspresent][style=greenblue,font=Pagella,size=17pt]
\setvariables [taspresent]
  [author={Jean Magnan de Bornier},
   title={Le darwinisme et ses méthodes}]
\starttext
\Maketitle
%\lecback
\Slidetitle  {J'ai faim}

Pour..

\stoptext


With %lecback, I have the text of the titlepage, but the layout is wrong
(green in the whole left middle of the page).
With lecback not commented out, no text on the titlepage.
-- 
Jean
___
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] Some questions about the taspresent module

2008-05-18 Thread Thomas A. Schmitz

On May 18, 2008, at 7:11 PM, Jean Magnan de Bornier wrote:

 Great! There is a way to do it!
 1 sur 10 is definitely much better (but it is not very elegant  
 either)
 I need more thinking about that...


Of course there's a way to do it; this is ConTeXt, baby... :-)

 Here is my minimal example:
 ...
 \usemodule[taspresent][style=greenblue,font=Pagella,size=17pt]
 \setvariables [taspresent]
  [author={Jean Magnan de Bornier},
   title={Le darwinisme et ses méthodes}]
 \starttext
 \Maketitle
 %\lecback
 \Slidetitle  {J'ai faim}

 Pour..

 \stoptext

Move the \lecback after the line with \Slidetitle, and everything's  
OK. Explanation: the \picback \lecback \titback macros set the  
background for the current page, so they need to be issued AFTER a  
pagebreak (implied in the \Slidetitle macro).

All best

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


Re: [NTG-context] Some questions about the taspresent module

2008-05-18 Thread Thomas A. Schmitz

On May 18, 2008, at 7:11 PM, Jean Magnan de Bornier wrote:

 Here is my minimal example:
 ...
 \usemodule[taspresent][style=greenblue,font=Pagella,size=17pt]
 \setvariables [taspresent]
 [author={Jean Magnan de Bornier},
  title={Le darwinisme et ses méthodes}]
 \starttext
 \Maketitle
 %\lecback
 \Slidetitle  {J'ai faim}

 Pour..

 \stoptext


Oh, btw, I need to write the font definitions for luaTeX; right now,  
you don't get Pagella with this example. I will do this soonish.

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


Re: [NTG-context] Some questions about the taspresent module

2008-05-18 Thread Taco Hoekwater
Thomas A. Schmitz wrote:
 On May 18, 2008, at 6:36 PM, Hans Hagen wrote:
 
 no .. a small test file will help us -)
 
 Sure thing:
 
 \starttext
 
 {\font\test=name:NimbusSanL-Bold \test Hello world!}
 
 \stoptext
 
 Same error:
 /usr/local/texlive/2007/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb
 ! Emergency stop.
 * ./test.tex
 
 fclose: Bad file descriptor
 fclose: Bad file descriptor
 !  == Fatal error occurred, no output PDF file produced!

Works fine here, with latest trunk (#1270) and bleeding-edge private
context beta. It could be caused by the AFM problem Hans has fixed
just before the weekend. There are no valgrind warnings either, so
we will have to wait and see if the next official context beta removes
the problem for you as well.

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

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


Re: [NTG-context] Some questions about the taspresent module

2008-05-18 Thread Jean Magnan de Bornier
Le 18 mai à 19:21:59 Thomas A. Schmitz [EMAIL PROTECTED] écrit notamment:

| Move the \lecback after the line with \Slidetitle, and everything's  
| OK. Explanation: the \picback \lecback \titback macros set the  
| background for the current page, so they need to be issued AFTER a  
| pagebreak (implied in the \Slidetitle macro).

I see; but the other styles work nicely with lecback where I have put it,
don't they?

If I have to write lecback in that position, my muse styles will be more
difficult to set up :(

btw, afaik titback is implied in \Maketitle, right? Cannot \lecback be
also included in the \Slidetitle macro?

best
-- 
Jean
___
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] Some questions about the taspresent module

2008-05-18 Thread Hans Hagen
Taco Hoekwater wrote:
 Thomas A. Schmitz wrote:
 On May 18, 2008, at 6:36 PM, Hans Hagen wrote:

 no .. a small test file will help us -)
 Sure thing:

 \starttext

 {\font\test=name:NimbusSanL-Bold \test Hello world!}

 \stoptext

 Same error:
 /usr/local/texlive/2007/texmf-dist/fonts/type1/urw/helvetic/uhvb8a.pfb
 ! Emergency stop.
 * ./test.tex

 fclose: Bad file descriptor
 fclose: Bad file descriptor
 !  == Fatal error occurred, no output PDF file produced!
 
 Works fine here, with latest trunk (#1270) and bleeding-edge private
 context beta. It could be caused by the AFM problem Hans has fixed
 just before the weekend. There are no valgrind warnings either, so
 we will have to wait and see if the next official context beta removes
 the problem for you as well.

ok, tomorrow taco and i will do some more tests with the binaries (and 
our test files) and if things run well i can do a release

-
   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] Some questions about the taspresent module

2008-05-18 Thread Thomas A. Schmitz

On May 18, 2008, at 8:23 PM, Jean Magnan de Bornier wrote:

 I see; but the other styles work nicely with lecback where I have  
 put it,
 don't they?

That's a coincidence, and I haven't tested it.

 If I have to write lecback in that position, my muse styles will be  
 more
 difficult to set up :(

Sorry about that, but the mechanism demands that an explicit pagebreak  
be issued before changing the background. If this makes it any easier  
for you, you could also do this:

\starttext
\Maketitle
\page
\lecback
\Slidetitle  {J'ai faim}


 btw, afaik titback is implied in \Maketitle, right? Cannot \lecback be
 also included in the \Slidetitle macro?

Well, that's one of the things where I haven't really made up my mind.  
In theory, you're right; the Slidetitle will only be typeset if we  
have the lecback background. Question to the wizards: would it hurt to  
have a background switch at every page, even if the background doesn't  
really change? I'm kinda reluctant to change the interface now, but  
maybe I should. What do you think about this setup:

\Slidetitle{blabla} = breaks page, invokes switch to normal  
background, typesets argument as title above slide

\Picturetitle{blabla} = breaks page, invokes switch to picture  
background, typesets argument opposite picture

So question is: is anyone using this (besides Jean and myself) and  
relies on the current interface?

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


Re: [NTG-context] Some questions about the taspresent module

2008-05-18 Thread Jean Magnan de Bornier
Le 18 mai à 22:11:33 Thomas A. Schmitz [EMAIL PROTECTED] écrit notamment:

| On May 18, 2008, at 8:23 PM, Jean Magnan de Bornier wrote:

|  I see; but the other styles work nicely with lecback where I have  
|  put it,
|  don't they?
| 
| That's a coincidence, and I haven't tested it.

|  If I have to write lecback in that position, my muse styles will be  
|  more
|  difficult to set up :(

| Sorry about that, but the mechanism demands that an explicit pagebreak  
| be issued before changing the background. If this makes it any easier  
| for you, you could also do this:

| \starttext
| \Maketitle
| \page
| \lecback
| \Slidetitle  {J'ai faim}

Yes, this was easy to integrate and works quite well.


| 
|  btw, afaik titback is implied in \Maketitle, right? Cannot \lecback be
|  also included in the \Slidetitle macro?
| 
| Well, that's one of the things where I haven't really made up my mind.  
| In theory, you're right; the Slidetitle will only be typeset if we  
| have the lecback background. Question to the wizards: would it hurt to  
| have a background switch at every page, even if the background doesn't  
| really change? I'm kinda reluctant to change the interface now, but  
| maybe I should. What do you think about this setup:

| \Slidetitle{blabla} = breaks page, invokes switch to normal  
| background, typesets argument as title above slide

| \Picturetitle{blabla} = breaks page, invokes switch to picture  
| background, typesets argument opposite picture

| So question is: is anyone using this (besides Jean and myself) and  
| relies on the current interface?

That is really what I had in mind; so I could have different tags to call
these different types of slides. But the first solution is already quite
good!

best,
-- 
Jean
___
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] Some questions about context

2007-03-11 Thread Wolfgang Schuster
On Sun, 11 Mar 2007 14:15:47 +1100
Robin Kirkham [EMAIL PROTECTED] wrote:

 Hi Wolfgang,
 
 Many thanks for you help. I solved this problem by simply
 
 \setuplayout[%
  ... ,
  leftedge=20mm,
  rightedge=20mm]
 \setupheader[after=\hrule]
 
 It seems that if you give only one argument to \setupheader, it  
 applies to the whole header, including the left and right edges. So,  
 I just extend the edges off the page (or anywhere I need -- I don't  
 use the edges for anything else).
 
 I'll use your \vrule idea to control the line thickness, although the  
 \hrule default is about right anyway.

Hi Robin,

you can use \hrule height xx pt|cm|... to change the rulethickness. I
needed \vrule in my example because TeX was in horizontal mode where
you can only use \vrule, \hrule therefore can only be used in vertical
mode, you can see is depends on the current TeX if you can use \hrule
or \vrule.

Another thing is that your solution place the rule below the header
text, my method use the headerbackground and is therefore independant
from the current textstyle and size.

I played with your solution and found a few problem. I think there are
also problem that can appear with my solution but I had not tried to
find them.

\setuplayout
  [location=middle,
   leftedge=20mm,
   rightedge=20mm]

\setuppapersize[A5][A4]
%\showframe


\setupheader
  [after=\hrule]

\starttext

\input knuth

\page

\setupheader[state=empty]

\input knuth

\page

\setuppagenumbering[location=]
\setupheader[state=start]

\input knuth

\stoptext

Wolfgang

 
 Thanks,
 
 Robin
 
 
  Moreover, how do you get a rule in the header that extends from the
  left of the left margin, right across to the right of the right
  margin (including the gaps in between)?
 
  On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:
 
  From: Oliver Buerschaper [EMAIL PROTECTED]
  Date: 6 March 2007 9:19:23 PM
  Subject: Re: [NTG-context] Some questions about context
 
  And another question (in other topic): how we can do lines at
  header and
  footer like fancyheaders in latex?
 
  For your headers try this:
 
  \setupheader
[text]
[after=\hrule]
 
  Hi Robin,
 
  I tried to make something working and came to the following three
  methods to draw a rule under the header at the whole pagewidth.
 
  If you use ConTeXts default layout with different margins you should
  use bigger values for the rulewidth than only pagewidth.
 
  \setuplayout[location=middle,cutspace=\backspace,width=middle]
  %\setuppapersize[A5][A4]
  %\showframe
 
  \startuseMPgraphic{headerrule}
  setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
  \headerheight); draw (0,0)--(\the\paperwidth,0);
  \stopuseMPgraphic
 
  \defineoverlay
[headerrule]
[\useMPgraphic{headerrule}]
 
  \defineoverlay
[headerrule]
[\vrule height\headerheight width0pt%
 \vrule width\paperwidth height 0.4pt\relax]
 
  \defineoverlay
[headerrule]
[{\framed[width=\paperwidth,height=
  \headerheight,frame=off,bottomframe=on]{}}]
 
  \setupbackgrounds
[header]
[text]
[background=headerrule]
 
  \starttext
 
  \input knuth
 
  \stoptext
 
  Wolfgang
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some questions about context

2007-03-10 Thread Robin Kirkham
Hi Wolfgang,

Many thanks for you help. I solved this problem by simply

\setuplayout[%
 ... ,
 leftedge=20mm,
 rightedge=20mm]
\setupheader[after=\hrule]

It seems that if you give only one argument to \setupheader, it  
applies to the whole header, including the left and right edges. So,  
I just extend the edges off the page (or anywhere I need -- I don't  
use the edges for anything else).

I'll use your \vrule idea to control the line thickness, although the  
\hrule default is about right anyway.

Thanks,

Robin


 Moreover, how do you get a rule in the header that extends from the
 left of the left margin, right across to the right of the right
 margin (including the gaps in between)?

 On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:

 From: Oliver Buerschaper [EMAIL PROTECTED]
 Date: 6 March 2007 9:19:23 PM
 Subject: Re: [NTG-context] Some questions about context

 And another question (in other topic): how we can do lines at
 header and
 footer like fancyheaders in latex?

 For your headers try this:

 \setupheader
 [text]
 [after=\hrule]

 Hi Robin,

 I tried to make something working and came to the following three
 methods to draw a rule under the header at the whole pagewidth.

 If you use ConTeXts default layout with different margins you should
 use bigger values for the rulewidth than only pagewidth.

 \setuplayout[location=middle,cutspace=\backspace,width=middle]
 %\setuppapersize[A5][A4]
 %\showframe

 \startuseMPgraphic{headerrule}
 setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
 \headerheight); draw (0,0)--(\the\paperwidth,0);
 \stopuseMPgraphic

 \defineoverlay
   [headerrule]
   [\useMPgraphic{headerrule}]

 \defineoverlay
   [headerrule]
   [\vrule height\headerheight width0pt%
\vrule width\paperwidth height 0.4pt\relax]

 \defineoverlay
   [headerrule]
   [{\framed[width=\paperwidth,height=
 \headerheight,frame=off,bottomframe=on]{}}]

 \setupbackgrounds
   [header]
   [text]
   [background=headerrule]

 \starttext

 \input knuth

 \stoptext

 Wolfgang

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


Re: [NTG-context] Some questions about context

2007-03-09 Thread Wolfgang Schuster
On Wed, 7 Mar 2007 00:00:38 +1100
Robin Kirkham [EMAIL PROTECTED] wrote:

 Hi all,
 
 Moreover, how do you get a rule in the header that extends from the  
 left of the left margin, right across to the right of the right  
 margin (including the gaps in between)?
 
 Cheers,
 
 Robin
 
 On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:
 
  From: Oliver Buerschaper [EMAIL PROTECTED]
  Date: 6 March 2007 9:19:23 PM
  To: mailing list for ConTeXt users ntg-context@ntg.nl
  Subject: Re: [NTG-context] Some questions about context
 
  And another question (in other topic): how we can do lines at  
  header and
  footer like fancyheaders in latex?
 
  For your headers try this:
 
  \setupheader
  [text]
  [after=\hrule]

Hi Robin,

I tried to make something working and came to the following three
methods to draw a rule under the header at the whole pagewidth.

If you use ConTeXts default layout with different margins you should
use bigger values for the rulewidth than only pagewidth.

\setuplayout[location=middle,cutspace=\backspace,width=middle]
%\setuppapersize[A5][A4]
%\showframe

\startuseMPgraphic{headerrule}
setbounds currentpicture to unitsquare xyscaled (\the\paperwidth,\the
\headerheight); draw (0,0)--(\the\paperwidth,0);
\stopuseMPgraphic

\defineoverlay
  [headerrule]
  [\useMPgraphic{headerrule}]

\defineoverlay
  [headerrule]
  [\vrule height\headerheight width0pt%
   \vrule width\paperwidth height 0.4pt\relax]

\defineoverlay
  [headerrule]
  [{\framed[width=\paperwidth,height=
\headerheight,frame=off,bottomframe=on]{}}]

\setupbackgrounds
  [header]
  [text]
  [background=headerrule]

\starttext

\input knuth

\stoptext

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Xan
En/na luigi scarso ha escrit:
 PS: Yes, I refer to xyfig.

Sorry (double): xypic!!
Sorry

 Some time ago there was something about this.
 I think than xypic has very little chances to become part of context;
 I used it and I find it useful , but metapost is better (abd perhaps pgf too).
 
 btw
 grep -i  xypic  in latest distro give
 
 fonts/map/pdftex/context/original-base.map:% xypic
 tex/context/base/s-abr-01.tex:\logo [XYPIC]  {XYPIC} % wrong logo
 

Thank you very much for this links.
I saw the MetaPost and MetaFun and it's incredible what we can do with 
these!. I'm impressed.

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

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Xan
En/na Aditya Mahajan ha escrit:
 On Mon, 5 Mar 2007, Xan wrote:
 
 Another question: how get the equivalent of ams theorem package?
 Sorry for no ask this before and another time, thanks
 
 enumerations. This is what I ususally do
 
 \defineenumeration[theorem][style=italic,text=Theorem,location=hanging]
 
 \starttheorem
 This is an important theorem
 \stoptheorem
 
 They do almost everything on what is needed for theorems. I am working 
 on providing missing features, so if you find something is missing, 
 feel free to ask.

Thank you very much for give me this opportunity.
Enumerations work but I need more customization:

1) How can you change the style of the text (Theorem in our example)?
2) How can you change the position of the counter: 1 Theorem rather
than Theorem 1
3) Is it possible to change the counter? In LaTeX, with much effort and
help, I could write some code for displaying something like:

Theorem [number of theorem].[numberofpageitappears]. 

If you want to see the code, I could give you

4) What about the indentation of the body of the theorem?. If you put:

\starttheorem
This is an important theorem skjdskad sda sdas dsad asdas das dsafs f
dsfsdfsdf dfsdf sdf dsfsd fsdfsd fds fdsf ds fsd fds fsdfsdfs fdsfsd f
\stoptheorem

the text is indented a little bit after the begginning of the line. We
could have a normal indentation (like AMS theorem do)?

5) Is there an equivalent to \newenvironment in latex? I think about the
demostration:

\newenvironment{demo}{\medskip Demostració.}{\hfill $\Box$}



I'm sure all of that is possible to do with context


And another question (in other topic): how we can do lines at header and
footer like fancyheaders in latex?

Thanks another time,
Xan.

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


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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Oliver Buerschaper
 And another question (in other topic): how we can do lines at  
 header and
 footer like fancyheaders in latex?


For your headers try this:

---

\setupheader
[text]
[after=\hrule]

\starttext
\input tufte
\stoptext

---

You can change the actual content of your headers via  
\setupheadertexts ...

Instead of the \hrule command above you could also resort to  
\thinrule. The global behaviour of \thinrule can then be customized  
via \setupthinrules ... However, this comes at the cost of  
introducing additional vertical space between your header text and  
the rule. On the contrary \hrule sticks to the text. Choose whatever  
suits you best.

(To the experts: is this \thinrule behaviour intended?)

Best wishes,
Oliver
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some questions about context

2007-03-06 Thread Wolfgang Schuster
On Tue, 06 Mar 2007 10:26:49 +0100
Xan [EMAIL PROTECTED] wrote:

 En/na Aditya Mahajan ha escrit:
  On Mon, 5 Mar 2007, Xan wrote:
  
  Another question: how get the equivalent of ams theorem package?
  Sorry for no ask this before and another time, thanks
  
  enumerations. This is what I ususally do
  
  \defineenumeration[theorem][style=italic,text=Theorem,location=hanging]
  
  \starttheorem
  This is an important theorem
  \stoptheorem
  
  They do almost everything on what is needed for theorems. I am working 
  on providing missing features, so if you find something is missing, 
  feel free to ask.
 
 Thank you very much for give me this opportunity.
 Enumerations work but I need more customization:
 
 1) How can you change the style of the text (Theorem in our example)?
 2) How can you change the position of the counter: 1 Theorem rather
 than Theorem 1
 3) Is it possible to change the counter? In LaTeX, with much effort and
 help, I could write some code for displaying something like:
 
 Theorem [number of theorem].[numberofpageitappears]. 
 
 If you want to see the code, I could give you
 
 4) What about the indentation of the body of the theorem?. If you put:
 
 \starttheorem
 This is an important theorem skjdskad sda sdas dsad asdas das dsafs f
 dsfsdfsdf dfsdf sdf dsfsd fsdfsd fds fdsf ds fsd fds fsdfsdfs fdsfsd f
 \stoptheorem
 
 the text is indented a little bit after the begginning of the line. We
 could have a normal indentation (like AMS theorem do)?
 
 5) Is there an equivalent to \newenvironment in latex? I think about the
 demostration:
 
 \newenvironment{demo}{\medskip Demostració.}{\hfill $\Box$}
 

\definestartstop
  [demo]
  [before={\blank[medium]Demostració.},
   after=\hfill\mathematics{\Box}]

\starttext

\startdemo
text text text \unknown
\stopdemo

\stoptext

Wolfgang

 
 
 I'm sure all of that is possible to do with context
 
 
 And another question (in other topic): how we can do lines at header and
 footer like fancyheaders in latex?
 
 Thanks another time,
 Xan.
 
  
  Aditya
  ___
  ntg-context mailing list
  ntg-context@ntg.nl
  http://www.ntg.nl/mailman/listinfo/ntg-context
 
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some questions about context

2007-03-06 Thread Robin Kirkham
Hi all,

Moreover, how do you get a rule in the header that extends from the  
left of the left margin, right across to the right of the right  
margin (including the gaps in between)?

Cheers,

Robin

On 06/03/2007, at 10:00 PM, [EMAIL PROTECTED] wrote:

 From: Oliver Buerschaper [EMAIL PROTECTED]
 Date: 6 March 2007 9:19:23 PM
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Some questions about context

 And another question (in other topic): how we can do lines at  
 header and
 footer like fancyheaders in latex?

 For your headers try this:

 \setupheader
   [text]
   [after=\hrule]

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Aditya Mahajan
On Tue, 6 Mar 2007, Oliver Buerschaper wrote:

 And another question (in other topic): how we can do lines at
 header and
 footer like fancyheaders in latex?


 For your headers try this:

 ---

 \setupheader
   [text]
   [after=\hrule]

 \starttext
 \input tufte
 \stoptext

 ---

 You can change the actual content of your headers via
 \setupheadertexts ...

 Instead of the \hrule command above you could also resort to
 \thinrule. The global behaviour of \thinrule can then be customized
 via \setupthinrules ... However, this comes at the cost of
 introducing additional vertical space between your header text and
 the rule. On the contrary \hrule sticks to the text. Choose whatever
 suits you best.

 (To the experts: is this \thinrule behaviour intended?)

A better way is to use \setupbackgrounds. You can specify the exact 
region of the page that you want, and it accepts all the parameters of 
framed, so you can change the rule thickness, background, etc. And for 
a really fancy layout, you can use a metapost background.

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Aditya Mahajan
On Tue, 6 Mar 2007, Xan wrote:

 En/na Aditya Mahajan ha escrit:
 On Mon, 5 Mar 2007, Xan wrote:

 Another question: how get the equivalent of ams theorem package?
 Sorry for no ask this before and another time, thanks

 enumerations. This is what I ususally do

 \defineenumeration[theorem][style=italic,text=Theorem,location=hanging]

 \starttheorem
 This is an important theorem
 \stoptheorem

 They do almost everything on what is needed for theorems. I am working
 on providing missing features, so if you find something is missing,
 feel free to ask.

 Thank you very much for give me this opportunity.
 Enumerations work but I need more customization:

 1) How can you change the style of the text (Theorem in our example)?

\defineenumeration[theorem][headstyle=normal|bold|italic|(any font 
commnad)]

 2) How can you change the position of the counter: 1 Theorem rather
 than Theorem 1

No simple way right now. It is possible to do that using left and 
right keys. So, something like

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

If you do not want the dot after the number, say stopper=, above.

 3) Is it possible to change the counter? In LaTeX, with much effort and
 help, I could write some code for displaying something like:

 Theorem [number of theorem].[numberofpageitappears]. 

 If you want to see the code, I could give you

In ConTeXt this is much easier.

\defineenumeration[theorem][conversion=myconversion]

so, you can do something like

\def\withpagenumbercommand#1{\numbers{#1}.blah\currentpage}

\defineconversion [withpagenumber] [\withpagenumbercommand]

\defineenumeration[test][conversion=withpagenumber]

(I tested this, and this is not working. In fact conversion is not 
working with enumerations). This will be fixed soon. If you need it 
immediately, there is just a one line change as a workaround.

 4) What about the indentation of the body of the theorem?. If you put:

 \starttheorem
 This is an important theorem skjdskad sda sdas dsad asdas das dsafs f
 dsfsdfsdf dfsdf sdf dsfsd fsdfsd fds fdsf ds fsd fds fsdfsdfs fdsfsd f
 \stoptheorem

 the text is indented a little bit after the begginning of the line. We
 could have a normal indentation (like AMS theorem do)?

Did I say, that is the way I like it ;) It you do not, do not say 
location=hanging.

 5) Is there an equivalent to \newenvironment in latex? I think about the
 demostration:

 \newenvironment{demo}{\medskip Demostració.}{\hfill $\Box$}


Wolfgang answered the equivalent way to do it in ConteXt.

 And another question (in other topic): how we can do lines at header and
 footer like fancyheaders in latex?

\setupbackgrounds[header][text][topframe=on,rulethickness=1pt]

etc.

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Aditya Mahajan
On Tue, 6 Mar 2007, luigi scarso wrote:

 PS: Yes, I refer to xyfig.
 Some time ago there was something about this.
 I think than xypic has very little chances to become part of context;
 I used it and I find it useful , but metapost is better (abd perhaps pgf too).

I have never used xypic. I looked at its page at 
http://www.tug.org/applications/Xy-pic/ and it says that it works with 
plain tex. Then it should also work with ConTeXt. Has anyone tried 
using it with ConTeXt?

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread Oliver Buerschaper
 For your headers try this:

 ---

 \setupheader
  [text]
  [after=\hrule]

 \starttext
 \input tufte
 \stoptext

 ---

 You can change the actual content of your headers via
 \setupheadertexts ...

 Instead of the \hrule command above you could also resort to
 \thinrule. The global behaviour of \thinrule can then be customized
 via \setupthinrules ... However, this comes at the cost of
 introducing additional vertical space between your header text and
 the rule. On the contrary \hrule sticks to the text. Choose whatever
 suits you best.

 (To the experts: is this \thinrule behaviour intended?)

 A better way is to use \setupbackgrounds. You can specify the exact
 region of the page that you want, and it accepts all the parameters of
 framed, so you can change the rule thickness, background, etc. And for
 a really fancy layout, you can use a metapost background.

I didn't think of that ... however, suppressing the header on certain  
pages via e.g.

\setuphead[chapter][header=empty]

doesn't turn off the header background :-(

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


Re: [NTG-context] Some questions about context

2007-03-06 Thread luigi scarso
On 3/6/07, Aditya Mahajan [EMAIL PROTECTED] wrote:
 On Tue, 6 Mar 2007, luigi scarso wrote:

  PS: Yes, I refer to xyfig.
  Some time ago there was something about this.
  I think than xypic has very little chances to become part of context;
  I used it and I find it useful , but metapost is better (abd perhaps pgf 
  too).

 I have never used xypic. I looked at its page at
 http://www.tug.org/applications/Xy-pic/ and it says that it works with
 plain tex. Then it should also work with ConTeXt. Has anyone tried
 using it with ConTeXt?

search in mail list for
Re: XYpic
Vit Zyka [EMAIL PROTECTED] (2005-04-29 08:16:55 GMT)

I think the definitive word about XYpic and context .
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Some questions about context

2007-03-05 Thread Xan
Hi,

I'm new user of context. I gone from latex, which I use in the last 5 
years intensively

I read your wiki but I don't find some answers to my wishes. Basically I 
want to know what are the equivalent of latex commands/packages in 
context. Can you help me in thay?. Thanks in advance so let's go:

1) The first question is about landscape mode and xdvi. In latex, if we 
want landscape, we put:

\documentclass[a4paper,10ptt,landscape]{article}

but when we see .dvi in xdvi, xdvi does not detects automatically that 
it's in landscape mode.

For that, we have to put:

\usepackage[dvips,...]{geometry}

now the xdvi show .dvi in landscape mode


The question is, how we get the same in context?. If we put:

\setuppapersize[A4,landscape][A4,landscape]

the xdvi program does not detect that .dvi is in landscape mode. Is 
there an equivalent command of geometry that allow that?

2) In latex there is the fancyhdr package that allows to put lines at 
bottom and at top of the page and put right and left headings and 
footers like: \rhead{Hello} 

What is the equivalent in context?

3) Is there an equivalent to the package lastpage in context? So can we 
put [number of page]/[total number of pages] at the bottom of the page?

4) How can we create new counters in context? Like latex 
\newcounter{mycount}

5) In mathematics, in context there are three modules: nath, amsl, 
new math, according to http://wiki.contextgarden.net/Math

What are these features and limitations? What is the best?

6) Is there an equivalent module of xyfig?

7) Is there an equivalence of amssymbols?. How can I display for example 
$x \leadsto \int_a^b \arcsin (x+\cos \alhpa)$?

8) How can we do a minipage in context?

9) Can you tell me some link about babel and hipernation?


Thank you very much,
Xan.

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


Re: [NTG-context] Some questions about context

2007-03-05 Thread Wolfgang Schuster
On Mon, 05 Mar 2007 13:43:51 +0100
Xan [EMAIL PROTECTED] wrote:

 Hi,
 

Hi Xan,

 I'm new user of context. I gone from latex, which I use in the last 5 
 years intensively
 
 I read your wiki but I don't find some answers to my wishes. Basically I 
 want to know what are the equivalent of latex commands/packages in 
 context. Can you help me in thay?. Thanks in advance so let's go:
 
 1) The first question is about landscape mode and xdvi. In latex, if we 
 want landscape, we put:
 
 \documentclass[a4paper,10ptt,landscape]{article}
 
 but when we see .dvi in xdvi, xdvi does not detects automatically that 
 it's in landscape mode.
 
 For that, we have to put:
 
 \usepackage[dvips,...]{geometry}
 
 now the xdvi show .dvi in landscape mode
 
 
 The question is, how we get the same in context?. If we put:
 
 \setuppapersize[A4,landscape][A4,landscape]
 
 the xdvi program does not detect that .dvi is in landscape mode. Is 
 there an equivalent command of geometry that allow that?

ConTeXt use PDF as default output format. A short test with the dvips
way show a rotated content but the page is not roatated, this seems to
be not suported

 
 2) In latex there is the fancyhdr package that allows to put lines at 
 bottom and at top of the page and put right and left headings and 
 footers like: \rhead{Hello} 
 
 What is the equivalent in context?
 

The ConTeXt method for headers is:

\setupheadertexts[centered on odd and even page]
\setupheadertexts[left on odd and even page][right on odd and even page]
\setupheadertexts[left on even page][right on even page]
 [left on odd page][right on odd page]

The same methos id used for footer with \setupfootertexts instead of
\setupheadertexts.

I attached a file that provides another way to set the headers and
footers in your document. You can use it with the command 
\usemodule[wolf-txt]. A few examples can be found in the source.

 3) Is there an equivalent to the package lastpage in context? So can we 
 put [number of page]/[total number of pages] at the bottom of the page?

\setupfootertexts[\pagenumber/\lastpage]

 
 4) How can we create new counters in context? Like latex 
 \newcounter{mycount}

You can use the plain TeX command \newcount\mycount or the ConTeXt
command \newcounter\mycount to create a counter. The ConTeXt methos
provides also the two commands \increment\mycount to increase your own
counter by one and the command \decrement\mycount to reduce your own
counter by one.

 
 5) In mathematics, in context there are three modules: nath, amsl, 
 new math, according to http://wiki.contextgarden.net/Math
 
 What are these features and limitations? What is the best?

ConTeXt provides now many functions from these modules by default.
Aditya wrote a few articles about the new option for maths in his My
Ways and at the wiki.

Please take a look at the following articles

http://dl.contextgarden.net/myway/mathalign.pdf
http://dl.contextgarden.net/myway/matharrows.pdf

 
 6) Is there an equivalent module of xyfig?
 

Do you mean xypic?

Take a look at Tikz/Pgf:

http://sourceforge.net/projects/pgf/

or MetaPost/MetaFun:

http://wiki.contextgarden.net/MetaPost
http://wiki.contextgarden.net/MetaFun

bot come with their own manuals.

 7) Is there an equivalence of amssymbols?. How can I display for example 
 $x \leadsto \int_a^b \arcsin (x+\cos \alhpa)$?
 

This should work by default. AFAIK the AMS symbols are enabled by
default in ConTeXT. A short test worked without problems.

 8) How can we do a minipage in context?
 

You can use the more powerful frame environemnt.

\starttext

\framed[width=6cm,align=right]{\readfile{knuth}\donothing\donothing}

\stoptext

 9) Can you tell me some link about babel and hipernation?
 

You set the language for your document with the \mainlanguage[xx] and
the \language[xx] commands where xx stands for your language id as
en for english.

 
 Thank you very much,
 Xan.
 

Wolfgang
%D \module
%D   [   file=wolf-txt,
%Dversion=2006.10.28,
%D  title=\CONTEXT\ User Module,
%D   subtitle=Texts,
%D author=Wolfgang Schuster,
%D   date=\currentdate,
%D  copyright=Wolfgang Schuster]

\writestatus{loading}{Context User Module / Texts}

\unprotect

\startnotmode[wolf]

  \def\tx{tx}

  \def\useifdefined#1%
{\ifcsname#1\endcsname
   \csname#1\endcsname
 \fi}

\stopnotmode

%D \macros
%D  {settoptexts, setheadertexts, settexttexts,
%D   setfootertexts, setbottomtexts}
%D
%D \starttyping
%D \setheadertexts
%D   [reset]
%D
%D \setheadertexts
%D   [left=odd left,middle=odd middle,right=odd right]
%D
%D \setheadertexts
%D   [text]
%D   [left=odd left,middle=odd middle,right=odd right]
%D
%D \setheadertexts
%D   [left=odd left,middle=odd middle,right=odd right]
%D   [left=even left,middle=even middle,right=even right]
%D
%D \setheadertexts
%D   [text]
%D   [left=odd left,middle=odd middle,right=odd right]
%D   [left=even left,middle=even middle,right=even right]
%D 

Re: [NTG-context] Some questions about context

2007-03-05 Thread Aditya Mahajan
On Mon, 5 Mar 2007, Wolfgang Schuster wrote:

 On Mon, 05 Mar 2007 13:43:51 +0100
 Xan [EMAIL PROTECTED] wrote:

 Hi Xan,

 I'm new user of context. I gone from latex, which I use in the last 5
 years intensively

Welcome to ConTeXt :)

 I read your wiki but I don't find some answers to my wishes. Basically I
 want to know what are the equivalent of latex commands/packages in
 context. Can you help me in thay?. Thanks in advance so let's go:

 1) The first question is about landscape mode and xdvi. In latex, if we
 want landscape, we put:

 \documentclass[a4paper,10ptt,landscape]{article}

 but when we see .dvi in xdvi, xdvi does not detects automatically that
 it's in landscape mode.

 For that, we have to put:

 \usepackage[dvips,...]{geometry}

 now the xdvi show .dvi in landscape mode


 The question is, how we get the same in context?. If we put:

 \setuppapersize[A4,landscape][A4,landscape]

 the xdvi program does not detect that .dvi is in landscape mode. Is
 there an equivalent command of geometry that allow that?

 ConTeXt use PDF as default output format. A short test with the dvips
 way show a rotated content but the page is not roatated, this seems to
 be not suported

I do not use dvi route, but the page should be rotated in the ps file. 
AFAIU, dvi has no option for specifying the page size or page 
orientation. The viewers that honor ps code for page orientation and 
size rely on the manner that latex puts in those commands in the dvi 
file. I do not know if ConTeXt follows that route or not.


 2) In latex there is the fancyhdr package that allows to put lines at
 bottom and at top of the page and put right and left headings and
 footers like: \rhead{Hello} 

 What is the equivalent in context?


 The ConTeXt method for headers is:

 \setupheadertexts[centered on odd and even page]
 \setupheadertexts[left on odd and even page][right on odd and even page]
 \setupheadertexts[left on even page][right on even page]
 [left on odd page][right on odd page]

 The same methos id used for footer with \setupfootertexts instead of
 \setupheadertexts.

 I attached a file that provides another way to set the headers and
 footers in your document. You can use it with the command
 \usemodule[wolf-txt]. A few examples can be found in the source.

 3) Is there an equivalent to the package lastpage in context? So can we
 put [number of page]/[total number of pages] at the bottom of the page?

 \setupfootertexts[\pagenumber/\lastpage]

A lot of Latex packages are built into ConTeXt. See 
http://wiki.contextgarden.net/Latex_Packages


 4) How can we create new counters in context? Like latex
 \newcounter{mycount}

 You can use the plain TeX command \newcount\mycount or the ConTeXt
 command \newcounter\mycount to create a counter. The ConTeXt methos
 provides also the two commands \increment\mycount to increase your own
 counter by one and the command \decrement\mycount to reduce your own
 counter by one.

There are also numbers, which I find easier to use. See 
http://wiki.contextgarden.net/Counters


 5) In mathematics, in context there are three modules: nath, amsl,
 new math, according to http://wiki.contextgarden.net/Math

 What are these features and limitations? What is the best?

I would suggest always use \usemodule[newmat] in your documents. For 
inline math, ConTeXt can do everything that LaTeX (and amsmath) do. 
For multi-line display, I would consider nath and amsl obsolete. 
Almost all of the functionality is available in the core. I wrote an 
article in Maps last year showing how to do the common multiline 
displays using ConTeXt. I do not think that article is available 
online to non-members of ntg right now.


 ConTeXt provides now many functions from these modules by default.
 Aditya wrote a few articles about the new option for maths in his My
 Ways and at the wiki.

 Please take a look at the following articles

 http://dl.contextgarden.net/myway/mathalign.pdf
 http://dl.contextgarden.net/myway/matharrows.pdf

The matharrows My Way is a slightly out of date. For matharrows, 
documentation is also provided in math-ext.tex.

And a to be written My Way on subformula numbering.

 6) Is there an equivalent module of xyfig?


 Do you mean xypic?

 Take a look at Tikz/Pgf:

 http://sourceforge.net/projects/pgf/

 or MetaPost/MetaFun:

 http://wiki.contextgarden.net/MetaPost
 http://wiki.contextgarden.net/MetaFun

 bot come with their own manuals.

 7) Is there an equivalence of amssymbols?. How can I display for example
 $x \leadsto \int_a^b \arcsin (x+\cos \alhpa)$?


 This should work by default. AFAIK the AMS symbols are enabled by
 default in ConTeXT. A short test worked without problems.

You do need to correct the spelling ;) \alpha. Also see
http://wiki.contextgarden.net/Math/basic

I am working on explaining the whole math thing at 
http://wiki.contextgarden.net/Math_new but progress has been slow.


 8) How can we do a minipage in context?


 You can use the more 

Re: [NTG-context] Some questions about context

2007-03-05 Thread Mojca Miklavec
On 3/5/07, Aditya Mahajan wrote:
 On Mon, 5 Mar 2007, Wolfgang Schuster wrote:
   On Mon, 05 Mar 2007 13:43:51 +0100
  Xan [EMAIL PROTECTED] wrote:
 
  1) The first question is about landscape mode and xdvi. In latex, if we
  want landscape, we put:
 
  \documentclass[a4paper,10ptt,landscape]{article}
 
  but when we see .dvi in xdvi, xdvi does not detects automatically that
  it's in landscape mode.
 
  For that, we have to put:
 
  \usepackage[dvips,...]{geometry}
 
  now the xdvi show .dvi in landscape mode
 
 
  The question is, how we get the same in context?. If we put:
 
  \setuppapersize[A4,landscape][A4,landscape]
 
  the xdvi program does not detect that .dvi is in landscape mode. Is
  there an equivalent command of geometry that allow that?
 
  ConTeXt use PDF as default output format. A short test with the dvips
  way show a rotated content but the page is not roatated, this seems to
  be not suported

 I do not use dvi route, but the page should be rotated in the ps file.
 AFAIU, dvi has no option for specifying the page size or page
 orientation. The viewers that honor ps code for page orientation and
 size rely on the manner that latex puts in those commands in the dvi
 file. I do not know if ConTeXt follows that route or not.

Also note that dvi mode is not really supported any more. How old is
your ConTeXt/TeX distribution? (texexec --version or ctxtools
--contextversion)
New versions should give you pdf output by default.

Yes, dvi is indeed faster, but ...

  9) Can you tell me some link about babel and hipernation?
 
 
  You set the language for your document with the \mainlanguage[xx] and
  the \language[xx] commands where xx stands for your language id as
  en for english.

 Also \enableregime[utf] for utf input encoding (same as
 \usepackage[utf-8]{inputenc}).

or \enableregime[utf-8] ;)

Which language do you want to use?

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


Re: [NTG-context] Some questions about context

2007-03-05 Thread Aditya Mahajan
On Mon, 5 Mar 2007, Mojca Miklavec wrote:

 On 3/5/07, Aditya Mahajan wrote:
 On Mon, 5 Mar 2007, Wolfgang Schuster wrote:
 On Mon, 05 Mar 2007 13:43:51 +0100
 Xan [EMAIL PROTECTED] wrote:

 1) The first question is about landscape mode and xdvi. In latex, if we
 want landscape, we put:

 \documentclass[a4paper,10ptt,landscape]{article}

 but when we see .dvi in xdvi, xdvi does not detects automatically that
 it's in landscape mode.

 For that, we have to put:

 \usepackage[dvips,...]{geometry}

 now the xdvi show .dvi in landscape mode


 The question is, how we get the same in context?. If we put:

 \setuppapersize[A4,landscape][A4,landscape]

 the xdvi program does not detect that .dvi is in landscape mode. Is
 there an equivalent command of geometry that allow that?

 ConTeXt use PDF as default output format. A short test with the dvips
 way show a rotated content but the page is not roatated, this seems to
 be not suported

 I do not use dvi route, but the page should be rotated in the ps file.
 AFAIU, dvi has no option for specifying the page size or page
 orientation. The viewers that honor ps code for page orientation and
 size rely on the manner that latex puts in those commands in the dvi
 file. I do not know if ConTeXt follows that route or not.

 Also note that dvi mode is not really supported any more. How old is
 your ConTeXt/TeX distribution? (texexec --version or ctxtools
 --contextversion)
 New versions should give you pdf output by default.


What do you mean by not supported any more. ConTeXt defaults to pdf, but 
texexec --dvi --nobackends will give you a dvi file.

 Yes, dvi is indeed faster, but ...

and allows source specials for forward and backward search. Occasionally, 
that is really handy.

Aditya

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


Re: [NTG-context] Some questions about context

2007-03-05 Thread Xan
Well, thank you very much to all of you: Wolfgang, Aditya and Mojca.

First of all thank you for answering to what I want (in latex groups 
people use to answer this can't be done or do you really want that?)

And secondly, wow!! you provided very amount of information: examples 
and code. Good!!! More than ever I imagine

I will study all of that

Thanks,
Xan.

PS: Yes, I refer to xyfig. And my version is
texexec --version

  TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005

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: 2006.6.1  mes: english

 total run time : 1 seconds

in ubuntu system




En/na Wolfgang Schuster ha escrit:
 On Mon, 05 Mar 2007 13:43:51 +0100
 Xan [EMAIL PROTECTED] wrote:
 
 Hi,

 
 Hi Xan,
 
 I'm new user of context. I gone from latex, which I use in the last 5 
 years intensively

 I read your wiki but I don't find some answers to my wishes. Basically I 
 want to know what are the equivalent of latex commands/packages in 
 context. Can you help me in thay?. Thanks in advance so let's go:

 1) The first question is about landscape mode and xdvi. In latex, if we 
 want landscape, we put:

 \documentclass[a4paper,10ptt,landscape]{article}

 but when we see .dvi in xdvi, xdvi does not detects automatically that 
 it's in landscape mode.

 For that, we have to put:

 \usepackage[dvips,...]{geometry}

 now the xdvi show .dvi in landscape mode


 The question is, how we get the same in context?. If we put:

 \setuppapersize[A4,landscape][A4,landscape]

 the xdvi program does not detect that .dvi is in landscape mode. Is 
 there an equivalent command of geometry that allow that?
 
 ConTeXt use PDF as default output format. A short test with the dvips
 way show a rotated content but the page is not roatated, this seems to
 be not suported
 
 2) In latex there is the fancyhdr package that allows to put lines at 
 bottom and at top of the page and put right and left headings and 
 footers like: \rhead{Hello} 

 What is the equivalent in context?

 
 The ConTeXt method for headers is:
 
 \setupheadertexts[centered on odd and even page]
 \setupheadertexts[left on odd and even page][right on odd and even page]
 \setupheadertexts[left on even page][right on even page]
  [left on odd page][right on odd page]
 
 The same methos id used for footer with \setupfootertexts instead of
 \setupheadertexts.
 
 I attached a file that provides another way to set the headers and
 footers in your document. You can use it with the command 
 \usemodule[wolf-txt]. A few examples can be found in the source.
 
 3) Is there an equivalent to the package lastpage in context? So can we 
 put [number of page]/[total number of pages] at the bottom of the page?
 
 \setupfootertexts[\pagenumber/\lastpage]
 
 4) How can we create new counters in context? Like latex 
 \newcounter{mycount}
 
 You can use the plain TeX command \newcount\mycount or the ConTeXt
 command \newcounter\mycount to create a counter. The ConTeXt methos
 provides also the two commands \increment\mycount to increase your own
 counter by one and the command \decrement\mycount to reduce your own
 counter by one.
 
 5) In mathematics, in context there are three modules: nath, amsl, 
 new math, according to http://wiki.contextgarden.net/Math

 What are these features and limitations? What is the best?
 
 ConTeXt provides now many functions from these modules by default.
 Aditya wrote a few articles about the new option for maths in his My
 Ways and at the wiki.
 
 Please take a look at the following articles
 
 http://dl.contextgarden.net/myway/mathalign.pdf
 http://dl.contextgarden.net/myway/matharrows.pdf
 
 6) Is there an equivalent module of xyfig?

 
 Do you mean xypic?
 
 Take a look at Tikz/Pgf:
 
 http://sourceforge.net/projects/pgf/
 
 or MetaPost/MetaFun:
 
 http://wiki.contextgarden.net/MetaPost
 http://wiki.contextgarden.net/MetaFun
 
 bot come with their own manuals.
 
 7) Is there an equivalence of amssymbols?. How can I display for example 
 $x \leadsto \int_a^b \arcsin (x+\cos \alhpa)$?

 
 This should work by default. AFAIK the AMS symbols are enabled by
 default in ConTeXT. A short test worked without problems.
 
 8) How can we do a minipage in context?

 
 You can use the more powerful frame environemnt.
 
 \starttext
 
 \framed[width=6cm,align=right]{\readfile{knuth}\donothing\donothing}
 
 \stoptext
 
 9) Can you tell me some link about babel and hipernation?

 
 You set the language for your document with the \mainlanguage[xx] and
 the \language[xx] commands where xx stands for your language id as
 en for english.
 
 Thank you very much,
 Xan.

 
 Wolfgang
 
 
 
 
 %D \module
 %D   [  

Re: [NTG-context] Some questions about context

2007-03-05 Thread Xan
Another question: how get the equivalent of ams theorem package?
Sorry for no ask this before and another time, thanks

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


Re: [NTG-context] Some questions about context

2007-03-05 Thread luigi scarso
 PS: Yes, I refer to xyfig.
Some time ago there was something about this.
I think than xypic has very little chances to become part of context;
I used it and I find it useful , but metapost is better (abd perhaps pgf too).

btw
grep -i  xypic  in latest distro give

fonts/map/pdftex/context/original-base.map:% xypic
tex/context/base/s-abr-01.tex:\logo [XYPIC]  {XYPIC} % wrong logo


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


[NTG-context] Some questions about luatex

2006-11-07 Thread luigi scarso
hi some questions about luatex
(www.luatex.org)
1) will be possible some code like
\luatry{%
...tex code}
\luaexcept{
..tex code}
2) will be possible to embedding some other language ie Python (of
course, reading the C source) ?

Thanks in advance
luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some questions about luatex

2006-11-07 Thread Hans Hagen
luigi scarso wrote:
 hi some questions about luatex
 (www.luatex.org)
 1) will be possible some code like
 \luatry{%
 tex code}
 \luaexcept{
 ...tex code}
 2) will be possible to embedding some other language ie Python (of
 course, reading the C source) ?
   
i'm not sure what you mean here 

\somelua{ lua code that may or may not give back tex input } 

if you mean that we can use lua for pretty printing, then the answer is yes, in 
my mkiv code there is already a lua based pretty printing framework 

Hans 

Hans 

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

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


[NTG-context] Some questions about lua context

2006-11-07 Thread Aleksandar Lazic
Hi,

today I have looked into luatex and read the FAQ
http://www.luatex.org/faq.html

Just for my curiosity, have you looked into neko?!

http://www.nekovm.org/

I don't know when you have decide to go to lua and if then neko was out.

Thanks to satisfied my curiosity ;- )

Regards

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


Re: [NTG-context] Some questions about lua context

2006-11-07 Thread Hans Hagen
Aleksandar Lazic wrote:
 Hi,

 today I have looked into luatex and read the FAQ
 http://www.luatex.org/faq.html

 Just for my curiosity, have you looked into neko?!

 http://www.nekovm.org/

 I don't know when you have decide to go to lua and if then neko was out.

 Thanks to satisfied my curiosity ;- )
   
the choice for lua was made purely on my experience with perl, ruby and ... lua 
(embedded into skype) 

one big advantage of lua is that it has a long history, has reached a point of 
stability, is developped in an academic atmosphere, is rather clean, very 
lightweight, etc 

anyhow, the decision has been made (after the decision already several 
alternatives have been proposed -) 

Hans 

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

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


Re: [NTG-context] Some questions about luatex

2006-11-07 Thread Taco Hoekwater
luigi scarso wrote:
 hi some questions about luatex
 (www.luatex.org)
 1) will be possible some code like
 \luatry{%
 ...tex code}
 \luaexcept{
 ..tex code}

Guess at what you want: maybe, but not right away. The \luatry
would have to save quite a bit of state information for this
to be useful, which is not feasible on short notice (imagine
having to save some 400+ globals and hooking into a few dozen
data structure operations)

 2) will be possible to embedding some other language ie Python (of
 course, reading the C source) ?

If you want to change the sources yourself, then yes. Otherwise
no. If luatex were to allow this without recompile, nobody could
rely on a stable platform for interchange of documents.

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


Re: [NTG-context] Some questions about lua context

2006-11-07 Thread Martin Schröder
2006/11/7, Aleksandar Lazic [EMAIL PROTECTED]:
 Just for my curiosity, have you looked into neko?!

lua - neko was already discussed on the lua list. :-)

The thread starts at http://lua-users.org/lists/lua-l/2006-09/msg00598.html

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


Re: [NTG-context] Some questions about lua context

2006-11-07 Thread Aleksandar Lazic
On Die 07.11.2006 10:47, Hans Hagen wrote:
Aleksandar Lazic wrote:
[snipp]
 I don't know when you have decide to go to lua and if then neko was
 out.

 Thanks to satisfied my curiosity ;- )

[snipp]

anyhow, the decision has been made (after the decision already several
alternatives have been proposed -) 

Thanks for answer ;-)

Regards

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


Re: [NTG-context] Some questions about lua context

2006-11-07 Thread Aleksandar Lazic
On Die 07.11.2006 12:21, Martin Schröder wrote:
2006/11/7, Aleksandar Lazic [EMAIL PROTECTED]:
 Just for my curiosity, have you looked into neko?!

lua - neko was already discussed on the lua list. :-)

I think I have read it in the past ;-)

Regards

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


Re: [NTG-context] some questions

2006-08-15 Thread wwl
  Should'nt \arg{bla} be \type{{bla}}?
 
 I can't give you a satisfying answer for this, but
 
 Should'nt \expandafter\type\expandafter{\arg{bla}} be
 \type{{bla}}?
 
 gives
 
 Should?nt \dohandlemathtokenarg{bla} be {bla}?
 
 (so I guess the answer is probably no)

\arg is one of the verbatim macros, like \type, \typ, \tex
and is describte in 'cont-enp.pdf' on page 101.

The description looks a bit incomplete: (the command encloses the 
text with .)
(Can someone, with the right to do that, add this to the list of 
typos, please?)

The definition of \arg is in 'core-ver.tex' and copying this 
in a separate file works as expected:

\starttext
\unprotect
\def\setgroupedtype
  {\let\currenttypingclass\??ty
   \initializetype
   \catcode`\{=\@@begingroup
   \catcode`\}=\@@endgroup}

\unexpanded\def\arg{%
\groupedcommand{\setgroupedtype\leftargument}{\rightargument}}
\protect
\arg{bla}
\stoptext

So there must something be damaged.

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


Re: [NTG-context] some questions

2006-08-15 Thread Taco Hoekwater

Hi,

[EMAIL PROTECTED] wrote:
Should'nt \arg{bla} be \type{{bla}}?

I can't give you a satisfying answer for this, but

Should'nt \expandafter\type\expandafter{\arg{bla}} be
\type{{bla}}?

gives

Should?nt \dohandlemathtokenarg{bla} be {bla}?

(so I guess the answer is probably no)
 
 
 \arg is one of the verbatim macros, like \type, \typ, \tex
 and is describte in 'cont-enp.pdf' on page 101.

Well, \arg is also defined in math-tex.tex:

   \definemathcommand [arg] [nolop] {\mfunction{arg}}

So there is a double definition.

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


Re: [NTG-context] some questions

2006-08-13 Thread wwl
  \setupcolors[state=start]
  \starttext
  How can I use the brace-key right?
  \starttable[| \{ |]
 
 the wiki entry is not that clear (enclose the column in braces).
 \{ is a just a grouping command (which directly gives a solution
 for
 your second answer)
 
 Use
   [| a{\{}b{\}} |]
 
 to add braces
 
  \NC no braces \SR
  \stoptable
  
  What I am doing wrong here?
  \starttable[ o1 | C{red} |]
 
 \{C{red}

Ahh! I see!
So '\{' is a table command NOT a FormatKey? 

But why is '\{' introduced in 'thrd-tab.tex' with 
\NewFormatKey \{{..} as a primitive key?

The wikiwriter has obviously used this source too.


  Should'nt \arg{bla} be \type{{bla}}?

\arg{bla} gives me 'argbla'!

Wolfgang



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


[NTG-context] some questions

2006-08-12 Thread wwl
Hallo!

After reading some manuals, I have some questions.
May be I have not understand it right.

Try the following example:
---
\setupcolors[state=start]
\starttext
How can I use the brace-key right?
\starttable[| \{ |]
\NC no braces \SR
\stoptable

What I am doing wrong here?
\starttable[ o1 | C{red} |]
\VL red \VL\SR
\stoptable
red too!

Should'nt \arg{bla} be \type{{bla}}?
\stoptext


Wolfgang

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


  1   2   >