From 87fe11f127e1248f747f9d41ba17d367052115e9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 19 Jan 2013 23:28:36 +0000 Subject: clipboard 0.2, replacing copypaste (18jan13) git-svn-id: svn://tug.org/texlive/trunk@28876 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/clipboard/clipboard.sty | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/clipboard/clipboard.sty (limited to 'Master/texmf-dist/tex/latex') 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'. -- cgit v1.2.3