From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: a bit offtopic, fonts in exported PDF documents Date: Thu, 26 Aug 2010 17:18:23 -0500 Message-ID: References: <4C76A590.9050800@ccbr.umn.edu> <4C76D92E.1060308@ccbr.umn.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1654317845==" Return-path: Received: from [140.186.70.92] (port=42534 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OokmB-0007az-FJ for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 18:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ookm9-0005DR-37 for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 18:18:27 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:57256) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ookm8-0005DG-Sh for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 18:18:25 -0400 Received: by vws16 with SMTP id 16so2809285vws.0 for ; Thu, 26 Aug 2010 15:18:24 -0700 (PDT) In-Reply-To: <4C76D92E.1060308@ccbr.umn.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Erik Iverson Cc: emacs-orgmode --===============1654317845== Content-Type: multipart/alternative; boundary=90e6ba53a0c063dd3c048ec160a5 --90e6ba53a0c063dd3c048ec160a5 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Aug 26, 2010 at 4:14 PM, Erik Iverson wrote: > John, > > Thank you for your reply. > > No problem -- nice report and I'm glad you got things fixed!! John > For those that don't want to read all that follows, please note my > conclusion, given here: > > Since orgmode is automatically telling latex to use T1 encoding, > perhaps we should somewhere document to the user that Type 1 > fonts should be available to get the best looking PDF possible. > Otherwise, type 3 fonts will be substituted. I got suitable > Type-1 fonts by installing the texlive-fonts-extra package > under Ubuntu. > > (Of course, that could already be documented somewhere :) ) > > All of this explained very succinctly right here: > http://www.latex-community.org/forum/viewtopic.php?f=5&t=571 > > > > Here, for example, are the > >> various texlive packages I can pick from: >> http://wiki.archlinux.org/index.php/TeX_Live#Group_texlive-most >> >> Not saying one of those would fix the problem, but I wonder if you could >> verify you have the fontsextra package? Just an idea? >> > > It was a great idea. It was what was wrong. :) > > Under Ubuntu, I simply install texlive-fonts-extra, and it works. > > Of course, I was a bit more curious as to exactly *what* and *why* > things were behaving as they were, so here is a summary for those who > may see the same issue. > > Caveat: I don't know much about font issues, so the following is a bit > imprecise and possibly even plain wrong :). > > By including [T1]{fontenc}, we are telling LaTeX to use so called T1 > font encoding. Simple enough. However, the original Computer Modern > fonts were not designed with this encoding in mind. There have been > Type 1 replacements made and can be found in the Cm-super package. > This is part of what texlive-fonts-extra installs, but was not > available on either of the systems I tested on, one Ubuntu, one > Fedora. > > Not having these font packages, I set out to determine which > fonts were being used in the PDF depending on what encodings we > use. > > The best way I have of checking what's going on is making a PDF, > and then opening it up in Evince or acroread, and looking at 'fonts' > tab under the document properties. > > As things were, i.e.: before installing texlive-fonts-extra, and > while including T1 font encoding, things looked > quite bad under Evince. Looking at the fonts included in the PDF > showed why. Instead of the list of computer modern fonts I get when > I don't include the T1 encoding, I got a list of "Type 3" fonts with > "No Name" in evince and names like "F16, F20, ..." in acrobat. > > Why these looked "ok" under acrobat is not understood by me, but > they certainly looked poor under evince. > > I could 'fix' this many ways, including removing the lines referencing > T1 encoding from the .tex file, or changing fontenc to OT1 instead of > T1, essentially the same fix. This allowed the good old computer > modern fonts to be included in the PDF, and all was well. But I wanted > to know why T1 encoding wasn't working. > > After installing texlive-fonts-extra, I now have the > "cm-super" package. These fonts now are used when I specify the T1 > encoding. (I think!) Now, my list of fonts under evince looks like > "sfrm1200" for example. No more Type 3 fonts, they are all Type 1. > This all seems to be explained in Chapter 7 of The LaTeX Companion, > section 7.5. > > I would be interested in what the names of the fonts embedded in > PDF documents from other users are? Are you all using these > "cm-super" fonts? > > Alternatively, I was also able to get nice fonts by using the > Modern Latin package, \usepackage{lmodern} with T1 encoding > specified. > > The upshot is: If you're using an OS with a package manager, > it might pay to do a "texlive-full" type install, instead of just > doing the bits and pieces of latex packages as I've been doing! > Unfortunately, I think with at least Ubuntu, that's not the > default, so many users may be having the same issue as I am, > without even realizing it. > > > Hope this helps, > > --Erik > > > >> On Thu, Aug 26, 2010 at 12:34 PM, Erik Iverson > eriki@ccbr.umn.edu>> wrote: >> >> Hello, >> >> I'm wondering if anyone can >> >> 1) reproduce what I'm seeing >> 2) help in understanding what's going on. >> >> If I export an Org file to LaTeX, the resulting >> .tex file contains the following in its header: >> >> \usepackage[T1]{fontenc} >> \usepackage{t1enc} >> >> Long story short: >> >> The resulting .PDF file from pdflatex looks quite >> bad in evince, and quite good in Acroread. By "quite bad", >> I mean the fonts are practically illegible, very thin >> and wiry. >> >> If I comment out *both* of those package requirements, >> recompile the PDF, the resulting PDF looks great in all >> viewers I can find. >> >> The Fonts specified in the Properties of the document >> change when I use those packages versus not use them. >> >> However, the packages are the default for good reason I'm sure, >> but C-c C-e d fires up Evince on my system, so the default >> is not very pleasant. >> >> I realize this isn't org-mode question per se, but can >> anyone else replicate this, and do you know what's happening? >> It seems like a potential problem with Evince specifically, since >> Acroread seems to handle the resulting PDF just fine. >> >> Finally, does anyone know why the t1enc package is required, the >> only thing I read about it was the following: >> >> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=t1enc >> >> Thanks! >> Erik >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> >> > --90e6ba53a0c063dd3c048ec160a5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Aug 26, 2010 at 4:14 PM, Erik Iverso= n <eriki@ccbr.um= n.edu> wrote:
John,

Thank you for your reply.


No problem -- nice report and I'm = glad you got things fixed!!

John
=A0
For those that don't want to read all that follows, please note my
conclusion, given here:

Since orgmode is automatically telling latex to use T1 encoding,
perhaps we should somewhere document to the user that Type 1
fonts should be available to get the best looking PDF possible.
Otherwise, type 3 fonts will be substituted. I got suitable
Type-1 fonts by installing the texlive-fonts-extra package
under Ubuntu.

(Of course, that could already be documented somewhere :) )

All of this explained very succinctly right here:
http://www.latex-community.org/forum/viewtopic.ph= p?f=3D5&t=3D571


> Here, for example, are the
various texlive packages I can pick from: http://wiki.ar= chlinux.org/index.php/TeX_Live#Group_texlive-most

Not saying one of those would fix the problem, but I wonder if you could ve= rify you have the fontsextra package? Just an idea?

It was a great idea. =A0It was what was wrong. =A0:)

Under Ubuntu, I simply install texlive-fonts-extra, and it works.

Of course, I was a bit more curious as to exactly *what* and *why*
things were behaving as they were, so here is a summary for those who
may see the same issue.

Caveat: I don't know much about font issues, so the following is a bit<= br> imprecise and possibly even plain wrong :).

By including [T1]{fontenc}, we are telling LaTeX to use so called T1
font encoding. =A0Simple enough. =A0However, the original Computer Modern fonts were not designed with this encoding in mind. =A0There have been
Type 1 replacements made and can be found in the Cm-super package.
This is part of what texlive-fonts-extra installs, but was not
available on either of the systems I tested on, one Ubuntu, one
Fedora.

Not having these font packages, I set out to determine which
fonts were being used in the PDF depending on what encodings we
use.

The best way I have of checking what's going on is making a PDF,
and then opening it up in Evince or acroread, and looking at 'fonts'= ;
tab under the document properties.

As things were, i.e.: before installing texlive-fonts-extra, and
while including T1 font encoding, things looked
quite bad under Evince. =A0Looking at the fonts included in the PDF
showed why. =A0Instead of the list of computer modern fonts I get when
I don't include the T1 encoding, I got a list of "Type 3" fon= ts with
"No Name" in evince and names like "F16, F20, ..." in a= crobat.

Why these looked "ok" under acrobat is not understood by me, but<= br> they certainly looked poor under evince.

I could 'fix' this many ways, including removing the lines referenc= ing
T1 encoding from the .tex file, or changing fontenc to OT1 instead of
T1, essentially the same fix. =A0This allowed the good old computer
modern fonts to be included in the PDF, and all was well. But I wanted
to know why T1 encoding wasn't working.

After installing texlive-fonts-extra, I now have the
"cm-super" package. =A0These fonts now are used when I specify th= e T1
encoding. (I think!) =A0Now, my list of fonts under evince looks like
"sfrm1200" for example. =A0No more Type 3 fonts, they are all Typ= e 1.
This all seems to be explained in Chapter 7 of The LaTeX Companion,
section 7.5.

I would be interested in what the names of the fonts embedded in
PDF documents from other users are? =A0Are you all using these
"cm-super" fonts?

Alternatively, I was also able to get nice fonts by using the
Modern Latin package, \usepackage{lmodern} with T1 encoding
specified.

The upshot is: If you're using an OS with a package manager,
it might pay to do a "texlive-full" type install, instead of just=
doing the bits and pieces of latex packages as I've been doing!
Unfortunately, I think with at least Ubuntu, that's not the
default, so many users may be having the same issue as I am,
without even realizing it.


Hope this helps,

--Erik



On Thu, Aug 26, 2010 at 12:34 PM, Erik Iverson <eriki@ccbr.umn.edu <mailto:eriki@ccbr.umn.edu>= > wrote:

=A0 =A0Hello,

=A0 =A0I'm wondering if anyone can

=A0 =A01) reproduce what I'm seeing
=A0 =A02) help in understanding what's going on.

=A0 =A0If I export an Org file to LaTeX, the resulting
=A0 =A0.tex file contains the following in its header:

=A0 =A0\usepackage[T1]{fontenc}
=A0 =A0\usepackage{t1enc}

=A0 =A0Long story short:

=A0 =A0The resulting .PDF file from pdflatex looks quite
=A0 =A0bad in evince, and quite good in Acroread. By "quite bad"= ,
=A0 =A0I mean the fonts are practically illegible, very thin
=A0 =A0and wiry.

=A0 =A0If I comment out *both* of those package requirements,
=A0 =A0recompile the PDF, the resulting PDF looks great in all
=A0 =A0viewers I can find.

=A0 =A0The Fonts specified in the Properties of the document
=A0 =A0change when I use those packages versus not use them.

=A0 =A0However, the packages are the default for good reason I'm sure,=
=A0 =A0but C-c C-e d fires up Evince on my system, so the default
=A0 =A0is not very pleasant.

=A0 =A0I realize this isn't org-mode question per se, but can
=A0 =A0anyone else replicate this, and do you know what's happening? =A0 =A0It seems like a potential problem with Evince specifically, since =A0 =A0Acroread seems to handle the resulting PDF just fine.

=A0 =A0Finally, does anyone know why the t1enc package is required, the =A0 =A0only thing I read about it was the following:

=A0 =A0http://www.tex.ac.uk/cgi-bin/texfaq2html?label=3Dt1enc

=A0 =A0Thanks!
=A0 =A0Erik

=A0 =A0_______________________________________________
=A0 =A0Emacs-orgmode mailing list
=A0 =A0Please use `Reply All' to send replies to the list.
=A0 =A0Emacs-or= gmode@gnu.org <mailto:Emacs-orgmode@gnu.org>


--90e6ba53a0c063dd3c048ec160a5-- --===============1654317845== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1654317845==--