0

So I've compiled my latex code and I found that the implies arrow looks slightly distorted Implies

Is this normal, and is it possible for me to fix this?

EDIT: a snippet of my code below:

\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}
14
  • 1
    This is not normal. The basic two-line arrow is extended by attaching one or more = signs. This requires use of compatible arrow and = glyphs. In order to help, we need to know what document class and fonts are being used. Please provide a small compilable example that begins with \documentclass and ends with \end{document} that produces this error. May 16 '20 at 2:13
  • 2
    Looks like this question is very much related.
    – user194703
    May 16 '20 at 2:15
  • @barbarabeeton Ok, I've included the code now
    – Kookie
    May 16 '20 at 2:19
  • Sorry, I need to edit it again, I missed the bit where I used the implies symbol. It's in now.
    – Kookie
    May 16 '20 at 2:21
  • 2
    It’s a package that lets you load OpenType text and math fonts. There’s a list of them here. You would load it instead of amsfonts and your other font packages. It’s backward-compatible with existing commands.
    – Davislor
    May 16 '20 at 2:32
3

There’s one set of answers here. However, this is one of those pieces of decades-old technical debt that you can sweep away by using the modern toolchain.

Specifically, if you use the unicode-math package, and compile with LuaLaTeX, it will use the Unicode symbol for ⇒. (I would recommend LuaLaTeX over XeLaTeX because it supports the font expansion feature of 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 sample

I chose Fira Math as the math font above. As of 2020, it’s the only sans-serif OpenType math font.

That sample is nearly identical to your MWE, minus a few packages that are obsolete when using unicode-math (bm, amssymb) or already loaded by it (amsmath, fontspec). I also removed the redundant Mapping= option from fontspec.

There is one change you would need to make to your source: if you had been using \bm, you would use \mathbf instead. (Or \mathbfup for upright, \mathbfit for italic.) You say in the comments that you want this for vectors. If that’s all you need, you can stop reading here.

The \boldsymbol command still works, as does \boldmath and \mathversion{bold}. These are the only way to get bold operators. However, as of 2020, the only free math fonts that include a bold version are XITS Math and Libertinus Math. If you load one of those, it will automatically enable \boldsymbol, but otherwise, you need to add a command such as

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

In a pinch, you might even try,

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

But I don’t recommend it.

3
  • Thanks for taking your time to give me amazing suggestions! Should I message you if I need any extra clarifications?
    – Kookie
    May 16 '20 at 6:17
  • @Kookie Sure, but no guarantee of a timely response. By the way, there’s a package for the trick you did with \parindent and \parskip, \usepackage{parskip}.
    – Davislor
    May 16 '20 at 13:13
  • Ok, I'll search up the documentation for that
    – Kookie
    May 16 '20 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.