summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-03-05 23:18:10 +0000
committerKarl Berry <karl@freefriends.org>2014-03-05 23:18:10 +0000
commit78421b8cf188c4dab7c54d40b422386364441fcd (patch)
tree111fbde500b346f39cc4bf9586e8a0c1358c1170
parente92a34caec5eab0a4c9409d6f0b8372d43dd0684 (diff)
background (4mar14)
git-svn-id: svn://tug.org/texlive/trunk@33100 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/background/README7
-rw-r--r--Master/texmf-dist/doc/latex/background/background.pdfbin103763 -> 115950 bytes
-rw-r--r--Master/texmf-dist/source/latex/background/background.dtx147
-rw-r--r--Master/texmf-dist/source/latex/background/background.ins4
-rw-r--r--Master/texmf-dist/tex/latex/background/background.sty32
5 files changed, 129 insertions, 61 deletions
diff --git a/Master/texmf-dist/doc/latex/background/README b/Master/texmf-dist/doc/latex/background/README
index 999270ec1ae..e07436f6993 100644
--- a/Master/texmf-dist/doc/latex/background/README
+++ b/Master/texmf-dist/doc/latex/background/README
@@ -1,18 +1,21 @@
==========================================================================
The `background' package
-Copyright (C) 2009, 2012 Gonzalo Medina (gmedinaar@unal.edu.co)
+Copyright (C) 2009, 2012, 2014 Gonzalo Medina (gmedinaar@unal.edu.co)
License: LPPL = LaTeX Project Public Licence
Maintenance Status: maintained (by Gonzalo Medina)
--------------------------------------------------------------------------
-The `background' package v2.0 offers the placement of quite arbitrary
+The `background' package v2.1 offers the placement of quite arbitrary
background material on the pages of a document. The user can control many
aspects (i.e., contents, position, color, opacity) of the background
material that will be displayed. The background material can be modified
as many times as required and it can be displayed in all the pages or in
some specifically chosen ones.
+The pack­age makes use of the ev­ery­page pack­age, and uses pgf/tikz
+for at­tribute con­trol.
+
==========================================================================
diff --git a/Master/texmf-dist/doc/latex/background/background.pdf b/Master/texmf-dist/doc/latex/background/background.pdf
index 3ad355a8cdb..e30a9564661 100644
--- a/Master/texmf-dist/doc/latex/background/background.pdf
+++ b/Master/texmf-dist/doc/latex/background/background.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/background/background.dtx b/Master/texmf-dist/source/latex/background/background.dtx
index 58ff5b2d671..26720cc94a3 100644
--- a/Master/texmf-dist/source/latex/background/background.dtx
+++ b/Master/texmf-dist/source/latex/background/background.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009, 2012 by Gonzalo Medina
+% Copyright (C) 2009, 2012, 2014 by Gonzalo Medina
%
% --------------------------------------------------------------------------
%
@@ -27,14 +27,15 @@
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{booktabs,multirow}
+\usepackage{booktabs}
+\usepackage[T1]{fontenc}
\usepackage[svgnames,x11names]{xcolor}
\usepackage{tikz}
\usepackage{ragged2e}
\usepackage{ntheorem}
\usepackage{framed}
-\usepackage{kpfonts}
-\usepackage{fancypar}
+\usepackage{fourier}
+\usepackage{beramono}
\usepackage{ifpdf}
\ifpdf
\usepackage[placement=top]{background}
@@ -57,6 +58,11 @@
pdfstartview={},%
breaklinks=true,%
linktocpage}
+
+\makeatletter
+\global\let\tikz@ensure@dollar@catcode=\relax
+\makeatother
+
\newcommand\MarNote[1]{\marginpar{\RaggedLeft\textcolor{blue}{#1}}}
\newcommand*\package[1]{{\upshape\mdseries\sffamily #1}}
@@ -97,9 +103,9 @@
\newcommand\impo{%
\tikz{%
- \node[draw=Tomato, very thick , fill=Honeydew2,%xshift=2cm,%
+ \node[draw=Maroon, very thick , fill=Honeydew2,%xshift=2cm,%
text width=0.8cm , text height=.8cm , text depth=0cm , text badly centered]
- {\textcolor{Tomato}{\fontsize{30}{72}\selectfont\bfseries !}};
+ {\textcolor{Maroon}{\fontsize{30}{72}\selectfont\bfseries !}};
}
}
@@ -137,7 +143,7 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \CheckSum{204}
+% \CheckSum{208}
%
% \changes{v 1.0}{2009/11/07}{First version}
% \changes{v 2.0}{2012/08/06}{Second version}
@@ -165,8 +171,6 @@
% packages to provide a simple and flexible mechanism to include background material on all
% (or on some of) the pages of a \LaTeX2e document.
% \par\medskip
-% This version reimplements almost completely version 1.0; a most friendly interface was implemented using the |key=value| functionality.
-% \par\medskip
% The author will gladly receive suggestions, comments and bug reports.
%
% \section{User Interface}
@@ -191,12 +195,12 @@
% \end{mycode}
% So, for example,
% \begin{mycode}
-%|\usepackage[contents=Confidential,color=blue!30]{background}|
+%|\usepackage[contents=Confidential,color=blue]{background}|
% \end{mycode}
% and
% \begin{mycode}
%|\usepackage{background}|\\
-%|\backgroundsetup{contents=Confidential,color=blue!30}|
+%|\backgroundsetup{contents=Confidential,color=blue}|
% \end{mycode}
% produce the same result. The advantage of |\backgroundsetup| is that it can be used not only in the preamble but on the body of the document, as many times as required.\medskip
% \begin{Alerta}
@@ -248,11 +252,19 @@
%|position={5cm,7cm}|
% \end{mycode}
-%\DescribeMacro{anchor=}
+%\DescribeMacro{nodeanchor=}
%This option allows the user to set the anchor for the node containing the background material. Typical values for this key are:
% \begin{mycode}
-%|anchor=north east|\\
-%|anchor=below|
+%|nodeanchor=south east|\\
+%|nodeanchor=north|
+% \end{mycode}
+% \par\medskip
+
+%\DescribeMacro{anchor=}
+%This option allows the user to set the simplified anchor for the node containing the background material. Typical values for this key are:
+% \begin{mycode}
+%|anchor=left|\\
+%|anchor={below=30pt}|
% \end{mycode}
% \par\medskip
@@ -262,31 +274,33 @@
% These two options control the horizontal and vertical shifting, respectively, of the node position.
% \begin{table}[!ht]
% \centering
+% \caption{Available options.}
+% \renewcommand\arraystretch{1.3}
% \makebox[\textwidth]{
% \begin{tabular}{rll}\toprule
-% Key & Possible Values & Default\\\toprule
+% Key & Possible Values & Default\\\midrule
% |pages| & |<all|$\mid$|some>| & |all| \\
% |firstpage| & |<true|$\mid$|false>| & |false| \\
% |placement| & |<center|$\mid$|top|$\mid$|bottom>| & |center| \\
% |contents| & Text, images, etc. & |Draft|\\
-% |color| & Any valid color & red!45\ \ \colorsample{red!45}\\
-% |angle| & Any value between -360 and 360 & 60, for |center| \\
-% & & 0, for |top| and |bottom|\\
-% |opacity| & Any value between 0 and 1 & 0.5 \\
-% |scale| & Any positive value & 15 for |center| \\
-% & & 8 for |top| and |bottom| \\
+% |color| & Any valid color & |red!45|\ \ \colorsample{red!45}\\
+% |angle| & Any value between -360 and 360 & |60|, for |center| \\
+% & & |0|, for |top| and |bottom|\\
+% |opacity| & Any value between 0 and 1 & |0.5| \\
+% |scale| & Any positive value & |15| for |center| \\
+% & & |8| for |top| and |bottom| \\
% |position| & Any value for node placement & |current page.center| for |center| \\
% & & |current page.north| for |top| \\
% & & |current page.south| for |bottom| \\
-% |anchor| & Any value for node anchor & empty for |center| \\
+% |anchor| & Any simplified value for node anchor & |empty| for |center| \\
% & & |below| for |top| \\
% & & |above| for |bottom| \\
-% |hshift| & Any value. & 0 \\
-% |vshift| & Any value. & 0 \\
+% |nodeanchor| & Any value for node anchor & |center| \\
+% |hshift| & Any length. & 0pt \\
+% |vshift| & Any length. & 0pt \\
% \\\bottomrule
% \end{tabular}
% }
-% \caption{The available options.}
% \label{tab:options}
% \end{table}
%
@@ -332,8 +346,14 @@
% \end{exam}
% \begin{mycode}
% |\documentclass{article}|\\
-% |\usepackage[placement=top,angle=0,%|\\
-% | color=black!40,scale=4,hshift=60,vshift=-5]{background}| \\
+% |\usepackage[|\\
+% | placement=top,|\\
+% | angle=0, |\\
+% | color=black!40, |\\
+% | scale=4, |\\
+% | hshift=60, |\\
+% | vshift=-5 |\\
+% | ]{background}| \\
% |\backgroundsetup{contents={-\thepage-}}|\\
% |\usepackage{lipsum}|\\
%
@@ -345,7 +365,7 @@
% \end{mycode}
%
% \begin{exam}\label{exa:bgthispage}
-% This example illustrates how to use of the |\BgThispage| command to add background material on selected pages and how to use |\backgroundsetup|.
+% This example illustrates how to use of the {\normalfont |\BgThispage|} command to add background material on selected pages and how to use {\normalfont |\backgroundsetup|}.
% \end{exam}
% \begin{mycode}
% |\documentclass{article}|\\
@@ -371,17 +391,29 @@
% \end{exam}
% \begin{mycode}
% |\documentclass{article}|\\
-% |\usepackage[contents={},opacity=1,scale=1.5,|
-% | color=blue!90]{background}|\\
+% |\usepackage[ |\\
+% | contents={}, |\\
+% | opacity=1, |\\
+% | scale=1.5, |\\
+% | color=blue!90 |\\
+% | ]{background} |\\
% |\usepackage{lipsum}|\\
% |\usepackage{ifthen}|\\
%
% |\AddEverypageHook{%|\\
-% | \ifthenelse{\isodd{\thepage}}%|\\
-% | {\backgroundsetup{angle=90,position={0,-0.65\textheight},%|\\
-% | contents={The background package}}}%|\\
-% | {\backgroundsetup{angle=270,position={0.9\textwidth,-.7\textheight},%|\\
-% | contents={Version 2.0}}}%|\\
+% | \ifthenelse{\isodd{\value{page}}}%|\\
+% | {\backgroundsetup{ |\\
+% | angle=90, |\\
+% | position={0,-0.65\textheight}, |\\
+% | contents={The background package} |\\
+% | }% |\\
+% | }% |\\
+% | {\backgroundsetup{|\\
+% | angle=270,|\\
+% | position={0.9\textwidth,-.7\textheight},%|\\
+% | contents={Version 2.1}|\\
+% | }% |\\
+% | }% |\\
% | \BgMaterial}|\\
%
% |\begin{document}|\\
@@ -391,9 +423,9 @@
%
% \begin{exam}\label{exa:nobgthispage}
% This example
-% illustrates the use of the |\NoBgThispage| command, to
+% illustrates the use of the {\normalfont |\NoBgThispage|} command, to
% suppress the background material on selected pages (page 2, in this case).
-% Adding the |twocolumn| class option will produce compilation errors
+% Adding the {\normalfont |twocolumn|} class option will produce compilation errors
% \end{exam}
% \begin{mycode}
% |\documentclass{article}|\\
@@ -447,6 +479,13 @@
% \item A user command |\BgMaterial| has been added.
% \end{itemize}
%
+% \textbf{Version 2.1 (2014/03/04)}:
+% \begin{itemize}
+% \item Added the |nodeanchor| key..
+% \item The containing node has now |inner sep=0pt|.
+% \item Improved documentation.
+% \end{itemize}
+%
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
% \DoNotIndex{\@ifpackageloaded }
% \DoNotIndex{\advance,\AtEndDocument,\begingroup,\begin,\catcode,\clearpage}
@@ -464,7 +503,7 @@
% Standard identification:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{background}[2012/08/06 v2.0 background material]
+\ProvidesPackage{background}[2014/03/04 v2.1 background material]
% \end{macrocode}
%
% Next, we check if the needed packages have been already loaded; if not, we load them:
@@ -472,7 +511,7 @@
% \begin{macrocode}
\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
\@ifpackageloaded{tikz}{}{\RequirePackage{tikz}}
-\@ifpackageloaded{everypar}{}{\RequirePackage{everypage}}
+\@ifpackageloaded{everypage}{}{\RequirePackage{everypage}}
\@ifpackageloaded{afterpage}{}{\RequirePackage{afterpage}}
% \end{macrocode}
%
@@ -483,6 +522,7 @@
% \begin{macro}{scale=}
% \begin{macro}{position=}
% \begin{macro}{anchor=}
+% \begin{macro}{nodeanchor=}
% \begin{macro}{hshift=}
% \begin{macro}{vshift=}
% Now we declare the options that will control the background material
@@ -501,6 +541,8 @@
\def\Background@Position{#1}}
\DeclareOptionX[BG]<background>{anchor}{%
\def\Background@Anchor{#1}}
+\DeclareOptionX[BG]<background>{nodeanchor}{%
+ \def\Background@NodeAnchor{#1}}
\DeclareOptionX[BG]<background>{hshift}{%
\def\Background@HShift{#1}}
\DeclareOptionX[BG]<background>{vshift}{%
@@ -515,6 +557,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\bg@some}
% A boolean (initially set to |false|) to control whether the background material will be displayed in
@@ -606,10 +649,11 @@
\ExecuteOptions{all,center}
% \begin{macrocode}
-% Now we process any unknown inputs. A warning will be produced when the user issues an option that has not been declared.
+% Now we process any unknown inputs. A warning will be produced when the
+% user issues an option that has not been declared.
% \begin{macrocode}
-\DeclareOptionX*{\PackageWarning{background}{‘ \CurrentOption’ ignored}}
+\DeclareOptionX*{\PackageWarningNoLine{background}{Option '\CurrentOption' ignored}}
% \end{macrocode}
%
% We next execute and process the options:
@@ -624,8 +668,9 @@
scale=10,%
position=current page.center,%
anchor={},%
- hshift=0,%
- vshift=0%
+ nodeanchor={center},%
+ hshift=0pt,%
+ vshift=0pt%
}
\ProcessOptionsX[BG]<background>
@@ -647,10 +692,18 @@
\newcommand\bg@material{%
\begin{tikzpicture}[remember picture,overlay,scale=\Background@Scale]
- \node [rotate=\Background@Angle,scale=\Background@Scale,
- opacity=\Background@Opacity,%
- xshift=\Background@HShift,yshift=\Background@VShift,color=\Background@Color]
- at (\Background@Position) [\Background@Anchor] {\Background@Contents};
+ \node[
+ rotate=\Background@Angle,
+ scale=\Background@Scale,
+ opacity=\Background@Opacity,
+ anchor=\Background@NodeAnchor,
+ xshift=\Background@HShift,
+ yshift=\Background@VShift,
+ color=\Background@Color,
+ inner sep=0pt
+ ]
+ at (\Background@Position) [\Background@Anchor]
+ {\Background@Contents};
\end{tikzpicture}}%
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/background/background.ins b/Master/texmf-dist/source/latex/background/background.ins
index 1ce7f6e36e5..7eff8ebea33 100644
--- a/Master/texmf-dist/source/latex/background/background.ins
+++ b/Master/texmf-dist/source/latex/background/background.ins
@@ -2,7 +2,7 @@
\keepsilent
\preamble
-Copyright (C) 2009-2012 Gonzalo Medina (gmedinaar@unal.edu.co)
+Copyright (C) 2009, 2012, 2014 Gonzalo Medina (gmedinaar@unal.edu.co)
--------------------------------------------------------------------------
@@ -31,7 +31,7 @@ and the derived files background.sty and background.pdf.
\Msg{* \space\space background.sty}
\Msg{*}
\Msg{* To produce the documentation run the file background.dtx}
-\Msg{* through LaTeX.}
+\Msg{* through pdfLaTeX.}
\Msg{*}
\Msg{* Happy TeXing!}
\Msg{*********************************************************}
diff --git a/Master/texmf-dist/tex/latex/background/background.sty b/Master/texmf-dist/tex/latex/background/background.sty
index e746a4e3311..0a20dd46926 100644
--- a/Master/texmf-dist/tex/latex/background/background.sty
+++ b/Master/texmf-dist/tex/latex/background/background.sty
@@ -6,7 +6,7 @@
%%
%% background.dtx (with options: `package')
%%
-%% Copyright (C) 2009-2012 Gonzalo Medina (gmedinaar@unal.edu.co)
+%% Copyright (C) 2009, 2012, 2014 Gonzalo Medina (gmedinaar@unal.edu.co)
%%
%% --------------------------------------------------------------------------
%%
@@ -34,11 +34,12 @@
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{background}[2012/08/06 v2.0 background material]
+\ProvidesPackage{background}[2014/03/04 v2.1 background material]
\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
\@ifpackageloaded{tikz}{}{\RequirePackage{tikz}}
-\@ifpackageloaded{everypar}{}{\RequirePackage{everypage}}
+\@ifpackageloaded{everypage}{}{\RequirePackage{everypage}}
\@ifpackageloaded{afterpage}{}{\RequirePackage{afterpage}}
\DeclareOptionX[BG]<background>{contents}{%
\def\Background@Contents{#1}}
@@ -54,6 +55,8 @@
\def\Background@Position{#1}}
\DeclareOptionX[BG]<background>{anchor}{%
\def\Background@Anchor{#1}}
+\DeclareOptionX[BG]<background>{nodeanchor}{%
+ \def\Background@NodeAnchor{#1}}
\DeclareOptionX[BG]<background>{hshift}{%
\def\Background@HShift{#1}}
\DeclareOptionX[BG]<background>{vshift}{%
@@ -121,7 +124,7 @@
\ExecuteOptions{all,center}
-\DeclareOptionX*{\PackageWarning{background}{‘ \CurrentOption’ ignored}}
+\DeclareOptionX*{\PackageWarningNoLine{background}{Option '\CurrentOption' ignored}}
\ExecuteOptionsX[BG]<background>{%
firstpage=false,
@@ -132,8 +135,9 @@
scale=10,%
position=current page.center,%
anchor={},%
- hshift=0,%
- vshift=0%
+ nodeanchor={center},%
+ hshift=0pt,%
+ vshift=0pt%
}
\ProcessOptionsX[BG]<background>
@@ -143,10 +147,18 @@
\newcommand\bg@material{%
\begin{tikzpicture}[remember picture,overlay,scale=\Background@Scale]
- \node [rotate=\Background@Angle,scale=\Background@Scale,
- opacity=\Background@Opacity,%
- xshift=\Background@HShift,yshift=\Background@VShift,color=\Background@Color]
- at (\Background@Position) [\Background@Anchor] {\Background@Contents};
+ \node[
+ rotate=\Background@Angle,
+ scale=\Background@Scale,
+ opacity=\Background@Opacity,
+ anchor=\Background@NodeAnchor,
+ xshift=\Background@HShift,
+ yshift=\Background@VShift,
+ color=\Background@Color,
+ inner sep=0pt
+ ]
+ at (\Background@Position) [\Background@Anchor]
+ {\Background@Contents};
\end{tikzpicture}}%
\newcommand\BgThispage{\AddThispageHook{\bg@material}}