I see there is a ton of questions concerning tikz-cd
errors already, and I come to join the club because none of these solved my problem. Here is the code:
\documentclass[draft, 12pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[icelandic,english]{babel}
\usepackage{amsmath, amssymb, amsfonts, geometry}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem*{remark}{Remark}
\newtheorem*{review}{Review}
\theoremstyle{plain}
\newtheorem{proposition}{Proposition}
\newtheorem{theorem}{Theorem}
\theoremstyle{remark}
\newtheorem{example}{Example}
\usepackage{mathrsfs}
\usepackage{txfonts}
\usepackage{braket}
\usepackage{hyperref}
\hypersetup{colorlinks = true}
\usepackage{tikz-cd}
\usepackage{graphicx}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\ZC}{\mathbb{C}}
\newcommand{\ZR}{\mathbb{R}}
\newcommand{\CS}{\mathcal{S}}
\newcommand{\PC}{\mathbb{P}_\mathbb{C}}
\newcommand{\ph}{\,\cdot\,}
\newcommand{\op}[1]{\operatorname{#1}}
\newcommand{\covX}{\overline{X}}
\newcommand{\covx}{\overline{x}}
\newcommand{\covf}{\overline{f}}
\newcommand{\covg}{\overline{g}}
\begin{document}
\begin{center}
\begin{tikzcd}
\covX\arrow[dr,"p"]\arrow[rr,"h"] & & \covX'\arrow[dl,"p'"] \\
& X &
\end{tikzcd}
\end{center}
\end{document}
And here is the error
! Package pgfkeys Error: I do not know the key '/tikz/"p"'
Now I really can't imagine why this doesn't work, since I believe the standard way of labeling an arrow in tikz-cd
is by simply adding the name between double quotes to the list of options of the arrow, as I did; actually, many examples I found around do like that. What is even more intriguing is that I used the same code in a beamer presentation (using a fragile frame) three days ago and it worked without problem! Hence I am quite lost. I suppose something is wrong with my preamble, but I cannot figure out what is wrong or missing.