diff options
author | Karl Berry <karl@freefriends.org> | 2013-01-19 23:28:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-01-19 23:28:36 +0000 |
commit | 87fe11f127e1248f747f9d41ba17d367052115e9 (patch) | |
tree | 5ae9648ae10a2b4b74299aa45aa6b0d5b23f697a | |
parent | d96e456867141854625c3f25653b26a71ac0ddfa (diff) |
clipboard 0.2, replacing copypaste (18jan13)
git-svn-id: svn://tug.org/texlive/trunk@28876 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/clipboard/README | 36 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/clipboard/clipboard.pdf | bin | 0 -> 46175 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/clipboard/clipboard.tex | 113 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/clipboard/clipboard.sty | 34 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/clipboard.tlpsrc | 0 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 |
7 files changed, 185 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/clipboard/README b/Master/texmf-dist/doc/latex/clipboard/README new file mode 100644 index 00000000000..bed5033f8eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/clipboard/README @@ -0,0 +1,36 @@ +Package: clipboard +Description: Copy and paste into and across documents + +The clipboard package provides a basic framework for copying and pasting +text and commands into and across multiple documents. + +2013/01/18 v0.2 + Package: Renamed: copypaste->clipboard + Commands: + \Copy {key} {content} + \Paste {key} {content} + \newclipboard {basename} + \openclipboard {basename} + +2013/01/11 v0.1 + Initial version (copypaste) + +-------------------------------------------------------------------------------- +Installation: + +*Copy clipboard.sty to a location where LaTeX will find it. + See http://www.tex.ac.uk/faq + +-------------------------------------------------------------------------------- +Usage: + +*See clipboard.pdf + +-------------------------------------------------------------------------------- +Copyright (C) 2013 Eduardo C. Lourenço de Lima + +This material is subject to the LaTeX Project Public License. See +http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html +for the details of that license + +This work has the LPPL maintenance status "author-maintained" diff --git a/Master/texmf-dist/doc/latex/clipboard/clipboard.pdf b/Master/texmf-dist/doc/latex/clipboard/clipboard.pdf Binary files differnew file mode 100644 index 00000000000..8edeb11abe0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/clipboard/clipboard.pdf diff --git a/Master/texmf-dist/doc/latex/clipboard/clipboard.tex b/Master/texmf-dist/doc/latex/clipboard/clipboard.tex new file mode 100644 index 00000000000..2603598ab14 --- /dev/null +++ b/Master/texmf-dist/doc/latex/clipboard/clipboard.tex @@ -0,0 +1,113 @@ +% Copyright (C) 2013 Eduardo C. Lourenço de Lima +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 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.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +\documentclass{ltxdoc} + +\newcommand\fileversion {0.2} +\newcommand\filedate {January 18, 2013} + +\newenvironment{Description} + {\par\medskip\noindent\ignorespaces}{} + +\newenvironment{synopsis} + {\begin{list}{}{\setlength\parsep{0pt}\setlength\itemsep{0pt}}} + {\end{list}} + +\title {The \textsf{clipboard} package\thanks{This document corresponds to \textsf{clipboard}~\fileversion, dated~\filedate.}} +\author {Eduardo C. Louren\c{c}o de Lima\\\texttt{elourenco@phi.pro.br}} +\date {\filedate} + + \begin{document} + \maketitle + + \section*{Introduction} + +The |clipboard| package provides a basic framework for copying and pasting text and commands across multiple documents. + +\begin{synopsis} +\item |\newclipboard | \marg{basename} +\item |\openclipboard| \marg{basename}\medskip +\item |\Copy | \marg{key} \marg{content} +\item |\Paste| \marg{key} +\end{synopsis} + + \section{Usage} + +\begin{Description} +\DescribeMacro{\newclipboard} +The first step is to create a clipboard. +\begin{synopsis} +\item |\newclipboard| \marg{basename} +\end{synopsis} +\end{Description} + +\begin{Description} +\DescribeMacro{\Copy} +The command |\Copy| copies a \meta{content} identified as \meta{key} to the clipboard. +\footnote {Lowercase \texttt{\char92 copy} is already defined in {\TeX}.} +\begin{synopsis} +\item |\Copy| \marg{key} \marg{content} +\end{synopsis} +\end{Description} + +\begin{Description} +\DescribeMacro{\Paste} +And the command |\Paste| pastes the content identified by \meta{key} into the same or another document. +See below. +\begin{synopsis} +\item |\Paste| \marg{key} +\end{synopsis} +\end{Description} + +\begin{Description} +\DescribeMacro{\openclipboard} +Finally, |\openclipboard| makes the same content available across multiple documents. +For instance, you can paste content from |doc1.tex| into |doc2.tex|. +Make sure to use the same \meta{basename} in both documents. +\begin{synopsis} +\item |\openclipboard| \marg{basename} +\end{synopsis} +\end{Description} + + \section{Example} + +This is how to copy and paste text from |book.tex| into |article.tex|:\bigskip + +\noindent |book.tex|: +\begin{verbatim} + \documentclass{book} + \usepackage{clipboard} + \newclipboard{myclipboard} + \begin{document} + \Copy{dolorem ipsum}{Nor again is there anyone who + loves or pursues or desires to obtain pain of itself}, + because it is pain, but occasionally circumstances occur + in which toil and pain can procure him some great pleasure. + \end{document} +\end{verbatim} + +\noindent |article.tex|: +\begin{verbatim} + \documentclass{article} + \usepackage{clipboard} + \openclipboard{myclipboard} + \begin{document} + According to Cicero, + \begin{quote} + \Paste{dolorem ipsum} + \end{quote} + \end{document} +\end{verbatim} + +\noindent\textbf{Note:} Because content from |book.tex| is being copied and pasted into |article.tex|, you must run |latex book.tex| before running |latex article.tex|. + + \end{document} diff --git a/Master/texmf-dist/tex/latex/clipboard/clipboard.sty b/Master/texmf-dist/tex/latex/clipboard/clipboard.sty new file mode 100644 index 00000000000..765c0f5d626 --- /dev/null +++ b/Master/texmf-dist/tex/latex/clipboard/clipboard.sty @@ -0,0 +1,34 @@ +%% +%% This is file `clipboard.sty', +%% +%% Copyright (C) 2013 Eduardo C. Lourenço de Lima +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 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.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[1996/06/01] +\ProvidesPackage{clipboard}[2013/01/18 v0.2 Copy and paste into and across documents] + +\newwrite \clipboard@fileout +\newcommand\clipboard@write [2] {\immediate\write\clipboard@fileout{\noexpand\clipboard{#1}{\unexpanded{#2}}}} +\newcommand\clipboard@copy [2] {\@namedef{clipboard@#1}{#2}} +\newcommand\clipboard@paste [1] {\@nameuse{clipboard@#1}} + +\newcommand\newclipboard [1] {\immediate\openout\clipboard@fileout=#1.cpy} +\newcommand\openclipboard [1] {\input{#1.cpy}} + +\newcommand\clipboard [2] {\clipboard@copy{#1}{#2}} + +\newcommand\Copy [2] {\clipboard{#1}{#2}\clipboard@write{#1}{#2}#2} +\newcommand\Paste [1] {\clipboard@paste{#1}} + +\endinput +%% +%% End of file `clipboard.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index fb292959f6f..967958745b9 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -98,7 +98,7 @@ my @TLP_working = qw( chronosys chscite circ circuitikz cite cjhebrew cjk cjkpunct classicthesis - clefval cleveref + clefval cleveref clipboard clock clrscode cm-lgc cm-super cm-unicode cmap cmarrows cmbright cmcyr cmdstring cmll cmpica cmpj cmsd cmtiup diff --git a/Master/tlpkg/tlpsrc/clipboard.tlpsrc b/Master/tlpkg/tlpsrc/clipboard.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/clipboard.tlpsrc diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 7fc3dd06c30..258e83bba01 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -117,6 +117,7 @@ depend chronology depend circ depend clefval depend cleveref +depend clipboard depend clock depend cmdstring depend cmsd |