1

I'm having some trouble with a special referencing I'm trying to produce, due to its specificity.

So, first, I'm trying to compile two paragraphes (the first one with line numbering on its side), just as below:

\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}

It does work, and produces: enter image description here Now, here is my problem. If you notice, just below my random text there is a manual line reference I've introduced ("...line 4-5..." and "...line 6..."), which of course will cause me problems if I change the text format. For example, if I change the document's size, or if I change the class, etc, that manual reference won't be at line 4-5 or 6 anymore. So, any ideas of how should I proceed? Thanks for the attention.

3
  • 2
    I think this post may help you: tex.stackexchange.com/a/357718/101651 Commented Mar 28, 2017 at 17:52
  • @CarLaTeX Oops, I was looking through the lineno manual without reading question comments. Shall I delete and have you post the answer? Commented Mar 28, 2017 at 18:09
  • @StevenB.Segletes Don't worry, no problem, your answer was simultaneous to my comment! Commented Mar 28, 2017 at 20:14

1 Answer 1

2

You are looking for the command \linelabel{} that can be \refed.

\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}

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.