On Sun, Dec 10, 2000 at 08:19:40PM +0100, Matej Cepl wrote:
> OK, I have found, that I have bakoma fonts available so I would
> like to get them into document. Most simple is to erase fontenc
> package from my preamble. However, it seems to be not possible
> to do it in LyX. Or is it?

I've posted a FAQ on this subject some time ago. Here is an updated version:

                            PDF mini-FAQ


1. How to create a PDF file from a LyX file ?

LyX >= 1.1.6 have support for PDF by either

 a) generating a Postscript file, and then running a Postscript->PDF converter
 (e.g. ps2pdf or pstill). If you use ps2pdf, you should use
 Ghostscript version >= 6.0, as earlier versions don't handle outline fonts
 properly (see also question 2).

 b) Running pdflatex.

With pdflatex you need to convert your eps figures to pdf (see question 3),
 and you cannot use pstricks.
On the other hand, with pdflatex it is possible to insert directly images
in JPEG or PNG format, use TrueType fonts, and more.

2. Why the text looks really bad when I view it with Acrobat Reader?

The problem is that bitmap fonts are displayed poorly by Acrobat Reader.
When creating a PDF from the LyX file, you need to use outline font instead of
the default bitmap fonts (in fact, you should also use outline fonts for
Postscript files). Recent LaTeX distributions come with Postscript Type 1 
version of the standard (Computer Modern) fonts. pdflatex uses these font by 
default. Dvips doesn't use these fonts by default, so to make it use them, 
add the following to lines to ~/.dvipsrc
 p+ psfonts.cmz
 p+ psfonts.amz

If the default (OT1) font encoding is used, nothing else need to be done.
However, if the T1 font encoding is used, then LaTeX uses the newer EC
fonts, for which there are no Type1 version. The solution is to use the ae
package which emulates T1 coded fonts using the standard CM fonts. This is
done by adding "\usepackage{ae,aecompl}" to the preamble of the LyX file.
However, some glyphs are missing from the CM fonts (e.g. eth, thorn),
and they are taken from the EC fonts. Therefore you get these glyphs as
bitmaps.

Note: LyX uses by default the T1 font encoding. If you wish to use the default
font encoding (this is not recommended, unless you only write English
documents), add the line "\font_encoding default" to the ~/.lyx/lyxrc file.

An alternative option, is to use the standard Postscript fonts instead of
the Computer Modern fonts. To do that, you need to select pslatex as the
global font in the document layout dialog. There is no need to use the ae.
When using the Postscript fonts, the result PDF file is smaller as the fonts
are not saved into the file. Furthermore, the Postscript fonts include all T1
glyphs. On the other hand, the Postscript fonts have no bold symbol font, so
poor man's bold must be used (see question 4). The Postscript fonts also
look different from the Computer Modern fonts.

To sum up, both the Computer Modern and the Postscript fonts gives good
results (with few exceptions).The decision of which one to use is a matter of
taste. 

3. How can I use pdflatex on a file with (eps) figures ?

Pdflatex doesn't support inclusion of eps files. However, it does support
inclusion of pdf file. So if you have a LyX files that includes an eps figure,
say foo.eps, you need to do the following:

 a) Convert foo.eps to pdf by 'epstopdf foo.eps'

 b) When you insert the figure in LyX, do not write the file extension:
 For example, when inseting the file 'foo.eps', you need to write 'foo'
 in figure dialog.

 Note: In 1.2.0 it will be possible to use the new insetgraphics for inserting
 various kinds of images, and it will handle all the necessary transformations.
 (a semi-functional insetgraphics exist it in 1.1.6. To use it, type
 M-x graphics-insert.

4. Why the \boldsymbol{} command doesn't work when I use pslatex ?

The Postscript fonts do not have a bold symbol font. The solution is to use
the \pmb{} (poor man's bold) command.
It is possible to redefine the \boldsymbol command to use \pmb
by putting
  \renewcommand{\boldsymbol}[1]{\pmb{#1}}
in the preamble.

5. Is it possible to do write latex code which is processed only when running
pdflatex ?

Yes. Here is an example:

\newif \ifpdf
    \ifx \pdfoutput \undefined
        \pdffalse
    \else
        \pdftrue
\fi

\ifpdf
    \pdfinfo { /Author (your name and e-mail address)
               /Title  (official title -- i.e., title element)
               /Subject (one line description of the document)
    }
    \pdfcatalog { /PageMode (/UseNone)
              % /OpenAction (fitbh)
    }
    \usepackage[pdftex]{hyperref}
\else
    \usepackage[ps2pdf]{hyperref}
\fi

Reply via email to