Pdfcomment 停止工作;图​​标仍然出现在 pdf 中,文本不显示

Pdfcomment 停止工作;图​​标仍然出现在 pdf 中,文本不显示

更新: 这似乎与我的 mac/mac 设置上的 pdfreaders 有关。当我在 Windows pc 上的阅读器上阅读相同的文件时,内容确实会显示出来

我使用 latex 中的“pdfcomment”包来生成带注释的 pdf 文档。突然它停止工作了:图标仍然出现在 pdf 中,但注释的文本没有显示出来。

  • 编译工具:Latex、LaTeX2e、pdfTeX (TexLive);也可使用 XeLatex
  • 在 texshop 和 texstudio 中尝试过
  • 在 Mac 的预览和 Skim 中查看 PDF

例子:

\documentclass[11pt,american,english]{article}

\usepackage{lmodern}
\usepackage[latin9]{inputenc}
\usepackage{pdfcomment}
\makeatletter
\makeatother

\begin{document}

This will  presumably lead to the maximum number of marriages given the information structure, and, in our model, the highest material welfare. However, people will also sometimes learn they were rejected, and feel a sting. \pdfcomment[icon=note]{testing a pdf comment} Introducing the CAE would give people a way to  avoid this sting, by rejecting and remaining ignorant (perhaps particularly when they anticipate likely being rejected).

\end{document}

日志档案:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./testpdf.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 22 language(s) loaded.
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/base/size11.clo))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/lm/lmodern.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/base/inputenc.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/base/latin9.def))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/pdfcomment/pdfcomment.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/datetime2/datetime2.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/tracklang/tracklang.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/tracklang/tracklang.tex))

Package datetime2 Warning: Date-Time Language Module `english' not installed on
 input line 1882.


Package datetime2 Warning: Date-Time Language Module `american' not installed o
n input line 1882.

) (/usr/local/texlive/2018basic/texmf-dist/tex/latex/oberdiek/zref-savepos.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/oberdiek/zref-base.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty)
 (/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/oberdiek/auxhook.sty)))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/oberdiek/refcount.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/tools/calc.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/marginnote/marginnote.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/soulpos/soulpos.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.s
ty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/hobsub-generic.st
y)) (/usr/local/texlive/2018basic/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/url/url.sty))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)
)) (./testpdf.aux)
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/lm/ot1lmr.fd)
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/soulutf8.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/soul/soul.sty))
(/usr/local/texlive/2018basic/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/gettitlestring.st
y)) (./testpdf.out) (./testpdf.out)
(/usr/local/texlive/2018basic/texmf-dist/tex/generic/oberdiek/se-pdfdoc.def)
[1{/usr/local/texlive/2018basic/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./testpdf.aux * soulpos - computing points - it may take a few seconds *
(./testpdf.upa)) ){/usr/local/texlive/2018basic/texmf-dist/fonts/enc/dvips/lm/l
m-rm.enc}</usr/local/texlive/2018basic/texmf-dist/fonts/type1/public/lm/lmr10.p
fb>
Output written on testpdf.pdf (1 page, 29878 bytes).
SyncTeX written on testpdf.synctex.gz.
Transcript written on testpdf.log.

答案1

如果我将您的语言要求移至 babel,则可以看到评论

    %\documentclass[11pt,american,english]{article}

\documentclass[11pt]{article}
\usepackage[english,USenglish]{babel}

\usepackage{lmodern}
\usepackage[latin9]{inputenc}
\usepackage{pdfcomment}
\makeatletter
\makeatother

\begin{document}

This will  presumably lead to the maximum number of marriages given the information structure, and, in our model, the highest material welfare. However, people will also sometimes learn they were rejected, and feel a sting. \pdfcomment[icon=note]{testing a pdf comment} Introducing the CAE would give people a way to  avoid this sting, by rejecting and remaining ignorant (perhaps particularly when they anticipate likely being rejected).

\end{document}

然而我建议你考虑一下你的评论放在哪里因为这是我的结果

在此处输入图片描述

相关内容