Re: [NTG-context] \bufferprefix in MKIV

2011-01-27 Thread Hans Hagen

On 26-1-2011 11:53, Wolfgang Schuster wrote:


Am 26.01.2011 um 17:46 schrieb Mojca Miklavec:


Dear Hans,

one of the latest versions of MKIV breaks the following code:
\edef\GNUPLOTfile  {\bufferprefix gnuplot-\GNUPLOTnumber}%
since \bufferprefix is not defined any more. Is there any reason for
that? In particular ...


MkIV stores the buffer content in memory and therefore no external
file was generated which needed a protected name with \bufferprefix.


Indeed, I'm in the process of removing some of these 'no longer needed 
features', sorry for the noise.


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] Pdfselect in texexec not working!?

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

Hans Hagen wrote:


On 26-1-2011 10:40, Thomas Schmitz wrote:


You have to update. This has been fixed (and discussed here).



also, there is now a mkiv variant:

context --extra=select --help

(in due time all those texexec extras will become mkiv ones i.e. no 
longer hard coded in the script but a special sort of style)


Hans

...


Hi,

Sorry for bothering you all again about selecting pages to print!

Yesterday I updated and now use ConTeXt  ver: 2011.01.26 11:02 MKIV  
fmt: 2011.1.26!


When I enter the command:

context --extra=select --help

no output is generated!

When I enter for example the command

context --extra=combine --help

a set of options is described as aspected!

The subject was discussed in this forum according to Hans, but I can't 
find it, sorry!


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] Pdfselect in texexec not working!?

2011-01-27 Thread Hans Hagen

On 27-1-2011 11:13, Verhaag, G.C.H.M. wrote:


The subject was discussed in this forum according to Hans, but I can't
find it, sorry!


add the attached to context/base and run mtxrun --generate



-
  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
-
% engine=luatex

%D \module
%D   [   file=mtx-context-select,
%Dversion=2008.11.10, % about that time i started playing with this
%D  title=\CONTEXT\ Extra Trickry,
%D   subtitle=Listing Files,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright=\PRAGMA]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This is a \TEXEXEC\ features that has been moved to \MKIV.

% begin help
%
% usage: context --extra=select [options] list-of-files
%
% --sort: sort filenames first
% --topspace=dimension  : distance above first line
% --backspace=dimension : distance before left margin
% --selection=list  : n:m,p:q,...
% --paperformat=spec: paper*print or paperxprint or 'fit'
% --interaction : add hyperlinks
%
% end help

\input mtx-context-common.tex

\setuppapersize
  [\getdocumentargumentdefault{paperformat_from}{A4}]
  [\getdocumentargumentdefault{paperformat_to}{A4}]

\setuppaper
  [offset=\getdocumentargumentdefault{paperformat_to}{0pt}]

\setuplayout
  [width=middle,
   height=middle,
   topspace=\getdocumentargumentdefault{topspace}{0pt},
   backspace=\getdocumentargumentdefault{backspace}{0pt},
   location=middle,
   header=0pt,
   footer=0pt]

\doif {\getdocumentargument{marking}} {yes} {
\setuplayout
  [marking=on]
}

\doif {\getdocumentargument{interaction}} {yes} {
\setupinteraction
  [state=start]
\setupexternalfigures
  [interaction=yes]
}

\setupexternalfigures
  [directory=]

\doifelse {\getdocumentargument{paperformat_paper}} {fit} {
\doifdocumentfilename {1} {
\getfiguredimensions
  [\getdocumentfilename{1}]
\definepapersize
  [fit]
  [width=\figurewidth,
   height=\figureheight]
\setuppapersize
  [fit]
  [fit]
}
}

\starttext

\startluacode

local papersize = document.arguments.paperformat_paper or A4
local printsize = document.arguments.paperformat_print or A4
local selection = document.arguments.selection or 
local textwidth = document.arguments.textwidth or 0cm -- needed ?

if #document.files == 0 then
context(no files given)
elseif selection ==  then
context(no selection given)
else
if document.arguments.sort then
table.sort(document.files)
end
for _, filename in ipairs(document.files) do
if not string.find(filename,^mtx%-context%-) then
context.filterpages (
{ filename },
{ selection },
{ width = textwidth }
)
end
end
end

\stopluacode

\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] first-setup for windows

2011-01-27 Thread Hans Hagen

On 26-1-2011 8:31, Mojca Miklavec wrote:

I would like to ask windows users to test the attached setup file if
it works any better (and to make sure that I didn't do any mistakes
while typing).

I have put the updated version of first-setup.sh on the server
already, but for Windows I simply don't dare to do it until somebody
confirms that it seems to be ok. In both cases it would be great to
get feedback if the problems with missing files are solved.

Mojca

PS: please remove the .txt ending (gmail doesn't allow sending .bat files)


staring at it ... CONTEXTPATH and CONTEXTROOT are used but only one is 
defined



-
  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] Left margin not working in context.

2011-01-27 Thread Julius Canute
I want to adjust the left-margin but the change is not getting reflected.
___
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] Left margin not working in context.

2011-01-27 Thread Wolfgang Schuster

Am 27.01.2011 um 11:41 schrieb Julius Canute:

 I want to adjust the left-margin but the change is not getting reflected.

Change “backspace”.

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] thin and narrow unicode spaces not rendered

2011-01-27 Thread Peter Münster
Hello,

The thin space and the narrow no-break space are not typeset:

\starttext
THIN SPACE (U+2009): 50 \%

NARROW NO-BREAK SPACE (U+202F): 50 \%

NO-BREAK SPACE (U+00A0): 50 \%

\type{\,}: 50\,\%
\stoptext

About one year ago, this used to work. Bug or feature?

-- 
   Peter
___
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] math mode underbar broken ?

2011-01-27 Thread Hans Hagen

On 26-1-2011 11:54, Steffen Wolfrum wrote:


I just came across this discrepancy:

\starttext

\startformula
   H_1 + H_A = f(\underbar{α})
\stopformula

$  H_1 + H_A = f(\underbar{α}) $

\startformula
   H_1 + H_A = f(\overbar{α})
\stopformula

$  H_1 + H_A = f(\overbar{α}) $


\stoptext

Is this known or is under/overbar broken in display math mode?


it's a side effect of a buglet in luatex, the next beta works around it 
for pre 0.70 versions


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] tooltips broken (beta)

2011-01-27 Thread Peter Rolf
Hi Hans,

with the beta 2011.01.26 11:02 and the attached example (tooltip.tex)
compilation break with

[..]
javascript  : loading script set fld
! LuaTeX error r:/tex/texmf-context/tex/context/base/supp-fil.lua:322:
attempt to call local 'failure' (a nil value)
stack traceback:
r:/tex/texmf-context/tex/context/base/supp-fil.lua:322: in function
'uselibrary'
r:/tex/texmf-context/tex/context/base/java-ini.lua:151: in function
'usescripts'
main ctx instance:1: in main chunk.
\douseJSscripts ...pts.usescripts(\!!bs #1\!!es )}
  \douseJSpreamblenow {#2}
to be read again
   \globallet
\loadfieldscripts -\useJSscripts [fld]\globallet
  \loadfieldscripts \relax
\doprocessfield ... \begingroup \loadfieldscripts
  \edef
\currentfieldname {#...
to be read again
   }
\dotooltip ...fitfield [\currentsystemfield :txt]}
  }\dimen 0=\ifdim \wd
0=\ze...
l.5 \tooltip{\CONTEXT}{a \TEX\ macropackage}

?


mkii works, but I get black text on black background for the tooltip.


Best wishes,  Peter
\setupinteraction[state=start]

\starttext

\tooltip{\CONTEXT}{a \TEX\ macropackage}

\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] first-setup for windows

2011-01-27 Thread Mojca Miklavec
 staring at it ... CONTEXTPATH and CONTEXTROOT are used but only one is
 defined

Thanks a lot for noticing. It was just a typo, fixed (but maybe not
yet updated on the server).

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] reference tag for equations.

2011-01-27 Thread Jeong Dalyoung
Dear Aditya,

It was my dumb question.

Thank you.

Best regards,

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

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


Re: [NTG-context] Widgets color option not working with Mark IV

2011-01-27 Thread Hans Hagen

On 26-1-2011 2:58, Reviczky, Adam wrote:

it was not yet implemented (passing the info was, but not adding it to
the pdf stream)

i uploaded a new beta


Thanks, color and fontsize works perfectly now!

Could you also have a look at whats going on with the alignment to the first 
field?

And since we're at it, I can't get the field+javascript working with mkiv, is 
that suppose to work?
All I want to do is the accented glyphs in a text field, aka:
\setupfield
[TextSetup][...][...][...]
[,
regionin=JS(Initialize_TeX_Key),
afterkey=JS(Convert_TeX_Key),
validate=JS(Convert_TeX_String)]

Works with mkii, but has no effect with mkiv.


we need a real 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] Left margin not working in context.

2011-01-27 Thread Julius Canute
Thanks you so much. But why is it named so?
On Jan 27, 2011, at 4:27 PM, Wolfgang Schuster wrote:

 
 Am 27.01.2011 um 11:41 schrieb Julius Canute:
 
 I want to adjust the left-margin but the change is not getting reflected.
 
 Change “backspace”.
 
 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
 ___

___
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] tooltips broken (beta)

2011-01-27 Thread Hans Hagen

On 27-1-2011 12:51, Peter Rolf wrote:

Hi Hans,

with the beta 2011.01.26 11:02 and the attached example (tooltip.tex)
compilation break with


will be fixed (you can patch the error by if failure and not done then 
if you're in a hurry)


--

-
  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] automatically regenerate database before making format

2011-01-27 Thread Hans Hagen

On 26-1-2011 10:37, Mojca Miklavec wrote:

Hans,

you already check if the format is old and automatically launch the
equivalent of context --make if existing format is outdated. Why not
also automatically updating the database just before regenerating the
format?


ok

-
  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] tooltips broken (beta)

2011-01-27 Thread Peter Rolf
Am 27.01.2011 18:44, schrieb Hans Hagen:
 On 27-1-2011 12:51, Peter Rolf wrote:
 Hi Hans,

 with the beta 2011.01.26 11:02 and the attached example (tooltip.tex)
 compilation break with
 
 will be fixed (you can patch the error by if failure and not done then
 if you're in a hurry)
 
well, not directly in a hurry. but i have tested the current beta with
my examples and except from this problem all worked fine. with your fix
i can save the tree now, so thanks for that :-)
___
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] \bufferprefix in MKIV

2011-01-27 Thread Aditya Mahajan

On Wed, 26 Jan 2011, Wolfgang Schuster wrote:



Am 26.01.2011 um 17:46 schrieb Mojca Miklavec:


Dear Hans,

one of the latest versions of MKIV breaks the following code:
   \edef\GNUPLOTfile  {\bufferprefix gnuplot-\GNUPLOTnumber}%
since \bufferprefix is not defined any more. Is there any reason for
that? In particular ...


You should also take a look into Adityas filter module.


On a unrelated note, I have been thinking if I can extend the filter 
module to take care of features provided by lilypond and gnuplot modules. 
IIUC, in both these modules, the input is transformed before being written 
to an output file, then an external filter is run and the output is read 
back again. If we  restrict ourselves to MkIV, then the transforming the 
input can be done in a lua function; the filter module already takes care 
of the rest of the book-keeping.


Do you think that it makes sense to have such a feature? Then you could 
just define the gnuplot module as:


\usemodule[filter]

\defineexternalfilter[GNUPLOT]
   [filter={gnuplot --appropriate options},
conitnue=yes,
transformation=thirddata.GNUPLOT.transformation,
   ]

where thirddata.GNUPLOT.transformation is a lua function that does all the 
fancy processing.


What do you think?

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] \bufferprefix in MKIV

2011-01-27 Thread Hans Hagen

On 27-1-2011 8:08, Aditya Mahajan wrote:


where thirddata.GNUPLOT.transformation is a lua function that does all
the fancy processing.


What exactly does it replace then? preprocessing in gnuplot and lilypond?

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] new beta

2011-01-27 Thread Hans Hagen

On 26-1-2011 3:31, Alan BRASLAU wrote:

Here is a log.

Notice the instances of Please type another input file name:


In your log we find:

resolvers:
scanning path '/usr/local/context/beta/tex/texmf-context'
resolvers:
category 'files',
cachename '/usr/local/context/beta/tex/texmf-context'
saved in 
'/usr/local/context/beta/tex/texmf-cache/luatex-cache/context/78cdaa763136650bb930fd130bd15f12/trees/b7e28755b4f50587d17e2e62c0899e76.lua'


(/home/local/context/beta/tex/texmf-context/tex/context/base/catc-ini.mkiv
+ 
/home/local/context/beta/tex/texmf-context/tex/context/base/catc-ini.lua)

! I can't find file `catc-act.mkiv'.

Next time that you get this, at this message, you can do the following:

- check if the file catc-atc.mkiv is actually there
- look into 
'/usr/local/context/beta/tex/texmf-cache/luatex-cache/context/78cdaa763136650bb930fd130bd15f12/trees/b7e28755b4f50587d17e2e62c0899e76.lua' 
and see if there is an entry for this file


The weird thing is that other files are found.

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] Comment on new Page Design Chapter for new manual.

2011-01-27 Thread John Culleton
The question of page dimensions can be very confusing for the raw 
beginner. I suggest the something like the following as a lead in:
---
For a printed page we really have to deal with three different sets of 
dimensions. The body of the text exclusive of headers, footers etc. is 
called the type block. In TeX the measurements of the type block are 
called \hsize and \vsize. When text is being laid out each paragraph 
is generally no wider than the \hsize and when \vsize is exceeded the 
page is ended and a new one is started. 

The actual page size of the finished document is measured with 
\pdfpagewidth and \pdfpageheight. For most documents this is the last 
set of dimensions needed. In a few cases camera ready copy is 
required which means that the final printed page image is centered on a 
larger piece of paper stock, often with trim marks indicating the  
boundaries of the page size.

For example here are the dimensions for a book recently printed:
hsize =4.25 in
vsize =7 in

pdfpagewidth = 6 in
pdfpageheight = 9 in

stockwidth = 8.5 in
stockheight = 11 in.

---
The terminology may need some refinement but you get the idea. Think of 
the Man from Mars encountering Context and even TeX for the first 
time.
-- 
John Culleton
Create Book Covers with Scribus:
http://www.booklocker.com/p/books/4055.html
Typesetting and indexing http://wexfordpress.com
book sales http://wexfordpress.net
Free  barcode: http://www.tux.org/~milgram/bookland/

___
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] \bufferprefix in MKIV

2011-01-27 Thread Mojca Miklavec
On Thu, Jan 27, 2011 at 20:08, Aditya Mahajan wrote:

 On a unrelated note, I have been thinking if I can extend the filter module
 to take care of features provided by lilypond and gnuplot modules. IIUC, in
 both these modules, the input is transformed before being written to an
 output file

It is not really transformed, at least not in the case of gnuplot. At
the moment it is composed out of three parts (so it should be easier
to handle):
a) set term nameofterminal options; set output
jobname-gnuplot-number-term.extension
b) everything inside \startGNUPLOTinclusions ...
\stopGNUPLOTinclusions (that could be covered by continue=yes to some
extent)
c) everything inside \startGNUPLOTscript ... \stopGNUPLOTscript

But if I was to rewrite the code for MKIV, I would try to pipe input
to gnuplot and pipe it back to ConTeXt to avoid zillions of
intermediate files (and maybe also to make it slightly faster).

 then an external filter is run and the output is read back
 again. If we  restrict ourselves to MkIV, then the transforming the input
 can be done in a lua function; the filter module already takes care of the
 rest of the book-keeping.

 Do you think that it makes sense to have such a feature? Then you could just
 define the gnuplot module as:

 \usemodule[filter]

 \defineexternalfilter[GNUPLOT]
   [filter={gnuplot --appropriate options},
    conitnue=yes,
    transformation=thirddata.GNUPLOT.transformation,
   ]

What exactly would the transformation do? Append the first line (set
terminal etc.)?

Other functionality of current module includes features such as
   \setupGNUPLOTterminal[context][width=10cm,height=7cm,dashed=no]
but that is not part of your work.

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] \bufferprefix in MKIV

2011-01-27 Thread Aditya Mahajan

On Thu, 27 Jan 2011, Hans Hagen wrote:


On 27-1-2011 8:08, Aditya Mahajan wrote:


where thirddata.GNUPLOT.transformation is a lua function that does all
the fancy processing.


What exactly does it replace then? preprocessing in gnuplot and lilypond?


Yes... the preprocessing can be done more cleanly in lua. And these module 
will not have to do the book-keeping of creating external files and 
running programs on them. In addition, you get all the features of the 
filter module. So one could set the output directory:


\setupGNUPLOT[directory=gnuplot]

will create all temporary files in a 'gnuplot' directory.

If a figure depends on an external data-set, you can choose to always run 
gnuplot on it.


%by default only rerun if the file has changed
\setupGNUPLOT[continue=yes]


\startGNUPLOT[continue=no]
 ... read from data-set
\stopGNUPLOT


etc. Not to mention less maintenance for everyone.
___
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] \bufferprefix in MKIV

2011-01-27 Thread Mojca Miklavec
On Fri, Jan 28, 2011 at 00:37, Aditya Mahajan wrote:

 etc. Not to mention less maintenance for everyone.

Well ... I do almost-zero-maintainance as must be apparent from the
logs if anyone keeps them :) :) :)

We can take a look together to see if the modules can be made to work
nicely with each other.

Mojca

(But ... the gnuplot module needs to keep working for MKII. I don't
want to sacrifice that.)
___
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] \bufferprefix in MKIV

2011-01-27 Thread Aditya Mahajan

On Fri, 28 Jan 2011, Mojca Miklavec wrote:


On Fri, Jan 28, 2011 at 00:37, Aditya Mahajan wrote:


etc. Not to mention less maintenance for everyone.


Well ... I do almost-zero-maintainance as must be apparent from the
logs if anyone keeps them :) :) :)


:)


We can take a look together to see if the modules can be made to work
nicely with each other.


Lets take this off-list.


(But ... the gnuplot module needs to keep working for MKII. I don't
want to sacrifice that.)


Can you send me the latest version of the gnuplot module? 
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] Help regarding IEEE citation style

2011-01-27 Thread Mojca Miklavec
On Wed, Jan 26, 2011 at 16:10, Julius Canute wrote:
 I wan to cite references in my ConTeXt document using IEEE citation style. 
 Specifically for Web URL. How to do that using ConTeXt and BiBTeX?

It is quite possible that nobody has used IEEE citation style in
ConTeXt (I didn't check how it should look like).

However it is reasonably easy to modify the style by yourself (in
contrast to classical BibTeX and LaTeX). If you use pure bibtex
entries (.bib files) it is a bit more difficult to add new types of
bibliography items, but if you create the entries in ConTeXt, you have
almost unlimited capabilities. Take a look at bib module documentation
on http://modules.contextgarden.net/bibman.

Here is an example of how I start the bibilography file ...

% a new field to hold the name of conference
\newbibfield[conference]

% tell ConTeXt how the layout for new types should look like
\setuppublicationlayout[conference]{%
\insertartauthors{}{\unskip. }{}%
\insertarttitle{\bgroup }{\egroup. }{}%
\insertconference{\bgroup \it}{\egroup\insertday{, }{.
}{}\insertmonth{}{\ }{}\insertpubyear{}{}{}. }{}%
}
\setuppublicationlayout[webpage]{%
\inserttitle{\bgroup\it }{\egroup. }{}%
\inserturl{}{}{}%
}

% example of webpage entry
\startpublication
[k=FAIR,
 t=webpage,
 u=http://www.gsi.de/fair/,
]
\biburl{http://www.gsi.de/fair/}
\title{FAIR -- Facility for Antiproton and Ion Research}
\stoppublication

You might need to redefine \setuppublicationlayout[article] and others
to conform to their standard. See the files in tex/context/bib/.

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] Help regarding IEEE citation style

2011-01-27 Thread Aditya Mahajan

On Fri, 28 Jan 2011, Mojca Miklavec wrote:


On Wed, Jan 26, 2011 at 16:10, Julius Canute wrote:


I wan to cite references in my ConTeXt document using IEEE citation 
style. Specifically for Web URL. How to do that using ConTeXt and 
BiBTeX?


It is quite possible that nobody has used IEEE citation style in
ConTeXt (I didn't check how it should look like).


I am attaching a file that I used a couple of years ago. I haven't checked 
it with the latest version of the bib module.


Aditya%D \module

%D   [   file=bibl-ieee,

%Dversion=2007.06.25,

%D  title=IEEE bibliography style,

%D   subtitle=IEEE Publications,

%D author={Aditya Mahajan},

%D   date=\currentdate,

%D  copyright={Aditya Mahajan}]



\unprotect



%D The default mnemonics are not compatible with IEEE style.



\setuplabeltext [\s!en] [\v!january  :\s!mnem=Jan.]

\setuplabeltext [\s!en] [\v!february :\s!mnem=Feb.]

\setuplabeltext [\s!en] [\v!march:\s!mnem=Mar.]

\setuplabeltext [\s!en] [\v!april:\s!mnem=Apr.]

\setuplabeltext [\s!en] [\v!may  :\s!mnem=May]

\setuplabeltext [\s!en] [\v!june :\s!mnem=Jun.]

\setuplabeltext [\s!en] [\v!july :\s!mnem=Jul.]

\setuplabeltext [\s!en] [\v!august   :\s!mnem=Aug.]

\setuplabeltext [\s!en] [\v!september:\s!mnem=Sep.]

\setuplabeltext [\s!en] [\v!october  :\s!mnem=Oct.]

\setuplabeltext [\s!en] [\v!november :\s!mnem=Nov.]

\setuplabeltext [\s!en] [\v!december :\s!mnem=Dec.]



\setupbibtex  [sort=author]

\setuppublicationlist [maybeyear=off]



\setuplistalternative

  [ieee]

  [\c!distance=1em,

  \c!width=2em,

\c!stretch=0em,

\c!command=,

  ]



\setuppublicationlist 

  [\c!numbercommand=\!!ieee@brackets,

   \c!width=2em,

 \c!alternative=ieee,

  \c!samplesize={99},

  ]





%D This should probably go into the core.



\def\doverysimplebibnumref#1#2%

   {\refsep

\ifcase#1\relax \unknownreference{#1}\else

  \def\tempa{#2}\ifx\empty\tempa#1\else#1\docommaordash{#1}{#2}#2\fi

\fi}%



\def\docommaordash#1#2%

   {\doifelse{\the\numexpr#1+1-#2\relax}{0}%

 {\bibalternative\c!pubsep}%

 {\bibalternative\c!inbetween}}%



\setupcite

   [author,year]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={ },

\c!left={(},

\c!right={)}]



\setupcite

   [authoryear]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={ },

\c!left={(},

\c!right={)}]



\setupcite

   [authoryears]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={, },

\c!left={(},

\c!right={)}]



\setupcite

   [key,serial,authornum,page,short,type,doi,url]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!no,

\c!inbetween={ },

\c!left={[},

\c!right={]}]



\setupcite

   [num]

   [\c!andtext={ and },

\c!otherstext={ et al.},

\c!pubsep={, },

\c!lastpubsep={ and },

\c!compress=\v!yes,

\c!inbetween={]--[},

\c!left={[},

\c!right={]}]



%D This is the ugliest way to make sure that the number is right justified.

%D The trouble is that \filename{core-lst.tex} contains an explicit

%D \type|\hfill|.



\def\!!ieee@brackets#1%

  {\hbox \ifdim\!!widtha\zeropoint to \!!widtha \fi

   {\hss[#1]\hskip 0.5em}}



\setuppublications

   [\c!sorttype=cite,

\c!criterium=,

\c!refcommand=num,

\c!numbering=\v!yes,

\c!numbercommand=\!!ieee@brackets,

monthconversion=month:mnem]



\setuppublicationlist

   [\c!artauthor=\normalshortauthor,

\c!editor=\normalshortauthor,

\c!author=\normalshortauthor,

\c!namesep={, },

\c!lastnamesep={ and },

\c!finalnamesep={, and },

\c!firstnamesep={ },

\c!juniorsep={ },

\c!vonsep={ },

\c!surnamesep={ },

\c!authoretallimit=5,

\c!editoretallimit=5,

\c!artauthoretallimit=5,

\c!authoretaldisplay=5,

\c!editoretaldisplay=5,

\c!artauthoretaldisplay=5,

\c!authoretaltext={ et al.},

\c!editoretaltext={ et al.},

\c!artauthoretaltext={ et al.},

artauthorcommand=\!!ieee@repeatedauthors,

authorcommand=\!!ieee@repeatedauthors,

]



%D Just to be sure



\def\maybeyear#1{}

\def\etalchar#1{#1}



%D Show repeated authors by --



\def\!!ieee@oldauthors{}



\def\!!ieee@repeatedauthors#1#2#3%

{\xdef\!!ieee@newauthors{#3}%

  \ifx\!!ieee@oldauthors\!!ieee@newauthors

  --%

   \else

 \dospecialbibinsert{#1}{#2}{#3}%

 

[NTG-context] how to make 3-line header?

2011-01-27 Thread Jeong Dalyoung
Dear all,

I tried to make a chapter head with 3 lines as following:

Chapter #1

Main Title

subtitle


I looked up wiki and saw many good examples. I modified them to test the above 
structure. I am using 3 arguments. But it fails. It worked for only 2 arguments.
In simpleslide module, we can set many lines for a title. 
Is there a way of doing that? The following is a slight modification of one in 
the wiki. It worked for 2 arguments but not for 3.

Thank for reading.

Best regards,

Dalyoung


\setupcolors[state=start]

\setuphead[chapter][command=\Myheader]
%\setupheadtext[chapter=Chapitre]
%\defineoverlay[HeaderDeco][\uniqueMPgraphic{HeaderDeco}]

\def\Myheader#1#2%#3
{%
\framedtext
[width= \overlaywidth,
height=6\bodyfontsize,
background=screen,%{foreground,HeaderDeco},
offset=0pt,
strut=no,
frame=off,
align=middle]{%
{\tfb  #1 }%\headtext{chapter} #1
\blank[big]
{\ss\tfc #2}
%   \blank[small]
%{\ss\tfc #3}
}
}   
\starttext
  \chapter{ConTeXt}{It is good.}
\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] new beta

2011-01-27 Thread Alan BRASLAU
Hans,

Typing the full path name (in response to the prompt)
satisfies the program, and the installation process proceeds.
Mistyping the file name causes the prompt to be repeated,
so I assume that the file is indeed there.

Alan

On Thursday 27 January 2011 22:43:09 Hans Hagen wrote:
 On 26-1-2011 3:31, Alan BRASLAU wrote:
  Here is a log.
  
  Notice the instances of Please type another input file name:
 
 In your log we find:
 
 resolvers:
  scanning path '/usr/local/context/beta/tex/texmf-context'
 resolvers:
  category 'files',
  cachename '/usr/local/context/beta/tex/texmf-context'
  saved in
 '/usr/local/context/beta/tex/texmf-cache/luatex-cache/context/78cdaa7631366
 50bb930fd130bd15f12/trees/b7e28755b4f50587d17e2e62c0899e76.lua'
 
 (/home/local/context/beta/tex/texmf-context/tex/context/base/catc-ini.mkiv
 +
 /home/local/context/beta/tex/texmf-context/tex/context/base/catc-ini.lua)
 ! I can't find file `catc-act.mkiv'.
 
 Next time that you get this, at this message, you can do the following:
 
 - check if the file catc-atc.mkiv is actually there
 - look into
 '/usr/local/context/beta/tex/texmf-cache/luatex-cache/context/78cdaa7631366
 50bb930fd130bd15f12/trees/b7e28755b4f50587d17e2e62c0899e76.lua' and see if
 there is an entry for this file
 
 The weird thing is that other files are found.
 
 Hans
___
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 to make 3-line header?

2011-01-27 Thread Wolfgang Schuster

Am 28.01.2011 um 04:20 schrieb Jeong Dalyoung:

 Dear all,
 
 I tried to make a chapter head with 3 lines as following:
 
   Chapter #1
 
   Main Title
 
   subtitle
 
 
 I looked up wiki and saw many good examples. I modified them to test the 
 above structure. I am using 3 arguments. But it fails. It worked for only 2 
 arguments.
 In simpleslide module, we can set many lines for a title. 
 Is there a way of doing that? The following is a slight modification of one 
 in the wiki. It worked for 2 arguments but not for 3.

Why don’t you use \startchapter etc. where you can set your own values with the 
second argument.

http://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content

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] first-setup for windows

2011-01-27 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Dear Mojca,

On Wed, 26 Jan 2011 22:32:34 +0100, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:


So if you thought this would be useful (actually it may depend on whether an
explicit 'mtxrun --generate' after update is necessary what I don't know -


It *is* necessary if some new files appear. The problem was that
usually the wrong mtxrun was called which had zero effect since it
possibly updated the cache in TeX Live or some other ConTeXt
distribution (under another path).

You can try the following:
- make sure that there is no tex in your path (set PATH ...)
- delete texmf-cache
- delete some files (for example context.mkiv and a few random other files)
- call first-setup.bat (the modified version that I sent you without
an explicit mtxrun --generate)
- call setuptex (or manually set PATH)
- try to compile some file

The mtxrun --generate at the end of script doesn't really help since
already the format generation is broken if some new files arrive.


I updated Ctx yesterday.

I installed the new version of Ctx to an empty directory and I checked all 
TeX-related PATHs to not point to any TL directory (actually, the PATH doesn't 
point to any TL or Ctx directory - all this is performed by an appropriate 
batch which is called in the scope and just before compilation of a Ctx 
source); so I guess all previous auto-generated files and/or cache got unused.

I wrote a step-by-step report which I intended to send to you as I was afraid 
that I would have to call 'mtxrun --generate' explicitly.

But it was not necessary - I was able to compile a sample Ctx source without any problem 
as it was.

Not today.

Now, if I want to compile a Ctx file, I'm getting:

---
MTXrun | unknown script 'context.lua' or 'mtx-context.lua'
---

I know that 'mtxrun --generate' will repair this (as it always did so far).

- But I'm wondering about why 'mtxrun' doesn't find the 'context.lua' today 
although it did yesterday.

(I'm aware of cache directory, in my case at 
'c:\ConTeXt\tex\texmf-cache\luatex-cache\context\f53042fa2e1c106bc7e3383ec8c3a00c\'. Does 
Ctx/mxtrun generate also any [temporary] files elsewhere, e.g. in Document and Settings 
or Application Data or where TMP/TEMP system variable points?)

Could you explain, please?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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