Re: [NTG-context] Fractions and binomial inlined in text ($n \choose \frac{n}2$): Parentheses not scaled

2011-12-04 Thread Wolfgang Schuster

Am 03.12.2011 um 19:56 schrieb Paul Menzel:

 Dear ConTeXt folks,
 
 
 using the following minimal example
 
\starttext
Using \type{\choose} in text $n \choose \frac{n}2$.
 
\startformula
n \choose \frac{n}2
\stopformula
 
\CONTEXT\ \contextmark\ \contextversion\ with \texenginename\
\texengineversion
\stoptext
 
 the parentheses of the binomial in the text or too short. I guess this
 is because the parentheses are not scaled when inlined and that this is
 also a TeX limitation and therefore expected?


Instead if \choose you can use \binom which is the recommended way in context.

The \dbinom command sets the content in display style while \tbinom use 
textstyle.

\starttext

Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$.

Using \tex{dbinom} in text $\dbinom{n}{\frac{n}{2}}$.

Using \tex{tbinom} in text $\tbinom{n}{\frac{n}{2}}$.

\startformula
\binom{n}{\frac{n}{2}}
\stopformula

\stoptext

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

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


Re: [NTG-context] Saving module data in tuc file

2011-12-04 Thread Wolfgang Schuster

Am 04.12.2011 um 01:20 schrieb Aditya Mahajan:

 Hi,
 
 How does one save and read third-party data in tuc file at the lua end?
 
 I am trying to write a module t-ifchanged that defines a \doiffilechanged 
 macro that provides the functionality of mtxrun --ifchanged without calling 
 an external program (This is meant to be a support module for t-vim, where 
 the external calls to mtxrun are too time consuming).
 
 I can successfully write additional data to the tuc file, but cannot figure 
 out how to initialize the data from tuc file. (See attached file). Any hints 
 are welcome.

\definetwopasslist{test}

\newcount\testcount

\starttext

\immediatesavetwopassdata{test}{}{First Entry}

One: \gettwopassdata{test}\twopassdata

\startluacode
commands.savetwopassdata(test,Second Entry)
\stopluacode

Two: \ctxlua{commands.gettwopassdata(test)}

\stoptext

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

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


Re: [NTG-context] Saving module data in tuc file

2011-12-04 Thread Hans Hagen

On 4-12-2011 01:20, Aditya Mahajan wrote:

Hi,

How does one save and read third-party data in tuc file at the lua end?

I am trying to write a module t-ifchanged that defines a
\doiffilechanged macro that provides the functionality of mtxrun
--ifchanged without calling an external program (This is meant to be a
support module for t-vim, where the external calls to mtxrun are too
time consuming).


This is why we have a mechanism built in (used for graphics).


I can successfully write additional data to the tuc file, but cannot
figure out how to initialize the data from tuc file. (See attached
file). Any hints are welcome.


There is:

jobfiles.run(yourfile.xxx,vim --something yourfile.xxx)

I'll adapt this to accept a function as second argument.

Hans

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

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


Re: [NTG-context] Title page for diploma thesis

2011-12-04 Thread Hans Hagen

On 3-12-2011 16:40, Paul Menzel wrote:

Dear ConTeXt folks,


I am trying to format the title page for a diploma thesis. Looking at
the Wiki most of the title or cover pages just have the title centered
and maybe a subtitle right below [1].

 \starttext
 \definemakeup[titlepage][align=middle]

 \starttitlepagemakeup
 {\definedfont[Serif at 20pt]University}
 \blank[big]
 {\definedfont[Serif at 20pt]\sc Institute}
 \vfill
 {\definedfont[Serif at 20pt]Diploma thesis}
 \blank[big]
 {\definedfont[Serif at 30pt] \setstrut \strut Interesting topic}
 \vfill
 by John Doe
 \stoptitlepagemakeup
 \stoptext

1. Is using `\blank` the recommended way to format the page? Or is using
boxes and placing them manually “better”?


Normally I go for this quick and dirty first but eventually end up with 
a page made with the layer mechanism (there is info on layers on the 
wiki or grep the s-* files for examples.).



2. Looking at the output it is not centered exactly and a little bit to
the left. Why is this the default? Does anyone know? Looking at the
manual [2] in chapter page design (p. 29, screen version) this seems to
be the backspace value. Is there an easy way to center it according to
the whole paper width? Additionally I would have guessed it to be more
on the right when glueing or trussing up(?) (German binden) the pages.


because the default layout is not centered and standardmakeup uses the 
standard layout


Hans


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

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


Re: [NTG-context] Title page for diploma thesis

2011-12-04 Thread Wolfgang Schuster

Am 03.12.2011 um 16:40 schrieb Paul Menzel:

 Dear ConTeXt folks,
 
 
 I am trying to format the title page for a diploma thesis. Looking at
 the Wiki most of the title or cover pages just have the title centered
 and maybe a subtitle right below [1].
 
\starttext
\definemakeup[titlepage][align=middle]
 
\starttitlepagemakeup
{\definedfont[Serif at 20pt]University}
\blank[big]
{\definedfont[Serif at 20pt]\sc Institute}

{\definedfont[SerifCaps at 20pt]…}

\vfill
{\definedfont[Serif at 20pt]Diploma thesis}
\blank[big]
{\definedfont[Serif at 30pt] \setstrut \strut Interesting topic}
\vfill
by John Doe
\stoptitlepagemakeup
\stoptext
 
 1. Is using `\blank` the recommended way to format the page? Or is using
 boxes and placing them manually “better”?
 
 2. Looking at the output it is not centered exactly and a little bit to
 the left. Why is this the default? Does anyone know? Looking at the
 manual [2] in chapter page design (p. 29, screen version) this seems to
 be the backspace value. Is there an easy way to center it according to
 the whole paper width? Additionally I would have guessed it to be more
 on the right when glueing or trussing up(?) (German binden) the pages.

You can switch to a centered layout for the titlepage with

  \setuplayout[titlepage][width=middle]

As Hans told the default layout is not centered because when you’re using
a docublesided document the sum of the inner margin on the left and right
page should be equal to the width of the outer margin. To compensate for
the loss at the inner margin you can increase the backspace with

  \setuplayout[backspace=dimension % default: 2.5cm for A4 paper

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] Title page for diploma thesis

2011-12-04 Thread Willi Egger

On 3 Dec 2011, at 16:40, Paul Menzel wrote:

 Dear ConTeXt folks,
 
 
 I am trying to format the title page for a diploma thesis. Looking at
 the Wiki most of the title or cover pages just have the title centered
 and maybe a subtitle right below [1].
 
\starttext
\definemakeup[titlepage][align=middle]
 
\starttitlepagemakeup
{\definedfont[Serif at 20pt]University}
\blank[big]
{\definedfont[Serif at 20pt]\sc Institute}
\vfill
{\definedfont[Serif at 20pt]Diploma thesis}
\blank[big]
{\definedfont[Serif at 30pt] \setstrut \strut Interesting topic}
\vfill
by John Doe
\stoptitlepagemakeup
\stoptext
 
 1. Is using `\blank` the recommended way to format the page? Or is using
 boxes and placing them manually “better”?

There are different ways to do this. If your solution give the result you 
desire... Not knowing wether this is better I use sometimes \godown[dimension]


 
 2. Looking at the output it is not centered exactly and a little bit to
 the left. Why is this the default? Does anyone know? Looking at the
 manual [2] in chapter page design (p. 29, screen version) this seems to
 be the backspace value. Is there an easy way to center it according to
 the whole paper width? Additionally I would have guessed it to be more
 on the right when glueing or trussing up(?) (German binden) the pages.

Default is, that the page is centered on the paper, if the page and paper size 
are the same. However if you want a binding correction 
you need to do calculations yourself in order to be able to set the parameters 
correct ly.  

Check  for the setuplayout command. 

\setuplayout
   [ backspace= left white+binding correction,
 width= text width which leaves enough whitespace at the right including 
some cut space,
 topspace= top white including cut space,
 height= text height including header and footer space, leaving enough 
bottom white and cut space,
 leftmargin= backspace - binding correction -  left margin distance,
 leftmargindistance= ...,
 rightmargin= ...,
 rightmargindistance= ...,
 marking=on,
 ...

Keep in mind that a book normally is cut after binding the bookblock at the 
front, top and bottom that is what I indicate with cut  space.
Backspace and topspace define the upper left corner of the typesetting area. 
Margin parameters do not influence the positioning of the typesetting area!


Willi

 
 Thanks and I am sorry for the sleight off-topic second question,
 
 Paul
 
 
 [1] http://wiki.contextgarden.net/Simple_Cover_Page
 [2] http://www.pragma-ade.com/general/manuals/cont-eni.pdf
 test.pdftest.tex___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 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] Title page for diploma thesis

2011-12-04 Thread Willi Egger
Sorry for the wrong statement about the centered page on the paper. - Humble I 
use often width=middle and height=middle ;-) and end up with setting up the 
parameters indvidually.

Willi
On 4 Dec 2011, at 12:24, Willi Egger wrote:

 
 On 3 Dec 2011, at 16:40, Paul Menzel wrote:
 
 Dear ConTeXt folks,
 
 
 I am trying to format the title page for a diploma thesis. Looking at
 the Wiki most of the title or cover pages just have the title centered
 and maybe a subtitle right below [1].
 
   \starttext
   \definemakeup[titlepage][align=middle]
 
   \starttitlepagemakeup
   {\definedfont[Serif at 20pt]University}
   \blank[big]
   {\definedfont[Serif at 20pt]\sc Institute}
   \vfill
   {\definedfont[Serif at 20pt]Diploma thesis}
   \blank[big]
   {\definedfont[Serif at 30pt] \setstrut \strut Interesting topic}
   \vfill
   by John Doe
   \stoptitlepagemakeup
   \stoptext
 
 1. Is using `\blank` the recommended way to format the page? Or is using
 boxes and placing them manually “better”?
 
 There are different ways to do this. If your solution give the result you 
 desire... Not knowing wether this is better I use sometimes \godown[dimension]
 
 
 
 2. Looking at the output it is not centered exactly and a little bit to
 the left. Why is this the default? Does anyone know? Looking at the
 manual [2] in chapter page design (p. 29, screen version) this seems to
 be the backspace value. Is there an easy way to center it according to
 the whole paper width? Additionally I would have guessed it to be more
 on the right when glueing or trussing up(?) (German binden) the pages.
 
 Default is, that the page is centered on the paper, if the page and paper 
 size are the same. However if you want a binding correction 
 you need to do calculations yourself in order to be able to set the 
 parameters correct ly.  
 
 Check  for the setuplayout command. 
 
 \setuplayout
   [ backspace= left white+binding correction,
 width= text width which leaves enough whitespace at the right including 
 some cut space,
 topspace= top white including cut space,
 height= text height including header and footer space, leaving enough 
 bottom white and cut space,
 leftmargin= backspace - binding correction -  left margin distance,
 leftmargindistance= ...,
 rightmargin= ...,
 rightmargindistance= ...,
 marking=on,
 ...
 
 Keep in mind that a book normally is cut after binding the bookblock at the 
 front, top and bottom that is what I indicate with cut  space.
 Backspace and topspace define the upper left corner of the typesetting area. 
 Margin parameters do not influence the positioning of the typesetting area!
 
 
 Willi
 
 
 Thanks and I am sorry for the sleight off-topic second question,
 
 Paul
 
 
 [1] http://wiki.contextgarden.net/Simple_Cover_Page
 [2] http://www.pragma-ade.com/general/manuals/cont-eni.pdf
 test.pdftest.tex___
 If your question is of interest to others as well, please add an entry to 
 the Wiki!
 
 maillist : ntg-context@ntg.nl / 
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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


[NTG-context] issue with logo and aalt

2011-12-04 Thread Pablo Rodríguez
Hi there,

the following minimal sample shows one problem I have when using all
small caps (all lowercase and small caps) in titles.

\setuppapersize[A4,landscape]
\setuppagenumbering[location=]
\usemodule[simplefonts][size=200pt]
\setmainfont[TeX Gyre Pagella]
\definefontfeature[allcaps][default][aalt=yes]
\starttext
\TeX \addfs{allcaps} \TeX
\stoptext

The logo in small caps has the letter E than in the all caps.

My question is how should I redefine the TeX logo so that the all small
caps version, i.e. that both logos have the letter E at the same height?
(Otherwise, the all small caps logo seems weird.)

Thanks for your help,


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

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


Re: [NTG-context] issue with logo and aalt

2011-12-04 Thread Khaled Hosny
On Sun, Dec 04, 2011 at 05:46:03PM +0100, Pablo Rodríguez wrote:
   \definefontfeature[allcaps][default][aalt=yes]

A bit off topic, but aalt stands for access all alternates and just
lists all alternates of a given glyph with no semantics at all, and is
there for GUI apps that present a glyph pallet to allow users select
alternate shapes of any glyph (which can be anything), which is pretty
useless for TeX usage.

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

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] issue with logo and aalt

2011-12-04 Thread Pablo Rodríguez
On 12/04/2011 07:19 PM, Khaled Hosny wrote:
 On Sun, Dec 04, 2011 at 05:46:03PM +0100, Pablo Rodríguez wrote:
  \definefontfeature[allcaps][default][aalt=yes]
 
 A bit off topic, but aalt stands for access all alternates 

Thanks, I knew it, Khaled.

aalt is not the best way to do it, but I didn't know how to get old
style numbers, small caps and all lowercase texts. I cannot achieve it with:

\definefontfeature[allcaps][default][onum=yes,smcp=yes]

And redefining the setuphead command for chapter:

\setuphead[chapter][style=\tfb\addfs{allcaps},command=\lowercase]

doesn't do the work (and it breaks the centering in a more elaborate
command).

How could I do it?

Many thanks for your help,


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

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

Re: [NTG-context] issue with logo and aalt

2011-12-04 Thread Wolfgang Schuster

Am 04.12.2011 um 20:07 schrieb Pablo Rodríguez:

 On 12/04/2011 07:19 PM, Khaled Hosny wrote:
 On Sun, Dec 04, 2011 at 05:46:03PM +0100, Pablo Rodríguez wrote:
 \definefontfeature[allcaps][default][aalt=yes]
 
 A bit off topic, but aalt stands for access all alternates 
 
 Thanks, I knew it, Khaled.
 
 aalt is not the best way to do it, but I didn't know how to get old
 style numbers, small caps and all lowercase texts. I cannot achieve it with:
 
\definefontfeature[allcaps][default][onum=yes,smcp=yes]
 
 And redefining the setuphead command for chapter:
 
\setuphead[chapter][style=\tfb\addfs{allcaps},command=\lowercase]
 
 doesn't do the work (and it breaks the centering in a more elaborate
 command).
 
 How could I do it?

\setuphead[chapter][style=\WORD\tfb]

\starttext
\chapter{This was done with \CONTEXT!}
\stoptext

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

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


Re: [NTG-context] Saving module data in tuc file

2011-12-04 Thread Aditya Mahajan

On Sun, 4 Dec 2011, Hans Hagen wrote:


On 4-12-2011 01:20, Aditya Mahajan wrote:

Hi,

How does one save and read third-party data in tuc file at the lua end?

I am trying to write a module t-ifchanged that defines a
\doiffilechanged macro that provides the functionality of mtxrun
--ifchanged without calling an external program (This is meant to be a
support module for t-vim, where the external calls to mtxrun are too
time consuming).


This is why we have a mechanism built in (used for graphics).


Ah, I didn't know that.


I can successfully write additional data to the tuc file, but cannot
figure out how to initialize the data from tuc file. (See attached
file). Any hints are welcome.


There is:

jobfiles.run(yourfile.xxx,vim --something yourfile.xxx)


This works in a standalone file, but not the way I am calling the 
function.



\def\executeCommand
{\doifmode{*first}
{\ctxlua{job.files.run(\!!bs\externalfiter::input_file\!!es,
   \!!bs\externalfiltercommand\!!es)}}}


The solution is to remove the test for the first mode. Needs a bit of 
refactoring to ensure that the solution still works for MkII. (Does anyone 
use the filter module with MkII?)


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] issue with logo and aalt

2011-12-04 Thread Pablo Rodríguez
On 12/04/2011 08:17 PM, Wolfgang Schuster wrote:
 [...]
 
 \setuphead[chapter][style=\WORD\tfb]
 
 \starttext
 \chapter{This was done with \CONTEXT!}
 \stoptext

Thanks, Wolfgang, it fixed my ignorance.

I'm afraid I still have the problem reported before.

I have no idea on how the \TeX logo is defined, but the capital E in the
\TeX logo seems to be lowered by the x-height of the font.

This method is as successful as other fonts than Computer Modern have
the same ascender as Computer Modern itself. And it doesn't work with
all small cap letters, because these are defined by having no ascender,
that is, x-height and cap height is the same.

My question is how can I redefine the \TeX logo using the E actual cap
height, so that it is lowered in the same proportion using the standard
form and the all small caps form.

Thanks for your help,


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

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


Re: [NTG-context] [solved] Parse error when using `\define`

2011-12-04 Thread Paul Menzel
Am Samstag, den 03.12.2011, 20:09 +0100 schrieb Wolfgang Schuster:
 Am 03.12.2011 um 20:06 schrieb Paul Menzel:

  could some please try to parse the following minimal example and report
  back if a parse problem occurs. Please find the protocols attached.
  
 \define[1]\abs{\lvert #1 \rvert}
  
 \define\Ew{{\mathbf E}}
 \define[1]\ew{\Ew \left[ #1 \right]}
  
 \starttext
 a
 \starttext
 
 End your document with \stoptext.

That is really embarrassing. I now also figured out my other error I
originally looked into.


Thank you and sorry for wasting everyone’s time,

Paul


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] [solved] Fractions and binomial inlined in text ($n \choose \frac{n}2$): Parentheses not scaled

2011-12-04 Thread Paul Menzel
Am Sonntag, den 04.12.2011, 09:52 +0100 schrieb Wolfgang Schuster:
 Am 03.12.2011 um 19:56 schrieb Paul Menzel:

  using the following minimal example
  
 \starttext
 Using \type{\choose} in text $n \choose \frac{n}2$.
  
 \startformula
 n \choose \frac{n}2
 \stopformula
  
 \CONTEXT\ \contextmark\ \contextversion\ with \texenginename\
 \texengineversion
 \stoptext
  
  the parentheses of the binomial in the text or too short. I guess this
  is because the parentheses are not scaled when inlined and that this is
  also a TeX limitation and therefore expected?
 
 
 Instead if \choose you can use \binom which is the recommended way in context.
 
 The \dbinom command sets the content in display style while \tbinom use 
 textstyle.
 
 \starttext
 
 Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$.
 
 Using \tex{dbinom} in text $\dbinom{n}{\frac{n}{2}}$.
 
 Using \tex{tbinom} in text $\tbinom{n}{\frac{n}{2}}$.
 
 \startformula
 \binom{n}{\frac{n}{2}}
 \stopformula
 
 \stoptext

As always that did the trick. Thank you a lot Wolfgang and Dalyoung!


Thanks,

Paul


binom.pdf
Description: Adobe PDF document
\starttext

Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$.

Using \tex{dbinom} in text $\dbinom{n}{\frac{n}{2}}$.

Using \tex{tbinom} in text $\tbinom{n}{\frac{n}{2}}$.

\startformula
\binom{n}{\frac{n}{2}}
\stopformula

\stoptext


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Saving module data in tuc file

2011-12-04 Thread Aditya Mahajan

On Sun, 4 Dec 2011, Aditya Mahajan wrote:


\def\executeCommand
   {\doifmode{*first}
   {\ctxlua{job.files.run(\!!bs\externalfiter::input_file\!!es,
  \!!bs\externalfiltercommand\!!es)}}}


The solution is to remove the test for the first mode. Needs a bit of 
refactoring to ensure that the solution still works for MkII. (Does anyone 
use the filter module with MkII?)


The new version of the filter module uses job.files.run in the background 
(when continue=yes is set) instead of mtxrun --ifchanged. This should 
considerably speed up the vim module when using a lot of code snippets.


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

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


[NTG-context] Interlinespace in layers

2011-12-04 Thread Jan Heinen

Hello,

I am struggling with interlinespace and layers. With the 
help of this mailinglist I managed to use layers and to 
format the text in the layers. There is only one error I 
can't get rid of:
before and after the first line of my text in a layer there 
ist a bigger space. In all the other lines of the text the 
interlinespace is ok.


You can see the result here:
http://www.imagebanana.com/view/gvv2twwv/paragraphinlayersetupinterlinespace.png

And this is my soucecode:


\usemodule[simplefonts]
\setmainfont[latinmodernsans]
\definefont[FontKlein][Serif  at  8pt]

\definelayer [Kontaktdaten]
  [
x=0mm,
y=0mm,
width=\paperwidth,
height=\paperheight,
state=start
  ]% size is ignored!

\setupbackgrounds [paper]
  [
background=Kontaktdaten,
state=start
  ]%

\starttext
\setlayerframed [Kontaktdaten]
  [
width=80mm,
height=180mm,
hoffset=50mm,
voffset=50mm,
frame=on,
align=right]
{\FontKlein\setupinterlinespace[8pt]Ich bin 
Blindtext. Von Geburt an. Es hat lange gedauert, bis ich 
begriffen habe, was es bedeutet, ein blinder Text zu sein: 
Man macht keinen Sinn. Man wirkt hier und da aus dem 
Zusammenhang gerissen. Oft wird man gar nicht erst gelesen.\par
Aber bin ich deshalb ein schlechter Text? Ich weiss, dass 
ich nie die Chance haben werde, im Stern zu erscheinen.\par
Aber bin ich darum weniger wichtig? Ich bin blind! Aber ich 
bin gerne Text. Und sollten Sie mich jetzt tatsächlich zu 
Ende lesen, dann habe ich etwas geschafft, was den meisten 
normalen Texten nicht gelingt.Ich bin Blindtext. Von 
Geburt an. Es hat lange gedauert, bis ich begriffen habe, 
was es bedeutet, ein blinder Text zu sein: Man macht keinen 
Sinn. Man wirkt hier und da aus dem Zusammenhang gerissen. 
Oft wird man gar nicht erst gelesen.\par
Aber bin ich deshalb ein schlechter Text? Ich weiss, dass 
ich nie die Chance haben werde, im Stern zu erscheinen.\par
Aber bin ich darum weniger wichtig? Ich bin blind! Aber ich 
bin gerne Text. Und sollten Sie mich jetzt tatsächlich zu 
Ende lesen, dann habe ich etwas geschafft,

was den meisten normalen Texten nicht gelingt.\par}
~
\page
\stoptext


Though I can't imagine, what's wrong - I hope the solution 
is easy.


Regards
Jannis

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

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] Interlinespace in layers

2011-12-04 Thread Jan Heinen

I solved the problem myself:

First I used \showstruts to se struts - and only before and 
after the first line there were struts.


Then I added the following argument into the \setlayerframed:
   strut=no

\setlayerframed [Kontaktdaten]
  [
width=80mm,
height=180mm,
hoffset=50mm,
voffset=50mm,
frame=on,
align=right,
strut=no]
{\FontKlein\setupinterlinespace[8pt] Ich bin 
Blindtext ...}



I don't understand this problem with the strut but I solved 
it :-)


Regards
Jannis

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

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
___