texlive[43497] Master/texmf-dist: titlepic (14mar17)
commits+karl at tug.org
commits+karl at tug.org
Tue Mar 14 22:51:28 CET 2017
Revision: 43497
http://tug.org/svn/texlive?view=revision&revision=43497
Author: karl
Date: 2017-03-14 22:51:28 +0100 (Tue, 14 Mar 2017)
Log Message:
-----------
titlepic (14mar17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/titlepic/titlepic-manual.pdf
trunk/Master/texmf-dist/doc/latex/titlepic/titlepic-manual.tex
trunk/Master/texmf-dist/tex/latex/titlepic/titlepic.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/titlepic/README.md
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/titlepic/README
Deleted: trunk/Master/texmf-dist/doc/latex/titlepic/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlepic/README 2017-03-14 21:51:16 UTC (rev 43496)
+++ trunk/Master/texmf-dist/doc/latex/titlepic/README 2017-03-14 21:51:28 UTC (rev 43497)
@@ -1,13 +0,0 @@
-The titlepic package allows you to place a picture on the
-title page (cover page) of a LaTeX document.
-
-Example of usage:
-\usepackage[cc]{titlepic}
-\usepackage{graphicx}
-\titlepic{\includegraphics[width=\textwidth]{picture.png}}
-
-Note: the package currently only works with the document
-classes article, report and book.
-
-Author: Thomas ten Cate
-License: Public Domain
\ No newline at end of file
Added: trunk/Master/texmf-dist/doc/latex/titlepic/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlepic/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/titlepic/README.md 2017-03-14 21:51:28 UTC (rev 43497)
@@ -0,0 +1,18 @@
+The `titlepic` package for LaTeX
+================================
+
+The titlepic package allows you to place a picture on the
+title page (cover page) of a LaTeX document.
+
+Example of usage:
+
+ \usepackage[cc]{titlepic}
+ \usepackage{graphicx}
+ \titlepic{\includegraphics[width=\textwidth]{picture.png}}
+
+Note: the package currently only works with the document
+classes article, report and book.
+
+Author: Thomas ten Cate
+License: Public Domain
+Source: https://github.com/ttencate/titlepic
Modified: trunk/Master/texmf-dist/doc/latex/titlepic/titlepic-manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/titlepic/titlepic-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlepic/titlepic-manual.tex 2017-03-14 21:51:16 UTC (rev 43496)
+++ trunk/Master/texmf-dist/doc/latex/titlepic/titlepic-manual.tex 2017-03-14 21:51:28 UTC (rev 43497)
@@ -18,8 +18,11 @@
}
\title{\LaTeX{} \texttt{titlepic} Manual}
-\author{Thomas ten Cate\thanks{\texttt{<ttencate at gmail.com>}}}
-\date{August 5, 2008}
+\author{
+ Thomas ten Cate\thanks{\texttt{<ttencate at gmail.com>}} \\
+ with contributions from \\
+ Denis Bitouz\'e}
+\date{March 14, 2017}
\titlepic{\placeholder{\textwidth}{0.75\textwidth}} % This is the magic command!
\begin{document}
@@ -30,14 +33,15 @@
In \LaTeX, there is by default no way to put a picture on the title page or cover page that is produced by \verb$\maketitle$. Surprisingly, no package seemed to exist for this either, which is why I put together this very simple package named \verb$titlepic$.
-\textbf{Note:} \verb$titlepic$ only works with the default document classes \verb$article$, \verb$report$ and \verb$book$.
+\textbf{Note:} \verb$titlepic$ only works with the default document classes \verb$article$, \verb$report$ and \verb$book$. However, it works both with the \verb$titlepage$ and \verb$notitlepage$ document class options.
\section{Installation}
-There are two ways to install the package:
+There are several ways to install the package:
\begin{itemize}
\item Simply drop \verb$titlepic.sty$ in the same directory as your \verb$.tex$ source document. This is the easiest option for casual use.
\item Put \verb$titlepic.sty$ somewhere in your \verb$texmf$ tree and rehash. The details depend on your \TeX{} distribution. This gives you a system-wide installation.
+ \item Install it from \TeX{} Live or MiK\TeX.
\end{itemize}
\section{Usage}
@@ -54,8 +58,6 @@
\verb$\usepackage{graphicx}$
\end{quote}
-\textbf{Note:} when you use the \verb$article$ document class, be sure to pass it the \verb$titlepage$ option (\verb$\documentclass[titlepage]{article}$), because articles do not have a title page by default.
-
Then, along with the usual \verb$\title$, \verb$\author$ and \verb$\date$, put a command like the following:
\begin{quote}
@@ -84,10 +86,10 @@
Here is a full example of what your document could look like.
\begin{verbatim}
-% Be sure to pass titlepage to the article class
+% Pass titlepage to the article class
\documentclass[titlepage]{article}
-% Centre the picture and the title vertically with cc
+% Centre the picture and the title vertically with cc (only works with titlepage mode)
\usepackage[cc]{titlepic}
% For \includegraphics
@@ -109,4 +111,9 @@
\end{document}
\end{verbatim}
+\section{Contributing}
+
+Contributions are welcome! Send a pull request on GitHub here:\\
+\verb$https://github.com/ttencate/titlepic$
+
\end{document}
Modified: trunk/Master/texmf-dist/tex/latex/titlepic/titlepic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlepic/titlepic.sty 2017-03-14 21:51:16 UTC (rev 43496)
+++ trunk/Master/texmf-dist/tex/latex/titlepic/titlepic.sty 2017-03-14 21:51:28 UTC (rev 43497)
@@ -1,10 +1,11 @@
% titlepic.sty is a LaTeX package to show a picture on the cover produced by \maketitle.
% By Thomas ten Cate <ttencate at gmail.com>. Free software, no warranty of any kind.
-%
+%
% Version history:
+% 1.2: works without titlepage as well
% 1.1: now more self-contained, comes with a PDF manual
% 1.0: first release
-%
+%
% -----------------------------------------------------------------------------
% No idea whether it works on older LaTeXes.
@@ -11,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}
% Package identification and version number.
-\ProvidesPackage{titlepic}[2009/08/03 1.1 Package to display a picture on the title page]
+\ProvidesPackage{titlepic}[2017/03/14 1.2 Package to display a picture on the title page]
% Declare the options.
\DeclareOption{tt}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vskip 3em}}
@@ -28,41 +29,62 @@
% If a title page was requested from the document class (article/report/book),
% override \maketitle to show our picture.
\if at titlepage
-\renewcommand\maketitle{
- \begin{titlepage}%
- \let\footnotesize\small
- \let\footnoterule\relax
- \let \footnote \thanks
- \@tptopspace%
+ \renewcommand\maketitle{
+ \begin{titlepage}%
+ \let\footnotesize\small
+ \let\footnoterule\relax
+ \let \footnote \thanks
+ \@tptopspace%
+ \begin{center}%
+ {\LARGE \@title \par}%
+ \vskip 3em%
+ {\large
+ \lineskip .75em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par%
+ }%
+ \vskip 1.5em%
+ {\large \@date \par}% % Set date in \large size.
+ \end{center}\par
+ \@tpsepspace%
+ {\centering\@titlepic\par}
+ \vfil
+ \@thanks
+ \end{titlepage}%
+ \setcounter{footnote}{0}%
+ \global\let\thanks\relax
+ \global\let\maketitle\relax
+ \global\let\@thanks\@empty
+ \global\let\@author\@empty
+ \global\let\@date\@empty
+ \global\let\@title\@empty
+ \global\let\@titlepic\@empty
+ \global\let\title\relax
+ \global\let\author\relax
+ \global\let\date\relax
+ \global\let\and\relax
+ \global\let\titlepic\relax
+ }
+\else
+ \def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
\begin{center}%
+ \let \footnote \thanks
{\LARGE \@title \par}%
- \vskip 3em%
+ \vskip 1.5em%
{\large
- \lineskip .75em%
- \begin{tabular}[t]{c}%
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
\@author
- \end{tabular}\par%
- }%
- \vskip 1.5em%
- {\large \@date \par}% % Set date in \large size.
- \end{center}\par
- \@tpsepspace%
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \end{center}%
+ \vskip .5em%
{\centering\@titlepic\par}
- \vfil
- \@thanks
- \end{titlepage}%
- \setcounter{footnote}{0}%
- \global\let\thanks\relax
- \global\let\maketitle\relax
- \global\let\@thanks\@empty
- \global\let\@author\@empty
- \global\let\@date\@empty
- \global\let\@title\@empty
- \global\let\@titlepic\@empty
- \global\let\title\relax
- \global\let\author\relax
- \global\let\date\relax
- \global\let\and\relax
- \global\let\titlepic\relax
-}
+ \par
+ \vskip 1.5em}
\fi
More information about the tex-live-commits
mailing list