问题就在标题本身。我想在我的 pdf 中添加一些分层结构,这些结构只能在 Adobe Acrobat(和部分 Foxit)中正确显示。是否可以仅在用户在 Adobe Acrobat(或可能是 Foxit 阅读器)中打开时显示分层结构,否则(在浏览器、SumatraPDF 等中打开时)将其替换为其他文本?
编辑:以下是我想要显示如果 pdf 在 Adobe Acrobat 中打开的示例:
\documentclass{article}
\usepackage{ocgx2}
\begin{document}
\begin{center}
\switchocg{Eg1}{Example1}\qquad\switchocg{Eg2}{Example2}\qquad\switchocg{Eg3}{Example3}
\end{center}
\begin{center}
\begin{ocg}[radiobtngrp=eg]{Eg1}{Eg1}{0}
First example
\begin{itemize}
\item Explanation 11
\item Explanation 21
\item Explanation 31
\end{itemize}
\end{ocg}
\begin{ocg}[radiobtngrp=eg]{Eg2}{Eg2}{0}
Second example
\begin{itemize}
\item Explanation 12
\item Explanation 22
\item Explanation 32
\end{itemize}
\end{ocg}
\begin{ocg}[radiobtngrp=eg]{Eg3}{Eg3}{0}
Third example
\begin{itemize}
\item Explanation 13
\item Explanation 23
\item Explanation 33
\end{itemize}
\end{ocg}
\end{center}
%%Content if it's not opened in adobe acrobat.
%The first second and third examples are as follows:
%\begin{itemize}
% \item Explanation 11
% \item Explanation 12
% \item Explanation 13
% \item Explanation 21
% \item Explanation 22
% \item Explanation 23
% \item Explanation 31
% \item Explanation 32
% \item Explanation 33
%\end{itemize}
\end{document}