1

Background: I'm writing my thesis and per the department guidelines, I have to use TrueType fonts and they need to be embedded in the PDF.

Now, I have managed to change everything into Computer Modern Unicode (CMU) or Latin Modern for monospace font, but the output file says there are other font types (Type 1) embedded in the PDF (and there are so many duplicates for some reason):

Adobe Acrobat

My question is, how can I make sure only TrueType fonts are being used? I searched for these fonts in the preamble:

\usepackage[paper= letterpaper,left=1.5in,right=1in,top=1.25in,bottom=1.25in]{geometry}
\usepackage{verbatim}
\usepackage{latexsym}
\usepackage{mathchars}
\usepackage{setspace}

\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[compact]{titlesec} % removing extra white space with "titlespacing"
\usepackage[labelsep=period]{caption} % adds dots instead of colon
\usepackage[none]{hyphenat} % removes word hyphenating
\usepackage[document]{ragged2e}% no word-wrap justification
\setlength{\RaggedRightParindent}{\parindent}
\usepackage{etoolbox} % to fix the problem caused by above code -- see "AtBeginEnvironment"
\usepackage{txfonts}  % for upright greek letters | use $\betaup$ or $\muup$
\usepackage{bibentry} % for full citation inline
\usepackage{textcomp} % for copyright and other symbols
\usepackage{datetime} % for date
\usepackage{tabto} % for tabbing (see committee.tex)
\usepackage{fontspec} % to import fonts via XeTeX
\setmainfont{CMU Serif} % TrueType font of Computer Modern
\setmonofont{Latin Modern Mono Prop} % Mono TrueType font
\setromanfont{CMU Serif} % TrueType
\setsansfont{CMU Serif} % TrueType
\usepackage{enumitem} % for better item listing and change its spacing
\usepackage{fixltx2e} % for textsubscript{}
\usepackage[natbibapa]{apacite} % for bibliography % use apacite or apalike
\usepackage[nottoc,notlof,notlot]{tocbibind} % to fix bib href jump
\usepackage{hyperref} % for bibliography
\usepackage{setspace} % Allows for \singlespacing and \doublespacing command
\usepackage[super]{nth} % for creating 1st, 2nd, etc. using \nth{1}, \nth{2}
\usepackage{tabu} % for more adjustments for table
\usepackage{tabularx} % for table
\usepackage{placeins} % for table -- add \FloatBarrier before and after begin/end table
\usepackage[flushleft]{threeparttable} % for table
\usepackage{booktabs,caption,fixltx2e} % caption width setup (captionsetup) is further down
\usepackage[space]{grffile} % for spacing in graphics path name
\usepackage{graphicx} % for images - related: use [float] package for placement
\graphicspath{ {/Users/Payam/Google Drive/Thesis/images/} } % image directory
\usepackage{gensymb} % for degree sign \degree
\usepackage[table,xcdraw]{xcolor} % for table

\usepackage{xpatch} % for two spaces after period
\makeatletter % for two spaces after period
\xpatchcmd{\selectfont} % for two spaces after period
  {\pickup@font\font@name} % for two spaces after period
  {\pickup@font\font@name\fontdimen7\font=\fontdimen2\font}
 {}{}
\makeatother % for two spaces after period
\usepackage{tocloft} % changing TOC boldness

\usepackage{color} % for color text
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \let\oldtextbf\textbf % changes all bolod text color to red
 \renewcommand{\textbf}[1]{\textcolor{red}{\oldtextbf{#1}}} % changes bold text color to red
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Remove the two lines above after userpackage{color} before submitting  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Removing extra space
\titlespacing{\section}{0pt}{*0}{*0}
\titlespacing{\subsection}{0pt}{*0}{*0}
\titlespacing{\subsubsection}{0pt}{*0}{*0}

%%% This is for shortauthor references
\defcitealias{CDC2012}{CDC, 2012}
\defcitealias{CDCfasd}{CDC, 2014}
\defcitealias{NIHalcohol}{NIH, 2015}
\defcitealias{NIHcpt1}{NIH, 2014}
\defcitealias{DoHaHS2014}{HSS, 2014}

% Removes bolded TOC entries
\renewcommand\cftchapfont{\mdseries}
\renewcommand\cftchappagefont{\mdseries}

% centers table tex vertically when use "m"
\renewcommand\tabularxcolumn[1]{>{\Centering}m{#1}}

\input{blocked.sty}
\input{uhead.sty}
\input{boxit.sty}
\input{icthesis.sty}

\newcommand{\ipc}{{\sf ipc}}

\newcommand{\Prob}{\bbbp}
\newcommand{\Real}{\bbbr}
\newcommand{\real}{\Real}
\newcommand{\Int}{\bbbz}
\newcommand{\Nat}{\bbbn}

\newcommand{\NN}{{\sf I\kern-0.14emN}}   % Natural numbers
\newcommand{\ZZ}{{\sf Z\kern-0.45emZ}}   % Integers
\newcommand{\QQQ}{{\sf C\kern-0.48emQ}}   % Rational numbers
\newcommand{\RR}{{\sf I\kern-0.14emR}}   % Real numbers
\newcommand{\KK}{{\cal K}}
\newcommand{\OO}{{\cal O}}
\newcommand{\AAA}{{\bf A}}
\newcommand{\HH}{{\bf H}}
\newcommand{\II}{{\bf I}}
\newcommand{\LL}{{\bf L}}
\newcommand{\PP}{{\bf P}}
\newcommand{\PPprime}{{\bf P'}}
\newcommand{\QQ}{{\bf Q}}
\newcommand{\UU}{{\bf U}}
\newcommand{\UUprime}{{\bf U'}}
\newcommand{\zzero}{{\bf 0}}
\newcommand{\ppi}{\mbox{\boldmath $\pi$}}
\newcommand{\aalph}{\mbox{\boldmath $\alpha$}}
\newcommand{\bb}{{\bf b}}
\newcommand{\ee}{{\bf e}}
\newcommand{\mmu}{\mbox{\boldmath $\mu$}}
\newcommand{\vv}{{\bf v}}
\newcommand{\xx}{{\bf x}}
\newcommand{\yy}{{\bf y}}
\newcommand{\zz}{{\bf z}}
\newcommand{\oomeg}{\mbox{\boldmath $\omega$}}
\newcommand{\res}{{\bf res}}
\newcommand{\cchi}{{\mbox{\raisebox{.4ex}{$\chi$}}}}
%\newcommand{\cchi}{{\cal X}}
%\newcommand{\cchi}{\mbox{\Large $\chi$}}

% Logical operators and symbols
\newcommand{\imply}{\Rightarrow}
\newcommand{\bimply}{\Leftrightarrow}
\newcommand{\union}{\cup}
\newcommand{\intersect}{\cap}
\newcommand{\boolor}{\vee}
\newcommand{\booland}{\wedge}
\newcommand{\boolimply}{\imply}
\newcommand{\boolbimply}{\bimply}
\newcommand{\boolnot}{\neg}
\newcommand{\boolsat}{\!\models}
\newcommand{\boolnsat}{\!\not\models}


\newcommand{\op}[1]{\mathrm{#1}}
\newcommand{\s}[1]{\ensuremath{\mathcal #1}}

% Properly styled differentiation and integration operators
\newcommand{\diff}[1]{\mathrm{\frac{d}{d\mathit{#1}}}}
\newcommand{\diffII}[1]{\mathrm{\frac{d^2}{d\mathit{#1}^2}}}
\newcommand{\intg}[4]{\int_{#3}^{#4} #1 \, \mathrm{d}#2}
\newcommand{\intgd}[4]{\int\!\!\!\!\int_{#4} #1 \, \mathrm{d}#2 \, \mathrm{d}#3}

% Large () brackets on different lines of an eqnarray environment
\newcommand{\Leftbrace}[1]{\left(\raisebox{0mm}[#1][#1]{}\right.}
\newcommand{\Rightbrace}[1]{\left.\raisebox{0mm}[#1][#1]{}\right)}

% Funky symobols for footnotes
\newcommand{\symbolfootnote}{\renewcommand{\thefootnote}{\fnsymbol{footnote}}}
% now add \symbolfootnote to the beginning of the document...

\newcommand{\normallinespacing}{\renewcommand{\baselinestretch}{1.5} \normalsize}
\newcommand{\mediumlinespacing}{\renewcommand{\baselinestretch}{1.2} \normalsize}
\newcommand{\narrowlinespacing}{\renewcommand{\baselinestretch}{1.0} \normalsize}
\newcommand{\bump}{\noalign{\vspace*{\doublerulesep}}}
\newcommand{\cell}{\multicolumn{1}{}{}}
\newcommand{\spann}{\mbox{span}}
\newcommand{\diagg}{\mbox{diag}}
\newcommand{\modd}{\mbox{mod}}
\newcommand{\minn}{\mbox{min}}
\newcommand{\andd}{\mbox{and}}
\newcommand{\forr}{\mbox{for}}
\newcommand{\EE}{\mbox{E}}

\newcommand{\deff}{\stackrel{\mathrm{def}}{=}}
\newcommand{\syncc}{~\stackrel{\textstyle \rhd\kern-0.57em\lhd}{\scriptstyle L}~}

\def\coop{\mbox{\large $\rhd\!\!\!\lhd$}}
\newcommand{\sync}[1]{\raisebox{-1.0ex}{$\;\stackrel{\coop}{\scriptscriptstyle
#1}\,$}}

\newtheorem{definition}{Definition}[chapter]
\newtheorem{theorem}{Theorem}[chapter]

\newcommand{\Figref}[1]{Figure~\ref{#1}}
\newcommand{\fig}[3]{
\begin{figure}[!ht]
\begin{center}
\scalebox{#3}{\includegraphics{figs/#1.ps}}
\vspace{-0.1in}
\caption[ ]{\label{#1} #2}
\end{center}
\end{figure}
}

\newcommand{\figtwo}[8]{
\begin{figure}
\parbox[b]{#4 \textwidth}{
\begin{center}
\scalebox{#3}{\includegraphics{figs/#1.ps}}
\vspace{-0.1in}
\caption{\label{#1}#2}
\end{center}
}
\hfill
\parbox[b]{#8 \textwidth}{
\begin{center}
\scalebox{#7}{\includegraphics{figs/#5.ps}}
\vspace{-0.1in}
\caption{\label{#5}#6}
\end{center}
}
\end{figure}
}

but I don't see anything.

I am using XeLaTeX and have the following codes in preamble:

\usepackage{fontspec} % to import fonts via XeTeX
\setmainfont{CMU Serif} % TrueType font of Computer Modern
\setromanfont{CMU Serif} % Roman TrueType
\setsansfont{CMU Serif} % Sans TrueType
\setmonofont{Latin Modern Mono Prop} % Mono TrueType font

Other notes: I am using EPS files (edited in Illustrator) to embed my graphs, but I've made sure the fonts used there are TrueType as well:

Adobe Illustrator

UPDATE: Just wanted to update this post in case somebody else has the same problem. I followed @cfr suggestion and got rid of the CMR, Nimbus, rtxmi, txmia and txsy. Also, as @Sverre mentioned in the comments below, one of the culprits was the images I was using in my document. They were EPS files and Illustrator was embedding the font within them. So to get around that, I followed this guide and converted my images into outlines.

And now I only have these TT fonts embedded:

enter image description here

17
  • 1
    Welcome! Why have you set the sans font to a serif? Your department is nuts. I realise that is not your fault and doesn't help, but it has to be said. What do they mean by true type exactly? I ask because some open type fonts are true type, and some true type fonts are actually collections of true type fonts, so asking for true type is not, just by itself, sufficiently specific. We need a complete, small example to help you effectively. Most of the type1 fonts are probably in your maths set up. But you are also using a Times clone somewhere.
    – cfr
    Commented Oct 1, 2015 at 22:25
  • For example, I bet that the CMU fonts which show as true type are .otf. If that's acceptable, try just \usepackage{fontspec}- don't set the text fonts specifically. That way, you'll get all Latin Modern which is probably better. Then you could try using unicode-math and Latin Modern Math. But you need to zap your current maths font configuration.
    – cfr
    Commented Oct 1, 2015 at 22:28
  • I'm pretty sure it's your imported graphics. Even when I use .ttf and/or .otf fonts in my graphics, they will nevertheless show up as type1 fonts when I import them in a latex document.
    – Sverre
    Commented Oct 1, 2015 at 22:28
  • @Sverre Do they also get switched to Times even if you've asked for CMU?
    – cfr
    Commented Oct 1, 2015 at 22:30
  • 1
    At least latexsym, txfonts and gensymb will introduce type1 fonts. But if these weren't loaded, you'd still get type1 CM maths by default. The preamble is a mess and uses font commands which were deprecated 20+ years ago, but that seems par for the course in thesis preambles - they are inherited and extended like a rambling old house, and people forget there's an old woman spinning in one of the turrets until it is too late.
    – cfr
    Commented Oct 1, 2015 at 22:46

1 Answer 1

5

Here's a cut-down version of your preamble with some comments and a minimal set up for Latin Modern with Latin Modern Math:

\documentclass[letterpaper]{article}
\usepackage[left=1.5in,right=1in,top=1.25in,bottom=1.25in]{geometry}

\usepackage{fontspec}% to import fonts via XeTeX
% better to use Latin Modern across the board than mix with CMU, I think - LM is the default
\setmonofont{Latin Modern Mono Prop} % Mono TrueType font
\usepackage{unicode-math}

%% The following packages will all introduce type1 fonts:
% \usepackage{latexsym}
% \usepackage{txfonts}  % for upright greek letters | use $\betaup$ or $\muup$
% \usepackage{gensymb} % for degree sign \degree

%% These seem prima facie problematic based on name alone but I've no idea what is in them so can't say for sure
% \usepackage{mathchars}
% \input{icthesis.sty}

%% These are potentially problematic but I've no idea how they are defined
% \newcommand{\Prob}{\bbbp}
% \newcommand{\Real}{\bbbr}
% \newcommand{\real}{\Real}
% \newcommand{\Int}{\bbbz}
% \newcommand{\Nat}{\bbbn}

%% Do NOT use \sf, \bf, \cal etc. in LaTeX documents - these switches are long deprecated

\begin{document}
  Some text $some maths \mathcal{ab} \mathrm{roman} \mathbb{blackboard}$

\textcopyright
\end{document}

Note that textcomp is not required for things like \textcopyright with this configuration.

For Asana, add

\setmathfont{Asana Math}

which will use the .ttc.

You need to be very careful about the symbols and scripts you use in order to ensure that no type1 fonts creep in.

I would seriously ask them to clarify this requirement. If their point is that they want to insist on scalable fonts, that is entirely reasonable and an awful lot easier to implement.

And if they really don't want scalable, as they claim, then presumably they do not permit submissions prepared with word processors at all. They also can't possibly want True Type in that case. In that case, you would need to force TeX to use only MetaFont source fonts. These scale horribly in well-know PDF viewing software.

9
  • Thank you for taking the time and helping me. I really appreciate it. I'll check with them regarding this whole font issue and ask for clarification.
    – Re-l
    Commented Oct 1, 2015 at 23:21
  • 2
    @Re-l No problem. Institutional requirements are horrible because they are usually entirely wrong-headed. They say they want X because they think X is a way to get Y and they want Y. But they don't say they want Y - they just insist on X, which probably isn't even a good way to get Y and may be no way to get Y at all! Classic XY problem with the added twist given by the asymmetrical nature of the power-dynamic.
    – cfr
    Commented Oct 1, 2015 at 23:25
  • Just wanted to update this and say that your edits worked! After changing those lines, I downloaded Asana.ttc and it replaced the txsy etc. Thank you very much, I have all TT fonts now! But I will still email the department and ask.
    – Re-l
    Commented Oct 1, 2015 at 23:38
  • @Re-l If they'll at least let you use .otf, Latin Modern Math will blend better with CM - even better with Latin Modern itself - than Asana. Then you could just load fontspec and unicode-math and adjust the typewriter font, which would probably give a nicer looking result. But, heck, if they think TT are not scalable and they're convinced that's an advantage, they'll probably tell you to use Comic Sans ;).
    – cfr
    Commented Oct 2, 2015 at 3:08
  • @cfr Hi! Sorry to bother. I'm pretty sure the basic vertical structure for forest that I used in my answer here is yours and I want to credit you for it in my answer; however, I haven't been able to locate the post in which you produced it (I have the structure saved in a folder with useful snippets that I like to keep for personal use). Could you please guide me to the proper post? Commented Oct 2, 2015 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .