改编“lineno”包

改编“lineno”包

由于其特殊性,我在尝试生成特殊引用时遇到了一些麻烦。

因此,首先,我尝试编写两个段落(第一个段落侧面带有行号),如下所示:

\documentclass{article}
\usepackage[modulo]{lineno}
\begin{document}

\begin{linenumbers}
``Hello, here is some text without a meaning. This text should show, how a printed text will look like at this place. If you read this text, you will get no information. Really? Is there no information? Is there a difference between this text and some nonsense like Huardest gefburn? Kjift - Never mind! A blind text like this gives you information about the selected font, how the letters are written and the impression of the look. This text should contain all letters of the alphabet and it should be written in of the original language. There is no need for a special contents, but the length of words should match to the language. Hello, here is some text without a meaning. This text should show, how a printed text will look like at this place. If you read this text, you will get no information. Really? Is there no information? Is there a difference between this text and some nonsense like Huardest gefburn? Kjift - Never mind! A blind text like this gives you information about the selected font, how the letters are written and the impression of the look. This text should contain all letters of the alphabet and it should be written in of the original language. There is no need for a special contents, but the length of words should match to the language.''
\end{linenumbers}

As we see in line 4-5 blind texts like this also gives us informations about the selected font. 
Also, line 6 tells us about how these texts allow us to have an impression of its look. 
\end{document}

它确实起作用,并且产生: 在此处输入图片描述 现在,我的问题来了。如果你注意到,在我的随机文本下方有一个手动线路参考我引入了(“...第 4-5 行...”和“...第 6 行...”),如果我更改文本格式,这当然会给我带来问题。例如,如果我更改文档的大小,或者更改类等,该手册引用将不再位于第 4-5 行或第 6 行。那么,有什么想法我应该怎么做吗?感谢您的关注。

答案1

\linelabel{}您正在寻找可以编辑的命令\ref

\documentclass{article}
\usepackage[modulo]{lineno}
\begin{document}

\begin{linenumbers}
``Hello, here is some text without a meaning. This text should show, how a
 printed text will look like at this place. If you read this text, you will 
 get no information. Really? Is there no information? Is there a difference 
 between this text and some nonsense like Huardest gefburn? 
 Kjift\linelabel{ln:K} - Never mind! A blind text like this gives you 
 information about the selected font, how the letters are written and the 
 impression of the look. This text should contain all letters of the alphabet 
 and it should be written in of the original language. There is no need for
  a special contents, but the length of words should match to the language. 
  Hello, here is some text without a meaning. This text should show, how a 
  printed text will look like at this place. If you read this text, you 
  will get no information. Really? Is there no information? Is there a 
  difference between this text and some nonsense like Huardest gefburn? 
  Kjift - Never mind!\linelabel{ln:N} A blind text like this gives you 
  information about the selected font, how the letters are written and 
  the impression of the look. This text should contain all letters of 
  the alphabet and it should be written in of the original language. 
  There is no need for a special contents, but the length of words should 
  match to the language.''
\end{linenumbers}

As we see in line \ref{ln:K}-\ref{ln:N} blind texts like this also gives us informations about the selected font. 
Also, line 6 tells us about how these texts aloow us to have an impression of its look. 
\end{document}

在此处输入图片描述

相关内容