In this template, I want to change the font type to be the default latex font type. How can I do that?
Thank you
font-encodingsfonts
In this template, I want to change the font type to be the default latex font type. How can I do that?
Thank you
The IEEEtran
class has
% The IEEE uses Times Roman font, so we'll default to Times.
% These three commands make up the entire times.sty package.
\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}
Doing \renewcommand{\rmdefault}{ptm}
for typesetting in Times has been deprecated for about 20 years, but apparently this is not a sufficient timeframe for realizing it. For instance, math formulas will be typeset in Computer Modern with a very bad final effect, because the two fonts are visually incompatible.
You can get Times with fontspec
, though: add
\setmainfont{TeX Gyre Termes}
to your document preamble. Math will still be in Computer Modern, but apparently the people at IEEE is satisfied with bad typesetting.
If you want better typesetting, add
\usepackage{newtxmath}
Example:
\documentclass[]{IEEEtran}
\usepackage{mathtools}
\usepackage{newtxmath}
\usepackage[no-math]{fontspec}
\setmainfont{TeX Gyre Termes}
\begin{document}
\title{Development of a Generalized PV Model
in MATLAB/Simulink Using Datasheet Values}
% Authors names and emails
\author{Al-Motasem I. Aldaoudeyeh%
% Information about the authors (in the margins)
\thanks{Al-Motasem I. Aldaoudeyeh is with the Department
of Electrical and Computer Engineering, North Dakota State
University, Fargo, ND, 58102 USA. email: almotasem.aldaoudeye@ndsu.edu%
}%
}
% Make titles available (this command goes here for IEEE style)
\maketitle
\begin{abstract}
This paper proposes an improved single-diode modeling
approach for PV modules suitable for a broad range of
the PV technologies available today, including modules
on tandem cell structures. After establishing the model
(which has an overall of seven parameters), the paper
devises a methodology to estimate its parameters using
Standard Test Conditions (STC) data, Nominal Operating
Cell Temperature (NOCT) data, and temperature coefficients
values as provided in most manufacturers' datasheets.
Simulation results and their comparison with a previous
work show a very accurate prediction of critical points
in the current-voltage characteristics curve. The precise
prediction happens for both STC and NOCT conditions and
the error in predicting maximum power point lies within
$1\%$~limit, and the error in its corresponding voltage
and current is almost always within $2\%$ limit. Further,
for both maximum power point and open-circuit voltage,
the statistical variance around manufacturer measurements
due to temperature changes is demonstrated to be low for
five various module technologies.
\end{abstract}
\begin{IEEEkeywords}
temperature coefficients, thin film cells, tandem cells,
photovoltaic arrays, I-V curves, evolutionary algorithms,
parameterization
\end{IEEEkeywords}
\section{Introduction}
\label{section:introduction}
Some math just to see what happens: $a+2b=3c$.
\textit{Solar photovoltaics (PV)} is one of the fastest
growing power industries in the world thanks to its
appealing merits,like the widespread accessibility
to natural solar resources, high reliability, easy
integration into buildings and structures, fast installation,
modularity, and predictable annual output. Between 2000~and~2013,
total PV production has been experiencing annual growth rates
between $40\%$ and $90\%$ reaching an overall increase of two
orders of magnitude. By 2010, thin film PV technologies accounted
for around $13\%$ of the PV market share. The values were
distributed as follows: $5\%$ for a-Si, for $2\%$ Copper
indium di-selenide/Copper indium gallium selenide (CIS/CIGS),
and $6\%$ for Cadmium Telluride / Cadmium sulfide (CdTe/CdS).
However, most of the efforts in modeling PV modules focus on
modules on crystalline silicon (c-Si) cells technology which
exhibits characteristics closer to ideal cells. Thus, it is
necessary to develop generalized models suitable for different
types of technologies\footnote{this is a footnote test}.
\end{document}
You should use package mathptmx
or newtx
instead of times
. However,
changing the font for the titlepage:
\documentclass{article}
\usepackage{newtxtext}
\usepackage{newtxmath}
\title{Some text for the title}
\author{Me and others}
\begin{document}
\begingroup
\fontfamily{lmr}\selectfont
\maketitle
\endgroup
\section{foo}
bar
\end{document}
Best Answer
Edit: (I have to after 3 votes) Such problems are easy solved by a search inside the text of the appropriate files. Appropriate file for the font, is always the main file but this doesn't means that can not be done in the cls file.(It is not recommended though).
The specific search will probably result font sizes etc and also the problem is that the change can be done without the word font inside the command (like below) but we then hope that the template maintainer or creator commented the inclusion of the package that changes the font.
In some cases, it we can find font changes that using the command
\sfdefault
and it is a step before go to the last chance that follows.If we are not lucky and the command that changes the font is not commented or a usual command like the above
sfdefault
, we have to search all the preamble (including the files that are been include) for packages that may change the font.For more about packages and commands that can change the font see tha answer of @cfr here : https://tex.stackexchange.com/a/411081/120578
In XeLaTeX the usual commands can be found with search for
\selectfont
, or "fontfamily" or\setsansfont
,\setmainfont
and generally (in the most of the cases) search just for "font"Old Answer with 3! votes not really deserved :P
Comment out line 44 of the file main.tex:
Output (in order to not be marked my answer for close):