Re: [NTG-context] The problem with structure of heads in MkIV

2009-12-31 Thread Yanrui Li
2010/1/1 Tad Ashlock 

>
> Ahhh...  The problem was that I came at Joshua's message from the online
> mailing list <
> http://archive.contextgarden.net/message/20091230.023239.56a1e396.en.html>
> and the only "attached sample" was the code in the message.  Apparently
> attachments aren't accessible on the mailing list website?
>
>
Joshua's example:


\definestructureresetset[default][0,0][1]
 \setuphead
[part]
[resetnumber=no,
 sectionresetset=default,
 placehead=yes]

 \setuphead
[chapter]
[sectionsegments=2:100,resetnumber=no]

 \setuphead
   [section][sectionsegments=2:100]

 \setuphead[subsection][sectionsegments=2:100]

 \setuphead
   [subsubsection]
   [sectionsegments=2:100,number=no]


-- 
Best regards,

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

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] Natural Tables Cell Borders

2009-12-31 Thread Curiouslearn
Help needed! The fifth \setupTABLE command below reduces the
rulethickness of the bottomframe in cells (2,5) and (3,5). Is there a
way to avoid that? I just want the rightframe to be thin in these
cells, but the bottomframe to be thick.

Thanks a ton!

\starttext
\start
\setupTABLE[frame=off]
\setupTABLE[column][align={middle,lohi}]
\setupTABLE[2,3,4,][1,5][bottomframe=on,rulethickness=1pt]
\setupTABLE[1,4][2,3,4,5,][rightframe=on,rulethickness=1pt]
\setupTABLE[2,3][2,3,4,5][rightframe=on,rulethickness=0.2pt]

\bTABLE
\bTR
  \bTD\eTD\bTD\eTD\bTD[nc=2] {\bf 2} \eTD
\eTR
\bTR
  \bTD\eTD\bTD\eTD
  \bTD
a2
  \eTD
  \bTD
b2
  \eTD
\eTR
\bTR
  \bTD[nr=3] 1 \eTD \bTD a1 \eTD
  \bTD 2,2 \eTD
  \bTD 4,5 \eTD
\eTR
\bTR
  \bTD b1 \eTD
  \bTD 5,4 \eTD
  \bTD 3,3 \eTD
\eTR
\bTR
  \bTD c1 \eTD
  \bTD 6,6 \eTD
  \bTD 4,4 \eTD
\eTR
\eTABLE
\stop
\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] Metapost Font Question

2009-12-31 Thread David Arnold
All,The attached Metapost file uses the statsmac package by Anthony Phan. http://www-math.univ-poitiers.fr/~phan/statsmac.htmlAnd the package:mps.tar.gzTo compile the attached file I use:mpost Untitled.mpmptopdf Untitled.1I've attached the resulting file. I am wondering why the "cm" label is set in a larger font than the ticklabels. Can anyone help?David.

Untitled.mp
Description: Binary data


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


Re: [NTG-context] The problem with structure of heads in MkIV

2009-12-31 Thread Tad Ashlock

Wolfgang Schuster wrote:

Am 31.12.2009 um 12:47 schrieb Tad Ashlock:

  

Yanrui Li wrote:


2009/12/31 Tad Ashlock mailto:taas...@cyberdude.com>>


   The attached sample doesn't meet the original poster's criteria.
It produces headings like "1.1 alpha" and "1.1.1 a" instead of
   the requested "1 alpha" and "1.1 a".  Is there any way of
   achieving this?  (Under "Part 1", of course.  That's the trick.)


Hi Tad,

The attached sample works ok for me. Can you give me your result which the 
sample prodeces?


--
Best regards,

Li Yanrui
  

They are attached as "test.tex" (the test input), "test.pdf" and "test.log".  Notice how the 
chapter numbers are "x.y" (where 'x' =Part #') instead of just "y" as originally requested.  I point this out 
because I've tried to get ConTeXt to do structure numbering like this in the past and have had to postpone it due to lack of time.



Look at Joshuas example and the sectionsegments settings.

Wolfgang


Ahhh...  The problem was that I came at Joshua's message from the online 
mailing list 
 
and the only "attached sample" was the code in the message.  Apparently 
attachments aren't accessible on the mailing list website?


Sorry about wasting your time.
Tad
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Random numbers in metapost

2009-12-31 Thread David Arnold
Taco et al,

I think I've found a way. Anthony Phan has written a brilliant stats package 
for Metapost.

http://www-math.univ-poitiers.fr/~phan/statsmac.html

I think (haven't tried yet) I can select a number at random from the uniform 
distribution on [0,1], then use one of Anthony's functions such as:

poissonicdf(expr p, lambda). Inverse cumulative distribution function of 
P(lambda).

See Anthony's manual at:

http://www-math.univ-poitiers.fr/~phan/downloads/metapost/statsman.pdf

David.


On Dec 31, 2009, at 5:13 AM, Taco Hoekwater wrote:

> David Arnold wrote:
>> Hi,
>> Does anyone have any strategies for drawing random numbers from
>> various statistics distributions in Metapost? For example, say,
>> drawing 100 random numbers from a beta distribution?
> 
> Assuming you are using mkiv: create a lua function and use its
> calculated results to create the metapost code. Metapost only knows
> about uniformdeviate and normaldeviate, and metapost is not a good
> language to program mathematics in.
> 
> 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  : 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] Conflict between blackboard bold font and enumerations

2009-12-31 Thread Aditya Mahajan

On Thu, 31 Dec 2009, Ogam Géry wrote:


Hi,

I've got a problem with "\blackboard". When I use it in the title of an 
enumeration (title=yes in setupenumerations), I get this error during 
compilation:

! Incomplete \iffalse; all text was ignored after line x.  \fi

For instance:
\starttext
\defineenumeration[hello]
\setupenumerations[hello][title=yes]
\starthello{$\blackboard{ABCD}$}
\stophello
\stoptext

Yet if I replace "\blackboard{ABCD}" with \reals (or \naturalnumbers, or 
\integers etc.), it works fine. What's wrong?


Works fine in MkIV. In MkII, we need

\unexpanded\def\blackboard  #1{\mathortext\domathtext\donothing{\bbd#1}}

Hans, can you apply the attached patch for font-ini.mkii?

Adityadiff --git a/font-ini.mkii b/font-ini.mkii
index 9eb532d..89fbb5d 100644
--- a/font-ini.mkii
+++ b/font-ini.mkii
@@ -3248,11 +3248,11 @@
 %
 % newer
 
-\def\os  {\mathortext{\fam\purefamily{oldstyle}}{\symbolicfont
{OldStyle}}}
-\def\frak{\mathortext{\fam\purefamily {fraktur}}{\symbolicfont 
{Fraktur}}}
-\def\goth{\mathortext{\fam\purefamily  {gothic}}{\symbolicfont  
{Gothic}}}
-\def\cal 
{\mathortext{\fam\purefamily{calligraphic}}{\symbolicfont{Calligraphic}}}
-\def\bbd {\mathortext{\fam\purefamily  {blackboard}}{\symbolicfont  
{Blackboard}}}
+\unexpanded\def\os  {\mathortext{\fam\purefamily{oldstyle}}{\symbolicfont  
  {OldStyle}}}
+\unexpanded\def\frak{\mathortext{\fam\purefamily {fraktur}}{\symbolicfont  
   {Fraktur}}}
+\unexpanded\def\goth{\mathortext{\fam\purefamily  {gothic}}{\symbolicfont  
{Gothic}}}
+\unexpanded\def\cal 
{\mathortext{\fam\purefamily{calligraphic}}{\symbolicfont{Calligraphic}}}
+\unexpanded\def\bbd {\mathortext{\fam\purefamily  {blackboard}}{\symbolicfont  
{Blackboard}}}
 
 \definefontsynonym [OldStyle] [Serif]
 \definefontsynonym [Fraktur]  [Serif]
@@ -3268,10 +3268,10 @@
 
 \ifx\mathtext\undefined \let\mathtext\hbox \fi
 
-\def\fraktur #1{\mathortext\domathtext\donothing{\frak#1}}
-\def\gothic  #1{\mathortext\domathtext\donothing{\goth#1}}
-\def\calligraphic#1{\mathortext\domathtext\donothing{\cal #1}}
-\def\blackboard  #1{\mathortext\domathtext\donothing{\bbd#1}}
+\unexpanded\def\fraktur #1{\mathortext\domathtext\donothing{\frak#1}}
+\unexpanded\def\gothic  #1{\mathortext\domathtext\donothing{\goth#1}}
+\unexpanded\def\calligraphic#1{\mathortext\domathtext\donothing{\cal #1}}
+\unexpanded\def\blackboard  #1{\mathortext\domathtext\donothing{\bbd#1}}
 
 %D Torture test:
 %D
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Happy new year!

2009-12-31 Thread Martin 'golodhrim' Scholz
Dear friends and Vyatcheslav,

I wish everyone of you a happy new year too. And Happy ConTeXting in 2010!

With the best regards from Germany

Martin

On Thu, 31 Dec 2009 17:55:59 +0200, Vyatcheslav Yatskovsky wrote:

> Dear friends,
> 
> Happy new year to you! More inspiration and brilliancy in 2010! )
> 
> With best regards from Ukraine,
> Vyatcheslav
> 
___
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> 
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
> http://www.pragma-ade.nl / http://tex.aanhet.net archive  :
> http://foundry.supelec.fr/projects/contextrev/ wiki :
> http://contextgarden.net
> 
___


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

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


[NTG-context] Happy new year!

2009-12-31 Thread Vyatcheslav Yatskovsky

Dear friends,

Happy new year to you! More inspiration and brilliancy in 2010! )

With best regards from Ukraine,
Vyatcheslav
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Conflict between blackboard bold font and enumerations

2009-12-31 Thread Ogam Géry

Hi,

I've got a problem with "\blackboard". When I use it in the title of an 
enumeration (title=yes in setupenumerations), I get this error during 
compilation:
! Incomplete \iffalse; all text was ignored after line x. text> \fi


For instance:
\starttext
\defineenumeration[hello]
\setupenumerations[hello][title=yes]
\starthello{$\blackboard{ABCD}$}
\stophello
\stoptext

Yet if I replace "\blackboard{ABCD}" with \reals (or \naturalnumbers, or 
\integers etc.), it works fine. What's wrong?


Thanks.

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

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] Random numbers in metapost

2009-12-31 Thread Taco Hoekwater

David Arnold wrote:

Hi,

Does anyone have any strategies for drawing random numbers from
various statistics distributions in Metapost? For example, say,
drawing 100 random numbers from a beta distribution?


Assuming you are using mkiv: create a lua function and use its
calculated results to create the metapost code. Metapost only knows
about uniformdeviate and normaldeviate, and metapost is not a good
language to program mathematics in.

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


Re: [NTG-context] The problem with structure of heads in MkIV

2009-12-31 Thread Wolfgang Schuster

Am 31.12.2009 um 12:47 schrieb Tad Ashlock:

> Yanrui Li wrote:
>> 
>> 2009/12/31 Tad Ashlock mailto:taas...@cyberdude.com>>
>> 
>> 
>>The attached sample doesn't meet the original poster's criteria.
>> It produces headings like "1.1 alpha" and "1.1.1 a" instead of
>>the requested "1 alpha" and "1.1 a".  Is there any way of
>>achieving this?  (Under "Part 1", of course.  That's the trick.)
>> 
>> 
>> Hi Tad,
>> 
>> The attached sample works ok for me. Can you give me your result which the 
>> sample prodeces?
>> 
>> 
>> -- 
>> Best regards,
>> 
>> Li Yanrui
> 
> 
> They are attached as "test.tex" (the test input), "test.pdf" and "test.log".  
> Notice how the chapter numbers are "x.y" (where 'x' = 'Part #') instead of 
> just "y" as originally requested.  I point this out because I've tried to get 
> ConTeXt to do structure numbering like this in the past and have had to 
> postpone it due to lack of time.

Look at Joshuas example and the sectionsegments settings.

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] The problem with structure of heads in MkIV

2009-12-31 Thread Tad Ashlock

Yanrui Li wrote:


2009/12/31 Tad Ashlock >



The attached sample doesn't meet the original poster's criteria.
 It produces headings like "1.1 alpha" and "1.1.1 a" instead of
the requested "1 alpha" and "1.1 a".  Is there any way of
achieving this?  (Under "Part 1", of course.  That's the trick.)


Hi Tad,

The attached sample works ok for me. Can you give me your result which 
the sample prodeces?



--
Best regards,

Li Yanrui



They are attached as "test.tex" (the test input), "test.pdf" and 
"test.log".  Notice how the chapter numbers are "x.y" (where 'x' = 'Part 
#') instead of just "y" as originally requested.  I point this out 
because I've tried to get ConTeXt to do structure numbering like this in 
the past and have had to postpone it due to lack of time.


Thanks,
Tad
\starttext

\placelist[part,chapter,section,subsection][criterium=all]

\part{first}
\chapter{alpha}
\section{a}
\section{b}
\subsection{x}
\subsection{y}
\chapter{beta}

\part{second}
\chapter{gamma}
\section{a}
\section{b}
\subsection{x}
\subsection{y}
\chapter{delta}

\stoptext
(c:/pub/projects/psicc2/book/test.tex

ConTeXt  ver: 2009.12.30 20:27 MKIV  fmt: 2009.12.30  int: english/english

system  : cont-new loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv))
system  : cont-fil loaded
(C:/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system  : cont-sys.rme loaded
(C:/context/tex/texmf-context/tex/context/user/cont-sys.rme 
(C:/context/tex/texmf-context/tex/context/base/type-lua.tex) 
(C:/context/tex/texmf-context/tex/context/base/type-tmf.tex 
(C:/context/tex/texmf-context/tex/context/base/type-tmf.mkiv)) 
(C:/context/tex/texmf-context/tex/context/base/type-siz.tex 
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)) 
(C:/context/tex/texmf-context/tex/context/base/type-otf.tex 
(C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv)))
system  : test.top loaded
%
%   begin of optionfile
%
%   % runtime options files (command line driven)
%   \unprotect
%   % special commands, mostly for the ctx development team
%   % feedback and basic job control
%   % handy for special styles
%   \startluacode
%   document = document or { }
%   document.arguments={
%["autopdf"]=true,
%   }
%   document.files={
%"c:/pub/projects/psicc2/book/test.tex",
%   }
%   \stopluacode
%   % process info
%   \setupsystem[inputfile=c:/pub/projects/psicc2/book/test.tex]
%   \setupsystem[\c!n=2,\c!m=3]
%   % modes
%   % options (not that important)
%   \startsetups *runtime:options
%   \setupoutput[pdftex]
%   \stopsetups
%   % styles and modules
%   \startsetups *runtime:modules
%   \stopsetups
%   % done
%   \protect \endinput
%
%   end of optionfile
%
(test.top)
fonts   : preloading latin modern fonts
bodyfont: 12pt rm is loaded
language: language en is active
systems : begin file c:/pub/projects/psicc2/book/test.tex at line 1
fonts   : resetting map file list
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-empty.map}
fonts   : using map file: original-base
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-base.map}
fonts   : using map file: original-ams-base
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-base.map}
fonts   : using map file: original-ams-euler
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-euler.map}
fonts   : using map file: original-public-lm
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-public-lm.map}
fonts   : using map file: lm-math
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts   : using map file: lm-rm
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
!pages  : flushing realpage 1, userpage 1, subpage 1
structure   : part @ level 1 : 1 -> first
!pages  : flushing realpage 2, userpage 2
structure   : chapter @ level 2 : 1.1 -> alpha
structure   : section @ level 3 : 1.1.1 -> a
structure   : section @ level 3 : 1.1.2 -> b
structure   : subsection @ level 4 : 1.1.2.1 -> x
structure   : subsection @ level 4 : 1.1.2.2 -> y
!pages  : flushing realpage 3, userpage 3
structure   : chapter @ level 2 : 1.2 -> beta
!pages  : flushing realpage 4, userpage 4
structure   : part @ level 1 : 2 -> second
!pages  : flushing realpage 5, userpage 5
structure   : chapter @ level 2 : 2.1 -> gamma
structure   : section @ level 3 : 2.1.1 -> a
structure   : section @ level 3 : 2.1.2 -> b
structure   : subsection @ level 4 : 2.1.2.1 -> x
structure   : subsection @ level 4 

Re: [NTG-context] Bug in \Umathlimitbelowvgap?

2009-12-31 Thread Oliver Buerschaper
> no errors with latest luatex and context beta
> LowerLimitGapMin: 2.0pt
> UpperLimitGapMin: 1.3pt

Thanks! Sorry for the noise...

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

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] Using Adobe Arno Pro in Mkiv

2009-12-31 Thread Hans Hagen

On 31-12-2009 3:15, Changlin Ai wrote:


And when I used node mode, the memory usage was reduced to 73MB, it's
amazing (73MB vs. 491MB). Thanks a lot for everybody's help.


this font is a special case as it has many (also useless) kerns

using less mem is possible because i aggressively share tables

future versions of luatex might support shared kern tables and 
additional font access methods so that we can squeeze out a little more

but these things are quite unpredictable

in node mode kerns are handles differently but it's slower; for fonts 
that have no advanced features (contextual lookups etc) base mode is faster


Hans

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

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