Text Formattingdifferent font

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Nadia
Posts: 13
Joined: Wed Jan 16, 2013 12:35 am

different font

Post by Nadia »

Dear all,

I just finished writing my thesis in Latex and then I realized that the pdf version of the thesis has two different fonts. How would I sort this out please.

Many thanks and best regards,
Nadia

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: different font

Post by Stefan Kottwitz »

Hi Nadia,

congratulations on finishing your thesis!

Well, you should tell us details so we could tell you the reason. Perhaps post your document preamble here. In addition you could post screenshots as attachments to show which font you mean that is wrong.

Stefan
LaTeX.org admin
Nadia
Posts: 13
Joined: Wed Jan 16, 2013 12:35 am

different font

Post by Nadia »

Hi Steven,
many thanks for your quick response. Here is mypreamble.tex file.

Code: Select all

% Queen's Thesis Format
% (Borrowed from Dean Jin's BigDis.tex file, then heavily modified :)
% Michelle L. Crane, Queen's University, 2003
%********************************************************
% DOCUMENT STYLE
%*******************************************************
\documentclass[12pt]{report}
%-------------------------------------------------------------------------
\usepackage{quthesis}        % the Queen's University dissertation style file
                             % Note:  In my thesis, I had many Listings, so I
                             % tweaked the old quthesis sty file to create a
                             % List of Listings in the table of contents.
                             % However, this version of quthesis does *not*
                             % include these modifications.

%I don't even use the fancyheadings - it looks nice enough without it
%\usepackage{fancyheadings}  % doesn't seem to change the headings at all!
%****************************************************************************
% SPACING
%***************************************************************************
\usepackage{setspace,rotating}        % for use of \singlespacing and \doublespacing
%****************************************************************************
% HEADINGS
%***************************************************************************
% This changes the headings so that they are prettier, this can be commented out for traditional headings.
\usepackage{sectsty}
\allsectionsfont{\bfseries}% set all the section font to bfseries
\chapterfont{\centering\Large} % set the sizes of chapters, sections ...
\sectionfont{\normalsize}
\subsectionfont{\normalsize}

% for formatting Table of Contents entry, example: Chapter 1 Introduction
\usepackage[subfigure]{tocloft}
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter}
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{7em}

% for formatting Table of Contents entry for Appendix, example: Appendix 1: Stuff
\newcommand*\updatechaptername{%
   \addtocontents{toc}{\protect\renewcommand*\protect\cftchappresnum{Appendix}}
}
%*************************************************************************
% FOOTNOTES
%*************************************************************************
\interfootnotelinepenalty=10000 % This line stops footnotes from splitting onto two pages.
%************************************************************************
% VERBATIM
%************************************************************************
\usepackage{moreverb}        % Using this package to get better control of the
                             % verbatim environment, mostly for the use of the
                             % listing environment which puts line number
                             % beside each line.  Note that there has to be a number
                             % in each set of brackets, i.e., \begin{listing}[1]{1}.
                             % PDF info file is "The moreverb package" by
                             % Robin Fairbairns (rf@cl.cam.ac.uk) after
                             % Angus Duggan, Rainer Schopf and Victor Eijkhout, 2000/06/29.
%*************************************************************************
\usepackage{amsmath}         % to make nice equations
%-----------------------------------------------------------------------
\usepackage{amsthm}          % to make nice theorem, i.e., definition
% Using the amsthm package, define a new theorem environment for my
% definition.  * means don't number it.
\newtheorem*{definition}{Definition}
%-------------------------------------------------------------------------
\usepackage{cases}           % to make numbered cases (equations)
%---------------------------------------------------------------------------
\usepackage{calc}            % Used with the Ventry environment defined below.
%****************************************************************************
% FLOATS AND FIGURES
%***************************************************************************
\usepackage{graphicx}        % for graphic images (use \includegraphics[...]{file.eps})
%--------------------------------------------------------------------------
\usepackage{subfigure}       % for subfigures (figures within figures)
%--------------------------------------------------------------------------
\usepackage{boxedminipage}   % to make boxed minipages, i.e., boxes around figures
%---------------------------------------------------------------------------
\usepackage{rotating}          % for use of \begin{sideways} and \end{sideways}
%---------------------------------------------------------------------------
\usepackage{float}           % Using this package to get better control of my floats
                             % including the ability to define new float types for
                             % my specification and code listings.
                             % DVI info file is "An Improved Environment for Floats"
                             % by Anselm Lingnau, lingnau@tm.informatik.uni=frankfurt.de
                             % 1995/03/29.

% Define new float styles here
% Ruled style for examples
%\floatstyle{ruled}
%\newfloat{Example}{h}{lop}[chapter]
% Style of float used for code listings
\floatstyle{ruled}
\newfloat{Listing}{H}{lis}[chapter]

                             % Note:  The listings don't have space between the chapters, unlike
                             % the standard list of tables etc.  At the end, copy the spacing
                             % commands from the .toc file and insert into the .lis file.  Then,
                             % DO NOT LATEX it again, simply go to the DVI viewer!
%**************************************************************************
% TABLES
%**************************************************************************
\usepackage{tabularx}        % Package used to make variable width-columns, i.e.,
                             % column widths are changed to fit the maximum width
                             % and text is wrapped nicely.

\usepackage{threeparttable}
%****************************************************************************
% CAPTIONS
%*****************************************************************************
\usepackage[hang]{caption}   % Package used to make my captions 'hang', i.e., wrap
                             % around, but not under the name of the caption.
% MISCELLANEOUS
%*****************************************************************************
\usepackage{layout}          % useful for determining the margins of a document
                             % use with \layout command
%-----------------------------------------------------------------------------
\usepackage{changebar}       % Way of indicating modifications by putting bars in the
                             % margin.  Read about it in "The Latex Companion".
%*********************************************************************************

% REFERENCES ETC.
%*********************************************************************************
\usepackage{varioref}        % Better page references, e.g., "on preceding page", etc.
                             % \vref{key} Create an enhanced reference.
                             % \vpageref[text]{key} Create an enhanced page reference.
                             % \vrefrange{key}{key} Create an enhanced range of references.
                             % \vpagerefrange[text]{key}{key} Create an enhanced range of page references.
                             % Note: doesn't really work for consecutive pages.

\renewcommand{\reftextafter}{on the next page}
\renewcommand{\reftextbefore}{on the previous page}
%-----------------------------------------------------------------------------
\usepackage{url}             % for use of \url - pretty web addresses
%****************************************************************************
\usepackage[colorlinks=true,pdfstartview=FitB,bookmarks=false,urlcolor=blue,linkcolor=blue]{hyperref}
\setcounter{tocdepth}{2}
%********************************************************************
% Environment definition I found in the "The Latex Companion".  Used to
% create a list environment where the indenting is the same for all of the
% entries, regardless of their length.  Note:  must \usepackage{calc}.
\newenvironment{Ventry}[1]%
    {\begin{list}{}{\renewcommand{\makelabel}[1]{\textbf{##1}\hfil}%
        \settowidth{\labelwidth}{\textbf{#1:}}%
        \setlength{\leftmargin}{\labelwidth+\labelsep}}}%
    {\end{list}}
%*************************************************************************
% Command that I can use for reading in a file, verbatim, with NO line
% numbers, but in a smaller font. The parameter is the file name.
\newcommand{\filein}[1]{
   \begin{singlespacing}{\footnotesize
    \begin{verbatiminput}{#1}\end{verbatiminput}
    }\end{singlespacing}
}
%**************************************************************************
% Command that I can use for reading in a file, verbatim, with NO line
% numbers, but in a smaller font.  The parameter is the file name.
\newcommand{\fileinsmall}[1]{
    \begin{singlespacing}{\scriptsize
    \begin{verbatiminput}{#1}\end{verbatiminput}
    }\end{singlespacing}
}
%***************************************************************************
% Dean't 'notesbox' command.  Needs setspace package.
%   Usage: \notesbox{This is a note.}
%%
\newcommand{\notesbox}[1]{
     \ \\
      \singlespacing
      \noindent\begin{boxedminipage}[h]{\textwidth}{\sf{#1}}\end{boxedminipage}
      \doublespacing
}
%----------------------------------
\usepackage{tikz}
%----------------------------------
\usepackage{color}       % use if color is used in text
\usepackage{xcolor}      % it uses with the table option to color the background or rows, columns, and cells.
%\usepackage[usenames,dvipsnames]{xcolor}
\usepackage {colortbl}
%\definecolor{name}{system}{definition}
\definecolor{LightCyan}{rgb}{0.88,1,1}
%\usepackage[sorting=none]{biblatex}    % to cite the websites
%\usepackage[colorlinks=true]{hyperref} %documents and URLs
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{longtable}
\newcommand\nomenclature[2]{#1 & #2 \\}
\usepackage{nomencl}
%-------------------------
\usepackage{setspace}
\doublespacing
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makechapterhead}{50\p@}{-50pt}{}{}   % Space before chapters
\patchcmd{\@makeschapterhead}{50\p@}{-115pt}{}{} % Space before abstract and the others except chapters
\makeatother
%------------------------
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{mathptmx}% Times Roman font
\usepackage[scaled=.90]{helvet}% Helvetica, served as a model for arial
%\usepackage{xcolor}
\usepackage{titlesec}
%------------------------------
\usepackage{sectsty}
%\chapterfont{\usefont{T1}{qhv}{b}{n}\selectfont\huge}
\chapterfont{\usefont{T1}{qhv}{b}{n}\selectfont}
%----------------------------
Last edited by Stefan Kottwitz on Tue Jul 23, 2013 2:49 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

different font

Post by Stefan Kottwitz »

At the end of the preamble i can see those lines for laoding fonts:

Code: Select all

\usepackage{mathptmx}% Times Roman font
\usepackage[scaled=.90]{helvet}% Helvetica, served as a model for arial
\chapterfont{\usefont{T1}{qhv}{b}{n}\selectfont}
So you are loading the fonts Times Roman, Helvetica and TeX Gyre Heros which is similar to Helvetica. Remove what you don't need.

Stefan
LaTeX.org admin
Post Reply