Making context produce dvi file.
![](https://secure.gravatar.com/avatar/8b3c344f0adba6016612e05447039f44.jpg?s=120&d=mm&r=g)
For one recurring task I first produce a booklet version 5.5. x 8.5in, then a straight pdf 8.5 x 11in, all controlled by modes. The third format is plain text. Others recommend dvi2tty for this conversion. But how do I get Context to produce a dvi file? The Context manual does not make this clear. I am on a Linux system. -- John Culleton Able Indexing and Typesetting Precision typesetting (tm) at reasonable cost. Satisfaction guaranteed. http://wexfordpress.com
![](https://secure.gravatar.com/avatar/386a116d129cdc597f2bb6210bbaff7a.jpg?s=120&d=mm&r=g)
On 9/11/06, John R. Culleton
For one recurring task I first produce a booklet version 5.5. x 8.5in, then a straight pdf 8.5 x 11in, all controlled by modes. The third format is plain text. Others recommend dvi2tty for this conversion. But how do I get Context to produce a dvi file? The Context manual does not make this clear.
I am on a Linux system. hmm, on my (one year old) system $> texexec file.tex make file.dvi and $> texexec --pdf file.tex make file.pdf
luigi
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
Hi, Humble, I would start in the preamble to sau \setupoutput[dvi] Willi luigi scarso wrote:
On 9/11/06, John R. Culleton
wrote: For one recurring task I first produce a booklet version 5.5. x 8.5in, then a straight pdf 8.5 x 11in, all controlled by modes. The third format is plain text. Others recommend dvi2tty for this conversion. But how do I get Context to produce a dvi file? The Context manual does not make this clear.
I am on a Linux system.
hmm, on my (one year old) system $> texexec file.tex make file.dvi and $> texexec --pdf file.tex make file.pdf
luigi _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
![](https://secure.gravatar.com/avatar/4b4ced3073feb2d1288a7744c747e62b.jpg?s=120&d=mm&r=g)
On Mon, 11 Sep 2006, John R. Culleton wrote:
But how do I get Context to produce a dvi file?
If I recall correctly from my time with TeXLive, dvi is the 'native' format of ConTeXt, which was less than handy with Windows.... i.e. you normally get dvi by *not* telling ConTeXt to make ps/pdf. (See beginner manual p. 6, second paragraph.) However, the systems have changed over the last couple of years and for example I now run the stand-alone WinConText that pdfs everything, whether I want it or not (I do, so it doesn't bother me), so this is not so self-evident any more. From http://wiki.contextgarden.net/First_Document I understand that most ConTeXt configurations now produce pdfs by default. On Linux you might be able to find the place where your \setupoutput[pdf] or texexec --pdf sits, if it's in a configuration file. On the other hand, I dug a bit into my stand-alone Windows distribution and didn't get any smarter by that. Now I know why my pdf opens automatically into Acrobat, but not how *not* to produce pdf (or ps). That was a very good question. :-) Mari (...three years with ConTeXt and I sound like a dinosaur...)
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Mari Voipio wrote:
On Mon, 11 Sep 2006, John R. Culleton wrote:
But how do I get Context to produce a dvi file?
If I recall correctly from my time with TeXLive, dvi is the 'native' format of ConTeXt, which was less than handy with Windows.... i.e. you normally get dvi by *not* telling ConTeXt to make ps/pdf. (See beginner manual p. 6, second paragraph.)
However, the systems have changed over the last couple of years and for example I now run the stand-alone WinConText that pdfs everything, whether I want it or not (I do, so it doesn't bother me), so this is not so self-evident any more. From http://wiki.contextgarden.net/First_Document I understand that most ConTeXt configurations now produce pdfs by default.
On Linux you might be able to find the place where your \setupoutput[pdf] or texexec --pdf sits, if it's in a configuration file. On the other hand, I dug a bit into my stand-alone Windows distribution and didn't get any smarter by that. Now I know why my pdf opens automatically into Acrobat, but not how *not* to produce pdf (or ps).
That was a very good question. :-)
Mari (...three years with ConTeXt and I sound like a dinosaur...)
texexec --dvips yourfile 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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/8b3c344f0adba6016612e05447039f44.jpg?s=120&d=mm&r=g)
On Monday 11 September 2006 11:21, Hans Hagen wrote:
Mari Voipio wrote:
On Mon, 11 Sep 2006, John R. Culleton wrote:
But how do I get Context to produce a dvi file?
texexec --dvips yourfile
Hans
Thanks! That works after excising some grqphics. Just as a matter of curiosity, why is the parameter --dvips and not dvi? -- John Culleton Able Indexing and Typesetting Precision typesetting (tm) at reasonable cost. Satisfaction guaranteed. http://wexfordpress.com
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
John R. Culleton wrote:
On Monday 11 September 2006 11:21, Hans Hagen wrote:
Mari Voipio wrote:
On Mon, 11 Sep 2006, John R. Culleton wrote:
But how do I get Context to produce a dvi file?
texexec --dvips yourfile
Hans
Thanks! That works after excising some grqphics. Just as a matter of curiosity, why is the parameter --dvips and not dvi?
because one can also say -dvipdfmx -- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
texexec --dvips yourfile
That works after excising some grqphics. Just as a matter of curiosity, why is the parameter --dvips and not dvi?
because one can also say -dvipdfmx
Trying a few tests here (TeXExec 6.2.0): 'texexec --dvi' seems equivalent to running 'texexec --dvips'. And, a small point of disagreement with the old man entry for texexec: 'texexec --output=dvi' produces pdf. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Sanjoy Mahajan wrote:
texexec --dvips yourfile
That works after excising some grqphics. Just as a matter of curiosity, why is the parameter --dvips and not dvi?
because one can also say -dvipdfmx
Trying a few tests here (TeXExec 6.2.0): 'texexec --dvi' seems equivalent to running 'texexec --dvips'.
And, a small point of disagreement with the old man entry for texexec: 'texexec --output=dvi' produces pdf.
line 116 in tex.rb in the ruby base path can be adapted: ['dvips','ps','dvi'] .each do |b| @@backends[b] = 'dvips' end untested
-Sanjoy
`Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
Hans Hagen wrote:
And, a small point of disagreement with the old man entry for texexec: 'texexec --output=dvi' produces pdf.
line 116 in tex.rb in the ruby base path can be adapted:
['dvips','ps','dvi'] .each do |b| @@backends[b] = 'dvips' end
That didn't change it, perhaps because of some clever code looking for prefix matches when processing options? (I need to study the code a bit more but that was one guess.) I tried the following file for fun: \setupcolors[state=start] \starttext \showcolor \stoptext 'texexec --dvi 1.tex' produces ps, via dvips, with or without the change to tex.rb. 'texexec --output=dvi 1.tex' produces pdf, with or without the change. The texexec.pl script produced dvi when given the --dvi option, but maybe it's a bad idea to allow generic dvi output (without going to postscript or pdf), for the reason you say: that the included specials depend on the backend, whether dvips or dvipsone etc. By the way I was pleasantly surprised that xdvi could display the colors in 1.dvi, I guess because ConTeXt generated direct postscript specials (like "ps: 0 0 1 setrgbcolor") rather than dvips's color specials. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Sanjoy Mahajan wrote:
Hans Hagen wrote:
And, a small point of disagreement with the old man entry for texexec: 'texexec --output=dvi' produces pdf.
line 116 in tex.rb in the ruby base path can be adapted:
['dvips','ps','dvi'] .each do |b| @@backends[b] = 'dvips' end
texexec --dvi test --nobackend ----------------------------------------------------------------- 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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
Hans Hagen wrote:
texexec --dvi test --nobackend
That works. As another test, using --output=dvi instead of --dvi produces pdf even with --nobackend. Just to be thorough, or difficult, I also tried texexec test --nobackend where pdftex is both front- and backend. It did the right thing (ran pdftex anyway and produced pdf).
--nobackend
Thanks, that switch was news to me. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
On 9/11/06, John R. Culleton wrote:
On Monday 11 September 2006 11:21, Hans Hagen wrote:
Mari Voipio wrote:
On Mon, 11 Sep 2006, John R. Culleton wrote:
But how do I get Context to produce a dvi file?
texexec --dvips yourfile
Hans
Thanks! That works after excising some grqphics. Just as a matter of curiosity, why is the parameter --dvips and not dvi?
Simple explanation: because it generates a PostScript file as well ;) But I'm supporting you in that question. I would also prefer to have a switch --dvi which would skip the "dvips" postprocessing part. And an answer to those who were wondering if ConTeXt doesn't produce dvi by default. Yes, it did once. And still does if you're using the old perl script "texexec.pl" which is becomming more and more deprecated (and not supported any more anyway). The new texexec ("texmfstart texexec.rb") should produce pdf by default, but it's mostly fault of (old) distributions, not your fault if you're still using the old scripts (you can influence that behaviour though). As far as I know only MikTeX 2.5 and Hans's standalone distros support that by default. tetex and Mac users still have to fix that by themselves if they want to switch to the usage of new ruby scripts. Mojca
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Mojca Miklavec wrote:
On 9/11/06, John R. Culleton wrote:
On Monday 11 September 2006 11:21, Hans Hagen wrote:
Mari Voipio wrote:
On Mon, 11 Sep 2006, John R. Culleton wrote:
But how do I get Context to produce a dvi file?
texexec --dvips yourfile
Hans
Thanks! That works after excising some grqphics. Just as a matter of curiosity, why is the parameter --dvips and not dvi?
Simple explanation: because it generates a PostScript file as well ;)
But I'm supporting you in that question. I would also prefer to have a switch --dvi which would skip the "dvips" postprocessing part.
--nobackend beware: there is no 'dvi' as such, there is alwasy backend specific code involved
And an answer to those who were wondering if ConTeXt doesn't produce dvi by default. Yes, it did once. And still does if you're using the old perl script "texexec.pl" which is becomming more and more deprecated (and not supported any more anyway).
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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
John, On Mon, 11 Sep 2006, John R. Culleton wrote:
For one recurring task I first produce a booklet version 5.5. x 8.5in, then a straight pdf 8.5 x 11in, all controlled by modes. The third format is plain text. Others recommend dvi2tty for this conversion. But how do I get Context to produce a dvi file? The Context manual does not make this clear.
Not that you asked, but dvitty does not seem to be the best way to get a plain text output. I am assuming that you do not have maths, otherwise text output will not make much sense. Assuming that you have a document with simple structure (title, section, header, etc), and not too complicated floats (figures and tables), and you want pdf and plain text, I think that starting from xml is better. For simple tasks, html is sufficient. For more complicated tasks, you will need to define your own xml schema. In either case, you can get a pdf with all the bells and whistles by compiling the xml (or html) file using context. To get a plain text output, open your file in a browser and save as text (lynx --dump or links -dump will work if the file is html) to get a text output. IMHO, this is much easier than trying to coax tex to output something that resemples a typewritter output (fixed width fonts, no hyphenation, etc) Aditya
![](https://secure.gravatar.com/avatar/b16ca16bcbc474a1ba15813999e212da.jpg?s=120&d=mm&r=g)
But how do I get Context to produce a dvi file?
Using the ruby texexec, do this: texexec --dvi file.tex The manual says that this is equivalent to texexec --output=dvi file.tex but that way produces pdf. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
participants (8)
-
Aditya Mahajan
-
Hans Hagen
-
John R. Culleton
-
luigi scarso
-
Mari Voipio
-
Mojca Miklavec
-
Sanjoy Mahajan
-
Willi Egger