4

In this line of my text when I had to use a cases environment within the text I got a large link border around 1. How to make it regular like any others references? Below a MWE of my code:

Large box around 1

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
    \hypersetup{linkcolor = {0 .8 1}}
\usepackage{geometry}
    \geometry{
        left = 2cm,
        right = 2cm
    }
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\theoremstyle{definition}
\newtheorem{ax}{Axioma}
\begin{document}
    \begin{ax}\label{ax:1}
        Dados dois triângulos \( ABC \) e \( EFG \), se \( AB\equiv EF \), \( AC\equiv EG \) e \( \hat{A}\equiv\hat{E} \), então \( ABC\equiv EFG \).
    \end{ax}    

    \begin{proof}
        Seja \( ABC \) e \( EFG \) dois triângulos de correspondência \( ABC\leftrightarrow EFG \). Assim, por hipótese tem-se \( AB\equiv EF \) e por construção tem-se \( AD\equiv EF \). Pelo axioma \ref{ax:1}: \( \begin{cases}
        AC\equiv EF \\
        \hat{E}\equiv C\hat{A}D \\
        AD\equiv EF
        \end{cases} \Rightarrow \triangle ACD \equiv \triangle EFG \).
    \end{proof}
\end{document}
4
  • It's an odd way of presenting the discussion; to have regular-spaced lines and then one line that is super-wide. Why not set the content in display math \[...\]?
    – Werner
    Commented Feb 3, 2019 at 3:36
  • When I compile your code with xelatex, I do not get this large box. How do you compile your code?
    – user121799
    Commented Feb 3, 2019 at 4:29
  • Please tell us whether you use pdfLaTeX, XeLaTeX, or LuaLaTeX to compile this code snippet.
    – Mico
    Commented Feb 3, 2019 at 9:29
  • I compiled it with pdfLaTeX and LuaLaTeX and I got the same with both, @Mico
    – Levy
    Commented Feb 3, 2019 at 9:39

2 Answers 2

3

I think it's not a good idea to use inline math mode for the entire proof, both because super-tall lines are ugly and because the use of inline math doesn't do a good job of visually highlighting what the main logical step is.

I'm afraid I'm not fluent in Portuguese, but assuming I understood the material correctly, I think it's better to use \angle than \hat to denote, well, angles.

For the following screenshot, the code was compiled under pdfLaTeX. Results with either LuaLaTeX or XeLaTeX are virtually the same.

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage[hmargin=2cm]{geometry}
\usepackage{amsmath, amsthm, amssymb}
\usepackage[portuguese]{babel} % or 'brasilian'?

\usepackage{ifluatex,ifxetex}
\ifluatex
   \usepackage{unicode-math,lualatex-math}
\else\ifxetex
   \usepackage{unicode-math}
\else
   \usepackage[utf8]{inputenc}
   \usepackage[T1]{fontenc}
\fi\fi

\usepackage{hyperref}
\hypersetup{linkcolor = {0 .8 1}}
\usepackage[nameinlink]{cleveref}
\theoremstyle{definition}
\newtheorem{ax}{Axioma}

\begin{document}
\begin{ax}\label{ax:1}
Dados dois triângulos $ABC$ e $EFG$, se $AB\equiv EF$, $AC\equiv EG$ 
e $\angle{A}\equiv\angle{E}$, então $ABC\equiv EFG$.
\end{ax}    

\noindent\dots

\begin{proof}
Seja $ABC$ e $EFG$ dois triângulos de correspondência $ABC\leftrightarrow EFG$. 
\dots\ Assim, por hipótese tem-se $AB\equiv EF$ e por construção tem-se 
$AD\equiv EF$. 
\[
\text{Pelo \cref{ax:1}: }
\begin{cases}
    AC\equiv EF \\
    \angle E\equiv C\angle AD \\
    AD\equiv EF
\end{cases} 
\quad \Rightarrow \triangle ACD \equiv \triangle EFG.
\qedhere % take care to place the QED symbol
\]
\end{proof}
\end{document}
1
  • 1
    Hi, kindest now I have finished all my votes :-) See later your email. :-)
    – Sebastiano
    Commented Feb 4, 2019 at 22:56
5

The linkborder adapts to the surrounding box. As you have a large cases in the current line, you get a large link box. You can avoid it by putting an additional \mbox around the ref:

\documentclass[12pt,a4paper]{article}
\usepackage{hyperref}
    \hypersetup{linkcolor = {0 .8 1}}
\begin{document}

\section{xxx}\label{test}

\rule{2mm}{1cm} high: \ref{test}, short: \mbox{\ref{test}}.
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .