Fonts & Character Setsccfonts compiles with LaTeX => PDF, not LaTeX => PS => PDF

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm

ccfonts compiles with LaTeX => PDF, not LaTeX => PS => PDF

Post by mattlorig »

My apologies in advance if this should have been posted in a different forum.

I used Texniccenter/Miktek/Sumatra to write/complile/view LaTeX documents. This works without problems on most files. However, when I try to use the font package
ccfonts
if I complile using the standard LaTeX => PS => PDF option, then the text in the PDF is invisible (no warning or errors appear). This problem is solved if I used LaTeX => PDF to compile the document. However, I typiclly save figures as eps files. So, for this, I need to complie with LaTeX => PS => PDF.

1. Can anybody identify the problem with compiling using LaTeX => PS => PDF when the ccfonts package is installed?

2. Is there a fix for this?

Minimum working example follows.

Code: Select all

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{ccfonts}
\usepackage[T1]{fontenc}

\begin{document}
This is a sample of text followed by a sample of mathematics.
\normalfont
\[
\mathbf{B}(P)=\frac{\mu_0}{4\pi}\int\frac{\mathbf{I}\times\hat{r}'}{r'^2}dl = \frac{\mu_0}{4\pi}\,I\!\int\frac{d\boldsymbol{l}\times\hat{r}'}{r'^2}
\]
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: ccfonts compiles with LaTeX => PDF, not LaTeX => PS => P

Post by Johannes_B »

Did you try running the whole document with pdflatex (i.e. latex -> pdf).

All modern distributions should allow converting all eps-files in the background to pdf and use these instead.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm

Re: ccfonts compiles with LaTeX => PDF, not LaTeX => PS => P

Post by mattlorig »

When I use
LaTeX -> PDF
I get the following error

"LaTeX Error: unkonw graphics extension: .eps."

I suppose if I just make a habit of saving figures as PDFs, LaTeX --> PDF would work just fine.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: ccfonts compiles with LaTeX => PDF, not LaTeX => PS => P

Post by Johannes_B »

There is a script available to convert all your eps files in a document to pdf (that should be the default in the background). Or save your files in pdf-format from now on ;-)

I ran your example with pdflatex as a test. It took a few seconds to compile the fonts from the source. Then i tested in dvi-mode, no problem, no error, no warning. Conversion to pdf (via ps) was just fine. Did you try to do it via this route after doing the pdflatex run?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm

Re: ccfonts compiles with LaTeX => PDF, not LaTeX => PS => P

Post by mattlorig »

Thanks very much for taking the time to help me with this Johannes_B.

I typically make plots in Mathematica. And I can save everything as a PDF from now on. I thought it was best practice to save everything as eps, since these are vector-based graphics. But, I guess PDF is as well. So, there shouldn't be any loss in quality.

However, when I try to run
LaTeX -> PDF
on a larger document (again, using the ccfonts package) I get the following error:

"pdfTeX error (font expansion): auto expansion is only available with scalable fonts" (*)

If I run the same document with
LuaLaTeX -> PDF
XeLaTeX -> PDF
I have no difficulties.

I searched google for a solution to (*) and found some suggestions that this could be fixed by including
\usepacakage{lmodern,microtype}
However, both of those are in my document already. So, that is not the issue.

This new issue, however, my not be relatex to the ccfonts package since I can use the ccfonts package on the minimal working example I posted.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: ccfonts compiles with LaTeX => PDF, not LaTeX => PS => P

Post by Johannes_B »

the pdf format is also vector based. Some programs are cheating here, though. They put a raster graphic into a pdf file. No high quality here. If Mathematica is doing this, i don't know.

Can you try to reduce that font error to a minimal document and open a new thrad for that?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply