梅威瑟:
\documentclass[12pt]{book}
\usepackage{lineno}
\begin{document}
\chapter{Hidden Line Number}\label{cha:hln}
\linenumbers
%\begin{nolinenumbers}
One
Two\linelabel{two}\label{two}
Three
The sentence about \textbf{two}, page-\pageref{two}, chapter-\ref{cha:hln}, line number-\lineref{two}
%\end{nolinenumbers}
\end{document}
我想做什么,隐藏行号。如果可能的话?
答案1
\documentclass[12pt]{book}
\usepackage{lineno}
\begin{document}
\chapter{Hidden Line Number}\label{cha:hln}
\linenumbers
%\begin{nolinenumbers}
\let\makeLineNumber\relax
One
Two\linelabel{twol}\label{two}
Three
The sentence about \textbf{two}, page-\pageref{two}, chapter-\ref{cha:hln}, line number-\lineref{twol}
%\end{nolinenumbers}
\end{document}