3

I hope you can help me...

I would like to realize a project to typeset a book with LaTeX which satisfies the following properties.

Think of the opened book: On the left side of the two pages I would write regular text (maybe with line numbers) and on the right side there should be remarks and comments related to the text on the left side referenced to the line numbers.

Has anyone some experience with this kind of typesetting?

8
  • 1
    Welcome to TeX SX! What's the left right side in a book?
    – Bernard
    Commented Aug 31, 2021 at 8:30
  • Thank you! Excuse me, there was a mistake...i meant "right side" and corrected it
    – RobRTex
    Commented Aug 31, 2021 at 8:34
  • You could enlarge the outer margin, and use margin notes.
    – Bernard
    Commented Aug 31, 2021 at 8:44
  • B.t.w., I wondered whether you meant the light or the reft side… ;o)
    – Bernard
    Commented Aug 31, 2021 at 8:48
  • Thank you for your idea, but when I use margin notes I would have the comments and the regular text on one side. The regular text and the comments should be on two sides: Page 1 Text Page 2 comments to Page 1 Page 3 Text Page 4 comments to Page 3 ...
    – RobRTex
    Commented Aug 31, 2021 at 8:59

3 Answers 3

2

This is based on Print odd and even pages

The content will always start on odd pages, with or without comments. No need to use \newpage or \clearpage to go to next odd page.

In the same way, the comments will go on even pages.

You have to fill page by page, alternating content and comments to keep them in sync.

b

\documentclass[12pt]{book}  

% From https://tex.stackexchange.com/a/455318/161015    
\newinsert\instructornoteinsert
\skip\instructornoteinsert=0pt
\AtBeginDocument{\dimen\instructornoteinsert=\vsize}
\count\instructornoteinsert=0

\showboxdepth=\maxdimen
\showboxbreadth=\maxdimen

\makeatletter
    \output\expandafter{\the\output
    \ifodd\value{page}\else
    \setbox\@outputbox\vbox to\vsize{\unvbox\instructornoteinsert\vfil}%
    \@outputpage
    \fi
    }
    \newcommand{\comments}[1]{%
    \insert\instructornoteinsert{%
    \normalfont
    \interlinepenalty0
    \splittopskip0pt
    \splitmaxdepth\dp\strutbox
    \floatingpenalty0
    \hsize\columnwidth
    \@parboxrestore
    #1%
    \@finalstrut\strutbox
    }%
    }
\makeatother

\usepackage{kantlipsum}

\begin{document}
    \textbf{Here is content 1, 2 and 3.}\bigskip
    
    1. \kant[1]
    
    2. \kant[2]
    
    3. \kant[3]
    
    
    \comments{\textbf{Long comment with line breaks to 1, 2 and 3.}\bigskip
    
    11. \kant[11] 
    
    12. \kant[12] 
    }
    
    \textbf{Here is more content: 4 and 5.}\bigskip
    
    4. \kant[4]
    
    5. \kant[5]
    
    \comments{\textbf{More long comment with line breaks to 4 and 5.}\bigskip
    
    13. \kant[13] 
    
    14. \kant[14] 
    }

\end{document}
2
  • Thank you very much, that's a great idea!
    – RobRTex
    Commented Aug 31, 2021 at 17:57
  • Hello! Thank you Simon Dispa. I realized my project with this code! Thank you so much, it worked perfectly. At the end of the document I would restore the normal precedure (the text should be written on all pages). Do you have an idea, how to restore that?
    – RobRTex
    Commented Nov 9, 2021 at 14:39
1

Try the \reledpar` package. This was originally designed for critical or bi-lingual documents where on even pages would be the text in the first language and on the adjacent odd pages the (same) text would be in the second language.

By suitable planning you could have your main text on the even pages and corresponding notes and comments on the adjacent facing pages.

Read the first 25 pages of the user manual to see what facilities it offers.

1
  • Thank you very much!
    – RobRTex
    Commented Aug 31, 2021 at 17:56
1

One solution with lineno:

mwe

\documentclass[twoside]{article}
\usepackage{lipsum,parskip}
\usepackage{lineno}
\def\markref#1{\par\makebox[2em][r]{\lineref{#1})\quad}\hangindent2em}
\begin{document}

 (Odd page with nothing of interest)

\newpage % right even page for contents  

\linenumbers
\linelabel{foo}\lipsum[1]\par
\linelabel{bah}\lipsum[2][1-3]
\linelabel{baz}\lipsum[2][4-9]
\par\nolinenumbers

\newpage % Left odd page for comments 

\markref{foo}  This is a comment for {\em Lore ipsum}.  \lipsum[3][1-4]
\markref{bah} This is a remark about {\em Nam dui ligula}. lipsum[4][1-4]
\markref{baz}  This is a comment for {\em Donet aliquet}. \lipsum[5][1-4]
\end{document}
1
  • Thank you, I will have a try!
    – RobRTex
    Commented Aug 31, 2021 at 17:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .