我刚刚意识到,编译后,我的 pdf 中没有显示“\colon”。您认为发生了什么?我是新手,所以如果您需要类似代码的东西,请告诉我!
感谢大家。
\documentclass[twoside,11pt,b5paper]{book}
\usepackage[dvips=false,pdftex=false,vtex=false]{geometry}
\usepackage[a4,center]{crop}
\geometry{%
includeheadfoot,
margin=2cm
}
\makeatletter %niente numero alla prima pagina del nuovo capitolo
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{empty}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\makeatother
\title{\scshape{Geometria delle Grassmanniane e Teoremi di Torelli}}
\author{Unknown}
\usepackage{palatino,eulervm}
\usepackage{anyfontsize}
\usepackage[pagestyles, clearempty,explicit]{titlesec}
\newcommand*{\sectionfont}{\fontfamily{ppl}\selectfont}
\titleformat{\section}[display]{\bfseries \sectionfont}{}{0pt}{\thesection \quad #1}[]
\titlespacing*{\section}{-0.9cm}{2pt}{0.5cm}[-0pt]
\usepackage{fourier, erewhon, cabin}
\usepackage[protrusion=true, expansion]{microtype}
\usepackage{eqparbox}
\titleformat{\chapter}[block]{}{\eqmakebox[chap]{\large \MakeUppercase{\sffamily\lsstyle\chaptername} %
\raisebox{-0.6\height}{\fontsize{50pt}{50pt}\selectfont\thechapter}\quad}}%
{0pt}{\huge\bfseries\raisebox{1ex}{\parbox[t]{\dimexpr\textwidth- \eqboxwidth{chap}\relax}{\titlerule[2pt]\vspace{1.25ex}#1}}}
\titlespacing*{\chapter}{0pt}{-32pt}{35pt}%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE]{\small \leftmark}
\fancyhead[LO]{\small \rightmark}
\fancyfoot[RE,LO]{\small \thepage}
\renewcommand{\headrulewidth}{1pt}
\pagenumbering{arabic}
\usepackage{tikz,tikz-cd}
\linespread{1}
\usepackage{gensymb}
\usepackage{amsthm,amssymb,amsfonts,mathrsfs}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
\usepackage{titlesec}
\usepackage{tcolorbox}
\newtheorem{lem}{Lemma}
\newtheorem{prop}{Proposizione}
\newtheorem{thm}{Teorema}
\newtheorem{cor}{Corollario}
\theoremstyle{definition}
\renewcommand{\square}{ \tikz[baseline=-.2ex] \filldraw [fill=red!60!black, draw=black] (0,0) rectangle (1ex,1ex) ;}
\newtheorem{example}{\square \; Esempio}
\theoremstyle{remark}
\newtheorem{rmk}{Osservazione}
\theoremstyle{definition}
\newtheorem{notz}{Notazione}
\renewcommand\qedsymbol{$\blacksquare$}
\tcbuselibrary{theorems}
\newtcbtheorem[number within=section]{propn}{Proposizione}{coltitle=black, detach title, before upper={\tcbtitle\quad}, colback=black!3!white,colframe=black!60!red,fonttitle=\bfseries, arc=0mm, separator sign dash, description delimiters={\grqq}{\grqq}, terminator sign colon}{propn} %questo serve per il ref
\newtcbtheorem[number within=section]{defn}{Definizione}{leftrule=2mm, coltitle=black, detach title, before upper={\tcbtitle\quad}, colback=black!3!white, colframe=black!60!red, fonttitle=\bfseries, arc=0mm, separator sign dash, description delimiters={\grqq}{\grqq}, terminator sign colon}{defn}
\newtcbtheorem[number within=chapter]{examp}{\square \; Esempio} {coltitle=black, detach title, before upper={\tcbtitle\quad}, colback=white, colframe=white, fonttitle=\bfseries, arc=0mm, separator sign dash,terminator sign colon}{examp}
\begin{document}
\maketitle
\chapter{A chapter}
$f \colon A \to B$ is a function.
\section{A section}
Some text.
\end{document}
更新:我意识到如果取消这个,那么冒号就会可视化,但我需要这部分。
\usepackage{fourier, erewhon, cabin}
\usepackage[protrusion=true, expansion]{microtype}
\usepackage{eqparbox}
\titleformat{\chapter}[block]{}{\eqmakebox[chap]{\large \MakeUppercase{\sffamily\lsstyle\chaptername} %
\raisebox{-0.6\height}{\fontsize{50pt}{50pt}\selectfont\thechapter}\quad}}%
{0pt}{\huge\bfseries\raisebox{1ex}{\parbox[t]{\dimexpr\textwidth-\eqboxwidth{chap}\relax}{\titlerule[2pt]\vspace{1.25ex}#1}}}
\titlespacing*{\chapter}{0pt}{-32pt}{35pt}%
答案1
您的日志显示
Missing character: There is no º in font futsy!
这样您就可以将示例范围缩小到仅关注字体包,最终导致定义amsmath
与\colon
您使用的字体集之一不兼容。最简单的方法是保存原始定义。
\documentclass[twoside,11pt,b5paper]{book}
\title{\scshape{Geometria delle Grassmanniane e Teoremi di Torelli}}
\author{Unknown}
\usepackage{palatino,eulervm}
\usepackage{fourier, erewhon, cabin}
\usepackage[protrusion=true, expansion]{microtype}
\linespread{1}
\usepackage{gensymb}
\usepackage{amsthm,amssymb,amsfonts,mathrsfs}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\let\oldcolon=\colon
\usepackage{amsmath}% included by tcolorbox
\begin{document}
$f \colon A \to B$ is a function.
$f \oldcolon A \to B$ is a function.
\end{document}
答案2
问题在于以下两行:
\usepackage{palatino,eulervm}
\usepackage{fourier,erewhon,cabin}
第一行设置 Palatino(文本)和 Euler(数学)的文档。第二行设置 Utopia(文本,带有 erewhon 克隆)和 Fourier(数学,与 Utopia 兼容)的文档。该cabin
包选择无衬线字体,不涉及问题。
做出矛盾的字体选择是没有意义的;如果你考虑到这一点,eulervm
并且fourier
对数学字体使用非标准编码,那么两者都会更改默认数学表,那就更没意义了。例如,你可以尝试看看和\hbar
都会\hslash
打印小写的希腊字母 kappa。因此,缺少冒号只是一种症状,而治疗方法不仅仅针对它。
确定你喜欢的论文字体并保留它。
如果我删除第一行,我会得到
如果我删除第二行,我会得到
顺便说一句,我更喜欢一拳打在眼睛上,而不是你的章节标题。当然,这只是我的看法。