# Tag Info

42

Finally I came up with a \tooltip command that works across a small number of PDF viewers, among which is an Open-Source one. The tooltip command allows for TeX-formatted tip texts. \tooltip[*[*[*[*]]]] [<link colour>]{<link text>} [<tip box colour>]{<tip text>} [<x-offset>,<y-offset>] It ...

20

\tooltip[black]{foo}[blue!50]{Hint: What is the definition of foo?} If the mouse is moved over 'foo' the tip is shown and it disappears immediately when the mouse is moved out. In order to drag the tip around, 'foo' must be clicked. The tip remains visible. Move the mouse over the tip, click it and move it around. Click the tip once more to pin it down at ...

12

I don't think you need to be worried about this: what you're getting is a Warning message, not an Error message: Package hyperref Warning: Option pdftex' has already been used, (hyperref) setting the option has no effect on input line [xx]. This warning message is generated by LaTeX while it's setting up the pdfcomment package, which (among ...

10

Here's an example using pdfpages to load the PDF as a background with TikZ to draw on top of it. The following code will complain about a missing image (tikzmark_example.pdf) but hopefully will give you the idea of what I was saying in the comments. I've left the grid in place as that's how I figure out the coordinates. This is adapted from code I use to "...

9

According to the pdfcomment manual you are looking for \textCR. The tab character can be given as \textHT, and there is also \textLF for a line feed. (Manual for v2.3, page 10.) Certain for me \documentclass{article} \usepackage{pdfcomment} \begin{document} \pdfmarkupcomment{$1+1$}{first line\textCR second line} \end{document} works when viewed in Adobe ...

9

I just want to add notes here and there to remind myself to go back and finish up certain sections as I go through writing the next few sections. Sounds like stuff you want to do later and add a note for yourself. Package todonotes helps you with exactly that task. \documentclass{article} \usepackage{blindtext} \usepackage{todonotes} \begin{document} \...

7

It seems that cite is fragile. However you can do two things: Put \protect before \cite \pdfmarkupcomment{here \protect\cite{Smith1959}}{comment2}. Put extra curly braces around cite \pdfmarkupcomment{here {\cite{Smith1959}}}{comment2}.

7

The problem is that you are having two so called PDF annotations defined at almost the same place. One for the tooltip and another one for the hyperlink, which is technically also a PDF annotation. You can switch off the hyperlink with: \usepackage[colorlinks=true,draft]{hyperref} So in this case, you can only have the one without the other! How about ...

7

The accsupp package implements the accessibility features defined in the PDF specification IS0-32000, Section 14.9. These features are aimed at improving readability of PDF documents for visually impaired readers and are therefore directed at properly configuring a text-to-speech engine of the target PDF viewer for representing the given content in an ...

7

pdfcomment offers an interface to PDF annotations (section 8.4, page 604 in PDF Reference, sixth edition ,Adobe® Portable Document Format, Version 1.7, November 2006, Adobe Systems Incorporated) There's no secret, pdfcomment just uses pdflatex's \pdfannot primitive. It takes care of the 'over head' and pdfcomment just adds some meat to the bone, e.g.: \...

6

Add the xcolor package to your preamble \usepackage{xcolor}% http://ctan.org/pkg/xcolor and use \pdftooltip{\textcolor{blue}{CD}}{Compact disk} Here is a complete, minimal working example: \documentclass{article} \usepackage{pdfcomment,xcolor} \begin{document} This is \pdftooltip{\textcolor{blue}{CD}}{Compact disk}. \end{document}

6

Tooltips in PDF documents are generally possible. I do know two packages; one of them you tagged yourself for your question, the other one I added, click on these tags to see, which questions were already asked in TeX.SX: fancytooltips & pdfcomment. But as Joseph Wright in a comment wrote: How PDF viewers show 'hover text' is down the them, not the ...

6

This bug has been fixed in version 2.3a of pdfcomment, which is available on CTAN and can be obtained by updating your TeX distribution. The manual fix provided in this answer is not necessary any more! Apparently there's a bug in pdfcomment which causes the weird appearance of the tooltips: There is a spurious slash in the specification of the field flags (...

6

Use the package option final as explained on page 4 of the documentation.

6

Like this? \documentclass{article} \usepackage{pdfcomment} \newcommand\mypdfcomment[2][]{{% \let\par\textCR \pdfcomment[#1]{#2}% }} \begin{document} \mypdfcomment{first line second line} \end{document}

6

You should activate the localization of datetime2: \documentclass[12pt]{scrartcl} \usepackage[american]{babel} \usepackage[utf8]{inputenx} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{xcolor} \usepackage{pdfcomment} \DTMsetregional \title{Example in \LaTeX} \author{rotton} \begin{document} \maketitle \section{Example section} Today is \...

5

Okular since some time in 2014 can save annotations inside files by saving it to a new file with: "File > Save as .." The annotations will then be saved inside that new file, and not just in the configuration/system files of okular. Opposite to that, you can use "File > Save Copy as ..", that removes any annotations for the newly saved file. ...

5

As far as I know, the only linux pdf viewer that can display tooltips is the linux version of Adobe reader.

5

If you don't plan to use \pdfcomment as argument to another command, this will work: \documentclass{article} \usepackage{pdfcomment} \makeatletter \newcommand{\PDFcomment}{% \begingroup \begingroup\lccode\~=\\ \lowercase{\endgroup\let~\textbackslash}% \let\do\@makeother\dospecials \catcode\{=1 \catcode\}=2 \catcode\\=\active \PDF@comment}...

5


5

You can pass option useregional=numeric to package datetime2: \documentclass[12pt]{scrartcl} \usepackage[american]{babel} \usepackage[utf8]{inputenx} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{xcolor} \PassOptionsToPackage{useregional=numeric}{datetime2} \usepackage{pdfcomment} \pdfcommentsetup{author=me, color=yellow, open=true} \title{...

5

pdfcomment loads soulpos which for an unknown reason loads soulutf8 in \AtBeginDocument, at this time the language shorthands are already active and this breaks soul. Load soul earlier (and consider also to load the languages later to avoid such conflicts). \documentclass{scrbook} \usepackage{soul} \usepackage{fontspec} \usepackage{polyglossia} \...

4

I can reproduce the problem. There seems to be a bug in soulpos.sty, which is used in \pdfmarkupcomment. When used in included files soulpos.sty only produces a .upa file but no .upb file. Therefore there are no positions to place the PDF annotation. soulpos.tex \documentclass{report} \usepackage{soulpos} \usepackage[rgb]{xcolor} %\newcommand\myinclude[1]{\...

4

[Converting Andrew Kepert's comment to a answer] Interaction with mouseovers (e.g. a hover colour) is done by the pdf viewer, and will vary from viewer to viewer. For example the pdfcomment.pdf pdf linked above will use yellow mouseover highlights within firefox's built-in pdf viewer but not in Adobe Reader or MacOS X Preview. Interaction within Adobe ...

4

The problem is quite subtle. If the index has not yet been compiled, the \clearpage command does essentially nothing and there is no next page, so pdfcomment can't complete its job, because no page is shipped out after the one in which the comment is. Solution: use imakeidx that also avoid the need of a separate run of MakeIndex. \documentclass[a4paper,...

4

The minimal tooltip macro definition below uses mouse-down and up events in addition to roll-over and out for showing/hiding the tooltip. This works in Adobe Reader on my PC. Take it as a proof of concept if it works on a tablet or phone too. In case of multiline tooltips, the tip text should be put into a \parbox[b]{}{}. \documentclass{article} \usepackage{...

4

Hinted by egreg in comment, I found this. It seems like soul tries analysising your string by typeseting a prototype in font \SOUL@tt. If the last few characters are missed in that font, soul would found that it just built a zero-width box. It then think that the current string is finished and stop working. \documentclass{article} \usepackage{fontspec,...

4

It is to some extend possible to add unicode chars (including math symbols) to pdfcomment if you compile with lualatex (^^^^2200 etc can be replaced by the real unicode input ∀) but annotation will imho never be able to show complex equations: \documentclass{article} \PassOptionsToPackage{unicode}{hyperref} \usepackage{pdfcomment} \begin{document} text\...

4

Here is a solution. Note: This is not about using fancytooltips but how adding elements to a non latex pdf file, named here mytest.pdf and included implicitly with mtpage environment. (if i understand) Note the example use \usepackage[filename=tooltipy,movetips,mouseover]{fancytooltips} from fancytooltips documentation examples. The environment mtpage ...

4

Here, I invoked hyperref separately from acro, and using the [hidelinks] option. \documentclass{article} \usepackage[hidelinks]{hyperref} \usepackage[tooltip]{acro} \DeclareAcronym{ABC}{short = ABC, long = alphabet} \begin{document} \section{ABC} \label{sec:ABC} \ac{ABC} \section{Comments} Here are comments on section~\ref{sec:ABC}. \printacronyms \...

Only top voted, non community-wiki answers of a minimum length are eligible