summaryrefslogtreecommitdiff
path: root/support/ltxdiff/ltxdiff.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/ltxdiff/ltxdiff.sty
Initial commit
Diffstat (limited to 'support/ltxdiff/ltxdiff.sty')
-rw-r--r--support/ltxdiff/ltxdiff.sty88
1 files changed, 88 insertions, 0 deletions
diff --git a/support/ltxdiff/ltxdiff.sty b/support/ltxdiff/ltxdiff.sty
new file mode 100644
index 0000000000..e236b30c0c
--- /dev/null
+++ b/support/ltxdiff/ltxdiff.sty
@@ -0,0 +1,88 @@
+%% These are example implementations. It is highly recommended to
+%% change them to ones that reflect your own needs and taste
+%% (my own versions of them wouldn't have been appropriate since they
+%% use commands defined in my own packages)
+%%1. Commands used to show additions/deletions:
+%% \diffadd{}
+%% 1st argument: text to mark as added
+%% \diffdel{}
+%% 1st argument: text to mark as deleted
+%%2. Environments used to show added/deleted files:
+%% \begin{diffnewfile}
+%% \end{diffnewfile}
+%% \begin{diffdelfile}
+%% \end{diffdelfile}
+\ProvidesFile{ltxdiff.sty}[2005/02/10. macros used by ltxdiff to mark changes]
+\RequirePackage{color,ulem,rotating,eso-pic}
+%% needs color.sty and ulem.sty
+%% Text that was added since last time is marked with this macro
+%% by the diff program
+%% #1 is the text
+\newcommand\diffadd[1]{%
+ {%
+ \renewcommand\ULthickness{1.25pt}%
+ \textcolor{blue}{
+ \uline{
+ #1
+ }%
+ }%
+ }%
+}
+%% needs color.sty and ulem.sty
+%% Text that was deleted since last time is marked with this macro
+%% by the diff program
+%% #1 is the text
+\newcommand\diffdel[1]{%
+ {%
+ \renewcommand\ULthickness{1.25pt}%
+ \textcolor{red}{
+ \uwave{
+ #1
+ }%
+ }%
+ }%
+}
+%% needs color.sty, eso-pic.sty and rotating.sty
+%% Files that were added since last time are marked with this macro
+%% by the diff program
+\newenvironment{diffnewfile}{%
+ \AddToShipoutPicture{%
+ \AtTextCenter{%
+ \makebox(0,0)[c]{%
+ \color{red}%
+ \resizebox{\textwidth}{!}{%
+ \rotatebox{45}{%
+ {%
+ \textbf ADDED FILE!%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+}{%
+ \clearpage%
+ \ClearShipoutPicture%
+}
+%% needs color.sty, eso-pic.sty and rotating.sty
+%% Files that were deleted since last time are marked with this macro
+%% by the diff program
+\newenvironment{diffdelfile}{%
+ \AddToShipoutPicture{%
+ \AtTextCenter{%
+ \makebox(0,0)[c]{%
+ \color{red}%
+ \resizebox{\textwidth}{!}{%
+ \rotatebox{45}{%
+ {%
+ \textbf DELETED FILE!%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+}{%
+ \clearpage%
+ \ClearShipoutPicture%
+}