Re: [NTG-context] Lua error

2011-01-06 Thread Wolfgang Schuster

Am 06.01.2011 um 07:52 schrieb Khaled Hosny:

 I get the following error with current beta (did not happen few betas
 ago):
 ! LuaTeX error
 ...text/tex/texmf-context/tex/context/base/strc-mar.lua:512: attempt to get 
 length of upvalue 'topofstack' (a number value)
 stack traceback:
...text/tex/texmf-context/tex/context/base/strc-mar.lua:512: in 
 function ...text/tex/texmf-context/tex/context/base/strc-mar.lua:511
...text/tex/texmf-context/tex/context/base/strc-mar.lua:517: in 
 function 'fetched'
...text/tex/texmf-context/tex/context/base/strc-mar.lua:555: in 
 function 'fetchonemark'
...text/tex/texmf-context/tex/context/base/strc-mar.lua:584: in 
 function 'getmarking'
main ctx instance:1: in main chunk.
 
 Just removing the # from #topofstack on that line should do it.
 
 (sorry no minimal example, it is rather a large file and I'm not sure
 what is triggering the error).

The error is caused by the marking mechanism, i.e. \getmarking or 
\setupheadertexts[chapter][section] is the culprit.

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] Handling EMBED tag in Tex

2011-01-06 Thread Wolfgang Schuster

Am 06.01.2011 um 04:42 schrieb Anand Raj:

 Hi,
 
 I have embed tags in my xhtml can i render it in my pdf. 
 
 How should I form the .tex file to handle this?
 
 embed type='image/svg+xml' align='middle' width='200' height='200' 
 src='/javascript/d.svg' 
 script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],44,above);text([3.5,2],44,right);stroke=red;fontfill=red;line([1,0],[1,4]);text([1,2],?,right);'
  /

Write the whole block to a external file and read import it them with 
\externalfigure.

\startxmlsetups xml:embed
   \setbuffer[embed]\xmlflush{#1}\endbuffer
   \savebuffer[embed][embed.svg]
   \externalfigure[embed.svg]
\stopxmlsetups

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] \insection broken??

2011-01-06 Thread Wolfgang Schuster

Am 05.01.2011 um 22:26 schrieb Steffen Wolfrum:

 Hi,
 
 using the 31/12/10 version I have problems with reference \insection[...]:
 
 ! Undefined control sequence.
 l.40 Zur Terminologie, vgl. \insection
  [Ref217459429].
 
 
 
 What's this?

As the message says context don’t know a command with the name \insection,
the only reference to the command in the source is in the file s-chi-00.tex
which is used in mkii for chinese:

\definereferenceformat [insection] [\c!label=\v!section]

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] [OT] Public Fonts for Minority Languages of Russia

2011-01-06 Thread Hans Hagen

On 6-1-2011 12:55, luigi scarso wrote:

On Wed, Jan 5, 2011 at 10:52 PM, Khaled Hosnykhaledho...@eglug.org  wrote:

http://texnik.dante.de/misc/PTSerif.pdf

Fast Web View : Yes
How did you done with mkiv ?


pdfopt from GS?

http://texnik.dante.de/misc/PTSerif.pdf
seems to be done with context directly, without postprocessing with ghostscript


sure,

\usemodule[fnt-31]

\setupbodyfont[10pt]

\setuplayout
  [backspace=1cm,
   topspace=1cm,
   footer=1cm,
   header=0cm,
   height=middle,
   width=middle]

\starttext

\startluacode
fonts.tracers.coverage {
file:PTF55F.ttf,
file:PTF56F.ttf,
file:PTF75F.ttf,
file:PTF76F.ttf,
file:PTZ55F.ttf,
file:PTZ56F.ttf,
}
\stopluacode

\stoptext

I'll add s-fnt-31 to the next beta.

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] Handling EMBED tag in Tex

2011-01-06 Thread Hans Hagen

On 6-1-2011 9:02, Wolfgang Schuster wrote:


Am 06.01.2011 um 04:42 schrieb Anand Raj:


Hi,

I have embed tags in my xhtml can i render it in my pdf.

How should I form the .tex file to handle this?

embed type='image/svg+xml' align='middle' width='200' height='200' src='/javascript/d.svg' 
script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],44,above);text([3.5,2],44,right);stroke=red;fontfill=red;line([1,0],[1,4]);text([1,2],?,right);'
 /


Write the whole block to a external file and read import it them with 
\externalfigure.

\startxmlsetups xml:embed
\setbuffer[embed]\xmlflush{#1}\endbuffer
\savebuffer[embed][embed.svg]
\externalfigure[embed.svg]
\stopxmlsetups


remind me to make a \xmltofile some time

-
  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] Handling EMBED tag in Tex

2011-01-06 Thread Anand Raj
Yes. the svg content is not stored in the embed.svg.

can you make it?

Thanks

On Thu, Jan 6, 2011 at 5:28 PM, Hans Hagen pra...@wxs.nl wrote:

 On 6-1-2011 9:02, Wolfgang Schuster wrote:


 Am 06.01.2011 um 04:42 schrieb Anand Raj:

  Hi,

 I have embed tags in my xhtml can i render it in my pdf.

 How should I form the .tex file to handle this?

 embed type='image/svg+xml' align='middle' width='200' height='200'
 src='/javascript/d.svg'
 script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],44,above);text([3.5,2],44,right);stroke=red;fontfill=red;line([1,0],[1,4]);text([1,2],?,right);'
 /


 Write the whole block to a external file and read import it them with
 \externalfigure.

 \startxmlsetups xml:embed
\setbuffer[embed]\xmlflush{#1}\endbuffer
\savebuffer[embed][embed.svg]
\externalfigure[embed.svg]
 \stopxmlsetups


 remind me to make a \xmltofile some time

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


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

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

 ___

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

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


Re: [NTG-context] [OT] Public Fonts for Minority Languages of Russia

2011-01-06 Thread Martin Schröder
2011/1/6 Hans Hagen pra...@wxs.nl:
 \usemodule[fnt-31]

And what magic generates the linearized pdf?

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
___


Re: [NTG-context] \insection broken??

2011-01-06 Thread Steffen Wolfrum

Am 06.01.2011 um 09:04 schrieb Wolfgang Schuster:

 
 Am 05.01.2011 um 22:26 schrieb Steffen Wolfrum:
 
 Hi,
 
 using the 31/12/10 version I have problems with reference \insection[...]:
 
 ! Undefined control sequence.
 l.40 Zur Terminologie, vgl. \insection
 [Ref217459429].
 
 
 
 What's this?
 
 As the message says context don’t know a command with the name \insection,
 the only reference to the command in the source is in the file s-chi-00.tex
 which is used in mkii for chinese:
 
 \definereferenceformat [insection] [\c!label=\v!section]



... ahh, now it's clear why the current version (MkIV!) doesn't know it :o)


Thanks for the tip Wolfgang!

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] [OT] Public Fonts for Minority Languages of Russia

2011-01-06 Thread Hans Hagen

On 6-1-2011 10:37, Martin Schröder wrote:

2011/1/6 Hans Hagenpra...@wxs.nl:

\usemodule[fnt-31]


And what magic generates the linearized pdf?



probably a save as

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] Lua error

2011-01-06 Thread Hans Hagen

On 6-1-2011 8:57, Wolfgang Schuster wrote:


Just removing the # from #topofstack on that line should do it.


ok, fixed

-
  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] What has happened to externalfigure command?

2011-01-06 Thread Verhaag, G.C.H.M.

Hi,

I'm struggling to get an older ConTeXt file that worked well under 
TeXLive 2008, but not any more with ConTeXt minimals!


I've installed the ConTeXt minimals (Mark IV!) (MTXrun | current 
version: 2010.07.30 11:35) recently.


I've a file someplot.1 in a directory called /home/somewhere. The 
ConTeXt source file contains the command:


\setupexternalfigures
 [directory={/home/somewhere}]

in the preamble.

The image file is called using:

\leftaligned{\externalfigure[someplot.1][scale=100]}

But no image is presented in the generated pdf-file! However, all 
jpg-type of images that I use in the document - using similar commands - 
are all rendered correctly!


What's wrong? Anybody any idea?

Regards,
Gerard Verhaag
___
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] still struggling with footnotes

2011-01-06 Thread Hans Hagen

something like this

\enabletrackers[structures.notes]

\setupnotedefinition[footnote][location=left,distance=1em,hang=4,headalign=flushright]

\startluacode
local n, ranges, pages = 0, { }, { }
for k, v in ipairs(structures.lists.collected) do
if v.metadata.kind == description and v.metadata.name == 
footnote then

local realpage = v.references.realpage
local number = v.numberdata.numbers[1]
local range = ranges[realpage]
if not range then
range = { min = 0, max = 0 }
ranges[realpage] = range
end
if number  range.min then
range.min = number
end
if number  range.max then
range.max = number
end
pages[number] = range
end
end
function document.dosomething()
n = n + 1
local range = pages[n]
if range then
context.setupnotedefinition(
{ footnote },
{  sample = range.max }
)
end
end
\stopluacode

\appendtoks
\ctxlua{document.dosomething()}
\to \everybeforenoteinsert

\showframe

\starttext
\dorecurse {200} {test\footnote{test} }
\stoptext


-
  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] Handling EMBED tag in Tex

2011-01-06 Thread Wolfgang Schuster

Am 06.01.2011 um 10:32 schrieb Anand Raj:

 Yes. the svg content is not stored in the embed.svg.
 
 can you make it?

You you at least give a few information, the thing you’re telling
is that my example doesn’t work but you don’t tell how you integrated
it in your own setups.

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] Omega not recognized in asciimath module

2011-01-06 Thread Hans Hagen

On 5-1-2011 3:38, Anand Raj wrote:

Hi,

I have a problem in displaying the omega symbols.

*xhtml *contains

br/
Suppose thatam  S = 20 Omega , T = 41 Omega  and  U =O84 omega/am.
br/

*tex *contains

\startxmlsetups xml:am
 \expanded{\asciimath{\xmltext{#1}{.}}}
\stopxmlsetups

But the Omega symbol is not rendered in the pdf.

Can anyone help me?


not without a complete minimal example


-
  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] updating in texlive

2011-01-06 Thread Hans Hagen

On 2-1-2011 10:15, Thomas Schmitz wrote:


(the last line is not present in the log from texlive). I don't see
anything wrong in cont-en.log, so I wonder how I can find out why the
patterns are not applied?


\enabletrackers[languages.patterns]

-
  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] MPtoPDF problem

2011-01-06 Thread Michal Kvasnička
Hallo.

Few days ago I migrated to Ubuntu 10.10 (Linux) and last stable ConTeXt
minimals (2010.07.30 11:35 MKII) (from very old ConTeXt version). Now I
found I can't run mptopdf:

Command
  mptopdf chart.1
just prints chart.1 and an empty line

Command
  mtxrun --script mptopdf chart.1
fails with these complaints:

This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)
 \write18 enabled.
entering extended mode
[MP to PDF]
(./charts08.1{/home/qasar/programy/context_stable/tex/texmf/fonts/m
ap/pdftex/plain/pdftex.map}) [1]
!pdfTeX error: pdftex (file lmmi9): Font lmmi9 at 600 not found
 == Fatal error occurred, no output PDF file produced!

MPtoPDF 1.4.0 : error while processing tex file

And command

  mtxrun --script mptopdf chart.mp

starts to compile something, than reports that it cannot write the log file
and asks for another file name, and eventually fails with the same
complaints as above.

Can you possibly tell me what to do? Many thanks.

Best wishes,
Michal Kvasnicka
___
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] \getmarking notworking?

2011-01-06 Thread Khaled Hosny

The following used to work (still working in texlive) but no longer
working (latest minimals), I get the page number and the rule but not
the text. Bug?

\setuppagenumbering
  [alternative=doublesided,
   location=]

\setupheadertexts
  []
  [\setups{text:header:odd}]
  [\setups{text:header:even}]
  []

\startsetups text:header:odd
  \getmarking[chapter][current]
  \quad\vrule\quad
  \pagenumber
\stopsetups

\startsetups text:header:even
  \pagenumber
  \quad\vrule\quad
  \getmarking[section][current]
\stopsetups

\starttext
\chapter{Chapter}
\dorecurse{10}
{
  \section{Section}
  \input knuth
  \page
}
\stoptext

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] \getmarking notworking?

2011-01-06 Thread Hans Hagen

On 6-1-2011 4:04, Khaled Hosny wrote:


The following used to work (still working in texlive) but no longer
working (latest minimals), I get the page number and the rule but not
the text. Bug?


sort of ... chapter refers to a section-* name so we need to get the 
parent:


methods[v_current] = function(name,range)
local top = stack[topofstack]
return top and top[parentname(name)] or 
end

(you know where to patch this)

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] still struggling with footnotes

2011-01-06 Thread Achim Jander

Hi Hans,
your're a genious, thats so great! Thank you very very much!
While testing and adapting the code, there are two questions still:

I changed
   pages[number] = range
to
   local order =  v.references.order
pages[order] = range

and accordingly

function document.dosomething()
  local n = structures.notes.getn(footnote,n)

which seems to work, but it would be nice if you could confirm my 
suggestion that these two values are equal.


The other question:
As far as I can understand, structures.lists.collected seems to be 
filled before any typesetting is done yet???
Could you give me some enlightment about that or is it simply the 
ConTeXt magic?


Thank you once again,
Greetings
Achim


Am 06.01.2011 14:49, schrieb Hans Hagen:

something like this

\enabletrackers[structures.notes]

\setupnotedefinition[footnote][location=left,distance=1em,hang=4,headalign=flushright] 



\startluacode
local n, ranges, pages = 0, { }, { }
for k, v in ipairs(structures.lists.collected) do
if v.metadata.kind == description and v.metadata.name == 
footnote then

local realpage = v.references.realpage
local number = v.numberdata.numbers[1]
local range = ranges[realpage]
if not range then
range = { min = 0, max = 0 }
ranges[realpage] = range
end
if number  range.min then
range.min = number
end
if number  range.max then
range.max = number
end
pages[number] = range
end
end
function document.dosomething()
n = n + 1
local range = pages[n]
if range then
context.setupnotedefinition(
{ footnote },
{  sample = range.max }
)
end
end
\stopluacode

\appendtoks
\ctxlua{document.dosomething()}
\to \everybeforenoteinsert

\showframe

\starttext
\dorecurse {200} {test\footnote{test} }
\stoptext


-
  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] \getmarking notworking?

2011-01-06 Thread Khaled Hosny
On Thu, Jan 06, 2011 at 04:53:16PM +0100, Hans Hagen wrote:
 On 6-1-2011 4:04, Khaled Hosny wrote:
 
 The following used to work (still working in texlive) but no longer
 working (latest minimals), I get the page number and the rule but not
 the text. Bug?
 
 sort of ... chapter refers to a section-* name so we need to get the
 parent:
 
 methods[v_current] = function(name,range)
 local top = stack[topofstack]
 return top and top[parentname(name)] or 
 end

Thanks, works now.

 (you know where to patch this)

Indeed :)

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] Determining available fonts

2011-01-06 Thread Tom
\showbodyfont  \showbodyfontenvironment display details about a single
font. Which command lists or otherwise identifies fonts available for use on
a Tex Live MKII system? I want to find out what fonts have been loaded onto
my system. These would most likely be the standard fonts included with the
on-line download. The documentation shows me how to load additional fonts
but I don't yet know what is there by default.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey





___
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 with reference ?

2011-01-06 Thread Steffen Wolfrum
Hi,

when the lowest section is defined with sectionstarter=(
then the entire reference gets ( instead of only the actual section:


The example below gives ...
 (1. (1) 1. (1)

...but the right way would be
1. (1) 1. (1)



Did I make a mistake or is there a bug?

Steffen
---

\starttext

\setupreferencestructureprefix[default][prefixsegments=2:100]
\definestructureseparatorset  [default][,,{. (},{) },{. (}][ ]

\setupstructurehead[section] 
[sectionstarter=,sectionstopper=.,sectionsegments=3:3]
\setupstructurehead[subsection]  
[sectionstarter=(,sectionstopper=),sectionsegments=4:4]
\setupstructurehead[subsubsection]   
[sectionstarter=,sectionstopper=.,sectionsegments=5:5]
\setupstructurehead[subsubsubsection][sectionstarter=(,sectionstopper=),sectionsegments=6:6]

\section {One}

\subsection{Two}

\subsubsection[sectest]{Three}

\subsubsubsection[subsectest]{Four}

See in Three \in[sectest] and in Four \in[subsectest] as well.

\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 with reference ?

2011-01-06 Thread Steffen Wolfrum




Sure ... an alternative might be to include the various starter/stopper in the 
conversion:

\define[1]\EbeneDreiConversion  {§\,\numbers{#1}}
\define[1]\EbeneVierConversion  {\Characters{#1}.}
...
\defineconversion [ebenedrei]   [\EbeneDreiConversion]
\defineconversion [ebenevier]   [\EbeneVierConversion]
...
\definestructureconversionset [default] [ , Erster_Teil, 
Erstes_Kapitel,ebenedrei,ebenevier] [numbers]

In this case the reference output is fine.


But: the booksmarks would be wrong, as they fall back to numbers and have no 
individual start/stopper!!


If I write down each conversion literally, then the bookmarks are correct:
\defineconversion [ebenedrei]  
[{§ 1},{§ 2},{§ 3},{§ 4},{§ 5},{§ 6},{§ 7},{§ 8},{§ 9}]



So, this is the only way?

Steffen







Am 06.01.2011 um 17:15 schrieb Steffen Wolfrum:

 Hi,
 
 when the lowest section is defined with sectionstarter=(
 then the entire reference gets ( instead of only the actual section:
 
 
 The example below gives ...
 (1. (1) 1. (1)
 
 ...but the right way would be
 1. (1) 1. (1)
 
 
 
 Did I make a mistake or is there a bug?
 
 Steffen
 ---
 
 \starttext
 
 \setupreferencestructureprefix[default][prefixsegments=2:100]
 \definestructureseparatorset  [default][,,{. (},{) },{. (}][ ]
 
 \setupstructurehead[section] 
 [sectionstarter=,sectionstopper=.,sectionsegments=3:3]
 \setupstructurehead[subsection]  
 [sectionstarter=(,sectionstopper=),sectionsegments=4:4]
 \setupstructurehead[subsubsection]   
 [sectionstarter=,sectionstopper=.,sectionsegments=5:5]
 \setupstructurehead[subsubsubsection][sectionstarter=(,sectionstopper=),sectionsegments=6:6]
 
 \section {One}
 
 \subsection{Two}
 
 \subsubsection[sectest]{Three}
 
 \subsubsubsection[subsectest]{Four}
 
 See in Three \in[sectest] and in Four \in[subsectest] as well.
 
 \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
 ___

___
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] Fontfeature: smcp

2011-01-06 Thread Willi Egger
Hm, has something change in the way a font feature should be implemented?

This used to work:


\definefontfeature[smallcaps][default][script=latn,smcp=yes]

\starttypescript [sans] [seravek] [name]
   \definefontsynonym [Seravek-Roman]  [file:Seravek-Regular]  
[features=default]
\stoptypescript

\starttypescript [sans] [seravek]
   \definefontsynonym [Sans] [Seravek-Roman]  
[features=default]
 \definefontsynonym [SansRegularCaps]   [Sans]  [ 
features=smallcaps]
  \stoptypescript


\starttypescript [Seravek]
   \definetypeface [Seravek] [ss] [sans][seravek][default]
   \definetypeface [Seravek] [mm] [math][palatino][default]
\stoptypescript

\usetypescript[Seravek]
\setupbodyfont[Seravek,ss,12pt]

\starttext
This is \fontname\font.

{\sc This is \fontname\font.}

\stoptext

I get no smallcaps.

If I add \def\sc{\addff{smcp} I get still no smallcaps.

Willi
___
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] Handling EMBED tag in Tex

2011-01-06 Thread Anand Raj
Hi,

Herewith I am attaching the question_svg.xml and question.tex files. With
this I am trying to convert the xml to pdf. I encounter two problems here.

I am using asciimath module in my tex.

1. *times* not rendered to *X*
In the first question in the xml, can find line*am8.404 times
10^(-7)/am*.

2. *embed* to *svg*
In the last question in the xml, can find line *embed
type='image/svg+xml' align='middle' width='250' height='250'
src='/javascript/d.svg'
script='initPicture(-10,130,-10,130);stroke=black;fill=gray;strokewidth=1;rect([0,0],[50,40]);rect([50,0],[100,100]);text([50/2,40+6],5y
cm);text([75,106],17 cm);text([50,40/2],4y cm,right);text([100,50],13y
cm,right);' /*

Thanks
Anand

On Thu, Jan 6, 2011 at 9:50 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 06.01.2011 um 10:32 schrieb Anand Raj:

  Yes. the svg content is not stored in the embed.svg.
 
  can you make it?

 You you at least give a few information, the thing you’re telling
 is that my example doesn’t work but you don’t tell how you integrated
 it in your own setups.

 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

 ___

?xml version=1.0 encoding=UTF-8?
documentdiv class='question'
divRewrite this as a normal number:
center
am8.404 times 10^(-7)/am
/centerbr/br/
answer = __br/br/
Answers may be entered with or without commas, but answers must be exact (no rounding at all).
Also, do not include any spaces in your answer.			/div
/divdiv class='question'
divConvert the fraction am12/6/am to a decimal. Round your answer to three (3) decimal places if necessary:br/br/
Answer = __/div
/divdiv class='question'
divCompletely simplify the expressionbr/br/
 am-3 y + 8 y -9 y/ambr/br/
Answer = __


/div
/divdiv class='question'
divCompletely simplify the expressionbr/br/
 am8 w + 4 -11 w -10/ambr/br/
Answer = __


/div
/divdiv class='question'
divSimplify:  am2 x^4 + 5 x^4/am/div
/divdiv class='question'
divSimplify:  am5 x^5 - 9 x^5/am/div
/divdiv class='question'
divSimplify:  am4 x^2 + 5 x^4 + 7 x^2 + 6 + 8 x^4/am/div
/divdiv class='question'
divThe expression am(4 x^2+6 x+5)+(5 x^2-6 x-2)/am equals br/
__ am x^2 +/am__  amx+/am__
br//div
/divdiv class='question'
divJon has two trees in his yard.  One is 25 feet taller than the other.  If we let amh/am be the height of the shorter tree, write an algebraic expression for the sum of the two trees' heights.  Be sure to simplify your expression./div
/divdiv class='question'
divHere is a figure made of two rectangles.br/
embed type='image/svg+xml' align='middle' width='250' height='250' src='/javascript/d.svg' script='initPicture(-10,130,-10,130);stroke=black;fill=gray;strokewidth=1;rect([0,0],[50,40]);rect([50,0],[100,100]);text([50/2,40+6],5y cm);text([75,106],17 cm);text([50,40/2],4y cm,right);text([100,50],13y cm,right);' /
br/
What is the bperimeter/b of the figure?  Answer in terms of amy/am and simplify your expression.br/br/
__


 cmbr/			/div
/div/document

question.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] Determining available fonts

2011-01-06 Thread Taco Hoekwater

On 01/06/2011 05:04 PM, Tom wrote:

\showbodyfont  \showbodyfontenvironment display details about a single
font. Which command lists or otherwise identifies fonts available for use on
a Tex Live MKII system? I want to find out what fonts have been loaded onto
my system. These would most likely be the standard fonts included with the
on-line download. The documentation shows me how to load additional fonts
but I don't yet know what is there by default.


There is nothing like that, because a command would not know where to 
start searching for installed fonts: it can hardly try all font names

out in the wild just to see which ones exist.

But the new reference manual chapter on fonts has a (perhaps slightly
outdated) list of available typescripts for mkii. You can try those
and see which ones work. The chapter is here:

http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf

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] MPtoPDF problem

2011-01-06 Thread Taco Hoekwater

On 01/06/2011 03:59 PM, Michal Kvasnička wrote:

Hallo.

Few days ago I migrated to Ubuntu 10.10 (Linux) and last stable ConTeXt
minimals (2010.07.30 11:35 MKII) (from very old ConTeXt version). Now I
found I can't run mptopdf:

Command
   mptopdf chart.1
just prints chart.1 and an empty line


Not sure what goes wrong here.


Command
   mtxrun --script mptopdf chart.1
fails with these complaints:

This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)
  \write18 enabled.
entering extended mode
[MP to PDF]
(./charts08.1{/home/qasar/programy/context_stable/tex/texmf/fonts/m
ap/pdftex/plain/pdftex.map}) [1]
!pdfTeX error: pdftex (file lmmi9): Font lmmi9 at 600 not found
  == Fatal error occurred, no output PDF file produced!


This probably means that you do not have the latin modern fonts
installed. Check to make sure that you have all the texlive packages
in ubuntu installed, the dependencies are not always perfect.

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
___


[NTG-context] Including xfig graphics

2011-01-06 Thread Florian Unglaub
Hi there,

I'm pretty new to ConTeXt and stumbled upon a problem when trying to use
Xfig:

I'm trying to create figures with xfig and including them in my ConTeXt
document. I would export them as PDF, but unfortunately I have TeX math
inside the figure and I'd like to have native fonts. I used to use a 
combinded LaTeX/PDF export in the past with LaTeX.

Is there any practical solution to this?

Regards, Florian.
___
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] Including xfig graphics

2011-01-06 Thread Taco Hoekwater

On 01/06/2011 01:21 PM, Florian Unglaub wrote:

Hi there,

I'm pretty new to ConTeXt and stumbled upon a problem when trying to use
Xfig:

I'm trying to create figures with xfig and including them in my ConTeXt
document. I would export them as PDF, but unfortunately I have TeX math
inside the figure and I'd like to have native fonts. I used to use a
combinded LaTeX/PDF export in the past with LaTeX.

Is there any practical solution to this?


It's been ages since I last used xfig, and I no longer know how to get
math into a figure. Can you post an example input file?
___
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
___