TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using pgfplots in combination with the clickable library. Here's an example


% important packages

    [% options
    clickable coords = {exact coords: <br/> (xy)}, % activates a snap-to-nearest feature
    annot/snap dist=10,
    clickable coords size = {10,5}, % size in characters for the snapping pop ups
    annot/popup size generic = {20,10}, % size in characters  for the rest
    [% options
    only marks, % do not connect data points

The result can be seen here


If you click near the data points then you will get a message like this:

exact coords:

If you click anywhere else you just get:


Here's a screenshot of the first case: Screenshot

In the pgfplots documentation in chapter 5.1.3 there is also mentioned that you can use the sprintf syntax to customize the formatting. Example:

/pgfplots/annot/point format={sprintf-format} (initially (%.1f,%.1f))


But I do not understand how I can use the




within the normal LaTeX code.

Does anyone have an example how to use the line break symbol (\n) and the variable placeholder symbol (%) in the context of the clickable library?

share|improve this question
up vote 4 down vote accepted

The clickable lib has extra support for the control sequences or chars ", \#, |, \", \n, \r, \t, \\, \%.

It should work out-of-the-box if you place these special escapes into the argument.

And it used to work, at least together with pdflatex.

Note that the manual appears to be incorrect: the initial values of these keys are

annot/point format/.initial={(\%.1f, \%.1f)},
annot/point format 3d/.initial={(\%.1f, \%.1f, \%.1f)},
share|improve this answer
Thanks - I'll try it again. Very cool that the author himself answers me here. – Dr. Manuel Kuehner Oct 18 '12 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.