Math & ScienceChanging font used in equations/math

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Changing font used in equations/math

Post by thorpn »

I am writting my bachelor thesis on regression models, and i really dont like the way "x" looks in LaTex, its more like two c´s back to back. Is there any way to change this globally throughout my document ?
Last edited by thedreamshaper on Tue Apr 05, 2011 5:00 pm, edited 1 time in total.

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing font used in equations/math

Post by localghost »

Since I don't know what you expect I can only advice to take a look into the LaTeX Font Catalogue [1]. There are several fonts with math support and perhaps you will find also an alternative font for the bread-and-butter type of your document.

[1] The LaTeX Font Catalogue — Fonts with math support


Thorsten
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Re: Changing font used in equations/math

Post by thorpn »

Thanks for the tip, what i specifically would want would for all equations in my documents to use \mathbf{x} instead of the usual x. Can i somehow change the font for this letter alone ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing font used in equations/math

Post by localghost »

thedreamshaper wrote:[…] Can i somehow change the font for this letter alone ?
Possibly you can change the shape of the font used in math expressions in general. Do you use the standard Computer Modern (CM) font or perhaps Latin Modern (LM) by the lmodern package?
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Re: Changing font used in equations/math

Post by thorpn »

Yes i am using computer modern at the moment.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing font used in equations/math

Post by localghost »

This changes the math font shape from italic to slanted*. Looks quite ugly in my eyes.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fix-cm}

\SetSymbolFont{letters}{normal}{T1}{cmr}{m}{sl}
\SetSymbolFont{letters}{bold}  {T1}{cmr}{b}{sl}

\begin{document}
  \[
    f(x)=a\cdot x^2+b\cdot x+c
  \]
\end{document}
Note that you will get warnings concerning font changes in math mode.


* Credits go to user CrazyHorse who presented this solution in another forum.
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Re: Changing font used in equations/math

Post by thorpn »

I totally agree, i guess i will stick to what i am using at the moment and just live with the ugly "x"´es :)
User avatar
shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Changing font used in equations/math

Post by shadgrind »

I don't like the x's in Computer Modern either; in fact, I don't like Computer Modern, period. That's why I use the fouriernc package:

Code: Select all

\usepackage{fouriernc,bm}
That will give you a nice combination of the Fourier-GUTenberg math fonts with the New Century Schoolbook text font. Here is an example of what it looks like. To me it has a cleaner look and is easier to read than Computer Modern.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
thorpn
Posts: 53
Joined: Mon Jul 30, 2012 7:30 pm

Re: Changing font used in equations/math

Post by thorpn »

Thank you shadgrind, i think the math is nicer in the package you provided. But the normal text is not, also it takes up more space. Would there be a way for me to use it only in the math parts of my documents ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing font used in equations/math

Post by localghost »

I already mentioned the Font Catalogue for fonts with math support. But you can also take a look at the document »A Survey of Free Math Fonts for TeX and LaTeX«.
Post Reply