[OS X TeX] Background images

Ross Moore ross.moore at mq.edu.au
Fri Feb 17 02:33:01 CET 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: <http://tug.org/pipermail/macostex-archives/attachments/20170217/e949a915/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <http://tug.org/pipermail/macostex-archives/attachments/20170217/e949a915/attachment-0001.png>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list