texlive[41643] Master: navydocs (6jul16)

commits+karl at tug.org commits+karl at tug.org
Wed Jul 6 22:32:04 CEST 2016


Revision: 41643
          http://tug.org/svn/texlive?view=revision&revision=41643
Author:   karl
Date:     2016-07-06 22:32:03 +0200 (Wed, 06 Jul 2016)
Log Message:
-----------
navydocs (6jul16)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/navydocs/
    trunk/Master/texmf-dist/doc/latex/navydocs/Makefile
    trunk/Master/texmf-dist/doc/latex/navydocs/README.txt
    trunk/Master/texmf-dist/doc/latex/navydocs/graphics/
    trunk/Master/texmf-dist/doc/latex/navydocs/graphics/navy-logo-102.png
    trunk/Master/texmf-dist/doc/latex/navydocs/navydocs.pdf
    trunk/Master/texmf-dist/doc/latex/navydocs/sampleNavyReport.tex
    trunk/Master/texmf-dist/source/latex/navydocs/
    trunk/Master/texmf-dist/source/latex/navydocs/navydocs.dtx
    trunk/Master/texmf-dist/source/latex/navydocs/navydocs.ins
    trunk/Master/texmf-dist/tex/latex/navydocs/
    trunk/Master/texmf-dist/tex/latex/navydocs/navydocs.sty
    trunk/Master/tlpkg/tlpsrc/navydocs.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/navydocs/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/navydocs/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/navydocs/Makefile	2016-07-06 20:32:03 UTC (rev 41643)
@@ -0,0 +1,95 @@
+PACKAGE = navydocs
+########################################################################
+## LaTeX2e Makefile
+##
+## Update the following defines for your local configuration, 
+##
+CONTRIB   = /usr/share/texmf/tex/latex/misc
+##
+CP        = cp	
+DVIPS     = dvips -t letter
+GZIP      = gzip
+LATEX	  = latex
+MAKEINDEX = makeindex
+PDFLATEX  = pdflatex
+PS2PDF    = ps2pdf
+RM        = rm
+TAR       = tar
+########################################################################
+## make [all]	      Generates the style (.sty) file, the doc and 
+##                      test files (.ps) and cleans up the directory.
+## make [un]install   Install or uninstall the style (.sty) file from 
+##                      the CONTRIB area.
+## make [very]clean   Clean out various auxillary files.  "veryclean"
+##		        cleans out more stuff.
+########################################################################
+## make dvi	      Generate the *.dvi version of the documentation.
+## make [full]ps      Generate the documentation.  The "fullps" version
+##		        adds the change log and the cross-references.
+## make idx	      Generate the change log and the cross-references
+##		        (for fullps -- requires MAKEINDEX).
+## make sty	      Generate the style (.sty) file.
+## make pdf	      Generate the *.pdf version of the documentation.
+########################################################################
+## make test          Runs test program(s).
+## make distribtion   Builds a distribution (.tar.gz) file.
+########################################################################
+
+all:		pdf test clean
+
+install:	sty
+		$(CP) $(PACKAGE).sty $(CONTRIB)
+uninstall:	; -$(RM) -f $(CONTRIB)/$(PACKAGE).sty
+clean:	        ; -$(RM) -f *.dvi *.log *.aux *.lof *.lot *.lom *.toc 
+		-$(RM) -f *.idx *.ind *.glo *.gls *.ilg *.out *~
+veryclean:	clean
+		-$(RM) -f *.sty *.cls *.ps *.pdf *.gz *pk ltxdoc.cfg
+
+dvi:		$(PACKAGE).dvi
+fullps:		dvi idx ps
+idx:		$(PACKAGE).ind $(PACKAGE).gls
+		$(LATEX) $(PACKAGE).dtx
+		$(LATEX) $(PACKAGE).dtx
+ps:		$(PACKAGE).ps
+sty:		$(PACKAGE).sty
+pdf:		fullps
+		$(PS2PDF) $(PACKAGE).ps > $(PACKAGE).pdf
+
+test:		$(PACKAGE).sty
+		$(LATEX) sample298.tex
+		$(LATEX) sample298.tex
+		$(DVIPS) -o sample298.ps sample298.dvi
+
+distribution:	; mkdir $(PACKAGE)
+		$(CP) -p Makefile $(PACKAGE).pdf $(PACKAGE)
+		$(CP) -p $(PACKAGE).dtx $(PACKAGE).ins $(PACKAGE)
+		$(TAR) -cvf $(PACKAGE).tar ./$(PACKAGE) 
+		$(RM) -rf $(PACKAGE)
+		$(GZIP) -9 $(PACKAGE).tar
+
+
+$(PACKAGE).aux:	$(PACKAGE).dtx $(PACKAGE).sty
+		$(LATEX) $(PACKAGE).dtx
+		$(LATEX) $(PACKAGE).dtx
+
+$(PACKAGE).dvi:	$(PACKAGE).dtx $(PACKAGE).sty $(PACKAGE).aux
+		$(LATEX) $(PACKAGE).dtx
+		$(LATEX) $(PACKAGE).dtx
+
+$(PACKAGE).glo:	$(PACKAGE).dtx $(PACKAGE).sty
+		$(LATEX) $(PACKAGE).dtx
+
+$(PACKAGE).gls:	$(PACKAGE).glo
+		-$(MAKEINDEX) -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo
+
+$(PACKAGE).idx:	$(PACKAGE).dtx $(PACKAGE).sty
+		$(LATEX) $(PACKAGE).dtx
+
+$(PACKAGE).ind:	$(PACKAGE).idx
+		-$(MAKEINDEX) -s gind.ist $(PACKAGE).idx
+
+$(PACKAGE).ps:	$(PACKAGE).dvi
+		$(DVIPS) -o $(PACKAGE).ps $(PACKAGE).dvi
+
+$(PACKAGE).sty:	$(PACKAGE).dtx $(PACKAGE).ins 
+		$(LATEX) $(PACKAGE).ins


Property changes on: trunk/Master/texmf-dist/doc/latex/navydocs/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/navydocs/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/navydocs/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/navydocs/README.txt	2016-07-06 20:32:03 UTC (rev 41643)
@@ -0,0 +1,43 @@
+navydocs package
+----------------
+
+Author
+------
+Peter Andrew Rochford
+Acorn Science & Innovation, Inc.
+1616 Anderson Road, Suite 213
+McLean, VA 22102, USA
+email: prochford at acornsi.com
+
+Purpose
+-------
+
+The navydocs package provides an easy means for creating title pages 
+and the following supplementary material pages used in technical reports 
+by United States Navy organizations. These pages are generated by specifying 
+the page content via a set of commands and then calling a macro to create 
+the page at its occurence in the document. The package in its current form 
+provides a title page and a technical components page as used by the 
+Carderock Division at the Naval Surface Warfare Center (Carderock/NSWC). 
+The macros provided within the package can be easily copied and modified 
+to support formats used by other Navy organizations. The navydocs package 
+is provided in the hope that it proves useful to other Navy organizations, 
+with users contributing macros for their organizations. Please email to 
+the author any new macros for title pages or supplementary material so 
+they can be added to the navydocs package.
+
+License
+-------
+Copyright (C) 2016 Peter Andrew Rochford.
+
+The navydocs package may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, version 1.3c
+(LPPL, 2008-05-04) of this license or (at your option) any later version. 
+The latest version of this license can be found at:
+    https://latex-project.org/lppl/
+
+The navydocs package is distributed in the hope that it will be
+useful, but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed 
+or implied, including, but not limited to, the implied warranties of
+MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+Project Public License for more details.


Property changes on: trunk/Master/texmf-dist/doc/latex/navydocs/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/navydocs/graphics/navy-logo-102.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/navydocs/graphics/navy-logo-102.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/navydocs/graphics/navy-logo-102.png	2016-07-06 20:31:01 UTC (rev 41642)
+++ trunk/Master/texmf-dist/doc/latex/navydocs/graphics/navy-logo-102.png	2016-07-06 20:32:03 UTC (rev 41643)

Property changes on: trunk/Master/texmf-dist/doc/latex/navydocs/graphics/navy-logo-102.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/navydocs/navydocs.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/navydocs/navydocs.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/navydocs/navydocs.pdf	2016-07-06 20:31:01 UTC (rev 41642)
+++ trunk/Master/texmf-dist/doc/latex/navydocs/navydocs.pdf	2016-07-06 20:32:03 UTC (rev 41643)

Property changes on: trunk/Master/texmf-dist/doc/latex/navydocs/navydocs.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/navydocs/sampleNavyReport.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/navydocs/sampleNavyReport.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/navydocs/sampleNavyReport.tex	2016-07-06 20:32:03 UTC (rev 41643)
@@ -0,0 +1,82 @@
+%%
+%% This is file `sampleNavyReport.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% navydocs.dtx  (with options: `sample')
+%% 
+%% Copyright (C) 2016 Peter Andrew Rochford.
+%% 
+%% This file is NOT the source for sampleNavyReport, because almost all comments
+%% have been stripped from it.  It is NOT the preferred form of sampleNavyReport
+%% for making modifications to it.
+%% 
+%% Therefore you can NOT redistribute and/or modify THIS file.  You can
+%% however redistribute the complete source package (Makefile, navydocs.dtx
+%% and navydocs.ins) and/or modify it under the terms of the LaTeX Project
+%% Public License, either version 1.3c of this license or (at your option)
+%% any later version. The latest version of this license can be found at:
+%% https://latex-project.org/lppl/
+%% 
+%% The navydocs package is distributed in the hope that it will be useful,
+%% but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed or
+%% implied, including, but not limited to, the implied warranties of
+%% MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+%% Project Public License for more details.
+%% 
+\documentclass[twoside]{article}
+\usepackage[margin=0.75in]{geometry} % set margins to 0.75 in
+\usepackage{lipsum} % required to produce dummy text
+\usepackage{navydocs}
+
+\setlength{\marginparwidth}{64pt}
+\setlength{\parindent}{5ex}
+\setlength{\paperwidth}{8.5in}
+\setlength{\textwidth}{6.5in}
+\setlength{\oddsidemargin}{0in}
+\setlength{\evensidemargin}{0in}
+
+\begin{document}
+
+\NavyDivision{Navy Division, Navy Center}
+\NavyDivisionLocation{City, State Zip-Code}
+\NavyReportNumber{XXXXXXXX/XX-0123-45}
+\NavyReportDate{Month Year}
+\NavyReportType{Navy Directorate \\
+                     Research and Development Report}
+\NavyReportTitle{Mathematical Model Version 2:\\
+                       A Long Detailed Title \\
+                       Spanning Multiple Lines (if desired)}
+\NavyAuthor{Author Name}
+
+\NavyMarginTitle{
+    \NavyReportNumber{} Mathematical Model Version 2: \\
+    \hphantom{\NavyReportNumber{}} A Long Detailed Title Spanning Multiple Lines (if desired)
+}
+
+\NavyFormID{NDW-DTRC 5602/51 (Rev. 7-93)}
+
+\NavyTitlePage
+
+\pagenumbering{roman}
+
+\MakeCarderockDivPage
+
+\tableofcontents
+\cleardoublepage
+\pagenumbering{arabic}
+\setcounter{page}{1}
+
+\section{Introduction}
+
+\lipsum[1]
+
+\section{Conclusion}
+
+\lipsum[2]
+
+\end{document}
+\endinput
+%%
+%% End of file `sampleNavyReport.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/navydocs/sampleNavyReport.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/navydocs/navydocs.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/navydocs/navydocs.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/navydocs/navydocs.dtx	2016-07-06 20:32:03 UTC (rev 41643)
@@ -0,0 +1,1286 @@
+% \iffalse
+% Title pages for Navy technical reports.
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% This is file `navydocs.dtx', the documentation file for the `navydocs'
+% package.
+%
+% Copyright (C) 2016 Peter Andrew Rochford.
+%
+% The navydocs package may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, version 1.3c
+% (LPPL, 2008-05-04) of this license or (at your option) any later version. 
+% The latest version of this license can be found at:
+%     https://latex-project.org/lppl/
+%
+% The navydocs package is distributed in the hope that it will be
+% useful, but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed 
+% or implied, including, but not limited to, the implied warranties of
+% MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+% Project Public License for more details.
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% @LaTeX-style-file{
+%    Author     = "Peter A. Rochford",
+%    Version    = "1.1",
+%    Date       = "2017/7/1",
+%    Time       = "22:51:25",
+%    Filename   = "navydocs.sty",
+%    Address    = "Acorn Science & Innovation, Inc.
+%                      1616 Anderson Road, Suite 213
+%                      McLean, VA 22102, USA",
+%    Telephone  = "+1 703-995-9872",
+%    Email      = "prochford at acornsi.com",
+%    CodeTable  = "ISO/ASCII",
+%    Keywords   = "LaTeX, standard forms, navydocs, report documentation",
+%    Supported  = "yes",
+%    Abstract   = "LaTeX package for generating title pages and other leading
+%                  pages as prescribed for Navy technical reports, for instance,
+%                  as part of a document delivered on a U.S. Government
+%                  contract.''
+% }
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{navydocs.dtx}
+\documentclass[letterpaper]{ltxdoc}
+\usepackage{navydocs}
+\usepackage{afterpage}
+\advance\textheight2\baselineskip
+\setlength\hfuzz{26pt}
+\newcounter{savepage}
+%</driver>
+%
+%<*ltxdoc>
+\AtBeginDocument{
+  \EnableCrossrefs
+  \RecordChanges
+  \CodelineIndex}
+\AtEndDocument{
+  \PrintChanges
+  \PrintIndex}
+\begin{document}
+  \DocInput{navydocs.dtx}
+\end{document}
+%</ltxdoc>
+%
+% \fi
+%
+% \newcommand*{\Lopt}[1]{\textsf{#1}}
+% \newcommand*{\Lfile}[1]{\texttt{#1}}
+% \newcommand*{\Lpack}[1]{\textsf{#1}}
+%
+% \changes{v1.0}{11 Jan 2000}{Initial revision.}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \DoNotIndex{\ ,\(,\),\@car,\@date,\@empty,\@gobble,\@ifnextchar}
+% \DoNotIndex{\@ifundefined,\@nil,\@tempa,\@tempboxa,\@tempskipa}
+% \DoNotIndex{\@viiipt,\@vpt,\@vipt,\@xipt,\@xivpt,\@warning,\@xpt,\\}
+% \DoNotIndex{\2,\AtEndDocument,\addtocounter,\advance,\arabic}
+% \DoNotIndex{\baselineskip,\baselinestretch,\begin,\bf,\c at page}
+% \DoNotIndex{\cleardoublepage,\csname,\date,\day,\DeclareFixedFont}
+% \DoNotIndex{\def,\documentclass,\documentpackage,\edef,\else,\end}
+% \DoNotIndex{\endcsname,\evensidemargin,\ExecuteOptions,\expandafter}
+% \DoNotIndex{\fi,\font,\fontdimen,\footnote,\framebox,\global,\hbox}
+% \DoNotIndex{\headheight,\headsep,\hrule,\hskip,\hss,\if,\if at twoside}
+% \DoNotIndex{\ifdim,\IfFileExists,\ifodd,\ifx,\InputIfFileExists,\LARGE}
+% \DoNotIndex{\large,\leftskip,\let,\line,\lineskip,\linethickness}
+% \DoNotIndex{\linewidth,\makeatletter,\makeatother,\makebox,\maketitle}
+% \DoNotIndex{\month,\NeedsTeXFormat,\newcommand,\newcounter,\newif}
+% \DoNotIndex{\newpage,\noindent,\normalbaselineskip,\null,\number}
+% \DoNotIndex{\oddsidemargin,\pagenumbering,\pagestyle,\par,\parbox,\phantom}
+% \DoNotIndex{\ProvidesPackage,\put,\r at TotPages,\raggedright,\relax}
+% \DoNotIndex{\renewcommand,\rightskip,\rule,\section,\setcounter}
+% \DoNotIndex{\setbox,\setlength,\shortstack,\space,\spaceskip,\string}
+% \DoNotIndex{\tableofcontents,\textheight,\textwidth,\thispagestyle}
+% \DoNotIndex{\topmargin,\tt,\typeout,\unitlength,\usepackage,\value}
+% \DoNotIndex{\vbox,\vfil,\voffset,\vskip,\vss,\wd,\xspaceskip,\year}
+%
+% \newcommand{\ie}{{\it i.e.\/}}
+%
+% \def\filename{navydocs.dtx}
+% \def\fileversion{1.1}
+% \def\filedate{2016/7/1}
+% \def\docdate {2016/7/1}
+% \makeatletter
+%   \def\@oddfoot{%
+%     \rm
+%     \hfil
+%     \@ifundefined{r at fig:form}%
+%       {\thepage}%
+%       {\@tempcnta\pageref{fig:form}
+%        \ifnum \c at page=\@tempcnta \else
+%          \thepage
+%        \fi}%
+%     \hfil}
+%   \let\@evenfoot\@oddfoot
+% \makeatother
+%
+% \CheckSum{0}
+%
+% \CharacterTable
+%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%   Digits        \0\1\2\3\4\5\6\7\8\9
+%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%   Dollar        \$     Percent       \%     Ampersand     \&
+%   Acute accent  \'     Left paren    \(     Right paren   \)
+%   Asterisk      \*     Plus          \+     Comma         \,
+%   Minus         \-     Point         \.     Solidus       \/
+%   Colon         \:     Semicolon     \;     Less than     \<
+%   Equals        \=     Greater than  \>     Question mark \?
+%   Commercial at \@     Left bracket  \[     Backslash     \\
+%   Right bracket \]     Circumflex    \^     Underscore    \_
+%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%   Right brace   \}     Tilde         \~}
+%
+% \title{The \Lpack{navydocs} Package\footnote{This paper documents
+%        the \Lpack{navydocs} package v\fileversion, last revised \filedate.}}
+% \author{
+%         Peter Andrew Rochford\\[5pt]
+%         Acorn Science \& Innovation, Inc. \\
+%         1616 Anderson Road, Suite 213 \\
+%         McLean, VA 22102, USA\\[5pt]
+%         \texttt{prochford at acornsi.com}
+%         }
+% \date{\docdate}
+% \maketitle
+% \vspace{-20pt}
+% \begin{abstract}
+% \noindent
+% This article documents the \LaTeX\ package for generating the title 
+% page and other leading pages as prescribed for Navy technical reports.  
+% For example, as part of a document delivered on a U.S. Government
+% contract.
+%
+%\end{abstract}
+% 
+% \setcounter{tocdepth}{2}
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% The \Lpack{navydocs} package provides an easy means for 
+% creating title pages and the following supplementary material pages used 
+% in technical reports by United States Navy organizations. These pages are
+% generated by specifying the page content via a set of commands and then 
+% calling a macro to create the page at its occurence in the document. The 
+% package in its current form provides a title page and a technical components 
+% page as used by the Carderock Division at the Naval  Surface Warfare Center 
+% (Carderock/NSWC). The macros provided within the package can be easily 
+% copied and modified to support formats used by other Navy organizations. 
+% The \Lpack{navydocs} package is provided in the hope that it proves 
+% useful to other Navy organizations, with users contributing macros for their
+% organizations. Please email to the author any new macros for title pages or
+% supplementary material so they can be added to the \Lpack{navydocs} 
+% package.
+%
+% In the current version of the \Lpack{navydocs} package, the macro
+% \cmd{\NavyTitlePage} will produce a title page for a technical report
+% released by Carderock/NSWC. The macro \cmd{\MakeCarderockDivPage}
+% will create a Technical Components page that lists the major Carderock 
+% Division technical components of the organization along with the three 
+% types of reports issued by this division. This is typically inserted after the 
+% title page.
+%
+% A sample of the Carderock/NSWC title and technical components pages 
+% is given in section~\ref{sec:sample} for one example of how to use the 
+% \Lpack{navydocs} package.
+% 
+% \section{The Individual Fields}
+% 
+% There are 10 fields for producing the title pages. The following macros, each 
+% having a single argument, define the data to be included in each field.  Usually 
+% only a few fields will apply to a given report.  Table~\ref{tab:attributes} notes which
+% fields are required and which have default values. The best approach to insure that 
+% the form is properly filled-in is to preview the page and adjust any
+% fields that appear to have a problem. Note that in many cases you can use 
+% ``|\\|'' (newline) to spread the text over several lines.
+% 
+% \begin{table}[h]
+% \null\vspace{-.1in}
+% \def\n{\hfill{\bf ---}\hfill\null}
+% \def\d#1#2{\smash{\lower#1\hbox{#2}}}
+% \def\p{\phantom{0}}
+% \def\s#1{{\footnotesize (#1)}}
+% \def\S#1{%
+%   \ifnum#1<10
+%     {\footnotesize \phantom{0}(#1)}%
+%   \else
+%     \s{#1}%
+%   \fi}
+% \doublerulesep.5pt
+% \arrayrulewidth.5pt
+% \caption{Field Attributes and Approximate Maximum Size.}
+% \label{tab:attributes}
+% \vspace{10pt}
+% \DeleteShortVerb{\|}
+% \hbox to \textwidth{%
+% \begin{tabular}{lcccccc}
+%   \hline\hline
+%   \multicolumn{1}{c}{\rule{0pt}{14pt}\d{1ex}{\bf Macro Name}}
+%                                                 & \multicolumn{1}{c}{\d{1ex}{\bf Required}}
+%                                                       & \multicolumn{1}{l}{\bf Default}
+%                                                             & \multicolumn{1}{c}{\bf Max}
+%                                                                  & \multicolumn{1}{c}{{\bf Chars.}\d{-2.5pt}{\s{3}}}
+%                                                                                         \\ 
+%                                        &     & \multicolumn{1}{l}{{\bf Value}}
+%                                                             & \multicolumn{1}{c}{\bf Lines}
+%                                                                   & \multicolumn{1}{c}{\bf per Line}
+%                                                                                         \\ \hline\rule{0pt}{14pt}
+%   \cmd{\NavyDivision}               & Yes &\n& \p1 &  \p58  \\
+%    \cmd{\NavyDivisionLocation}    & Yes & \n  & \p1 &  \p70  \\
+%    \cmd{\NavyReportNumber}     & Yes & \n  & \p1 &  \p57  \\
+%    \cmd{\NavyReportDate}          & \n & \s{1} & \p1 &  \p12  \\
+%    \cmd{\NavyReportType}         & Yes  & \n  & \p2 &  \p75 \\
+%    \cmd{\NavyReportTitle}          & Yes  & \n  & \p3 &  \p45 \\
+%    \cmd{\NavyAuthor}               & Yes & \n  & \p19 &  \p75  \\
+%   \cmd{\NavyDistributionStatement} & \n  &\s{2}& \p1 & \p55 \\
+%    \cmd{\NavyMarginTitle}                   & \n  & \n  & \p2 &  \p85 \\ \hline\hline
+%   \multicolumn{5}{l}{\rule{0pt}{14pt}{\bf Notes:}}                                \\
+%   \multicolumn{5}{l}{\quad\S{1} Defaults to the current date in ``dd~Month~yyyy'' 
+%                      format (\eg} \\
+%   \multicolumn{5}{l}{\quad\phantom{\S{1}} 26~June~2016).}  \\
+%   \multicolumn{5}{l}{\quad\S{2} Defaults to ``Approved for public release; 
+%                      distribution is unlimited''}. \\
+%   \multicolumn{5}{l}{\quad\S{3} The number of characters is approximate and for
+%                      the Computer} \\
+%   \multicolumn{5}{l}{\quad\phantom{\S{3}} Modern Roman font family only.}
+% \end{tabular}%
+% }
+% \vspace{.1in}
+% \MakeShortVerb{\|}
+% \end{table}
+%
+% \newpage
+% \paragraph{1. DIVISION}
+% \DescribeMacro{\NavyDivision}
+%
+% \noindent
+% The full specification of the Navy division producing the technical report as
+% it should appear at the top of the title page, \eg Carderock Division, 
+% Naval Surface Warface Center. This field is required.
+%
+% \paragraph{2. DIVISION LOCATION}
+% \DescribeMacro{\NavyDivisionLocation}
+%
+% \noindent
+% The city, state, and zip code of the Navy division producing the technical report
+% as it should appear at the top of the title page, \eg West Bethesda, Maryland 
+% 20817-5700. This field is required.
+% 
+% \paragraph{3. REPORT NUMBER}
+% \DescribeMacro{\NavyReportNumber}
+%
+% \noindent
+% Enter the unique alphanumeric report number(s) assigned by the Navy 
+% performing organization, \eg
+% \par\null\noindent
+% \begin{tabular}{llll}
+%   ~~ & \multicolumn{3}{l}{\tt \cmd{\POReportNumber}\{CRDKNSWC/HD-1427-02; 
+%      AFWL-TR-85-4017-Vol21-PT-2\}} \\ 
+%      & \hspace{1in} & $\rightarrow$ & BRL-1234; AFWL-TR-85-4017-Vol21-PT-2
+% \end{tabular}
+%
+% \paragraph{4. REPORT DATE}
+% \DescribeMacro{\NavyReportDate}
+%
+% \noindent
+% Publication date , which is typically in the format of month and year, \eg
+% October 1996.
+%
+% \paragraph{5. REPORT TYPE}
+% \DescribeMacro{\NavyReportType}
+%
+% \noindent
+% State the type of report as stipulated by the Navy organization. You can 
+% use ``|\\|'' (newline) to specify the report type across multiple lines, such 
+% as
+%
+% \cmd{\NavyReportType}\{Hydromechanics Directorate \\
+%                     Research and Development Report \}
+% 
+% This field is required.
+%
+% \paragraph{6. REPORT TITLE}
+% \DescribeMacro{\NavyReportTitle}
+%
+% \noindent
+% The title for the report. This should be taken from the part of 
+% the report that provides the most meaningful and complete information. 
+% You can use ``|\\|'' (newline) to specify the report type across multiple 
+% lines, such as
+%
+% \cmd{\NavyReportTitle}\{Mathematical Model for MANSIM Version 2:\\
+%                                  A Surface Ship Maneuvering, Stationkeeping, \\
+%                                  and Seakeeping Simulator Computer Program \}
+% 
+% On classified documents enter the title classification in parentheses. 
+% This field is required.
+% 
+% \paragraph{7. AUTHOR(S)}
+% \DescribeMacro{\NavyAuthor}
+%
+% \noindent
+% Enter name(s) of the person(s) responsible for writing the report,
+% performing the research, or credited with the content of the report.
+% You can use ``|\\|'' (newline) to specify the report type across multiple 
+% lines. If editor or compiler, this should follow the name(s).
+%
+% \paragraph{8. DISTRIBUTION/AVAILABILITY STATEMENT}
+% \DescribeMacro{\NavyDistributionStatement}
+%
+% \noindent
+% Use agency-mandated availability statements to indicated the public
+% availability or distribution limitations of the report.  If additional
+% limitations/restrictions or special markings are indicated follow
+% agency authorization procedures, \eg, RD/FRD, PROPIN, ITAR.
+% This field is {\bf not} required, but will default to the first of the following examples:
+% \par\null\noindent
+% ``Approved for public release; distribution is unlimited.''
+% \par\null\noindent
+% ``Distribution authorized to DoD only; (reason and date).  Other
+% requests shall be referred to (controlling DoD office).''
+% \par\null\noindent
+% ``Further dissemination only as directed by (controlling DoD office
+% and date) or higher DoD authority.''
+% \par\null\noindent
+% \hbox to \textwidth{%
+%   \begin{tabular}{l@{\space---\space}l}
+%     For DoD  & \parbox[t]{0.75\textwidth}{See DoDD 5230.24, 
+%              ``Distribution Statements on Technical Documents.''}\\
+%     For DoE  & See authorities.\\
+%     For NASA & See Handbook NHB 2200.2.\\
+%     For NTIS & Leave blank.
+%   \end{tabular}%
+%   \hss}
+%
+% \paragraph{9. MARGIN TITLE}
+% \DescribeMacro{\NavyMarginTitle}
+%
+% \noindent
+% Title to appear in the left margin of the title page, oriented in a vertical 
+% position. The title is typically the same as that used with \cmd{\NavyReportTitle} 
+% but may differ because the title has to be shortened due to space limitations or 
+% line breaks. Hence a separate command is used to provide the title. 
+%
+% A margin title will only appear if this command is called with an argument. The title
+% will appear in the margin according to the formatting commands provided for the
+% title, for example using a``|\\|'' (newline) to have the title split across more than 
+% one line or a \cmd{\hphantom} to control placement of text 
+% (cf. Section~\ref{sec:sample}).
+%
+% \cmd{\NavyMarginTitle\{Title for margin\}}
+%
+% By default the margin title will be placed at the margin paragraph width and the 
+% bottom of the text height area. To allow user control over the exact placement 
+% of the margin title, the command accepts two optional arguments 
+% (xmargin, ymargin) that define the horizontal (xmargin) and vertical (ymargin)
+% position of the bottom left placement. 
+%
+% \cmd{\NavyMarginTitle[xmargin][ymargin]\{Title for margin\}}
+%
+% To provide guidance on suitable values for [xmargin][ymargin] , the default 
+% values are [40][70], while the values used to place the margin title as it appears 
+% in Section~\ref{sec:titlepage} are [140][95]. 
+%
+% \iffalse
+% Save current page number because \titlepage sets it to 1 later. 
+%\fi
+% \setcounter{savepage}{\thepage}
+% \section{Title Page}
+% \label{sec:titlepage}
+% 
+% The macro \cmd{\NavyTitlePage} will produce a title page for the Navy
+% technical report on a separate page at the location where it appears. This will 
+% produce the title page as shown on the following page.
+%
+% \NavyDivision{Division, Center}
+% \NavyDivisionLocation{City, State Zip Code}
+% \NavyReportNumber{Report No.}
+% \NavyReportDate{Month Year}
+% \NavyReportType{Directorate \\
+%                     Research and Development Report}
+% \NavyReportTitle{Report Title}
+% \NavyAuthor{Author}
+% \NavyMarginTitle{Report Title for margin}
+%
+% \newpage
+% \NavyMarginTitle[140][95]{\NavyReportNumber{} Report Title}
+% \NavyTitlePage
+%
+% \iffalse
+% Reset page number because \titlepage sets it to 1. 
+%\fi
+% \setcounter{page}{\thesavepage}
+% \addtocounter{page}{2}
+%
+% \section{Supplementary Material Page}
+%
+% Some Navy organizations require that additional pages follow the title page.
+% For example, Carderock/NSWC requires that a Technical Components page follow the 
+% title page. The latter page can be produced by using the macro 
+% \cmd{\MakeCarderockDivPage} included with this \LaTeX\  package. You can 
+% easily define a macro customized for other Navy organziations by copying 
+% and modifying this one.
+%
+% \DescribeMacro{\MakeCarderockDivPage}
+% \noindent
+% The macro \cmd{\MakeCarderockDivPage} makes use of one field that 
+% identifies the form at the bottom of the page, namely 
+% \cmd{\NavyFormID\{FormID\}} where FormID is the form identifier, e.g
+% ``NDW-DTRC 5602/51 (Rev. 7-93)''. This field is required.
+% 
+% The\cmd{\MakeCarderockDivPage} command need simply be inserted into your 
+% \LaTeX\  document after the \cmd{\MakeNavyCoverPage} command. This will
+% result in the following page appearing in the document.
+%
+% \newpage
+% \NavyFormID{NDW-DTRC 5602/51 (Rev. 7-93)}
+% \MakeCarderockDivPage
+%
+% \section{Configuration}
+% \enlargethispage{24pt}
+% 
+% In order to make the use of the report documentation page as easy as
+% possible, several aspects of the package are automated or can be easily
+% configured.
+% 
+% \subsection{Fonts}
+% \label{sec:configfont}
+% 
+% When the package is loaded it defines the fonts that are used by
+% basing them on the font families \cmd{\sfdefault} for the field labels and
+% \cmd{\rmdefault} for the text entries.  By default, they will be based on
+% the Computer Modern font family.  If you are changing the base font
+% families for your paper and you want the fonts used on the |navydocs| to
+% change also, then you must change the font families before loading the
+% \Lpack{navydocs} package.  See \cite[pages 229,236]{Kopk-Daly93} for more 
+% information about the default font families.
+% 
+% For any specific field, you can override the default font by 
+% declaring your preferred value along with your entry, \eg
+% \par\null\noindent 
+% \begin{tabular}{llll}
+%   ~~ & {\tt \cmd{\Title}\{\cmd{\Huge} A Huge Title\}} & $\rightarrow$ & \smash{\Huge\lower.5ex\hbox{A Huge Title}}
+% \end{tabular}
+%
+% \section{An Example of Use with the \Lpack{article} Class}
+% \label{sec:sample}
+% \iffalse
+%<*sample>
+% \fi%
+% 
+% This sample program demonstrates how the \Lpack{navydocs} package may 
+% be used and integrated with an existing class.  Here we redefine 
+% \cmd{\@makefile} so that we can create a titlepage and report
+% documentation page that share a common set of fields, such as the
+% report title, the performing organization title and address and the
+% report abstract.
+% 
+% First we have to start the paper as an \Lpack{article} with twosided
+% pages and using the \Lpack{navydocs} package.
+% 
+%    \begin{macrocode}
+\documentclass[twoside]{article}
+\usepackage[margin=0.75in]{geometry} % set margins to 0.75 in
+\usepackage{lipsum} % required to produce dummy text
+\usepackage{navydocs}
+%    \end{macrocode}
+%
+% Set some page specifications so the margin title will appear properly using the defaults. 
+% Otherwise we'll need to explicitly specify where the margin title is to be placed.
+%
+%    \begin{macrocode}
+
+\setlength{\marginparwidth}{64pt}
+\setlength{\parindent}{5ex}
+\setlength{\paperwidth}{8.5in}
+\setlength{\textwidth}{6.5in}
+\setlength{\oddsidemargin}{0in}
+\setlength{\evensidemargin}{0in}
+%    \end{macrocode}
+%
+% Now we fill in the fields needed for the title page.  For reference as a template, 
+% we have entered all of the \Lpack{navydocs} block macros below. 
+% \newpage
+%    \begin{macrocode}
+
+\begin{document}
+
+\NavyDivision{Navy Division, Navy Center}
+\NavyDivisionLocation{City, State Zip-Code}
+\NavyReportNumber{XXXXXXXX/XX-0123-45}
+\NavyReportDate{Month Year}
+\NavyReportType{Navy Directorate \\
+                     Research and Development Report}
+\NavyReportTitle{Mathematical Model Version 2:\\
+                       A Long Detailed Title \\
+                       Spanning Multiple Lines (if desired)}
+\NavyAuthor{Author Name}
+
+% Note that we explicitly shifted the margin title horizontally for 
+% better visual effect because of the smaller default font used 
+% in the two-sided page option for article.
+\NavyMarginTitle{
+    \NavyReportNumber{} Mathematical Model Version 2: \\
+    \hphantom{\NavyReportNumber{}} A Long Detailed Title Spanning Multiple Lines (if desired)
+}
+
+\NavyFormID{NDW-DTRC 5602/51 (Rev. 7-93)}
+%    \end{macrocode}
+% 
+% Finally we produce a very simple report that contains a title page 
+% and the technical components page as used by Carderock/NSWC. 
+% First we print the title page. Next the technical components page is 
+% written. Following these two pages, the table of contents is output, 
+% followed by the very short report.
+% 
+%    \begin{macrocode}
+
+\NavyTitlePage
+
+\pagenumbering{roman}
+
+\MakeCarderockDivPage
+
+\tableofcontents
+\cleardoublepage
+\pagenumbering{arabic}
+\setcounter{page}{1}
+
+\section{Introduction}
+
+\lipsum[1]
+
+\section{Conclusion}
+
+\lipsum[2]
+
+\end{document}
+%    \end{macrocode}
+% \iffalse
+%</sample>
+% \fi%
+%
+% \StopEventually{%
+% \section{Acknowledgments}
+% 
+% I would like to acknowledge Steven Douglas Cochran for authoring the
+% \Lpack{sf298} Package, which was used as a template for writing this 
+% \Lpack{navydocs} Package.
+%
+% \begin{thebibliography}{6}%
+% \bibitem{Kopk-Daly93}%
+%   Michel Goossens, Framk Mittelbach, and Alexander Samarin,
+%   \emph{A Guide to \LaTeXe},
+%   1993,  2$^{nd}$ edition (revised 1995).
+% \end{thebibliography}}
+%
+% \section{The {\tt DOCSTRIP} Modules}
+% The following modules are used in the implementation to direct
+% {\tt DOCSCRIPT} in generating the external files:
+% \begin{tabular}[t]{ll}
+%   driver    & produces a documentation driver file.\\
+%   package   & produces the package navydocs.sty.\\
+%   sample    & produces a sample \LaTeX\ template and test file.
+% \end{tabular}
+%
+% \newpage
+% \section{The code}
+% \iffalse
+%<*package>
+% \fi%
+% \subsection{Identification}
+%
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+% Note that the YYYY/MM/DD format must be respected or an error will
+% be generated.
+\ProvidesPackage{navydocs}[2016/06/22 Navy Documents]
+\typeout{Package: navydocs 2016/07/01 v1.1)}
+%    \end{macrocode}
+%
+% Define some commands for the abbreviation ``\eg'' and to retrieve the
+% current month as a name.
+%
+%    \begin{macrocode}
+\providecommand{\eg}{{\it e.g.\/\ }}
+\newcommand{\MONTH}{%
+  \ifcase\the\month
+  \or January% 1
+  \or February% 2
+  \or March% 3
+  \or April% 4
+  \or May% 5
+  \or June% 6
+  \or July% 7
+  \or August% 8
+  \or September% 9
+  \or October% 10
+  \or November% 11
+  \or December% 12
+  \fi}
+%    \end{macrocode}
+%
+% \subsection{Load the \Lpack{eso-pic} Package}
+%
+% Check to see if the \Lpack{eso-pic} package is present.  If it is,
+% then load the package so we can put vertical text in the
+% left margin per Carderock/NSWC style requirement. If not, then 
+% generate a package error.
+%
+%    \begin{macrocode}
+\IfFileExists{eso-pic.sty}{%
+  \usepackage{eso-pic, rotating}}
+  {\PackageError {navydocs}{The eso-pic package was not found.}
+  {Install the eso-pic package on your system.}}
+%    \end{macrocode}
+%
+% \subsection{Load the \Lpack{mdframed} Package}
+%
+% Check to see if the \Lpack{mdframed} package is present.  If it is,
+% then load the package so a vertical line can be drawn to indicate the
+% left margin per Carderock/NSWC style requirement. If not, then 
+% generate a package error.
+%
+%    \begin{macrocode}
+\IfFileExists{mdframed.sty}{%
+\usepackage[
+linewidth=4pt,
+middlelinecolor= black,
+middlelinewidth=0.4pt,
+roundcorner=1pt,
+topline = false,
+rightline = false,
+bottomline = false,
+rightmargin=0pt,
+skipabove=0pt,
+skipbelow=0pt,
+leftmargin=0cm,
+innerleftmargin=1cm,
+innerrightmargin=0pt,
+innertopmargin=0pt,
+innerbottommargin=0pt,
+]{mdframed}}
+  {\PackageError {mdframed}{The mdframed package was not found.}
+  {Install the mdframed package on your system.}}
+%    \end{macrocode}
+%
+% \subsection{Load the \Lpack{fancyhdr} Package}
+%
+% Check to see if the \Lpack{fancyhdr} package is present.  If it is, then load the package to 
+% define a custom footer. If it is not present then report error and terminate. This package 
+% is needed to define a custom footer where the form identifier appears on the Technical 
+% Components page produced by \cmd{\MakeCarderockDivPage}.
+%
+%    \begin{macrocode}
+\IfFileExists{fancyhdr.sty}{%
+  \usepackage{fancyhdr}}
+  {\PackageError {navydocs}{The fancyhdr package was not found.}
+  {Install the fancyhdr package on your system.}}
+%    \end{macrocode}
+%
+% \subsection{Load the \Lpack{relsize} Package}
+%
+% Check to see if the \Lpack{relsize} package is present.  If it is, then load the package to 
+% allow the font in the margin title to be one size down from whatever is currently being used
+% by default.
+%
+%    \begin{macrocode}
+\IfFileExists{relsize.sty}{%
+  \usepackage{relsize}}
+  {\PackageError {navydocs}{The relsize package was not found.}
+  {Install the relsize package on your system.}}
+%    \end{macrocode}
+%
+% \subsection{Load the \Lpack{setspace} Package}
+%
+% Check to see if the \Lpack{setspace} package is present.  If it is, then load the package to 
+% allow  line spacing to be controlled in sections of the document such as those generated
+% by \cmd{\MakeCarderockDivPage}.
+%
+%    \begin{macrocode}
+\IfFileExists{setspace.sty}{%
+  \usepackage{setspace}}
+  {\PackageError {navydocs}{The setspace package was not found.}
+  {Install the setspace package on your system.}}
+%    \end{macrocode}
+%
+% \subsection{Load the \Lpack{xparse} Package}
+%
+% Check to see if the \Lpack{xparse} package is present.  If it is, then load the package to 
+% allow a command to be defined with more than one option. This package is used to define
+% the \cmd{\NavyMarginTitle} command with two optional arguments for placement of the
+% margin title.
+%
+%    \begin{macrocode}
+\IfFileExists{xparse.sty}{%
+  \usepackage{xparse}}
+  {\PackageError {navydocs}{The xparse package was not found.}
+  {Install the xparse package on your system.}}
+%    \end{macrocode}
+%
+% \subsection{The User Interface}
+% 
+% The following macros define the external and internal portions of the
+% user interface.  These macros are used to fill the various items on the 
+% title page. All the macros have the same pattern: a public version which 
+% sets the internal value, both based on the item name.
+%
+% \begin{macro}{\NavyDivision}
+% \begin{macro}{\navy at Division}
+%    \begin{macrocode}
+\newcommand\NavyDivision[1]{\renewcommand\navy at Division{#1\hfill}}
+\newcommand\navy at Division{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyDivisionLocation}
+% \begin{macro}{\navy at Location}
+%    \begin{macrocode}
+\newcommand\NavyDivisionLocation[1]{\renewcommand\navy at Location{#1\hfill}}
+\newcommand\navy at Location{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The \cmd{\NavyReportNumber} command is defined so the user 
+% can use it to both specify and retrieve the report number. Use
+% of the command with an argument will specify the report number,
+% while call it will return the currently save report number. The latter
+% feature is useful when wishing to have the report number appear in 
+% the cover page such as the margin title as shown in the example 
+% given in Section~\ref{sec:sample} above.
+%
+% \begin{macro}{\NavyReportNumber}
+% \begin{macro}{\navy at ReportNumber}
+%    \begin{macrocode}
+\newcommand\NavyReportNumber[1]{
+  \ifx&#1&%
+     % Empty argument so use existing report number
+     \navy at ReportNumber
+  \else
+     % Use argument for report number
+     \renewcommand\navy at ReportNumber{#1}
+  \fi
+}
+\newcommand\navy at ReportNumber{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyReportDate}
+% \begin{macro}{\navy at ReportDate}
+%    \begin{macrocode}
+\newcommand\NavyReportDate[1]{\renewcommand\navy at ReportDate{#1\hfill}}
+\newcommand\navy at ReportDate{\number\day~\MONTH~\number\year}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyReportType}
+% \begin{macro}{\navy at ReportType}
+%    \begin{macrocode}
+\newcommand\NavyReportType[1]{\renewcommand\navy at ReportType{#1\hfill}}
+\newcommand\navy at ReportType{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyReportTitle}
+% \begin{macro}{\navy at ReportTitle}
+%    \begin{macrocode}
+\newcommand\NavyReportTitle[1]{\renewcommand\navy at ReportTitle{#1\hfill}}
+\newcommand\navy at ReportTitle{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyAuthor}
+% \begin{macro}{\navy at Author}
+%    \begin{macrocode}
+\newcommand\NavyAuthor[1]{\renewcommand\navy at Author{#1\hfill}}
+\newcommand\navy at Author{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyDistributionStatement}
+% \begin{macro}{\navy at DistributionStatement}
+%    \begin{macrocode}
+\newcommand\NavyDistributionStatement[1]
+{\renewcommand\navy at DistributionStatement{#1\hfill}}
+\newcommand\navy at DistributionStatement{
+Approved for public release; distribution is unlimited.\hfill
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% 
+% The macro \cmd{\NavyMarginTitle} is defined so an optional title can 
+% appear in the left hand margin of the cover page, oriented in a vertical 
+% position. It accepts two optional arguments that define the bottom left 
+% placement of the margin title in order to allow the user control over its 
+% exact placement, if needed. This is achieved by defining two variables 
+% (xmargin,ymargin) that are used later in the \cmd{\AddToShipoutPicture} 
+% command. By default, the margin title will be placed at the margin paragraph
+% width and the bottom of the text height area. Two helper functions are
+% defined to properly account for the offset depending on whether the
+% margin text occupies 1 or 2 lines.
+%
+% \begin{macro}{\countlines}
+%
+% The macro \cmd{\countlines} is a helper function that counts the 
+% number of lines in a text block so the offset for the margin title
+% can be properly determined.
+%
+%    \begin{macrocode}
+\newcommand\countlines[1]{
+   {\setbox0\vbox{\noindent{#1}\par
+   \count@\z@
+   \loop
+   \unskip\unpenalty\unskip\unpenalty\unskip
+   \setbox0\lastbox
+   \ifvoid0
+       \xdef\numlines{\the\count@}
+   \else
+       \advance\count@\@ne
+   \repeat}}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\countlines}
+%
+% The macro \cmd{\getmargintextheight} is a helper function that 
+% calculates the height of a line in a text block so the offset for the
+% margin title can be properly calculated.
+%
+%    \begin{macrocode}
+\newcommand\getmargintextheight[1]{
+  \newdimen\margintextheight
+  \setbox0=\vbox{#1}
+  \margintextheight=\ht0 \advance\margintextheight by \dp0
+  % count number of lines so height of each line can be found
+  \countlines{#1}
+  % now determine height of each line
+  \margintextheight=\the\dimexpr \margintextheight / \numlines
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NavyMarginTitle}
+% \begin{macro}{\navy at MarginTitle}
+% \begin{macro}{\marginoffset}
+%
+% The \cmd{\NavyMarginTitle} command is now defined for two optional
+% arguments using the \cmd{\DeclareDocumentCommand} from the usepackage
+% xparse. No margin title will appear if \cmd{\NavyMarginTitle} is called with an
+% empty argument. The \cmd{\marginoffset} command calculates the 
+% default offset for the margin title when it contains 2 lines in the text block. 
+%
+%    \begin{macrocode}
+\newif\ifmargin
+\margintrue
+
+\def\marginoffset{\the\dimexpr -\margintextheight*(\numlines - 1)  + 
+\margintextheight*(\numlines - 1)/2}
+
+\def\navy at xmargin{
+\LenToUnit{\leftmargin - \oddsidemargin + \marginparwidth/2 
++ \marginoffset}}
+\def\navy at ymargin{\LenToUnit{\paperheight - \textheight + \topmargin}}
+\newcommand\xmargin{\navy at xmargin}
+\newcommand\ymargin{\navy at ymargin}
+
+\DeclareDocumentCommand{\NavyMarginTitle}
+{
+O{ \LenToUnit{\leftmargin - \oddsidemargin + \marginparwidth/2 
++ \marginoffset} }
+O{ \LenToUnit{\paperheight - \textheight + \topmargin} } m }{
+  \renewcommand\xmargin{#1}
+  \renewcommand\ymargin{#2}
+  \ifx&#3&%
+     % Empty argument so suppress margin title
+     \marginfalse
+  \else
+     % Use mandatory argument for margin title
+     
+     % get height of each line for margin offset calculation
+     \getmargintextheight{#3}
+
+     \renewcommand\navy at MarginTitle{#3}
+  \fi
+}
+\newcommand\navy at MarginTitle{\relax}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NavyFormID}
+% 
+% The macro \cmd{\NavyFormID\{FormID\}} is defined so a form
+% identifier can be placed at the bottom of a page. It is currently used
+% by the macro \cmd{\MakeCarderockDivPage} when producing the
+% Technical Components page used by the Carderock Divison/NSWC. An
+% example FormID for the latter is ``NDW-DTRC 5602/51 (Rev. 7-93)''.
+% This macro can be used in new macros that are created for other 
+% Supplementary Material pages required by Navy organizations. It
+% can also easily be copied and modified for a different \cmd{\fancypagestyle}
+% as supported by the\Lpack{fancyhdr} Package.
+% 
+%    \begin{macrocode}
+\newcommand\NavyFormID[1]{
+\fancypagestyle{NavyFormIDStyle}
+{\fancyhf{}\renewcommand{\headrulewidth}{0pt}
+\fancyfoot[L]{\scriptsize #1}} }
+%    \end{macrocode}
+% \end{macro}
+%
+% \subsection{Error checking and reporting}
+%
+% \begin{macro}{\ifnavy at undef}
+% \begin{macro}{\navy at undeftrue}
+% \begin{macro}{\navy at undeffalse}
+% 
+% This switch is used by the error reporting at the end of the document
+% to generate a general message that there was an undefined required
+% field.
+% 
+%    \begin{macrocode}
+\newif\ifnavy at undef
+\navy at undeffalse
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\navy at undefined}
+% 
+% The \cmd{\navy at undefined} macro is executed with the optional argument for
+% each required field and without the optional argument at the end of
+% the document.
+%
+%    \begin{macrocode}
+\newcommand{\navy at undefined}[1][\@empty]{%
+  \ifx \@empty#1\relax
+    \ifnavy at undef
+       \typeout{^^J%
+                navydocs Warning: There are required fields that are 
+                undefined.%
+                ^^J}%
+     \fi
+  \else
+    \navy at undeftrue
+    \typeout{^^J%
+             navydocs Warning: \expandafter\string\csname #1
+             \endcsname\space is undefined.%
+             ^^J}%
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\navy at checkfield}
+% 
+% This macro does the actual checking for undefined required fields.
+% Because of the different sorts of field definitions that could be
+% created, it was easier to just fill a box with whatever the user
+% defined and check to see if the box has a non-zero width.  You could
+% defeat this if you really wanted to, but it should work for reasonable
+% field values.
+%
+%    \begin{macrocode}
+\newcommand{\navy at checkfield}[1]{%
+  \setbox\@tempboxa\vbox{\csname navy@#1\endcsname}%
+  \ifdim \wd\@tempboxa =0pt
+    \navy at undefined[#1]
+  \fi}
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
+\AtEndDocument{\navy at undefined}
+%    \end{macrocode}
+%
+% \subsection{Page layout}
+% 
+% This is the part of the code that actually produces the title page and
+% any supplementary material pages. After the pages are produced, most 
+% of the macros are set to \cmd{\relax} in order to recover as much 
+% pool space as possible.
+%
+% \subsubsection{Form setup and cleanup}
+%
+% \begin{macro}{\NavyTitlePage}
+% 
+% At the end of the \cmd{\titlepage} command, the \cmd{\thanks} macro is
+% redefined to be \cmd{\relax}.  If we want to define the title once and
+% also want to be able to have a \cmd{\thanks} message associated with the
+% title on the titlepage, and want to use that same title text on the
+% report documentation page, then we need to redefine the \cmd{\thanks}
+% macro to eat it's argument.  This is done by setting \cmd{\thanks} to
+% \cmd{\@gobble} while printing the report title page.
+% 
+%    \begin{macrocode}
+\newcommand{\NavyTitlePage}{%
+   \global\let\thanks\@gobble
+   \MakeNavyTitlePage
+   \global\let\thanks\relax}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MakeNavyTitlePage}
+% 
+% The \cmd{\MakeNavyTitlePage} command creates the Report Title Page
+% using the information defined by the associated field macros. This
+% should be used at the beginning of a deliverable report.
+%
+%    \begin{macrocode}
+\newcommand\MakeNavyTitlePage{%
+%    \end{macrocode}
+% 
+% If the \Lpack{twoside} option is specified in the \cmd{\documentclass}, then
+% it is printed as a separate page with a blank back. This page is treated
+% as page `{\it i}' (if the documentclass \Lpack{twoside} option is
+% specified, then the back treated as page `{\it ii}'.
+%
+%    \begin{macrocode}
+  \newpage
+  \if at twoside\ifodd\c at page\else
+    \null
+    \thispagestyle{empty}%
+    \newpage
+  \fi\fi
+%    \end{macrocode}
+%
+% Check for missing required fields.  If the field value is missing, then
+% print a warning.  In the case of the number of pages, if the 
+% \Lpack{totpages} package was loaded, then calculate the value, else if 
+% the total pages is not given, then give a warning.
+%
+%    \begin{macrocode}
+  \navy at checkfield{Division}
+  \navy at checkfield{Location}
+  \navy at checkfield{ReportNumber}
+  \navy at checkfield{ReportDate}
+  \navy at checkfield{ReportType}
+  \navy at checkfield{ReportTitle}
+  \navy at checkfield{Author}
+  \navy at checkfield{DistributionStatement}
+%    \end{macrocode}
+%
+% Next define a picture that contains the report title oriented vertically
+% to be put in the left margin of the title page. This is done to conform
+% to Carderock/NSWC title page format requirements.
+%
+%    \begin{macrocode}
+\ifmargin
+\AddToShipoutPicture*{\put(\xmargin,\ymargin)
+ {\rotatebox{90}
+ {\scalebox{1}{\parbox[t]{\textheight}
+ {\textbf{\small \navy at MarginTitle}}
+ }}}}
+ \fi
+%    \end{macrocode}
+%
+% The set up is now done, so start the title page and use the {\it mdframed} 
+% environment to create a vertical rule along the left margin. 
+%
+%    \begin{macrocode}
+ \begin{titlepage}
+
+ \noindent
+ \begin{minipage}[t]{\textwidth}
+ \begin{mdframed}
+%    \end{macrocode}
+%
+% Next put the Navy division and location at the top of the page followed
+% by a thick and then thin line that runs horizontally across the page.
+%
+%    \begin{macrocode}
+ \parbox[t][0.98\textheight][t]{\textwidth}{
+ \noindent\textbf{\large \navy at Division} 
+ \vskip3mm
+ \noindent\textbf{\small \navy at Location}
+ \vskip3mm
+ \noindent\rule{\textwidth}{4pt} % thick line across page
+ \vskip-8pt
+ \noindent\rule{\textwidth}{2pt} % thinner line across page
+%    \end{macrocode}
+%
+% Vertically skip 4\,mm and state the report number, report date, and report type.
+%
+%    \begin{macrocode}
+\vspace{4mm}\\
+\noindent
+\navy at ReportNumber \ \navy at ReportDate \\ \navy at ReportType \\
+%    \end{macrocode}
+%
+% Vertically skip 1.7\,cm and insert the report tiltle and author(s). Note that the
+% blank lines are needed in order for the \cmd{\vspace} to work properly.
+%
+%    \begin{macrocode}
+\vspace{1.7cm}\\
+{\Large \textbf{\navy at ReportTitle}
+\vspace{1cm}\\
+\normalsize
+\noindent 
+by \\ \navy at Author
+}\\
+%    \end{macrocode}
+%
+% Finish adding the content to the page by placing the Navy logo and the Distribution 
+% Statement at the bottom, closing off the page with a horizontal rule. Note that the
+% Distribution Statement outlined by horizontal lines is produced within a {\it minipage}
+% environment.
+%
+%    \begin{macrocode}
+\vfill
+\noindent
+\includegraphics[width=21mm]{graphics/navy-logo-102.png} 
+\hspace{0.6in}
+\begin{minipage}{0.75\textwidth}
+\vspace{-0.8cm}
+\hrule height 4pt
+\vspace{4pt}
+\noindent
+\parbox[c]{\textwidth}{
+\vspace{4pt}
+\textbf{\small \navy at DistributionStatement}
+\vspace{4pt}
+}
+\hrule height 4pt
+\end{minipage}}
+%    \end{macrocode}
+%
+% Finish up the tiitle page.
+% 
+%    \begin{macrocode}
+ \end{mdframed}
+ \end{minipage}
+ \end{titlepage}
+%    \end{macrocode}
+% 
+% Finally, the last step is to set all of the now unused definitions to
+% \cmd{\relax}, thereby freeing some space.
+%
+%    \begin{macrocode}
+%  \thispagestyle{empty}
+
+  \global\let\NavyDivision\relax
+  \global\let\navy at Division\relax
+  \global\let\Location\relax
+  \global\let\navy at Location\relax
+  \global\let\ReportNumber\relax
+  \global\let\navy at ReportNumber\relax
+  \global\let\NavyReportDate\relax
+  \global\let\navy at ReportDate\relax
+  \global\let\NavyReportType\relax
+  \global\let\navy at ReportType\relax
+  \global\let\ReportTitle\relax
+  \global\let\navy at ReportTitle\relax
+  \global\let\NavyAuthor\relax
+  \global\let\navy at Author\relax
+  \global\let\NavyRelease\relax
+  \global\let\navy at DistributionStatement\relax
+  \global\let\MarginTitle\relax
+  \global\let\navy at MarginTitle\relax
+
+  \global\let\MakeNavyCoverPage\relax} % end of \MakeNavyCoverPage
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MakeCarderockDivPage}
+% 
+% The \cmd{\MakeCarderockDivPage} command creates the Technical Components
+% page for the Carderock Division/NSWC. The text for the page is explicitly included
+% in this initial release of the package, rather than passed into the macro via a user 
+% interface, because it is not known at the time of writing what are the requirements
+% of other Navy organizations. This is subject to change in future if there is a need
+% and demand to do so.
+% 
+% The Technical Components page is produced using the fancy page style defined
+% via the \cmd{\NavyFormID} described above so the document code appears
+% in the footer.
+%
+%    \begin{macrocode}
+\newcommand\MakeCarderockDivPage{%
+  \thispagestyle{NavyFormIDStyle} % insert document code in footer
+%    \end{macrocode}
+%
+% Insert page title at the top in reverse image followed by the list of Navy codes
+% residing at Carderock/NSWC.
+%
+%    \begin{macrocode}
+  \section*{ \sffamily\colorbox{black}{\bfseries\textcolor{white}
+  {\large MAJOR CARDEROCK DIVISION TECHNICAL COMPONENTS}} }
+  \vspace{8ex}
+
+  \doublespace
+  \begin{tabular}{lrl}
+  CODE & 011 & Director of Technology \\
+  & 10 & Machinery Systems/Programs and Logistics Directorate \\
+  & 20 & Ship Systems \& Programs Directorate \\
+  & 50 & Hydromechanics Directorate \\
+  & 60 & Survivability, Structures and Materials Directorate \\
+  & 70 & Signatures Directorate \\
+  & 80 & Machinery Research \& Development Directorate \\
+  & 90 & Machinery In-Service Engineering Directorate
+  \end{tabular}
+  \singlespace
+%    \end{macrocode}
+%
+% State types of reports produced by the division at the bottom of the page in a framed box.
+%
+%    \begin{macrocode}
+  \vfill % push minipage to bottom of page
+
+  \noindent
+  \fbox{\begin{minipage}{\textwidth}
+  \vspace{2ex}
+  \begin{center}
+  CARDEROCK DIVISION, NSWC, ISSUES THREE TYPES OF REPORTS:
+  \end{center}
+
+  \parbox{0.97\textwidth}{
+  \begin{enumerate}
+  \item \textbf{CARDEROCKDIV reports, a formal series,} contain information 
+  of permanent technical value. They carry a consecutive numerical 
+  identification regardless of their classification or the originating 
+  directorate. 
+  \item \textbf{Directorate reports, a semiformal series,} contain 
+  information of a preliminary, temporary, or proprietary nature or of 
+  limited interest or significance. They carry an alpha numeric 
+  identification issued by the originating directorate. 
+  \item \textbf{Technical memoranda, an informal series,} contain 
+  technical documentation of limited use and interest. They are primarily 
+  working papers intended for internal use. They carry an identifying 
+  number which indicates their type and the numerical code of the 
+  originating directorate. Any distribution outside CARDEROCKDIV must be 
+  approved by the head of the originating directorate on a case-by-case 
+  basis.
+  \end{enumerate}
+  }
+  \vspace{1ex}
+
+  \end{minipage}}
+%    \end{macrocode}
+%
+% Force new page and close the \cmd{\MakeCarderockDivPage} macro.
+%
+%    \begin{macrocode}
+  \newpage
+  \global\let\MakeCarderockDivPage\relax} % end of \MakeCarderockDivPage
+%    \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%</package>
+% \fi%
+%
+% \Finale
+%


Property changes on: trunk/Master/texmf-dist/source/latex/navydocs/navydocs.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/navydocs/navydocs.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/navydocs/navydocs.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/navydocs/navydocs.ins	2016-07-06 20:32:03 UTC (rev 41643)
@@ -0,0 +1,94 @@
+%%
+%% This is file `navydocs.ins', the installation file for the `navydocs'
+%% package.   
+%%
+%% Copyright (C) 2016 Peter Andrew Rochford.
+%%
+%% The navydocs package may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c 
+%% of this license or (at your option) any later version.  The latest
+% version of this license can be found at:
+%%     https://latex-project.org/lppl/
+%%
+%% This package consists of the files Makefile, navydocs.dtx, and
+%% navydocs.ins.
+%%
+%% The navydocs package is distributed in the hope that it will be
+%% useful, but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed 
+%% or implied, including, but not limited to, the implied warranties of
+%% MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+%% Project Public License for more details.
+
+\def\batchfile{navydocs.ins}
+\input docstrip.tex
+
+\keepsilent
+\preamble
+
+Copyright (C) 2016 Peter Andrew Rochford.
+
+This file is NOT the source for navydocs, because almost all comments
+have been stripped from it.  It is NOT the preferred form of navydocs for
+making modifications to it.
+
+Therefore you can NOT redistribute and/or modify THIS file.  You can
+however redistribute the complete source package (Makefile, navydocs.dtx
+and navydocs.ins) and/or modify it under the terms of the LaTeX Project
+Public License, either version 1.3c of this license or (at your option)
+any later version. The latest version of this license can be found at:
+https://latex-project.org/lppl/
+
+The navydocs package is distributed in the hope that it will be useful,
+but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed or
+implied, including, but not limited to, the implied warranties of
+MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+Project Public License for more details.
+
+\endpreamble
+\declarepreamble\samplepreamble
+
+Copyright (C) 2016 Peter Andrew Rochford.
+
+This file is NOT the source for sampleNavyReport, because almost all comments
+have been stripped from it.  It is NOT the preferred form of sampleNavyReport
+for making modifications to it.
+
+Therefore you can NOT redistribute and/or modify THIS file.  You can
+however redistribute the complete source package (Makefile, navydocs.dtx
+and navydocs.ins) and/or modify it under the terms of the LaTeX Project
+Public License, either version 1.3c of this license or (at your option)
+any later version. The latest version of this license can be found at:
+https://latex-project.org/lppl/
+
+The navydocs package is distributed in the hope that it will be useful,
+but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed or
+implied, including, but not limited to, the implied warranties of
+MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+Project Public License for more details.
+
+\endpreamble
+\keepsilent
+
+% programs and packages
+
+\generate{ \file{navydocs.sty}{\from{navydocs.dtx}{package}}
+	  \usepreamble\samplepreamble
+          \file{sampleNavyReport.tex}{\from{navydocs.dtx}{sample}}
+}
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space navydocs.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `navydocs.dtx'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{*}
+\Msg{***********************************************************}
+}
+ 
\ No newline at end of file

Added: trunk/Master/texmf-dist/tex/latex/navydocs/navydocs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/navydocs/navydocs.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/navydocs/navydocs.sty	2016-07-06 20:32:03 UTC (rev 41643)
@@ -0,0 +1,337 @@
+%%
+%% This is file `navydocs.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% navydocs.dtx  (with options: `package')
+%% 
+%% Copyright (C) 2016 Peter Andrew Rochford.
+%% 
+%% This file is NOT the source for navydocs, because almost all comments
+%% have been stripped from it.  It is NOT the preferred form of navydocs for
+%% making modifications to it.
+%% 
+%% Therefore you can NOT redistribute and/or modify THIS file.  You can
+%% however redistribute the complete source package (Makefile, navydocs.dtx
+%% and navydocs.ins) and/or modify it under the terms of the LaTeX Project
+%% Public License, either version 1.3c of this license or (at your option)
+%% any later version. The latest version of this license can be found at:
+%% https://latex-project.org/lppl/
+%% 
+%% The navydocs package is distributed in the hope that it will be useful,
+%% but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed or
+%% implied, including, but not limited to, the implied warranties of
+%% MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.  See the LaTeX
+%% Project Public License for more details.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{navydocs}[2016/06/22 Navy Documents]
+\typeout{Package: navydocs 2016/07/01 v1.1)}
+\providecommand{\eg}{{\it e.g.\/\ }}
+\newcommand{\MONTH}{%
+  \ifcase\the\month
+  \or January% 1
+  \or February% 2
+  \or March% 3
+  \or April% 4
+  \or May% 5
+  \or June% 6
+  \or July% 7
+  \or August% 8
+  \or September% 9
+  \or October% 10
+  \or November% 11
+  \or December% 12
+  \fi}
+\IfFileExists{eso-pic.sty}{%
+  \usepackage{eso-pic, rotating}}
+  {\PackageError {navydocs}{The eso-pic package was not found.}
+  {Install the eso-pic package on your system.}}
+\IfFileExists{mdframed.sty}{%
+\usepackage[
+linewidth=4pt,
+middlelinecolor= black,
+middlelinewidth=0.4pt,
+roundcorner=1pt,
+topline = false,
+rightline = false,
+bottomline = false,
+rightmargin=0pt,
+skipabove=0pt,
+skipbelow=0pt,
+leftmargin=0cm,
+innerleftmargin=1cm,
+innerrightmargin=0pt,
+innertopmargin=0pt,
+innerbottommargin=0pt,
+]{mdframed}}
+  {\PackageError {mdframed}{The mdframed package was not found.}
+  {Install the mdframed package on your system.}}
+\IfFileExists{fancyhdr.sty}{%
+  \usepackage{fancyhdr}}
+  {\PackageError {navydocs}{The fancyhdr package was not found.}
+  {Install the fancyhdr package on your system.}}
+\IfFileExists{relsize.sty}{%
+  \usepackage{relsize}}
+  {\PackageError {navydocs}{The relsize package was not found.}
+  {Install the relsize package on your system.}}
+\IfFileExists{setspace.sty}{%
+  \usepackage{setspace}}
+  {\PackageError {navydocs}{The setspace package was not found.}
+  {Install the setspace package on your system.}}
+\IfFileExists{xparse.sty}{%
+  \usepackage{xparse}}
+  {\PackageError {navydocs}{The xparse package was not found.}
+  {Install the xparse package on your system.}}
+\newcommand\NavyDivision[1]{\renewcommand\navy at Division{#1\hfill}}
+\newcommand\navy at Division{\relax}
+\newcommand\NavyDivisionLocation[1]{\renewcommand\navy at Location{#1\hfill}}
+\newcommand\navy at Location{\relax}
+\newcommand\NavyReportNumber[1]{
+  \ifx&#1&%
+     % Empty argument so use existing report number
+     \navy at ReportNumber
+  \else
+     % Use argument for report number
+     \renewcommand\navy at ReportNumber{#1}
+  \fi
+}
+\newcommand\navy at ReportNumber{\relax}
+\newcommand\NavyReportDate[1]{\renewcommand\navy at ReportDate{#1\hfill}}
+\newcommand\navy at ReportDate{\number\day~\MONTH~\number\year}
+\newcommand\NavyReportType[1]{\renewcommand\navy at ReportType{#1\hfill}}
+\newcommand\navy at ReportType{\relax}
+\newcommand\NavyReportTitle[1]{\renewcommand\navy at ReportTitle{#1\hfill}}
+\newcommand\navy at ReportTitle{\relax}
+\newcommand\NavyAuthor[1]{\renewcommand\navy at Author{#1\hfill}}
+\newcommand\navy at Author{\relax}
+\newcommand\NavyDistributionStatement[1]
+{\renewcommand\navy at DistributionStatement{#1\hfill}}
+\newcommand\navy at DistributionStatement{
+Approved for public release; distribution is unlimited.\hfill
+}
+\newcommand\countlines[1]{
+   {\setbox0\vbox{\noindent{#1}\par
+   \count@\z@
+   \loop
+   \unskip\unpenalty\unskip\unpenalty\unskip
+   \setbox0\lastbox
+   \ifvoid0
+       \xdef\numlines{\the\count@}
+   \else
+       \advance\count@\@ne
+   \repeat}}
+}
+\newcommand\getmargintextheight[1]{
+  \newdimen\margintextheight
+  \setbox0=\vbox{#1}
+  \margintextheight=\ht0 \advance\margintextheight by \dp0
+  % count number of lines so height of each line can be found
+  \countlines{#1}
+  % now determine height of each line
+  \margintextheight=\the\dimexpr \margintextheight / \numlines
+}
+\newif\ifmargin
+\margintrue
+
+\def\marginoffset{\the\dimexpr -\margintextheight*(\numlines - 1)  +
+\margintextheight*(\numlines - 1)/2}
+
+\def\navy at xmargin{
+\LenToUnit{\leftmargin - \oddsidemargin + \marginparwidth/2
++ \marginoffset}}
+\def\navy at ymargin{\LenToUnit{\paperheight - \textheight + \topmargin}}
+\newcommand\xmargin{\navy at xmargin}
+\newcommand\ymargin{\navy at ymargin}
+
+\DeclareDocumentCommand{\NavyMarginTitle}
+{
+O{ \LenToUnit{\leftmargin - \oddsidemargin + \marginparwidth/2
++ \marginoffset} }
+O{ \LenToUnit{\paperheight - \textheight + \topmargin} } m }{
+  \renewcommand\xmargin{#1}
+  \renewcommand\ymargin{#2}
+  \ifx&#3&%
+     % Empty argument so suppress margin title
+     \marginfalse
+  \else
+     % Use mandatory argument for margin title
+
+     % get height of each line for margin offset calculation
+     \getmargintextheight{#3}
+
+     \renewcommand\navy at MarginTitle{#3}
+  \fi
+}
+\newcommand\navy at MarginTitle{\relax}
+\newcommand\NavyFormID[1]{
+\fancypagestyle{NavyFormIDStyle}
+{\fancyhf{}\renewcommand{\headrulewidth}{0pt}
+\fancyfoot[L]{\scriptsize #1}} }
+\newif\ifnavy at undef
+\navy at undeffalse
+\newcommand{\navy at undefined}[1][\@empty]{%
+  \ifx \@empty#1\relax
+    \ifnavy at undef
+       \typeout{^^J%
+                navydocs Warning: There are required fields that are
+                undefined.%
+                ^^J}%
+     \fi
+  \else
+    \navy at undeftrue
+    \typeout{^^J%
+             navydocs Warning: \expandafter\string\csname #1
+             \endcsname\space is undefined.%
+             ^^J}%
+  \fi}
+\newcommand{\navy at checkfield}[1]{%
+  \setbox\@tempboxa\vbox{\csname navy@#1\endcsname}%
+  \ifdim \wd\@tempboxa =0pt
+    \navy at undefined[#1]
+  \fi}
+\AtEndDocument{\navy at undefined}
+\newcommand{\NavyTitlePage}{%
+   \global\let\thanks\@gobble
+   \MakeNavyTitlePage
+   \global\let\thanks\relax}
+\newcommand\MakeNavyTitlePage{%
+  \newpage
+  \if at twoside\ifodd\c at page\else
+    \null
+    \thispagestyle{empty}%
+    \newpage
+  \fi\fi
+  \navy at checkfield{Division}
+  \navy at checkfield{Location}
+  \navy at checkfield{ReportNumber}
+  \navy at checkfield{ReportDate}
+  \navy at checkfield{ReportType}
+  \navy at checkfield{ReportTitle}
+  \navy at checkfield{Author}
+  \navy at checkfield{DistributionStatement}
+\ifmargin
+\AddToShipoutPicture*{\put(\xmargin,\ymargin)
+ {\rotatebox{90}
+ {\scalebox{1}{\parbox[t]{\textheight}
+ {\textbf{\small \navy at MarginTitle}}
+ }}}}
+ \fi
+ \begin{titlepage}
+
+ \noindent
+ \begin{minipage}[t]{\textwidth}
+ \begin{mdframed}
+ \parbox[t][0.98\textheight][t]{\textwidth}{
+ \noindent\textbf{\large \navy at Division}
+ \vskip3mm
+ \noindent\textbf{\small \navy at Location}
+ \vskip3mm
+ \noindent\rule{\textwidth}{4pt} % thick line across page
+ \vskip-8pt
+ \noindent\rule{\textwidth}{2pt} % thinner line across page
+\vspace{4mm}\\
+\noindent
+\navy at ReportNumber \ \navy at ReportDate \\ \navy at ReportType \\
+\vspace{1.7cm}\\
+{\Large \textbf{\navy at ReportTitle}
+\vspace{1cm}\\
+\normalsize
+\noindent
+by \\ \navy at Author
+}\\
+\vfill
+\noindent
+\includegraphics[width=21mm]{graphics/navy-logo-102.png}
+\hspace{0.6in}
+\begin{minipage}{0.75\textwidth}
+\vspace{-0.8cm}
+\hrule height 4pt
+\vspace{4pt}
+\noindent
+\parbox[c]{\textwidth}{
+\vspace{4pt}
+\textbf{\small \navy at DistributionStatement}
+\vspace{4pt}
+}
+\hrule height 4pt
+\end{minipage}}
+ \end{mdframed}
+ \end{minipage}
+ \end{titlepage}
+
+  \global\let\NavyDivision\relax
+  \global\let\navy at Division\relax
+  \global\let\Location\relax
+  \global\let\navy at Location\relax
+  \global\let\ReportNumber\relax
+  \global\let\navy at ReportNumber\relax
+  \global\let\NavyReportDate\relax
+  \global\let\navy at ReportDate\relax
+  \global\let\NavyReportType\relax
+  \global\let\navy at ReportType\relax
+  \global\let\ReportTitle\relax
+  \global\let\navy at ReportTitle\relax
+  \global\let\NavyAuthor\relax
+  \global\let\navy at Author\relax
+  \global\let\NavyRelease\relax
+  \global\let\navy at DistributionStatement\relax
+  \global\let\MarginTitle\relax
+  \global\let\navy at MarginTitle\relax
+
+  \global\let\MakeNavyCoverPage\relax} % end of \MakeNavyCoverPage
+\newcommand\MakeCarderockDivPage{%
+  \thispagestyle{NavyFormIDStyle} % insert document code in footer
+  \section*{ \sffamily\colorbox{black}{\bfseries\textcolor{white}
+  {\large MAJOR CARDEROCK DIVISION TECHNICAL COMPONENTS}} }
+  \vspace{8ex}
+
+  \doublespace
+  \begin{tabular}{lrl}
+  CODE & 011 & Director of Technology \\
+  & 10 & Machinery Systems/Programs and Logistics Directorate \\
+  & 20 & Ship Systems \& Programs Directorate \\
+  & 50 & Hydromechanics Directorate \\
+  & 60 & Survivability, Structures and Materials Directorate \\
+  & 70 & Signatures Directorate \\
+  & 80 & Machinery Research \& Development Directorate \\
+  & 90 & Machinery In-Service Engineering Directorate
+  \end{tabular}
+  \singlespace
+  \vfill % push minipage to bottom of page
+
+  \noindent
+  \fbox{\begin{minipage}{\textwidth}
+  \vspace{2ex}
+  \begin{center}
+  CARDEROCK DIVISION, NSWC, ISSUES THREE TYPES OF REPORTS:
+  \end{center}
+
+  \parbox{0.97\textwidth}{
+  \begin{enumerate}
+  \item \textbf{CARDEROCKDIV reports, a formal series,} contain information
+  of permanent technical value. They carry a consecutive numerical
+  identification regardless of their classification or the originating
+  directorate.
+  \item \textbf{Directorate reports, a semiformal series,} contain
+  information of a preliminary, temporary, or proprietary nature or of
+  limited interest or significance. They carry an alpha numeric
+  identification issued by the originating directorate.
+  \item \textbf{Technical memoranda, an informal series,} contain
+  technical documentation of limited use and interest. They are primarily
+  working papers intended for internal use. They carry an identifying
+  number which indicates their type and the numerical code of the
+  originating directorate. Any distribution outside CARDEROCKDIV must be
+  approved by the head of the originating directorate on a case-by-case
+  basis.
+  \end{enumerate}
+  }
+  \vspace{1ex}
+
+  \end{minipage}}
+  \newpage
+  \global\let\MakeCarderockDivPage\relax} % end of \MakeCarderockDivPage
+\endinput
+%%
+%% End of file `navydocs.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/navydocs/navydocs.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-07-06 20:31:01 UTC (rev 41642)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-07-06 20:32:03 UTC (rev 41643)
@@ -409,7 +409,8 @@
     musixtex musixtex-fonts musixtnt musuos muthesis
     mversion mwcls mwe mweights mxedruli
     mychemistry mycv mylatexformat mynsfc
-  nag nameauth namespc nanumtype1 nar natbib natded nath nature navigator
+  nag nameauth namespc nanumtype1 nar natbib natded nath nature
+    navigator navydocs
     ncclatex ncctools
     nddiss ndsu-thesis needspace nestquot neuralnetwork nevelok
     newcommand newenviron newfile newlfm newpx newsletr newspaper

Modified: trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc	2016-07-06 20:31:01 UTC (rev 41642)
+++ trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc	2016-07-06 20:32:03 UTC (rev 41643)
@@ -88,6 +88,7 @@
 depend muthesis
 depend mynsfc
 depend nature
+depend navydocs
 depend nddiss
 depend ndsu-thesis
 depend nwejm

Added: trunk/Master/tlpkg/tlpsrc/navydocs.tlpsrc
===================================================================


More information about the tex-live-commits mailing list