LaTeX_auto_tooltip is a project that allows equations and citation references to appear as pop-ups in Adobe Reader. When the reader hovers over an equation or citation reference in a PDF generated from LaTeX, a contextual pop-up window displays additional information.
Note: This feature is currently only supported in Adobe Reader and may not work on other PDF viewers.
- Pop-up display for LaTeX equations
- Pop-up display for citation references
- Make sure you have Python installed on your computer. If not, you can download it from Python's official website.
- Ensure that your MiKTeX distribution is up-to-date. You can update it through the MiKTeX Console.
Create your LaTeX file as usual.
- Avoid special characters in labels, such as
.,-, and_. Instead, use case sensitivity to distinguish your labels, for example,MySuperFirstEquation. - The formatting of equations should be as follows:
Note that
\begin{equation}\label{MySuperFirstEquation} E = mc^2 \end{equation}
\begin{equation}\label{XXX}must be on the same line. - Include the
mytooltip.styandbiblio.stypackages in your LaTeX file.\usepackage{biblio} \usepackage{mytooltip}
- With the package
biblio.sty, usein the preambule, and\addbibresource{YOUR_BIB_FILE_NAME.bib}where you want the bibliography to be printed.\printbibliography
Before compiling your LaTeX file, run main.py. This script scans all .tex files in the current directory to retrieve equations and the first .bib file found in the directory. It then extracts the content of the equations and citations and stores them in equations.txt and citations.txt, respectively.
python main.py- Re-run
main.pyeach time you want to refreshequations.txtandcitations.txt. - The
main.pyfile is easily editable to target a specific.texor.bibfile (see Customization)..
Compile your LaTeX file as usual. The commands affected by mytooltip.sty are \eqref and \cite.
Examples in images:
- For
\eqref:\begin{equation}\label{EqEasy} 1+1=2 \end{equation} The ref \eqref{EqEasy}.

- For
\cite:A new citation \cite{AlfaroFieldroad23}.

You can disable the pop-up effects using two booleans introduced in mytooltip.sty:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%BOOL SETTINGS
\setboolean{EquationPopUp}{true} % On Adobe Reader, popup equations when mouse is over references
% \setboolean{EquationPopUp}{false} % Cancel that effect
\setboolean{CitationPopUp}{true} % On Adobe Reader, popup citations when mouse is over references
% \setboolean{CitationPopUp}{false} % Cancel that effect
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%To modify the target files of main.py, you can adjust the following lines in the script:
# Non-automatic file exploration:
# tex_files = ["main.tex"]
# bib_file = "biblio.bib"This project is licensed under the MIT License.
