2

New LaTeX user here. While reading this nice question and its answer, I discovered the "BOONDOX Calligraphic" font and tried to implement it in my document. I've been having some troubles, and after a few hours troubleshooting, I thought I would come here and see if anybody can see what's going wrong.

I have checked out the BOONDOX package documentation, which made me realize I needed the mathalfa package (mathalfa documentation here). I included that package in my document, but the BOONDOX calligraphic fonts don't show up.

Notice in my code, I've included the packages mathalfa as well as told it \usepackage[bb=boondox,bbscaled=.95,cal=boondoxo]{mathalfa}:

\documentclass[letter,10pt]{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm,graphicx,a4wide,color,srcltx,fullpage,hyperref,enumitem,bm,cancel,mathalfa}
\usepackage[left=1 in, right=1 in, top=1 in, bottom=1 in]{geometry}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{setspace}
\usepackage{cite}
\usepackage[bb=boondox,bbscaled=.95,cal=boondoxo]{mathalfa}
\MakeOuterQuote{"}

\renewcommand{\theenumi}{(\roman{enumi})}
\renewcommand{\baselinestretch}{2}

% THEOREM Environments
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}{Remark}
\newtheorem{result}{Result}
\newtheorem{theorem}{Theorem}

\newcommand{\U}{\mathbb{U}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Mod}[1]{\ (\textup{mod}\ #1)}
\newcommand{\abs}[1]{\left\vert#1\right\vert}
\newcommand\norm[1]{\left\lVert#1\right\rVert}

\begin{document}

\title{Logic and Sets}
\author{My Name Goes Here}
\date{}
\maketitle

\section{Logic System}
Mathematics is constructed from statements: declarative sentences which are either true or false. For every statement $\mathcal{P}$, there exists a negation of the statement, denoted $\neg \mathcal{P}$, so that $\neg \mathcal{P}$ is true whenever $\mathcal{P}$ is false, and vice versa. From two statements $\mathcal{P}$ and $\mathcal{Q}$ we can produce compound statements. The disjunction $\mathcal{P} \vee \mathcal{Q}$ is true when at least one of $\mathcal{P}$ or $\mathcal{Q}$ is true. The conjunction $\mathcal{P} \wedge \mathcal{Q}$ is true whenever all statements $\mathcal{P}$ and $\mathcal{Q}$ are true.

\end{document}

I am running TexStudio, and I am getting an error Option clash for package mathalfa. I am also getting a second error Unused global option(s): [letter]. The BOONDOX calligraphic fonts don't appear where I have written \mathcal{P} and \mathcal{Q} to denote mathematical statements. I either only see the regular mathcal fonts or my document fails to compile altogether.

I should mention that later on in my document, when I start a new section on sets, I DO wish to use the regular mathcal font when I write \mathcal{P}(S) to denote the power set of S and when I write \mathcal{R} to denote a relation on a set (different context than here). Hopefully I can use the BOONDOX calligraphic font here for statements P and regular mathcal font later for the powerset P.

Thank you for your help!

EthanAlvaree
  • 1,367
  • 1
    The "Option clash for package mathalfa" error is coming from the fact that you're loading the mathalfa package twice. Once with \usepackage{amsmath,blah blah blah, mathalfa} and once with \usepackage[bb=boondox,bbscaled=.95,cal=boondoxo]{mathalfa}. – Trold Sep 13 '14 at 21:07
  • Regarding the option clash error: this is because you've loaded the mathalfa package twice, and the optional argument of the second time it is loaded is not a subset of those added the first time. Generally, load a package just once. The unused global option is a warning I think, and just says means that letter was not used anywhere. I suppose you meant to use letterpaper. – Torbjørn T. Sep 13 '14 at 21:08
  • Ah, okay, thank you! I just removed "mathalfa" from its first occurrence, keeping only the second one. However, my document fails to compile and I'm getting something about "miktex-makemf: The zxxrl7z source file could not be found. Running ttf2pk.exe..." – EthanAlvaree Sep 13 '14 at 21:09
  • I don't know about MiKTeX; perhaps the boondox package has not been installed correctly. MiKTeX is known to be sometimes sluggish with fonts. – egreg Sep 13 '14 at 21:15
  • I don't know much about MiKTeX either (new LaTeX user)... Should I be using something else (something better?) – EthanAlvaree Sep 13 '14 at 21:17
  • The fonts get used here once I remove the first occurrence of mathalfa. The warning about letter is as TorbjørnT. said. However, I doubt you want both a4wide and letterpaper since those request incompatible layouts (one for letter paper; one for A4). – cfr Sep 13 '14 at 21:18
  • @Mathemanic It is a matter of preference. Your other choice is TeX Live. I don't think it is better than MiKTeX. Or worse. But it is a little different. (On the other hand, I've never used MiKTeX and am not ever likely to. But that's because I don't use Windows.) – cfr Sep 13 '14 at 21:20
  • Here's what I have now, after removing the first occurrence of mathalfa:

    "Trying to make PK font zxxrl7z at 570 DPI...

    Running miktex-makemf.exe...

    miktex-makemf: The zxxrl7z source file could not be found. Running ttf2pk.exe...

    miktex-makepk

    : PK font zxxrl7z could not be created.

    Process exited with error(s)"

    – EthanAlvaree Sep 13 '14 at 21:22
  • @Mathemanic It definitely looks as if the fonts are not installed correctly. Hopefully somebody will say how to correct this for MiKTeX. (I only know for TeX Live.) – cfr Sep 13 '14 at 21:31
  • The software editor I use is actually called "TexStudio" -- to me it seems almost the same as TexLive (I have checked out both programs before). So, I'm not sure why the error I'm getting is saying something about Miktex. – EthanAlvaree Sep 13 '14 at 21:42
  • Note that there's already something for your \Mod command, which is called \pmod. – egreg Sep 13 '14 at 21:45
  • Even running cfr's code failed to compile in TexStudio. I'm not really sure how it works, but apparently TexStudio uses Miktex somehow. Here's the error I was getting: "Trying to make PK font zxxrow7z at 600 DPI...

    Running miktex-makemf.exe...

    miktex-makemf: The zxxrow7z source file could not be found. Running ttf2pk.exe...

    miktex-makepk

    : PK font zxxrow7z could not be created.

    Process exited with error(s)"

    – EthanAlvaree Sep 13 '14 at 22:28
  • Bernard's command line script fixed the issue and allowed the code to compile. I also want to thank cfr for generously editing my code (I tested it and noticed it worked and compiled immediately with no problems on both WriteLatex and ShareLatex; I think that in the future, I might switch to one of these, and that's what I would recommend to others who also have this problem). Thank you both very much for your help! – EthanAlvaree Sep 13 '14 at 22:29
  • Hi all - just wanted to let you know I posted a follow-up question about whether or not it's possible to redefine the names of these commands. Thanks for your time! http://tex.stackexchange.com/questions/247531/how-to-use-boondox-calligraphic-font-in-latex-without-replacing-mathcal-command – EthanAlvaree May 29 '15 at 02:02

2 Answers2

10

Your problem with boondox under MiKTeX is typically a problem with updating the psfonts databases that are used by dvips and pdflatex: psfonts.map and the like. It happens from time to time that fonts installed with MiKTeX Package Manager are not mentioned in this database, for some reason, and Metafont then tries to make bitmaps and fails to do so.

The solution consists in doing by hand what should have been done at installation: run from the command line (as administrator): updmap --verbose.

The --verbose switch will let you see what is actually mentioned in psfonts.map. You also can check the contents of this file (but never write in it yourself). You'll find it in

C:\Users\Your_Name\AppData\Local\MiKTeX\2.9\dvips\config\
Bernard
  • 271,350
  • Going to "run" and then entering the "updmap --verbose" script, followed by re-compiling, fixed the issue immediately. Thank you very much! Nonetheless, this issue made me realize maybe Mixtek isn't the best to be working with, and I'm considering switching to either WriteLatex or ShareLatex in the future. Thanks again for the fix! – EthanAlvaree Sep 13 '14 at 22:19
  • (+1) for actually solving the problem. – cfr Sep 13 '14 at 23:03
  • 1
    @Mathemanic: I'm quite happy with MiKTeX, let alone this problem that happens from time to time. But once you know the trick… MiKTeX Options and MiKTeX Package Manager are quite useful, well designed application. I'll report the problem to Christian Schenk. And maybe ask for a button ‘Update .map files’ in MiKTeX Options, so that unexperienced users have an easy way of solving such problems. – Bernard Sep 13 '14 at 23:15
5

Here's a way of accessing the original calligraphic alphabet when necessary. I've also tidied up a few things in your preamble.

\documentclass[letterpaper,10pt,american]{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm,graphicx,color,srcltx,hyperref,enumitem,bm,cancel}
\usepackage[left=1 in, right=1 in, top=1 in, bottom=1 in]{geometry}
\usepackage {babel}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{setspace}
\usepackage{cite}
\usepackage[bb=boondox,bbscaled=.95,cal=boondoxo]{mathalfa}
\MakeOuterQuote{"}

\renewcommand{\theenumi}{(\roman{enumi})}
\renewcommand{\baselinestretch}{2}

% THEOREM Environments
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}{Remark}
\newtheorem{result}{Result}
\newtheorem{theorem}{Theorem}

\newcommand{\U}{\mathbb{U}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Mod}[1]{\ (\textup{mod}\ #1)}
\newcommand{\abs}[1]{\left\vert#1\right\vert}
\newcommand\norm[1]{\left\lVert#1\right\rVert}

\DeclareSymbolFontAlphabet{\mathcalorig}   {symbols}

\begin{document}

\title{Logic and Sets}
\author{My Name Goes Here}
\date{}
\maketitle

\section{Logic System}
Mathematics is constructed from statements: declarative sentences which are either true or false. For every statement $\mathcal{P}$, there exists a negation of the statement, denoted $\neg \mathcal{P}$, so that $\neg \mathcal{P}$ is true whenever $\mathcal{P}$ is false, and vice versa. From two statements $\mathcal{P}$ and $\mathcal{Q}$ we can produce compound statements. The disjunction $\mathcal{P} \vee \mathcal{Q}$ is true when at least one of $\mathcal{P}$ or $\mathcal{Q}$ is true. The conjunction $\mathcal{P} \wedge \mathcal{Q}$ is true whenever all statements $\mathcal{P}$ and $\mathcal{Q}$ are true.

$\mathcalorig{P}$
\end{document}

calligraphic and calligraphic original maths alphabets

cfr
  • 198,882
  • Dear @cfr, thank you for the awesome answer -- that looks great! Thank you also for tiding up my preamble. I want to accept this as an answer. I'm still getting the error:

    "Trying to make PK font zxxrow7z at 600 DPI...

    Running miktex-makemf.exe...

    miktex-makemf: The zxxrow7z source file could not be found. Running ttf2pk.exe...

    miktex-makepk

    : PK font zxxrow7z could not be created.

    Process exited with error(s)"

    I'm going to leave the question open for a bit, in case anyone knows how to solve this error. The problem must be TexStudio, right? Maybe I'll try WriteLatex or ShareLatex...

    – EthanAlvaree Sep 13 '14 at 21:49
  • @Mathemanic No. Not TeXStudio. It is MiKTeX. The fonts are not installed correctly. There is a very simple solution only I've never used MiKTeX and I cannot remember what it is. I'll see if I can find a question... – cfr Sep 13 '14 at 22:40
  • Bernard's answer fixed it! – EthanAlvaree Sep 13 '14 at 22:45
  • Hi cfr, I just wanted to let you know I created a follow-up question about whether or not it's possible to redefine the names of these commands. Thanks for your time! http://tex.stackexchange.com/questions/247531/how-to-use-boondox-calligraphic-font-in-latex-without-replacing-mathcal-command – EthanAlvaree May 29 '15 at 02:01