Text FormattingGreek math text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Txortx
Posts: 3
Joined: Thu Apr 26, 2012 1:56 pm

Greek math text

Post by Txortx »

Good morning everyone!!

I am having problems formating greek math text with other than default fonts when using «\usepackage[catalan]{babel}» or «\usepackage[spanish]{babel}»

This example below works perfectly:

Code: Select all

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode

\documentclass{book}
\usepackage[english]{babel}

\usepackage{amsmath, amsfonts, amssymb, amsthm, amstext, amscd}
\usepackage{mathabx}
\usepackage{xfrac}
\usepackage[all]{xy}

\usepackage{mathspec}
	\defaultfontfeatures{Scale=MatchLowercase}
	%
	\setmainfont[Mapping=tex-text, Numbers={Proportional,OldStyle}]{Garamond Premier Pro}
	\setsansfont[Mapping=tex-text]{MetaPro}
	\setmonofont[Mapping=tex-text]{Courier New}
	%
	\setmathsfont(Digits,Latin,Greek)[Numbers={Lining,Proportional}]{Garamond Premier Pro}

\begin{document}
\chapter*{Introducción}
Esta es una prueba de cómo escribe en griego con la Garamond Premier Pro. $\gamma$
\end{document}
But if you change «english» for «spanish» or «catalan» it doesn't work.

May someone explain me what should I do to bypass this?

Thanks in advance.
Last edited by Stefan Kottwitz on Thu Apr 26, 2012 2:39 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.

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

Greek math text

Post by Stefan Kottwitz »

Hi,

welcome to the board!

If you change the language setting, remove the .aux file before you compile again. Otherwise, an error could occur, such as
! Package babel Error: You haven't loaded the option english yet
if this is not the case, tell us the error message you got. You made a nice minimal example, I just cannot really test it because I don't have those fonts installed.

Stefan
LaTeX.org admin
Txortx
Posts: 3
Joined: Thu Apr 26, 2012 1:56 pm

Re: Greek math text

Post by Txortx »

Thanks for your answer and your welcome!!

In fact everytime I change languages I delete all auxiliary files. However this doesn't help to solve the problem. You can use whatever opentype font with Greek glyphs in English or French, but not with Spanish or Catalan regarding babel package.

Try the example I publish. Change languages and run it and you will see the problem.

LaTeX stops processing when trying to produce the Greek symbol.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Greek math text

Post by localghost »

What happens if you replace babel by polyglossia with corresponding language settings?


Best regards and welcome to the board
Thorsten
Txortx
Posts: 3
Joined: Thu Apr 26, 2012 1:56 pm

Re: Greek math text

Post by Txortx »

Thanks for the hint.

It works for Spanish, but not for Catalan (even though you try this as «\setotherlanguage{catalan}»). That's enough by now, but I would like to chose the greek font in my Catalan and Spanish documents.
Post Reply