Re: [dev-context] piping to ConTeXt

2009-05-24 Thread Hans Hagen

Aditya Mahajan wrote:

On Sun, 24 May 2009, Mojca Miklavec wrote:


Maybe you can ask her to add that file :-)


Once we figure out if it's needed for this purpose at all.


There is already a use for it. When you type \input nonexistantfile, 
then you can type null at the tex prompt to make tex continue with the 
rest of the compilation. And there is no harm in adding the file, it is 
really small :)


i actually have in the past) removed that null.tex because i don't like 
that kind of hackery; also there are other ways to stop tex


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] piping to ConTeXt

2009-05-24 Thread Hans Hagen

Aditya Mahajan wrote:

On Sat, 23 May 2009, Mojca Miklavec wrote:


Hello Hans,

Asymptote developers wonder if there's a way to pipe to ConTeXt.


More precisely, they want to do the following:

context misc/null


*
\newbox\ASYbox
\newdimen\ASYdimen
\long\def\ASYbase#1#2{\leavevmode\setbox\ASYbox=\hbox{#1}\ASYdimen=\ht\ASYbox% 


\setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}
\font\ASYfont=lmr12 at 12pt\ASYfont\switchtobodyfont[12pt]%
%
(Please type a command or say `\end')
*\setbox\ASYbox=\hbox{$x$}


*
*
*
*
*
*
*(Please type a command or say `\end')
*\showthe\wd\ASYbox

6.67703pt.


a more context friendly way would be to load a module that defined a few 
commands, like


\newbox\ASYbox

\def\showASYdimensions
  {\immediate\write16{ASY whd:
  \the\wd\ASYbox\space
  \the\ht\ASYbox\space
  \the\dp\ASYbox\space}}

\long\def\setASYhbox#1%
  {\setbox\ASTbox\hbox{#1}\showASYdimensions}

\long\def\setASYvbox#1%
  {\setbox\ASTbox\vbox{#1}\showASYdimensions}

or whatever set of commands is needed. Kind of a ASY interface. That way 
we can finetune at the tex level, for instance:


\long\def\setASYhbox#1%
  {\setbox\ASTbox\hbox{\strut#1}%
   \showASYdimensions}

\long\def\setASYvbox#1%
 {\setbox\ASTbox\vbox{\forgetall\begstrut#1\endstrut}%
  \showASYdimensions}

which might give better output

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] piping to ConTeXt

2009-05-24 Thread Taco Hoekwater

Hans Hagen wrote:


a more context friendly way would be to load a module that defined a few 
commands, like


I think that is not the point. The point is that sometimes you want
to pipe input directly into context, and you simply can't at the
moment, because context and texexec refuse to run without an input
file name.

Everything else that is discussed in this thread is just a distraction.

Best wishes,
Taco


___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] piping to ConTeXt

2009-05-24 Thread Hans Hagen

Taco Hoekwater wrote:

Hans Hagen wrote:


a more context friendly way would be to load a module that defined a 
few commands, like


I think that is not the point. The point is that sometimes you want
to pipe input directly into context, and you simply can't at the
moment, because context and texexec refuse to run without an input
file name.


sure, that's why we have --pipe now


Everything else that is discussed in this thread is just a distraction.


indeed, but since we're discussing asymptote support it makes sense to 
see how we do it as convenient as possible (for instance i can imagine 
that graphics made that wat somehow need to match the parent doc and so)


as a side effect, context --global m-asymp with m-asymp being an empty 
file or one defining a few helpers would automatically enter scroll mode 
 -)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] piping to ConTeXt

2009-05-23 Thread Hans Hagen

Mojca Miklavec wrote:


Asymptote developers wonder if there's a way to pipe to ConTeXt. I
didn't start inspecting anything as I suspect that it's quite possible
that nobody has ever tried that so far.


i have no clue what that means; context is just using tex so anything 
that applies to tex (the engine) applies to context


do you know why this piping is needed?

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] piping to ConTeXt

2009-05-23 Thread Mojca Miklavec
On Sat, May 23, 2009 at 17:19, Aditya Mahajan wrote:

 Do you know someone who maintains a major ConText distribution.

Indeed I have very poor contacts (I don't know many people even if
they live in the same village).

 Maybe you can ask her to add that file :-)

Once we figure out if it's needed for this purpose at all.

Mojca
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] piping to ConTeXt

2009-05-23 Thread Aditya Mahajan

On Sun, 24 May 2009, Mojca Miklavec wrote:


Maybe you can ask her to add that file :-)


Once we figure out if it's needed for this purpose at all.


There is already a use for it. When you type \input nonexistantfile, then 
you can type null at the tex prompt to make tex continue with the rest 
of the compilation. And there is no harm in adding the file, it is really 
small :)


Aditya
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context