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

  • A large border? Instead of geometry, try using minipages if you want text wrapping with different widths. – John Kormylo May 23 '23 at 19:32
  • not with different widths, i need variable heights, which are dependent of the content of the page. – Bilal Yilmaz May 23 '23 at 19:36
  • While you can specify the height of a minipage, most of the time it is only as high as needed. See https://tex.stackexchange.com/questions/244348/make-only-one-page-for-each-chapter/244437?r=SearchResults&s=1%7C31.1388#244437 – John Kormylo May 23 '23 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. – Bilal Yilmaz May 24 '23 at 08:54
  • Did you look at the borders (outside the printed area)? See https://tex.stackexchange.com/questions/53220/standalone-producing-cropped-truncated-formulae Or do minipages normally not produce line numbers? – John Kormylo May 24 '23 at 12:11

0 Answers0