====== Making PDF documents from (La)TeX ====== There are three general routes to PDF output: Adobe's original "distillation" route (via PostScript output), direct conversion of a DVI file, and the use of a direct TeX-like PDF generator such as [[1_generalites:glossaire:qu_est_ce_que_pdftex|pdfTeX]]. For simple documents (with no hyper-references), you can either * process the document in the normal way, produce PostScript output and distill it; * (on a Windows or Macintosh machine with appropriate tools installed) pass the output through a PDFwriter in place of a printer driver. This route is only appropriate for simple documents: PDF writers cannot create hyperlinks; * process the document with "vanilla" LaTeX and generate PDF direct from the DVI using ''dvipdfm''/''dvipdfmx''; or * process the document direct to PDF with pdfTeX, [[1_generalites:glossaire:qu_est_ce_que_luatex|LuaTeX]], or [[1_generalites:glossaire:qu_est_ce_que_xetex|XeTeX]]. To translate all the LaTeX cross-referencing into Acrobat links, you need a LaTeX package to redefine the internal commands. There are two of these for LaTeX, both capable of conforming to the [[3_composition:document:comment_faire_un_document_hypertexte|HyperTeX specification]]: Heiko Oberdiek's [[ctanpkg>hyperref]], and Michael Mehlich's [[ctanpkg>hyper]]. (In practice, almost everyone uses [[ctanpkg>hyperref]]; [[ctanpkg>hyper]] hasn't been updated since 2000.) [[ctanpkg>Hyperref]] can often determine how it should generate hypertext from its environment, but there is a wide set of configuration options you can give via ''\usepackage''. The package can operate using pdfTeX primitives, the hyperTeX ''\special''s, or DVI driver-specific ''\special'' commands. Both ''dvips'' and Y&Y's ''DVIPSONE'' can translate the DVI with these ''\special'' commands into PostScript acceptable to Distiller, and ''dvipdfm'' and ''dvipdfmx'' have ''\special'' commands of their own. If you use Plain TeX, the [[1_generalites:glossaire:qu_est_ce_que_eplain|Eplain macros]] can help you create PDF documents with hyper-references. It can operate using pdfTeX primitives, or ''\special'' commands for the ''dvipdfm''/''dvipdfmx'' DVI drivers. While there is no free implementation of all of //Adobe Distiller//'s functionality, any but the implausibly old versions of [[https://www.ghostscript.com/|Ghostscript]] provide pretty reliable distillation (but beware of the problems with [[5_fichiers:pdf:generer_un_fichier_pdf_de_qualite|“dvips” output for distillation]]). For viewing (and printing) the resulting files, Adobe's //Acrobat Reader// is available for a fair range of platforms; for those for which Adobe's reader is unavailable, remotely current versions of [[https://www.ghostscript.com/|Ghostscript]] combined with ''gv'' or ''[[http://www.ghostgum.com.au/|gsview]]'' can display and print PDF files, as can ''xpdf''. In some circumstances, a ''[[https://www.ghostscript.com/|ghostscript]]''-based viewer application is actually preferable to Acrobat Reader. For example, on Windows Acrobat Reader locks the ''pdf'' file it's displaying: this makes the traditional (and highly effective) (La)TeX development cycle of "Edit$\rightarrow$Process$\rightarrow$Preview" become rather clumsy --- ''[[http://www.ghostgum.com.au/|gsview]]'' doesn't make the same mistake. ----- //Source:// [[faquk>FAQ-acrobat|Making PDF documents from (La)TeX]] {{htmlmetatags>metatag-keywords=(LaTeX,compiler un document LaTeX,générer un PDF,produire un fichier PDF) metatag-og:title=(Making PDF documents from (La)TeX) metatag-og:site_name=(FAQ LaTeX francophone) }}