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
2 votes
1 answer
46 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 \...
user avatar
  • 4,885
0 votes
0 answers
62 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 ...
user avatar
  • 1
1 vote
1 answer
90 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} \...
user avatar
2 votes
1 answer
219 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 ...
user avatar
  • 6,246
6 votes
1 answer
230 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 ...
user avatar
1 vote
0 answers
126 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....
user avatar
1 vote
0 answers
386 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 ...
user avatar
  • 113
0 votes
1 answer
54 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 ...
user avatar
5 votes
1 answer
323 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 ...
user avatar
  • 205
5 votes
1 answer
843 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....
user avatar
2 votes
1 answer
67 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. \...
user avatar
  • 988
2 votes
1 answer
95 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 ...
user avatar
6 votes
1 answer
759 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 ...
user avatar
  • 1,047
8 votes
1 answer
510 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 ...
user avatar
3 votes
2 answers
387 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 ...
user avatar
  • 769
2 votes
1 answer
119 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 ...
user avatar
  • 988
4 votes
2 answers
429 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 ...
user avatar
  • 23.2k
8 votes
1 answer
259 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 ...
user avatar
  • 1,093
4 votes
2 answers
719 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} \\ &=& ...
user avatar
  • 177
5 votes
1 answer
517 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 ...
user avatar
  • 5,381
3 votes
3 answers
477 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 ...
user avatar
  • 1,467
4 votes
1 answer
306 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 ...
user avatar
  • 23.2k
3 votes
1 answer
181 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 ...
user avatar
  • 451
4 votes
2 answers
277 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 ...
user avatar
1 vote
0 answers
439 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. ...
user avatar
  • 11
1 vote
1 answer
255 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 ...
user avatar
  • 471
2 votes
1 answer
266 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} \...
user avatar
  • 471
4 votes
1 answer
462 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} ...
user avatar
  • 471
1 vote
1 answer
319 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 ...
user avatar
3 votes
0 answers
205 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....
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 ...
user avatar
  • 9
1 vote
1 answer
204 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 ...
user avatar
  • 13
1 vote
1 answer
583 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 ...
user avatar
  • 327
0 votes
1 answer
496 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 ...
user avatar
  • 327
4 votes
1 answer
416 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 ...
user avatar
  • 63
3 votes
2 answers
904 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 ...
user avatar
  • 8,488
2 votes
1 answer
186 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 ...
user avatar
  • 63
1 vote
0 answers
219 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} \...
user avatar
2 votes
1 answer
571 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 \...
user avatar
13 votes
2 answers
535 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, ...
user avatar
  • 8,488
8 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 ...
user avatar
  • 83
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 ...
user avatar
  • 51.2k
3 votes
1 answer
286 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? ...
user avatar
3 votes
1 answer
245 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[]...
user avatar
11 votes
1 answer
442 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 ...
user avatar
9 votes
2 answers
751 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. ...
user avatar
0 votes
1 answer
366 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 ...
user avatar
17 votes
1 answer
7k 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 ...
user avatar
  • 1,441
4 votes
3 answers
622 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 ...
user avatar
  • 6,265
10 votes
1 answer
830 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 ...
user avatar
  • 1,852