Open main menu

< PDF navigation | Widgets >

This page collects a few PDF specialties that have similar attributes. They don’t work with all PDF readers, and we can’t demonstrate them here.

Comments

You know these sticky litte yellow notes? Also in PDFs? Here’s how you use them with ConTeXt:

\setupcomment[
  symbol=Note,
  location=inmargin,
]
\samplefile{knuth}%
\startcomment[author=Editor]
You should shorten this paragraph!
\stopcomment
  • See \setupcomment for options (they don’t need to be yellow stickers).
  • Instead of \startcomment[options contents \stopcomment you can also use \comment[options]{contents}.
  • If you don’t move the comment into the margin (or edge), it takes space in the text flow. (It really shouldn’t.)

Markup

Now it would be nice if we also could use the text marker tool. Here’s how:

\enabledirectives[backend.pdf.fixhighlight]
\definecolor[pdfhighlight:Editor][r=.8,g=1,b=1]

Text \PDFhighlight[Editor][Please shorten!]{\samplefile{knuth}} Text
  • This was added in ConTeXt LMTX 2024-09-17.
  • The \PDFhighlight[author][commend]{visible contents} command is only activated by \enabledirectives[backend.pdf.fixhighlight], since the implementation of this feature in PDF viewers (including Acrobat) contradicts the PDF specification, two coordinates are swapped. See also musings-viewers.
  • Define a color with the prefix pdfhighlight: and the name of the author.
  • This highlight works differently from e.g. \_bar (\underbar etc.) in that the highlight is a PDF annotation and not part of the text or design.

Attachments

You can add files to your PDF (see Attachment)

Other

Acrobat allows several other annotations, e.g. multimedia comments. Probably nobody uses them, and ConTeXt doesn’t support them.