1

In the manual of standalone, it is written, that the margins are removed, so that the page ist croped to the content. In addition, we can use multiple pages thanks to "multi=my", which is what i was looking for. Unfortunately, the line in \usepackage{lineno} are not counted, because the margins are removed. But i need both:

  1. being able to makge multiple pages which crops the page to the content
  2. using the package lineno
\documentclass[multi=my,preview,9.5pt]{standalone} 
\usepackage[ngerman]{babel} 
\usepackage[paperwidth=210 mm,left=0mm,right=0mm,top=0mm,bottom=0mm]{geometry} 

\usepackage{lineno} 
\usepackage{scrextend} %addmargin

\begin{document}
\begin{my}
blabla

text text
\end{my} 
 
\begin{my}
\begin{linenumbers}
\modulolinenumbers[1]
  
\resetlinenumber
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text 
  
\end{linenumbers}
\end{my} 

\begin{my}
\begin{addmargin}[20mm]{20mm}
\begin{linenumbers}
\modulolinenumbers[1]
      
\resetlinenumber
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text 
      
\end{linenumbers}
\end{addmargin}
\end{my}  
\end{document}

Even if i add \begin{addmargin}[20mm]{20mm}...\end{addmargin} i dont get the numbers. Is there a workaround?

enter image description here

5
  • A large border? Instead of geometry, try using minipages if you want text wrapping with different widths. Commented May 23, 2023 at 19:32
  • not with different widths, i need variable heights, which are dependent of the content of the page. Commented May 23, 2023 at 19:36
  • While you can specify the height of a minipage, most of the time it is only as high as needed. See tex.stackexchange.com/questions/244348/… Commented May 23, 2023 at 19:39
  • @JohnKormylo i tried with minipage, it crops to the content, but still doesnt count the line numbers. As soon as I use standalone, lineno package seems to not work. Commented May 24, 2023 at 8:54
  • Did you look at the borders (outside the printed area)? See tex.stackexchange.com/questions/53220/… Or do minipages normally not produce line numbers? Commented May 24, 2023 at 12:11

0

You must log in to answer this question.

Browse other questions tagged .