Re: inverting ps/pdf (was: Avoiding dvi files ps files (off topic?))

2002-04-02 Thread Kalyan Mukherjea

My gosh!
   If I had known there would be so much encouraging response, I would
have written two years ago, when my cataracts first started to become
a real pain in the neck!

Thanks Krysztof, George (and others who wrote in reply):
   After receiving your replies I looked at the man page of xpdf
(I didn't know about this viwer! Am I ignorant!!) and found it has a --colourmap
option. I'll write to the author for a detailed explanation or quick
fix for purely text-based files; would it be appropriate to post the
result (if positive) on this list?

   In any case, I'd love to   see what  happens to Krysztof's
idea of   beer-on-hand topic for the EuroBachoTeX 2002
  conference, especially while having a bone-fire; pity I cannot
attend myself to sample the beer!

Thanks folks.
Kalyan

Krzysztof Leszczynski writes:
  On Thu, Mar 28, 2002 at 12:46:07PM +0100, Martin Schroeder wrote:
   On 2002-03-28 10:07:59 +0530, Kalyan Mukherjea wrote:
TeX document from him/her but it would be preferable if there were a
switch in the ps or pdf viewers which would simply interchange ff
(white) pixels for (00) black pixels. Is this a stupid/impossible
suggestion from a technology-ignorant person or is something available
for this purpose?
   
   At least GhostScript and xpdf have no such switch. It should be
   simple to implement; please contact the respective authors.
   
  
  I had a long talk with Piotr Pianowski (the author of psview) and
  he was talking with Piotr Strzelczyk and we've (in an independent
  way) come to similar conclusions. The problem __looks__ simple
  but it's certainly not.
  
  For instance, what should one do with illustrations? Should they
  be negativated too?  Perhaps... Now if the illustration is a text-based
  eps or a simple graphic it probably looks best if presented in negative,
  but if it's a bitmapped-full-coloured picture it _probably_ should be left
  intact.
  
  Now, the implementation also isn't as simple as it looks, even
  using the wonderful Ghostscript interpreter.  If you plan to convert
  the PDF to be still acrobat-friendly the problem are even worse
  
  This looks like a good beer-on-hand topic for the EuroBachoTeX 2002
  conference, especially while having a bone-fire.  Perhaps there
  should be an easy solution for 90% of postscript files living somewhere
  in the wild and 95% of simple ones, produced by text-only TeX and dvips..
  
  Happy Easter everybody
  
  --
  Krzysio Leszczynski
  



inverting ps/pdf (was: Avoiding dvi files ps files (off topic?))

2002-03-28 Thread Martin Schroeder

On 2002-03-28 10:07:59 +0530, Kalyan Mukherjea wrote:
 TeX document from him/her but it would be preferable if there were a
 switch in the ps or pdf viewers which would simply interchange ff
 (white) pixels for (00) black pixels. Is this a stupid/impossible
 suggestion from a technology-ignorant person or is something available
 for this purpose?

At least GhostScript and xpdf have no such switch. It should be
simple to implement; please contact the respective authors.

Best regards
Martin
-- 
http://www.tm.oneiros.de/calendar/2002/




Re: inverting ps/pdf (was: Avoiding dvi files ps files (off topic?))

2002-03-28 Thread Krzysztof Leszczynski

On Thu, Mar 28, 2002 at 12:46:07PM +0100, Martin Schroeder wrote:
 On 2002-03-28 10:07:59 +0530, Kalyan Mukherjea wrote:
  TeX document from him/her but it would be preferable if there were a
  switch in the ps or pdf viewers which would simply interchange ff
  (white) pixels for (00) black pixels. Is this a stupid/impossible
  suggestion from a technology-ignorant person or is something available
  for this purpose?
 
 At least GhostScript and xpdf have no such switch. It should be
 simple to implement; please contact the respective authors.
 

I had a long talk with Piotr Pianowski (the author of psview) and
he was talking with Piotr Strzelczyk and we've (in an independent
way) come to similar conclusions. The problem __looks__ simple
but it's certainly not.

For instance, what should one do with illustrations? Should they
be negativated too?  Perhaps... Now if the illustration is a text-based
eps or a simple graphic it probably looks best if presented in negative,
but if it's a bitmapped-full-coloured picture it _probably_ should be left
intact.

Now, the implementation also isn't as simple as it looks, even
using the wonderful Ghostscript interpreter.  If you plan to convert
the PDF to be still acrobat-friendly the problem are even worse

This looks like a good beer-on-hand topic for the EuroBachoTeX 2002
conference, especially while having a bone-fire.  Perhaps there
should be an easy solution for 90% of postscript files living somewhere
in the wild and 95% of simple ones, produced by text-only TeX and dvips..

Happy Easter everybody

--
Krzysio Leszczynski



Re: Avoiding dvi files

2002-03-27 Thread Mats Bengtsson

 To be truthful, I'd not even thought of pdf(la)tex. Yes, this may be a
 reasonable solution...expect that it produces pdf, not ps, files. I'm
 not sure, but I think that to print pdf files to my postscript printer
 they first would need to be converted to ps. I'm really not all that
 
 Have your sysadmin install something like magicfilter or apsfilter which
 can automagically detect .dvi or .pdf and do the Right Thing(tm) to
 generate postscript output.

On my Debian installation at home, this works excellently 
out of the box. However, for .dvi files it doesn't work for
documents with included graphics since the printer filter runs
dvips in some tmp or spool directory where it doesn't find the
.eps files.

   /Mats





Re: Avoiding dvi files

2002-03-27 Thread John Murdie

On 26 Mar, Sebastian Rahtz wrote:
 On Sun, Mar 24, 2002 at 06:04:50PM +, Helen McCall wrote:
 
 I have the set of Adobe Postscript
 manuals and cookbook etc as published by Addison Wesley which I bought
 some years ago. Is there a similar set of books as a definitive reference
 to PDF? If so can you tell me the name of the books and the publisher?
 
 You can download the entire spec for PDF from Adobe's web site.
 I don't think its formally published any more. 
 
 I advise reading Thomas Merz' book on PDF from Addison Wesley
 for cookbook reading.


I've just seen the Addison-Wesley PDF Reference Manual 1.4 in the local
Borders - after I finally bought the 1.3 edition last year, grrr!

-- 

John A. Murdie
Experimental Officer (Software)
Department of Computer Science
University of York
England




Re: Avoiding dvi files

2002-03-27 Thread Martin Schroeder

On 2002-03-26 10:36:26 +, Sebastian Rahtz wrote:
 You can download the entire spec for PDF from Adobe's web site.
 I don't think its formally published any more. 

But of course it is:
http://www.amazon.com/exec/obidos/ASIN/0201758393/ :-)

Best regards
Martin
-- 
http://www.tm.oneiros.de/calendar/2002/




Re: Avoiding dvi files

2002-03-27 Thread George White

On Sun, 24 Mar 2002, Helen McCall wrote:

 Having long hated Postscript hacking, I would like to use pdf in my
 programming as well if it is easier. I have the set of Adobe Postscript
 [...]

For a TeX-based workflow, metapost is worth considering.  Metapost
PS files are already flattened and can be translated to PDF without
the need for a full PS interpreter.  Hans Hagen has written TeX macros
to handle this.  His Metafun manual gives lots of examples (using
ConTeXt).

It is also worth noting that PDF pages are essentially Illustrator,
so in principle you could write a macro package to handle Illustrator
PS files.

--
George White [EMAIL PROTECTED] Halifax, Nova Scotia




Avoiding dvi files ps files (off topic?)

2002-03-27 Thread Kalyan Mukherjea

Hello teTeXnicians,
  I have been reading this thread in a slightly bemused
fashion. At first, it seemed that someone didn't  like typing the same
dvips + gv command over and over again. But surely that is easily
solved by using Emacs + AucTeX  AucTeX helps track LaTeX errors
and once no more errors remain, \C-c \C-c File  [Ret] causes dvips to
be run on the dvi output; one can even specify various command line
options. This is obviously not what you guys are talking about; I wish
I understood the problem: but I would like to put forward the CONVERSE
PROBLEM! .
 Because of visual impairment, I find it very difficult
(nearly impossible) to read black text on a white background. As a
mathematician all my documents are set with LaTeX and I view the
results using xdvi -rv (the reverse video switch).  My problem is that
most documents on the MathSci Net of AMS are in pdf or ps format and I
cannot read them. At times I have contacted the author and obtained a
TeX document from him/her but it would be preferable if there were a
switch in the ps or pdf viewers which would simply interchange ff
(white) pixels for (00) black pixels. Is this a stupid/impossible
suggestion from a technology-ignorant person or is something available
for this purpose?

Apologies in advance for  this, possibly,  off-topic intrusion.

Kalyan Mukherjea





Re: Avoiding dvi files

2002-03-26 Thread Mike Castle

In article [EMAIL PROTECTED],  [EMAIL PROTECTED] wrote:
Sebastian Rahtz wrote:
  Is it possible to setup tetex to produce postscript files instead of
  dvi? I find that I'm almost always converting the dvi to ps, either for
  printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
  almost in my sleep.

Why don't you use xdvi?

To be truthful, I'd not even thought of pdf(la)tex. Yes, this may be a
reasonable solution...expect that it produces pdf, not ps, files. I'm
not sure, but I think that to print pdf files to my postscript printer
they first would need to be converted to ps. I'm really not all that

Have your sysadmin install something like magicfilter or apsfilter which
can automagically detect .dvi or .pdf and do the Right Thing(tm) to
generate postscript output.

mrc

-- 
 Mike Castle  [EMAIL PROTECTED]  www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal (You are in a maze of twisty compiler features, all different); -- gcc



Re: Avoiding dvi files

2002-03-24 Thread David Kastrup

[EMAIL PROTECTED] writes:

  On Saturday, 23. March 2002 22:02, [EMAIL PROTECTED] wrote:
   Is it possible to setup tetex to produce postscript files instead of
   dvi? I find that I'm almost always converting the dvi to ps, either for
   printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
   almost in my sleep.
  
  Wouldn't it be a smart solution to write a simple script which contains these
  commands and does the conversion automatically ? You could name that script
  pstex for example and it would have a layout similar to
  
  tex $1
  dvips ...
  gv ...
 
 Yes, I'd thought of that...but it's not all that simple. I think the
 biggest hassle is writing code to check to see if the (la)tex file
 compiled properly... Guess I was hoping that someone had done it already
 :)

Somebody somewhere has written a big Makefile template for this, and
of course there are dozens of TeX environments around that do
things like this.

 However, I thought I'd read of some version of tex which did produce
 ps files directly. Maybe it's a commercial version or something.

pdflatex perhaps?  PDF nowadays is mostly as ubiquitous as PostScript.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]




Re: Avoiding dvi files

2002-03-24 Thread Klaus Dittrich

On Sat, Mar 23, 2002 at 02:02:38PM -0700, [EMAIL PROTECTED] wrote:
 
 Is it possible to setup tetex to produce postscript files instead of
 dvi? I find that I'm almost always converting the dvi to ps, either for
 printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
 almost in my sleep.
 
 -- 
 Bob van der Poel ** Wynndel, British Columbia, CANADA **
 EMAIL: [EMAIL PROTECTED]
 WWW:   http://users.uniserve.com/~bvdpoel
 

Once set ..

alias x=latex file.tex
alias y=dvips file.dvi -o file.ps
: file.ps
gv file.ps 

In gv switch on State-Watch file to automatically 
update the gv-screen after every change to file.ps.

This is espeacially usefull for documents with more
than one page. You can select the page your are working
on and stay there. 

Then for the trial and error phase you only have to
type x and y.

If you use gvim as your editor it opens its own window 
and puts itself into the background leaving the shell
command line of your terminal free.

gvim also understands latex and shows commands in 
different colors.

-- 
Best regards
Klaus 




Re: Avoiding dvi files

2002-03-24 Thread Sebastian Rahtz

On Sat, Mar 23, 2002 at 05:06:56PM -0700, [EMAIL PROTECTED] wrote:
 
 To be truthful, I'd not even thought of pdf(la)tex. Yes, this may be a
 reasonable solution...expect that it produces pdf, not ps, files. I'm
 not sure, but I think that to print pdf files to my postscript printer
 they first would need to be converted to ps
let your print spooler handle it

  I'm really not all that
 familiar with pdf, except that I know that xpdf doesn't display type3
 fonts properly
so dont use Type3 fonts

  and acroread is huge and slow.
a matter of opinion?

Is there some overwhelming
 reason to use pdf instead of ps?

yes, because we have pdftex but we dont have pstex! PDF is the
way things are going, because its much simpler than PS for software
writers 

-- 
Sebastian Rahtz  OUCS Information Manager
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431




Re: Avoiding dvi files

2002-03-24 Thread bvdpoel

Thomas Anders wrote:
 
 I'm quite surprised that nobody has mentioned latexmk yet:
 http://www.phys.psu.edu/~collins/software/latexmk-jcc/
 
 It's in Perl and works like a charm. Too bad it's not a proper
 CPAN _module_ that can be used in other projects.

Thanks for this pointer. Grabbed it, and it seems to work quite nicely!

 BTW, this thread is probably OT.

Yes, it got that way quite quickly ... I did start it off intending it
to be a simple tetex question...

-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: [EMAIL PROTECTED]
WWW:   http://users.uniserve.com/~bvdpoel





Avoiding dvi files

2002-03-23 Thread bvdpoel


Is it possible to setup tetex to produce postscript files instead of
dvi? I find that I'm almost always converting the dvi to ps, either for
printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
almost in my sleep.

-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: [EMAIL PROTECTED]
WWW:   http://users.uniserve.com/~bvdpoel





Re: Avoiding dvi files

2002-03-23 Thread Ingo Krabbe

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Saturday, 23. March 2002 22:02, [EMAIL PROTECTED] wrote:
 Is it possible to setup tetex to produce postscript files instead of
 dvi? I find that I'm almost always converting the dvi to ps, either for
 printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
 almost in my sleep.

Wouldn't it be a smart solution to write a simple script which contains these 
commands and does the conversion automatically ? You could name that script 
pstex for example and it would have a layout similar to

tex $1
dvips ...
gv ...

You may also need to cut the .tex extension from the filename and add .dvi 
and .ps extensions --
FN=`strip_ext $1` #system dependent 
DVINAME=$FN.dvi ...

CU INGO
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8nRizy6Pb53AsRKkRAqqYAKCE9oxPR8Q0x0CF3QxnRqf5AewD/QCeN36D
5kquc40TN/JlXF6Iysj/hzg=
=2MIZ
-END PGP SIGNATURE-



Re: Avoiding dvi files

2002-03-23 Thread bvdpoel

Sebastian Rahtz wrote:
 
 On Sat, Mar 23, 2002 at 02:02:38PM -0700, [EMAIL PROTECTED] wrote:
 
  Is it possible to setup tetex to produce postscript files instead of
  dvi? I find that I'm almost always converting the dvi to ps, either for
  printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
  almost in my sleep.
 
 this is why god (or other deity of your choice) gave you
 pdftex.  just use pdftex followed by xpdf|gv|acroread.

To be truthful, I'd not even thought of pdf(la)tex. Yes, this may be a
reasonable solution...expect that it produces pdf, not ps, files. I'm
not sure, but I think that to print pdf files to my postscript printer
they first would need to be converted to ps. I'm really not all that
familiar with pdf, except that I know that xpdf doesn't display type3
fonts properly and acroread is huge and slow. Is there some overwhelming
reason to use pdf instead of ps?

Thanks for the response.

-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: [EMAIL PROTECTED]
WWW:   http://users.uniserve.com/~bvdpoel





Re: Avoiding dvi files

2002-03-23 Thread bvdpoel

Ingo Krabbe wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Saturday, 23. March 2002 22:02, [EMAIL PROTECTED] wrote:
  Is it possible to setup tetex to produce postscript files instead of
  dvi? I find that I'm almost always converting the dvi to ps, either for
  printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
  almost in my sleep.
 
 Wouldn't it be a smart solution to write a simple script which contains these
 commands and does the conversion automatically ? You could name that script
 pstex for example and it would have a layout similar to
 
 tex $1
 dvips ...
 gv ...

Yes, I'd thought of that...but it's not all that simple. I think the
biggest hassle is writing code to check to see if the (la)tex file
compiled properly... Guess I was hoping that someone had done it already
:)

However, I thought I'd read of some version of tex which did produce ps
files directly. Maybe it's a commercial version or something.

Thanks for the reply
-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: [EMAIL PROTECTED]
WWW:   http://users.uniserve.com/~bvdpoel




Re: Avoiding dvi files

2002-03-23 Thread Ingo Krabbe

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday, 24. March 2002 01:10, [EMAIL PROTECTED] wrote:

 Yes, I'd thought of that...but it's not all that simple. I think the
 biggest hassle is writing code to check to see if the (la)tex file
 compiled properly... Guess I was hoping that someone had done it already

 However, I thought I'd read of some version of tex which did produce ps
 files directly. Maybe it's a commercial version or something.

It shouldn't be that hard to implement that. For your special case you have 
to run tex/latex in batch mode of course. You could pipe the stderr to a grep 
filter that searches for errors.

On the other hand if you aren't sure if there are errors in your tex you 
should enter a debug -- view cycle without producing the PS ! As long as the 
tex file isn't as you like it, xdvi is much better viewer than GV or any 
other postscript thing, since you can handle different page sizes in DVI 
files much more accurate than with gv or postscript streams, and its many 
many many times faster !!

As far as PDF is concerned, if you really have a native PS printer I cannot 
say anything about it but if you pipe your files through ghostscript to 
produce HP-PCL or Epson or some other printer format you are on the safer 
side, since ghostscript is quite good in handling PDF files, (as far as I 
know, blame me if I'm wrong). PDF files can also be viewed by gv or similar 
programs that use ghostscript to process input files. Though you lack some 
PDF specials, but ready to print files look quite good through gv, although I 
prefer xpdf.

CU INGO
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8nTF2y6Pb53AsRKkRAr49AJ91yXWaJInsAtCMcNFl0WUfzxla7QCfY4l5
4BxyNGQSDLkXvH5GhEavZVE=
=Jmci
-END PGP SIGNATURE-



Re: Avoiding dvi files

2002-03-23 Thread David Kastrup

[EMAIL PROTECTED] writes:

 Sebastian Rahtz wrote:
  
  On Sat, Mar 23, 2002 at 02:02:38PM -0700, [EMAIL PROTECTED] wrote:
  
   Is it possible to setup tetex to produce postscript files instead of
   dvi? I find that I'm almost always converting the dvi to ps, either for
   printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
   almost in my sleep.
  
  this is why god (or other deity of your choice) gave you
  pdftex.  just use pdftex followed by xpdf|gv|acroread.
 
 To be truthful, I'd not even thought of pdf(la)tex. Yes, this may be a
 reasonable solution...expect that it produces pdf, not ps, files. I'm
 not sure, but I think that to print pdf files to my postscript printer
 they first would need to be converted to ps. I'm really not all that
 familiar with pdf, except that I know that xpdf doesn't display type3
 fonts properly and acroread is huge and slow. Is there some overwhelming
 reason to use pdf instead of ps?

For printing, no, for electronic distribution of documents, yes.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]




Re: Avoiding dvi files

2002-03-23 Thread Sebastian Rahtz

On Sat, Mar 23, 2002 at 02:02:38PM -0700, [EMAIL PROTECTED] wrote:
 
 Is it possible to setup tetex to produce postscript files instead of
 dvi? I find that I'm almost always converting the dvi to ps, either for
 printing or even on-screen viewing ... I can type 'dvips ...; gv ...'
 almost in my sleep.

this is why god (or other deity of your choice) gave you
pdftex.  just use pdftex followed by xpdf|gv|acroread.

-- 
Sebastian Rahtz  OUCS Information Manager
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431