
??
정의되지 않은 참조 대신 LaTeX가 조판되는 형식을 자동으로 변경하도록 하는 방법이 있습니까 ? 예를 들어 LaTeX에서 뒤에 노란색 "강조 표시" 배경을 그리 ??
거나 ??
빨간색 텍스트로 렌더링할 수 있습니까?
PDF 출력을 훑어볼 때 이러한 정의되지 않은 참조를 더 쉽게 찾아낼 수 있었으면 좋겠습니다.
MWE는 다음과 같습니다.
\documentclass{article}
\begin{document}
\ref{undefinedReference}
\end{document}
정의되지 않은 서지 인용과 정의되지 않은 상호 참조에 대해 이것이 작동하도록 만들 수 있다면 특히 좋을 것입니다.
답변1
나는 당신이 이것을 놓치지 않을 것이라고 생각합니다 :
\documentclass{article}
\usepackage{color}
\makeatletter
\def\@setref#1#2#3{%
\ifx#1\relax
\protect\G@refundefinedtrue
\nfss@text{\reset@font\bfseries\huge\textcolor{red}{DEFINE #3 NOW, AND MAKE IT QUICK!}}%
\@latex@warning{Reference `#3' on page \thepage \space
undefined}%
\else
\expandafter#2#1\null
\fi}
\makeatother
\begin{document}
\ref{undefinedReference}
\end{document}
답변2
David의 답변을 바탕으로 PDF 주석을 '노란색 "강조 표시" 배경'으로 사용하는 솔루션은 다음과 같습니다.
\documentclass{article}
\usepackage[rgb]{xcolor}
\usepackage{pdfcomment}
\makeatletter
\def\@setref#1#2#3{%
\ifx#1\relax
\protect\G@refundefinedtrue
\nfss@text{\reset@font\bfseries\pdfmarkupcomment[color=yellow,author={RefCheck Assistant}]{??}{DEFINE #3 NOW, AND MAKE IT QUICK!}}%
\@latex@warning{Reference `#3' on page \thepage \space
undefined}%
\else
\expandafter#2#1\null
\fi}
\makeatother
\begin{document}
see \ref{undefinedReference}
\end{document}
클릭하거나 마우스를 올리지 않고도 툴팁을 얻을 수 있습니다.