19

What is the command and parameters that I would type in to generate and save a dvi output from my latex file? In other word I want the dvi file instead of/ or in addition to the pdf file. I use TexWorks. What folder would I run this command from? I am not an experienced Latex user. Will the command and parameters be different if I am using TexWorks to run a LuaLatex vs a pdfLatex? I also use Windows 7 64bit operating system.

I am trying to get an image of tikz graphics I have produced with braille labels (using a systems font) that is SVG/JPEG/GIF so that I can import it into Tiger embosser software. The procedure that I was told to use by my boss is to take a screenshot of the pdf, copy and paste that into word, and then paste from word into the Tiger Software suite. So far, when I copy and paste a screenshot of the graphic the braille labels are misread. One dot is seen as 2 or 3 dots, which I assume is because of the difference in resolution. Then I have to spend time erasing all the labels and redoing them in the printer software suite, which is like paint, but worse.

I read that one can convert the dvi file to image file types like jpeg etc here. I am also trying to get an image file so that I can set the resolution of the image in another software like Gimp. I think I need a resolution of 20 dpi because the image is to be "printed" with an embosser printer that has that resolution. The file type that the printer uses as an input is a .prn.

Ultimately, I am trying to convince the staff here at Disability services that working in Latex would be beneficial, but it is a hard sell since no one else wants to learn it. I think it would make a difference if I could show them that it could save them time and make better graphics.

  • 1
    latex myfile will produce myfile.dvi. run the command from whichever directory myfile.tex resides. pdflatex does not produce a dvi file – cmhughes Feb 28 '14 at 19:34
  • If you want to use the LuaTeX engine, you can run dvilualatex myfile – karlkoeller Feb 28 '14 at 19:37
  • why do you want a dvi file? – David Carlisle Feb 28 '14 at 20:23
  • @DavidCarlisle pstricks for example only works through the dvi->ps route – Markus Feb 28 '14 at 20:57
  • @Markus yes but that's why I asked eg for that it is probably better tested to use xetex than dviluatex – David Carlisle Feb 28 '14 at 21:00
  • @Markus That only requires that you have the DVI file 'in passing': see for example http://tex.stackexchange.com/questions/85417/configuring-texworks-processing-tools – Joseph Wright Feb 28 '14 at 21:08
  • @karlkoeller: I have doubts that dvilualatex will be useful. If the document uses system fonts no driver will be able to process the dvi further. And without system fonts there is not much gained with luatex. – Ulrike Fischer Mar 01 '14 at 18:52
  • @DavidCarlisle The reason I want the dvi is because I am trying to convert the tikz graphics with braille labels to an image that can be printed on a tiger embosser, which prints raised line drawings for the blind. The resolution of the printer is 20 dpi, and the printer software only reads proprietary .prn files. It's a pain to make them and add the braille labels again one by one when I already have it done it LuaLatex. When I copy and paste the graphics into the Tiger software it doesn't interpret the braille dots correctly. one dot turns into two, etc. because of the diff resolution. – LauraHelene Mar 03 '14 at 22:49
  • @user47010 but I don't see anything in your comment that suggests why you would want dvi output. – David Carlisle Mar 03 '14 at 23:20
  • @DavidCarlisle I researched how to make a jpeg/svg/gif from a latex file and found some info about converting from the dvi. I couldn't find any info about other ways to do it. I edited my post to include more info. – LauraHelene Mar 03 '14 at 23:44
  • Regarding your edit: You can also convert directly from PDF to an (other) image format. If this is your real aim, then you do not need DVI. You can for example import PDF files into GIMP. – Speravir Mar 04 '14 at 02:11
  • @Speravir Thanks! That did the trick for changing the file format. However I never could come up with a solution to get the resolution to match the resolution of the Tiger printer software so that a braille dot would be recognized as one dot. Thank you to everyone for all of your replies. – LauraHelene Mar 05 '14 at 02:28
  • @user47010: I do not know this Tiger embosser software at all. Isn’t there any documentation, where you can read about needed resolution? Perhaps you should also try to use an altenative image editor? Especially Inkscape should be a good choice, because everything in it is treated in vector format, and not yet converted to raster format before exporting (in GIMP is is coverted already on import if I remember correctly). ImageMagick was already mentioned. I personally would use Irfanview (Windows software). – Speravir Mar 05 '14 at 03:18
  • @user47010: And forgotten I would use PNG images if possible (should not be too big for your purpose) in highest quality, or at least JPG in highest quality, but JPG has very often some compression artifacts also with 100% quality. Maybe this tricks out your software. – Speravir Mar 05 '14 at 03:37

2 Answers2

8

To answer the question, though it turned out, that the real aim is to produce raster images for a special Braille letter printer.

In general to produce a DVI file one has to compile the TeX source <filename>.tex simply with LaTeX …

latex <filename>

or for LuaLaTeX with the DVI compiler version …

dvilualatex <filename>

Depending on the TEX source contents there may be more options necessary (for example --src-specials).

In TeXworks according typeset profiles are not existant, though, and would have to be added manually.

The produced DVI can then further converted on different possible ways into PDF format. It will by default not be deleted automatically, so unless you let later run a cleaning routine you will preserve both DVI and PDF files.

Possible conversion ways for DVI to PDF:

  • produce a Postscript file with dvips, then convert this PS file to PDF with ps2pdf
  • direct conversion with dvipdfm or dvipdfmx
Speravir
  • 19,491
1

While it is possible to go .tex --> .dvi --> .pdf, modern tools (pdflatex and its ilk) generate PDF directly. And there are several (not so) subtle differences between regular latex and the newer tools. So be careful.

What do you want the DVI file for in the first place?

vonbrand
  • 5,473
  • To your re-question: See edited question of OP: “I read that one can convert the dvi file to image file types like jpeg etc …”. See also my comment below question. – Speravir Mar 04 '14 at 02:13
  • OK, but a PDF can also be converted to a plethora of formats using ghostscript, and probably also using Adobe's tools (at the end of the day, somewhere PDF is translated into a raster format at least for printing or display). – vonbrand Mar 04 '14 at 02:28
  • Yes, I was writing this in my comment below OP’s question … – Speravir Mar 04 '14 at 03:39
  • Texstudio is too slow for a 400-page book. I was told that making a DVI is faster than PDF, so I want to preview a DVI instead. How do I do that in Texstudio. Now it is previewing a PDF. – Echeban Feb 21 '21 at 14:50