Questions tagged [ocgx2]
This package {ocgx2} serves as a drop-in replacement for the packages ocgx by Paul Gaborit and ocg-p by Werner Moshammer for the creation of PDF Layers.
35
questions
1
vote
1
answer
48
views
Wrapping minted-Enviroment in a ocg-Enviroment
I cannot wrap my minted-Environment, which is wrapped in a tcolorbox into an ocg-Environment.
The wrapping of the minted-Environment into the tcolorbox is working fine.
Does anyone more competent than ...
5
votes
1
answer
82
views
Error with tagging-project, 'ocgx2' package and TOC
This mwe:
\DocumentMetadata{testphase=new-or-1}
\documentclass{book}
\usepackage{hyperref}
\usepackage[ocgcolorlinks]{ocgx2}
\begin{document}
\tableofcontents
\chapter{first chapter}
\end{document}
...
6
votes
2
answers
206
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 ...
0
votes
1
answer
178
views
Working slider in LaTeX with TikZ and ocgx2
Is there a way of creating an interactive slider by using TikZ and ocgx2 like this? Multiple instances of \actionsocg[onmouseall]{}{convenient code}{convenient code}{convenient space} are put side by ...
1
vote
0
answers
222
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 ...
4
votes
1
answer
183
views
Using ocgx2 instead of ocg-p: \AddToShipoutPictureBG not recognized
I want to use the ocgx2 package under luatex.
In the past, I used the ocg-p package but the ocg-p package does not work with luatex, see ocg-p: Optional Content Groups in LuaTeX.
My (apparently wrong) ...
1
vote
0
answers
119
views
Button to show and hyperref hidden page [closed]
As the title says I want to create a button which triggers hyperlink to a page but also shows a hidden layer.
I found many Ocgx2 soutions to hide/show layers from @alexG, but I couldn't find a ...
0
votes
0
answers
60
views
ocgx2, expl3: splitting comma separated OCMD/OCGs lists of arguments for references automation (bis)
Thanks to @AlexG and @Marcel Kruger, elaborating MCQs can be done with the different links below.
(1) ocgx2: verify and reset of Multiple Choice Questions with OCGs
(2) ocgx2, xparse, expl3: splitting ...
1
vote
0
answers
64
views
How to fix placement of layers in Apple Preview (works in Adobe Reader and others)
I am trying to create an interactive PDF where one can switch between a color and a grayscale image using the ocgx2 package. It works on Adobe (with interactive element), and displays fine in most ...
0
votes
0
answers
197
views
How to combine a JavaScript code and OCG/OCMG layers within LaTeX source/macro?
This question is a "work in progress" in order to find a solution to the following previous question:
(1) ocgx2: Multiple Choice Questions up to three automatic trials
As suggested by @AlexG ...
1
vote
1
answer
256
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}
\...
0
votes
0
answers
87
views
ocgx2 package: printed links have low resolution
I encountered a weird behavior when using the ocgx2 package. It allows one to have colored links (like urls, but also references to sections in the toc, basically everything clickable) in the pdf but ...
2
votes
0
answers
180
views
Stacking pdf layers: MWE breaks linux pdf viewers okular and evince
I would have commented on Stacking pdf layers
But lacking the reputation, I'll have to open a new thread.
However
\documentclass[12pt]{article}
\usepackage[samin, norsk, nynorsk, british]{babel}
\...
1
vote
1
answer
248
views
ocgx2: Multiple Choice Questions up to three automatic trials
This question is a following of the two clever and efficient answers linked below to elaborate semi-interactive quizzes/MCQ with ocgx2 (OCG/OCMG).
(1) ocgx2: verify and reset of Multiple Choice ...
1
vote
1
answer
73
views
List of todos breaks with ocgcolorlinks
When trying to use \listoftodos with colorinlistoftodos and ocgcolorlinks, text disappears from the list of todos. To be precise, the text is still there, I can copy it, but cannot see it – it becomes ...
1
vote
0
answers
100
views
Interactive point tooltip still active on pgfplot when status updated by ocg to invisible
My problem is as below. I have pdf report which i want to use it with ocg to display when needed. There are many plot which has clickable point option and plotted by pgfplot library. These plots are ...
1
vote
0
answers
199
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....
1
vote
1
answer
192
views
How stable is ocgx2 with hyperref
I want to achieve color links which are non-colored in print. The package ocgx2 will achieve this with
\documentclass{article}
\usepackage{hyperref}
\usepackage[ocgcolorlinks]{ocgx2}
\begin{document}...
2
votes
2
answers
151
views
ocg: problem using keyval
Trying to build expandable macros using ocg layers, I am facing quite disturbing issue that I am not able to figure out and so turn here for some help of specialists...
I am using a macro to insert ...
0
votes
0
answers
215
views
How to make one CheckBox (from hyperref) status dependent on other CheckBoxes'?
I want to have four CheckBoxes A, B, C and D:
B,C and D change their status on mouse click, in the usual way. And A is checked automatically only when all B, C and D are checked, A doesn't response ...
0
votes
1
answer
107
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 ...
4
votes
0
answers
112
views
Link colour fills page [closed]
This morning I updated my local MikTeX distribution with the pending package updates. I now get a completely blue page if the page contains a link, but only when compiled with XeLaTeX. Removing ocgx2 ...
0
votes
0
answers
191
views
Can I use pdftooltip from pdfcomment for a tikz ocgx2 switch
I am using ocgx2 to toggle the visibility of elements in a complex tikz graph.
Additionally, I want to explain what happens when someone clicks on a switch in a pdf tooltip.
However, I am struggling ...
5
votes
1
answer
559
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 ...
6
votes
1
answer
2k
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
2
answers
381
views
ocgx2, xparse, expl3: splitting comma separated OCMD/OCGs lists of arguments for references automation
On an applicative level, this question follows a previous one about quizzes (MCQs) with OCGs. But it seems (I suspect) that the issue might come from expansion concept and/or LaTeX3 syntax on how to ...
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 ...
3
votes
1
answer
125
views
How to add a particular object to an `ocg` list
This is an addendum of a previous question: How to put a box and use columns to separate arrows.
Please consider this MWE (adapted from a nice answer of that question):
\documentclass{article}
\...
4
votes
1
answer
559
views
Creating a lot of checkbox'es to make visible/invisible arrows using `tikzpicture` environment
I have this MWE, taken from marmot's nice answer:
\documentclass{article}
\usepackage[margin=0in,footskip=0in,paperwidth=60cm,paperheight=29cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{...
3
votes
2
answers
300
views
Is there a bug with the `switch ocg with mark on` key of the ocgx and ocgx2 packages?
Indeed, with this key, visibility does not work properly.
I quote the manual:
/tikz/switch ocg with mark on={<ocg reference»}{<OCGs list> } These
styles transform the current path or ...
2
votes
1
answer
139
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 ...
1
vote
2
answers
248
views
Problem with using glossaries-extra with ocgcolorlinks option of the ocgx2 package and scalebox-based glsabbrvsmfont/glsnamefont commands
The following example causes problem:
\documentclass{article}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage[ocgcolorlinks]{ocgx2}
\usepackage[record,acronym,shortcuts=ac]{glossaries-...
4
votes
2
answers
555
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 ...
5
votes
1
answer
667
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 ...
4
votes
1
answer
355
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 ...