Re: [NTG-context] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-13 Thread Hans Hagen

On 13-10-2011 02:30, Mojca Miklavec wrote:


Of course the user would have to make a conscious decision by enabling
this “beta” release.


And of course the user makes a conscious decision to either compile
from trunk if he wants the latest and greatest bugs and new features
or to wait patiently until Taco thinks the software is ready and
releases a beta.

I don't think that one extra week (or two or three or ... for that
matter) makes any difference.


Also, it's not a matter of enabling but more making a drastic move... 
there is a complete infrastructure for switching the underlying handling 
of numbers and if there are bugs in the common layer it will influence 
traditional mp methods too. As mplib is a core component of luatex/mkiv 
it is unlikely that there will be a beta that has not been tested by 
taco and me on a bunch of documents that we normally use for testing 
drastic changes.


Hans

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

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

[NTG-context] bug in latest beta

2011-10-13 Thread luigi scarso
On Wed, Oct 12, 2011 at 7:49 PM, Hans Hagen pra...@wxs.nl wrote:

 Hi,

 I uploaded a new beta. There are a few new things and some changes:

 Error
This is MetaPost, version 1.504 (kpathsea version 6.0.0)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
metafun.mp(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/metafun.mpii
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/mp-base.mpii
Preloading the plain mem file, version 0.63)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
mp-tool.mp)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/mp-spec.mpii)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/mp-core.mpii)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
mp-page.mp)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
mp-text.mp)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
mp-txts.mp)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
mp-shap.mp)
(/opt/luatex/standalone-2011/tex/texmf-context/metapost/context/base/
mp-butt.mp)
! I can't open file `mp-char.mpii'.
l.40 input mp-char.mpii
;
Please type another input file name:

-- 
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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-13 Thread Alan Braslau
On Thu, Oct 13, 2011 at 02:30:07AM +0200, Mojca Miklavec wrote:
 
 MetaPost doesn't know erf and other obscure functions

Metapost could possibly be extended to provide all of the functions
in the standard math library. In fact, it would be nice if there be
some hook to `link' to additional functions, written in C or in Fortran,
for example. (I regularly use the complex error function.)
Maybe this could be possible in luatex, made available to metapost
through some communication pipe?

Alan

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

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


Re: [NTG-context] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-13 Thread luigi scarso
On Thu, Oct 13, 2011 at 9:59 AM, Alan Braslau alan.bras...@cea.fr wrote:

 On Thu, Oct 13, 2011 at 02:30:07AM +0200, Mojca Miklavec wrote:
 
  MetaPost doesn't know erf and other obscure functions

 Metapost could possibly be extended to provide all of the functions
 in the standard math library. In fact, it would be nice if there be
 some hook to `link' to additional functions, written in C or in Fortran,
 for example. (I regularly use the complex error function.)
 Maybe this could be possible in luatex, made available to metapost
 through some communication pipe?

 yes, just build a binding for the library (or use something else like
cinvoke)
http://www.gust.org.pl/bachotex/2011-en/presentations/Scarso_2_2011
pag 15 or so
If I recall correctly, I've built a binding for gsl too.

-- 
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] bug in latest beta

2011-10-13 Thread Hans Hagen

On 13-10-2011 09:37, luigi scarso wrote:


l.40 input mp-char.mpii
 ;
Please type another input file name:


you can rename mp-flow to mp-char ... I'll do a new upload later today

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] bug in latest beta

2011-10-13 Thread luigi scarso
On Thu, Oct 13, 2011 at 12:49 PM, Hans Hagen pra...@wxs.nl wrote:

 On 13-10-2011 09:37, luigi scarso wrote:

  l.40 input mp-char.mpii
 ;
 Please type another input file name:


 you can rename mp-flow to mp-char ... I'll do a new upload later today

 hm, there is not *mp-flow* in my suite


-- 
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] Setting style and color attributes of label in metapost

2011-10-13 Thread Wolfgang Schuster

Am 25.09.2011 um 02:43 schrieb Aditya Mahajan:

 I am writing a module which uses metapost in the background for drawing. I 
 wanted to create an interface for setting the style and color of metapost 
 labels but using \doset...attributes is not working.
 
 Here is an example:
 
 \definenamespace
  [test]
  [style=yes,
   name=test,
   command=yes,
   setup=yes]
 
 \definetest
  [blue]
  [color=blue, text=Blue]
 
 \definetest
  [two]
  [blue]
  [style=\bold, text=Two]
 
 \starttext
 \edef\currenttest{two}
 \startMPdrawing
  label.lft(\sometxt{\dosettestattributes{style}{color}
  \testparameter{text}}, (0,0)) ;

You can use the old \doattributes command which is expandable.

label.lft(\sometxt{\doattributes{\currenttesthash}{style}{color}{\testparameter{text}}},(0,0))
 ;

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] nice friends-book with ConText

2011-10-13 Thread Jan Heinen

Hello,

I hope the answer is easier than the question :-)

I am a ConText-Newby and am struggeling with the huge amount 
of ConText-commands.


I want to make a little book with infos and fotos of our 
friends - and I am afraid, the nice layout I have in mind is 
to complicated or impossible with ConText - at least for me.


The book will have 40 pages and every page with the same 
layout. I have posted the layout I want to use as a .png to 
http://www.imagebanana.com/view/f4o3un2c/Entwurffriends.png


Which ConText-commands do I need for this layout? I tried 
\inmargin - without success.
\definelayer and \setlayerframed worked (a littlebit) - 
though the running text (beneath the headline) runs through 
the layer.


What seems the easiest way? layers, columns, ?

Maybe someone here has a little example which I can finetune.

Which hints can be given? I would be very happy about a 
rough structure of the context-code - I think then I am able 
to do the finetuning with the manuals.


I am working with Linux - so Indesign is no alternative for 
me :-)


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
___


[NTG-context] Latest Beta

2011-10-13 Thread Andreas Harder
Hello,

in some rare circumstances the enabled italic correction 
(\setupitaliccorrection[always]) cause the following error:
/tex/texmf-context/tex/context/base/typo-itc.lua:99: attempt to index 
local 'cd' (a nil value)

In needed I will try to make a minimal example.

I’ve asked it already, bun since I got no answer … Would it be possible to 
expand the the cross referencing mechanism, so that it would be possible to 
store the component files in a subfolder? Here is a test:
http://www.ntg.nl/pipermail/ntg-context/2011/062335.html


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


[NTG-context] Error in simpleslides style Swoosh

2011-10-13 Thread Marco
Hi,

the  presentation  template  “Swoosh”  behaves  weird  and
triggers an error.

• Use the example file generic-talk-15min-45min.tex
• Comment “style=BigNumber,”
• Uncomment “style=Swoosh,”

The log file is attached.

Workaround: First processing the file using another style,
then processing using “Swoosh” does not trigger the error.

Regards

Marco Patzer
(generic-talk-15min-45min.tex

ConTeXt  ver: 2011.09.06 17:46 MKIV  fmt: 2011.10.13  int: english/english

system   cont-new.mkiv loaded
(/usr/local/share/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   generic-talk-15min-45min.top loaded

system   options  start used options

used options % runtime options files (command line driven)
used options \unprotect
used options % feedback and basic job control
used options % handy for special styles
used options \startluacode
used options document = document or { }
used options document.arguments={
used options }
used options document.files={
used options  generic-talk-15min-45min,
used options }
used options \stopluacode
used options % process info
used options \setupsystem[inputfile=generic-talk-15min-45min]
used options \setupsystem[\c!n=2,\c!m=2]
used options % modes
used options % options (not that important)
used options \startsetups *runtime:options
used options \stopsetups
used options % styles and modules
used options \startsetups *runtime:modules
used options \stopsetups
used options % done
used options \protect \endinput

system   options  stop used options

(generic-talk-15min-45min.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
resolversmodules  loaded: 'simpleslides'
(/usr/local/share/context/tex/texmf-modules/tex/context/third/simpleslides/t-simpleslides.tex
loading  module simpleslides
resolversmodules  loaded: 'default'
(/usr/local/share/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-f-default.tex
simpleslides loading default font setup
(/usr/local/share/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (/usr/local/share/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile  asked name: 'loc', not found
(/usr/local/share/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/usr/local/share/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/share/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/usr/local/share/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map})
resolversmodules  loaded: 'default'
(/usr/local/share/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-s-default.tex
simpleslides loading default style setup
)
resolversmodules  not found: 'default'
resolversmodules  loaded: 'Swoosh'
(/usr/local/share/context/tex/texmf-modules/tex/context/third/simpleslides/simpleslides-s-Swoosh.tex
simpleslides loading Swoosh style
system   command \NormalHeight is already defined
system   command \NormalWidth is already defined
system   command \PictureFrameHeight is already defined
system   command \PictureFrameWidth is already defined
))
metapost initializing instance 'metafun' using format 'metafun'
metapost loading 'metafun': /usr/local/share/context/tex/texmf-context/metapost/context/base/metafun.mpiv
backend  xmp  using file '/usr/local/share/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1, subpage 1
pagesflushing realpage 2, userpage 2
 /usr/local/share/context/tex/texmf-context/tex/context/sample/cow.pdf
pagesflushing realpage 3, userpage 3
pagesflushing realpage 4, userpage 4
pagesflushing realpage 5, userpage 5
pagesflushing realpage 6, userpage 6
pagesflushing realpage 7, userpage 7
pagesflushing realpage 8, userpage 8
pagesflushing realpage 9, userpage 9

Overfull \hbox (1.56096pt too wide) in paragraph at lines 177--177
 [][] 

\hbox(306.75749+0.0)x243.59088, direction TLT
.\glue(\leftskip) 0.0 plus 121.79544
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\vbox(306.75749+0.0)x245.15184, direction TLT
..\hbox(306.75749+0.0)x245.15184, glue set 245.15184fil, direction TLT
...\hbox(306.75749+0.0)x0.0, direction TLT []
...\hbox(306.75749+0.0)x0.0, direction TLT []
...\glue 0.0 plus 1.0fil minus 1.0fil
.\penalty 1
.\glue(\parfillskip) 0.0
.etc.

 /usr/local/share/context/tex/texmf-context/tex/context/sample/mill.png
pagesflushing realpage 10, userpage 10
pagesflushing realpage 11, userpage 11
 

Re: [NTG-context] Error in simpleslides style Swoosh

2011-10-13 Thread Thomas A. Schmitz

On 10/13/2011 04:30 PM, Marco wrote:

Hi,

the  presentation  template  “Swoosh”  behaves  weird  and
triggers an error.

• Use the example file generic-talk-15min-45min.tex
• Comment “style=BigNumber,”
• Uncomment “style=Swoosh,”

The log file is attached.

Workaround: First processing the file using another style,
then processing using “Swoosh” does not trigger the error.

Regards

Marco Patzer


Amazing that you found this workaround :-) It's a really weird bug. 
We're aware of the problem, it occurs with the dot counter. Aditya 
said he'd look into it if he finds some time, I'm at my wit's end. 
Thanks for the report!


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

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


Re: [NTG-context] Error in simpleslides style Swoosh

2011-10-13 Thread Hans Hagen

On 13-10-2011 16:49, Thomas A. Schmitz wrote:

On 10/13/2011 04:30 PM, Marco wrote:

Hi,

the presentation template “Swoosh” behaves weird and
triggers an error.

• Use the example file generic-talk-15min-45min.tex
• Comment “style=BigNumber,”
• Uncomment “style=Swoosh,”

The log file is attached.

Workaround: First processing the file using another style,
then processing using “Swoosh” does not trigger the error.

Regards

Marco Patzer


Amazing that you found this workaround :-) It's a really weird bug.
We're aware of the problem, it occurs with the dot counter. Aditya
said he'd look into it if he finds some time, I'm at my wit's end.
Thanks for the report!


probably something messy with multipass data then (not enough checking 
or so)


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

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


Re: [NTG-context] Error in simpleslides style Swoosh

2011-10-13 Thread Thomas A. Schmitz

On 10/13/2011 05:01 PM, Hans Hagen wrote:

probably something messy with multipass data then (not enough checking
or so)


That's probably the case; I may have created a condition that 
mplib/context can't solve: I want a slightly randomized path and an 
intersectionpoint with a progress meter to draw a counter on that path. 
But I wanted to make everything configurable and may have made the code 
so complex that I don't understand it myself any more...


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

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


Re: [NTG-context] Error in simpleslides style Swoosh

2011-10-13 Thread luigi scarso
On Thu, Oct 13, 2011 at 5:07 PM, Thomas A. Schmitz 
thomas.schm...@uni-bonn.de wrote:


 That's probably the case; I may have created a condition that mplib/context
 can't solve: I want a slightly randomized path and an intersectionpoint with
 a progress meter to draw a counter on that path. But I wanted to make
 everything configurable and may have made the code so complex that I don't
 understand it myself any more...

quite normal, with TeX
-- 
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
___

[NTG-context] \startmode and \ignorespaces

2011-10-13 Thread Hans van der Meer
A little while ago I asked whether \doifmode and friends should have an 
\ignorespaces at the end. Hans Hagen answered no and after some reasoning 
(probably along the same lines as his) I agree with him. Thus one uses in a 
quite natural way:
   some text\doifmode{xyz}{ conditional text} following text
doing nothing else than: some text conditional text following text.
With regard to this it is understandable and correct that extra space is taken 
in the next construct:
   some text \doifmode{xyz}{ conditional text} following text.

But it looks different to me when using the \startmode .. \stopmode pair.
 some text.
\startmode[xyz]
some conditional text.
\stopmode
further text.

In order to avoid here the extra space one has to code an extra %
 some text.
\startmode[xyz]%
some conditional text.
\stopmode
further text.

or (not preferred imho):
 some text.%
\startmode[xyz]

I think this is error prone as it is al too easy to forget the %. The situation 
here differs from the \doifmode-case. I tend to believe that the fact that the 
\startmode[] .. \stopmode construct invites one to separate the statements with 
newlines (whitespace thus). Therefore I would ask if this plea for an 
\ignorespaces effect at the end of the \startmode[xyz] should be honored.

Hans van der Meer

___
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] nice friends-book with ConText

2011-10-13 Thread Willi Egger
Hi Jan,

I would say that in this case the answer might be more elaborate than you 
think. Still, looking at your design I would advise to go for layers. If I 
understand your comments correctly, then the problems may be caused by the 
definitions you used. 

I have here a small application for producing CD/DVD labels, booklets and 
jewel-case inlays. 
I send you the files directly. May be this helps to get grip on the matter.

Kind regards

Willi
On 13 Oct 2011, at 14:13, Jan Heinen wrote:

 Hello,
 
 I hope the answer is easier than the question :-)
 
 I am a ConText-Newby and am struggeling with the huge amount of 
 ConText-commands.
 
 I want to make a little book with infos and fotos of our friends - and I am 
 afraid, the nice layout I have in mind is to complicated or impossible with 
 ConText - at least for me.
 
 The book will have 40 pages and every page with the same layout. I have 
 posted the layout I want to use as a .png to 
 http://www.imagebanana.com/view/f4o3un2c/Entwurffriends.png
 
 Which ConText-commands do I need for this layout? I tried \inmargin - without 
 success.
 \definelayer and \setlayerframed worked (a littlebit) - though the running 
 text (beneath the headline) runs through the layer.
 
 What seems the easiest way? layers, columns, ?
 
 Maybe someone here has a little example which I can finetune.
 
 Which hints can be given? I would be very happy about a rough structure of 
 the context-code - I think then I am able to do the finetuning with the 
 manuals.
 
 I am working with Linux - so Indesign is no alternative for me :-)
 
 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
 ___

___
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] Interpreting MathJax HTML in MKIV

2011-10-13 Thread Hans Hagen

On 13-10-2011 19:49, Mojca Miklavec wrote:

Hello,

I would like to manually create some HTML which would be displayed
nicely in both HTML and PDF (using MKIV for conversion from HTML). To
a certain degree I'm able to fake mathematics with

span class=mathspan class=letterax/spansup2/sup  +span
class=letterbx/span  +span class=letterc/span  = 0/span

wherespan class=math  signals TeX to use \mathematics{...} and
span class=letter  signals web browser that the letter has to be
displayed in italic (I could use class=math, but this would also
make numbers italic).

But this is very cumbersome to write. MathJax offers an excellent way
to enter math formulas in an easy way (see attached HTML), but I'm not
sure how I could convince the XML parser to treat contents literally.
Any ideas?


$\xmlflushcontext{#1}$

another option is to use asciimath which is supported by the mathml 
module as annotation type


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] bug in latest beta

2011-10-13 Thread Hans Hagen

On 13-10-2011 09:37, luigi scarso wrote:


Please type another input file name:


A new beta ... better check mp code as I've split all mkii/mkiv mp 
related code (i.e. metafun ii is frozen and metafun iv will be 
mainstream). I might have messed when cleaning up the code.


Hans


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

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


[NTG-context] missing html entities in latest ConTeXt

2011-10-13 Thread Mojca Miklavec
When processing HTML with TeX Live 2011, all the entities are nicely
converted into corresponding characters.

With latest version of ConTeXt I get literal le instead of ≤ for
le; or hellip instead of ... for hellip;

I will try to send a minimal version (the one I sent with MathJax can
probably serve as a good starting point).

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] Interpreting MathJax HTML in MKIV

2011-10-13 Thread Mojca Miklavec
On Thu, Oct 13, 2011 at 21:44, Hans Hagen wrote:
 On 13-10-2011 19:49, Mojca Miklavec wrote:

 Hello,

 I would like to manually create some HTML which would be displayed
 nicely in both HTML and PDF (using MKIV for conversion from HTML). To
 a certain degree I'm able to fake mathematics with

 span class=mathspan class=letterax/spansup2/sup  +span
 class=letterbx/span  +span class=letterc/span  = 0/span

 wherespan class=math  signals TeX to use \mathematics{...} and
 span class=letter  signals web browser that the letter has to be
 displayed in italic (I could use class=math, but this would also
 make numbers italic).

 But this is very cumbersome to write. MathJax offers an excellent way
 to enter math formulas in an easy way (see attached HTML), but I'm not
 sure how I could convince the XML parser to treat contents literally.
 Any ideas?

 $\xmlflushcontext{#1}$

But how do I catch the expression that has to be interpreted that
way? (I sent an attachment as example.)

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] missing html entities in latest ConTeXt

2011-10-13 Thread Mojca Miklavec
On Thu, Oct 13, 2011 at 21:51, Mojca Miklavec wrote:
 When processing HTML with TeX Live 2011, all the entities are nicely
 converted into corresponding characters.

 With latest version of ConTeXt I get literal le instead of ≤ for
 le; or hellip instead of ... for hellip;

 I will try to send a minimal version (the one I sent with MathJax can
 probably serve as a good starting point).

And here is the minimal example that works with TL 2011. Well, the
le; and ge; don't work with LM, but they work fine with Iwona (TL
2011). In latest version no entity works.

\startbuffer[test]
html
Here are some entities like le; ge; ccaron; hellip;
/html
\stopbuffer

\startxmlsetups all:html
\xmlsetsetup{main}{}{*}
\stopxmlsetups

\xmlregistersetup{all:html}

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

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
___

[NTG-context] bug: wrong subject name in headertext

2011-10-13 Thread Mojca Miklavec
Hello,

the following example might not be the most minimal possible example,
but I hope that it is short enough. I'm using
\setupheadertexts
[]
[subject]
to print subject into header, but the headers are screwed up in some
very weird way. My real document behaves differently that this minimal
example, but even here one can notice that headers say:
- This is first heading
- This is fourth heading
- This is second heading
- This is fourth heading
instead of getting the second heading.

Does anyone have any idea what is going on?

Thank you,
   Mojca



\startbuffer[test1]
html
body
h1This is first heading/h1
psome text/p
h1This is second heading/h1
psome text/p
/body
/html
\stopbuffer

\startbuffer[test2]
html
body
h1This is third heading/h1
psome text/p
h1This is fourth heading/h1
psome text/p
/body
/html
\stopbuffer

\startxmlsetups all:html
\xmlsetsetup{main}{h1}{*}
\stopxmlsetups

\startxmlsetups h1
\subject{\ignorespaces\xmlflush{#1}}
\stopxmlsetups

\xmlregistersetup{all:html}

\setuphead
[subject]
[style=\bfa,
 page=odd]
\setupheadertexts
[]
[subject]

\starttext
I have some text first
\xmlprocessbuffer{main}{test1}{}
\xmlprocessbuffer{main}{test2}{}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] bug: wrong subject name in headertext

2011-10-13 Thread Wolfgang Schuster

Am 13.10.2011 um 22:10 schrieb Mojca Miklavec:

 Hello,
 
 the following example might not be the most minimal possible example,
 but I hope that it is short enough. I'm using
\setupheadertexts
[]
[subject]
 to print subject into header, but the headers are screwed up in some
 very weird way. My real document behaves differently that this minimal
 example, but even here one can notice that headers say:
 - This is first heading
 - This is fourth heading
 - This is second heading
 - This is fourth heading
 instead of getting the second heading.

Add “expansion=yes” to \setuphead.

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] bug: wrong subject name in headertext

2011-10-13 Thread Mojca Miklavec
On Thu, Oct 13, 2011 at 22:19, Wolfgang Schuster wrote:
 Am 13.10.2011 um 22:10 schrieb Mojca Miklavec:

 Hello,

 the following example might not be the most minimal possible example,
 but I hope that it is short enough. I'm using
    \setupheadertexts
        []
        [subject]
 to print subject into header, but the headers are screwed up in some
 very weird way. My real document behaves differently that this minimal
 example, but even here one can notice that headers say:
 - This is first heading
 - This is fourth heading
 - This is second heading
 - This is fourth heading
 instead of getting the second heading.

 Add “expansion=yes” to \setuphead.

Thank you. Black magic worked.


Assuming that one would want to explain that option in reference
manual - what would be some short and clear explanation? When do I
need to use expansion?

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] Include section number in reference

2011-10-13 Thread Marco
Does anyone have an idea?

What I  do at the moment  is that I manually  reference my
sections. But  I'm convinced, there's a  neat solution for
that.


Regards

Marco Patzer


___
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] Include section number in reference

2011-10-13 Thread Wolfgang Schuster

Am 13.10.2011 um 22:36 schrieb Marco:

 Does anyone have an idea?
 
 What I  do at the moment  is that I manually  reference my
 sections. But  I'm convinced, there's a  neat solution for
 that.

\setupreferencestructureprefix[default][prefixsegments=2:*]

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] missing html entities in latest ConTeXt

2011-10-13 Thread Mojca Miklavec
Also,
 [bdquo]=0x0201E,
is missing in math-ent.lua/char-ent.lua (but char-ent.lua doesn't seem
to work properly anyway).

I didn't do extensive checking of what else might be missing, but the
entity can be found here:
http://www.w3.org/TR/html4/sgml/entities.html
with a tag NEW.

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] bug: wrong subject name in headertext

2011-10-13 Thread Hans Hagen

On 13-10-2011 22:35, Mojca Miklavec wrote:

On Thu, Oct 13, 2011 at 22:19, Wolfgang Schuster wrote:

Am 13.10.2011 um 22:10 schrieb Mojca Miklavec:


Hello,

the following example might not be the most minimal possible example,
but I hope that it is short enough. I'm using
\setupheadertexts
[]
[subject]
to print subject into header, but the headers are screwed up in some
very weird way. My real document behaves differently that this minimal
example, but even here one can notice that headers say:
- This is first heading
- This is fourth heading
- This is second heading
- This is fourth heading
instead of getting the second heading.


Add “expansion=yes” to \setuphead.


Thank you. Black magic worked.


Assuming that one would want to explain that option in reference
manual - what would be some short and clear explanation? When do I
need to use expansion?


it is also a side effects of using buffers

say that you do

\startsection[title=\xmlflush{#1}]

in fact what you then get is a reference to an xml node and that one is 
quite likely gone when you finish typesetting the buffer (that is, there 
is then a reference to a non existing node or maybe another one if you 
use the same buffer with some other xml) ; you can peek in the tuc file 
to see this in action


expansion will take the content but this also can have a side effect 
i.e. there can be nested elements


there are couple of options to deal with this (including piping back
snippets) and to some extend there is tracking of this

(mixing tex and xml in this way will always remain somewhat tricky)

eventually all this will be (and some already is) in the xml mkiv manual 
but ... it takes time ...


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] missing html entities in latest ConTeXt

2011-10-13 Thread Hans Hagen

On 13-10-2011 21:59, Mojca Miklavec wrote:

On Thu, Oct 13, 2011 at 21:51, Mojca Miklavec wrote:

When processing HTML with TeX Live 2011, all the entities are nicely
converted into corresponding characters.

With latest version of ConTeXt I get literal le instead of ≤ for
le; or hellip instead of ... forhellip;

I will try to send a minimal version (the one I sent with MathJax can
probably serve as a good starting point).


And here is the minimal example that works with TL 2011. Well, the
le; andge; don't work with LM, but they work fine with Iwona (TL
2011). In latest version no entity works.


weird, i'll look into it


-
  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] nice friends-book with ConText

2011-10-13 Thread Jan Heinen

Step by Step I'm going forward.

This shuld be the result, when I am ready: 
http://www.imagebanana.com/view/f4o3un2c/Entwurffriends.png


At the moment I try to get the foto into a layer.
Though the layer is definded as 30x40mm and the foto as well 
- the foto does not fit into the layer: the layer is a bit 
bigger.


See here: 
http://www.imagebanana.com/view/29611n9s/FotoinLayer.png


And here is what I did:

\definelayer[Kontaktdaten][x=50mm,y=150mm,width=30mm,height=40mm,state=start] 
% size is ignored!

\setupbackgrounds[paper][setups=ALayer,background=Kontaktdaten,state=start]
\starttext
\strut
\setlayerframed[Kontaktdaten][frame=on,hoffset=0mm,voffset=0mm,align=left]
{
  {\externalfigure[jkopp][width=30mm][height=40mm]}
}
\stoptext


How can I fit the foto exactly into the layer?
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] nice friends-book with ConText

2011-10-13 Thread Jan Heinen
With the change to [strut=no,offset=overlay] the result 
looks a litlebit better. Though there is still whitespace to 
the left and to the right.


\definelayer[Kontaktdaten][x=50mm,y=150mm,width=30mm,height=40mm,state=start] 
% size is ignored!

\setupbackgrounds[paper][setups=ALayer,background=Kontaktdaten,state=start]
\starttext
\strut
\setlayerframed[Kontaktdaten][frame=on,hoffset=0mm,voffset=0mm][strut=no,offset=overlay]   
%  look here

{
  {\externalfigure[jkopp][width=30mm][height=40mm]}
}
\stoptext

Look here: 
http://www.imagebanana.com/view/ksjzn63e/FotoinLayer.png


Janis



Am 14.10.2011 00:22, schrieb Mojca Miklavec:

\setlayerframed[Kontaktdaten][frame=on,hoffset=0mm,voffset=0mm,align=left]

strut=no,offset=overlay

align=left doesn't do what you want it to do.

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] nice friends-book with ConText

2011-10-13 Thread Wolfgang Schuster

Am 14.10.2011 um 00:56 schrieb Jan Heinen:

 With the change to [strut=no,offset=overlay] the result looks a litlebit 
 better. Though there is still whitespace to the left and to the right.
 
 \definelayer[Kontaktdaten][x=50mm,y=150mm,width=30mm,height=40mm,state=start] 
 % size is ignored!
 \setupbackgrounds[paper][setups=ALayer,background=Kontaktdaten,state=start]
 \starttext
 \strut
 \setlayerframed[Kontaktdaten][frame=on,hoffset=0mm,voffset=0mm][strut=no,offset=overlay]
%  look here
 {
  {\externalfigure[jkopp][width=30mm][height=40mm]}
 }

You have a space here between the first two left braces and also one between 
the two right braces, remove the outer braces and write

  \setlayerframed[…][…][…]
{\externalfigure[…]}

to get rid of the spaces.

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] about \startstructureblockenvironment

2011-10-13 Thread Jeong Dalyoung
Dear Wolfgang,


 
 There is an error message, undefined control sequence as below when I use 
 \startstructureblockenvironment:
 
 Use \startsectionblockenvironment.
 

After changing structureblock to sectionblock, it works fine.
And, I see that the wiki is already changed.

Thank you.
Best regards,

Dalyoung


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