summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tex-label
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 /macros/latex/contrib/tex-label
Initial commit
Diffstat (limited to 'macros/latex/contrib/tex-label')
-rw-r--r--macros/latex/contrib/tex-label/Makefile10
-rw-r--r--macros/latex/contrib/tex-label/README23
-rw-r--r--macros/latex/contrib/tex-label/tex-label-demo.pdfbin0 -> 11625 bytes
-rw-r--r--macros/latex/contrib/tex-label/tex-label-demo.tex27
-rw-r--r--macros/latex/contrib/tex-label/tex-label-doc.pdfbin0 -> 30098 bytes
-rw-r--r--macros/latex/contrib/tex-label/tex-label-doc.tex30
-rw-r--r--macros/latex/contrib/tex-label/tex-label.sty34
7 files changed, 124 insertions, 0 deletions
diff --git a/macros/latex/contrib/tex-label/Makefile b/macros/latex/contrib/tex-label/Makefile
new file mode 100644
index 0000000000..681176d01c
--- /dev/null
+++ b/macros/latex/contrib/tex-label/Makefile
@@ -0,0 +1,10 @@
+.PHONY: demo doc all clean
+
+all: demo doc
+
+demo:
+ latex -output-format=pdf tex-label-demo.tex
+doc:
+ latex -output-format=pdf tex-label-doc.tex
+clean:
+ rm -rf *.aux *~ *.log
diff --git a/macros/latex/contrib/tex-label/README b/macros/latex/contrib/tex-label/README
new file mode 100644
index 0000000000..ce738183a9
--- /dev/null
+++ b/macros/latex/contrib/tex-label/README
@@ -0,0 +1,23 @@
+== About tex-label
+
+This package can be used to label pages of a document just like
+labelling e-mail to classify them. This is useful when you are
+preparing notes and you want to sort through pages quickly looking for
+keywords.
+
+Currently, the labels are displayed at the bottom-right corner of
+pages.
+
+== Setup
+
+Copy tex-label.sty to a place where latex can find it.
+
+$ make doc # To build documentation
+$ make demo # To build usage demo
+
+== Dependencies
+o fancyhdr
+o color
+
+This work (includes all source and derived files in this folder) is
+distributed under LaTex Project Public License.
diff --git a/macros/latex/contrib/tex-label/tex-label-demo.pdf b/macros/latex/contrib/tex-label/tex-label-demo.pdf
new file mode 100644
index 0000000000..f7c8bf2340
--- /dev/null
+++ b/macros/latex/contrib/tex-label/tex-label-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/tex-label/tex-label-demo.tex b/macros/latex/contrib/tex-label/tex-label-demo.tex
new file mode 100644
index 0000000000..b636c686f4
--- /dev/null
+++ b/macros/latex/contrib/tex-label/tex-label-demo.tex
@@ -0,0 +1,27 @@
+\documentclass{article}
+
+
+\usepackage{tex-label}
+
+\begin{document}
+
+\labels{sample page, demo, tex-labels}
+this is a sample page.
+
+this page doesn't contain any useful info.
+just demonstrating use of labels.
+
+\vfil
+\break
+
+\labels{second page, demo, labels}
+
+This is another page with different labels.
+
+\vfill
+\break
+
+If a page starts without any label. It shows last page's labels.
+
+\end{document}
+
diff --git a/macros/latex/contrib/tex-label/tex-label-doc.pdf b/macros/latex/contrib/tex-label/tex-label-doc.pdf
new file mode 100644
index 0000000000..2f035cf388
--- /dev/null
+++ b/macros/latex/contrib/tex-label/tex-label-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/tex-label/tex-label-doc.tex b/macros/latex/contrib/tex-label/tex-label-doc.tex
new file mode 100644
index 0000000000..5ce605d8a7
--- /dev/null
+++ b/macros/latex/contrib/tex-label/tex-label-doc.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+
+\newcommand{\texlabel}{{\em tex-label}}
+\newcommand{\labelscom}{{\em \textbackslash labels}}
+
+\begin{document}
+
+\section{Introduction}
+The \texlabel{} package allows you to label parts of your document
+just like labelling e-mail.
+
+\section{Usage}
+You can use the \labelscom{} command when you want to label some part of
+your document. The labels remain effective until you issue the next
+\labelscom{} command.
+
+\section{Example}
+See tex-label-demo.tex and tex-label-demo.pdf
+
+\section{Customizing}
+You can change the color of label text and label background by
+redefining {\em label-color} and {\em label-bg-color} respectievely.
+
+For ex:- to redefine label text to white use
+
+\begin{verbatim}
+\definecolor{label-color}{rgb}{1,1,1}
+\end{verbatim}
+
+\end{document}
diff --git a/macros/latex/contrib/tex-label/tex-label.sty b/macros/latex/contrib/tex-label/tex-label.sty
new file mode 100644
index 0000000000..d8b10cdcbc
--- /dev/null
+++ b/macros/latex/contrib/tex-label/tex-label.sty
@@ -0,0 +1,34 @@
+%% tex-label.sty
+%% Copyright Balagopal Komarath
+%% <baluks@gmail.com>
+%
+% 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.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Balagopal Komarath.
+%
+% This work consists of the files tex-label.sty, demo.tex, and
+% doc.tex
+
+\ProvidesPackage{tex-label}
+
+\RequirePackage{color}
+\RequirePackage{fancyhdr}
+
+\pagestyle{fancy}
+
+\definecolor{label-bg-color}{rgb}{0.8,0.8,0.8}
+\definecolor{label-color}{rgb}{0,0,0}
+
+\newtoks\labels
+
+\rfoot{\colorbox{label-bg-color}{\color{label-color}\the\labels}}
+
+\endinput