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
6 votes
2 answers
201 views

New color command \colorPlus[<color-when-printed>]{<color-in-PDF>} that behaves differently when viewed and printed

The aim is to define a new command \colorPlus[<color-when-printed>]{<color-in-PDF>} that works exactly like the usual \color{<color-in-PDF-and-print>} when used without optional ...
Linear Christmas's user avatar
0 votes
0 answers
154 views

How to create a document with collapsible proofs?

I am trying to create a document which has a series of theorems and proofs, one right after the other. I would like it so that in the pdf, one can click a button next to a proof that collapses that ...
graphtheory123's user avatar
0 votes
0 answers
60 views

Create OCGs for each character in a document

I need an ocg for each character in the pdf-export to be able to import the pdf in after effects with each character as a separate layer. I'm looking for a solution where you don't have to write... \...
Andreas's user avatar
1 vote
0 answers
79 views

How texts will appear in a frame on a click

Recently a friend of mine shared with me a very interactive pdf, as you can see in the extract below. On clicking the Answer button, the answers appear as shown below I have tried to read the ...
Kidegalize's user avatar
0 votes
0 answers
23 views

Is there a way to reevaluate the whole document twice in different OCGX layers, with some option slightly different?

I need different Layers on a Document, with the same content but different color schemes, I already know that OCGX can create layers, but I couldn't figure out how to reevaluate the document with ...
Jannes Althoff's user avatar
2 votes
1 answer
74 views

Using expansion in toggleocgs argument

I want to use ocg-p to define an environment step which has an Optional Content Group (OCG / "layer") with a "+" character in the margin that allows you to toggle the group. I use \...
Keelan's user avatar
  • 5,425
0 votes
0 answers
134 views

Postscript File to Place Everything in a Layer

Would like a postscript file that will place original pdf content onto a layer. Everything in the original pdf goes on a layer. Don't know how to place the stream into the ocg... This is the start of ...
KeWe's user avatar
  • 1
1 vote
1 answer
209 views

Switching pictures in place with ocgx2

Using ocgx2 and pdflatex I would like to switch between two tikzpictures that are identical in size. If I do \switchocg{ocg23a ocg23b}{Lösung} \begin{ocg}{OCG 1}{ocg1}{1} \begin{tikzpicture} \...
user1583209's user avatar
6 votes
1 answer
919 views

Interactive button in the pdf file

I thought .pdf files generated with LaTeX were static, until I see this interactive button on page 4 of the documentation of microtype: It is amazing! How is this achieved? Is it possible to build ...
Jinwen's user avatar
  • 8,518
6 votes
1 answer
296 views

Making Tikz shapes/surfaces that don't appear in the PDF

I want that my tex-editor shows me the 2-holes of a A4 sheet, but don't appear in the output PDF. Note: I don't want to use % and comment the circle's out and compile it again. The reason is, that I ...
Bilal Yilmaz's user avatar
1 vote
0 answers
196 views

Extract page range from pdf preserve LaTeX ocg

I have a pdf file created with pdflatex and hyperref / ocgx2 packages. How can I create a pdf out of this containing a range of pages (say pages 2 to 5) preserving the ocg? Usually I do: pdftk orig....
user1583209's user avatar
2 votes
0 answers
796 views

Hide certain elements when printing a document

For some reason, I wanted to insert a notice to users that they can click on certain elements in my PDF document. However, this notice should not appear when the document is printed on paper, as it's ...
Crsi's user avatar
  • 123
0 votes
1 answer
94 views

OCGX Overlapping Links Visibility

I'm using OCGX to generate multiple layers with text and links. All layers are set invisible/hidden (0) by default, except one "main" visible layer. The purpose of this is so when the PDF is opened in ...
Octavio Araujo's user avatar
5 votes
1 answer
518 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 ...
Svalorzen's user avatar
  • 296
6 votes
1 answer
1k 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....
N3buchadnezzar's user avatar
2 votes
1 answer
75 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. \...
Peter's user avatar
  • 998
3 votes
1 answer
123 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 ...
Ethan Duckworth's user avatar
6 votes
1 answer
1k 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 ...
ejazz's user avatar
  • 1,047
8 votes
1 answer
744 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 ...
Ian Appelbaum's user avatar
3 votes
2 answers
470 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 ...
user19087's user avatar
  • 819
2 votes
1 answer
136 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 ...
Peter's user avatar
  • 998
4 votes
2 answers
535 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 ...
AndréC's user avatar
  • 24.3k
9 votes
1 answer
293 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 ...
Levy's user avatar
  • 1,167
4 votes
2 answers
1k 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} \\ &=& ...
ranlot's user avatar
  • 177
5 votes
1 answer
645 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 ...
Ross's user avatar
  • 5,666
3 votes
3 answers
577 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 ...
Pteromys's user avatar
  • 1,487
4 votes
1 answer
345 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 ...
AndréC's user avatar
  • 24.3k
3 votes
1 answer
192 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 ...
takrl's user avatar
  • 471
5 votes
2 answers
322 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 ...
Raphael Spaans's user avatar
1 vote
0 answers
712 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. ...
Hans's user avatar
  • 11
1 vote
1 answer
341 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 ...
Martin's user avatar
  • 511
2 votes
1 answer
308 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} \...
Martin's user avatar
  • 511
4 votes
1 answer
560 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} ...
Martin's user avatar
  • 511
1 vote
1 answer
386 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 ...
alphabeta's user avatar
3 votes
0 answers
224 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....
flying sheep's user avatar
0 votes
0 answers
2k 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 ...
April's user avatar
  • 9
1 vote
1 answer
238 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 ...
K.E.'s user avatar
  • 13
2 votes
1 answer
764 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 ...
D. Dal's user avatar
  • 377
0 votes
1 answer
628 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 ...
D. Dal's user avatar
  • 377
4 votes
1 answer
501 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 ...
HHVice's user avatar
  • 63
5 votes
2 answers
1k 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 ...
knut's user avatar
  • 8,838
2 votes
1 answer
199 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 ...
HHVice's user avatar
  • 63
1 vote
0 answers
237 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} \...
Peter Ebelsberger's user avatar
2 votes
1 answer
639 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 \...
Tobias Kienzler's user avatar
13 votes
2 answers
603 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, ...
knut's user avatar
  • 8,838
9 votes
1 answer
2k 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 ...
Saltaf's user avatar
  • 93
3 votes
1 answer
1k 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 ...
AlexG's user avatar
  • 54.9k
3 votes
1 answer
361 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? ...
Melvin Roest's user avatar
3 votes
1 answer
248 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[]...
Charles Pelletier's user avatar
11 votes
1 answer
484 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 ...
Grandement's user avatar