6

I would like to use a curved arrow symbol, positioned downwards, to signify "continued on the next line". I'm adjusting the arrow's size using scalefnt and taking the symbol indirectly from mnsymbol in order to avoid package conflicts.

\documentclass{memoir}
\usepackage{amsmath}
\usepackage{scalefnt}

% in order to not load package "mnsymbol":
\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
  <-6> MnSymbolA5
  <6-7> MnSymbolA6
  <7-8> MnSymbolA7
  <8-9> MnSymbolA8
  <9-10> MnSymbolA9
  <10-12> MnSymbolA10
  <12-> MnSymbolA12}{}
\newcommand*{\lcurvearrowdown}{\mathrel{\text{\usefont{U}{MnSymbolA}{m}{n}\symbol{187}}}}
\newcommand*{\nextlineref}{\raisebox{-1.25ex}[0pt][0pt]{\scalefont{1.25}\(\lcurvearrowdown\)}}

\begin{document}

This is text at normal size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx

\begin{small}
This is text at small size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx
\end{small}

\end{document}

I normally use this symbol to signify "math formula continued on the next line", but this example uses text since this is sufficient to illustrate the issue:

While the symbol scales in a small context, the combination of placement / size / distance to the next line appears incongruent: it is much closer to the letters "x" in the normal-sized context. Why is that, and how does one correct this? Inter-line spacing might play a role here, btw.

(Addendum / minor remark: Just now I realize that the arrow probably shouldn't be visually that close to the "x" letters ... anyways, my question still stands in the exact same way, as it's the consistency that I'm asking about; what I just noticed can so easily be adjusted through the right combination of the \scalefont and \raisebox factors, which I won't change in this post, to avoid confusion.)

5
  • 1
    By giving \raisebox the optional argument of [0pt] you are hiding the depth of the arrow symbol. Is that intentional? Removing this, opens up the line spacing to allow space. Commented Oct 5, 2012 at 8:36
  • @AndrewSwann Should I omit both [0pt] arguments? I originally used them to make sure that the displaced arrow symbol doesn't affect line spacing in any way. Commented Oct 5, 2012 at 18:29
  • The first [0pt] kills the height, the second the depth [0pt]. As you are lowing the symbol, the height is not relevant. You may as well drop both of the optional arguments. Commented Oct 6, 2012 at 13:18
  • @AndrewSwann But I want the effective line height to be unaffected. Commented Oct 6, 2012 at 16:58
  • 1
    If you do not want to affect the line height, then giving the [0pt] options to hide the depth is the correct thing to do. Commented Oct 7, 2012 at 10:09

3 Answers 3

3

The reason behind the strange behaviour is that you are not ending the paragraphs inside the groups that are affected by the font size switches, so the \baselineskip applied is the same as in \normalsize and this produces the inconsistency mentioned; as soon as you end the paragraphs inside the groups, the proper value for \baselineskip is applied and the problem disappears:

\documentclass{memoir}
\usepackage{amsmath}
\usepackage{scalefnt}

% in order to not load package "mnsymbol":
\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
  <-6> MnSymbolA5
  <6-7> MnSymbolA6
  <7-8> MnSymbolA7
  <8-9> MnSymbolA8
  <9-10> MnSymbolA9
  <10-12> MnSymbolA10
  <12-> MnSymbolA12}{}
\newcommand*{\lcurvearrowdown}{\mathrel{\text{\usefont{U}{MnSymbolA}{m}{n}\symbol{187}}}}
\newcommand*{\nextlineref}{\raisebox{-1.25ex}[0pt][0pt]{\scalefont{1.25}\(\lcurvearrowdown\)}}

\begin{document}

This is text at normal size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx

{\small
This is text at \verb+\small+ size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}

{\footnotesize
This is text at \verb+\footnotesize+ size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}

\end{document}

enter image description here

By the way, the font size switches are commands with no arguments, to be used as, for example, {\small some text\par} (the braces are to keep the change local and \par just in case more than one line is used and the proper value for \baselineskip is applied).

4
  • If I have a formula spanning over 4 lines (say) and separated by \nextlineref \\ , do I need to apply \par only to the very end? If I use \begin{small}...\end{small}, do I use \par in the same way? Commented Oct 5, 2012 at 18:33
  • 1
    @user14996 only at the end to make sure the paragraph ends; do not use \begin{small}... \end{small}; use {\small ... \par} instead (notice the braces to keep the change local). Commented Oct 5, 2012 at 18:37
  • Many thanks. Do I also use \par when I have more than one paragraph within {\small ...} (that is I have at least one empty line in there)? Commented Oct 5, 2012 at 20:55
  • 1
    @user14996 No, blank lines end paragraphs by themselves; you only need \par to end the last paragraph. Commented Oct 5, 2012 at 20:56
4

You can use \hookleftarrow or carriagereturn (dingbat} as in

\newcommand\nextline{\raisebox{-1.25ex}[0pt][0pt]{$\hookleftarrow$}}
\newcommand\nextlines{\raisebox{-1ex}[0pt][0pt]{\small\carriagereturn}}

A MWE:

\documentclass{memoir}
\usepackage{dingbat}
%\usepackage{scalefnt}
\newcommand\nextline{\raisebox{-1.25ex}[0pt][0pt]{$\hookleftarrow$}}
\newcommand\nextlines{\raisebox{-1ex}[0pt][0pt]{\small\carriagereturn}}

\begin{document}

This is text at normal size. \nextline \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par

\begin{small}
This is text at small size. \nextline \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{small}

\begin{footnotesize}
This is text at footnote size. \nextline \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{footnotesize}

This is text at normal size. \nextlines \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par

\begin{small}
This is text at small size. \nextlines \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{small}

\begin{footnotesize}
This is text at footnote size. \nextlines \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{footnotesize}

\end{document}

enter image description here

4
  • You're code exhibits the same problem than the one mentioned in the question; you are not ending the paragraph inside the groups, so the wrong \baselineskip value is applied. Commented Oct 5, 2012 at 2:18
  • How to obtain other kinds of arrows was not part of the question and it's not relevant to the question asked; your answer reproduces the exact problem the OP was asking for, without explaining the cause nor giving a solution. Commented Oct 5, 2012 at 2:34
  • @GonzaloMedina: OK I think I overlooked. Corrected now.
    – user11232
    Commented Oct 5, 2012 at 2:36
  • @PeterGrill Thanks to Harish Kumar for drawing attention to dingbat's \carriagereturn. That's good to know, though mnsymbol's \lcurvearrowdown has higher resolution when one zooms in. I suspect that dingbat is a bitmap font and that's why. // And thanks to both Harish and Peter for your solutions. Credit for solving the riddle goes to Gonzalo, though. Commented Oct 5, 2012 at 21:31
1

You can also use the usual overkill option of tikz which then gives you all the flexibility inherent in tikz in terms of adjusting the arrow tips, colors, line styles, etc. A few of the options are illustrated below:

enter image description here

Code:

\documentclass{memoir}
\usepackage{tikz}

\newcommand{\NextLineRef}[1][]{%
    \tikz [overlay,remember picture] \draw [->, out=-10, in=20, distance=0.25cm, thick, #1] 
        (0,0.5ex) to (0,-1.25ex);
}

\begin{document}

This is text at normal size. \NextLineRef[red] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx

This is text at normal size. \NextLineRef[red, -latex, shorten >= -0.5ex] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx


{\small
This is text at \verb+\small+ size. \NextLineRef[orange, -latex, distance=1.5cm] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}

{\footnotesize
This is text at \verb+\footnotesize+ size. \NextLineRef[blue, densely dotted] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}

{\small
This is text at \verb+\small+ size. \NextLineRef[green, distance=1.5cm, out=5, in=10] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}

\end{document}

You must log in to answer this question.

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