[NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Andreas Harder
Hi all!

I played a little bit with LuaTeX in ConTeXt and two questions have arisen.

\usemodule[calcmath]
\starttext
\def\calculate#1{\calcmath{#1=\ctxlua{tex.print(#1)}}}
\calculate{1+2} \par
\calculate{3/2-1}\par % the output should be 0,5
\calculate{3*2}\par
% \calculate{sqrt(2)} \calculate{2*π} % 2*\pi
\stoptext

1) Is it possible to have a comma as decimal separator?

2) If you look at the above definition, it works fine with +, –, /, but not 
with *. Is it possible to expand my macro that it will also work with a 
multiplication or even with the last two examples?


Thank you in advance

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

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


Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread luigi scarso
On Sun, Feb 14, 2010 at 11:42 AM, Andreas Harder
andreas.har...@rz-online.de wrote:
 Hi all!

 I played a little bit with LuaTeX in ConTeXt and two questions have arisen.

 \usemodule[calcmath]
 \starttext
 \def\calculate#1{\calcmath{#1=\ctxlua{tex.print(#1)}}}
 \calculate{1+2} \par
 \calculate{3/2-1}\par % the output should be 0,5
 \calculate{3*2}\par
 % \calculate{sqrt(2)} \calculate{2*π} % 2*\pi
 \stoptext

 1) Is it possible to have a comma as decimal separator?
string.format ?
-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Peter Münster
On Sun, Feb 14 2010, Andreas Harder wrote:

 1) Is it possible to have a comma as decimal separator?
 
 2) If you look at the above definition, it works fine with +, –, /, but
 not with *. Is it possible to expand my macro that it will also work with
 a multiplication or even with the last two examples?

Hello Andreas,

Just a quick hack:

\usemodule[calcmath]
\startluacode
sqrt = math.sqrt
pi = math.pi
function my_equation(s, r)
r = tostring(r)
tex.print(s:gsub(*, ×) .. = .. r:gsub(%., ,))
end
\stopluacode
\def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}}
\starttext
\startlines
  \calculate{1+2}
  \calculate{3/2-1}
  \calculate{3*2}
  \calculate{sqrt(2)}
  \calculate{2*pi}
\stoplines
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] interlineskip problem (mkiv)

2010-02-14 Thread Hans Hagen

On 12-2-2010 16:47, Peter Rolf wrote:

Hi,

I get unwanted interline skips when using a MP based background. The
attached example works fine in mkii. In mkiv I only get the desired
result, if I don't use the MP background.



solved in next beta

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

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


Re: [NTG-context] Two interline space setup troubles

2010-02-14 Thread Philipp Gesang
Hi Vyatceslav,
On 2010-02-13 21:11:34, Vyatcheslav Yatskovsky wrote:
 Hello,
 
 I have some troubles with interline space setup.
 
 1) I want whole document to have medium interline space. When I put
 
 \setupinterlinespace[medium]
 
 in the preample (before \starttext), it has no effect at all. I want
 keep all style definitions in a separate environment module, so how
 to make this setting 'global'?

this is strange, as you can specify line spacing globally using explicit
parameters, e.g.

\setupinterlinespace[line=19pt] 
   
\starttext
\input knuth
\stoptext

this works for me.  The relative dimensions big|small|medium don't have
any noticable effect, though.


Philipp
-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpSL7fpi6uR1.pgp
Description: PGP 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] What do you miss in ConTeXt?

2010-02-14 Thread Matija Šuklje
Dne sreda 10. februarja 2010 ob 09:56:37 je Matija Šuklje napisal(a):
 Dne sreda 10. februarja 2010 ob 09:50:28 je Robert Blackstone napisal(a):
  I would be very happy if I could make a Bibliography with several
  sections. (This wish has been expressed on this list before and I just
  want to add my vote to it.)
 
 I think it was me (probably amongst others) who suggested this.

I looked again at what features I would need added to the bibliography and 
it's mainly two things:

1) Possibility to have several sections in the bibliography;

2) and advanced ordering of it.

Use case:
What my faculty wants from me (and it's not an uncommon request AFAIK) is to 
have the bibliography at the end of the thesis divided into sections:
* books
(* books with more then one author)
* chapters from reviews, collections etc.
* articles
* laws, legal acts, conventions etc.
* internet

And then inside every section they want the entries to be alphabetically 
ordered by surnames of the authors or editors (as applicable).


Cheers,
Matija

-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suk...@gabbler.org

GPG/PGP: FB64 FFAF B8DA 5AB5 B18A 98B8 2B68 0B51 0549 D278
___
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] \textat (@)

2010-02-14 Thread Mojca Miklavec
Hello,

I know that people would usually use \type{em...@address.com}, but I
must be missing something. Is there really no \textat (under some
other name) defined anywhere in ConTeXt?

The following definition in ec (and probably some other encodings) as
well as in char-def.lua
\definecharacter textat 64
might be handy.

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

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


Re: [NTG-context] \fieldstack with mkiv

2010-02-14 Thread Hans Hagen

On 13-2-2010 11:45, Peter Münster wrote:

\setupinteraction[state=start]
\definesymbol[step1][AAA]
\definesymbol[step2][BBB]
\definefieldstack[test][step1, step2]
\starttext
\fieldstack[test]

Just click \goto{here}[JS(Walk_Field{test})] to walk through the fieldstack!
\goto{(restart)}[JS(Set_Field{test, 1})]
\stoptext



\def\dodefinefieldstack[#1][#2][#3]% name, symbols, settings
  {\ifcsname fieldstack:#1\endcsname \else
 \setgvalue{fieldstack:#1}{\dodofieldstack[#1][#2][#3]}%
   \fi}

\else missing

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

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


Re: [NTG-context] Two interline space setup troubles

2010-02-14 Thread Wolfgang Schuster

Am 13.02.10 20:11, schrieb Vyatcheslav Yatskovsky:

Hello,

I have some troubles with interline space setup.

1) I want whole document to have medium interline space. When I put

\setupinterlinespace[medium]

in the preample (before \starttext), it has no effect at all. I want 
keep all style definitions in a separate environment module, so how to 
make this setting 'global'?

You can't use relative interlinespacing in MkIV anymore because
\starttext resets your setting. What you can do is to set a absolute
value with \setupinterlinespace[line=18pt].

2) The inbetween key does not work in the following command:

\definestartstop[example][style={\tfx}, before={\blank[small]}, 
after={\blank[small]}, inbetween={\setupinterlinespace[big]}]


I can write

before={\blank[small]\setupinterlinespace[big]}, 
after={\setupinterlinespace[medium]\blank[small]}


but in this way I hard-code document  interlinespace (i.e., medium) in 
this definition, and this is not elegant solution at all.

\definestartstop
  [example]
  [before={\blank[small]},
   after={\blank[small]},
   style=\tfx,
   commands={\setupinterlinespace[big]}]

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] \textat (@)

2010-02-14 Thread Hans Hagen

On 14-2-2010 14:30, Mojca Miklavec wrote:

I know that people would usually use \type{em...@address.com}, but I
must be missing something. Is there really no \textat (under some
other name) defined anywhere in ConTeXt?


well, @ normally works quite ok so i never felt the need for a \textat 
(or \texta \textb \textc)


for mkii just adding it to enco-def.mkii is anough as i it sits in the 
same spot in all encodings


Hans




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

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


Re: [NTG-context] \textat (@)

2010-02-14 Thread Wolfgang Schuster

Am 14.02.10 14:30, schrieb Mojca Miklavec:

Hello,

I know that people would usually use \type{em...@address.com}, but I
must be missing something. Is there really no \textat (under some
other name) defined anywhere in ConTeXt?
   

Why, you can just write @ in your text.

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] One interline space setup trouble

2010-02-14 Thread Vyatcheslav Yatskovsky

Hello Wolfgang

\definestartstop
  [example]
  [before={\blank[small]},
   after={\blank[small]},
   style=\tfx,
   commands={\setupinterlinespace[big]}] 


Thank you, Wolfgang, but the 'commands' tag seems to not have no effect 
at all. Even when explicit value provided.



\setupinterlinespace[line=18pt]

\definestartstop

[example]

[before={\blank[small]},

after={\blank[small]},

style=\tfx,

commands={\setupinterlinespace[line=12pt]}]


\starttext
Most models we discussing here are specification of dynamic behaviour of 
SUI. This behaviour is described in terms of the interactions over time 
among some entities. The entities in question fall into two broad 
categories: {\em endogenous} (intrinsic to the SUI itself) and {\em 
exogenous} (belonging to a system's environment).


\startexample All processes that take place inside Earth (and other 
planets) are considered endogenous. These processes make the continents 
migrate, push the mountains up, trigger earthquakes and volcanism, and 
are driven by the warmth that is produced in the core of Earth. 
Exogenous processes are all taking place at the outside of the Earth. 
Weathering, erosion, transportation and sedimentation are the main 
exogenous processes.\stopexample


Constants and parameters serve as names for the values that do not 
change during a simulation run. In the case of a {\em constant}, the 
assigned value remains invariant over all experiments. Often it is a 
physical constant, like $g$ -- force of gravity. In the case of a {\em 
parameter}, there normally is an intent to explore the effect upon 
behaviour of a range of different values for the parameter.


\stoptext


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

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


Re: [NTG-context] What do you miss in ConTeXt?

2010-02-14 Thread Hans Hagen

On 11-2-2010 9:43, Steffen Wolfrum wrote:


Am 08.02.2010 um 12:25 schrieb Wolfgang Schuster:


Hi all,

ConTeXt has many features but sometimes there is something missing, what 
feature or package do you miss which is already available in another TeX system 
or unavailable in any TeX system?




I miss a command to force a manual line break at any point in a \hyphenatedurl 
string.

Like, e.g. * in 
\hyphenatedurl{http://www.a_ridiculous_very_long_alpanum*eric_sequence}


i've added

\def\hyphenatedurldiscretionary{*}

\hsize1cm \hyphenatedurl{*xx}

but it defaults to

\def\hyphenatedurldiscretionary{}


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

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


Re: [NTG-context] One interline space setup trouble

2010-02-14 Thread Wolfgang Schuster

Am 14.02.10 15:05, schrieb Vyatcheslav Yatskovsky:
Thank you, Wolfgang, but the 'commands' tag seems to not have no 
effect at all. Even when explicit value provided.


\definestartstop
  [example]
  [before={\blank[small]},
   after={\blank[small]},
   style=\tfx,
   commands={\setupinterlinespace[line=12pt]}]
It works only when you end the paragraph before \startexample but it's 
easier

to define the environment as delimitedtext because it takes care of this.

\definedelimitedtext
  [example]
  [spacebefore=small,
   style=\tfx,
   before={\setupinterlinespace[line=12pt]}]

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] One interline space setup trouble

2010-02-14 Thread Vyatcheslav Yatskovsky

Thanks!

\definedelimitedtext  is a nice command, indeed. As often happens, it is 
carefully hidden in the wiki documentation )))


Found only in http://wiki.contextgarden.net/Quotes

Regards,
Vyatcheslav



Am 14.02.10 15:05, schrieb Vyatcheslav Yatskovsky:
Thank you, Wolfgang, but the 'commands' tag seems to not have no 
effect at all. Even when explicit value provided.


\definestartstop
  [example]
  [before={\blank[small]},
   after={\blank[small]},
   style=\tfx,
   commands={\setupinterlinespace[line=12pt]}]
It works only when you end the paragraph before \startexample but it's 
easier

to define the environment as delimitedtext because it takes care of this.

\definedelimitedtext
  [example]
  [spacebefore=small,
   style=\tfx,
   before={\setupinterlinespace[line=12pt]}]

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
___


[NTG-context] ConTeXt wiki page

2010-02-14 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear fellow gangsters,

I did a bit of rewriting this morning on the wiki page

http://en.wikipedia.org/wiki/ConTeXt

If anyone can change the example code/figure to something that does not  
look like such a cliche TeX/LaTeX document, that would be a nice addition.  
Maybe using TeX-gyre fonts and some cool feature other than/in addition to  
the usual maths...


There is a famous German politician who has joined the Developer(s), so  
ConTeXt has political support for the moment...


Peace
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

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

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


Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Andreas Harder

Am 14.02.2010 um 13:11 schrieb Peter Münster:

 On Sun, Feb 14 2010, Andreas Harder wrote:
 
 1) Is it possible to have a comma as decimal separator?
 
 2) If you look at the above definition, it works fine with +, –, /, but
 not with *. Is it possible to expand my macro that it will also work with
 a multiplication or even with the last two examples?
 
 Hello Andreas,
 
 Just a quick hack:
 
 \usemodule[calcmath]
 \startluacode
 sqrt = math.sqrt
 pi = math.pi
 function my_equation(s, r)
   r = tostring(r)
   tex.print(s:gsub(*, ×) .. = .. r:gsub(%., ,))
 end
 \stopluacode
 \def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}}
 \starttext
 \startlines
  \calculate{1+2}
  \calculate{3/2-1}
  \calculate{3*2}
  \calculate{sqrt(2)}
  \calculate{2*pi}
 \stoplines
 \stoptext

That’s nice! Thank you very much! 

I've found an posting on the LuaTeX-mailing-list and incorporated it, so one 
have rounded results (I didn't find a way to use \%.2f). So, if someone is 
interested:

\usemodule[calcmath]

\startluacode
  local floor = math.floor
  local round = function(n) return floor(1000*n+0.5)/1000 end

  sqrt = math.sqrt
  pi = math.pi
  function my_equation(s, r)
r = round(r)
r = tostring(r)
tex.print(s:gsub(*, $·$) .. = .. r:gsub(%., ,))
  end
\stopluacode

\def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}}

\starttext

\startlines
 \calculate{1+2}
 \calculate{3/2-1}
 \calculate{3*2}
 \calculate{sqrt(2)}
 \calculate{2*pi}
\stoplines

\stoptext


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

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


Re: [NTG-context] ConTeXt wiki page

2010-02-14 Thread Steffen Wolfrum

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

 There is a famous German politician who has joined the Developer(s), so 
 ConTeXt has political support for the moment...


Now I understand why he never came to a ConTeXt meeting ... must be really 
quite busy ;o)


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

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


Re: [NTG-context] \fieldstack with mkiv

2010-02-14 Thread Wolfgang Schuster

Am 14.02.10 14:32, schrieb Hans Hagen:

On 13-2-2010 11:45, Peter Münster wrote:

\setupinteraction[state=start]
\definesymbol[step1][AAA]
\definesymbol[step2][BBB]
\definefieldstack[test][step1, step2]
\starttext
\fieldstack[test]

Just click \goto{here}[JS(Walk_Field{test})] to walk through the 
fieldstack!

\goto{(restart)}[JS(Set_Field{test, 1})]
\stoptext

\def\dodefinefieldstack[#1][#2][#3]% name, symbols, settings
  {\ifcsname fieldstack:#1\endcsname \else
 \setgvalue{fieldstack:#1}{\dodofieldstack[#1][#2][#3]}%
   \fi}

\else missing

works but only the first symbol is shown, all others are invisible

Wolfgang





test.pdf
Description: Adobe PDF document


test.tex
Description: TeX 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] \fieldstack with mkiv

2010-02-14 Thread Hans Hagen

On 14-2-2010 17:45, Wolfgang Schuster wrote:

Am 14.02.10 14:32, schrieb Hans Hagen:

On 13-2-2010 11:45, Peter Münster wrote:

\setupinteraction[state=start]
\definesymbol[step1][AAA]
\definesymbol[step2][BBB]
\definefieldstack[test][step1, step2]
\starttext
\fieldstack[test]

Just click \goto{here}[JS(Walk_Field{test})] to walk through the
fieldstack!
\goto{(restart)}[JS(Set_Field{test, 1})]
\stoptext

\def\dodefinefieldstack[#1][#2][#3]% name, symbols, settings
{\ifcsname fieldstack:#1\endcsname \else
\setgvalue{fieldstack:#1}{\dodofieldstack[#1][#2][#3]}%
\fi}

\else missing

works but only the first symbol is shown, all others are invisible


new attempt

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

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


Re: [NTG-context] Fwd: Re: [off-list] Rotated footnotes?

2010-02-14 Thread Steffen Wolfrum

Am 11.02.2010 um 13:52 schrieb Hans Hagen:

 
 
  Original Message 
 Subject: Re: [off-list] Rotated footnotes?
 Date: Thu, 11 Feb 2010 11:30:00 +0100
 From: Taco Hoekwater t...@elvenkind.com
 To: Steffen Wolfrum cont...@post.werksatz.com, Hans Hagen pra...@wxs.nl
 
 Taco Hoekwater wrote:
 Steffen Wolfrum wrote:
 Am 11.02.2010 um 10:07 schrieb Taco Hoekwater:
 
 Steffen Wolfrum wrote:
 Hi Taco,
 there really is no clean way to get a rotated figure/label/footnote
 page?
 Not that I know of, no. Unless you would consider actually rotating the
 entire page 90 degrees a solution?
 
 No, the actual page (width, height, position of pagenumber/header)
 sould be the same.
 It should be as shown in my faked example ... only in a right way.
 
 Perhaps Hans can come up with a method for the \localfootnotes to use
 (and update) the global footnote number. The rest of my hack is a ugly,
 but functional. Hans?
 
 new beta ... some fixes to footnotes (automigrate works with local now) ... 
 also lastcolumn fix (might break something else, not sure about that yet)
 
 \automigrateinserts
 
 \starttext
 
 \setupnotes[continue=yes]
 
 \input tufte
 
 \input tufte \footnote{oeps}
 
 \startstandardmakeup
\setuptabulate[before=,after=]
\rotate [rotation=90] \bgroup \vbox to \textwidth \bgroup
\hsize\textheight
\startlocalnotes[footnote]
\placefigure [fixed] {} {
\starttabulate
\NC test \footnote{\input tufte } \NC \input tufte \NC \NR
\NC test \NC \input tufte \NC \NR
\stoptabulate
}
\vfill
\strut
\placelocalnotes[footnote]
\stoplocalnotes
\egroup \egroup
 \stopstandardmakeup
 
 \input tufte \footnote{oeps}
 
 \starttabulate
\NC test \footnote{\input tufte } \NC \input tufte \NC \NR
\NC test \NC \input tufte \NC \NR
 \stoptabulate
 
 \stoptext



Did not yet test it in a real project ... but your example looks great.

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

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


Re: [NTG-context] ConTeXt wiki page

2010-02-14 Thread Martin Schröder
2010/2/14 Steffen Wolfrum cont...@st.estfiles.de:
 Am 14.02.2010 um 17:11 schrieb Idris Samawi Hamid ادريس سماوي حامد:
 There is a famous German politician who has joined the Developer(s), so 
 ConTeXt has political support for the moment...

 Now I understand why he never came to a ConTeXt meeting ... must be really 
 quite busy ;o)

Nah, it's because he's still working on that train station. :-)

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

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


[NTG-context] Mathdesign and Fourier fonts (was What do you miss in ConTeXt?)

2010-02-14 Thread Mikael Persson
On Wed, Feb 10, 2010 at 3:24 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:
 Am 10.02.10 09:00, schrieb Mikael Persson:

 I would like support for more fonts out of the box (in the minimals).
 For example it would be really nice to be able to use
 utopia+fourier ( http://tug.ctan.org/tex-archive/fonts/fourier-GUT/ )
 charter+mathdesign (
 http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=mathdesign )

 MkIV has support for the Charter and the Mathdesign fonts.

 \definetypafec[charter][rm][serif][charter]     [default]
 %\definetypafec[charter][mm][math] [mathdesignch][default]
 \definetypafec[charter][mm][math] [charter]     [default]

 What's missing are the fonts but they are already on the server [1],
 Mojca should be able to tell you how you can install them.

 [1] http://minimals.contextgarden.net/current/fonts/extra/

 Wolfgang

Thanks for your reply Wolfgang. I use the minimals and have some
further questions:

1) Is there any way to use first-setup.sh to install these fonts?

2) The type1 dir is empty. Is that on purpose? Should one download the
pfb files from ctan?

3) Will there be any support of the Fourier fonts? I have asked this
before, sorry about that, but I'm kind of clueless about the present
situation.

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


Re: [NTG-context] \fieldstack with mkiv

2010-02-14 Thread Wolfgang Schuster

Am 14.02.10 19:16, schrieb Hans Hagen:

new attempt

the stepper did now work but why are the symbol names shown on the terminal

here is a example from another file with more symbols (the symbols have 
the names 'go!symbol!...')


fonts   : using map file: lm-math
{/Users/wolf/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts   : using map file: lm-rm
{/Users/wolf/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}go!symbol!2

go!symbol!3

go!symbol!4

go!symbol!5

go!symbol!6

go!symbol!7

go!symbol!8

go!symbol!9

go!symbol!10


!pages  : flushing realpage 1, userpage 1, subpage 1
systems : end file test-go-5 at line 15
system  : cont-err loaded

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] Mathdesign and Fourier fonts (was What do you miss in ConTeXt?)

2010-02-14 Thread Wolfgang Schuster

Am 14.02.10 20:06, schrieb Mikael Persson:

On Wed, Feb 10, 2010 at 3:24 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com  wrote:
   

Am 10.02.10 09:00, schrieb Mikael Persson:

 

I would like support for more fonts out of the box (in the minimals).
For example it would be really nice to be able to use
utopia+fourier ( http://tug.ctan.org/tex-archive/fonts/fourier-GUT/ )
charter+mathdesign (
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=mathdesign )
   

MkIV has support for the Charter and the Mathdesign fonts.

\definetypafec[charter][rm][serif][charter] [default]
%\definetypafec[charter][mm][math] [mathdesignch][default]
\definetypafec[charter][mm][math] [charter] [default]

What's missing are the fonts but they are already on the server [1],
Mojca should be able to tell you how you can install them.

[1] http://minimals.contextgarden.net/current/fonts/extra/

Wolfgang
 

Thanks for your reply Wolfgang. I use the minimals and have some
further questions:

1) Is there any way to use first-setup.sh to install these fonts?

2) The type1 dir is empty. Is that on purpose? Should one download the
pfb files from ctan?
   

Only Mojca can answer this.

3) Will there be any support of the Fourier fonts? I have asked this
before, sorry about that, but I'm kind of clueless about the present
situation.
   

As long as there is one who is willing to provide them.

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
___


[NTG-context] columns and footnotes

2010-02-14 Thread Wolfgang Werners-Lucchini
Hallo,

I use:

ConTeXt  ver: 2009.11.24 10:13 MKII  fmt: 2009.11.24  int: 
english/english

and I have many problems with columns and footnotes.

Is there a possibility to set footnotes in two columns too?

I tried 

\setupfootnotes[location=columns]

but I can not see any difference to

\setupfootnotes[location=lastcolumn]

In the moment I use 

\setupfootnotes[location=page]

and it is often the case that footnotes are printed one page to 
early. It is sometimes the case that the columns and the footnote 
area overlapp. 

What can I do to avoid these problems?

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
___


[NTG-context] columns and whitespace

2010-02-14 Thread Wolfgang Werners-Lucchini
Hallo,

is it possible to get a half line space after paragraphs in columns?
The default is no space. And

\setupwhitespace[small]

produces a whole line of space.

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] Grid, Footnotes and MkIV

2010-02-14 Thread Hans Hagen

On 14-2-2010 19:39, Steffen Wolfrum wrote:


Am 14.02.2010 um 19:25 schrieb Hans Hagen:


On 14-2-2010 19:15, Steffen Wolfrum wrote:

\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]
\mainlanguage[de]
\setupbodyfont[postscript,10pt]

\setuplayout
[grid=yes]

  \def\setnotebodyfont
{\let\setnotebodyfont\relax
 \restoreglobalbodyfont
\switchtobodyfont[rm,9pt]
\interwordspace 2.70pt
\interwordstretch 1.7pt
\interwordshrink 0.9pt
\setupinterlinespace[line=9.8pt,height=.79,depth=.21]\setupalign[block,hanging]\parskip2pt}


\setupinterlinespace is global, \setuplocalinterlinespace is local

so you need to use the local variant

just like we have setupbodyfont, switchtobodyfont, we now have 
setupinterlinespace and setuplocalinterlinespace




I assume \setupinterlinespace then should only be used once for the body text.
And everything else is classified as local?!


i'm still reconsidering this ... maybe in mkiv we will have

- \setupbodyinterlinespace
- \switchtobodyinterlinespace

and \setupinterlinespace being local (or global till starttext)

Hans

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

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


Re: [NTG-context] \fieldstack with mkiv

2010-02-14 Thread Hans Hagen

On 14-2-2010 20:12, Wolfgang Schuster wrote:

Am 14.02.10 19:16, schrieb Hans Hagen:

new attempt

the stepper did now work but why are the symbol names shown on the terminal

here is a example from another file with more symbols (the symbols have
the names 'go!symbol!...')

fonts : using map file: lm-math
{/Users/wolf/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts : using map file: lm-rm
{/Users/wolf/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}go!symbol!2

go!symbol!3

go!symbol!4

go!symbol!5

go!symbol!6

go!symbol!7

go!symbol!8

go!symbol!9

go!symbol!10


!pages : flushing realpage 1, userpage 1, subpage 1
systems : end file test-go-5 at line 15
system : cont-err loaded


because i added a print for tracing; i'll remove it

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

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


Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Hans Hagen

On 14-2-2010 14:10, Andreas Harder wrote:


\startluacode
   local floor = math.floor
   local round = function(n) return floor(1000*n+0.5)/1000 end

   sqrt = math.sqrt
   pi = math.pi
   function my_equation(s, r)
 r = round(r)
 r = tostring(r)
 tex.print(s:gsub(*, $·$) .. = .. r:gsub(%., ,))
   end
\stopluacode


beware, this creates (and possibly overloads) sqrt, pi and my_equation 
as gobals


Hans


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

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


Re: [NTG-context] columns and whitespace

2010-02-14 Thread Hans Hagen

On 14-2-2010 20:49, Wolfgang Werners-Lucchini wrote:

Hallo,

is it possible to get a half line space after paragraphs in columns?
The default is no space. And

\setupwhitespace[small]

produces a whole line of space.


halfline should work unless the grid is forced (although in mkiv 
different rules apply than in mkii)


Hans



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

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


Re: [NTG-context] [dev-context] t-letter/resume package

2010-02-14 Thread Wolfgang Schuster

Am 14.02.10 22:56, schrieb Jörg Hecke:

Hi Wolfgang,

I am trying to use your t-letter module. Thanks to your letter documentation 
and the examples (letter-examples.zip) from your web side I was able to set up 
the letter.

But I am failing to use the resume part:-(
I would like to use your classic or casual layout, but I have no idea how to 
use them.
   

I'm sorry but there is something missing in documentation, the resume part
is not really written and the two styles are just included from a older
module of me and you have to load them with

\usemodule[resume]  % load the module
\useresumeinterface[moderncv]   % load the moderncv-interface
\useresumestyle[classic|casual] % load a style

you can also do this with one command

\usemodule[resume][interface=moderncv,style=casual]

An excerpt from your file correspondence-resume-examples.tex:
   

I attached two complete working examples.

Is it possible to get me on the right track to use your module? I must be doing 
something really stupid, but currently I have no idea what I have to do to get 
your resume module running.
Do you have a minimal example perhaps?

The terminal output is:
   

(m-resume.tex)
 
You have a module with the m-resume.tex on your system which is loaded 
instead
of my module, you can now either remove this from the current directory 
or force
ConTeXT to load my module with '\usemodule[t][resume][...]' in your 
document.


Wolfgang



resumetest-casual.tex
Description: TeX document


resumetest-classic.tex
Description: TeX 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] Mathdesign and Fourier fonts (was What do you miss in ConTeXt?)

2010-02-14 Thread Mojca Miklavec
On Sun, Feb 14, 2010 at 20:06, Mikael Persson wrote:
 On Wed, Feb 10, 2010 at 3:24 PM, Wolfgang Schuster wrote:
 Am 10.02.10 09:00, schrieb Mikael Persson:

 MkIV has support for the Charter and the Mathdesign fonts.

 \definetypafec[charter][rm][serif][charter]     [default]
 %\definetypafec[charter][mm][math] [mathdesignch][default]
 \definetypafec[charter][mm][math] [charter]     [default]

 What's missing are the fonts but they are already on the server [1],
 Mojca should be able to tell you how you can install them.

 [1] http://minimals.contextgarden.net/current/fonts/extra/

 Wolfgang

 Thanks for your reply Wolfgang. I use the minimals and have some
 further questions:

 1) Is there any way to use first-setup.sh to install these fonts?

At the moment there is a switch
--extras=t-module1name,t-module2name

the following quick-and dirty patch should enable you to use
--extras=mathdesign

But then you need to convince Hans to apply the patch (or maybe
improve it before that):

if extras and type(extras) == table then
-- fetch the list of available modules from rsync server
local available_modules = get_list_of_files_from_rsync({modules/})
local available_fonts   = get_list_of_files_from_rsync({fonts/extra/})
-- hash of requested modules
-- local h = table.tohash(extras:split(,))
for _, s in ipairs(available_modules) do
--  if extras == all or h[s] then
if extras.all or extras[s] then
scripts.update.modules[#scripts.update.modules+1] = {
format(modules/%s/,s), texmf-context }
end
end
for _, s in ipairs(available_fonts) do
if extras.all or extras[s] then
scripts.update.modules[#scripts.update.modules+1] = {
format(fonts/extra/%s/,s), texmf }
end
end
-- TODO: check if every module from the list has been added and
issue warning otherwise
-- one idea to do it: remove every value from h once added and
then check if anything is left in h
end


 2) The type1 dir is empty. Is that on purpose? Should one download the
 pfb files from ctan?

No, it was a mistake. I had a fonts/*/public/mathdesign in pattern,
but mathdesign is not under public in TeX Live. Either I didn't test
it properly or TeX Live has changed their location, but the first
option is way more probable.

I have a feeling that some other font has been requested recently, but
I don't recall which one/who wrote that (I don't find the mail any
more).

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

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


Re: [NTG-context] [dev-context] t-letter/resume package

2010-02-14 Thread Jörg Hecke
Hi Wolfgang, 

Am 14.02.2010 um 23:22 schrieb Wolfgang Schuster:

 But I am failing to use the resume part:-(
 I would like to use your classic or casual layout, but I have no idea how to 
 use them.
   
 I'm sorry but there is something missing in documentation, the resume part
 is not really written and the two styles are just included from a older
 module of me and you have to load them with
 
 \usemodule[resume]  % load the module
 \useresumeinterface[moderncv]   % load the moderncv-interface
 \useresumestyle[classic|casual] % load a style
 
 you can also do this with one command
 
 \usemodule[resume][interface=moderncv,style=casual]
 You have a module with the m-resume.tex on your system which is loaded instead
 of my module, you can now either remove this from the current directory or 
 force
 ConTeXT to load my module with '\usemodule[t][resume][...]' in your document.


Many thanks for your prompt and brilliant help! Your examples do work right 
away! 
Will try to use one of your examples. 

Thanks again. 

Jörg


___
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] ntg-context Digest, Vol 68, Issue 57

2010-02-14 Thread Vyatcheslav Yatskovsky

Hello, Hans

i'm still reconsidering this ... maybe in mkiv we will have

- \setupbodyinterlinespace
- \switchtobodyinterlinespace

and \setupinterlinespace being local (or global till starttext)

Hans 


\setupbodyinterlinespace is probably what I needed. But I'm quite happy 
with current solution (line=xxpt) too.


Thanks.
B.R.,
Vyatcheslav
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Mathdesign and Fourier fonts (was What do you miss in ConTeXt?)

2010-02-14 Thread Aditya Mahajan

On Sun, 14 Feb 2010, Mojca Miklavec wrote:


I have a feeling that some other font has been requested recently, but
I don't recall which one/who wrote that (I don't find the mail any
more).


doublestroke 
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=doublestroke


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
___