5 ms·
I use Plain TeX with .dvi output. One advantage is that it can use the DVI format, which is in many ways much better than PDF for many things. (You can also con
by zzo38computer 7y ago
I use Plain TeX with .dvi output. One advantage is that it can use the DVI format, which is in many ways much better than PDF for many things. (You can also convert DVI to PDF and to other formats; I wrote a program to convert DVI to PBM (without using PostScript), and use that to print out the documents (through foo2zjs, which converts the PBM into the format needed by the printer).)
- mehrdadn 7y ago> DVI format, which is in many ways much better than PDF for many things Would you mind listing a few? I ask because, if my memory serves correctly, the only thing DVI ever accomplished for me was to make me want to poke my eyes out.
- zzo38computer 7y agoIt is much simpler, and many kind of post-processing can be done on it better too, and also you can compile the fonts per printer (DVI doesn't actually care about the font glyphs at all, and does not require that it is even a font glyph as is normally considered) as needed. If you have a printer that implements it, you could even do such things as cutting holes in pages, printing raised or engraved text, invisible ink, etc, without causing problems with software that does not support these things.
- jahewson 7y agoPDF too supports external font files, a multitude of font formats, and special ink layers (these are called “separations”). PDF also supports PostScript fonts, which are already compiled for your printer.
- zzo38computer 7y agoI didn't know that, but OK, so it does (although PostScript fonts won't be so good if you want to use bitmap fonts and stuff like that instead (I use METAFONT to compile bitmap fonts for the printer, and than use my own software to rasterize the page, by copying the generated font glyphs into the positions specified by the DVI file)). Still, DVI is simpler for many uses. I think PDF is too complicated.
- jahewson 7y agoPDF also supports bitmap fonts. It’s certainly complicated though!
- svat 7y agoOne of the primary advantages of the DVI format is that it is very simple: you can write a parser for it in an afternoon. It is basically a sequence of bytecode instructions of the form “move to position (h, v)” and “place the glyph at position p in font f”. This makes it easy to make minor edits and things like that.
- mehrdadn 7y agoOh that's cool! Thanks for sharing that!
- kccqzy 7y agoBut isn't PDF basically the same for simple text? At least once you use a tool to simplify your PDF by removing compression, object streams and whatnot. Moving to position is just `123 456 Td`. Placing a string at current position is just `(ABC) Tj`. Placing each glyph at different positions is just `[12 (A) 34 (B) 56 (C)] TJ`. I can do minor edits in PDF using just vim and qpdf.
- acqq 7y ago> At least once you use a tool to simplify your PDF by removing compression, object streams and whatnot. Can you please write a few details about that workflow? What do you do and how? I used to create .ps "by hand" (actually writing scripts) but I've never tried to start from PDF and then edit. How do you "remove compression, object streams and whatnot"? And some useful references (for those Tj TJ etc).
- lol768 7y agoNot OP, but I personally use QPDF. > QPDF is capable of creating linearized (also known as web-optimized) files and encrypted files. It is also capable of converting PDF files with object streams (also known as compressed objects) to files with no compressed objects or to generate object streams from files that don't have them (or even those that already do). QPDF also supports a special mode designed to allow you to edit the content of PDF files in a text editor. For more details, please see the documentation links below. $ qpdf --stream-data=uncompress input.pdf output.pdf http://qpdf.sourceforge.net/ http://qpdf.sourceforge.net/
- drfuchs 7y agoOuch! Sorry! Anything specific? (DVI is my design.)
- mehrdadn 7y agoHaha wow! Yeah sure, here's an example of what I mean: https://imgur.com/a/eX2BcIC https://imgur.com/a/eX2BcIC I'll refrain from elaborating on the difference between those (it's probably best if I don't), except to say that my jaws will probably shatter the floor if you tell me you don't see the difference. :-) (Probably worth saying that I have the same issue with PS; it's not just DVI. I do sometimes wonder if I'm the only one who sees these.)
- drfuchs 7y agoThere’s no context given, so it’s hard to tell why you’re ascribing the problem to dvi, rather than it being used sub-optimally. What’s the full tool chain being used? What’s the output device? Given that dvi doesn’t involve pixels, and lets you position any character anywhere on the page, with precisely known rules for rounding into resolution-specific device-space, you’ll have to be more specific about what you’re blaming dvi itself for.
- mehrdadn 7y agoHappy to provide context if you tell me what to provide... The "output device" is... my monitor? The toolchain is TeXLive for generating the files, and the usual viewer for each file type on Windows (Acrobat Reader for PDFs, and Evince for DVI). If you think it's Evince's fault I'd love to hear better alternatives, because I haven't found a single viewer that views DVIs any differently. And for input files, you can generate files via LaTeX pretty easily: % DVI: latex thisfile.tex % PDF: pdflatex thisfile.tex \documentclass{article} \usepackage{lipsum} \begin{document}\lipsum\end{document} If this is using it "sub-optimally" then I guess I don't know how to use it "optimally", and I'm happy to hear how. Remember, though, at the end of the day, I'm just an end-user. I just know that every time I try to view DVI and PS files I have to tear my eyes out, and that I don't have this struggle with PDFs. I neither know which particular person or place in the pipeline to assign the blame to, nor does knowing that make it any easier for me to read the text...