ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* RE: No straightforward .png support in ConTeXt?
@ 1998-06-20 17:14 Berend de Boer
  0 siblings, 0 replies; 6+ messages in thread
From: Berend de Boer @ 1998-06-20 17:14 UTC (permalink / raw)
  Cc: 'ntg-context@ntg.nl'

On Saturday, June 20, 1998 3:39 PM, Frans Goddijn [SMTP:fg@fgbbs.iaf.nl] 
wrote:

> > I just release pdfTeX-0.12o-3. This release includes:
> > pdftex.ch: fixed bug in compressed inclusion of PNG files - length of

ConTeXt has no build-in support for .png it seems, it misses a macro to 
extract the length. I assume it's quite easy to add it as LaTeX already has 
it. But maybe someone has already done so?

Groetjes,

Berend.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No straightforward .png support in ConTeXt?
@ 1998-06-21 19:35 Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 1998-06-21 19:35 UTC (permalink / raw)
  Cc: ntg-context

Frans Goddijn wrote:
> 
> said Berend de Boer  to All:
> 
>  BdB> enough. I find web2c far easier to  use/install that 4AllTeX
>  BdB> (which I tried before) but which doesn't work  quite well outside
>  BdB> 4dos.
> 
> That's like complaining a fish doesn't swim so well after you took out the
> spine... ;=}
> 
> I am also *very* excited about the context/web2c combination, but I also
> like 4TEX very much, and 4TEX was revolutionary when it came out first.
> It's still very strong, besides having some quirks.

Just some remarks: 

(1) Installing TeX has never been easy, think alone of all those fonts. 
(2) 4TeX aims at integrating as much tex related utilities as possible.
(3) Web2c+kpathsea use the TDS file structure and therefore can do 
    with one configuration file. 
(4) The next version 4TeX uses web2c.  

Also keep in mind that only since Thomas and Sebastian started their
distributions, unix installation became straight forward!

With context I want to be as independant as possible and therefore I
will need all your help. 

(1) The format should run on all platforms (which is not trivial given
differences in font handling and drivers) 
(2) TeXUtil should also run on all platforms (easy because it is perl).
(3) TeXExec (some day soon) should also work on all platforms. 

and 

(4) Maybe someday we will also port our ;project oriented' editing
environment. 

Just let me know if there are any problems. I soon will use unix too,
but due to some constraints will keep on runing W95/DOS versions.   

The main platforms/user dependant thing we will have to sort out soon is
fonts. I don't want context users to enter the messy field of hacking
fonts. For those intereseted in this topic: just mention/discuss your
wishes on this list. 

Hans 

-----------------------------------------------------------------
                                              Hans Hagen | PRAGMA
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No straightforward .png support in ConTeXt?
@ 1998-06-21 18:08 Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 1998-06-21 18:08 UTC (permalink / raw)
  Cc: 'Frans Goddijn', 'ntg-context@ntg.nl'

Berend de Boer wrote:
> 
> On Saturday, June 20, 1998 3:39 PM, Frans Goddijn [SMTP:fg@fgbbs.iaf.nl]
> wrote:
> 
> > > I just release pdfTeX-0.12o-3. This release includes:
> > > pdftex.ch: fixed bug in compressed inclusion of PNG files - length of
> 
> ConTeXt has no build-in support for .png it seems, it misses a macro to
> extract the length. I assume it's quite easy to add it as LaTeX already has
> it. But maybe someone has already done so?

See other mail. The release you use works ok with a new texutil. 

I attached a new version, beware, a bit ot beta, so keep the old one:

  texutil --fig *.png 

also try: 

  texutil --fig --epstopdf *.eps

(uses gs, so this command must be available)  

Add to spec-tpd:

\def\dotpdinsertpng#1#2#3#4#5#6#7#8%
  {\pdfimage width #6sp height #7sp #1\relax}

\def\dotpdinsertpdf#1#2#3#4#5#6#7#8%
  {\pdfimage width #6sp height #7sp #1\relax}

and things should work. 

Hans

-----------------------------------------------------------------
                                              Hans Hagen | PRAGMA
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No straightforward .png support in ConTeXt?
@ 1998-06-21 17:44 Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 1998-06-21 17:44 UTC (permalink / raw)


Berend de Boer wrote:

> The main problem was figuring out that I had to use texutil to get the
> sizes correct (this was the first time I tried to use figures within
> context).

TeX can only process non binary data. Therefore one has to use a
separate tool to determins figure dimensions. Because TeX can do text
input, eps illustrations can be processed (as well as pdf) although last
week at the pdftex list we found out that on Windows this can give
problems if we strickly follow the original tex implementation. 

Therefore, ConTeXt can either read the eps file directly or texutil.tuf
to determine the size. 

> The error message context gives in this case is really confusing: "figuur
> . niet te vinden".
> 
> Looking through the source this really means that no size for this figure
> could be find.

You can trick context by saying e.g. 

\externafigure[somename][type=xxx,preset=no,width=3cm,height=4cm]

But keep in mind that TeX has to know the dimension to reserve space. 

> With latex including a .png figure is really easy. Why is context not able

I'm not sure of the state of the implementation you use, but I guess png
is possible: 

\externalfigure[name][type=png,...]

Now the reason why LaTeX can determines the size, is simply that is uses
the fact that when one says: 

  \pdfimage name width ... height ... 

the figure is scaled ok. (thanks to pdf) But how about movies and pdf? 

Only the latest pdftex release supports pdf en jpg and tif. 

> to auto-determine the size of .png? I.e. I need a \dogetfiguresizepng. Is

Keep in mind that tex (latex/context) techically depend on some programe
to determine these! pdfTeX does scale by using width/height, but other
(dvi) drivers differ in this respect (e.g. scale). When you include
figures in 1:1, in pdftex you get back a box of the right size, somthing
you cannot do in dvi. Therefore the mechanisms I use are general,
non-pdftex specific!

> this routine available somewhere already?

If you can be patient for a few days, I'll upload the latest release.
Due to very recent developments in pdftex I extended the figure
mechanism. Given a suitable texutil.tuf file (you can generate one, but
also provide one yourself: if you add an entry: 

\presetfigure[name][type=png,width=...,height=...]

ConTeXt is pretty well able to include whatever illustration you want,
even ones that are not at you machine that moment. 

Back to the extensions: 

-   fully automatic type recognitions (so no problems when 
    switching from dvi to pdf, given that alternatives are 
    at hand)
-   direct scanning of figure
-   when not possible using or even calling directly for 
    texutil (now texutil can also read tif, png, jpg and 
    pdf)
-   automatic recognition of metapost (mps/eps) files and 
    automatic handling of fonts, clor conversion, direct pdf 
    conversion etc)
-   reusing inserts when possible (was already done with mps 
    figures)

For those unaware of some features already present: 

-   there is automatic scaling to the max: (b)(h)factor=max/fit/dimen
-   with width/height limitations checked
-   as well as isometric scaling
-   and width/height, scale or document design size scaling, etc etc 

(Well, we've been including eps and tif ever since we started with
context, with scaling tricks provided, so things are possible.)

Hans 

Again, keep in mind that, althought often possible, there are situations
where tex cannot determine boundingboxes, while texutil can. 

-----------------------------------------------------------------
                                              Hans Hagen | PRAGMA
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* No straightforward .png support in ConTeXt?
@ 1998-06-20 13:39 Frans Goddijn
  0 siblings, 0 replies; 6+ messages in thread
From: Frans Goddijn @ 1998-06-20 13:39 UTC (permalink / raw)


said Berend de Boer  to All:

 BdB> enough. I find web2c far easier to  use/install that 4AllTeX
 BdB> (which I tried before) but which doesn't work  quite well outside
 BdB> 4dos.

That's like complaining a fish doesn't swim so well after you took out the
spine... ;=}

I am also *very* excited about the context/web2c combination, but I also
like 4TEX very much, and 4TEX was revolutionary when it came out first.
It's still very strong, besides having some quirks. 

By the way did you see that:

> From: "Pavel Janik ml." <Pavel.Janik@inet.cz>
> I just release pdfTeX-0.12o-3. This release includes: 
> pdftex.ch: fixed bug in compressed inclusion of PNG files - length of
> picture is exactly n x pdfbufsize and buffer is not written... Thanks to
> Fabrice.
> ftp://ftp.cstug.cz/pub/tex/local/cstug/janik/pdftex-0.12o-3

Met hartelijke groet!

 Frans Goddijn   | bbs: +31 (0)26 3217041
 Postbus 30196   | email: fg@fgbbs.iaf.nl
 6803 AD Arnhem  | tel: +31 (0)26 3219342
 The Netherlands | http://www.iaf.nl/Users/Meridian 
--
You are what you is


^ permalink raw reply	[flat|nested] 6+ messages in thread

* No straightforward .png support in ConTeXt?
@ 1998-06-20 10:57 Berend de Boer
  0 siblings, 0 replies; 6+ messages in thread
From: Berend de Boer @ 1998-06-20 10:57 UTC (permalink / raw)


Hai All,

I just installed ConTeXt (together with web2c win32 TeX from the TeX Live 
CD), and it took my about 4 hours before I had the first .png included. 
Installing web2c was easy (although the install.exe didn't work) but 
manually copying the files was enough. I find web2c far easier to 
use/install that 4AllTeX (which I tried before) but which doesn't work 
quite well outside 4dos.

The main problem was figuring out that I had to use texutil to get the 
sizes correct (this was the first time I tried to use figures within 
context).

The error message context gives in this case is really confusing: "figuur 
. niet te vinden".

Looking through the source this really means that no size for this figure 
could be find.

With latex including a .png figure is really easy. Why is context not able 
to auto-determine the size of .png? I.e. I need a \dogetfiguresizepng. Is 
this routine available somewhere already?

Groetjes,

Berend.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-06-21 19:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-20 17:14 No straightforward .png support in ConTeXt? Berend de Boer
  -- strict thread matches above, loose matches on Subject: below --
1998-06-21 19:35 Hans Hagen
1998-06-21 18:08 Hans Hagen
1998-06-21 17:44 Hans Hagen
1998-06-20 13:39 Frans Goddijn
1998-06-20 10:57 Berend de Boer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).