Skip to content

Commit

Permalink
Improved caption generated for tables; as per #833
Browse files Browse the repository at this point in the history
  • Loading branch information
samm82 committed May 3, 2019
1 parent 1857a38 commit ede32aa
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 24 deletions.
4 changes: 2 additions & 2 deletions code/drasil-printers/Language/Drasil/TeX/Print.hs
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ makeTable lls r bool t =
%% pure (text "\\endhead")
%% makeRows (tail lls)
%% (pure (text "\\bottomrule"))
%% (if bool then caption t else empty)
%% (if bool then caption t else caption empty)
%% label r
%% (pure $ text ("\\end{" ++ ltab ++ "}"))
where ltab = tabType $ anyLong lls
tabType True = ltabu
tabType False = ltable
ltabu = "longtabu" --Only needed if "X[l]" is used
ltable = "longtable" ++ (if not bool then "*" else "")
ltable = "longtable"
descr True = "X[l]"
descr False = "l"
--returns "X[l]" for columns with long fields
Expand Down
11 changes: 7 additions & 4 deletions code/stable/gamephys/SRS/Chipmunk_SRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ \section{Reference Material}
\subsection{Table of Units}
\label{Sec:ToU}
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the table lists the symbol, a description and the SI name.
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Symbol & Description
\\
Expand All @@ -52,8 +52,9 @@ \subsection{Table of Units}
s & time (second)
\\
\bottomrule
\caption{}
\label{Table:ToU}
\end{longtable*}
\end{longtable}
\subsection{Table of Symbols}
\label{Sec:ToS}
The table that follows summarizes the symbols used in this document along with their units. Throughout the document, symbols in bold will represent vectors, and scalars otherwise. The symbols are listed in alphabetical order.
Expand Down Expand Up @@ -172,11 +173,12 @@ \subsection{Table of Symbols}
$ϕ$ & Orientation & rad
\\
\bottomrule
\caption{}
\label{Table:ToS}
\end{longtabu}
\subsection{Abbreviations and Acronyms}
\label{Sec:TAbbAcc}
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Abbreviation & Full Form
\\
Expand Down Expand Up @@ -213,8 +215,9 @@ \subsection{Abbreviations and Acronyms}
Uncert. & Typical Uncertainty
\\
\bottomrule
\caption{}
\label{Table:TAbbAcc}
\end{longtable*}
\end{longtable}
\section{Introduction}
\label{Sec:Intro}
Due to the rising cost of developing video games, developers are looking for ways to save time and money for their projects. Using an open source physics library that is reliable and free will cut down development costs and lead to better quality products.
Expand Down
11 changes: 7 additions & 4 deletions code/stable/glassbr/SRS/GlassBR_SRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ \section{Reference Material}
\subsection{Table of Units}
\label{Sec:ToU}
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the table lists the symbol, a description and the SI name.
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Symbol & Description
\\
Expand All @@ -50,8 +50,9 @@ \subsection{Table of Units}
s & time (second)
\\
\bottomrule
\caption{}
\label{Table:ToU}
\end{longtable*}
\end{longtable}
\subsection{Table of Symbols}
\label{Sec:ToS}
The table that follows summarizes the symbols used in this document along with their units. The symbols are listed in alphabetical order.
Expand Down Expand Up @@ -148,11 +149,12 @@ \subsection{Table of Symbols}
${w_{TNT}}$ & Explosive mass in equivalent weight of TNT & kg
\\
\bottomrule
\caption{}
\label{Table:ToS}
\end{longtabu}
\subsection{Abbreviations and Acronyms}
\label{Sec:TAbbAcc}
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Abbreviation & Full Form
\\
Expand Down Expand Up @@ -203,8 +205,9 @@ \subsection{Abbreviations and Acronyms}
Uncert. & Typical Uncertainty
\\
\bottomrule
\caption{}
\label{Table:TAbbAcc}
\end{longtable*}
\end{longtable}
\section{Introduction}
\label{Sec:Intro}
Software is helpful to efficiently and correctly predict the blast risk involved with the glass slab. The blast under consideration is any kind of man-made explosion. The software, herein called GlassBR, aims to predict the blast risk involved with the glass slab using an intuitive interface.
Expand Down
11 changes: 7 additions & 4 deletions code/stable/nopcm/SRS/NoPCM_SRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ \section{Reference Material}
\subsection{Table of Units}
\label{Sec:ToU}
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the table lists the symbol, a description and the SI name.
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Symbol & Description
\\
Expand All @@ -52,8 +52,9 @@ \subsection{Table of Units}
W & power (watt)
\\
\bottomrule
\caption{}
\label{Table:ToU}
\end{longtable*}
\end{longtable}
\subsection{Table of Symbols}
\label{Sec:ToS}
The table that follows summarizes the symbols used in this document along with their units. The choice of symbols was made to be consistent with the heat transfer literature and with existing documentation for solar water heating systems. The symbols are listed in alphabetical order.
Expand Down Expand Up @@ -138,11 +139,12 @@ \subsection{Table of Symbols}
$$ & Gradient & --
\\
\bottomrule
\caption{}
\label{Table:ToS}
\end{longtabu}
\subsection{Abbreviations and Acronyms}
\label{Sec:TAbbAcc}
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Abbreviation & Full Form
\\
Expand Down Expand Up @@ -177,8 +179,9 @@ \subsection{Abbreviations and Acronyms}
Uncert. & Typical Uncertainty
\\
\bottomrule
\caption{}
\label{Table:TAbbAcc}
\end{longtable*}
\end{longtable}
\section{Introduction}
\label{Sec:Intro}
Due to increasing cost, diminishing availability, and negative environmental impact of fossil fuels, there is a higher demand for renewable energy sources and energy storage technology. Solar water heating systems provide a novel way of storing energy.
Expand Down
11 changes: 7 additions & 4 deletions code/stable/ssp/SRS/SSP_SRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ \section{Reference Material}
\subsection{Table of Units}
\label{Sec:ToU}
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the table lists the symbol, a description and the SI name.
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Symbol & Description
\\
Expand All @@ -48,8 +48,9 @@ \subsection{Table of Units}
Pa & pressure (pascal)
\\
\bottomrule
\caption{}
\label{Table:ToU}
\end{longtable*}
\end{longtable}
\subsection{Table of Symbols}
\label{Sec:ToS}
The table that follows summarizes the symbols used in this document along with their units. Throughout the document, values with a subscript $i$ implies that the value will be taken at and analyzed at a slice or slice interface composing the total slip mass.
Expand Down Expand Up @@ -222,11 +223,12 @@ \subsection{Table of Symbols}
${\mathbf{ℓ}_{s}}$ & Surface Lengths of Slices: in the direction parallel to the slope of the surface of each slice & m
\\
\bottomrule
\caption{}
\label{Table:ToS}
\end{longtabu}
\subsection{Abbreviations and Acronyms}
\label{Sec:TAbbAcc}
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Abbreviation & Full Form
\\
Expand Down Expand Up @@ -263,8 +265,9 @@ \subsection{Abbreviations and Acronyms}
Uncert. & Typical Uncertainty
\\
\bottomrule
\caption{}
\label{Table:TAbbAcc}
\end{longtable*}
\end{longtable}
\section{Introduction}
\label{Sec:Intro}
A slope of geological mass, composed of soil and rock and sometimes water, is subject to the influence of gravity on the mass. This can cause instability in the form of soil or rock movement. The effects of soil or rock movement can range from inconvenient to seriously hazardous, resulting in signifcant life and economic losses. Slope stability is of interest both when analysing natural slopes, and when designing an excavated slope. Slope stability analysis is the assessment of the safety of a slope, identifying the surface most likely to experience slip and an index of its relative stability known as the factor of safety.
Expand Down
11 changes: 7 additions & 4 deletions code/stable/swhs/SRS/SWHS_SRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ \section{Reference Material}
\subsection{Table of Units}
\label{Sec:ToU}
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the table lists the symbol, a description and the SI name.
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Symbol & Description
\\
Expand All @@ -52,8 +52,9 @@ \subsection{Table of Units}
W & power (watt)
\\
\bottomrule
\caption{}
\label{Table:ToU}
\end{longtable*}
\end{longtable}
\subsection{Table of Symbols}
\label{Sec:ToS}
The table that follows summarizes the symbols used in this document along with their units. The choice of symbols was made to be consistent with the heat transfer literature and with existing documentation for solar water heating systems. The symbols are listed in alphabetical order.
Expand Down Expand Up @@ -192,11 +193,12 @@ \subsection{Table of Symbols}
$$ & Gradient & --
\\
\bottomrule
\caption{}
\label{Table:ToS}
\end{longtabu}
\subsection{Abbreviations and Acronyms}
\label{Sec:TAbbAcc}
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Abbreviation & Full Form
\\
Expand Down Expand Up @@ -235,8 +237,9 @@ \subsection{Abbreviations and Acronyms}
Uncert. & Typical Uncertainty
\\
\bottomrule
\caption{}
\label{Table:TAbbAcc}
\end{longtable*}
\end{longtable}
\section{Introduction}
\label{Sec:Intro}
Due to increasing cost, diminishing availability, and negative environmental impact of fossil fuels, there is a higher demand for renewable energy sources and energy storage technology. Solar water heating systems incorporating phase change material (PCM) use renewable energy sources and provide a novel way of storing energy. Solar water heating systems incorporating PCM improve over the traditional solar water heating systems because of their smaller size. The smaller size is possible because of the ability of PCM to store thermal energy as latent heat, which allows higher thermal energy storage capacity per unit weight.
Expand Down
6 changes: 4 additions & 2 deletions code/stable/tiny/SRS/Tiny_SRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ \section{Reference Material}
\subsection{Table of Units}
\label{Sec:ToU}
The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the table lists the symbol, a description and the SI name.
\begin{longtable*}{l l}
\begin{longtable}{l l}
\toprule
Symbol & Description
\\
Expand All @@ -41,8 +41,9 @@ \subsection{Table of Units}
W & power (watt)
\\
\bottomrule
\caption{}
\label{Table:ToU}
\end{longtable*}
\end{longtable}
\subsection{Table of Symbols}
\label{Sec:ToS}
The table that follows summarizes the symbols used in this document along with their units. The choice of symbols was made to be consistent with the nuclear physics literature and with that used in the FP manual.
Expand All @@ -65,6 +66,7 @@ \subsection{Table of Symbols}
${τ_{c}}$ & Clad thickness & --
\\
\bottomrule
\caption{}
\label{Table:ToS}
\end{longtabu}
\section{Specific System Description}
Expand Down

0 comments on commit ede32aa

Please sign in to comment.