1

How can I change the length of the arrows in the below code ?

 \documentclass{report}
 \usepackage[utf8]{inputenc}


\usepackage[greek]{babel}
\usepackage{alphabeta}
\usepackage{float}


\usepackage{mathtools} 
\usepackage{amssymb} 
\usepackage{amsmath} 

\usepackage[makeroom]{cancel}


\setlength{\textwidth}{6.2in} \setlength{\textheight}{9.0in}
\hoffset=-0.8truein \voffset=-0.6truein




 \usepackage{amsthm}
 \usepackage{amsfonts}


 \usepackage{tikz-cd}

 \usepackage[arrow]{xy}

\begin{document}
\begin{align*}
  r \colon \text{\textlatin{Spec}}R &\to R/P \\
  P &\mapsto r\mod{P}
\end{align*}
\end{document}
9
  • 3
    Welcome to TeX.SE. Could you expand your code to a MWE starting with a \documentclass ending with \end{document}? Feb 10, 2023 at 15:14
  • @AlainRemillard I am not sure what you mean, in the main.tex it states \documentclass{report}
    – burbaki
    Feb 10, 2023 at 15:21
  • 2
    @burbaki they mean could you edit that into the code in your question. People cannot guess what \usepackage's, documentclass and custom commands you have used, it helps people help you if you make the code compile so we can copy and paste it and test it straight away
    – JamesT
    Feb 10, 2023 at 15:25
  • 4
    Please provide a small but complete document, which we can compile aa it is and which, of course, replicate your problem,
    – Zarko
    Feb 10, 2023 at 15:27
  • 3
    Also, I think it would be helpful to clarify what you want to achieve. Do you just want slightly longer arrows? Or slightly shorter? Or do you want to be able to choose an exact length? Or something else?
    – Vincent
    Feb 10, 2023 at 15:30

1 Answer 1

3

I'm not sure this is what you want, but amsmath provides \longrightarrow and \longmapsto for longer arrows.

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Spec}{Spec}
\begin{document}
\begin{align*}
  r \colon \Spec R &\longrightarrow R/P \\
  P &\longmapsto r\mod{P}
\end{align*}
\end{document}

Also, it is unrelated to your question but it is generally a bad idea to write math operators with \text (for example, if you write \text{Spec} in a theorem written in italic, then "Spec" will also be written in italic). It is better to define a command for the operator, for example with \DeclareMathOperator.

You must log in to answer this question.

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