Questions tagged [ocg]

An OCG (Optional Content Group in a PDF document) is a section that can be selectively viewed or hidden. This functionality is useful in items such as CAD drawings, layered artwork, maps...

Filter by
Sorted by
Tagged with
4
votes
1answer
76 views

Tikz & OCG: make button cycling through different layers

I would like to have an OCG button which, when pressed, cycles through a set of OCG layers. I've tried using self-referencing OCG buttons, where each toggled the other (I tried with and without ...
4
votes
1answer
169 views

Stacking pdf layers

I am trying to display different boxes with a logo in it based on which PDF layers are active. See the image below In my example I only have 3, but for my actual problem I am guessing I need 3 groups....
2
votes
1answer
38 views

Possible incompatibility between varwidth and ocgcolorlinks (hyperref/ocgx2)

In the simple example below, a reference inside varwidth environment fails due to hyperref package loaded with option ocgcolorlinks. Ading ocgx2 (with the same option) makes this even worse. \...
2
votes
1answer
57 views

Combine ocg and hyperlink

Can I combine an ocg command and a hyperlink? For instance, can I turn the following two commands on the second page into something that only takes one click to both return to the first page and ...
5
votes
1answer
274 views

ocgx2: verify and reset of Multiple Choice Questions with OCGs

EDIT: The original question was unclear, not well-posed, posted too early and too much verbose. After having some rest and digging more in deep the issue, I am now able to answer by myself to almost ...
8
votes
1answer
200 views

OCGX and hyperref: visibility and clickability of overlapping links

I am using ocgx to display different text blocks (in the same area of the same page) upon clicking links in the PDF. However, each of these textblocks has its own \href links, and these links overlap ...
2
votes
2answers
202 views

ConTeXt: Replace PDF Content During Printing

Is it possible to create a single document which appears different when printed? Not separate modes which typeset multiple documents per input TeX, but a single document which prints differently than ...
2
votes
1answer
79 views

Scalebox not working properly inside hyperlinks when using ocgx2 package

I am using hyperlink text formatted with graphicx' \scalebox command with independent factors for horizontal and vertical scaling. When formatting is applied inside hyperref's hyperlinks, the text in ...
4
votes
2answers
282 views

TikZ: Is it possible to use ocgx or ocgx2 with scaling?

To get a handout, I drew polygons on A4 paper arranged in landscape mode. In order to create an interactive slide show with beamer associated with these documents, I had to reduce the dimensions with ...
8
votes
1answer
214 views

PDF layers don't show

I'm trying to show the watermark as a background layer so the reader may have the option to either see the background or not. I'm using the LuaLaTeX and the xwatermark package. When I compile the ...
4
votes
2answers
323 views

fold / unfold system of equations in long derivation

I am showing a long derivation (simplified example here) \documentclass{article} \begin{document} \begin{eqnarray*} 0 &=& 0 \\ &\downarrow& \mbox{using eq.}~\ref{eq0} \\ &=& ...
4
votes
1answer
301 views

Multiple choice questions linked to solutions using Optional Content Groups (OCG)

I am setting up some practice tests for an aptitude exam my son will undertake for entry to university. Many example questions are available. Hard copy books publish the questions at the front of the ...
3
votes
3answers
336 views

Conditional math symbols

In my private notes, I use non-standard mathematical symbols: I like using 0 to denote the empty set. Quite reasonably, my advisor does not like this if I do this in my paper. So I'd like to use 0 ...
4
votes
1answer
202 views

Is there a way to modify the mouse with ocgx2?

I wrote a transparency with Beamer containing a timed itemize list (overlay) and an OCG layer. When the mouse is not above the OCG link called "circle", it has the following form: When the mouse is ...
3
votes
1answer
137 views

Link “size” is wrong when compiling with XeTeX [closed]

Here's my requirements: I need to use XeTeX. I need to have links, so I'm using hyperref I need links to be black when printing, so I'm using option ocgcolorlinks with hyperref I need the links in ...
4
votes
2answers
195 views

OCG-Package: Not hiding link when printing document

In my .tex file I added a hyperref link in my footer, which takes you back to the Table of contents. I want this link to disappear when I let the user print my document. I thought the OCG-P package ...
1
vote
0answers
212 views

Making drop down lists in PDF [closed]

I want to write some notes with a bunch of lengthy derivations. Is there a possibility to hide the derivation in the pdf to ensure readability, but show it (i.e. via some drop down) on demand - i.e. ...
0
votes
1answer
126 views

Show ocg layers in handout

Im am using the ocg package to create clickable layers in a pdf presentation. These items are invisible at the start of the presentation. Is there a command or method to show them when I create a ...
1
vote
1answer
186 views

Toggle colors with ocgx - multiple buttons

EDIT: The first description of the problem was not good enough, please note the edit at the end. Here I asked about how to toggle colors with ocgx. This was the solution: \documentclass{beamer} \...
4
votes
1answer
235 views

Toggle colors with ocgx

I want to use the ocgx package to create a pdf with a button that changes its color when clicking on it from red to green to invisble to red (and so on). I tried the following: \documentclass{beamer} ...
1
vote
1answer
250 views

ocg + tikz + How to show one value and hide the other?

I have an array of "3D buttons" (the array will have more that 100 buttons). Clicking on a button I want to show the "OCG of the button" and hide the other OCG's. How can I do it? Below is an example ...
3
votes
0answers
161 views

Optionally colored links in ConTeXt

This question is about having colored links on screen while printing them black. The solution is \documentclass{article} \usepackage[ocgcolorlinks]{hyperref} \begin{document} \href{https://tex....
1
vote
0answers
833 views

Collapsable/expandable text in Latex [duplicate]

I'm writing a manual for a new piece of software, and I would like to be as clear as possible and include entire derivations for the governing equations. However, I understand that most users don't ...
1
vote
1answer
129 views

Creating invisible sections that can be indexed and added to glossary

Basically I am trying to index, or make a glossary out of what is inside a picture. Let's say the pictures have apples and bananas, I am trying to add those to a glossary at the end where I should ...
0
votes
1answer
367 views

How to Adjust Sizes in Beamer?

I hope this is a minimum example, I don't know how to make it any smaller without getting rid off what I need help with... Anyway, there are 4 total boxes or "Projects" and they all have to show up on ...
0
votes
1answer
262 views

Help with OCG Boxes

I previously posted around an hour ago, but this is an updated, better explained, simpler question. I have the following repeated a few different times. I just need to know how to make the Box 1, Box ...
4
votes
1answer
309 views

clickable checkmarks in pdf with ocgs

I want to create a pdf (with pdflatex) with some ocgs layers. These layers are only images. Further I want to activate and deactivate these layers with boxes and checkmarks. So for example if I see a ...
3
votes
2answers
602 views

Is there a possibility to include a pdf with defined layers?

I can insert pdf pages with the pdfpages. There are options to select pages ... But I found nothing to select specific layers. Is there a possibility? Details PDF to be included The following code ...
2
votes
1answer
144 views

Including png in several layer with ocgx for making a pdf

I try to make a pdf with pdflatex, which should contains several pngs images. The special thing is, that there should be for each png one layer (ocgx). At the end I want to have a pdf file, which all ...
1
vote
0answers
185 views

ocgx2 does not work with sumatra, but ocgx does [closed]

According to this artivle Can I automatically split an ocg environment over page breaks a new pages was introduced by AlexG \documentclass{article} % \usepackage{ocgx2}[2015/11/23] \usepackage{ocgx} \...
2
votes
1answer
428 views

How to put a watermark-wallpaper into a non-printing PDF layer in xetex?

Thanks to another post I used \usepackage{wallpaper} \usepackage{watermark} \leftwatermark{ Left \ThisCenterWallPaper{1.0}{Wallpaper-L.pdf} } \rightwatermark{ Right \...
13
votes
2answers
445 views

How to use ocg-p with LuaLaTeX (TeXlive 2015)?

If I compile the following MWE \documentclass{scrartcl} \usepackage{ocg-p}%Layers \begin{document} \end{document} with luaLaTeX, it stops with the following error: ! Package ocg-p Error: pdfeTeX, ...
5
votes
1answer
1k views

Creating interactive plots in tikz with pop-ups

I'm trying to create a 2-d plot in LaTeX. I am facing two issues: I am using the ocg package to make the plots appear/disappear by clicking on the legend. It partially works as the markers in the ...
3
votes
1answer
896 views

hyperref with ocgcolorlinks option & dvips/ps2pdf

In my PDF document, while opened in the PDF viewer (AR), I would like to have coloured text as hyperlinks instead of boxes. So I set the package option ocgcolorlinks with hyperref, because links ...
3
votes
1answer
239 views

Links is it possible to show alternate text when the pdf is printed?

I want to have an electronic pdf version that says: See the game Guillotine (video). But in the printed version it should just say: See the game Guillotine. Is this type of behavior possible? ...
3
votes
1answer
211 views

ocgx and media9 (v0.48) incompatibility

When compiling(pdfLaTeX) with media9 v.0.48 (22 dec 2014) the ocg doesn't work if \includemedia command is present (no error). Everything is fine when using older media9(27 sept 2013) \documentclass[]...
11
votes
1answer
391 views

Include PDF with OCGs

I want to avoid to recompile large tikz graphics and therefore I compile them as a standalone pdf file. This file contains some OCG layers which I want to use in the main file, but the OCG layer are ...
9
votes
2answers
543 views

“Smart commenting” in LaTeX

Is there any package that lets me insert "smart comments" in a LaTeX document? What I mean by "smart commenting": I have a source (.tex) file of notes of the lecture that happened in the classroom. ...
0
votes
1answer
273 views

Confused visibility of PDF layers when restoring from fullscreen mode

one of may colleagues observed that the visibility of some PDF layers may (unreasonably) change when the document restores from Fullscreen mode. Steps to reproduce: Open the file ocg-p_example_4.pdf ...
15
votes
1answer
4k views

fold/unfold sections to expand in PDF

Is there a way to fold/unfold certain sections in a pdf. Only when the user clicks on the section or plus sign the items show up. Example: user clicks on the plus sign and the items appear as drop ...
4
votes
3answers
531 views

Typeset two styles of the same text over top each other

So the goal of this exercise is to have text that can be displayed via the ocg-p package in two distinct styles depending on the OCG layer that is in effect (similar to this question/answer). The ...
8
votes
1answer
619 views

How to invert a PDF using OCG/Layers?

I am creating a PDF that is designed for viewing on Screens/Tablets, and uses white Text on black background. Since some readers might want to print it, and I want to avoid to create a second PDF, I ...
4
votes
2answers
237 views

Can I automatically split an ocg environment over page breaks

I want to display ocgs in a pdf and use the ocgx package to achieve this. Sometimes the content I have in the environment is so long it needs a page break. This is incompatible with the ocg system and ...
5
votes
0answers
396 views

Replace ocgtools' ocgpicture with ocgx [closed]

Since ogctools isn't working for me with TexLive2013, I try to rebuild its command \ocgpicture which shows a picture and by clicking on this it is show in full size. By clicking on the big picture it ...
6
votes
1answer
248 views

ogctools in combination with beamer

I try to use ocgtools in a beamer presentation, which worked for me some time ago. But now (TeXLive 2013) this seems not wo work anymore. As soon as I include the ocgtool package there are errors ...
7
votes
2answers
427 views

Incompatibility of the ocg-p package with the ocgcolorlinks option of the hyperref package

When I use the option ocgcolorlinks of the hyperref package together with the package ocg-p (MiKTeX + pdflatex), it looks like the ocgcolorlinks option becomes not working anymore (independently of ...
6
votes
2answers
810 views

How to disappear text or figures by printing?

As you know, the option ocgcolorlinks of the hyperref package disables colors of all links presented in a PDF file by printing it from Adobe Reader (and by compiling with e.g. pdflatex); as a result, ...
9
votes
3answers
1k views

How to carry long text of \href to the next line while ocgcolorlinks is present?

This simplest code \documentclass[a4paper]{book} \usepackage[ocgcolorlinks]{hyperref} \begin{document} \href{"some URL"}{"long text"} \end{document} by compiling with pdflatex puts the "long ...
16
votes
1answer
425 views

Features that could not be replicated on paper (e.g. animation, tooltips)

While browsing this site, I was surprised to find that TeX allows one to produce various kinds of output that could not be represented on paper. For example, one has animation ( How can we draw ...
6
votes
1answer
234 views

How to use pdf:bann and pdf:eann into a tikz node?

(This question follows up How to emulate \pdfstartlink and \pdfendlink with xetex?) Note: I used the last CVS version of TikZ/PGF. With xelatex, I would like to create annotations in tikz nodes. ...