0

I have a question and I hope you have any ideas to help me. I realized a book where the book text is written on the left side (odd pages) and the comments (related to the text) are put on the right side (even pages). To realize this project, I asked here on StackExchange an I got an answer to use this code:

% 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

Here is the Link to my question.

At the end of the book I would like to write an appendix, but there I do not need this kind of formatting. Do you have any idea, how to restore the output, so that I have "a normal" style and the text is put on all the following pages? Thank you so much for your help.

4
  • It depends on which solution you use. I would have used paracol, so \end{paracol} would revert to normal pages. Commented Jan 28, 2022 at 17:45
  • Thank you for your answer. I used the solution showed above in my question.
    – RobRTex
    Commented Jan 30, 2022 at 9:21
  • 1
    Try \let\normaloutput=\output before you mess with it, and \let\output=\normaloutput to revert. Commented Jan 30, 2022 at 16:37
  • Thank you very much for your help. I put the first line where the two-sided-layout started and the second code-line at the end. Unfortunately it didn't worked...
    – RobRTex
    Commented Jan 31, 2022 at 10:53

2 Answers 2

1

This shows how to implement it using paracol. There is a way to add formatting changes automatically while switching columns, but I forget how. It's in the manual somewhere.

Interestingly, I could not get \chapter to work inside paracol. See this question

\documentclass{book}
\usepackage{paracol}
\usepackage{lineno}
\usepackage{lipsum}% MWE only

\globalcounter*
\nolinenumbers
\begin{document}
Title page (odd page)
\clearpage

\begin{paracol}[1]{2}
\linenumbers
\section*{Even page}
\lipsum[1]

\switchcolumn
\nolinenumbers
\section*{Odd page}
\lipsum[2]

\newpage
\switchcolumn*
\linenumbers
\section*{Another Even Page}
\lipsum[3]

\switchcolumn
\nolinenumbers
\section*{Another Odd Page}
\lipsum[4]

\end{paracol}
\nolinenumbers
\chapter{Normal Text}
\lipsum[1-8]

\end{document}
1
  • Thank you for that idea. I had a similar idea, before I started the project but this won't work for my project (because the text on the odd pages is a coherent text). That's why I use the solution showed above.
    – RobRTex
    Commented Feb 1, 2022 at 16:08
0

I found a solution based on John Kormylos comment: Before I started the even-odd-style I used the suggested code-line: \let\normaloutput=\output and to restore it, I used the line \output\the\normaloutput.

You must log in to answer this question.

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