Estou escrevendo meu próprio arquivo CLS para seguir as regras de tese da minha universidade. Agora que a maior parte está de acordo com as regras, preciso alterar a fonte do documento.
Defini várias opções de fontes porque posso usar esse mesmo modelo para outras redações. A fonte "Times New Roman" funciona, mas todo o resto não.
Estou usando o TexStudio.
O que eu deveria fazer agora?
Documento inteiro:
\ProvidesClass{template_tese}[2017/01/01 Modelo de Tese/Dissertação]
\newcommand{\Pasta}{Trabalho}
\DeclareOption{TimesNewRoman}{\newcommand{\letterfont}{times}}
\DeclareOption{Arial}{\newcommand{\letterfont}{helvet}}
\DeclareOption{French}{\newcommand{\letterfont}{frcursive}}
\DeclareOption{Normalschrift}{\newcommand{\letterfont}{wedn}}
\DeclareOption{Garamond}{\newcommand{\letterfont}{urw-garamond}}
\DeclareOption{Latin}{\newcommand{\letterfont}{lmodern}}
\DeclareOption{PGothic}{\newcommand{\letterfont}{pgothic}}
\DeclareOption{EGothic}{\newcommand{\letterfont}{egothic}}
\DeclareOption{Emerald}{\newcommand{\letterfont}{emerald}}
\DeclareOption{Frente}{\newcommand{\sides}{oneside}}
\DeclareOption{FrenteVerso}{\newcommand{\sides}{twoside}}
\DeclareOption*{\let\Pasta\CurrentOption}
\newcommand{\Trabalho}{Trabalhos/\Pasta}
\ProcessOptions\relax
\LoadClass[
12pt,
portuguese,
\sides]{report}
% PACKAGES
\usepackage{hyphenat}
\usepackage[utf8]{inputenc}
\usepackage[official]{eurosym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{\letterfont}
\usepackage[T1]{fontenc}
\usepackage{\Trabalho/settings}
\usepackage{\Trabalho/hifen}
\usepackage{graphicx}
\usepackage{subfiles}
\usepackage{geometry}
\usepackage{indentfirst}
\usepackage{changepage}
\usepackage{graphicx}
\usepackage{chngcntr}
\usepackage{fancyhdr}
\usepackage{pdfpages}
\usepackage{lipsum}
\usepackage{blindtext}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\pagestyle{fancy}
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}%
\fancyhf{}%
\fancyfoot[R]{\thepage}%
}
\usepackage[hidelinks]{hyperref}
% DOCUMENT
\linespread{1.25}
\graphicspath{ {\Trabalho/_Images/} }
\newcommand{\logotipoHorizontal}{\includegraphics{\Trabalho/_Images/logotipo_universidade}}
\newcommand{\logotipoVertical}{\includegraphics[scale=0.5]{\Trabalho/_Images/logotipo_universidade_1}}
\renewcommand{\chaptername}{Capítulo } % \Roman{part}
\renewcommand{\contentsname}{Índice}
\renewcommand{\bibname}{Bibliografia}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\renewcommand{\listfigurename}{Índice de Figuras}
\renewcommand{\listtablename}{Índice de Tabelas}
\renewcommand{\figurename}{Figura}
\renewcommand{\tablename}{Tabela}
\geometry{
paper=a4paper, % Change to letterpaper for US letter
inner=3cm, % Inner margin
outer=3cm, % Outer margin
bindingoffset=.5cm, % Binding offset
top=2.5cm, % Top margin
bottom=2.5cm, % Bottom margin
}
\begin{document}
% FRONT PAGE
\thispagestyle{empty}
\newgeometry{
paper=a4paper, % Change to letterpaper for US letter
inner=2.5cm, % Inner margin
outer=2.5cm, % Outer margin
bindingoffset=.5cm, % Binding offset
top=3cm, % Top margin
bottom=3cm, % Bottom margin
}
\begin{adjustwidth}{0cm}{0cm}
\begin{center}
\logotipoVertical\\
\end{center}
\end{adjustwidth}
\begin{adjustwidth}{7.5cm}{0cm}
\pagenumbering{roman}
{ \ } \\ { \ } \\
\noindent{\large\ \autor}
\\
\\\noindent {\large \textbf{\titulo\\}}
\\
\\
\tipo\\
\\
\curso\\
\\
Dissertação defendida em provas públicas na \universidade\ no dia \dia\ de \mes\ de \ano , perante o júri seguinte:\\
\juri\\
\vogais\\
\\
Oriendador:\\
\textbf{\orientador\\}
\\
\\
\\
\\
\end{adjustwidth}
\pagenumbering{gobble}
\begin{adjustwidth}{0cm}{0cm}
\begin{center}
\mes { } \ano\\
\end{center}
\end{adjustwidth}
% CITACAO
\thispagestyle{empty}
\newgeometry{
paper=a4paper, % Change to letterpaper for US letter
inner=2.5cm, % Inner margin
outer=2.5cm, % Outer margin
bindingoffset=.5cm, % Binding offset
top=10cm, % Top margin
bottom=3cm, % Bottom margin
}
\chapter*{} % Citação
\begin{adjustwidth}{7.5cm}{0cm}
\begin{center}
\subfile{\Trabalho/_Chapters/01_citacao}
\end{center}
\end{adjustwidth}
\pagenumbering{roman}
\restoregeometry
\newpage
% AGRADECIMENTOS
\chapter*{}
\subfile{\Trabalho/_Chapters/02_agradecimentos}
\newpage
% DEDICATORIA
\chapter*{}
\subfile{\Trabalho/_Chapters/03_dedicatoria}
\newpage
% RESUMO
\chapter*{Resumo}
\subfile{\Trabalho/_Chapters/04_resumo}
\newpage
% ABSTRACT
\chapter*{Abstract}
\subfile{\Trabalho/_Chapters/05_abstract}
\newpage
% TABLE OF CONTENTS
\tableofcontents
\newpage
% TABLE OF FIGURES
\listoftables
\listoffigures
\newpage
% NEW PAGE STYLE
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}%
\fancyhf{}%
\fancyfoot[LE,RO]{\thepage}%
}
\pagenumbering{arabic}
\pagestyle{plain}
% INTRODUCTION
\chapter*{Introdução}
\addcontentsline{toc}{chapter}{Introdução}
\subfile{\Trabalho/_Chapters/06_introducao}
\newpage
% REVISAO BIBLIOGRAFICA
\chapter{Revisão Bibliográfica}
\subfile{\Trabalho/_Chapters/07_revisao_bibliografica}
\newpage
% PARTE EMPIRICA
\chapter{Parte Empírica}
\subfile{\Trabalho/_Chapters/08_parte_empirica}
\newpage
% CONCLUSAO
\chapter*{Conclusão}
\addcontentsline{toc}{chapter}{Conclusão}
\subfile{\Trabalho/_Chapters/09_conclusao}
\newpage
% BIBLIOGRAFIA
%\chapter*{Bibliografia}
\addcontentsline{toc}{chapter}{Bibliografia}
\nocite{*}
\bibliographystyle{apalike}
\bibliography{\Trabalho/_Chapters/bibliografia}
% ANEXOS
\chapter*{Anexos}
\addcontentsline{toc}{chapter}{Anexos}
\subfile{\Trabalho/_Chapters/10_anexos}
\newpage
\end{document}
Responder1
A turma configura opções para escolher fontes, por exemplo, \documentclass[lmodern]{template_tese}
. Esta opção deve corresponder a um pacote instalado em seu sistema.
A classe apenas define \letterfont
ser uma macro para o nome da opção e, posteriormente, dá o comando \usepackage{\letterfont}
.
Então lmodern
deve funcionar com certeza se você tiver uma instalação do TeXLive, porque \usepackage{lmodern}
funciona. Não tenho certeza sobre todos os outros pacotes, que podem estar desatualizados.
EDITAR
Uma alternativa é ignorar os mecanismos de fonte da classe e fazer você mesmo, o que pode ser mais simples. Aqui eu uso o tgheros
pacote, que fornece a fonte TeX Gyre Heros, baseada em Helvetica/Arial.
\documentclass{template_tese}
\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
...