after years of reading TeX.SX, I registered to ask my first question :-)).
I’m a teacher, and I want to leave an almost blank page after each page of a document, for my students to take notes. I’ve read related questions such as : Add blank/empty page after every page automatically or inserting an image after every page, but I have two particular needs :
- the « blank » page that I want is not really blank, as I want a vertical line in the middle (I’m in landscape format) ;
- I don’t want such a « blank » page after the very first page of the document, as it is only the title and table of contents.
Until now, I used to compile without those pages, and afterwards to use a pdf utility (such as pdfsam) to insert my « blank » pages, but it took me a few minutes each time, making it uneasy to correct later a few things. I’d like to be able to insert the pages automatically during the compiling process, only I haven’t been able to do it so far — I’m a little confused with the atbegshi package, I think I don’t really understand some of the commands, what do I have the right to do or not.
After a few hours of struggling (and reading TeX.SX…), below is what I’ve been able to do — but all my attempts for centering the line, horizontally and vertically, have failed… I suppose it isn’t that hard, but I don’t know how to do it. (Also, I haven’t been able to use xsavebox as recommanded in How to make a tikz picture appear on every page of document — I get an error when I try to compile the example…)
If anyone have a suggestion… that would be great!
Benjamin
p.-s. : I use the paracol package, I don’t know if it’s disturbing atbegshi or not.
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt,a4paper,oneside,landscape,xetex]{book}
\usepackage{fontspec,xunicode,xltxtra}
\usepackage{paracol}
\usepackage{titletoc}
\usepackage{geometry}
\geometry{a4paper,landscape,%
vmarginratio=1:2, hmarginratio=1:1, %
body={630pt,450pt},%
foot=4\baselineskip,%
%nofoot,
headheight=22pt%
}
\setlength\columnsep {70 pt}
\usepackage{atbegshi}
\usepackage{tikz}
\usepackage{kantlipsum}
\begin{document}
\chapter{Logique, ensemble, raisonnements}
\bigskip
\startcontents
\printcontents{}{1}{}
\thispagestyle{empty}
\newpage
\AtBeginShipout{%
\begingroup
\let\protect\noexpand
\AtBeginShipoutOriginalShipout
\box\AtBeginShipoutBox
\AtBeginShipoutOriginalShipout
\hbox{
\begin{tikzpicture}
\node [line, fill, minimum width=1pt, minimum height=19cm] (box) {};
\end{tikzpicture}
}
\endgroup
\AtBeginShipoutDiscard
}
\section{Logique propositionnelle}
\begin{paracol}{2}
\switchcolumn[0]*[\subsection{propositions}]
\kant[1-3]
\switchcolumn[1]
\kant[4-5]
\end{paracol}
\stopcontents
\end{document}
