[NTG-context] How can I properly credit ConTeXt

2010-11-22 Thread Marco Pessotto

Hello there. 

This was meant to be a mail to say thanks to the ConTeXt/LuaTeX teams
for the wonderful work they did and are doing. I'm pretty new to ConTeXt
but I'm really impressed. It happens that I'm typesetting a journal that
will hit the printer soon. Now, the question sounds: how can I credit
ConTeXt/LuaTeX properly? (no, it won't generate any profit so I can't
really donate some bucks; as a matter of fact I'm volunteering this)

I was thinking about something like:

\vfill
\startalignment[center]
Typeset with \ConTeXt\ and \luaTeX\ 

\goto{\hyphenatedurl{http://wiki.contextgarden.net}}
 [url(http://wiki.contextgarden.net)]

\blank[big]
Fonts used: Linux Libertine

\goto{\hyphenatedurl{http://www.linuxlibertine.org}}
 [url(http://www.linuxlibertine.org)]
\stopalignment

Is it OK? 

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] How can I properly credit ConTeXt

2010-11-22 Thread John Haltiwanger
On Mon, Nov 22, 2010 at 9:20 AM, Marco Pessotto melmo...@gmail.com wrote:


 Hello there.

 This was meant to be a mail to say thanks to the ConTeXt/LuaTeX teams
 for the wonderful work they did and are doing. I'm pretty new to ConTeXt
 but I'm really impressed. It happens that I'm typesetting a journal that
 will hit the printer soon. Now, the question sounds: how can I credit
 ConTeXt/LuaTeX properly? (no, it won't generate any profit so I can't
 really donate some bucks; as a matter of fact I'm volunteering this)

 I was thinking about something like:

 \vfill
 \startalignment[center]
 Typeset with \ConTeXt\ and \luaTeX\

 \goto{\hyphenatedurl{http://wiki.contextgarden.net}}
 [url(http://wiki.contextgarden.net)]

 \blank[big]
 Fonts used: Linux Libertine

 \goto{\hyphenatedurl{http://www.linuxlibertine.org}}
 [url(http://www.linuxlibertine.org)]
 \stopalignment

 Is it OK?


It should be fine, but why not set it up as a standard colophon?
___
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] How can I properly credit ConTeXt

2010-11-22 Thread Henning Hraban Ramm
2010/11/22 Marco Pessotto melmo...@gmail.com:
 This was meant to be a mail to say thanks to the ConTeXt/LuaTeX teams
 for the wonderful work they did and are doing. I'm pretty new to ConTeXt
 but I'm really impressed. It happens that I'm typesetting a journal that
 will hit the printer soon. Now, the question sounds: how can I credit
 ConTeXt/LuaTeX properly? (no, it won't generate any profit so I can't
 really donate some bucks; as a matter of fact I'm volunteering this)

I always write something like Typeset using Open Source software:
TeX/ConTeXt, GNU LilyPond etc.

Greetlings, Hraban
___
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] Exist any table environment flag?

2010-11-22 Thread Jaroslav Hajtmar

Thanx Wolfgang!
It  works fine now ... it is great...
I don't found (by google) any more information about \ifintable or 
\iftrialtypesetting flags.

Can I find anywhere more information about them?


I have now still one similar question. Is there any flag which indicate 
whether to use \expanded macro? I want to checked using the \expanded{} 
macro as input parameter of my own macros.


for example:


\def\tbline{\expanded{\bTR\bTD \myfirstcolumn \eTD\eTR}}
\mytablerow{\tbline}

\def\mytablerow#1{ ... I want testing here, if #1 contain \expanded{} 
macro ... }



Thanx
Jaroslav


Dne 21.11.2010 15:32, Wolfgang Schuster napsal(a):

Am 21.11.2010 um 15:06 schrieb Jaroslav Hajtmar:

   

Hello ConTeXist,

I want my macro to act differently inside \bTABLE ... \eTABLE environment and 
otherwise outside of that environment.
Is there any sign (flag) which can determine whether my macro run inside or 
outside the \bTABLE .. \eTABLE environment?
Or do I have two similar versions of my macros (one for the table environment 
and the other for normal environment)
 

\ifintable but this is not available for tabulate, another alternative is to 
use \iftrialtypesetting

   

Explanation: To my macro work, I must have already expanded values inside table 
environment...
 

In this case you have to expand the whole table before it’s processed, e.g.

\bTABLE
   \bTR
 \expanded{\bTD ... \eTD}
   \eTR
\eTABLE

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] New Release Winedt WORKS with MKIV!!

2010-11-22 Thread Hans Hagen

On 21-11-2010 10:03, barney schwartz wrote:


Just thought I would post this here for other Winedt users.


ah, good. thanks,

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] Exist any table environment flag?

2010-11-22 Thread Wolfgang Schuster

Am 22.11.2010 um 11:06 schrieb Jaroslav Hajtmar:

 Thanx Wolfgang!
 It  works fine now ... it is great...
 I don't found (by google) any more information about \ifintable or 
 \iftrialtypesetting flags.
 Can I find anywhere more information about them?

They’re defined with \newif\iftable and \newif\iftrialtypesetting. You can use 
them like

\ifintable
  Yes, I’m in a table.
\else
  No, I’m not in a table.
\fi

 I have now still one similar question. Is there any flag which indicate 
 whether to use \expanded macro? I want to checked using the \expanded{} macro 
 as input parameter of my own macros.
 
 for example:
 
 \def\tbline{\expanded{\bTR\bTD \myfirstcolumn \eTD\eTR}}
 \mytablerow{\tbline}
 
 \def\mytablerow#1{ ... I want testing here, if #1 contain \expanded{} macro 
 ... }

\def\mytablerow#1%
  {\doifinstringelse{expanded}{\detokenize{#1}}
 {YES}
 {NO}}

Are you sure you need such complicated tests, wouldn’t it be better to write
a robust macro which works whether one of these conditions is true or false.

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] special problem (mplib)

2010-11-22 Thread Peter Rolf
Hi,

I noticed some problems with the order of mplib output.
Example is attached (1 j stands before special code).

Peter


MTXrun | current version: 2010.11.20 12:51
This is LuaTeX, Version beta-0.64.0-2010111322 (rev 3961)
\setuppagenumber[state=stop]
\nopdfcompression

\startuniqueMPgraphic{foo:special}
begingroup
save p; path p;
p := unitsquare xyscaled(2cm,2cm);

linear_shade(p,1,red,green);

interim linejoin:= rounded; interim linecap:= rounded;
draw p withpen pencircle scaled 10;
endgroup;
\stopuniqueMPgraphic

\startuniqueMPgraphic{foo:nospecial}
begingroup
save p; path p;
p := unitsquare xyscaled(2cm,2cm);

%linear_shade(p,1,red,green);
interim linejoin:= rounded; interim linecap:= rounded;
draw p withpen pencircle scaled 10;
endgroup;
\stopuniqueMPgraphic


\starttext
\uniqueMPgraphic{foo:special}

\uniqueMPgraphic{foo:nospecial}


\stoptext


special.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Convert eps to pdf

2010-11-22 Thread Alan BRASLAU
ConTeXt mkiv will take an encapsulated postscript (eps) file through
\externalfigure [myfigure.eps]
and creates a (compressed) pdf version as m_k_i_v_myfigure.pdf
that conserves the vectorial components of the eps file.

Other standard conversion tools, notably those based on ghostscript,
generally create a bitmap image with pretty horrible results.

The vectorial conversion must be fully trivial, but I am ignorant
of the tools available for this manipulation (other than ConTeXt!),
as well as the inverse (pdf-eps) conversion. Perhaps I am simply
missing some simple (ghostscript, pstoedit, ...) option.

I am posting this question to the ConTeXt mailing list
as I am sure that someone can give a trivial answer,
but also to indicate to those who may ignore this robust
feature of ConTeXt.

Also, \externalfigure is a very powerful macro that would justify
more complete documentation in the revised reference manual.

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] Exist any table environment flag?

2010-11-22 Thread Jaroslav Hajtmar

Thanx for quick response,
my notices are in body of this mail ...

Dne 22.11.2010 11:21, Wolfgang Schuster napsal(a):

Am 22.11.2010 um 11:06 schrieb Jaroslav Hajtmar:

   

Thanx Wolfgang!
It  works fine now ... it is great...
I don't found (by google) any more information about \ifintable or 
\iftrialtypesetting flags.
Can I find anywhere more information about them?
 

They’re defined with \newif\iftable and \newif\iftrialtypesetting. You can use 
them like

\ifintable
   Yes, I’m in a table.
\else
   No, I’m not in a table.
\fi

   
Yes I was understand ... I was more a matter of where and how to use 
these flags, etc ...
For example I do not know where to set (in which the environment) 
\iftrialtypesetting flag to true value etc... No more information I get 
when I googling...



I have now still one similar question. Is there any flag which indicate whether 
to use \expanded macro? I want to checked using the \expanded{} macro as input 
parameter of my own macros.

for example:

\def\tbline{\expanded{\bTR\bTD \myfirstcolumn \eTD\eTR}}
\mytablerow{\tbline}

\def\mytablerow#1{ ... I want testing here, if #1 contain \expanded{} macro ... 
}
 

\def\mytablerow#1%
   {\doifinstringelse{expanded}{\detokenize{#1}}
  {YES}
  {NO}}

Are you sure you need such complicated tests, wouldn’t it be better to write
a robust macro which works whether one of these conditions is true or false.

   
Great .. Main reason of my questions is just, that I am creating  own 
module, which has contain robust macros, which should be solving both 
cases  ...


Once again thank you very much

Jaroslav




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] Convert eps to pdf

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 11:51, Alan BRASLAU wrote:
 ConTeXt mkiv will take an encapsulated postscript (eps) file through
 \externalfigure [myfigure.eps]
 and creates a (compressed) pdf version as m_k_i_v_myfigure.pdf
 that conserves the vectorial components of the eps file.

 Other standard conversion tools, notably those based on ghostscript,
 generally create a bitmap image with pretty horrible results.

 The vectorial conversion must be fully trivial, but I am ignorant
 of the tools available for this manipulation (other than ConTeXt!),
 as well as the inverse (pdf-eps) conversion. Perhaps I am simply
 missing some simple (ghostscript, pstoedit, ...) option.

1.) ps2pdf -dEPSCrop file.eps file.pdf

On some systems you have epstopdf.

2.) gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop \
-sDEVICE=pdfwrite -sOutputFile=file.pdf file.ps

I use the same command for conversion into bitmap figures:
gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop \
-dGraphicsAlphaBits=4 -dTextAlphaBits=4 -r500 \
-sDEVICE=pngalpha -sOutputFile=file.png file.ps

Usually the conversion from PDF to EPS is slightly problematic for (to
me) unknow reason.

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] Exist any table environment flag?

2010-11-22 Thread Wolfgang Schuster

Am 22.11.2010 um 11:55 schrieb Jaroslav Hajtmar:

 \ifintable
   Yes, I’m in a table.
 \else
   No, I’m not in a table.
 \fi
 
   
 Yes I was understand ... I was more a matter of where and how to use these 
 flags, etc ...
 For example I do not know where to set (in which the environment) 
 \iftrialtypesetting flag to true value etc... No more information I get when 
 I googling...

The \iftrialtypesetting and \iftable values are set by context, you can use 
them to test whether you’re in a table or if context does currently performs 
trialtypesetting (happens in natural table to get the maximum values for the 
rowheight and columnwidth)

 Great .. Main reason of my questions is just, that I am creating  own module, 
 which has contain robust macros, which should be solving both cases  ...

For these cases \iftriatypesetting can be usefull but testing for \expanded 
isn’t necessary with a well written macro.

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] Problems with getmarking

2010-11-22 Thread luigi scarso
With this code mkii and mkiv make differents pdf :
mkiv doesn't show the header after the second \part.
Perhaps \getmarking is obsolete ?

\setuppagenumbering[way=bytext,partnumber=no,location={margin},alternative=doublesided]

\setupcolors[state=start]
\setupinteraction[state=start]

\setupbodyfont[ss]
\setuppapersize[A4][A4]



\setuphead[part]
  [placehead=yes,
  page=right]
\setuphead[chapter]
  [placehead=yes,page=yes,before=,after=,]
\setuphead[section]
  [placehead=yes,page=yes,before=,after=,]
\setuphead[subsection]
  [placehead=yes,before=,after=,]


\def\ChapterId#1{\setupheadertexts[text]
[{}]
[{\getmarking[chapter][first]---\getmarking[section][first]}]
[{\getmarking[chapter][first]---\getmarking[section][first]}]
[{}]}


\starttext
\part{Part}
\chapter{Chapter}
\ChapterId{}
\section{Section}
foo

\chapter{Chapter}
\ChapterId{}
\section{Section}
goo

%%


\part{Part}
\chapter{Chapter}
\ChapterId{}
\section{Section}
foo

\chapter{Chapter}
\ChapterId{}
\section{Section}
goo


\stoptext




-- 
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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Fri, Nov 19, 2010 at 00:38, Florian Wobbe wrote:

 Thanks, I just updated the CVS version of gnuplot with your files and gave it 
 a try: It works with minimals!

 [...]

 Feedback and patches welcome!

 No patches I'm afraid. But feedback goes here:

 1) The label text of the following key element takes the color of the 
 preceding key symbol. Minimal example:

  set terminal lua tikz fulldoc size 15cm,7cm context
  set output 'plot.tex'
  set xrange [ 0 : 13 ]
  f1(x)=sqrt(x)
  f2(x)=sqrt(x*0.8)-3
  plot f1(x) lc rgb 'blue', f2(x)

Confirmed. I had the problems with that in my terminal as well, but I
think that it was a buglet in metapost back then; oh, good old
memories ... :) :) :) I didn't check the details about this one.

 2) Negative axis labels are set with hyphen instead of proper minus sign, 
 which should be longer (see example above).

I'm not sure if this should really be fixed automatically or not. In
order to fix this one would have to patch gnuplot core.

I forgot the details how to do it (I can find it out), but you can
configure the layout of labels. In particular you may enclose the
number into math delimiters ($). Maybe something like
set format y $%.1f$
would work (you might want to change the size of left margin then).
Doing any other kind of magic would be a bit dangerous. Keep in mind
that
plot 'x.dat' u 1:(2*$2)
will also fail since TeX will interpret $ as math delimiter. But
changing that behaviour would have other undesirable effects.

 3) First I thought luatex hangs but then I noticed TikZ is awfully slow when 
 drawing plots with large amounts of data points (the tikzpicture had about 
 3000 lines). I can speed this up by reducing the size by invoking plot with:

  plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]

 I wonder if there is a smarter way to do this in gnuplot.

Using bitmap terminals. A while back I was dreaming about having
mixed-mode with one terminal creating text labels and the other one
(png for example) drawing the plot. But this needs some extra
programming effort.

You would stumble against the same problem when using PS or PDF
terminal, maybe only at a slightly bigger number of points.

What I did for my theory of chaos reports and the million-of-points
plots in my thesis was to create an empty plot with ConTeXt terminal,
create a borderless plot with PNG and then manually insert PNG into
the generated ConTeXt output, which you could do with TikZ output as
well. It requires more effort, but there is no other way to speed up
vector graphics. They are simply not suitable for drawing millions of
points on the same plot.

(Gnuplot also has a keyword 'every' to reduce the number of points,
but in my case I wanted to plot all of them.)

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] Convert eps to pdf

2010-11-22 Thread Siep Kroonenberg
On Mon, Nov 22, 2010 at 12:02:13PM +0100, Mojca Miklavec wrote:
 On Mon, Nov 22, 2010 at 11:51, Alan BRASLAU wrote:
  ConTeXt mkiv will take an encapsulated postscript (eps) file through
  \externalfigure [myfigure.eps]
  and creates a (compressed) pdf version as m_k_i_v_myfigure.pdf
  that conserves the vectorial components of the eps file.
 
  Other standard conversion tools, notably those based on ghostscript,
  generally create a bitmap image with pretty horrible results.
 
  The vectorial conversion must be fully trivial, but I am ignorant
  of the tools available for this manipulation (other than ConTeXt!),
  as well as the inverse (pdf-eps) conversion. Perhaps I am simply
  missing some simple (ghostscript, pstoedit, ...) option.
 
 1.) ps2pdf -dEPSCrop file.eps file.pdf
 
 On some systems you have epstopdf.
 
 2.) gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop \
 -sDEVICE=pdfwrite -sOutputFile=file.pdf file.ps
 
 I use the same command for conversion into bitmap figures:
 gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop \
 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -r500 \
 -sDEVICE=pngalpha -sOutputFile=file.png file.ps
 
 Usually the conversion from PDF to EPS is slightly problematic for (to
 me) unknow reason.

For pdf to eps, use pdftops from the xpdf suite
(http://www.foolabs.com/xpdf/). 

I wrote a Ruby script epspdf with a gui Tcl/Tk wrapper epspdftk
(http://tex.aanhet.net/epspdf/) for arbitrary conversions between
eps, ps and pdf in any direction, with optional cropping and
grayscaling. Epspdf and epspdftk are included in TeX Live.

-- 
Siep Kroonenberg
___
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] special problem (mplib)

2010-11-22 Thread Hans Hagen

On 22-11-2010 11:25, Peter Rolf wrote:

1 j


fixed in upcoming 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
___


[NTG-context] nested tabulate

2010-11-22 Thread Herbert Voss
I get funny horizontal lines in this example

\starttext
\starttabulate[|p|p|]  \HL
\NC {\starttabulate[|c|c|] \HL
   \NC c\NC c\NC\NR\HL
   \NC c\NC c\NC\NR
 \stoptabulate} \NC Text \NC\NR\HL
\NC C\NC C\NC\NR   \HL
\stoptabulate
\stoptext

minimal, mkii and mkiv

Herbert
___
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] special problem (mplib)

2010-11-22 Thread Peter Rolf
Am 22.11.2010 17:00, schrieb Hans Hagen:
 On 22-11-2010 11:25, Peter Rolf wrote:
 1 j
 
 fixed in upcoming beta

That was fast. Thank you :-)


 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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Florian Wobbe
On Nov 22, 2010, at 16:01 , Mojca Miklavec wrote:

 [...]
 
 2) Negative axis labels are set with hyphen instead of proper minus sign, 
 which should be longer (see example above).
 
 I'm not sure if this should really be fixed automatically or not. In
 order to fix this one would have to patch gnuplot core.
 
 I forgot the details how to do it (I can find it out), but you can
 configure the layout of labels. In particular you may enclose the
 number into math delimiters ($). Maybe something like
set format y $%.1f$
 would work (you might want to change the size of left margin then).

Hej Mojca, thank you for your answer! Well, that was surprisingly easy - I 
should have checked the manual first (I was just about to write an ugly hack 
into your context terminal driver :). Actually
 set format $%g$
gives the default label format (only enclosed in $) for all axes.

 Doing any other kind of magic would be a bit dangerous. Keep in mind
 that
plot 'x.dat' u 1:(2*$2)
 will also fail since TeX will interpret $ as math delimiter. But
 changing that behaviour would have other undesirable effects.
 
 3) First I thought luatex hangs but then I noticed TikZ is awfully slow when 
 drawing plots with large amounts of data points (the tikzpicture had about 
 3000 lines). I can speed this up by reducing the size by invoking plot with:
 
  plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]
 
 I wonder if there is a smarter way to do this in gnuplot.
 
 [...]
 What I did for my theory of chaos reports and the million-of-points
 plots in my thesis was to create an empty plot with ConTeXt terminal,
 create a borderless plot with PNG and then manually insert PNG into
 the generated ConTeXt output, which you could do with TikZ output as
 well. It requires more effort, but there is no other way to speed up
 vector graphics. They are simply not suitable for drawing millions of
 points on the same plot.

I'd probably do the same in that case. But unlike you I have a lot less points 
- 5000 points instead of millions. Loot at this example, which is the slightly 
modified random demo script taken from the gnuplot page:

 set terminal context size 15.0cm,10.5cm standalone
 set output 'randomCtx.tex'

 set dummy t,y
 unset key
 set parametric
 set samples 5000, 5000
 set style function dots
 set title Lattice test for random numbers 
 set xlabel rand(n) - 
 set xrange [ 0.0 : 1.0 ] noreverse nowriteback
 set ylabel rand(n + 1) - 
 set yrange [ 0.0 : 1.0 ] noreverse nowriteback
 set zlabel rand(n + 2) - 
 set zrange [ 0.0 : 1.0 ] noreverse nowriteback
 plot rand(0), rand(0)

 set terminal lua tikz context size 15.0cm,10.5cm fulldoc
 set output 'randomLua.tex'

 replot

Now look at the timing of processing the output files with context (final run 
only):

context randomCtx.tex - 3.150 seconds.
context randomLua.tex - 23.658 seconds.

Further increasing the number of points to 15000 results in 8.978 vs. 62.878 
seconds. Quite a big difference in processing time!

 (Gnuplot also has a keyword 'every' to reduce the number of points,
 but in my case I wanted to plot all of them.)

True, but suppose you don't have evenly spaced data points. Then you don't want 
every other line but one point every 5 kilometres or something the like.

Especially for line drawings it would be beneficial not to place every single 
point. Instead consecutive points should be skipped if they are close to each 
other (with regard to plot units) - it makes no sense to include points which 
you won't see anyway. This could be done by defining a grid with a certain 
(user defined) resolution and rounding the coordinates (plot units) of a line 
point to the nearest grid node. All consecutive line points falling on the same 
grid node should not be passed on to terminal drivers. The psxy utility of GMT 
(http://gmt.soest.hawaii.edu/) does this for instance. I am not aware of such a 
functionality within gnuplot but it would be a nice feature.

Best wishes,
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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 20:15, Florian Wobbe wrote:

 Especially for line drawings it would be beneficial not to place every single 
 point. Instead consecutive points should be skipped if they are close to each 
 other (with regard to plot units) - it makes no sense to include points which 
 you won't see anyway. This could be done by defining a grid with a certain 
 (user defined) resolution and rounding the coordinates (plot units) of a line 
 point to the nearest grid node. All consecutive line points falling on the 
 same grid node should not be passed on to terminal drivers. The psxy utility 
 of GMT (http://gmt.soest.hawaii.edu/) does this for instance. I am not aware 
 of such a functionality within gnuplot but it would be a nice feature.

But this is an issue of Gnuplot, not something that a terminal writer
is supposed to think of.

One thing that I did implement in ConTeXt was that if I get instructions
   move_to(10,3)
   line_to(11,8)
   line_to(11,8)
   line_to(11,9)
then one line_to(11,8) will be ignored (resolution is hard-coded in
the terminal, but you could draw a smaller plot and then magnify it
which would seemingly decrease resolution). But in most cases that
wouldn't really help.

About the timing difference between set term context and set term
lua context: it is quite possible that metapost library is much
faster than TikZ which uses TeX-based macros. TeX might be slower in
calculations than metapost (which uses C for low level calculations)
and TikZ is not optimized for drawing ten-thousand segments. And Hans
really tried hard to optimize the code. Processing the output with
ConTeXt is also at least ten times slower that outputting straight to
PS or PDF and if you try ConTeXt MKII it is about two times slower
than MKIV.

You probably didn't have a chance to try the first implementations of
ConTeXt terminal for gnuplot. It needed 10 minutes for 13 ordinary
plots and it ran out of memory if I tried to plot 14 of them!!! (The
reason was the usage of btex text etex constructs which lead to
ConTeXt runs inside metapost runs inside ConTeXt runs, all doubled,
maybe the labels were compile even four times, usually with a separate
instance of ConTeXt for each plot.) Now compare that speed difference
and the enormous optimization that Hans implemented back in 2006 ...

The slow speed of TikZ is not something that you could do much about.
There might be some tiny room for optimization in
gnuplot-lua-tikz-common.tex, but hardly any. LuaTeX-based TikZ could
be reimplemented and that would bring most benefits, but since Till
almost-quit the project and since it works out-of-the-box with pdfTeX
macros it is highly unlikely to happen.

But yes, it would be nice if also ConTeXt terminal would be included.
It still doesn't support raw images, but most other features are
present.

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] Guitar string symbol

2010-11-22 Thread Vyatcheslav Yatskovsky
Thank you, Jaroslav, for WORKING solution. I added it to my songbook 
environment.


And thanks to Hans -- yes, \wingding\fontchar{circle1} would be much 
simplier )


--
Best Regards,
Vyatcheslav Yatskovsky
___
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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Aditya Mahajan

On Mon, 22 Nov 2010, Mojca Miklavec wrote:


The slow speed of TikZ is not something that you could do much about.


Rewrite the pgf backend code in metapost.

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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 22:19, Aditya Mahajan wrote:
 On Mon, 22 Nov 2010, Mojca Miklavec wrote:

 The slow speed of TikZ is not something that you could do much about.

 Rewrite the pgf backend code in metapost.

But that requires Till (maybe Hans) or some other genius to work on it
for some non-trivial amount time. And that is not likely to happen any
time soon.

Peter as the author of TikZ terminal for gnuplot is certanly not the
one that could be adressed to speed up his terminal.

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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Florian Wobbe
On Nov 22, 2010, at 22:03 , Mojca Miklavec wrote:

 On Mon, Nov 22, 2010 at 20:15, Florian Wobbe wrote:
 
 Especially for line drawings it would be beneficial not to place every 
 single point. Instead consecutive points should be skipped if they are close 
 to each other (with regard to plot units) - it makes no sense to include 
 points which you won't see anyway. This could be done by defining a grid 
 with a certain (user defined) resolution and rounding the coordinates (plot 
 units) of a line point to the nearest grid node. All consecutive line points 
 falling on the same grid node should not be passed on to terminal drivers. 
 The psxy utility of GMT (http://gmt.soest.hawaii.edu/) does this for 
 instance. I am not aware of such a functionality within gnuplot but it would 
 be a nice feature.
 
 But this is an issue of Gnuplot, not something that a terminal writer
 is supposed to think of.

Indeed, this was my point in the first place. It should be handled by gnuplot 
prior to handing the data over to the terminal driver.

 But yes, it would be nice if also ConTeXt terminal would be included.
 It still doesn't support raw images, but most other features are
 present.

Right, this might help increase the awareness among academics. Also not 
everyone has the ability to build gnuplot from sources.

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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
On Mon, Nov 22, 2010 at 22:44, Florian Wobbe wrote:
 On Nov 22, 2010, at 22:03 , Mojca Miklavec wrote:
 On Mon, Nov 22, 2010 at 20:15, Florian Wobbe wrote:

 Especially for line drawings it would be beneficial not to place every 
 single point. Instead consecutive points should be skipped if they are 
 close to each other (with regard to plot units) - it makes no sense to 
 include points which you won't see anyway. This could be done by defining a 
 grid with a certain (user defined) resolution and rounding the coordinates 
 (plot units) of a line point to the nearest grid node. All consecutive line 
 points falling on the same grid node should not be passed on to terminal 
 drivers. The psxy utility of GMT (http://gmt.soest.hawaii.edu/) does this 
 for instance. I am not aware of such a functionality within gnuplot but it 
 would be a nice feature.

 But this is an issue of Gnuplot, not something that a terminal writer
 is supposed to think of.

 Indeed, this was my point in the first place. It should be handled by gnuplot 
 prior to handing the data over to the terminal driver.

However you need to write to gnuplot-dev then. This mailing list
cannot help you.

 But yes, it would be nice if also ConTeXt terminal would be included.
 It still doesn't support raw images, but most other features are
 present.

 Right, this might help increase the awareness among academics. Also not 
 everyone has the ability to build gnuplot from sources.

But as I said ... there have to be others writing on gnuplot-dev to
show interest to other gnuplot developers. I will continue to work
with Peter to improve TikZ output and to include support into
t-gnuplot.tex, but comparison such as the speed test demonstrated with
those random points (sent to dev-gnuplot) may help.

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] sorting bibliography

2010-11-22 Thread Yury G. Kudryashov
Hi!

Could you please tell me how to sort bibliogrpahy in ConTeXt Mark IV? I've 
tried
\setuppublications[sorttype=author,sort=yes]
but this doesn't work.

It seems that bibl-tra.lua contains two compare() functions. Which one is 
used (my Lua knowledge is far from perfect)?

P.S.: I'm ready to convert my bibtex db to another format if this will 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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Alan BRASLAU
On Monday 22 November 2010 22:19:40 Aditya Mahajan wrote:
 On Mon, 22 Nov 2010, Mojca Miklavec wrote:
  The slow speed of TikZ is not something that you could do much about.
 
 Rewrite the pgf backend code in metapost.
 

Or use metapost: \usemodule [graph]

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
___


[NTG-context] ConTeXt mkiv and Drupal

2010-11-22 Thread Otared Kavian
Dear Contextators,

Has anyone tried to process TeX files written for ConTeXt mkiv in Drupal 
(http://drupal.org/)?
To be more precise, there exists a so-called filter DruTeX 
(http://drupal.org/project/drutex) which can process LaTeX files for viewing 
them in a web page, but since my TeX files are written for ConTeXt, I wonder if 
there is a simple way to do the same in Drupal with ConTeXt.

Or maybe I am going the wrong direction? 
Should I export through mkiv my TeX files to some other format than TeX for 
being understood by Drupal?
Actually my documents are essentially one page each, without any complicated 
layout or graphics: there is only some text, and items within two or three sets 
of \startitemize, \stopitemize. But they do contain maths and I would like to 
have them on the web pages.

Thanks in advance for any insight.

Best regards: OK


___
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] microtype + \overstrike + libertine problem

2010-11-22 Thread Marco Pessotto

Hello there.

I'm experience the following problem: with microtypography \overstrike
plays weird. See the following minimal. I can't reproduce it with the
latin modern fonts, so maybe it's a font specific issue.

I've found a workaround and documented it on the wiki (just in case)
http://wiki.contextgarden.net/Overstriking

%%% start minimal example, problems start a the 2nd recurse, p.2 %%%
\definefontfeature[default][default]
  [protrusion=quality,
expansion=quality,
script=latn] 
\usetypescript[libertine]
\setupbodyfont[10pt,libertine]
\setupalign[hz,hanging]
\setuppapersize[A6][A6]
\starttext
\dorecurse{20}{\input tufte \overstrike{test} \input tufte}
\stoptext
%%% stop minimal example%%% 

Best regards

-- 
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] New Release Winedt WORKS with MKIV!!

2010-11-22 Thread Mojca Miklavec
On Sun, Nov 21, 2010 at 10:03, barney schwartz wrote:
 New build of WinEdt 6.0 (Build: 20101121) has been uploaded to

 www.winedt.com

 This build contains macros that work with the latest ConTeXt Mark
 IV (previous versions were designed for older version of ConTeXt).
 If you are upgrading from older version of WinEdt make sure that
 the executable for ConTeXt in WinEdt's Execution Modes is set
context.exe (instead of old texexec.exe)...

 Just thought I would post this here for other Winedt users.

Thanks a lot for this notice (and thanks to Ulrike for debugging).
This is indeed very nice to know (it used to be my favourite editor a
while ago). I always thought that supporting ConTeXt needs heavy
hacking of WinEdt.

Mojca

(I'm still confused about whether it really doesn't/won't support
UTF-8 until version 7 since it is then almost useless for any
non-English speaking user for XeTeX and ConTeXt MKIV that are now
available in drop-down menu by default.)
___
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] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Ethan Merritt
On Monday, November 22, 2010 07:01:07 am Mojca Miklavec wrote:
 On Fri, Nov 19, 2010 at 00:38, Florian Wobbe wrote:
 
  Thanks, I just updated the CVS version of gnuplot with your files and gave 
  it a try: It works with minimals!
 
  [...]
 
  Feedback and patches welcome!
 
  No patches I'm afraid. But feedback goes here:
 
  1) The label text of the following key element takes the color of the 
  preceding key symbol. Minimal example:
 
   set terminal lua tikz fulldoc size 15cm,7cm context
   set output 'plot.tex'
   set xrange [ 0 : 13 ]
   f1(x)=sqrt(x)
   f2(x)=sqrt(x*0.8)-3
   plot f1(x) lc rgb 'blue', f2(x)
 
 Confirmed. I had the problems with that in my terminal as well, but I
 think that it was a buglet in metapost back then; oh, good old
 memories ... :) :) :) I didn't check the details about this one.
 
  2) Negative axis labels are set with hyphen instead of proper minus sign, 
  which should be longer (see example above).
 
 I'm not sure if this should really be fixed automatically or not. In
 order to fix this one would have to patch gnuplot core.
 
 I forgot the details how to do it (I can find it out), but you can
 configure the layout of labels. In particular you may enclose the
 number into math delimiters ($). Maybe something like
 set format y $%.1f$
 would work (you might want to change the size of left margin then).
 Doing any other kind of magic would be a bit dangerous. Keep in mind
 that
 plot 'x.dat' u 1:(2*$2)
 will also fail since TeX will interpret $ as math delimiter. But
 changing that behaviour would have other undesirable effects.
 
  3) First I thought luatex hangs but then I noticed TikZ is awfully slow 
  when drawing plots with large amounts of data points (the tikzpicture had 
  about 3000 lines). I can speed this up by reducing the size by invoking 
  plot with:
 
   plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]
 
  I wonder if there is a smarter way to do this in gnuplot.
 
 Using bitmap terminals. A while back I was dreaming about having
 mixed-mode with one terminal creating text labels and the other one
 (png for example) drawing the plot. But this needs some extra
 programming effort.

As I recall, I posted a patch the last time this discussion came up.
It turns off text output from the png terminal without affecting any
other graphical elements.  My though was that it could be the basis
of a pdflatex terminal class that works the same way as the current
epslatex terminals.  I can post it again, or upload it to SourceForge
if it isn't there already.

Ethan


 
 You would stumble against the same problem when using PS or PDF
 terminal, maybe only at a slightly bigger number of points.
 
 What I did for my theory of chaos reports and the million-of-points
 plots in my thesis was to create an empty plot with ConTeXt terminal,
 create a borderless plot with PNG and then manually insert PNG into
 the generated ConTeXt output, which you could do with TikZ output as
 well. It requires more effort, but there is no other way to speed up
 vector graphics. They are simply not suitable for drawing millions of
 points on the same plot.
 
 (Gnuplot also has a keyword 'every' to reduce the number of points,
 but in my case I wanted to plot all of them.)
 
 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
___