Fonts & Character SetsMathspec, Verdana, German, Option clash for package fontspe

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
nitrogen28
Posts: 12
Joined: Tue Dec 16, 2008 1:20 am

Mathspec, Verdana, German, Option clash for package fontspe

Post by nitrogen28 »

Hi everyone,

I am trying to transform my english master thesis template into german. However, I am encountering some serious problems.
Since I have to use Verdana as the default font, I am forced to use XeTeX with mathspec and fontspec. I tried to convert my template into german with the polyglossia package but this results in the "Option clash for package fontspec." error.
It works when I exclude the mathspec package.

Here is the working code with the \usepackage{mathspec} and \setmathfont(Greek,Digits,Latin){Verdana} excluded.
Adding them to the code result in the error:

Code: Select all

\documentclass[10pt]{article}
%\usepackage[applemac]{inputenc}
\usepackage[a4paper,left=3.5cm,right=2.5cm,top=2.7cm,bottom=2.7cm,footskip=1.2cm,headsep=0.7cm,headheight=0.5cm]{geometry}

\usepackage{polyglossia}%Deutsche Sprache, [ngerman] {babel} LaTex
\setdefaultlanguage{german}

\usepackage{draftwatermark}%Draft watermark

%\usepackage{amssymb} %Symbol collection
\usepackage{amsmath} %list of equation
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}} %Scientific Notation
\usepackage[titles,subfigure]{tocloft}

\usepackage{subfigure} %multiple figurs

\usepackage{float}
\usepackage{caption} %caption for equations
\DeclareCaptionType{mycapequ}[][List of equations] %declare list of equation
\captionsetup[mycapequ]{name=Equation,within=section,labelformat=simple}
\usepackage{calc}
\usepackage{natbib}

\usepackage{fancyhdr} %header and footer setup
\pagestyle{fancy}
\rhead{\leftmark}
\chead{}%Middle top
\lhead{}%Left top
\rfoot{\thepage}
\cfoot{}
\lfoot{Krzysztof Wilczek}
\renewcommand{\footrulewidth}{0.4pt}

\renewcommand{\baselinestretch}{1.25} %Zeilenabstand

\setcounter{secnumdepth}{4} %subsubsections numbering and toc
\setcounter{tocdepth}{4}

\numberwithin{equation}{section}
\numberwithin{table}{section}
\numberwithin{figure}{section}

%\usepackage{mathspec}%Verdana font in math mode and text mode
\usepackage{fontspec} %Verdana font just in text mode
\defaultfontfeatures{Mapping=text-text}
\setsansfont{Verdana}
\renewcommand*{\familydefault}{\sfdefault}
%\setmathfont(Greek,Digits,Latin){Verdana}
\setmathrm{Verdana}


\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\title{Diplomarbeit\\ ---\\
DRAFT: \today}

\author{me}
\date{\today}

\begin{document}
\tableofcontents
\section{Test 1}
\subsection{Sübtest 2}
\subsubsection{SubsubTest 3}
\end{document}
Any ideas?

Thanks for your help.
Last edited by nitrogen28 on Sat Dec 11, 2010 3:50 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Mathspec, Verdana, German, Option clash for package fon

Post by meho_r »

Try loading polyglossia after fontspec/mathspec, not before.
nitrogen28
Posts: 12
Joined: Tue Dec 16, 2008 1:20 am

Re: Mathspec, Verdana, German, Option clash for package fon

Post by nitrogen28 »

Thanks!

Works great!
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Mathspec, Verdana, German, Option clash for package fon

Post by frabjous »

I'm confused by the applemac option for inputenc. Surely if you're using a mac, you're using OS X, in which case you probably want utf8, not "applemac" which is for older macs.
Post Reply