[NTG-context] doublesided=no ignored on \startstandardmakeup with the latest beta

2011-11-12 Thread Marco Pessotto

Hi!

See the next minimal example (copied from Layout in Context):


\setuppagenumbering[alternative=doublesided]
\starttext
\startstandardmakeup[doublesided=no]
...the front
\stopstandardmakeup
\startstandardmakeup[page=no]
...the back
\stopstandardmakeup
\stoptext


The manual says it should generate 2 pages with no page number. With
current (2011.05.18) this indeed happens. With the latest beta I have 4
pages:

...the front

[1]

...the back

[empty page]

I guess there's a bug somewhere.

Best wishes


-- 
Marco

___
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] Simplefonts: Font scaling problem

2011-11-12 Thread Thomas A. Schmitz

On 11/11/2011 06:20 PM, Christian wrote:

Good evening!

 I want to scale a font loaded via the simplefonts so sans and serif have the
 same x-height.
 But as soon as I use a font size larger than 12pt, the scaling is somehow off 
or
 ignored.
 Example:

 \usemodule[simplefonts]
 \setupsimplefonts[expansion=quality, protrusion=quality]
 \setmainfont[Times New Roman]
 \setsansfont[Arial][scale=0.863]
 \starttext
 \setupbodyfont[6pt]
 06pt serif xx{\ss xx sans}\\ %fine
 \setupbodyfont[12pt]
 12pt serif xx{\ss xx sans}\\ %fine, too
 \setupbodyfont[14pt]
 14pt serif xx{\ss xx sans}\\ %here it starts to be off
 \setupbodyfont[16pt]
 16pt serif xx{\ss xx sans}\\
 \stoptext


Your example is a bit difficult to test here because it's 
windows-centric, I don't have Arial on my system. But by looking at it, 
you should have something like this in your file before setting the fonts:


\starttypescript [sans] [default] [size]
\definebodyfont [16pt] [ss] [default]
\stoptypescript
\definebodyfontenvironment[16pt]

and so on for other arbitrary sizes. ConTeXt doesn't define complete 
environments for every imaginable size (but I imagine Wolfgang may come 
up with a clever solution within his module).


HTH

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] Project structure and modes

2011-11-12 Thread Hans Hagen

On 12-11-2011 00:38, Aditya Mahajan wrote:

On Fri, 11 Nov 2011, Hans Hagen wrote:


On 11-11-2011 16:02, Wolfgang Schuster wrote:

Hi Hans,

can you add the systemmodes for products, components etc. in MkIV
because they are missing.

\startproduct test
\doifmodeelse{*product}{YES}{NO}
\stopproduct


I've added it but it needs checking as we need to push/pop modes (so
there is now also \pushmode \popmode).


I have a hard time imagining a situation where push/pop modes will be
useful. It it just so that we can avoid a group?


indeed and in this case, environments and such are definitely nit grouped

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] Project structure and modes

2011-11-12 Thread Jaroslav Hajtmar

Hello, Hans.

Did not make a change now (in project structure)? I've updated an thirty 
minutes ago ConTeXt and stopped me working translation of things that I 
have a few days in order compiled.


It is possible to go some way older install standalone ConTeXt?


Thanx Jaroslav


Here is compilation error message:
exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui --backend=pdf ./drakiada_201110 \stoptext
This is LuaTeX, Version beta-0.70.1-200321 (rev 4277)
\write18 enabled.
(drakiada_201110.tex

ConTeXt ver: 2011.11.11 23:29 MKIV fmt: 2011.11.12 int: english/english

system  cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  beware: some patches loaded from cont-new.mkiv
)
system  drakiada_201110.top loaded
(drakiada_201110.top)
fonts  latin modern fonts are not preloaded
languages  language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts  preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(C:/context/tex/te

xmf-context/tex/context/base/type-otf.mkiv)
files  readfile  asked name: 'loc', not found
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts
/map/dvips/lm/lm-rm.map}
fonts  virtual math  unable to resolve name mapsfromchar
fonts  fallback modern rm 12pt is loaded
(../obstastnik.tex (../t-obstastnik_env.mkiv
loading  ConTeXt User Module / Noviny
(C:/context/tex/texmf-context/tex/context/base/colo-imp-rgb.mkiv)
colors  system rgb is loaded
)
! Undefined control sequence.

system  tex  error on line 1 in file drakiada_201110.tex: Undefined c
ontrol sequence ...

1  \startcomponent drakiada_201110
2 \product obst_201110
3 \project obstastnik
4 \environment obstastnik_env % nahrazeno volanim knihovny
5 \environment setcolorsii_env
6 \setuplayout[normalpage] % \setuplayout[width=fit, height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, 
height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,left

margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
7
8 %\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]
%, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
9
10 % \def\nadpisT{\hcolor\sst}
11 % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
\v!project \stoptext \signalendofinput \...
l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
\honorendofinput
l.22 \stopproject

?
! ^CChcete ukončit dávkovou úlohu (A/N)? Emergency stop.

system  tex  error on line 1 in file drakiada_201110.tex: Emergency s
top ...

1  \startcomponent drakiada_201110
2 \product obst_201110
3 \project obstastnik
4 \environment obstastnik_env % nahrazeno volanim knihovny
5 \environment setcolorsii_env
6 \setuplayout[normalpage] % \setuplayout[width=fit, height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, 
height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,left

margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
7
8 %\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]
%, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
9
10 % \def\nadpisT{\hcolor\sst}
11 % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
\v!project \stoptext \sig
^CnSystém nemůže otevřít zadaný soubor nebo zařízení.
alenC:\1da\Pekarov\Obstastnik\obst_201110dofinput \...
l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
\honorendofinput
l.22 \stopproject

! == Fatal error occurred, no output PDF file produced!
C:\1da\Pekarov\Obstastnik\obst_201110
C:\1da\Pekarov\Obstastnik\obst_201110ctx1 sklipek_201110

mtx-context | run 1: luatex --fmt=C:/context/tex/texmf-cache/luatex-cache/c
ontext/2448223e6631addb83df348d74153606/formats/cont-en 
--lua=C:/context/tex/t

exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui --backend=pdf ./sklipek_201110 \stoptext
This is LuaTeX, Version beta-0.70.1-200321 (rev 4277)
\write18 enabled.
(sklipek_201110.tex

ConTeXt ver: 2011.11.11 23:29 MKIV fmt: 2011.11.12 int: english/english

system  cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  beware: some patches loaded from cont-new.mkiv
)
system  sklipek_201110.top loaded
(sklipek_201110.top)
fonts  latin modern fonts are not preloaded
languages  language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts  preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 

Re: [NTG-context] Split option toggles caption font size

2011-11-12 Thread Hans Hagen

On 11-11-2011 21:13, Andreas Harder wrote:

Hello Hans,

it seems that with the split option the body font setting from tabulate is also 
applied to the float caption.

\starttext
   \startbuffer
 \setuptabulate[bodyfont=small]
 \starttabulate
   \NC test \NC test \NC\NR
 \stoptabulate
   \stopbuffer
   \placetable[split]{Should be in normal font size}{\getbuffer}
\stoptext


fixed in next upload but needs testing

-
  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] Project structure and modes

2011-11-12 Thread Hans Hagen

On 12-11-2011 13:03, Jaroslav Hajtmar wrote:

Hello, Hans.

Did not make a change now (in project structure)? I've updated an thirty
minutes ago ConTeXt and stopped me working translation of things that I
have a few days in order compiled.


fixed


It is possible to go some way older install standalone ConTeXt?


best keep a 'old' copy on your machine .. it' sno big deal having a few 
standalones in parallel


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] Project structure and modes

2011-11-12 Thread Jaroslav Hajtmar


OK... thanx
I'm sorry to bother you., but give the corrected version to download soon?
I am not working at the moment the project.

Thanks Jaroslav.




Dne 12.11.2011 13:46, Hans Hagen napsal(a):

On 12-11-2011 13:03, Jaroslav Hajtmar wrote:

Hello, Hans.

Did not make a change now (in project structure)? I've updated an thirty
minutes ago ConTeXt and stopped me working translation of things that I
have a few days in order compiled.


fixed


It is possible to go some way older install standalone ConTeXt?


best keep a 'old' copy on your machine .. it' sno big deal having a 
few standalones in parallel


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] footnotes and linenumbering

2011-11-12 Thread Hans Hagen

On 11-11-2011 12:24, Martin Fechner wrote:

Hi all,

is it possible to have a linenumbering also in the footnotes? I tried it
with

--
\setuplinenumbering[method=page]
\setupfootnotedefinition[location=serried]
\setupfootnotes[before={\startlinenumbering[continue]},after={\stoplinenumbering}]


\starttext
\startlinenumbering
\input knuth

some text\footnote{the first footnote}
more text\footnote{\dorecurse{10}{a very long footnote }}
\stoplinenumbering
\stoptext
--

but only the whole footnotefigure has one linenumber and it doesn't
continue right if method=page is set.
Is there any solution to this?


This is not supported. I can imagine it becoming part of one of the 
critical edition ctx projects. There is no quick hack and it would be a 
specific option to for notes.


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] Project structure and modes

2011-11-12 Thread Hans Hagen

On 12-11-2011 13:55, Jaroslav Hajtmar wrote:


OK... thanx
I'm sorry to bother you., but give the corrected version to download soon?
I am not working at the moment the project.


normally the garden syncs on the (half) hour

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] doublesided=no ignored on \startstandardmakeup with the latest beta

2011-11-12 Thread Wolfgang Schuster

Am 12.11.2011 um 10:08 schrieb Marco Pessotto:

 
 Hi!
 
 See the next minimal example (copied from Layout in Context):
 
 
 \setuppagenumbering[alternative=doublesided]
 \starttext
 \startstandardmakeup[doublesided=no]
 ...the front
 \stopstandardmakeup
 \startstandardmakeup[page=no]
 ...the back
 \stopstandardmakeup
 \stoptext
 
 
 The manual says it should generate 2 pages with no page number. With
 current (2011.05.18) this indeed happens. With the latest beta I have 4
 pages:
 
 ...the front
 
 [1]
 
 ...the back
 
 [empty page]
 
 I guess there's a bug somewhere.

The argument of makeup commands are processed after context switch to the right 
page and your setting “page=no” comes to late. Make the changes at the begin of 
the document with \setupmakeup and you don’t get the extra page.

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] Simplefonts: Font scaling problem

2011-11-12 Thread Christian
   I want to scale a font loaded via the simplefonts so sans and serif
  have the  same x-height.
   But as soon as I use a font size larger than 12pt, the scaling is
  somehow off or  ignored.
   Example:
 
   \usemodule[simplefonts]
   \setupsimplefonts[expansion=quality, protrusion=quality]
  \setmainfont[Times New Roman]  \setsansfont[Arial][scale=0.863]
  \starttext  \setupbodyfont[6pt]  06pt serif xx{\ss xx sans}\\ %fine
  \setupbodyfont[12pt]  12pt serif xx{\ss xx sans}\\ %fine, too
  \setupbodyfont[14pt]  14pt serif xx{\ss xx sans}\\ %here it starts to
  be off  \setupbodyfont[16pt]  16pt serif xx{\ss xx sans}\\  \stoptext
 
 Your example is a bit difficult to test here because it's windows-centric, I
 don't have Arial on my system. But by looking at it, you should have
 something like this in your file before setting the fonts:
 
 \starttypescript [sans] [default] [size] \definebodyfont [16pt] [ss] [default]
 \stoptypescript \definebodyfontenvironment[16pt]
 
 and so on for other arbitrary sizes. ConTeXt doesn't define complete
 environments for every imaginable size (but I imagine Wolfgang may come
 up with a clever solution within his module).

You are right! It's all fine, when I add the code you posted and insert the 
appropriate sizes for those where it didn't work before.
Thanks for your help.

___
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] Simplefonts: Font scaling problem

2011-11-12 Thread Wolfgang Schuster

Am 12.11.2011 um 11:01 schrieb Thomas A. Schmitz:

 On 11/11/2011 06:20 PM, Christian wrote:
 Good evening!
 I want to scale a font loaded via the simplefonts so sans and serif have the
 same x-height.
 But as soon as I use a font size larger than 12pt, the scaling is somehow 
 off or
 ignored.
 Example:
 
 \usemodule[simplefonts]
 \setupsimplefonts[expansion=quality, protrusion=quality]
 \setmainfont[Times New Roman]
 \setsansfont[Arial][scale=0.863]
 \starttext
 \setupbodyfont[6pt]
 06pt serif xx{\ss xx sans}\\ %fine
 \setupbodyfont[12pt]
 12pt serif xx{\ss xx sans}\\ %fine, too
 \setupbodyfont[14pt]
 14pt serif xx{\ss xx sans}\\ %here it starts to be off
 \setupbodyfont[16pt]
 16pt serif xx{\ss xx sans}\\
 \stoptext
 
 Your example is a bit difficult to test here because it's windows-centric, I 
 don't have Arial on my system. But by looking at it, you should have 
 something like this in your file before setting the fonts:
 
 \starttypescript [sans] [default] [size]
 \definebodyfont [16pt] [ss] [default]
 \stoptypescript
 \definebodyfontenvironment[16pt]
 
 and so on for other arbitrary sizes. ConTeXt doesn't define complete 
 environments for every imaginable size (but I imagine Wolfgang may come up 
 with a clever solution within his module).

A clever solution would take a while because in this case i want to change the 
whole code in rewrite it with all the new mkiv goodies and the spec interface.

A fast solution is also possible but it won’t be more than a fix.

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] Simplefonts: Font scaling problem

2011-11-12 Thread Christian
  Good evening!
  I want to scale a font loaded via the simplefonts so sans and serif
  have the same x-height.
  But as soon as I use a font size larger than 12pt, the scaling is
  somehow off or ignored.
  Example:
 
  \usemodule[simplefonts]
  \setupsimplefonts[expansion=quality, protrusion=quality]
  \setmainfont[Times New Roman] \setsansfont[Arial][scale=0.863]
  \starttext \setupbodyfont[6pt] 06pt serif xx{\ss xx sans}\\ %fine
  \setupbodyfont[12pt] 12pt serif xx{\ss xx sans}\\ %fine, too
  \setupbodyfont[14pt] 14pt serif xx{\ss xx sans}\\ %here it starts to
  be off \setupbodyfont[16pt] 16pt serif xx{\ss xx sans}\\ \stoptext
 
  Your example is a bit difficult to test here because it's windows-centric, I
 don't have Arial on my system. But by looking at it, you should have
 something like this in your file before setting the fonts:
 
  \starttypescript [sans] [default] [size] \definebodyfont [16pt] [ss]
  [default] \stoptypescript \definebodyfontenvironment[16pt]
 
  and so on for other arbitrary sizes. ConTeXt doesn't define complete
 environments for every imaginable size (but I imagine Wolfgang may come
 up with a clever solution within his module).
 
 A clever solution would take a while because in this case i want to change the
 whole code in rewrite it with all the new mkiv goodies and the spec interface.
 
 A fast solution is also possible but it won’t be more than a fix.

No need to rush from my part. I have what I need (bodyfont in 11.5pt with a 
properly scaled sans companion).
I get the rest of the font sizes with \tfa etc. and that keeps the proportions 
intact.

___
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] idea: Module to automatically extract and insert information from Wikipedia

2011-11-12 Thread Paul Menzel
Dear ConTeXt folks,


just now I thought of the following and I am wondering if there exists
already a solution.

Writing a text which includes people I want to add information about
these peoples as footnotes. The first sentence in a Wikipedia article is
most of the time good enough for that.

A macro `\infofromwikipedia{Donald Knuth}` would be nice which gets the
first sentence of the article and puts an item into the bibliography.

There is even an API to access articles [2]. Besides coding that up I
see the following problems.

1. The output [3] needs to be converted to ConTeXt.
2. An Internet connection would be necessary. But that is just a note
and not a problem.


Thanks,

Paul


[1] https://en.wikipedia.org/wiki/Donald_Knuth
[2] http://www.mediawiki.org/wiki/API
[3] http://www.mediawiki.org/wiki/API:Data_formats#Output


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

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

Re: [NTG-context] idea: Module to automatically extract and insert information from Wikipedia

2011-11-12 Thread Philipp Gesang
Hi Paul,

On 2011-11-12 16:19, Paul Menzel wrote:
 A macro `\infofromwikipedia{Donald Knuth}` would be nice which gets the
 first sentence of the article and puts an item into the bibliography.
 
 There is even an API to access articles [2]. Besides coding that up I
 see the following problems.
 
 1. The output [3] needs to be converted to ConTeXt.
 2. An Internet connection would be necessary. But that is just a note
 and not a problem.

you could take this as a starting point:
  https://bitbucket.org/phg/context-acceptor/
and implement a function that ignores everything but the first
text paragraph. Autodownload should work for the English WP.
(I’m sorry I have no time to do this myself atm.)

Btw. as “Sentence” is not a markup category of wikitext, there is
no sentence recognition built in ... ymmv.

(Beware that processing wiki text from WP is extremely
complicated due to WP’s using special plugins (“templates” and
stuff). So the only way to make sure that a parser accept any
well formed WP page would be to include all those plugins. Which
would entail rewriting the PHP code in Lua for use as a context
script. And then you’d have to decide for every plugin what its
output should look like in Context.[0] If you have the time ...)

Good luck
Philipp

[0] Get an impression on how much work this can be at
http://en.wikipedia.org/wiki/Wikipedia:List_of_templates
The more important ones are at
http://en.wikipedia.org/wiki/Category:Infobox_templates


 Thanks,
 
 Paul
 
 
 [1] https://en.wikipedia.org/wiki/Donald_Knuth
 [2] http://www.mediawiki.org/wiki/API
 [3] http://www.mediawiki.org/wiki/API:Data_formats#Output



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



pgpBiUMUWzfLS.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] idea: Module to automatically extract and insert information from Wikipedia

2011-11-12 Thread Khaled Hosny
On Sat, Nov 12, 2011 at 05:31:23PM +0100, Philipp Gesang wrote:
 (Beware that processing wiki text from WP is extremely
 complicated due to WP’s using special plugins (“templates” and
 stuff). So the only way to make sure that a parser accept any
 well formed WP page would be to include all those plugins. Which
 would entail rewriting the PHP code in Lua for use as a context
 script. And then you’d have to decide for every plugin what its
 output should look like in Context.[0] If you have the time ...)

I think scraping the MediaWiki-generated HTML would be simpler.

Regards,
 Khaled


signature.asc
Description: Digital 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] doublesided=no ignored on \startstandardmakeup with the latest beta

2011-11-12 Thread Marco Pessotto
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 The argument of makeup commands are processed after context switch to
 the right page and your setting “page=no” comes to late. Make the
 changes at the begin of the document with \setupmakeup and you don’t
 get the extra page.


Thanks for your reply. With the following example I still have 4 pages, 

the front 
[empty]
the back
[empty]

%%% start example

\setuppagenumbering[alternative=doublesided]
\setupmakeup[page=no,doublesided=no]

\starttext

\startstandardmakeup
...the front
\stopstandardmakeup
\startstandardmakeup
...the back
\stopstandardmakeup

\stoptext
%%% stop example.

However, defining a custom makeup works.

%%% start working example
\setuppagenumbering[alternative=doublesided]
\definemakeup[mypage][page=no,doublesided=no]

\starttext

\startmypagemakeup
...the front
\stopmypagemakeup
\startmypagemakeup
...the back
\stopmypagemakeup

\stoptext
%%% stop

Best wishes.

-- 
Marco

___
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] doublesided=no ignored on \startstandardmakeup with the latest beta

2011-11-12 Thread Wolfgang Schuster

Am 12.11.2011 um 17:42 schrieb Marco Pessotto:

 Wolfgang Schuster schuster.wolfg...@googlemail.com writes:
 
 The argument of makeup commands are processed after context switch to
 the right page and your setting “page=no” comes to late. Make the
 changes at the begin of the document with \setupmakeup and you don’t
 get the extra page.
 
 
 Thanks for your reply. With the following example I still have 4 pages, 
 
 the front 
 [empty]
 the back
 [empty]
 
 %%% start example
 
 \setuppagenumbering[alternative=doublesided]
 \setupmakeup[page=no,doublesided=no]

\setupmakeup[standard][…]

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] doublesided=no ignored on \startstandardmakeup with the latest beta

2011-11-12 Thread Marco Pessotto
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 Am 12.11.2011 um 17:42 schrieb Marco Pessotto:

 Wolfgang Schuster schuster.wolfg...@googlemail.com writes:
 
 The argument of makeup commands are processed after context switch to
 the right page and your setting “page=no” comes to late. Make the
 changes at the begin of the document with \setupmakeup and you don’t
 get the extra page.
 
 
 Thanks for your reply. With the following example I still have 4 pages, 
 
 the front 
 [empty]
 the back
 [empty]
 
 %%% start example
 
 \setuppagenumbering[alternative=doublesided]
 \setupmakeup[page=no,doublesided=no]

 \setupmakeup[standard][…]


This indeed works.

Thanks!


-- 
Marco

___
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] idea: Module to automatically extract and insert information from Wikipedia

2011-11-12 Thread Hans Hagen

On 12-11-2011 17:40, Khaled Hosny wrote:

On Sat, Nov 12, 2011 at 05:31:23PM +0100, Philipp Gesang wrote:

(Beware that processing wiki text from WP is extremely
complicated due to WP’s using special plugins (“templates” and
stuff). So the only way to make sure that a parser accept any
well formed WP page would be to include all those plugins. Which
would entail rewriting the PHP code in Lua for use as a context
script. And then you’d have to decide for every plugin what its
output should look like in Context.[0] If you have the time ...)


I think scraping the MediaWiki-generated HTML would be simpler.


Doesn't it also depend on the first line being recognizable as such?

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] Parameters in \definecolor

2011-11-12 Thread Marcin Borkowski
Dnia 2011-11-10, o godz. 10:04:55
Hans Hagen pra...@wxs.nl napisał(a):

 On 10-11-2011 08:55, Marcin Borkowski wrote:
  Dnia 2011-11-09, o godz. 19:13:23
  Wolfgang Schusterschuster.wolfg...@googlemail.com  napisał(a):
 
 
  Am 09.11.2011 um 18:37 schrieb Marcin Borkowski:
 
  Hi all,
 
  the manual (the current draft) says that possible parameters for
  \definecolor are:
  r,g,b,
 
 red
 green
 blue

Obvious;).

 
  c,m,y,k,
 
 cyan
 magenta
 yellow
 black

As above;).

 
  s,
 
 gray (shade)

Didn't think of shade, but I got that it was gray.

 
  h,t,a,p,e
 
 hexadecimal (html like)
 transparencyfactor
 transparancyalternative
 spotcolorfactor
 extraspotcolorname (in pdf resource)

Wow, now it's more clear.  Just one question: what are the
transparency alternatives?

Best,

-- 
Marcin Borkowski
___
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] Parameters in \definecolor

2011-11-12 Thread Aditya Mahajan

On Sat, 12 Nov 2011, Marcin Borkowski wrote:

hexadecimal (html like)
transparencyfactor
transparancyalternative
spotcolorfactor
extraspotcolorname (in pdf resource)


Wow, now it's more clear.  Just one question: what are the
transparency alternatives?


IIRC, they are documented in the metafun manual.

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

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


Re: [NTG-context] Parameters in \definecolor

2011-11-12 Thread Hans Hagen

On 12-11-2011 20:39, Aditya Mahajan wrote:

On Sat, 12 Nov 2011, Marcin Borkowski wrote:

hexadecimal (html like)
transparencyfactor
transparancyalternative
spotcolorfactor
extraspotcolorname (in pdf resource)


Wow, now it's more clear. Just one question: what are the
transparency alternatives?


IIRC, they are documented in the metafun manual.


and in the pdf spec

none
normal
multiply
screen
overlay
softlight
hardlight
colordodge
colorburn
darken
lighten
difference
exclusion
hue
saturation
color
luminosity


-
  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] Parameters in \definecolor

2011-11-12 Thread Marcin Borkowski
Dnia 2011-11-12, o godz. 21:31:02
Hans Hagen pra...@wxs.nl napisał(a):

 On 12-11-2011 20:39, Aditya Mahajan wrote:
  On Sat, 12 Nov 2011, Marcin Borkowski wrote:
  hexadecimal (html like)
  transparencyfactor
  transparancyalternative
  spotcolorfactor
  extraspotcolorname (in pdf resource)
 
  Wow, now it's more clear. Just one question: what are the
  transparency alternatives?
 
  IIRC, they are documented in the metafun manual.
 
 and in the pdf spec
 
 none
 normal
 multiply
 screen
 overlay
 softlight
 hardlight
 colordodge
 colorburn
 darken
 lighten
 difference
 exclusion
 hue
 saturation
 color
 luminosity

Thanks a lot, they are there indeed!

BTW (not ConTeXt-related): seemigly they are all rendered the same in
evince.

Best,

-- 
Marcin Borkowski
___
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] more table trouble ...

2011-11-12 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Here's another table that worked fine in MkII but not MkIV:

=
\starttext
  \starttable[|l|l|]
  \VL test  \VL \LOW{test}   \VL\FR
  \DL\DC \DR
  \stoptable
\stoptext
=

! Use of \DL doesn't match its definition.

system   tex  error on line 4 in file taqwa-ibadah-test.tex: Use  
of  ...


1 \starttext
2   \starttable[|l|l|]
3   \VL test  \VL \LOW{test}   \VL\FR
4 \DL\DC \DR
5   \stoptable
6 \stoptext
7

l.4   \DL\DC
 \DR
=

Please advise!

Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī 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] more table trouble ...

2011-11-12 Thread Hans Hagen

On 12-11-2011 22:52, Idris Samawi Hamid ادريس   سماوي حامد wrote:


Please advise!


fixed in next beta .. also \DL[somecolor]


-
  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] empty lines messing with margins (in duplex mode)

2011-11-12 Thread Hans Hagen

On 10-11-2011 14:57, Peter Schorsch wrote:

Hi,

I am not sure but maybe it is a bug: in duplex documents empty lines
causing a mess with the margins on every second page.

Following lines create a fine pdf documents and all margins are set
correctly in the pdf file:


\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte


But as soon I add between every two lines an empty line the margin on
every second page are corrupted. I am using the context version
2011.11.08.

I attached example files to reproduce and show the problem:

duplex-margin-with-empty-lines.tex  problem occurs

duplex-margin-without-empty-lines.tex  no problem

Can anyone approve this problem? Or did I something totally stupid to
get this result?


it's unrelated to newlines ... it's just that the analysis of stacking 
works over a limited range (btw, in any case you'd have to say stack=yes 
in order to get that)


i've added an extra option: continue:

\setuplayout
  [margin=1cm]

\showframe

\starttext

\dorecurse {3} {
\ininner[stack=yes]{\expanded{\dorecurse{12}{IM\recurselevel\space}}}%
\inouter[stack=yes]{\expanded{\dorecurse{12}{OM\recurselevel\space}}}%
\input tufte \par
}

\page

\dorecurse {3} {

\ininner[stack=continue]{\expanded{\dorecurse{12}{IM\recurselevel\space}}}%

\inouter[stack=continue]{\expanded{\dorecurse{12}{OM\recurselevel\space}}}%
\input tufte \par
}

\stoptext

which will be in the next beta ... quite experimental and not yet tuned


-
  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] more table trouble ...

2011-11-12 Thread Idris Samawi Hamid ادريس سماوي حامد

On Sat, 12 Nov 2011 15:30:01 -0700, Hans Hagen pra...@wxs.nl wrote:


On 12-11-2011 22:52, Idris Samawi Hamid ادريس   سماوي حامد wrote:


Please advise!


fixed in next beta .. also \DL[somecolor]


Thanks, I await the beta!

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī 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] No colons with pxmath fonts

2011-11-12 Thread Hans Hagen

On 11-11-2011 13:40, Andreas Harder wrote:

Hi,

there is (still) no colon if one uses the pxmath fonts. By the way, 
\setupTEXpage causes an error (Undefined control sequence).

\setupbodyfont[palatino] % no colon
% \setupbodyfont[asana] % OK

% \setupTEXpage[offset=1ex] % error

\startTEXpage % [offset=1ex] % OK
   $a$:\,$b$\par $a\colon b$
\stopTEXpage


fixed in next beta


-
  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] idea: Module to automatically extract and insert information from Wikipedia

2011-11-12 Thread Aditya Mahajan

On Sat, 12 Nov 2011, Paul Menzel wrote:


just now I thought of the following and I am wondering if there exists
already a solution.


Not exactly for wikipedia, but I have an experimental module that pulls 
information from the web. I use it get images from sites like yuml.me an 
dwebsequencediagrams.com.


https://github.com/adityam/context-webfilter

See test/ directory for examples.


Writing a text which includes people I want to add information about
these peoples as footnotes. The first sentence in a Wikipedia article is
most of the time good enough for that.

A macro `\infofromwikipedia{Donald Knuth}` would be nice which gets the
first sentence of the article and puts an item into the bibliography.


This actually requires a more detailed spec. What happens if there is 
more than one person with the same name:


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


There is even an API to access articles [2]. Besides coding that up I
see the following problems.

1. The output [3] needs to be converted to ConTeXt.


I don't see anything in the API specs that returns the contents of the 
page. My guess is that simply downloading the html page and scraping the 
main paragraph might be easier. Once the data is retreived, using ConTeXt 
to typeset HTML is fairly easy.


Another option is to just use one of the existing scripts to scrap the 
first paragraph/first line from Wikipedia, e.g.,


http://stackoverflow.com/questions/1565347/get-first-lines-of-wikipedia-article
http://query7.com/scrape-the-first-paragraph-image-from-a-wikipedia-entry

and use the filter module to call them.

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
___