2

I am writting an article using the \documentclass{jfm} provided by the journal and I have some issues with the fancytootip package. It doesn't display the popup windows but when I come back in \documentclass{article} it does. There is some MWE:

First I created a .pdf that file I called proofs with the following code to generate my equations:

    \documentclass{article}
    \usepackage[usenames, dvipsnames]{color}
    \usepackage{amsmath}
    \usepackage[createtips]{fancytooltips}
    \usepackage{tcolorbox}

    \tcbset{
           colframe=black!20!white,
           colback=yellow!20!white,
          %colbacktitle=black!20!white,
          %title=Proofs,
          %fonttitle=\bfseries
          }

   \begin{document}

   \keytip{proofi}
   \begin{tcolorbox}
   Expressions for proof:
   \[
    I_1 = \begin{bmatrix}
           1 & 0 & 0 \\
           0 & 1 & 0 \\
           0 & 0 & 1 
           \end{bmatrix}
   \]
   \end{tcolorbox}

   \clearpage

   \keytip{proofii}
   \begin{tcolorbox}
   Expressions for proof2:
  \[
   I_2 = \begin{bmatrix}
          2 & 0 & 0 \\
          0 & 2 & 0 \\
          0 & 0 & 2 
          \end{bmatrix}
  \]
  \end{tcolorbox}

  \clearpage

 \keytip{proofiii}
 \begin{tcolorbox}
 Expressions for proof3:
\[
 I_3 = \begin{bmatrix}
       3 & 0 & 0 \\
       0 & 3 & 0 \\
       0 & 0 & 3 
       \end{bmatrix}
\]
\end{tcolorbox}

\clearpage

\keytip{proofiiii}
\begin{tcolorbox}
Expressions for proof4:
\[
 I_4 = \begin{bmatrix}
        4 & 0 & 0 \\
        0 & 4 & 0 \\
        0 & 0 & 4 
       \end{bmatrix}
\]
\end{tcolorbox}

\clearpage

\keytip{proofiiiii}
\begin{tcolorbox}
Expressions for proof5:
\[
 I_5 = \begin{bmatrix}
        5 & 0 & 0 \\
        0 & 5 & 0 \\
        0 & 0 & 5 
       \end{bmatrix}
\]
\end{tcolorbox}

\end{document}

Then I used it in the main program with the command \usepackage[filename=proofs,mouseover,noextratext]{fancytooltips} using the \documentclass{jfm}:

  % This i% This is file JFM2esam.tex
  % first release v1.0, 20th October 1996
  %       release v1.01, 29th October 1996
  %       release v1.1, 25th June 1997
  %       release v2.0, 27th July 2004
  %       release v3.0, 16th July 2014
  %   (based on JFMsampl.tex v1.3 for LaTeX2.09)
  % Copyright (C) 1996, 1997, 2014 Cambridge University Press

  \documentclass{jfm}
  \usepackage{graphicx}
  \usepackage{epstopdf, epsfig}
  \usepackage[usenames, dvipsnames]{color}
  %\usepackage{xcolor}
  \usepackage{tcolorbox}

  \tcbset{
         colframe=black!20!white,
         colback=yellow!20!white,
         %colbacktitle=black!20!white,
         %title=Proof,
         %fonttitle=\bfseries
         }

  \usepackage{url}
  \usepackage{hyperref}
  \usepackage[noabbrev]{cleveref}
  \hypersetup{
             colorlinks   = true, %Colours links instead of ugly boxes
             urlcolor     = black, %Colour for external hyperlinks
             linkcolor    = blue, %Colour of internal links
             citecolor    = ForestGreen %Colour of citations
             }

  \usepackage{amsmath}
  \usepackage[labelsep=period]{caption}
  \usepackage{subcaption}
  \usepackage[filename=proofs,mouseover,noextratext]{fancytooltips}

  \usepackage{siunitx}
  \usepackage{xfrac}
  \usepackage{nicefrac}



  \newtheorem{lemma}{Lemma}
  \newtheorem{corollary}{Corollary}

  \shorttitle{Fancytooltips package don't work with documentclass{jfm}}
  \shortauthor{Authors}

  \title{Fancytooltips package don't work with documentclass{jfm}}

  \author{
   Authors
    \corresp{\email{zzz@hotmail.com}}   
  }

  \affiliation{
    \aff{}
     Stackexchange
 }

  \begin{document}

   \maketitle

  \begin{abstract}
    ''xyz.''
  \end{abstract}

  \begin{keywords}
   Fancytooltips, stackexchange,documentclass
  \end{keywords}

  \section{Introduction}

   \tooltip{Click here to see the proof1.}{proofi}\\
   \tooltip{Click here to see the proof2.}{proofii}\\
   \tooltip{Click here to see the proof3.}{proofiii}\\
   \tooltip{Click here to see the proof4.}{proofiiii}\\
   \tooltip{Click here to see the proof5.}{proofiiiii}\\

   \end{document}

The links are of course in blue but there's no popup windows appearing when the mouse hovers the links of the equations. As shown:

Proofs using \documentclass{jfm}

When I change the documentclass in article using the MWE:

  \documentclass{article}
  \usepackage{xcolor}
  \usepackage[filename=proofs,mouseover,noextratext]{fancytooltips}
  \usepackage{amsmath}
  \usepackage{amsthm}
  \usepackage{lipsum}

  \newtheorem{theorem}{Theorem}

  \begin{document}

  \begin{theorem}
  \lipsum[4]
  \end{theorem}
  \tooltip{Click here to see the proof1.}{proofi}

  \begin{theorem}
  \lipsum[4]
  \end{theorem}
  \tooltip{Click here to see the proof2.}{proofii}

  \begin{theorem}
  \lipsum[4]
  \end{theorem}
  \tooltip{Click here to see the proof3.}{proofiii}

  \begin{theorem}
  \lipsum[4]
  \end{theorem}
  \tooltip{Click here to see the proof4.}{proofiiii}

  \begin{theorem}
  \lipsum[4]
  \end{theorem}
  \tooltip{Click here to see the proof5.}{proofiiiii}

  \end{document}

I have my citations appearing. As shown in here!

Proofs using \document

The first question is how can I use the fancytooltip package with \documentclass{jfm} and the second one is when I use the fancytooltip package with \documentclass{article}, my popup windows appears only on the top of the page even if the citation is at the end of the page as shown in the image and it might be incomfortable for the readers. How can I avoid it?

Your Answer

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

Browse other questions tagged or ask your own question.