在标签 PDF 修饰阅读顺序中,当表格中存在超链接时,Acrobat DC 不会显示阅读顺序

在标签 PDF 修饰阅读顺序中,当表格中存在超链接时,Acrobat DC 不会显示阅读顺序

我正在尝试创建带标签的 pdftagpdf.styLuaLaTeX

当表中存在超链接但 pdf 中的标记面板中存在标记时,Acrobat DC 中不显示修饰阅读顺序(同时修饰阅读顺序显示在 Adob​​e Acrobat Professional 中)

还存在多个不需要的Path标签。

在此处输入图片描述

梅威瑟:

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}

\documentclass{book}

\usepackage{tagpdf}
\tagpdfsetup{tabsorder=structure,%
    uncompress,%
    activate-all,%
    interwordspace=true,%
    }


    \usepackage{hyperxmp,array}

    \usepackage[hyperfootnotes=true,unicode,pdfborderstyle={/S/U/W 0},breaklinks,bookmarksnumbered,bookmarksopen=true,colorlinks,%
    linkcolor=blue,citecolor=blue,urlcolor=blue,%
    linktoc=none, pdfview={XYZ null null 1.00}]{hyperref}

    \usepackage{amsmath}


    \begin{document}

    \tagstructbegin{tag=Document}

    \pagestyle{empty}

    \tagstructbegin{tag=P}\tagmcbegin{tag=P}In total, 37.7{\%} of
    respondents (49.4{\%}
    \begin{table}[!h]
    \caption{Logistic Regression Models Showing\protect\hyperlink{tabfootusac153:T0001-fn1}{\textsuperscript{a}}\label{T0001}}
    {\tagstructbegin{tag=Table}
    \begin{tabular*}{\linewidth}{@{\extracolsep\fill{\hskip10pt}}p{80pt}p{60pt}p{60pt}@{{\hskip10pt}\extracolsep\fill}}
    \hline
    \tagstructbegin{tag=TBody}%
    \tagstructbegin{tag=TR}%
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}%
    Sleep per day (ref: 6\,hours or more)
    \tagmcend\tagstructend
     & &  
    \tagstructend\\
    \tagstructbegin{tag=TR}%
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}{\hskip5pt}5\,hours\tagmcend\tagstructend & 
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}1.88 (1.20-2.97)\protect\hyperlink{tabfootusac153:T0001-fn2}{\textsuperscript{**}}\tagmcend\tagstructend & 
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}0.49 (0.20-1.12)\tagmcend\tagstructend
    \tagstructend
    \\
    \hline\end{tabular*}}
    {\tagstructend\tagstructend
    \tagstructbegin{tag=Note}%
    \tagmcbegin{tag=Note}\protect\hypertarget{tabfootusac153:T0001-fn1}{}$^{\text{a}}$Data in each column are reported from one model that adjusted for all variables in this table.\\
    Abbreviation: AOR\,\ensuremath{=}\,adjusted odds ratio.\\
    \protect\hypertarget{tabfootusac153:T0001-fn2}{}**\textit{P}\,{\textless}\,.01.\\
    \protect\hypertarget{tabfootusac153:T0001-fn3}{}*\textit{P}\,{\textless}\,.05.\tagmcend\tagstructend
    }
    \end{table}

    \tagmcend\tagstructend



    \tagstructend


     \end{document} 

答案1

以下对我有用。它需要latex-devtexlive 2022 中的当前版本。标记标题时应小心:取决于它的长度是否在 \hbox 中,因此可以改变行为。

\DocumentMetadata{testphase=phase-II}

\documentclass{book}

\tagpdfsetup{tabsorder=structure}

\usepackage{amsmath}

\usepackage{hyperxmp,array}

\usepackage[pdfborderstyle={/S/U/W 0},bookmarksnumbered,bookmarksopen=true,colorlinks,%
    linkcolor=blue,citecolor=blue,urlcolor=blue,%
    linktoc=none, pdfview={XYZ null null 1.00}]{hyperref}

    \begin{document}

    \pagestyle{empty}

    In total, 37.7{\%} of
    respondents (49.4{\%}
    
    \begin{table}[!h]
    
    \tagstructbegin{tag=Caption}
    \tagmcbegin{tag=Caption}
    \caption{Logistic Regression Models Showing\protect\hyperlink{tabfootusac153:T0001-fn1}{\textsuperscript{a}}\label{T0001}}
    \tagmcend
    \tagstructend
    
    \tagpdfparaOff %no paragraph tagging in the tabular
    \tagstructbegin{tag=Table}
    \begin{tabular*}{\linewidth}{@{\extracolsep\fill{\hskip10pt}}p{80pt}p{60pt}p{60pt}@{{\hskip10pt}\extracolsep\fill}}
    \hline
    \tagstructbegin{tag=TBody}%
    \tagstructbegin{tag=TR}%
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}%
    Sleep per day (ref: 6\,hours or more)
    \tagmcend\tagstructend
     & &
    \tagstructend\\
    \tagstructbegin{tag=TR}%
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}{\hskip5pt}5\,hours\tagmcend\tagstructend &
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}1.88 (1.20-2.97)\protect\hyperlink{tabfootusac153:T0001-fn2}{\textsuperscript{**}}\tagmcend\tagstructend &
    \tagstructbegin{tag=TD}\tagmcbegin{tag=TD}0.49 (0.20-1.12)\tagmcend\tagstructend
    \tagstructend
    \\
    \hline\end{tabular*}
    \tagstructend
    \tagstructend
    \par
    
    \tagstructbegin{tag=Note}%
    \tagmcbegin{tag=Note}\protect\hypertarget{tabfootusac153:T0001-fn1}{}$^{\text{a}}$Data in each column are reported from one model that adjusted for all variables in this table.\\
    Abbreviation: AOR\,\ensuremath{=}\,adjusted odds ratio.\\
    \protect\hypertarget{tabfootusac153:T0001-fn2}{}**\textit{P}\,{\textless}\,.01.\\
    \protect\hypertarget{tabfootusac153:T0001-fn3}{}*\textit{P}\,{\textless}\,.05.%
    \tagmcend
    \tagstructend    
        
    \end{table}

\end{document}

在此处输入图片描述

相关内容