堆叠 PDF 层:MWE 破坏 Linux PDF 查看器 okular 和 evince

堆叠 PDF 层:MWE 破坏 Linux PDF 查看器 okular 和 evince

我会评论堆叠 PDF 图层 但由于缺乏声誉,我不得不开启一个新主题。

然而

\documentclass[12pt]{article}

\usepackage[samin, norsk, nynorsk, british]{babel}
\usepackage[utf8]{inputenc} % usually not needed (loaded by default)
\usepackage[T1]{fontenc}

\usepackage[tikz]{ocgx2}

\newcommand{\UNItitlebox}[2]{% #1: logo, #2: language
  \frame{%
    \begin{minipage}{\textwidth}\centering
      \vspace{1pt}
      \hrule height 1pt
      \vspace{1.2em}
      \includegraphics[height=1.69cm,width=12.8cm]{#1}\\[5pt]
      \makebox[12.8cm]{MAT-1001\quad Calculus\hfill #2}\\[5pt]
      \makebox[12.8cm]{Exam\hfill 23/09/2019}\\[5pt]
      \vspace{1em}
      \hrule height 1pt
      \vspace{1pt}
    \end{minipage}%
  }
}

% Hyperlenker og klikkbare lenker.
\usepackage{hyperref}

\begin{document}

\section{Introduction}

{%
  \noindent\hypersetup{pdfborder=0 0 0}% locally suppress link borders
  \begin{ocmd}{\AllOff{ocg1}}\makebox[0pt][l]{English}\end{ocmd}% black, "on" if ocg1 is "off"
  \showocg{ocg1}{%
    \begin{ocmd}{\AllOn{ocg1}} % green if ocg1 "on"
      \color{green!50!black}English
    \end{ocmd}}\hfill
  %  
  \begin{ocmd}{\AllOff{ocg2}}\makebox[0pt][l]{Bokmål}\end{ocmd}% black, "on" if ocg2 is "off"
  \showocg{ocg2}{%
    \begin{ocmd}{\AllOn{ocg2}} % green if ocg2 "on"
      \color{green!50!black}Bokmål
    \end{ocmd}}\hfill
  %  
  \begin{ocmd}{\AllOff{ocg3}}\makebox[0pt][l]{Nynorsk}\end{ocmd}% black, "on" if ocg3 is "off"
  \showocg{ocg3}{%
    \begin{ocmd}{\AllOn{ocg3}} % green if ocg3 "on"
      \color{green!50!black}Nynorsk
    \end{ocmd}}\hfill
  %  
  \begin{ocmd}{\AllOff{ocg4}}\makebox[0pt][l]{Samisk}\end{ocmd}% black, "on" if ocg4 is "off"
  \showocg{ocg4}{%
    \begin{ocmd}{\AllOn{ocg4}} % green if ocg4 "on"
      \color{green!50!black}Samisk
    \end{ocmd}}%
}  

\bigskip

\begin{center}
%
\begin{ocg}[radiobtngrp=languages]{OCG 1}{ocg1}{on}
  \makebox[0pt][l]{\UNItitlebox{example-image-a}{English}}
\end{ocg}%
%
\begin{ocg}[radiobtngrp=languages]{OCG 2}{ocg2}{off}
  \makebox[0pt][l]{\UNItitlebox{example-image-b}{Bokmål}}
\end{ocg}%
%
\begin{ocg}[radiobtngrp=languages]{OCG 3}{ocg3}{off}
  \makebox[0pt][l]{\UNItitlebox{example-image-c}{Nynorsk}}
\end{ocg}%
\begin{ocg}[radiobtngrp=languages]{OCG 4}{ocg4}{off}
  \UNItitlebox{example-image}{Samisk}
\end{ocg}
\end{center}

\end{document}

这就是所述线程中提供的 MWE。 pdflatex执行两次会创建一个 pdf,单击任何链接时,okular 和 evince 都会崩溃。有人可以重现这种情况吗?或者这是本地的事情?

编辑:evince 说明了一些事情

(evince:153726): Poppler-CRITICAL **: 21:40:03.966: gint poppler_layer_get_radio_button_group_id(PopplerLayer*): assertion 'POPPLER_IS_LAYER(poppler_layer)' failed

(evince:153726): Poppler-CRITICAL **: 21:40:03.966: gboolean poppler_layer_is_parent(PopplerLayer*): assertion 'POPPLER_IS_LAYER(poppler_layer)' failed

(evince:153726): GLib-GObject-CRITICAL **: 21:40:03.966: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(evince:153726): Poppler-CRITICAL **: 21:40:03.966: gint poppler_layer_get_radio_button_group_id(PopplerLayer*): assertion 'POPPLER_IS_LAYER(poppler_layer)' failed

(evince:153726): Poppler-CRITICAL **: 21:40:03.966: gboolean poppler_layer_is_parent(PopplerLayer*): assertion 'POPPLER_IS_LAYER(poppler_layer)' failed

(evince:153726): GLib-GObject-CRITICAL **: 21:40:03.966: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(evince:153726): GLib-GObject-CRITICAL **: 21:40:03.966: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(evince:153726): GLib-GObject-CRITICAL **: 21:40:03.966: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(evince:153726): Poppler-CRITICAL **: 21:40:05.680: void poppler_layer_show(PopplerLayer*): assertion 'POPPLER_IS_LAYER(poppler_layer)' failed

(evince:153726): Poppler-CRITICAL **: 21:40:11.487: void poppler_layer_show(PopplerLayer*): assertion 'POPPLER_IS_LAYER(poppler_layer)' failed

相关内容