Text FormattingDynamic text features in PDF

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ushbayev
Posts: 9
Joined: Tue Apr 13, 2010 6:43 pm

Dynamic text features in PDF

Post by ushbayev »

Can someone kindly help me understand how to implement dynamic features (e.g. enabling/disabling some property of displayed text on click) such as for example found in the left margin on page 4 of the microtype manual (Section 1).

The ability to make sidenotes like in the page referred to above is also very interesting and I would very much appreciate help on achieving that.
Last edited by ushbayev on Thu Apr 28, 2011 6:21 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Dynamic text features in PDF

Post by localghost »

I suggest to ask the package author directly. Since in the CTAN directory of microtype there is no source to compile the manual directly, it would be difficult to find out by yourself how this feature has been integrated. I guess its done by Javascript. Feel free to report this new knowledge here.


Thorsten
ushbayev
Posts: 9
Joined: Tue Apr 13, 2010 6:43 pm

Re: Dynamic text features in PDF

Post by ushbayev »

Thank you, Thorsten

I have written an email to Robert Schlicht, and as soon I get an answer, I will post the relevant knowledge here.

Anuar
ushbayev
Posts: 9
Joined: Tue Apr 13, 2010 6:43 pm

Dynamic text features in PDF

Post by ushbayev »

This is the relevant part of the response I got from Robert Schlicht if anyone is interested:
For the dynamic content I use the PDF feature of layers (optional content groups). The source is in microtype.dtx, which you should already have or find on ctan.
The relevant code starts with the line:
% the samples in the introduction, utilising nested optional content groups (aka. layers):
It's all quite ad-hoc, unfortunately, and not easily re-usable, but maybe you can get the idea. I've long wanted to turn this into a package
of its own, but never got around doing it. In the meantime, a package called ocgtools has cropped up, which should allow similar tricks, I haven't tried it though.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Dynamic text features in PDF

Post by localghost »

You can find the *.dtx file when following the link in my last reply. With the hints from the author you should be able to find the concerned parts of the code.
ushbayev
Posts: 9
Joined: Tue Apr 13, 2010 6:43 pm

Dynamic text features in PDF

Post by ushbayev »

Thanks, I've figured that out already :)

By the way the ocgtools package does many desired features, I've tried it out today.

Thanks for the help again.
Post Reply