Commit 8b061972 authored by Johnson, Seth R.'s avatar Johnson, Seth R.
Browse files

Add documentation and update makefile

parent b135edc3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,3 +22,4 @@
*.synctex.gz
*.temp
*.toc
*.fdb_latexmk
+32 −12
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#
fileinfo	:= LaTeX Makefile
author		:= Chris Monson
version		:= 2.2.1-alpha9
version		:= 2.2.1
#
.DEFAULT_GOAL	:= all
# Note that the user-global version is imported *after* the source directory,
@@ -126,6 +126,10 @@ export LC_ALL ?= C
#
#
# CHANGES:
# Chris Monson (2020-12-11):
# * Fix bcf datasource collection, add some tests, thanks to k4rtik on issue 126
# Chris Monson (2018-11-28):
# * Add bcf datasource collection for biber - thanks to llbit on issue 126
# Chris Monson (2014-09-04):
# * Allow graphic dependencies in texmf directories (anything .fls knows about).
# Chris Monson (2014-02-14):
@@ -1001,13 +1005,15 @@ cleanse-filename = $(subst .,_,$(subst /,__,$1))

# Escape dots and forward slashes.
# $(call escape-fname-regex,str)
escape-fname-regex	= $(subst /,\\/,$(subst .,\\.,$1))
escape-fname-regex	= $(subst /,\/,$(subst .,\.,$1))

# Test that a file exists
# $(call test-exists,file)
test-exists		= [ -e '$1' ]
# $(call test-not-exists,file)
test-not-exists   = [ ! -e '$1' ]
# $(call test-non-empty,file)
test-non-empty    = [ -s '$1' ]

# $(call move-files,source,destination)
move-if-exists		= $(call test-exists,$1) && $(MV) '$1' '$2'
@@ -1563,7 +1569,7 @@ endif
# Extensions generated by LaTeX invocation that can be removed when complete
rm_ext		:= \
	log *.log aux $(pre_pdf_extensions) pdf blg bbl out nav snm toc lof lot lol pfg \
	acn acr alg fls vrb idx ind ilg glg glo gls lox nls nlo nlg brf mtc* mlf* mlt* maf brf ist fmt
	fls vrb idx ind ilg glg glo gls lox nls nlo nlg brf mtc* mlf* mlt* maf brf ist fmt
backup_patterns	:= *~ *.bak *.backup body.tmp head.tmp

graph_stem	:= _graph
@@ -2002,7 +2008,6 @@ define get-log-index
$(SED) \
-e 's/^No file \(.*\.ind\)\.$$/TARGETS=\1/' \
-e 's/^No file \(.*\.[gn]ls\)\.$$/TARGETS=\1/' \
-e 's/^No file \(.*\.acr\)\.$$/TARGETS=\1/' \
-e 's/[[:space:]]/\\&/g' \
-e '/^TARGETS=/{' \
-e '  h' \
@@ -2045,6 +2050,20 @@ $(SED) \
$(SORT) | $(UNIQ)
endef

# Outputs bcf bibs to stdout. Arg 1 is the bcf file stem, arg 2 is the
# list of targets for each dependency found.
define get-bcf-bibs
if $(call test-non-empty,$1); then \
  $(SED) \
-e '/datasource/!d' \
-e 's/^[^>]*>//g' \
-e 's/<.*$$//g' \
-e '/\.bib$$/!s/$$/.bib/' \
-e 's!^!$2: !' \
'$1' | $(SORT) | $(UNIQ); \
fi
endef

# Makes a an aux file that only has stuff relevant to the target in it
# $(call make-auxtarget-file,<flattened-aux>,<new-aux>)
define make-auxtarget-file
@@ -2121,6 +2140,7 @@ endef
# $(call colorize-latex-errors,<log file>)
define colorize-latex-errors
$(SED) \
-e 's/^)$$//' \
-e '$${' \
-e '  /^$$/!{' \
-e '    H' \
@@ -2199,6 +2219,10 @@ $(SED) \
-e '  s//\1 --- Are you trying to build an include file?/' \
-e '  b error' \
-e '}' \
-e '/^Runaway argument?/{' \
-e '  s/I'"'"'ll try to recover.*//' \
-e '  b error' \
-e '}' \
-e '/.*\(!!! .*Undefined control sequence\)[^[:cntrl:]]*\(.*\)/{' \
-e '  s//\1: \2/' \
-e '  s/\nl\.[[:digit:]][^[:cntrl:]]*\(\\[^\\[:cntrl:]]*\).*/\1/' \
@@ -2814,7 +2838,7 @@ endef
# $(call make-ps,<dvi file>,<ps file>,<log file>,[<paper size>],[<beamer info>])
make-ps		= \
	$(DVIPS) -z -o '$2' $(if $(strip $4),-t$(strip $4),) '$1' \
		$(if $5,| $(enlarge_beamer)) > $3 2>&1
		$(if $(strip $5),| $(enlarge_beamer)) > $3 2>&1

# Convert Postscript to PDF
# $(call make-pdf,<ps file>,<pdf file>,<log file>,<embed file>)
@@ -3086,11 +3110,6 @@ endif
	$(QUIET)$(call echo-build,$<,$@)
	$(QUIET)$(call run-makeindex,$<,$@,$*.glg,$*.ist)

# Create an acronym file from a .ist file
%.acr:	%.acn %.tex %.ist
	$(QUIET)$(call echo-build,$<,$@)
	$(QUIET)$(call run-makeindex,$<,$@,$*.alg,$*.ist)

# Create a glossary file from a glossary input formatted for xindy
%.gls:	%.glo %.tex %.xdy
	$(QUIET)$(call echo-build,$<,$@)
@@ -3335,6 +3354,7 @@ endif
	$(call get-graphics,$*) >> $*.d; \
	$(call get-log-index,$*,$(addprefix $*.,aux aux.make)) >> $*.d; \
	$(call get-bibs,$*.aux.make,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \
	$(call get-bcf-bibs,$*.bcf,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \
	$(EGREP) -q "# MISSING stem" $*.d && $(SLEEP) 1 && $(RM) $*.pdf; \
	$(EGREP) -q "# MISSING format" $*.d && $(RM) $*.pdf; \
	$(call move-if-exists,$*.$(build_target_extension),$*.$(build_target_extension).1st.make); \
@@ -3544,7 +3564,8 @@ clean-auxiliary:
clean-nographics: clean-tex clean-deps clean-backups clean-auxiliary ;

.PHONY: clean-extra
	$(QUIET)$(call clean-files,$(clean-extra))
clean-extra:
	$(QUIET)$(call clean-files,$(cleanextra))

.PHONY: clean
clean: clean-generated clean-tex clean-graphics clean-deps clean-backups clean-auxiliary clean-extra ;
@@ -4230,7 +4251,6 @@ endef
#     log -> dot [label="Graphic file"]
#     log -> idx [label="No file *.ind"]
#     log -> glo [label="No file *.gls"]
#     log -> acn [label="No file *.acr"]
#     log -> nlo [label="No file *.nls"]
#     gpi -> gpi_data [label="plot '...'"]
#     gpi -> gpi_includes [label="load '...'"]
+1 −1
Original line number Diff line number Diff line
onlysources.tex	?= ornl-template-example.tex
# These next two lines should only be necessary if you haven't installed the package
_saved_TEXINPUTS := ${TEXINPUTS}
export TEXINPUTS ?= .:$(CURDIR)/../ornltm:$(_saved_TEXINPUTS)
export TEXINPUTS := .:$(CURDIR)/../ornltm:$(_saved_TEXINPUTS)
+18 −16
Original line number Diff line number Diff line
@@ -47,8 +47,6 @@
\date{\today}

% Define report number.
% Note: Defining the report number causes the 'draft' notices to be removed.
% Remove comment "%" below if that is desired.
%\reportnum{ORNL/TM-2016/XXX}

% Define division/directorate name. Replace "Division Name" with your
@@ -57,9 +55,11 @@

% Add a restriction notice to the cover page. Remove comment "%" below if that
% is desired.
\restrict\draft
\restrict{Not for public release.}
% \restrict{Official use only}
% \restrict{Official use only}
% \restrict{Business Sensitive}
%\restrict{Not for public release.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ACRONYMS
@@ -160,8 +160,10 @@ method on the page. This \acl{tm} class is used for reports at \acl{ornl}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT CONTENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{First-Order Heading}
\section{FIRST-ORDER HEADING}
\label{sec:firstsec}
\marginpar{Sections and subsections must be manually capitalized to render
properly in the table of contents.}

Begin text here. You can reference acronyms such as \ac{ornl}, and when
referencing the next time they will automatically be replaced with shortened
@@ -180,7 +182,7 @@ and merges the author(s) will have. These breaks are treated as spaces in the
final output.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Second-Order Heading}
\subsection{SECOND-ORDER HEADING}

Begin text here.

@@ -207,7 +209,7 @@ section is not too short.}
\section{Figure Placement}
\label{sec:figures}

\subsection{Figures}
\subsection{FIGURES}

Insert figures after the text callout but as close to the call out as possible.
(They always have a caption describing them and they are always numbered. LaTeX
@@ -242,10 +244,10 @@ wherever it wants unless you explicitly command it to do otherwise.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Table Placement}
\section{TABLE PLACEMENT}
\label{sec:tables}

\subsection{Tables}
\subsection{TABLES}

As with figures, tables are numbered consecutively, or consecutively by section,
and should follow their call out (see Table \ref{tab:1}) in the text as closely
@@ -309,10 +311,10 @@ vitae. Sed et molestie sapien. Nullam commodo id mauris quis mollis.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Citations}
\section{CITATIONS}
\label{sec:citations}

\subsection{Using In-Text Citations}
\subsection{USING IN-TEXT CITATIONS}
For the \ac{ornl} \ac{tm} reports, \textit{Chicago Manual of Style} references and
citations are preferred. Of these, you can choose between author-date +
references cited or footnote + references cited.
@@ -335,7 +337,7 @@ labeled ``Bibliography.''

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Lists}
\section{LISTS}
\label{sec:lists}

Flanges used in ultra-high vacuum service are commonly closed with metallic
@@ -367,7 +369,7 @@ techniques distort beyond a point that they can be sealed.
    sealed.
\end{itemize}

\subsection{Second-Order Heading}
\subsection{SECOND-ORDER HEADING}

Flanges used in ultra-high vacuum service are commonly closed with metallic
gaskets or seals. The geometry of the seal interface is critical for proper
@@ -441,7 +443,7 @@ efficitur justo sed diam suscipit varius.
% APPENDICES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
\section{First Appendix}
\section{FIRST APPENDIX}
\label{sec:firstapp}

If each appendix contains similarly formatted text as the body of the document
@@ -454,7 +456,7 @@ be used.
\end{equation}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Second Appendix}
\section{SECOND APPENDIX}
\label{sec:secondapp}

If each appendix contains similarly formatted text as the body of the document
+1 −2
Original line number Diff line number Diff line
@@ -42,8 +42,7 @@
\PackageWarning{ornltm}{No division name has been defined.}}
\newcommand{\division}[1]{\def\@division{#1}\@divisiondefinedtrue}

% Use the \reportnum command to define a report number. If undefined, the
% document is a draft.
% Use the \reportnum command to define a report number.
\newif\if@reportnumdefined
\@reportnumdefinedfalse
\def\@reportnum{ORNL/TM-XXXX/XXX%