summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/embedall
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-14 22:28:46 +0000
committerKarl Berry <karl@freefriends.org>2013-10-14 22:28:46 +0000
commit9f85f95eb8ea005052f16a229098bf48ada96635 (patch)
tree6d46747aa9edf834f9caa6924a8003a50e4bddc9 /Master/texmf-dist/tex/latex/embedall
parent2f0a462b7fbebdd8c80a7212f215fceefbf691c4 (diff)
embedall (14oct13)
git-svn-id: svn://tug.org/texlive/trunk@31903 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/embedall')
-rw-r--r--Master/texmf-dist/tex/latex/embedall/embedall.sty78
1 files changed, 78 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/embedall/embedall.sty b/Master/texmf-dist/tex/latex/embedall/embedall.sty
new file mode 100644
index 00000000000..f5ff6313f09
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/embedall/embedall.sty
@@ -0,0 +1,78 @@
+%%
+%% This is file `embedall.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% embedall.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2013 by Alberto Sartori
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.2 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.2 or later is part of all distributions of LaTeX version
+%% 1999/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{embedall}
+ [2013/10/10 v1.0 embed files in pdf]
+
+\RequirePackage{embedfile}
+\RequirePackage{graphicx}
+\RequirePackage{listings}
+\RequirePackage{letltxmacro}
+
+\newcommand\embedall@all{1}
+\newcommand\embedall@graphicx{0}
+\newcommand\embedall@list{0}
+\newcommand\embedall@source{0}
+
+\DeclareOption{graphicx}{\def\embedall@graphicx{1}\def\embedall@all{0}}
+\DeclareOption{listings}{\def\embedall@list{1}\def\embedall@all{0}}
+\DeclareOption{source}{\def\embedall@source{1}\def\embedall@all{0}}
+
+\ProcessOptions
+
+\LetLtxMacro\embedall@latex@includegraphics\includegraphics
+\newcommand\embedall@includegraphics[2][]{%
+ \embedfile[desc=image]{#2}
+ \embedall@latex@includegraphics[#1]{#2}%
+}
+
+\LetLtxMacro\embedall@latex@lstinputlisting\lstinputlisting
+\newcommand\embedall@lstinputlisting[2][]{%
+ \embedfile[desc=listing file]{#2}
+ \embedall@latex@lstinputlisting[#1]{#2}%
+}
+
+\DeclareRobustCommand\embedinput[2][input file]{%
+ \input{#2}%
+ \embedfile[desc={#1}]{#2}%
+}
+
+\ifnum\embedall@all=1%
+ \def\embedall@graphicx{1}
+ \def\embedall@list{1}
+ \def\embedall@source{1}
+\fi
+\ifnum\embedall@graphicx=1%
+ \LetLtxMacro\includegraphics\embedall@includegraphics
+\fi
+\ifnum\embedall@list=1%
+ \LetLtxMacro\lstinputlisting\embedall@lstinputlisting
+\fi
+
+\IfFileExists{./\jobname.tex}{%
+ \ifnum\embedall@source=1%
+ \embedfile[desc=main source file]{\jobname.tex}\fi}{}
+
+\endinput
+%%
+%% End of file `embedall.sty'.