summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tlc-article
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/tlc-article
Initial commit
Diffstat (limited to 'macros/latex/contrib/tlc-article')
-rw-r--r--macros/latex/contrib/tlc-article/LICENSE29
-rw-r--r--macros/latex/contrib/tlc-article/README.md26
-rwxr-xr-xmacros/latex/contrib/tlc-article/bin/deploy19
-rw-r--r--macros/latex/contrib/tlc-article/data/additional-layout.tex65
-rw-r--r--macros/latex/contrib/tlc-article/data/logo.pngbin0 -> 6798 bytes
-rw-r--r--macros/latex/contrib/tlc-article/data/required-packages.csv34
-rw-r--r--macros/latex/contrib/tlc-article/data/version.csv2
-rw-r--r--macros/latex/contrib/tlc-article/doc/tlc-article.pdfbin0 -> 335142 bytes
-rw-r--r--macros/latex/contrib/tlc-article/images/titlepage.pngbin0 -> 98366 bytes
-rw-r--r--macros/latex/contrib/tlc-article/tlc-article.cls321
-rw-r--r--macros/latex/contrib/tlc-article/tlc-article.tex385
-rw-r--r--macros/latex/contrib/tlc-article/tlc-article.texx1
12 files changed, 882 insertions, 0 deletions
diff --git a/macros/latex/contrib/tlc-article/LICENSE b/macros/latex/contrib/tlc-article/LICENSE
new file mode 100644
index 0000000000..fe07a66b52
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Gary Allan Howard
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/macros/latex/contrib/tlc-article/README.md b/macros/latex/contrib/tlc-article/README.md
new file mode 100644
index 0000000000..b8b928f0ed
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/README.md
@@ -0,0 +1,26 @@
+[tlc-article](data/logo.png)
+
+---
+The goal of **tlc-article** is to simplify document layout. **tlc-article**
+orchestrates a logical arrangement for document header, footer, author,
+abstract, table of contents, and margins.
+[tlc-article.pdf](doc/tlc-article.pdf) is a document instantiated
+using **tlc-article.cls**.
+
+## Installation are done Locally or Globally
+### Local Installation
+```bash
+cd $HOME
+git clone git@github.com:Traap/tlc-article.git
+cd tlc-article
+cp -v tlc-article.cls $HOME/mydoc
+cp -v tlc-article.cls $HOME/mydoc/.
+```
+
+### Global Installation
+```bash
+cd $HOME
+git clone git@github.com:Traap/tlc-article.git
+cd tlc-article
+./bin/distribute tlc-article.cls
+```
diff --git a/macros/latex/contrib/tlc-article/bin/deploy b/macros/latex/contrib/tlc-article/bin/deploy
new file mode 100755
index 0000000000..ee54d61ae1
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/bin/deploy
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Deploy a new LaTeX style or package.
+#
+# Usage:
+# deploy tlc-article.cls
+#
+# Note:
+# I use this script to test my deployment before publishing with CTAN.
+# ------------------------------------------------------------------------------
+main() {
+ mkdir -vp $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/${1%.}
+ cp -v $1 $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/${1%.}/.
+ mktexlsr $(kpsewhich -var-value TEXMFLOCAL)
+}
+
+# ------------------------------------------------------------------------------
+# Kick start start this script.
+# ------------------------------------------------------------------------------
+main $@
diff --git a/macros/latex/contrib/tlc-article/data/additional-layout.tex b/macros/latex/contrib/tlc-article/data/additional-layout.tex
new file mode 100644
index 0000000000..9ca4c344be
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/data/additional-layout.tex
@@ -0,0 +1,65 @@
+% This use case demonstrates tlc-article being extended. All definitions are
+% process during preamble phase. In other words, before your \begin{document}
+% statement.
+
+% ------------------------------------------------------------------------------
+% \makeatletter is used so we can reference commands and definitions defined by
+% tlc-article, which are all prefaced with tlc@.
+\makeatletter
+
+% ------------------------------------------------------------------------------
+% tlc-article.tex (Getting Starting) definitions.
+
+\def\tlcProduct{tlc-article}%
+
+\def\tlcA{\tlcDarkblue{\tlcProduct}}%
+
+\def\tlcAL{\tlcDarkblue{\tlc@additionalLayout}}%
+\def\tlcBL{\tlcDarkblue{tlcBeginLandscape}}%
+\def\tlcDB{\tlcDarkblue{tlcDarkblue}}%
+\def\tlcEL{\tlcDarkblue{tlcEndLandScape}}%
+\def\tlcHF{\tlcDarkblue{\tlc@headerFooter}}%
+\def\tlcLG{\tlcDarkblue{\tlc@logoFile}}%
+\def\tlcNCT{newcolumn type: \tlcDarkblue{L, C} \& \tlcDarkblue{R}}%
+\def\tlcTOC{\tlcDarkblue{tlcTitlePageAndTableOfContents}}%
+\def\tlcVE{\tlcDarkblue{\tlc@versionFile}}%
+
+\def\tlcVC{\tlcDarkblue{tlc@version}}%
+\def\tlcDC{\tlcDarkblue{tlc@date}}%
+\def\tlcSC{\tlcDarkblue{tlc@status}}%
+\def\tlcIC{\tlcDarkblue{tlc@instatution}}%
+\def\tlcPC{\tlcDarkblue{tlc@permission}}%
+
+\def\kpse{\$(kpsewhich -var-value TEXMFLOCAL)}%
+\def\texDist{\kpse}%
+\def\tlcDist{/tex/latex/\tlcProduct}%
+\def\tlcGlobalDist{\texDist\tlcDist}%
+
+\def\tlcHome{\$HOME}%
+\def\tlcMyDoc{\tlcHome/mydoc}%
+
+\def\gitHub{GitHub.com}%
+\def\gitHubUrl{http://\gitHub}%
+
+\def\tlcRepo{git@\gitHub:Traap/\tlcProduct.git}%
+
+\def\tlcPkgFile{data/required-packages.csv}%
+\def\tlcNote{\tlcDarkblue{Note}}%
+
+% ------------------------------------------------------------------------------%
+% Define the column names used by csvreader when reading \packageFile.
+\csvnames{tlcPkgNames}{
+ 1=\name
+ ,2=\description
+}
+
+% Define the table style used to report the required package names and
+% descriptions.
+\csvstyle{tlcPkgStyle}{
+ longtable=|L{3cm}|L{12cm}|
+ ,table head=\hline Name & Description\\\hline\hline\endhead
+ ,late after line=\\\hline
+ ,tlcPkgNames
+}
+
+% ------------------------------------------------------------------------------%
diff --git a/macros/latex/contrib/tlc-article/data/logo.png b/macros/latex/contrib/tlc-article/data/logo.png
new file mode 100644
index 0000000000..769c5e1a0b
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/data/logo.png
Binary files differ
diff --git a/macros/latex/contrib/tlc-article/data/required-packages.csv b/macros/latex/contrib/tlc-article/data/required-packages.csv
new file mode 100644
index 0000000000..4c63b74562
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/data/required-packages.csv
@@ -0,0 +1,34 @@
+name | description
+appendix | The appendix package provides various ways of formatting the titles of appendices. Also (sub)appendices environments are provided that can be used, for example, for per chapter/section appendices.
+array | An extended implementation of the array and tabular environments which extends the options for column formats, and provides `programmable' format specifications.
+csvsimple | The package provides a simple \LaTeX\ interface for the processing of files with comma separated values (CSV); it relies on the key value syntax supported by pgfkeys to simplify usage.
+enumitem | This package provides user control over the layout of the three basic list environments: enumerate, itemize and description.
+fancyhdr | The package provides extensive facilities, both for constructing headers and footers, and for controlling their use (for example, at times when \LaTeX\ would automatically change the heading style in use).
+fontenc | The package allows the user to select font encodings, and for each encoding provides an interface to `font-encoding specific' commands for each font.
+fontenc | The package alows the user to select font encodings, and for each encoding provides an interface to `font-encoding specific' commands for each font.
+geometry | The package provides an easy and flexible user interface to customize page layout, implementing auto-centering and auto-balancing mechanisms so that the users have only to give the least description for the page layout.
+geometry | The package provides an easy and flexible user interface to customize page layout, implementing autocentering and auto-balancing mechanisms so that the users have only to give the least description for the page layout.
+glossaries | The glossaries package supports acronyms and multiple glossaries, and has provision for operation in several languages.
+graphicx | The package builds upon the graphics package, providing a key-value interface for optional arguments to the `includegraphics' command. This interface provides facilities that go far beyond what the graphics package offers on its own.
+hyperref | The hyperref package is used to handle cross-referencing commands in \LaTeX\ to produce hypertext links in the document.
+hyperref | The package is used to handle cross-referencing commands in \LaTeX\ to produce hypertext links in the document.
+inputenc | The package translates various standard and other input encodings into a \LaTeX\ internal language. The internal langage is expressed entierly in \TeX\'s base encoding (standard ASCII printable characters, carriage control tokes and \TeX\ control sequences, the later mostly defined by \LaTeX).
+inputenc | The package translates various standard and other input encodings into a \LaTeX\ internal language. The internal language is expressed entirely in \TeX\'s base encoding (standard ASCII printable characters, carriage control tokens and \TeX\ control sequences, the latter mostly defined by \LaTeX).
+jancyhdr | The package provides extensive facilities, both for constructing headers and footers, and for controlling their use (for example, at times when \LaTeX\ would automatically change the heading style in use).
+lastpage | Reference the number of pages in your \LaTeX\ document through the introduction of a new label which can be referenced like `gpageref{LastPage}' to give a reference to the last page of a document.
+listings | The package enables the user to typeset programs (programming code) within \LaTeX; the source code is read directly by \TeX\ -- no frontend processor is needed.
+lmodern | Latin modern fonts
+longtable | Longtable allows you to write tables that continue to the next page. You can write captions within the table (typically at the start of the table), and headers and trailers for pages of table.
+makecell | This package supports common layouts for tabular column heads in whole documents, based on one-column tabular environment.
+multicol | Multicol defines a multicols environment which typesets text in multiple columns (up to a maximum of 10), and (by default) balances the end of each column at the end of the environment.
+parskip | Simply changing `gparskip' and `parindent' leaves a layout that is untidy; this package (though it is no substitute for a properly-designed class) helps alleviate this untidiness.
+pdflscape | The package adds PDF support to the landscape environment of package lscape, by setting the PDF /Rotate page attribute.
+pdfpages | This package simplifies the inclusion of external multipage PDF documents in \LaTeX\ documents.
+pdf-pie | Ths package provides the means to draw pie (and variant charts) using PGF/TikZ.
+spverbatim | The spverbatim package provides an `gspverb' macro that is analogous to 'verb' and an spverbatim environment that is analogous to verbatim with the difference being that `spverb' and spverbatim allow \LaTeX\ to break lines at space characters.
+tabularx | The package defines an environment tabularx, an extension of tabular which has an additional column designator, X, which creates a paragraph-like column whose width automatically expands so that the declared width of the environment is filled.
+textcomp | The package supports the Text Companion fonts, which provide many text symbols (such as baht, bullet, copyright, musicalnote, onequarter, section, and yen), in the TS1 encoding.
+titling | The titling package provides control over the typesetting of the `gmaketitle' command and `thanks' commands, and makes the `title', `author' and `date' information permanently available.
+tocloft | Provides control over the typography of the Table of Contents, List of Figures and List of Tables, and the ability to create new `List of ...'. The ToC `gparskip' may be changed.
+todonotes | The package lets the user mark things to do later, in a simple and visually appealing way. The package takes several options to enable customization / fine-tuning of the visual appearance.
+xcolor | The package starts from the basic facilities of the color package, and provides easy driver-independent access to several kinds of color tints, shades, tones, and mixes of arbitrary colors.
diff --git a/macros/latex/contrib/tlc-article/data/version.csv b/macros/latex/contrib/tlc-article/data/version.csv
new file mode 100644
index 0000000000..f338309816
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/data/version.csv
@@ -0,0 +1,2 @@
+version | date | status | institution | permission
+v1.0.17 | June 20th, 2019 | Released | Traap | BSD-3-Clause
diff --git a/macros/latex/contrib/tlc-article/doc/tlc-article.pdf b/macros/latex/contrib/tlc-article/doc/tlc-article.pdf
new file mode 100644
index 0000000000..97b3bd5fdf
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/doc/tlc-article.pdf
Binary files differ
diff --git a/macros/latex/contrib/tlc-article/images/titlepage.png b/macros/latex/contrib/tlc-article/images/titlepage.png
new file mode 100644
index 0000000000..e5f9f84bc2
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/images/titlepage.png
Binary files differ
diff --git a/macros/latex/contrib/tlc-article/tlc-article.cls b/macros/latex/contrib/tlc-article/tlc-article.cls
new file mode 100644
index 0000000000..56fbc27688
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/tlc-article.cls
@@ -0,0 +1,321 @@
+% ------------------------------------------------------------------------------
+% Class:
+% tlc-article
+%
+% Purpose:
+% This LaTeX class provides an article implementation that standardizes
+% a document layout intended for formal documents.
+% ------------------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}%
+\ProvidesClass{tlc-article}[2019/06/20 v1.0.17 Traap LaTeX Class Article]%
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}%
+\ProcessOptions%
+
+\LoadClass{article}%
+
+% ------------------------------------------------------------------------------
+% Page layout
+% \RequirePackage{parskip}% Blank line after section break.
+\RequirePackage[a4paper,top=1.0in,bottom=1.0in,left=1.0in,right=1.0in]{geometry}%
+\RequirePackage{multicol}%
+% \setlength{\parskip}{0.5em}%
+
+% ------------------------------------------------------------------------------
+% Required parts to use glossaries must come first.
+\RequirePackage{lmodern}%
+\RequirePackage[T1]{fontenc}%
+\RequirePackage{textcomp}%
+\RequirePackage[utf8]{inputenc}%
+\RequirePackage[colorlinks]{hyperref}%
+\RequirePackage{bookmark}%
+% ------------------------------------------------------------------------------
+% Define glossaries.
+\RequirePackage[acronym, % create 'acronym' glossary type,
+ nopostdot, %
+ nonumberlist, %
+ style=altlist,% use altlist style
+ toc, % add the gloassary to the table of contents.
+ ]{glossaries}%
+
+% ------------------------------------------------------------------------------
+% Color, Graphics and links.
+\RequirePackage{graphicx}%
+\RequirePackage[table]{xcolor}%
+\definecolor{darkblue}{rgb}{0,0,0.5}%
+
+% ------------------------------------------------------------------------------
+% Listings and verbatim
+\RequirePackage{listings}%
+\RequirePackage{spverbatim}%
+
+% ------------------------------------------------------------------------------
+% Arrays, list and tables
+\RequirePackage{array}%
+\RequirePackage{csvsimple}%
+\RequirePackage{enumitem}%
+\RequirePackage{longtable}%
+\RequirePackage{makecell}%
+\RequirePackage{tabularx}%
+\setlength{\parindent}{0pt}%
+
+% ------------------------------------------------------------------------------
+% pdf
+\RequirePackage{pdflscape}%
+\RequirePackage{pdfpages}%
+
+% ------------------------------------------------------------------------------
+% Misc
+\RequirePackage[toc,page]{appendix}%
+\RequirePackage{todonotes}%
+
+% ------------------------------------------------------------------------------
+% This function is used to simplify making textcolor darkblue.
+\newcommand{\tlcDarkblue}[1]{\textcolor{darkblue}{#1}}%
+
+% ------------------------------------------------------------------------------
+% Define the optional input files.
+\def\tlc@location{data}%
+\def\tlc@logoFile{\tlc@location/logo.png}%
+\def\tlc@versionFile{\tlc@location/version.csv}%
+\def\tlc@additionalLayout{\tlc@location/additional-layout.tex}%
+\def\tlc@headerFooter{\tlc@location/header-footer.tex}%
+
+% New column types: L, C, and R are Left, Center, and Right, respectively are
+% designed to use with longtable. Data is wrapped within a table cell. The
+% parameter defines the column width. As an example, L{2cm} yields a Left
+% aligned, ragged right, wrapped text within a 2cm wide cell.
+\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash}p{#1}}%
+\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash}p{#1}}%
+\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash}p{#1}}%
+
+% ------------------------------------------------------------------------------
+% We define colors that we would like to use throughout our documents.
+\definecolor{codegreen}{rgb}{0,0.6,0}%
+\definecolor{codegray}{rgb}{0.5,0.5,0.5}%
+\definecolor{codepurple}{rgb}{0.58,0,0.82}%
+\definecolor{backcolour}{rgb}{0.95,0.95,0.92}%
+
+% ------------------------------------------------------------------------------
+% tlcBeginLandscape and tlcEndLandscape are two new commands used to simplify
+% setting page orientation to landscape and consistently setting margins.
+\newcommand{\tlcBeginLandscape}{%
+ \begin{landscape}%
+ \newgeometry{top=1in, bottom=1in,left=1in,right=1in}%
+}%
+\newcommand{\tlcEndLandscape}{%
+ \restoregeometry%
+ \end{landscape}%
+}%
+
+% ------------------------------------------------------------------------------
+% We want our table of contents to use dots as a leader.
+\RequirePackage{tocloft}%
+\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}%
+
+% ------------------------------------------------------------------------------
+% We want to allow the calling document to setup additional layout.
+\IfFileExists{\tlc@additionalLayout}%
+ {\input{\tlc@additionalLayout}}%
+ {}%
+
+% ------------------------------------------------------------------------------
+% Create a beautiful document header and document footer using the packages
+% listed below.
+\RequirePackage{fancyhdr} % Page layout in \LaTeX
+\RequirePackage{titling} % Control over \maketitle & \thanks
+\RequirePackage{lastpage} % Page n of m
+\pagestyle{fancy} % fancy page style
+
+% ------------------------------------------------------------------------------
+% Extract document status, document date and document version from
+% \tlc@versionFile.
+% Argument:
+% 1 - the column name to extract from the data file.
+\newcommand{\tlcVersionPart}[1]{%
+ \csvreader[separator=pipe]%
+ {\tlc@versionFile}{%
+ 1=\version,%
+ 2=\date,%
+ 3=\status,%
+ 4=\institution,%
+ 5=\permission%
+ }{#1}%
+}%
+
+% ------------------------------------------------------------------------------
+% Define extractions macros when \tlc@versionFile exists.
+\IfFileExists{\tlc@versionFile}%
+{%
+ \def\tlc@version{\tlcVersionPart{\version}}%
+ \def\tlc@date{\tlcVersionPart{\date}}%
+ \def\tlc@status{\tlcVersionPart{\status}}%
+ \def\tlc@institution{\tlcVersionPart{\institution}}%
+ \def\tlc@permission{\tlcVersionPart{\permission}}%
+}%
+{% Else: no operation because tlc@versionFile does not exist.
+}%
+
+% ------------------------------------------------------------------------------
+% We want to allow the calling document to override the headers and footers that
+% we are defining.
+\IfFileExists{\tlc@headerFooter}%
+{ % use the customer header and footer defined by \tlc@headerfooter
+ \input{\tlc@headerFooter}%
+}%
+{ % Else : header and footer applied to all pages.
+ \IfFileExists{\tlc@logoFile}%
+ { % Typeset the logo in the left side of the document header.
+ \lhead{\includegraphics[width=3cm,height=1cm]{\tlc@logoFile}}%
+ }%
+ {% Else: no operation because tlc@logoFile does not exist.
+ }%
+ %
+ % Typeset the title in the center of the document header.
+ %
+ \chead{\large{\thetitle}}%
+ %
+ % Typeset version information in the right side of the document header.
+ %
+ \IfFileExists{\tlc@versionFile}%
+ {%
+ % document status, document date and document version.
+ \rhead{\tiny \tlc@status \\ \tlc@date \\ \tlc@version}%
+ % document owner. This maybe a person or company name.
+ \lfoot{\tiny \tlc@institution}%
+ % document license. This maybe a license or word like confidential.
+ \cfoot{\tiny \tlc@permission}%
+ }%
+ {% Else: no operation because tlc@versionFile does not exist.
+ }%
+ \renewcommand{\headrulewidth}{0.1pt}%
+ %
+ % Eliminate head height too small warning, which is occurring because
+ % we are using multiple lines in our header.
+ \setlength\headheight{34.0pt}%
+ % footer applied to all pages.
+ \rfoot{\tiny{Page \thepage~of~\pageref{LastPage}}}%
+ \renewcommand{\footrulewidth}{0.1pt}%
+}%
+
+% ------------------------------------------------------------------------------
+% We want our header and footer to remain consistent with a table of
+% contents that span multiple pages.
+\AtBeginDocument{\addtocontents{toc}{\protect\thispagestyle{fancy}}}%
+
+% ------------------------------------------------------------------------------
+% We define colors that are used throughout the document.
+\definecolor{darkblue}{rgb}{0,0,0.5}%
+\hypersetup{%
+ bookmarksopen = true,%
+ citebordercolor = white!100,%
+ citecolor = darkblue,%
+ filebordercolor = white!100,%
+ filecolor = darkblue ,%
+ linkbordercolor = white!100,%
+ linkcolor = darkblue,%
+ linktoc = all,%
+ menubordercolor = white!100,%
+ pdfauthor = {},%
+ pdfborder = {0 0 0 [0 0]},%
+ pdfkeywords = {},%
+ pdfstartview = FitH,%
+ pdfsubject = {},%
+ pdftitle = {},%
+ runbordercolor = white!100,%
+ urlbordercolor = white!100,%
+ urlcolor = darkblue%
+}%
+
+% ------------------------------------------------------------------------------
+% We define colors that are used when includeing code files (software).
+\lstdefinestyle{tlcStyle}{%
+ backgroundcolor=\color{backcolour},%
+ commentstyle=\color{codegreen},%
+ keywordstyle=\color{magenta},%
+ numberstyle=\tiny\color{codegray},%
+ stringstyle=\color{codepurple},%
+ basicstyle=\footnotesize,%
+ breakatwhitespace=false,%
+ breaklines=true,%
+ captionpos=b,%
+ keepspaces=true,%
+ numbers=left,%
+ numbersep=4pt,%
+ showspaces=false,%
+ showstringspaces=false,%
+ showtabs=false,%
+ tabsize=2%
+}%
+\lstset{style=tlcStyle}%
+
+% ------------------------------------------------------------------------------
+% End Row : Generally applied to the end of a table row.
+\newcommand{\ER}{\\ \hline}%
+
+% ------------------------------------------------------------------------------
+% Default vertical space
+\newcommand{\tlcVspace}{\vspace{3mm}}%
+
+% ------------------------------------------------------------------------------
+% Macro to include a file if it exists.
+% 1 = the file path to input
+\newcommand{\inputIfExists}[1]{\IfFileExists{#1}{\input{#1}}{}}%
+
+% ------------------------------------------------------------------------------
+% Each document uses the same author name, title page and table of contents.
+% Arguments:
+% 1 - the title
+% 2 - the author
+% 3 - the abstract
+\newcommand{\tlcTitlePageAndTableOfContents}[3]{%
+ \title{#1}%
+ \author{#2}%
+ \maketitle%
+ \begin{abstract}#3\end{abstract}%
+ \tableofcontents%
+ \thispagestyle{fancy}%
+ \clearpage%
+}%
+
+% ------------------------------------------------------------------------------
+% We define tlcDebug to aid our users when they are debugging their document.
+% tlcDebug should be placed at the end of your document to allow LaTeX to
+% fully expand all macros and definitions.
+\newcommand{\tlcIsDefined}[1]%
+{\IfFileExists{#1}%
+ {\textcolor{green}{DEFINED}}%
+ {\textcolor{red}{NOT DEFINED}}%
+}%
+\newcommand{\tlcDebug}{%
+ \clearpage%
+ \section{tlc-article Debug}%
+ \subsection{tlc-article default files}%
+ \begin{description}[align=right,leftmargin=*,labelindent=5cm]%
+ \item[tlc@location:]\tlc@location%
+ \item[tlc@additionalLayout:]\tlc@additionalLayout%
+ \item[tlc@headerFooter:]\tlc@headerFooter%
+ \item[tlc@versionFile:]\tlc@versionFile%
+ \item[tlc@logoFile:]\tlc@logoFile%
+ \item[tlc@versionFile:]\tlc@versionFile%
+ \end{description}%
+ %
+ \subsection{tlc-article file hooks}%
+ \begin{description}[align=right,leftmargin=*,labelindent=5cm]%
+ \item [tlc@additionalLayout:]\tlcIsDefined{\tlc@additionalLayout}%
+ \item [tlc@headerFooter:]\tlcIsDefined{\tlc@headerFooter}%
+ \item [tlc@logoFile:]\tlcIsDefined{\tlc@logoFile}%
+ \item [tlc@versionFile:]\tlcIsDefined{\tlc@versionFile}%
+ \end{description}%
+ %
+ \subsection{tlc-article header and footer hooks}%
+ \begin{description}[align=right,leftmargin=*,labelindent=5cm]%
+ \item[tlc@version:] \tlc@version%
+ \item[tlc@date:] \tlc@date%
+ \item[tlc@status:] \tlc@status%
+ \item[tlc@institution:] \tlc@institution%
+ \item[tlc@permission:] \tlc@permission%
+ \end{description}%
+}%
+% ------------------------------------------------------------------------------
+\endinput%
diff --git a/macros/latex/contrib/tlc-article/tlc-article.tex b/macros/latex/contrib/tlc-article/tlc-article.tex
new file mode 100644
index 0000000000..dae2f37ab4
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/tlc-article.tex
@@ -0,0 +1,385 @@
+\documentclass[12pt]{tlc-article}
+
+% ------------------------------------------------------------------------------
+\begin{document}
+
+% ------------------------------------------------------------------------------
+\tlcTitlePageAndTableOfContents
+ {tlc-article}
+ {Gary Allan Howard}
+ {The \tlcA\ `Getting Started Guide' covers how to install \tlcA\ both globally
+ and locally, describes the general use case, how to customize your \tlcA\
+ environment, describes the commands \tlcA\ implements, and reveals the
+ packages \tlcA\ depends upon.}
+
+% ------------------------------------------------------------------------------
+\section{Installation}
+This section describes how to install \tlcA\ either globally to make it
+available to your \LaTeX\ environment or locally to the document you are
+authoring. And, this section identifies the prerequisites you must meet in
+order to clone a repository from GitHub.com and install software on your
+computer.
+
+% ------------------------------------------------------------------------------
+\subsection{Prerequisites}
+The following prerequisites are needed.
+\begin{description}[style=nextline]
+ \item[Administrative privilege] You will need administrative privileges to
+ install \tlcA\ globally because `sudo' is used.
+
+ \item[SSH key] You will need your private key to access \gitHub. Please refer
+ to \url{http://help.github.com/articles/generating-an-ssh-key} for
+ instructions on `Generating an SSH key'.
+
+ \item[Enable your SSH key] The following instructions enable your SSH key so
+ you to not have to enter the passphrase for each git command.
+\end{description}
+
+\begin{lstlisting}[language=bash]
+eval \$(ssh-agent -s)
+ssh-add ~/.ssh/your-private-key
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\subsection{Local installation}
+A local installation is done by installing \tlcA\ into
+/the/path/to/your/document. Assuming your document is located at \tlcMyDoc\ the
+following shell commands will make \tlcA\ available to your document.
+
+\begin{lstlisting}[language=bash]
+cd $HOME
+git clone git@GitHub.com:Traap/tlc-article.git
+cd tlc-article
+mkdir $HOME/mydoc
+cp -v tlc-article.cls $HOME/mydoc/.
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\clearpage
+\subsection{Global installation}
+A global installation is done by installing \tlcA\ into your /path/to/your/texmf
+directory. Assuming a TexLive installation exists at \texDist\ the following
+shell commands will make \tlcA\ available to your \LaTeX\ environment.
+
+\begin{lstlisting}[language=bash]
+cd $HOME
+git clone git@GitHub.com:Traap/tlc-article.git
+cd tlc-article
+sudo mkdir -p $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/tlc-article
+sudo cp -v tlc-article.cls $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/tlc-article/.
+sudo mktexlsr $(kpsewhich -var-value TEXMFLOCAL)
+\end{lstlisting}
+
+\bigskip
+
+\todo[inline]{%
+ \tlcNote: You may remove your local installation by removing \tlcA.%
+}%
+
+% ------------------------------------------------------------------------------
+\clearpage
+\section{General Use Case}
+The goal of \tlcA\ is to simplify document layout. \tlcA\ orchestrates a
+logical arrangement for document header, footer, author, abstract, table of
+contents, and margins. The following sections outline the default
+implementation for each part \tlcA\ organizes.
+
+\tlcNote\ This document was typeset using the instructions provided throughout
+this section.
+
+\subsection{Document Layout}
+\begin{figure}[h]
+ \centering
+ \includegraphics{images/titlepage.png}
+ \caption{Document Layout}
+ \label{fig:layout}
+\end{figure}
+
+% ------------------------------------------------------------------------------
+\subsection{documentclass \tlcA}
+\tlcA\ extends the article document class. \tlcA\ provide options directly to
+the article document class. As an example, the Author can specify the font as
+follows:
+
+\begin{lstlisting}[basicstyle=\tiny]
+ \documentclass[12pt]{tlc-article}
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\subsection{Title, Author \& Abstract} \label{sec:TAA}
+\tlcA\ has a macro \tlcTOC\ that can be used to set the document title, document
+author, document abstract, and establish the Table of Contents. The sample
+below reveals how to use \tlcTOC.
+
+\begin{lstlisting}[basicstyle=\tiny]
+ \tlcTitlePageAndTableOfContents
+ {Document Title}
+ {Document Article}
+ {Document Abstract}
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\subsection{Table of Contents}
+The Table of Contents immediately follows the document abstract on page 1, uses
+dark blue for content, dots separate table of contents sections and page number,
+and uses roman numerals.
+
+% ------------------------------------------------------------------------------
+\subsection{Header \& Footer}
+fancyhdr is used to render the header and footer. The Author can override the
+\tlcA\ by providing an implementation in \tlcHF\, or augment \tlcA\
+application by providing \tlcVE. The sections below show the placement \tlcA\
+uses when writing objects, and where the objects are defined.
+
+\bigskip
+
+\todo[inline]{%
+ \tlcNote: \tlcA\ ignores \tlcVE\ when \tlcHF\ is defined.
+}%
+
+
+
+% ------------------------------------------------------------------------------
+\subsubsection*{Header}
+\begin{description}
+ \item[lhead] When \tlcLG\ is found, logo.
+ \item[chead] Document Title
+ \item[rhead] When \tlcVE\ is present, status, date, and version columns.
+\end{description}
+
+% ------------------------------------------------------------------------------
+\subsubsection*{Footer}
+\begin{description}
+ \item[lfoot] When \tlcVE\ is present, institution column.
+ \item[cfoot] When \tlcVE\ is present, permission column.
+ \item[rfoot] Page 1 of N.
+\end{description}
+
+% ------------------------------------------------------------------------------
+\subsubsection*{Rule width}
+A 0.1pt rule width is placed below the document header and above the document
+footer.
+
+% ------------------------------------------------------------------------------
+\clearpage
+\section{Customization}
+This section describes how \tlcA\ can be customized by using the file-hooks
+\tlcA\ check for. \tlcA\ default implementation will be used when the
+file-hooks are not found.
+
+\bigskip
+
+\todo[inline]{%
+ \tlcNote: \tlcA\ consumes \tlcAL\ \& \tlcHF\ during the preamble compilation
+ phase.
+}%
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcAL}
+\tlcA\ will use whatever \LaTeX\ definitions are found in \tlcAL\ when it
+exists. The file-check is shown
+below:
+
+\begin{lstlisting}[basicstyle=\tiny]
+ \IfFileExists{data/additional-layout.tex}
+ {\input{data/additional-layout.tex}}
+ {}
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcHF}
+In the absence of \tlcAL\, \tlcA\ has a builtin header and footer strategy that
+is base on \textit{fancyhdr}, \textit{titling}, and \textit{lastpage} \LaTeX\
+packages. The default implementation is show below:
+
+\begin{lstlisting}[basicstyle=\tiny]
+\IfFileExists{\tlc@headerFooter}%
+{ % use the customer header and footer defined by \tlc@headerfooter
+ \input{\tlc@headerFooter}%
+}%
+{ % Else : header and footer applied to all pages.
+ \IfFileExists{\tlc@logoFile}%
+ { % Typeset the logo in the left side of the document header.
+ \lhead{\includegraphics[width=3cm,height=1cm]{\tlc@logoFile}}%
+ }%
+ {% Else: no operation because tlc@logoFile does not exist.
+ }%
+ %
+ % Typeset the title in the center of the document header.
+ %
+ \chead{\large{\thetitle}}%
+ %
+ % Typeset version information in the right side of the document header.
+ %
+ \IfFileExists{\tlc@versionFile}%
+ {%
+ % document status, document date and document version.
+ \rhead{\tiny \tlc@status \\ \tlc@date \\ \tlc@version}%
+ % document owner. This maybe a person or company name.
+ \lfoot{\tiny \tlc@institution}%
+ % document license. This maybe a license or word like confidential.
+ \cfoot{\tiny \tlc@permission}%
+ }%
+ {% Else: no operation because tlc@versionFile does not exist.
+ }%
+ \renewcommand{\headrulewidth}{0.1pt}%
+ % Eliminate head height too small warning, which is occurring because
+ % we are using multiple lines in our header.
+ \setlength\headheight{34.0pt}%
+ % footer applied to all pages.
+ \rfoot{\tiny{Page \thepage~of~\pageref{LastPage}}}%
+ \renewcommand{\footrulewidth}{0.1pt}%
+}%
+\end{lstlisting}
+
+The default implementation can be overridden by defining \tlcHF.
+
+\tlcVspace
+
+\todo[inline]{%
+ \tlcNote: When \tlcHF\ exists and is empty, your document will be typeset with
+ the defaults from document-class \tlcDarkblue{article}.
+}%
+
+% ------------------------------------------------------------------------------
+\clearpage
+\subsection{\tlcVE} \label{sec:version}
+\tlcA\ will populate the builtin header and footer with information extracted
+from \tlcVE\ when it is present. \tlcVE\ is a comma-separated-variable file
+that uses the pipe character as the field delimiter. \tlcVE\ uses the following
+column names:
+
+\begin{description}[style=nextline]
+ \item[version] The version value is typeset in the rhead area. This field is
+ used to convey the version the document was at the date it reached its
+ current state.
+
+ \item[date] The date value is typeset in the rhead area. This field is used
+ to communicate when the document transitioned into its current state.
+
+ \item[status] The status value is typeset in the rhead area. This field is
+ used to convey the document state such as Approved, Draft, Effective, or
+ Obsolete.
+
+ \item[instatution] The institution value is typeset in the lfoot area. This
+ field is used to tell the reader the author name or company name.
+
+ \item[permission] The permission value is typeset in the cfoot area. This
+ field is used to identify confidentiality or a particular license.
+
+\end{description}
+
+The exaction methods are shown below.
+\begin{lstlisting}[basicstyle=\tiny]
+ % Extract document status, document date and document version from
+ % \tlc@versionFile.
+ % Argument:
+ % 1 - the column name to extract from the data file.
+ \newcommand{\tlcVersionPart}[1]{
+ \csvreader[separator=pipe]
+ {\tlc@versionFile}{
+ 1=\version,
+ 2=\date,
+ 3=\status,
+ 4=\instatution,
+ 5=\permission
+ }{#1}
+ }%
+
+ % Define extractions macros when \tlc@versionFile exists.
+ \IfFileExists{\tlc@versionFile}
+ {
+ \def\tlc@version{\tlcVersionPart{\version}}
+ \def\tlc@date{\tlcVersionPart{\date}}
+ \def\tlc@status{\tlcVersionPart{\status}}
+ \def\tlc@instatution{\tlcVersionPart{\version}}
+ \def\tlc@permission{\tlcVersionPart{\version}}
+ }
+ {% Else: no operation because tlc@versionFile does not exist.
+ }
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcLG}
+\tlcA\ will typeset the lhead area with \tlcLG\ when it is present. Make sure
+your logo's height is not larger than 34pt to avoid `Package Fancyhdr Warning:
+\\headheight is to small' warning.
+
+% ------------------------------------------------------------------------------
+\clearpage
+\section{Definitions \& Commands}
+\subsection{\tlcBL}
+Page layout is rotated 90\textdegree\ clockwise resulting in a landscape page
+orientation. Landscape orientation remains active until \tlcEL.
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcEL}
+Page layout is returned to portrait orientation when \tlcEL\ is reached.
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcDB}
+\tlcDB\ is used throughout this document to render text using rbg\{0,0,0.5\}.
+\tlcDB\ is safe to use within your document.
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcTOC}
+\tlcTOC\ creates the document layout shown in Figure \ref{fig:layout}. Section
+\ref{sec:TAA} shows an example implementation.
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcNCT}
+New \tlcNCT\ are Left, Center, and Right, respectively are
+designed to use with longtable. Data is wrapped within a table cell. The
+parameter defines the column width. As an example, L{2cm} yields a Left
+aligned, ragged right, wrapped text within a 2cm wide cell.
+
+\begin{lstlisting}[basicstyle=\tiny]
+\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash}p{#1}}
+\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash}p{#1}}
+\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash}p{#1}}
+\end{lstlisting}
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcAL}
+\tlcAL\ is an architectural hook the Author should use when it becomes necessary
+to use packages not provided by \tlcA\, and to design commands that are specific
+to your document.
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcHF}
+\tlcHF\ is an architectural hook the Author should use to completely override
+the document layout \tlcA\ implements.
+
+% ------------------------------------------------------------------------------
+\clearpage
+\subsection{\tlcVE}
+\tlcVE\ is by used \tlcA\ to populate the document header \& footer. Refer to
+section \ref{sec:version} for \tlcVE\ definitions. \tlcVE\ is not
+used by \tlcA\ when \tlcHF\ is define. However, you might want to use the
+version hook by defining \tlcVE\ and using the commands below to extract data
+from \tlcVE\ in your \tlcHF.
+\begin{enumerate}
+ \item \tlcVC\
+ \item \tlcDC\
+ \item \tlcSC\
+ \item \tlcIC\
+ \item \tlcPC\
+\end{enumerate}
+
+% ------------------------------------------------------------------------------
+\subsection{\tlcLG}
+\tlcA\ places \tlcLG\ in your header when defined.
+
+% ------------------------------------------------------------------------------
+\clearpage
+\section{Required Packages}
+This section documents the dependencies of the required package tlc-article has.
+Package names are listed in alphabetical order. A complete description of each
+package is found at \url{http://www.ctan.org/}. At this writing, you can type in
+the package name and press the search button to learn more about each package.
+
+% Render pckFile using pckStyle as a longtable.
+\csvreader[tlcPkgStyle, separator=pipe]{\tlcPkgFile}{}{\name & \description}
+% ------------------------------------------------------------------------------
+
+\end{document}
diff --git a/macros/latex/contrib/tlc-article/tlc-article.texx b/macros/latex/contrib/tlc-article/tlc-article.texx
new file mode 100644
index 0000000000..88fdfc34b7
--- /dev/null
+++ b/macros/latex/contrib/tlc-article/tlc-article.texx
@@ -0,0 +1 @@
+\input{tlc-article.tex}