GeneralChange to Default Latex Fonts?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
InquisitorMo
Posts: 44
Joined: Mon Jul 15, 2013 12:22 am

Change to Default Latex Fonts?

Post by InquisitorMo »

Ok, because I think the previous post was perhaps confusing, I have a simpler question: How do I alter the preamble that I have currently (below) to USE DEFAULT LATEX FONTS? (it's currently using a system font which is causing problems for me).

I have been able to create a standard Latex document using standard fonts, but merely deleting all the extra formatting hasn't worked here, so I assume there's something I don't know about going on?

Code: Select all

    \documentclass[letter,12pt]{article}    %letter paper and 12 size font default

    %A Few Useful Packages
    \usepackage[margin=0.9in]{geometry}
    \usepackage{marvosym}
    \usepackage{fontspec}                                   %for loading fonts %%RESET
    \usepackage{xunicode,xltxtra,url,parskip}       %other packages for formatting
    \RequirePackage{color,graphicx}
    \usepackage[usenames,dvipsnames]{xcolor}
    %\usepackage[big]{layaureo}                             %better formatting of the A4 page
    % an alternative to Layaureo can be ** \usepackage{fullpage} **
    \usepackage{supertabular}                               %for Grades
    \usepackage{titlesec}                                   %custom \section\
    \usepackage{tabularx}
    \usepackage{array}
    \newfontfamily\smallcaps{Baskerville Small Caps SSi} %I had to DL a small caps version of Baskerville so it would work - this is the command to call that completely different font (but it's supposedly the correct matching 'small caps' font

    %%reset above

    \usepackage{enumitem}


    \newcolumntype{R}{>{\raggedleft\arraybackslash}X}%
      %This is for the Personal Data Section - not sure about using 'X'...

    %Setup hyperref package, and colours for links
    \usepackage{hyperref}
    \definecolor{linkcolour}{rgb}{0,0.2,0.6}
    \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

    %FONTS
    \defaultfontfeatures{Mapping=tex-text} %% RESET
    \setmainfont{Baskerville} %%reset
    %CV Sections inspired by:
    %http://stefano.italians.nl/archives/26
    \titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]

    \titlespacing{\section}{0pt}{3pt}{3pt}
    %Tweak a bit the top margin
    %\addtolength{\voffset}{-1.3cm}

    \newenvironment{packed_enum}{ %THIS IS THE BULLET FORMAT FOR THE BULLET SECTIONS IN THE TABLE PART
    \begin{itemize}[topsep={-10pt}, partopsep={0pt}, leftmargin={10pt}, labelindent={0pt}, itemindent={0pt}]
      \setlength{\itemsep}{1pt}
      \setlength{\parskip}{0pt}
      \setlength{\parsep}{0pt}
    }{\end{itemize}}\vspace{-\baselineskip}

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

marczellm
Posts: 3
Joined: Fri Nov 29, 2013 12:52 pm

Change to Default Latex Fonts?

Post by marczellm »

Hi,

This preamble is for XeLaTeX, so you will get Latin Modern font, which is almost indistinguishable from Computer Modern, the default.

Remove the following line:

Code: Select all

\setmainfont{Baskerville}
and maybe also

Code: Select all

\newfontfamily\smallcaps{Baskerville Small Caps SSi}
InquisitorMo
Posts: 44
Joined: Mon Jul 15, 2013 12:22 am

Re: Change to Default Latex Fonts?

Post by InquisitorMo »

Ah ok - My problem has been though that the font becomes blurry/slightly disordered appearing when I create the PDF output document.

I'm trying to figure out how to make the document defaulted font WITHOUT XeLatex, as I've been told that using any system fonts can create this PDF problem.

It's confusing because TexShop's compiled 'pdf version' looks superb in my chosen font at all levels of zoom, so I'm rather confused why I can't get the PDF output file to look like that.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Change to Default Latex Fonts?

Post by Johannes_B »

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