Edit Links |
FAQ /
Categories: PDF << | Page list | >>§ How can I include PDF documents in my file?Use the menu Insert->File->External Material and there the template pdfpages. If you get the error message "Set output to PDF. (use: \pdfoutput = 1)" when you generate a DVI file instead of a PDF file, you have to update your pdfpages package. With pdfpages version 0.4f, this problem is fixed. § How do I create clickable URLs/hyperlinks in a PDF file ?Enable the hyperref support in the document settings under PDF Properties. Then all URLs within a LyX URL box will be created as clickable hyperlinks. For more information about this, see LyX's User's Guide manual, section PDF Properties. § How do I generate bookmarks in a PDF file?This is done in the document settings under PDF Properties § How can I create custom PDF bookmarks?Enable the hyperref support in the document settings under PDF Properties. § The fonts are bad in the exported PDF, what can I do?The default LaTeX fonts (cm or ec) are bitmap fonts. Therefore they cannot be scaled to any size and in PDF they look pixeled. To avoid these problem, use scalable fonts, like Type 1 (PostScript) or TT (True Type) Fonts. Modern LaTeX distributions ship a whole range of Type 1 fonts. Using True Type fonts is a bit trickier (but some LaTeX distributions like MiKTeX ease their use). Some bleeding edge distributions like XeTeX even provide support for OpenType fonts, which is the latest and greatest font format. However, running these distributions with LyX is still tricky (but might improve in the future). If you want to keep the look of the default fonts, you have several possibilities.
Alternatively, you can also try one of the other Type 1 fonts that ship with LaTeX; for instance Times or Palatino. Caveat: Times, as the name indicates, is designed for printing newspaper with small columns. Therefore the letters are smaller than in other fonts, what makes them improper for one-column documents. To use Times select
To use Palatino select
See also section 3.7.2 "Document Font and Font size" in the LyX User's Guide or the FAQ for the TEX FAQ (keyword=fonts) [tex.ca.uk]. § How can I edit/write the properties of a PDF file?This is done in the document settings under PDF Properties What you still can't do is encrypt your document. If you want to define what the reader is allowed to do with your document, you have to use Adobe Acrobat (open your PDF with Acrobat and set the properties). § I have included hyperref and LyX tells me of "undefined code sequence"s!If you are using for example Algorithm floats you run into problems with LyX and § Can I add annotations to the PDF?Yes. Use the LaTeX package pdfcomment. Here is a module that adds some native LyX-support for that package. § Can I permit others to insert annotations to the PDF?As of Adobe Acrobat 7 (pro) you can set the permissions of a PDF so that other users can insert annotations with the free Adobe Reader >= 7.0. By default, this is not allowed. Unfortunately, there is no way yet to change this special permission outside of Acrobat. Due to a very rigid licensing policy (of Adobe) it is unlikely that this will change in the future. § Can I generate a PDF file containing a subset of the pages in my document?There are several methods:
gsc -dFirstPage=3 -dLastPage=5 -sDEVICE=pdfwrite -sOutputFile=test.pdf
-dBATCH -dNOPAUSE sourcefile.pdf
pdftk sourcefile.pdf cat 130-140 output test.pdf
§ pdfTeX warning stops generating PDF (destination with the same identifier):You are using package "hyperref" and you have at least two pages "1". ==> recommended hyperref options: plainpages=false,pdfpagelabels If the pages were labled differently (for example: documentclass book with \frontmatter and \mainmatter the pages are labeled "i" and "1"), then the problem is solved. If there is a title page without a printed page number, you can set the page counter to zero, for example. Or \thepage can be redefined, eg: \begingroup
\renewcommand{\thepage}{title}
% commands that generates the title page
\newpage
\endgroup
Other options:
§ My eps figures are rotated in the pdf output. What can I do ?The following is a short digest of this thread. The Orientation comment is allowed in eps files. Unfortunately it is interpreted differently by different programs Some programs interpret "Orientation Landscape" as "this file is already in landscape orientation", while others interpret it as "this file should be in landscape orientation, therefore it should be rotated by 90 degrees."
This makes it difficult to implement a unique solution to eps file conversion in LyX, and to get the same output in dvi, ps, and pdf. Ghostcript has a
ps2pdf -dAutoRotatePages=/None foo.ps
lyx -dbg files -e pdf foo.lyx
Difference of ps2pdf, dvipdfm(x) and pdflatexLyX supports three different ways of producing PDF files. This is because all of them have their specific pros and cons. Also see http://mintaka.sdsu.edu/GF/bibliog/latex/LaTeXtoPDF.html § ps2pdf methodTraditionally, you converted your LaTeX source file to a DVI file, which could then be converted to PostScript with
latex dvips ps2pdf
text.tex -------> text.dvi -------> text.ps --------> text.pdf
This basically requires all the graphics to be EPS files. But that's not a major problem, as LyX converts all files to the appropriate format if needed (however, if you have the choice, using EPS as native format is recommended). The main advantage of this method (especially compared with PDFLaTeX) is that the resulting PDF file is almost always much smaller. Also, dvi and postscript specials are supported (the former is also true for dvipfdm(x)). For instance, LyX's change tracking feature uses dvi specials to mark the changes in the output. Hence, the change tracking marks are not visible in a PDF produced with PDFLaTeX. § Dvipdfm methodIf you don't need PostScript output, you can save a step by going directly from DVI to PDF format by using dvipdfm or the newer dvipdfmx, which is intended to supersede the former:
latex dvipdfm(x)
text.tex -------> text.dvi -------> text.pdf
Once again, the figures must be Encapsulated PS. So you have compact, scalable graphics – with one less step. § Pdflatex methodThe pdflatex program produces a PDF file directly from the LaTeX source:
pdflatex
text.tex --------> text.pdf
That looks pretty painless; but there's a catch. While the previous methods employ EPS exclusively as the graphics format, pdflatex won't accept EPS directly at all: all the graphics have to be converted to JPEG, PNG, or PDF (!) before compiling. That isn't as bad as it sounds, because EPS can be "wrapped" with PDF headers to become PDF and still have scalable, vector graphics. And JPEG is a compact format for photographs, while PNG is a very compact way to store images with sharp outlines without introducing compression artifacts." And LyX does it again automatically for you, if required. The advantage of this method is that pdflatex is the most feature-rich converter program. It features, for instance, character protusion and font expansion (see this document for explanation), two microtypographical features that let your document look even better than "ordinary" LaTeX could ever achieve. § How can I make Acrobat Reader (acroread) update its display?
§ How can I make gv/Ghostview automatically update its display?Set the resource (in for instance $HOME/.Xdefaults or $HOME/.gv) to: GV.watchFile: True
§ Where can I find tools for working with PDFs?Free tools:
Commercial tools:
§ The fonts are not embedded in the exported PDF, what can I do?If all the fonts are not embedded, and if the file is sent to other people who have not the non-embedded fonts installed, there will happen a font substitution which can make the pdf file unreadable. This is the reason why most publishers simply do not accept PDF documents with non-embedded fonts (and with bitmapped fonts, see the previous question). If you want to check font embedding, you may either use the To make sure that all fonts are embedded:
If this does not work, please check the PDF output level of your ps2pdf command: these switches do not work with output level less than or equal to 12.
Note that recent versions of the § Where can I find more help on PDF?Check out Herbert's page on PDF. << | FAQ.PageList | >> |