[OS X TeX] Background images
Ross Moore
ross.moore at mq.edu.au
Thu Feb 16 20:33:01 EST 2017
Hi Alain,
On 17 Feb 2017, at 12:16, Alain Schremmer <schremmer.alain at gmail.com<mailto:schremmer.alain at gmail.com>> wrote:
I was curious and tried to run your code but got an error:
Did you remove all the blank lines that are seen in the email?
This tends to happen when a message is submitted from a PC, (with <CR><LF> )
and read on a Mac/Unix .
Both characters can be translated into <LF> which causes the blank line
resulting in \par within TeX source.
Runaway argument?
{\tikz [remember picture,overlay]{
./MarginRules.tex:10: Paragraph ended before \AddEverypageHook was complete.
<to be read again>
\par
l.10
?
Process aborted
Now I am even more curious!
Regards
--schremmer
On , at 2017 Feb 16,9:54 AM, Tim Brophy wrote:
I received the following on Stack Exchange and it does what I want with a little tweaking. Thanks for the suggestions.
Tim
\documentclass{report}
\usepackage{everypage}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usepackage{lipsum}% MWE only
\AddEverypageHook{\tikz[remember picture,overlay]{%
\ifodd\value{page}\draw ($(current page text area.north west)+(-0.5\marginparsep,0pt)$)
--
($(current page text area.south west)+(-0.5\marginparsep,0pt)$)
;
\else\draw ($(current page text area.north east)+(0.5\marginparsep,0pt)$)
--
($(current page text area.south east)+(0.5\marginparsep,0pt)$)
;
\fi}}
I'd gess that this is what is really meant:
\AddEverypageHook{\tikz[remember picture,overlay]{%
\ifodd\value{page}\draw ($(current page text area.north west)+(-0.5\marginparsep,0pt)$)
--
($(current page text area.south west)+(-0.5\marginparsep,0pt)$)
;
\else\draw ($(current page text area.north east)+(0.5\marginparsep,0pt)$)
--
($(current page text area.south east)+(0.5\marginparsep,0pt)$)
;
\fi}}
\begin{document}
\lipsum [1-16]
\end{document}
On 16 Feb 2017, at 14:36, b.a.lee at rocketmail.com<mailto:b.a.lee at rocketmail.com> wrote:
Sorry, I mean \vrule.
Sent from Yahoo Mail on Android
On Thu, 16 Feb 2017 at 0:16, Alain Schremmer
<schremmer.alain at gmail.com<mailto:schremmer.alain at gmail.com>> wrote:
Just a thought: have you looked at tcolorbox? (e.g. Border Line Option Keys)
--schremmer
Dr Ross Moore
Mathematics Dept | Level 2, S2.638 AHH
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955 | F: +61 2 9850 8114<tel:%2B61%202%209850%209695>
M:+61 407 288 255<tel:%2B61%20409%20125%20670> | E: ross.moore at mq.edu.au<mailto:rick.minter at mq.edu.au>
http://www.maths.mq.edu.au<http://mq.edu.au/>
[cid:image001.png at 01D030BE.D37A46F0]<http://mq.edu.au/>
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.<http://mq.edu.au/>
This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.<http://mq.edu.au/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20170217/e949a915/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20170217/e949a915/attachment.png>
More information about the MacOSX-TeX
mailing list