暗示箭头偏离

暗示箭头偏离

所以我编译了我的乳胶代码,我发现暗示箭头看起来有点扭曲 暗示

这是正常的吗?我可以解决这个问题吗?

编辑:下面是我的代码片段:

\documentclass[15pt]{article}

% define paper margins
\usepackage[
    a4paper,
    portrait,
    top=1.2cm,
    bottom=1.2cm,
    left=1.5cm,
    right=1.5cm,
    headheight=15pt, % avoid warning by fancyhdr
    includehead,includefoot,
    heightrounded % to avoid underfull messages
]{geometry} 

% Make justifications better.
\usepackage{microtype}

% Allows inclusion of sample text.
\usepackage{blindtext}

% Gets outlines right.
\usepackage{bookmark}

% ams stuff
\usepackage{amsmath, amsthm, amssymb}

% Bold math for vectors and the lot.
\usepackage{bm}

% Allows inclusion of special spaces
\usepackage{xspace}

% fancy headers
\usepackage{fancyhdr}
\pagestyle{fancy}

% Allows inclusion of custom fonts.
\usepackage{fontspec}

% Allows the use of custom enumerators in lists.
\usepackage{enumitem}

% Allows drawing of graphical images.
\usepackage{tikz}

% Allows inclusion of images.
\usepackage{graphicx}

% Allows inclusion of links
\usepackage{hyperref}

% Allows boxes to be drawn around text and math environments.
\usepackage{tcolorbox}

% Includes extra mathtools.
\usepackage{mathtools}

% hyperref setup
\hypersetup {
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,
    urlcolor=cyan
}

% Paragraph indenting and skipping.
\setlength{\parindent}{0cm}
\setlength{\parskip}{1em}

% Augmented Matrix environment.
\newenvironment{amatrix}[1]{%
  [\begin{array}{@{}*{#1}{c}|c@{}}
}{%
  \end{array}]
}

% Commands
\newcommand{\latex}{\LaTeX\xspace}

\renewcommand\qedsymbol{$\blacksquare$}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\naturals}{\mathbb{N}}
\newcommand{\integers}{\mathbb{Z}}
\newcommand{\rationals}{\mathbb{Q}}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

% Fixing brackets
\let\originalleft\left
\let\originalright\right
\renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft}
\renewcommand{\right}{\aftergroup\egroup\originalright}

\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\Span}{Span}

\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}


% Font
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setmainfont{Roboto}

% Title
\title{test document}
\date{\today}

\begin{document}
\begin{align*}
    \frac{c-b}{2} &= \prod_{q\in Q}q^2 & \frac{c+b}{2} &= \prod_{s\in S}s^2\\[1em]
    &= \left(\prod_{q\in Q}q\right)^2 & &= \left(\prod_{s\in S}s\right)^2\\[1em]
    &\implies \text{blah blah blah}
\end{align*}
\end{document}

答案1

有一组答案这里。然而,这是几十年来的技术债务之一,你可以通过使用现代工具链来清除它。

具体来说,如果您使用该unicode-math包并使用 LuaLaTeX 进行编译,它将使用 Unicode 符号表示 ⇒。(我推荐使用 LuaLaTeX 而不是 XeLaTeX,因为它支持 的字体扩展功能microtype。)

\documentclass[15pt]{article}

% define paper margins
\usepackage[
    a4paper,
    portrait,
    top=1.2cm,
    bottom=1.2cm,
    left=1.5cm,
    right=1.5cm,
    headheight=15pt, % avoid warning by fancyhdr
    includehead,includefoot,
    heightrounded % to avoid underfull messages
]{geometry} 

% Make justifications better.
\usepackage{microtype}

% Allows inclusion of sample text.
\usepackage{blindtext}

% Gets outlines right.
\usepackage{bookmark}

% ams stuff
\usepackage{amsthm}

% Allows inclusion of special spaces
\usepackage{xspace}

% fancy headers
\usepackage{fancyhdr}
\pagestyle{fancy}

% Allows the use of custom enumerators in lists.
\usepackage{enumitem}

% Allows drawing of graphical images.
\usepackage{tikz}

% Allows inclusion of images.
\usepackage{graphicx}

% Allows inclusion of links
\usepackage{hyperref}

% Allows boxes to be drawn around text and math environments.
\usepackage{tcolorbox}

% Includes extra mathtools.
\usepackage{mathtools}

% Use Unicode math fonts.
\usepackage{unicode-math}

% hyperref setup
\hypersetup {
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,
    urlcolor=cyan
}

% Paragraph indenting and skipping.
\setlength{\parindent}{0cm}
\setlength{\parskip}{1em}

% Augmented Matrix environment.
\newenvironment{amatrix}[1]{%
  [\begin{array}{@{}*{#1}{c}|c@{}}
}{%
  \end{array}]
}

% Commands
\newcommand{\latex}{\LaTeX\xspace}

\renewcommand\qedsymbol{$\blacksquare$}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\naturals}{\mathbb{N}}
\newcommand{\integers}{\mathbb{Z}}
\newcommand{\rationals}{\mathbb{Q}}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}

% Fixing brackets
\let\originalleft\left
\let\originalright\right
\renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft}
\renewcommand{\right}{\aftergroup\egroup\originalright}

\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\Span}{Span}

\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}


% Font
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{Roboto}[Scale=1.0]
\setmathfont{Fira Math}

% Title
\title{test document}
\date{\today}

\begin{document}
\begin{align*}
    \frac{c-b}{2} &= \prod_{q\in Q}q^2 & \frac{c+b}{2} &= \prod_{s\in S}s^2\\[1em]
    &= \left(\prod_{q\in Q}q\right)^2 & &= \left(\prod_{s\in S}s\right)^2\\[1em]
    &\implies \text{blah blah blah}
\end{align*}
\end{document}

Fira Math 示例

我选择 Fira Math 作为上面的数学字体。截至 2020 年,它是唯一一款无衬线 OpenType 数学字体。

该示例与您的 MWE 几乎相同,除了使用时已过时的几个软件包unicode-mathbmamssymb)或已被其加载的软件包(amsmath, )。我还从 中fontspec删除了冗余选项。Mapping=fontspec

您需要对源代码进行一项更改:如果您一直使用\bm,则应改用\mathbf。 (或\mathbfup表示直立,\mathbfit表示斜体。)您在评论中说您希望将其用于矢量。如果这就是您所需要的,您可以在此处停止阅读。

\boldsymbol命令仍然有效,和\boldmath也有效\mathversion{bold}。这些是获取粗体运算符的唯一方法。但是,截至 2020 年,唯一包含粗体版本的免费数学字体是 XITS Math 和 Libertinus Math。如果您加载其中一个,它将自动启用\boldsymbol,但否则,您需要添加一个命令,例如

\setmathfont[version=bold]{Libertinus Math Bold}

在紧急情况下,你甚至可以尝试,

\setmathfont[version=bold, FakeBold=1.2]{Fira Math}

但我不推荐它。

相关内容