Debian Codegraph @

texmf-dist/doc/latex/ndsu-thesis-2022/NDSU-Thesis-Extended.tex

raw
1 \documentclass[phd]{ndsu-thesis-2022}
2
3 %------------------------------------------------------------------------------
4 %-------------[Options]-applicable in this class----------------------
5 % Degree options (any of these): phd, ms-thesis, ms-paper, ma-thesis, ma-paper, default is phd;
6 % Whole document font size (any of these): 10pt, 11pt, 12pt, default = 12pt;
7 % nonumber = document without chapter/section numbering - one of the NDSU template style, default = numbered, tables and figures are serially numbered;
8 % chapternumber = document with only chapter numbering and no number of other sections, tables and figures are numbered with chapter numbers;
9 % nojustify = ragged-right (non-hyphenated whole words) passages, default = justified (hyphenated words) with straight right margin;
10 % draft = no figures but box frames, default = final;
11 % showframe = frame around the text area to check how text fills in the margins - this with draft option shows the items crossing the frame, default = noshowframe;
12 % fonts (any of these): bookman, charter, gentium, kpfonts, libertine, mathdesign, mathptmx, newcent, palatino, tgtermes, times, tgbonum, tgpagella, tgschola, utopia, zlmtt, default = LaTeX computer modern.
13 %------------------------------------------------------------------------------
14
15 %---------------------------------------------------------------------------------------------------
16 % --------------Other useful commands or shortcuts available are:-----------------
17 % \listofabbreviations = A 2-col tabular environment; Usage: {SI & System International}\\
18 % \listofsymbols = A 2-col tabular environment; Usage: {$A$ & Area (\si{\m\squared})}\\
19 % \tempend{*.sty}{*.bib} = temporarily ending the document with reference listing
20 % \myspacing = defined to give the correct spacing of about 23 lines per page
21 % \myheading = proper numbering and format
22 % \si{} and \SI{}{} = SI units from siunitx package that gives proper spacing between numbers and units
23 % \citep and \citet = natbib package commands application with options
24 % \myfig{5 items} = shortcut for regular figures {placement}{size}{file}{caption}{label}
25 % \myfigls {5 items} = shortcut for landscape figures {placement}{size}{file}{caption}{label}
26 % \cref and \Cref = use of cleveref package based reference
27 % \tabcolsep = to stretch the tables to fill the entire width
28 % \resizebox = to adjust the size of tables to fit the margins (font size will change)
29 % \toprule, \midrule, \cmidrule, \bottomrule = booktabs package commands for tables
30 % tablenotes env. = threeparttable package commands for tables with footnotes
31 % longtable env. = for longer tables that spans several pages from longtable package - can be combined with threeparttable t
32 % \abovedisplayskip = to adjust the space above the displayed items
33 % \hl, \nt, \dt, \rt, \notes = annotation commands: highlight, new text, delete text, replace text, and todo notes
34 % \url = URLs break well as expected at the right margin (necessary code added in class)
35 % \namedappendices{A}{Name ... } = multiple appendices - correctly producing all elements
36 % \myfigap, \myfigapls = appendix regular figure and appendix landscape figure {5 items as before}
37 % \citestyle{} = predefined natbib styles (options: plain, agu, egu, agms, dcu, kluwer, cospar, nature) use this after \usepackage[sort&compress]{natbib}
38 % \lstset{e.g. language, font, style, color} options and {lstlisting} environment of listings package for programs and algorithms source code listing
39 % \closeappendices = produces all elements (loat, loaf) when the last appendix does not have at least a figure and a table. If present, no need to use
40 %---------------------------------------------------------------------------------------------------
41
42 %-----------------------------------------------------------------------------
43 %--------------------Load specific packages--------------------------
44 \usepackage[sort&compress]{natbib}
45 \citestyle{arms} % plain, agu, egu, agms, dcu, kluwer, cospar, nature
46 \newtheorem{theorem}{Theorem}[section]
47 \newtheorem{corollary}{Corollary}[theorem]
48 \newtheorem{lemma}{Lemma}[corollary]
49 %-----------------------------------------------------------------------------
50
51 %-----------------------------------------------------------------------------
52 %\AtBeginDocument{\raggedright} % No justification - NDSU template; justification also okay
53 \newcommand\myspacing{1.9} % 23 lines/page needs 1.9 for thesis; 1.5 for proposal
54 \newcommand\italk[1]{\textcolor{blue}{#1}} % for my texts
55 \newcommand\cmd[1]{\textbackslash\texttt{#1}} % for commands
56 \newcommand\tend{\tempend{apalike}{my-bib-file}} % shortcut for tempend{bst}{bib}
57 %\captionsetup[figure]{labelformat=simple, labelsep=colon, labelfont=it,textfont={bf,it}}
58 %\captionsetup[table]{labelformat=simple, labelsep=colon, labelfont=it,textfont={bf,it}}
59
60 \newcommand\lx{\LaTeX\xspace}
61 \newcommand\tx{\TeX\xspace}
62 \newcommand\bx{Bib\!\TeX\xspace}
63 \newcommand\rr{$\Rightarrow$\xspace}
64 \newcommand\vb[1]{\textcolor{blue}{\texttt{#1}}}%verb for text - Green3 of x11names is good
65 \newcommand\vbc[1]{\textcolor{blue}{\textbackslash\,\texttt{#1}}}%verb for commands
66
67 % listing package options loaded to produce the listing ()
68 \definecolor{pblue}{rgb}{0.13,0.13,1}
69 \definecolor{pgreen}{rgb}{0,0.5,0}
70 \definecolor{pred}{rgb}{0.9,0,0.3}
71 \definecolor{pgrey}{rgb}{0.46,0.45,0.48}
72
73 \lstset{language=Java,
74 showspaces=false,
75 showtabs=false,
76 breaklines=true,
77 showstringspaces=false,
78 breakatwhitespace=true,
79 commentstyle=\color{pgreen},
80 keywordstyle=\color{pblue},
81 stringstyle=\color{pred},
82 basicstyle={\ttfamily, \footnotesize},
83 moredelim=[il][\textcolor{pgrey}]{$$},
84 moredelim=[is][\textcolor{pgrey}]{\%\%}{\%\%}
85 }
86
87 \newcommand\tabletopinfo{
88 \toprule
89 Area (ha) & Number & Methods & Aggregation & Transport & Total & MD$^\dag$ & TSP$^\ddag$ \\
90 $[$ac$]$ & of baless & & (km) & (km) & (km) & (km) & (km) \\
91 \midrule
92 }
93
94 %-----------------------------------------------------------------------------
95 \title{An M.S. Thesis or Ph.D. Dissertation Extended Illustration Sample Generated - Using the new ``NDSU-Thesis-2022'' \LaTeX\ Class and Template}
96 \author{Samuel Quincy Student}
97 \date{September 2022}
98 \progdeptchoice{Department} % Use Department (or) Program
99 \department{Mathematics}
100
101 \cchair{Prof. John Adams} % Use actual committee members names
102 \cmembera{Prof. Abraham Lincoln}
103 \cmemberb{Prof. George Washington}
104 \cmemberc{Prof. Theodore Roosevelt} % If 3rd not required - delete this line
105 \approvaldate{2 September 2022}
106 \approver{Prof. James Garfield}
107
108 \abstract{
109 \hl{\emph{Note}: All the sample text from the example thesis and dummy text are in black and other instructions by the author are shown in color to draw users' attention. It should be noted that for the NDSU actual thesis/dissertation only black text should be used in general!}
110
111 This is the abstract for my thesis.
112
113 \italk{This document uses the new: \textbf{ndsu-thesis-2022.cls} class and \textbf{my-bib-file.bib} file storing the bibliography database.} \italk{NDSU has word count limitations and that should be adhered to. URL:} \textcolor{magenta}{\url{https://www.ndsu.edu/gradschool/current_students/graduation/theses_dissertations_papers/disquisition_formatting}}: \italk{``Margins must be at least \SI{1}{in} on each side of the page. Page number margins must be at least \SI{0.75}{in} from the bottom of the page. Abstracts appear after the Disquisition Approval page and begin on page iii of the disquisition. Abstracts for dissertations may not exceed 350 words. Abstracts for thesis and papers may not exceed 150 words.''}
114
115 \italk{One the useful resources to learn \LaTeX\ is: } \textcolor{magenta}{\url{https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes?utm_source=overleaf&utm_medium=email&utm_campaign=onboarding}} \italk{And others include (details in REFERENCES):} \textcolor{magenta}{(1) The Not So Short Introduction to \LaTeXe\/, (2) A Guide to \LaTeX\ and Electronic Publishing, and (3) \LaTeX\ -- A Document Preparation System.}
116
117 \italk{Several features such as \textcolor{magenta}{newcommand - shortcuts, longtable - spanning more pages, threeparttable - table notes, tables spanning the entire width (tabu), subfigures - side-by-side figures, tikz - code-generated vector figures, itemize - bullet list, enumerate - number list, matrix, advanced math, various symbols, etc.,} can be inserted into the thesis following standard resource materials. All the general \LaTeX\ based commands and features will work in the NDSU \LaTeX\ thesis class.}
118
119 \vspace{-1ex}
120 \italk{\hfill --- C. Igathinathane\\}
121 \italk{\hfill \scriptsize Ag \& Bio Sys Eng, NDSU}
122 }
123
124 \acknowledgements{I acknowledge people here.}
125 \dedication{This thesis is dedicated to my cat, Mr. Fluffles.}
126 \preface{You can put a preface here.}
127
128 \listofabbreviations{ % A 2-col tabular environment and may use titlecase; ;Usage: SI & System International\\
129 AC & Alternating Current \\
130 AGL & Above Ground Level \\
131 API & Application Programming Interface \\
132 NDSU & North Dakota State University \\
133 ZL & Zeta Level
134 }
135
136 \listofsymbols{ % A 2-col tabular environment and may use sentencecase; Usage: $A$ & Area (\si{\m\squared})\\
137 $A$ & Area (\si{\m\squared})\\
138 $e$ & Euler's constant (\num{2.718281828}) \\
139 $R^2$ & Coefficient of determination\\
140 $T$ & Time (s)\\
141 $v$ & Velocity (\si{\m\per\second})\\
142 $x$ & $x$-coordinate of image pixel \\
143 $y$ & $y$-coordinate of image pixel \\
144 $\sigma$ & Standard deviation\\
145 $\gamma$ & Hyperparameter in SVM
146 }
147
148 %-----------------------------------------------------------------------------
149 %-----------------------------------------------------------------------------
150 %-----------------------------------------------------------------------------
151 \begin{document}
152
153 %-----------------------------------------------------------------------------
154 %\setlength{\parindent}{0.5in} % Automatic indenting - NDSU
155 \begin{spacing}{\myspacing} % New line spacing - 23 lines per page
156 %\linenumbers % When required during review
157 %-------------------------------------------
158
159
160 %-----------------------------------------------------------------------------
161 %-----------------------------------------------------------------------------
162 \mypaperheading{General aspects --- Paper-Styled Chapter --- some study titles are long, and we are making it long enough so that it flow more than two line - oops it went to the fourth}{*}{This paper is planned to be submitted as a review article in the \emph{Advanced Technical Research Collection} journal. All the co-authors have assisted in the research direction and review of the manuscript.}
163
164 %-----------------------------------------------------------------------------
165 %\vspace{-1ex} % adjusting the space when needed
166 \section{Abstract}
167 \italk{Welcome to the \LaTeX\ ``ndsu-thesis-2022'' document class (NDSU class hereafter) and this document serve as an \textcolor{magenta}{\emph{extended example}} of a template. The users are urged to first get familiarized with the \textcolor{magenta}{\emph{NDSU class documentation}}, where most of the instructions for developing the thesis/dissertation using the NDSU class are clearly outlined. The NDSU class tries to address several dissertation requirements that graduate students come to expect from a template. While \LaTeX\ provides several tools to create a professional-looking document, it requires some learning --- a new set of skills is always a desirable thing to have, especially for students. Several leading universities have their \emph{thesis} class and template to help their students, and NDSU is no different (we do have our thesis class, and being used by several students!). The NDSU \LaTeX\ class (previous and updated) even features in the CTAN (Comprehensive \TeX\ Archive Network) repository of \LaTeX. CTAN is the central archive location that currently (July 2022) has 6249 packages from 2869 contributors and most of the packages are free to download and use immediately. A search on ``thesis'' returns 114 hits in CTAN showing the popularity of universities developing their \LaTeX\ class to help their grad students with dissertations. Given the quality of output, no wonder that several publishing houses (peer-reviewed journals and books) use \LaTeX\ as their system and provide authors with templates and reference styles. In this document/chapter, we outline and provide illustrations of using the updated NDSU class for developing thesis/dissertations, and users should have noted that this document itself uses the updated NDSU class.\\
168 }
169
170 %-----------------------------------------------------------------------------
171 \vspace{-5ex}
172 \section{Introduction --- Second Section After Abstract --- \LaTeX\ as a Tool for Students/Researchers}
173 \italk{Students having some exposure to computer programming, which is quite common nowadays, find their way easily with \LaTeX\ as it follows structure principles (e.g., HTML, program codes requiring open and end braces/brackets, etc.,). It is interesting to hear what the creator of \LaTeX\ says on this:}
174 \textcolor{magenta}{
175 \begin{quote}
176 \singlespacing
177 \raggedright
178 \textit{
179 \LaTeX\ is easy to use --- if you're one of the \pr{2} of the population who thinks logically and can read an instruction manual. The other \pt{98} of the population would find it very hard or impossible to use.}
180 \hfill --- Leslie Lamport (2001)
181 \end{quote}
182 }
183
184 \italk{As mentioned in the class documentation, it is safe to assume that students of higher education that came this far should have ``cared enough'' to improve the quality of their thesis/dissertation. On the other hand, some who may think they fall in the 98\,\% might discover that they have better logical skills than they originally believed. Based on our personal experience, \LaTeX\ is not as difficult as it was portrayed, and the benefits outweigh the effort (which also is a great skill to be acquired). Furthermore, using \LaTeX\ for the documentation needs (e.g., thesis/dissertation, paper, report, book, letter, CV, and so on) should be considered a useful skill in itself that students can pick up and use throughout their carrier.
185 }
186
187 %-------------------------------------------
188 \subsection{Using and Installing \LaTeX\ --- Online and Desktop Environments} \index{online editor} \index{standalone editor}
189 \italk{\emph{This text was reproduced from the NDSU class documentation (Sec. 2) for ready reference.} Several online (e.g., Overleaf, Kile LaTex Editor, Authorea, Papeeria, and so on) and standalone desktop versions (e.g., TeXMaker, TeXWorks, TexShop, TeXStudio, and so on) of \LaTeX\ editors are available. Online editors are ``ready-to-go,'' with several templates, tutorials, and help documentation, where the user need not install the software but require an internet connection. The desktop version requires software installation and updating (not very frequent). Resources (text and video instructions) are available on both how to use the online editor and install the \LaTeX\ desktop version of users' choice. As \LaTeX\ is open source, most of these editors are free.}
190
191 %-----------------------------------------------------------------------------
192 \section{Merits and Issues of Using \lx}
193 \italk{The advantages and the possible issues of using \lx as the system especially for preparing articles, thesis, and books from the viewpoint of ABE students and professionals, both beginners and advanced users, are listed and discussed.}
194
195 %-------------------------------------------
196 \subsection{Advantages}
197 \begin{itemize}[leftmargin=*, itemsep=0pt, parsep=3pt]
198
199 \item \italk{\lx is a open source, free yet advanced, software that can be readily downloaded and installed easily in every type of computing system (Windows, Linux, Unix, DOS, and Mac OS). \lx is also a system that grows benefiting from the user-developed codes (classes, packages, and templates), and all these updates are again open source and free to use.}
200
201 \item \italk{\lx allows the user to concentrate on the content while \lx performs the consistent formatting. In other words, the author does the ``writing'' and the \lx compiler performs the consistent ``formatting.'' --- In text processing systems (TPS), without a template different users will produce different outputs that lack consistency, but using a \lx class file, an essential argument of `\vb{documentclass},' ensures consistency across users.}
202
203 \item \italk{\lx packs in the sound principles of professional typesetting while formatting the documents. This introduces the concept of ``readability'' of documents that takes care of features like the number of words per line, their spacing, hyphenation, spacing of elements with reference to font size, ligature, etc. --- Authors, in general, may not be aware of these principles of typesetting, and they go by ``visual formatting'' to their personal preference, sometimes violating the principles of typesetting, resulting in documents that lack consistency across authors, while \lx does the ``logical formatting'' that is well suited for technical documents.}
204
205 \item \italk{\lx automates and updates several aspects of the document such as, table of contents (short and extended), list of tables, list of figures, index (multi-level), bibliography, nomenclature, glossary, among several other features. As \lx forces the users to follow the ``structural'' principles, automation of these features was possible and fully realized. --- Although such automation was possible with other TPS, the users are mostly unaware or rarely use them. Hence, this opportunity is usually \emph{missed} with TPS, but the benefits come naturally with \lx as it is a ``structural'' language.}
206
207 \item \italk{\lx is an excellent choice of a document preparation system for technical theses, reports, and books. For thesis, some of the universities have developed their \lx document class and template files, and when utilized will create a uniform feel for all the thesis prepared. --- This uniform style among thesis is possible with other TPS as well through templates, yet the other automation benefits are not quite common with TPS.}
208
209 \item \italk{Moving document elements while revising the document that calls for updating the numbers of the cited elements (headings, equations, floats, table of contents, index, etc.) will be handled automatically. --- This in the traditional manual way will be tedious and highly error-prone.}
210
211 \item \italk{The user can have all the references in one place as a \bx ($\ast$.\vb{bib}) flat-file that can have several hundred entries, yet being ASCII the size will be quite small. For example, for a 100 article entry, with 1757 lines of data, the size of the bib file is 68 KB, as opposed to the same content in the TPS doc file is 192 KB. Such master bib file will serve as ``Once Write and Read Many'' mode of operation and can be subjected to several style formats directly. --- Usually, such automation with TPS may require additional commercial software (e.g., EndNote).}
212
213 \item \italk{The references will be automatically generated with proper format when appropriate style files were used. This avoids the classical error of \emph{uncited references} and \emph{unlisted references}, which eliminates the need for the reviewer to check for this unproductive and easily avoidable mistake from the authors. With some styles (e.g., \vb{chicagoa.bst}) the reference items get sorted alphabetically. --- This is a clear advantage over other manual document preparation systems.}
214
215 \item \italk{\lx measurements are very accurate and the smallest dimension it can recognize is `\vb{sp}' (scaled point) and 65536 sp make 1 \vb{pt} that in turn $\approx$ 0.351366666666667 mm \citep{Wikibook2016}. Therefore the smallest dimension that is available in \lx for manipulating elements (e.g., moving and sizing) is approximately $\frac{1}{186517}$ mm = 0.00536 $\mu$m. --- Such fine tuning of elements is unheard of with TPS in general.}
216
217 \item \italk{Users can generate the submission-ready double-spaced ``review'' as well as two-column, double-sided, single-spaced ``final'' formats of the paper from the same source by utilizing appropriate options in the document class (e.g., \vb{elsarticle.cls}). --- Usually, with TPS the user has to create two different versions manually.}
218
219 \item \italk{It is possible to submit the rendered pdf version of the paper ($\ast$\vb{.pdf}) directly to the publishers (e.g., Elsevier Editorial System - EES) and after acceptance, the source code files ($\ast$\vb{.tex}) can be uploaded. This method subsequently allows for direct usage of the codes by the publishers during proofs production, without having to re-key or convert articles submitted using other TPS. --- Hence the usage of \lx results in quicker production and fewer errors in typesetting.}
220
221 \item \italk{Journal articles that are camera-ready, professionally typeset, journal-feel, compact (usually $\le$12 pages), offprint like, easy to maintain, having better readability can be prepared using \lx document classes ($\ast$\vb{.cls}) and templates furnished by several journals. --- However, with TPS the users usually end up with only the double-spaced version of the pre-submitted article (editable, very long, $\approx$ 20--40 pages), and the official generated version of the submitted article (pdf non-editable). The TPS tools are either not capable or do not encourage the authors to make outputs that resemble the final offprint, and they usually wait (sometimes for years) for the article to be finally published to see the paper in journal format.}
222
223 \item \italk{Several journals due to copyright restrictions will not allow posting the published versions of the articles on the websites of the authors; however, the journals allow posting the preprint version prepared by the author. --- With \lx as the system of document preparation, the user can produce an output that has the journal-feel and almost matches the published article, which enhances the authors' visibility and possible future citations from other readers.}
224
225 \item \italk{Advanced conditional formatting and handling of other features can be performed in \lx using the `\vb{ifthen}' package. For instance, the command} \ifthenelse{\boolean{@twocolumn}}{}{\\}\vbc{ifthenelse
226 \{\textbackslash boolean\{$@$twocolumn\}\}\{\}\{\textbackslash linenumbers\}\}} \italk{produces line numbers only when the document mode is single column format (e.g., review format). --- This is similar to using the ``If-Then-Else'' statement frequently used in programming languages for conditional controls.}
227
228 \item \italk{Document annotation features such as strikeout (\dt{``deleted text''}), inserted (\nt{``newly added''}), and highlighted (\hl{``deserves attention''}) text materials are incorporated using \vbc{sout\{text\}}, \vbc{textcolor\{color\}\{text\}}, and \vbc{hl\{text\}} commands. --- To use these features, `\vb{ulem}', `\vb{color}', and `\vb{soul}' packages should be included.}
229
230 \item \italk{Footnotes (see below; the command is \cmd{footnote\{text\}})\footnote{This is the footnote text and the footnote mark was automatically generated!}, margin notes {\marginpar{\scriptsize\textcolor{red}{This is margin note shown in color.}}} (shown in red), and end notes were also used to annotate the manuscript. It is equally possible to have these features in black \& white and with shades of grey. --- These commands can be simplified by defining shortcuts.}
231
232 \item \italk{Using advanced conditional formatting, a single source code could produce the ``Annotated'' (color-coded revised version showing inserted and deleted text) and ``Revised'' (updated final) versions of the journals articles. --- It is a common practice in the peer-reviewed article publication process during revision to create such versions. This usually takes the preparation of two different versions with the usual TPS.}
233
234 \item \italk{With \lx book document class such as `\vb{memoir.cls},' high-quality books with several professional layouts can be prepared. --- For very large books \lx is the non-crashing reliable system available and offers several tasks automation.}
235
236 \item \italk{Advanced use of \lx allows for drawing figures through `\vb{pstricks}' or `\vb{eepic}' packages that offer extended capabilities and produces good quality vectorized ($\ast$.\vb{eps} files) mathematical, graphical, flowchart, and geometrical figures \citep{Goossens2008g}. The method involves only codes prepared in ASCII text. --- This drawing capability is available through specific drawing tools in other TPS. Shown here is a generated picture using simple codes in `\vb{picture}' environment using \vbc{line}, and \vbc{multiput} commands among others \citep{Kern2007a, Kern2007, Mittelbach2004}:}
237
238 \newcount\WL \unitlength.91pt
239
240 \begin{center}
241 \begin{picture}(460,60)(355,-10)
242 \sffamily \tiny \linethickness{1.25\unitlength} \WL=360
243 \multiput(360,0)(1,0){456}%
244 {{\color[wave]{\the\WL}\line(0,1){50}}\global\advance\WL1}
245 \linethickness{0.25\unitlength}\WL=360
246 \multiput(360,0)(20,0){23}%
247 {\picture(0,0)
248 \line(0,-1){5} \multiput(5,0)(5,0){3}{\line(0,-1){2.5}}
249 \put(0,-10){\makebox(0,0){\the\WL}}\global\advance\WL20
250 \endpicture}
251 \end{picture}
252 \end{center}
253
254 \italk{However, it is also possible to draw some simple pictures using `\vb{picture}' environment directly in \lx, but they were restricted in their range. Shown below are simple drawings that used \vbc{circle}, \vbc{vector}, and \vbc{framebox} commands among others.}
255
256 \setlength{\unitlength}{0.25mm}
257 \begin{picture}(320,140)(-315,0)
258 \put(-260,50){{\thicklines \circle{90}}}
259 \put(-260,50){\vector(3,1){26}}
260 \put(-260,50){\vector(-3,-1){26}}
261 \put(-260,50){\vector(-1,3){9}}
262 \put(-265,34){\scriptsize $d$}
263 \put(-263,69){\scriptsize $r$}
264 \put(-200,50){\small $\textrm{Area}=
265 \frac{\pi d^2}{4}$ or \;{\small $\pi r^2$};}
266 \put(0,0){\thicklines \framebox(100,100){}}
267 \put(-1.5,105) {\line(0,1){16}}
268 \put(101.2,105){\line(0,1){16}}
269 \put(105,101.2){\line(1,0){16}}
270 \put(105,-1.5) {\line(1,0){16}}
271 \put(50,113) {\vector(1,0){50}}
272 \put(50,113){\vector(-1,0){50}}
273 \put(113,50) {\vector(0,1){50}}
274 \put(113,50){\vector(0,-1){50}}
275 \put(50,126){\scriptsize \makebox(0,0){$x$}}
276 \put(126,50){\scriptsize \makebox(0,0){$x$}}
277 \put(150,50){\small $\textrm{Area}= x^2$}
278 \end{picture}
279
280 \noindent \italk{The above drawings are vector-based and will retain their quality at any level of magnification.}
281
282 \item \italk{\lx can also be used to create conference posters (e.g., \vb{a0poster.cls} and \vb{sciposter.cls}) and presentation slides (eg. \vb{beamer.cls} and \vb{prosper.cls}) using appropriate classes and packages.}
283
284 \item \italk{Students could able to convert their thesis into a journal article with a few easy modifications, as the basic \lx code is the same irrespective of the documentclass or template.}
285
286 \item \italk{A knowledge of \lx forms a useful skill set for the students for pursuing an academic, research, or educational career. One can take advantage of the available various journal, books, curriculum vitae, reports, and thesis styles provided by the publishers and other online sources.}
287
288 \end{itemize}
289
290 %-------------------------------------------
291 \subsection{Possible Issues --- And Our Takes}
292 \begin{itemize}[leftmargin=*, itemsep=0pt, parsep=3pt]
293 \item \italk{People hold the idea that ``a steep learning curve is involved with \lx.'' However, users with programming knowledge (graduate students and researchers) will find it easy to switch from any TPS. Our experience says that it is quite logical to approach and fun to learn this excellent documentation tool. It should be seen as an opportunity to learn an important tool rather than looking at it as a steep learning exercise. One of the ready-to-work online platforms is \href{https://www.overleaf.com/login}{\textcolor{magenta}{\underline{Overleaf}}} where students can readily dive in and easily work with \lx and obtain various templates and helpful documentation all in one place. Steep learning curves are always associated with any new programming language or software. Mastering and exploring several aspects of \lx definitely requires involvement from the users but a lot of help is also readily available in the internet domain.}
294
295 \item \italk{Since \lx is an open source free software that is not a product of any commercial firm, there will not be official support, but \lx purchased through commercial sources will. However, using books, websites, cheatsheets, mailing lists, and forums could solve most of the issues.}
296
297 \item \italk{Developing user-defined classes, templates, and packages will be quite complicated, as it requires knowledge of plain \tx and \lx codes. Although, it should be understood that with thorough knowledge and understanding of the existing codes, it is possible to develop them as they were added on regular basis by developers throughout the world enriching the system. However, there is no need for a general user to venture into those areas, as most of the document preparation requirements could be addressed by employing the available sources.}
298
299 \item \italk{Debugging the codes needs some practice. As with any computer language, missing a symbol will stop the compilation with error messages or produce several errors. With experience, the users can able to decipher the error messages better and fix the codes easily.}
300
301 \item \italk{A reviewer or collaborating authors should know \lx in order to incorporate the suggestions and modify the document at the source level. The student \& advisor should be ``\lx aware'' or at least ``support'' the rendered output for the collaboration to work well. The ``Track-changes'' feature available with TPS is not directly available with \lx but available through specific packages. However, this is not an issue for one with a working knowledge in \lx; as one can readily make annotations such as insert, delete, highlight, and comment the document with color codes and special notes (e.g., footnotes, margin notes, endnotes) as indicated earlier.}
302
303 \item \italk{Although the ``spelling check'' facility is available with several \lx front-end editors, the ``grammar checking'' facility that is usually available with TPS is not available at present in \lx editors. However, other free tools (e.g., Grammarly and several others) can be used.}
304
305 \item \italk{Sometimes, especially when relying solely on online resources, there will be a lot of searching to find the right information to perform a particular task. Is it not a common feature of any good research (where we search for the information)?}
306
307 \end{itemize}
308
309 %-------------------------------------------
310 \subsection{Useful \LaTeX\ Resources --- Subsection (titlecase)}
311
312 \italk{There are some of the popular resources (they are \textcolor{magenta}{clickable} hyperlinks):}
313
314 \begin{itemize}
315 \setlength\itemindent{0.25in}
316 \item \citet{notso2021}: \textcolor{magenta}{\href{http://tug.ctan.org/info/lshort/english/lshort.pdf}
317 {The Not So Short Introduction to \LaTeXe\ }}
318
319 \item \citet{kopka2004guide}: \textcolor{magenta}{\href{https://www.math.ucdavis.edu/~tracy/courses/math129/Guide_To_LaTeX.pdf}
320 {A Guide to \LaTeX\ and Electronic Publishing}}
321
322 \item \citet{lamport94}: \textcolor{magenta}{\href{https://www.pearson.com/us/higher-education/program/Lamport-La-Te-X-A-Document-Preparation-System-2nd-Edition/PGM159713.html}
323 {\LaTeX\ -- A Document Preparation System}}
324
325 \item \citet{Wikibook2016}: \textcolor{magenta}{\href{http://upload.wikimedia.org/wikipedia/commons/2/2d/LaTeX.pdf}
326 {LaTeX}}
327
328 \item \citet{latxprojteam20}: \textcolor{magenta}{\href{https://www.latex-project.org/help/documentation/usrguide.pdf}
329 {\LaTeXe\ for authors}}
330
331 \item \citet{latxprojteam22}: \textcolor{magenta}{\href{https://www.latex-project.org/help/documentation/usrguide3.pdf}
332 {New \LaTeX\ methods for authors (starting 2020)}}
333
334 \item \citet{Chang2014cheat}: \textcolor{magenta}{\href{https://wch.github.io/latexsheet/latexsheet.pdf}
335 {\LaTeXe\ Cheat Sheet}}
336
337 \item \citet{pakin2021comp}: \textcolor{magenta}{\href{https://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}
338 {The Comprehensive \LaTeX\ Symbol List}}
339 \end{itemize}
340
341 \italk{References listing of these are shown in the combined reference chapter before the appendices (See page: \pageref{biblio})}
342
343 %-------------------------------------------
344 \subsection{Modern \LaTeX\ Commands - Calculations}
345 \italk{The modern \LaTeX\ has several new functionalities \citep{latxprojteam22}. Several new document commands and environments were now available for use. For example, simple calculations can be produced using \cmd{fpeval\{expression\}} the floating point evaluation command as:}
346
347 \verb|\fpeval{2*3*100+6}| = \fpeval{2*3*100+6}; \hspace{0.15in} Follows the standard PEMDAS rule
348
349 \verb|\fpeval{2*(10+6)}| = \fpeval{2*(10+6)}
350
351 \verb|\fpeval{22/7}| = \fpeval{22/7}
352
353 \verb|\fpeval{pi}| = \fpeval{pi}; \hspace{0.15in} So, $\pi$ is $\neq$ 22/7 (one good to 3 digits)
354
355 \verb|\fpeval{round(pi, 3)}| = \fpeval{round(pi, 3)}; \hspace{0.15in} Rounded to 3 decimals
356
357 \verb+\fpeval{deg}+ = \fpeval{deg}; \hspace{0.15in} 1 degree in radian
358
359 \verb|\LaTeX\ can now compute: $\frac{\sin(3.5)}{2} + 2 \cdot 10^{-3}|
360
361 \verb| = \fpeval{sin(3.5)/2 + 2e-3}$|
362
363 \lx can now compute: $\frac{\sin(3.5)}{2} + 2 \cdot 10^{-3} = \fpeval{sin(3.5)/2 + 2e-3}$
364
365 \italk{These mathematical functions finds use in calculations and technical document preparation.}
366
367 %-----------------------------------------------------------------------------
368 \section{Some New Helpful Commands and Options Available in NDSU Thesis~Class}
369
370 \begin{lstlisting}[basicstyle=\ttfamily\footnotesize\color{blue}] %or \small or \footnotesize etc.
371
372 ---------------------------------------------------------------------
373 -------------[Options]-applicable in this class----------------------
374 Document options (any of these): phd, ms-thesis, ms-paper, ma-thesis,
375 ma-paper, default is phd;
376
377 Whole document font size (any of these): 10pt, 11pt, 12pt,
378 default = 12pt;
379
380 nonumber = document without chapter/section numbering - one of the
381 NDSU template style, default = numbered;
382
383 nojustify = ragged-right (non-hyphenated whole words) passages,
384 default = justified (hyphenated words) with straight right margin;
385
386 draft = no figures but box frames, default = final;
387
388 showframe = frame around the text area to check how text fills in the
389 margins - this with draft option shows the items crossing the frame,
390 default = noshowframe;
391
392 fonts (any of these): bookman, charter, gentium, kpfonts, libertine,
393 mathdesign, mathptmx, newcent, palatino, tgtermes, times, tgbonum,
394 tgpagella, tgschola, utopia, zlmtt, default = LaTeX computer modern.
395 ---------------------------------------------------------------------
396 ---------Other useful commands or shortcuts available are:-----------
397 \listofabbreviations{} = A 2-col tabular environment; use titlecase
398 Usage: {SI & System International}\\
399 \listofsymbols{} = A 2-col tabular environment; use sentence case
400 Usage: {$A$ & Area (\si{\m\squared})}\\
401 \tempend{*.sty}{*.bib} = temporarily ending the document with
402 reference listing
403 \myspacing = defined to give the correct spacing of about
404 23 lines per page
405 \myheading{} = regular-styled chapter with proper numbering and format
406 Usage: \myheading{title}
407 \mypaperheading{3 args} = paper-styled chapter
408 Usage: \mypaperheading{title}{*}{footnote text}
409 \si{} and \SI{}{} = SI units from siunitx package that gives proper
410 spacing between numbers and units
411 \citep{} and \citet{} = natbib package commands for parenthetical and
412 textual citation while writing
413 \cref{} and \Cref{} = use of cleveref package based smart references
414 that understands figures, tables, sections, etc.
415 \tabcolsep = to stretch the tables to fill the entire width - need
416 to use trial-and-error to get correct output
417 \resizebox{} = to adjust the size of tables or figures to fit the margins
418 (font size will change)
419 \toprule, \midrule, \cmidrule, \bottomrule = booktabs package
420 commands for tables
421 \abovedisplayskip = to adjust the space above the displayed items,
422 especially equations
423 \hl{}, \nt{}, \dt{}, \rt{}{}, \notes{} = annotation commands: highlight,
424 new text, delete text, replace text, and todo notes (Sec. 2.4)
425 \url{} = URLs break well as expected at the right margin (necessary
426 code added in class)
427 \citestyle{} = predefined natbib styles (options: plain, agu, egu,
428 agms, dcu, kluwer, cospar, nature)
429 use this after \usepackage[sort&compress]{natbib}
430 \myfig[1 optional]{5 items} = shortcut for regular figures
431 [caption vertical placement]{placement}{size}{file}{caption}{label}
432 \myfigls[1 optional]{5 items} = shortcut for landscape figures
433 [caption vertical placement]{placement}{size}{file}{caption}{label}
434 ---------------------------------------------------------------------
435 tabu env. = automatic full-width table generation using tabu package.
436 Replaces tabular environment and can be used with booktabs package
437 tablenotes env. = threeparttable package commands for tables
438 with footnotes
439 longtable env. = for longer tables that span several pages from
440 longtable package - can be combined with threeparttable
441 ---------------------------------------------------------------------
442 \namedappendices{A}{Name ... } = multiple appendices with names
443 \myfigap, \myfigapls = appendix regular figure and appendix landscape
444 figure {1 optional + 5 items as before with figures}
445 \closeappendices = produces all elements (LOAT, LOAF) when the last
446 appendix does not have at least a figure and a table.
447 If present, no need to use it.
448 ---------------------------------------------------------------------
449 \end{lstlisting}
450
451 %-------------------------------------------
452 \subsection{Introduction Subsection}
453 \kant[4]
454
455 %-------------------------------------------
456 \subsubsection{Introduction Subsubsection}
457 \kant[6]
458
459 %-------------------------------------------
460 \paragraph{Introduction paragraph}
461 \kant[8]
462
463
464 %-----------------------------------------------------------------------------
465 %-----------------------------------------------------------------------------
466 \myheading{Tables in thesis/dissertation --- Regular-Styled Chapter}
467
468 %-----------------------------------------------------------------------------
469 \section{Simple Tables}
470
471 \italk{Users are encouraged to refer to the Sec. 8.1 of the NDSU Class Documentation before seeing some of the examples presented in this chapter. Shown below is the most basic table using \lx \texttt{tabular} environment. Vertical lines (created by ``pipe'' character |), which are not generally used in professional tables, are shown to illustrate the column widths. However, | can be used for visualization during table development.}
472
473 \begin{table}[h!]
474 \centering
475 \caption{Simple fixed-width table with left-justified top caption.}
476 \begin{tabular}{| l |c| r |}
477 \hline
478 Number & Our rating & Month \\
479 (left) & (center) & (right)\\
480 \hline
481 1 & Colder & January \\
482 2 & Okay & February \\
483 3 & Good & March\\
484 \hline
485 \end{tabular}
486 \label{tab21}
487 \end{table}
488
489 \italk{The code generated this table (\cref{tab21}) in single-spacing is shown below:}
490
491 {\singlespacing
492 \begin{verbatim}
493 \begin{table}[h!]
494 \centering
495 \caption{Simple fixed-width table with left-justified top caption.}
496 \begin{tabular}{| l |c| r |}
497 \hline
498 Number & Our rating & Month \\
499 (left) & (center) & (right)\\
500 \hline
501 1 & Colder & January \\
502 2 & Okay & February \\
503 3 & Good & March\\
504 \hline
505 \end{tabular}
506 \label{tab21a}
507 \end{table}
508 \end{verbatim}
509 }
510
511 \italk{The same table (\cref{tab21}) will be made as a professional table, as seen in published articles (\cref{tab22}), using \texttt{booktabs} package. The only change is removing | and replacing the generic \cmd{hline} by appropriate commands such as \cmd{toprule}, \cmd{midrule} (less thick), and \cmd{bottomrule} that produce different line thicknesses.
512 }
513
514 {\singlespacing
515 \begin{verbatim}
516 \begin{table}[h!]
517 \centering
518 \caption{Professional fixed-width table with left-justified top caption
519 using \texttt{booktabs} package.}
520 \begin{tabular}{ l c r }
521 \toprule
522 Number & Our rating & Month \\
523 (left) & (center) & (right)\\
524 \midrule
525 1 & Colder & January \\
526 2 & Okay & February \\
527 3 & Good & March\\
528 \bottomrule
529 \end{tabular}
530 \label{tab22}
531 \end{table}
532 \end{verbatim}
533 }\label{tabcode22}
534
535 \begin{table}[h!]
536 \centering
537 \caption{Professional looking fixed-width table with left-justified top caption using \texttt{booktabs} package.}
538 \begin{tabular}{ l c r }
539 \toprule
540 Number & Our rating & Month \\
541 (left) & (center) & (right)\\
542 \midrule
543 1 & Colder & January \\
544 2 & Okay & February \\
545 3 & Good & March\\
546 \bottomrule
547 \end{tabular}
548 \label{tab22}
549 \end{table}
550
551 %-----------------------------------------------------------------------------
552 \section{Help with \LaTeX\ Tables}
553 \italk{The code for the \Cref{tab22} may be a bit intimidating (really?), but it is just two nested environments (\vb{table} and \vb{tabular}). The layout is: \vb{table\{} -- \vb{caption} -- \vb{tabular\{} -- data rows -- \vb{tablular\}} -- \vb{label} -- \vb{table\}}. This layout when looked at in an overall manner is simple and all tables follows the same pattern.}
554
555 \italk{\LaTeX installations will have some tools (e.g., IntelliSense code completion) that allow to develop table codes from scratch or paste the copied table data from spreadsheets (e.g., ``Paste Spreadsheet Cells -- booktabs'' in Mac) make table creation easy. Also, there are several online tools \href{https://www.tablesgenerator.com}{\textcolor{magenta}{Table Generator}} and \href{https://www.latex-tables.com}{\textcolor{magenta}{LaTeX Tables Editor}} among others will help generate table codes from typed data, and imported files (*.csv, *.xls, etc.,). Also Excel Add Ins such as \href{https://ctan.org/tex-archive/support/excel2latex?lang=en}{\textcolor{magenta}{Excel2\LaTeX}} will generate and export the table codes.
556 }
557
558 %-----------------------------------------------------------------------------
559 \section{Full-width Tables}
560 \italk{Even though these tables (\cref{tab21,tab22}) were compact, they are not supported by NDSU guidelines. Therefore, these tables should be made to full-width. We have two methods of achieving this.}
561
562 %-------------------------------------------
563 \subsection{Manual Method --- Using Table Column Width}
564 \italk{One simple method is trial-and-error (manual) is to increase the tabular column separation width so that the table width fits the text width. The two commands \cmd{setlength\{}\cmd{tabcolsep\}} \vb{\{0.75in\}} (value of 0.75in obtained by trial-and-error) and \vbc{begin\{tabular\}\{ l |c| r \}} (rest of the code remains the same as in \cref{tab22}) created the table below (\cref{tab23}). It is possible to calculate the \vb{tabcolsep} based on the width of text elements and the number of gaps (2 * number of columns) with the use of \cmd{settowidth\{\ldots\}} and \cmd{fpeval\{\ldots\}} commands. Note the use of | was used for visualization.}
565
566 \begin{table}[h!]
567 \centering
568 \caption{Professional looking full-width table using \cmd{tabcolsep} and \texttt{booktabs} package.}
569 \setlength{\tabcolsep}{0.75in}
570 \begin{tabular}{ l |c| r }
571 \toprule
572 Number & Our rating & Month \\
573 (left) & (center) & (right)\\
574 \midrule
575 1 & Colder & January \\
576 2 & Okay & February \\
577 3 & Good & March\\
578 \bottomrule
579 \end{tabular}
580 \label{tab23}
581 \end{table}
582
583 \italk{It can be seen that the table column separation (\vb{tabcolsep}) value of 0.75in was applied on both sides of the text in each column. The vertical spaces at the start (left) and end (right) are not working well with the \vb{l} and \vb{r} specifications for the 1st and 3rd columns set in the \vb{tabular} environment. Had all columns been centered then this would have worked.}
584
585 \italk{To address and suppress these spaces, the control sequence \vb{@\{\ldots\}} can be used. When the spaces were removed, the table width will reduce and should be increased (1.1in used) accordingly. Thus, with the following code, the table (\cref{tab24}) was created where columns align per our expectation.
586 }
587
588 {\singlespacing
589 \begin{verbatim}
590 \setlength{\tabcolsep}{1.1in}
591 \begin{tabular}{ @{ }l |c| r@{ } }
592 \end{verbatim}
593 }
594
595 \begin{table}[h!]
596 \centering
597 \caption{Professional looking full-width table using \cmd{tabcolsep}, \texttt{@\{\ldots\}}, and \texttt{booktabs} package.}
598 \setlength{\tabcolsep}{1.1in}
599 \begin{tabular}{ @{ }l |c| r@{ } }
600 \toprule
601 Number & Our rating & Month \\
602 (left) & (center) & (right)\\
603 \midrule
604 1 & Colder & January \\
605 2 & Okay & February \\
606 3 & Good & March\\
607 \bottomrule
608 \end{tabular}
609 \label{tab24}
610 \end{table}
611
612 \italk{This table (\cref{tab24}), of course without the vertical lines (|), can be used in NDSU disquisition. The issue of such vertical space management will be prevalent only with fewer columns.}
613
614 %-------------------------------------------
615 \subsection{Automatic Method --- Using \texttt{tabu} Environment --- Equal Widths}
616 \italk{The automatic method using the \vb{tabu} environment replacing the \vb{tabular} makes it simple and avoids the guess work in fixing the table width. The following code (rest of the code is same as Table~2.2, page: \pageref{tabcode22}) that reproduces the \cref{tab24} and the generated output (\cref{tab25}) are:}
617
618 {\singlespacing
619 \begin{verbatim}
620 . . . .
621 \begin{tabu}{X | X[c] | X[r]} % tabular replaced by tabu
622 . . . .
623 \end{tabu} % tabular replaced by tabu
624 . . . .
625 \end{verbatim}
626 }
627
628 \begin{table}[h!]
629 \centering
630 \caption{Professional looking automatic full-width table using \texttt{tabu} environment and \texttt{booktabs} package.}
631 \begin{tabu}{X | X[c] | X[r]}
632 \toprule
633 Number & Our rating & Month \\
634 (left) & (center) & (right)\\
635 \midrule
636 1 & Colder & January \\
637 2 & Okay & February \\
638 3 & Good & March\\
639 \bottomrule
640 \end{tabu}
641 \label{tab25}
642 \end{table}
643
644 \italk{From the code it can be seen that the full-width table can be easily made using the \vb{tabu} environment. The \vb{X} column specifier allots column widths automatically so that the table spans the full-width. The other parameter enclosed by square brackets extends the functionality of the \vb{X} column. Thus, \vb{X[c]} and \vb{X[r]} specifies centering and right-justification of the column content, while left-justification is default.}
645
646 %-------------------------------------------
647 \subsection{Automatic Method --- Using \texttt{tabu} Environment --- Unequal Widths}
648
649 \italk{Shown below is an advanced table (\cref{tab26}) with variable column widths and overall math-column specification. Variable widths can be specified using coefficients to \vb{X} columns.
650 }
651 \vspace{-4ex}
652 \begin{table}[ht]
653 \caption{Full-width table using the \texttt{tabu} environment showing some vegetative indices formulas demonstrating the use of \texttt{X} column code with variable column widths and math column specifications (\texttt{X[0.8, \$]}).}
654 \setlength{\tabulinesep}{0.85ex} % constant vertical spacing between rows
655 \begin{tabu}{X[2] X[0.8, $]}
656 \toprule
657 Segmentation method & \text{Formula} \\
658 \midrule
659 Excess green segmentation (ExG) & 2G - R - B\\
660 Visible atmospherically resistant index (VARI) & \dfrac{{G - R}}{(G + R - B)} \\
661 Red green ratio index (RGRI) & \dfrac{R}{G}\\
662 Excess red index (ExR) & 1.3R - G \\
663 Excess green minus excess red (ExGR) & \text{ExG} - \text{ExR}\\
664 Normalized green - red difference index (NGRDI) & \dfrac{(G - R)}{(G + R)}\\
665 Vegetative index (VI) & \dfrac{G}{R^a B^{(1-a)}}\\
666 Modified excess green index (MExG) & 1.262G - 0.884R - 0.311B\\
667 Green chromatic coordinate (GCC) & \dfrac{G}{(R + G + B)}\\
668 Color index vegetation extraction (CIVE) & 0.441R - 0.811G + 0.385B\\
669 Simple text in math column right (See $\Rightarrow$) & \text{NDSU thesis class}\\
670 \bottomrule
671 \end{tabu}
672 \begin{tablenotes}[flushleft]
673 \footnotesize
674 \item \hspace{-1ex} \emph{Note}: $R$, $G$, $B$ stands for red, green, blue pixel values from the RGB color image.
675 \label{tab26}
676 \end{tablenotes}
677 \end{table}
678 %------------------
679
680 \italk{The code that created this \vb{tabu} environment is given below. For full code the users are encouraged to refer the source \vb{*.tex} file of this document.}
681
682 \vspace{-1ex}
683 {\singlespacing
684 \begin{verbatim}
685 . . . .
686 \setlength{\tabulinesep}{0.85ex} % constant vertical spacing between rows
687 \begin{tabu}{X[2] X[0.8, $]}
688 . . . .
689 \end{verbatim}
690 }
691
692 \vspace{-2ex}
693 \italk{The environment specifies 2 columns with the first having a proportional 2 as width (\vb{coef}) and the second having 0.8 as width. Stated otherwise, the first column is \fpeval{2/0.8} (2/0.8) times the width of the second (2~:~0.8 = 2.5~:~1). The second column type was also specified using \$, which makes the entire column as math and the column code can be input without enclosing items between \$\ldots\$, as usually done in math mode. This math column specification will be convenient when the column predominantly contains math entries. Of course regular entries can be input as \cmd{text\{\ldots\}}, as done in the last row of the \cref{tab26}.
694 }
695
696 \italk{Of course the manual method can also produce the \cref{tab26} and the output is presented in \cref{tab27}. While the full code can be seen in the source code the important code segments and two rows entries are shown as follows:
697 }
698
699 {\singlespacing
700 \begin{verbatim}
701 . . . .
702 \setlength{\tabcolsep}{7ex}
703 \begin{tabular}{@{\:}l l@{\:}}
704 . . . .
705 Visible atmospherically resistant index (VARI) & $\dfrac{{G - R}}
706 {(G + R - B)}$ \\[2ex]
707 Red green ratio index (RGRI) & $\dfrac{R}{G}$\\[2ex]
708 . . . .
709 \end{verbatim}
710 }
711
712 \vspace{-2ex}
713 \italk{In the code \vb{tabcolsep} command was used (\cref{tab27}). The formula column uses the math mode \$\ldots\$ for all the rows. Also, for increasing the row vertical spacing because of the a/b format of the formula the code of \textbackslash\textbackslash[2ex] was used.}
714
715 \begin{table}[ht]
716 \caption{Full-width table using the manual method showing some vegetative indices formulas --- Reproduction of \cref{tab26}.}
717 \setlength{\tabcolsep}{7ex}
718 \begin{tabular}{@{\:}l l@{\:}}
719 \toprule
720 Segmentation method & Formula \\
721 \midrule
722 Excess green segmentation (ExG) & $2G - R - B$\\[1ex]
723 Visible atmospherically resistant index (VARI) & $\dfrac{{G - R}}
724 {(G + R - B)}$ \\[2ex]
725 Red green ratio index (RGRI) & $\dfrac{R}{G}$\\[2ex]
726 Excess red index (ExR) & $1.3R - G$\\[2ex]
727 Excess green minus excess red (ExGR) & \text ExG $-$ ExR\\[2ex]
728 Normalized green - red difference index (NGRDI) & $\dfrac{(G - R)}{(G + R)}$\\[2ex]
729 Vegetative index (VI) & $\dfrac{G}{R^a B^{(1-a)}}$\\[3ex]
730 Modified excess green index (MExG) & $ 1.262G - 0.884R - 0.311B$\\[2ex]
731 Green chromatic coordinate (GCC) & $\dfrac{G}{(R + G + B)}$\\[2ex]
732 Color index vegetation extraction (CIVE) & $0.441R - 0.811G + 0.385B$\\[2ex]
733 Simple text in regular column right (See $\Rightarrow$) & NDSU thesis class\\
734 \bottomrule
735 \end{tabular}
736 \begin{tablenotes}[flushleft]
737 \footnotesize
738 \item \hspace{-1ex} \emph{Note}: $R$, $G$, $B$ stands for red, green, blue pixel values from the RGB color image.
739 \label{tab27}
740 \end{tablenotes}
741 \end{table}
742 %------------------
743
744 \italk{When compared, the automatic method (\cref{tab26}) is simpler than the manual method (\cref{tab27}); however, both produce similar output visually.}
745
746 %-------------------------------------------
747 \subsection{Another Example with Multicolumn and Cmidrule}
748 \italk{Usage of \vb{multicolumn} and \vb{cmidrule} in full-width tables using manual and automatic are presented (\cref{tab28,tab29}) in this example.}
749
750 \begin{table}[ht]
751 \centering
752 \caption{Manual method full-length table showing multicolumn and rule.}
753 \setlength{\tabcolsep}{0.675in}
754 \begin{tabular}{|@{\:}l |c|l| l@{\:}|}
755 \toprule
756 Number & Month & Same & Same\\
757 \midrule
758 1 & January & January & January\\
759 1 & January & January & January\\
760 \cmidrule(lr){3-4}
761 2 & February & \multicolumn{2}{c}{\hspace{5ex}Combined February}\\
762 \cmidrule(lr){3-4}
763 3 & March & March & March \\
764 3 & March & March & March \\
765 \bottomrule
766 \end{tabular}
767 \label{tab28}
768 \end{table}
769
770 \begin{table}[ht]
771 \centering
772 \caption{Automatic method full-length table showing multicolumn and rule.}
773 \begin{tabu}{| X[0.25] | X[0.95,c] | X[0.6] | X[0.2, l] |}
774 \toprule
775 Number & Month & Same & Same\\
776 \midrule
777 1 & January & January & January\\
778 1 & January & January & January\\
779 \cmidrule(lr){3-4}
780 2 & February & \multicolumn{2}{c}{Combined February}\\
781 \cmidrule(lr){3-4}
782 3 & March & March & March\\
783 3 & March & March & March\\
784 \bottomrule
785 \end{tabu}
786 \label{tab29}
787 \end{table}
788
789 \italk{Both tables are visually the same barring the different column widths visualized using |, but their mechanisms are different. Only the significant code lines that produced these tables are given below. Based on the requirements, the users can use any of these methodologies. }
790
791 {\singlespacing
792 \begin{verbatim}
793 . . . . %Table 2.8
794 \setlength{\tabcolsep}{0.675in}
795 \begin{tabular}{|@{\:}l |c|l| l@{\:}|} . . . .
796 \cmidrule(lr){3-4}
797 2 & February & \multicolumn{2}{c}{\hspace{5ex}Combined February}\\
798 \cmidrule(lr){3-4}
799
800 . . . . %Table 2.9
801 \begin{tabu}{| X[0.25] | X[0.95,c] | X[0.6] | X[0.2, l] |}
802 \cmidrule(lr){3-4}
803 2 & February & \multicolumn{2}{c}{Combined February}\\
804 \cmidrule(lr){3-4}
805 \end{verbatim}
806 }
807
808 %-----------------------------------------------------------------------------
809 \section{Landscape Tables}
810
811 \italk{When more columns need to be accommodated in tables that cannot be handled in the regular orientation, with available text width of about \SI{6.5}{in}, the landscape that can utilize the text height of \SI{8.75}{in} for the table contents. If even more columns have to be packed then the use of \cmd{resizebox} command can scale-down the table to the required size, and this can be used in regular and landscape modes.}
812
813 \italk{Landscape tables were usually set on a separate page using \vb{[p]} placement specifier. With the \vb{pdflscape} package that provides the \vb{landscape} environment for the table creation, the page is also rotated for direct viewing of the table, but prints correctly. An example of landscape table is shown in \Cref{tab210}. More information about this table is available in the table caption and footnote. The source code of this table can be referred to for details.
814 }
815
816 % Use [p] use to adjust the centering of the whole table
817 % * version of vspace works - but manually adjusted: \vspace*{1.3in}
818 \begin{landscape}
819 \begin{table}[p]
820 \centering
821 \caption{Landscape table uses \vb{landscape} environment from \vb{pdflscape} package (loaded in the class). Landscape tables are set in a separate page using \vb{[p]} and usually don't have surrounding text, which makes sense. With the \vb{p} specifier the table is also centered vertically, otherwise with \vb{h} and \vb{t} will start from the top, and \vbc{vspace*} command need to be used to bring it down. The \vbc{columnwidth} in the landscape mode is = \fpeval{round(\columnwidth*0.013837, 8)}~in.
822 Note this table was resized using \vbc{resizebox} command --- Check the source code for details.}
823 \resizebox{\columnwidth}{!}{%
824 \begin{tabular}{l rrrr cccc llll rr}
825 \toprule
826 Row-of-values & \multicolumn{4}{c}{Block1} &\multicolumn{4}{c}{Block2} & \multicolumn{4}{c}{Block3} & Value A & Value B \\
827 \cmidrule(lr){2-5} \cmidrule(lr){6-9} \cmidrule(lr){10-13}
828 & Value A & Value B & Value C & Value D & Value A & Value B & Value C & Value D & Value A & Value B & Value C & Value D \\
829 \midrule
830 1 & 0.6010 & 0.9534 & 0.0230 & 0.2792 & 0.6536 & 0.6743 & 0.6670 & 0.7151 & 0.9233 & 0.0136 & 0.7240 & 0.7884 & 0.6380 & 0.4722 \\
831 2 & 0.0879 & 0.5224 & 0.5080 & 0.8831 & 0.4167 & 0.9331 & 0.2338 & 0.4526 & 0.6214 & 0.1434 & 0.9304 & 0.5150 & 0.3284 & 0.2733 \\
832 3 & 0.5354 & 0.5622 & 0.9666 & 0.3658 & 0.2022 & 0.7481 & 0.0094 & 0.3730 & 0.6100 & 0.4873 & 0.3478 & 0.3655 & 0.2236 & 0.3613 \\
833 \cmidrule(lr){2-9}
834 4 & 0.5149 & 0.7877 & 0.7046 & 0.7844 & 0.8712 & 0.1463 & 0.6431 & 0.0756 & 0.2670 & 0.2400 & 0.8599 & 0.5413 & 0.3102 & 0.3564 \\
835 5 & 0.2776 & 0.8775 & 0.0204 & 0.3931 & 0.1757 & 0.7755 & 0.7601 & 0.6077 & 0.1814 & 0.1600 & 0.3897 & 0.9181 & 0.5436 & 0.7620 \\
836 \midrule
837 6 & 0.4873 & 0.1049 & 0.7446 & 0.3470 & 0.1444 & 0.0765 & 0.6868 & 0.7974 & 0.6107 & 0.4752 & 0.3983 & 0.3813 & 0.4250 & 0.7448 \\
838 7 & 0.4924 & 0.2721 & 0.6291 & 0.4191 & 0.9174 & 0.2786 & 0.3453 & 0.6789 & 0.2796 & 0.2995 & 0.0936 & 0.5531 & 0.6751 & 0.8136 \\
839 8 & 0.1246 & 0.5249 & 0.9767 & 0.1850 & 0.0554 & 0.7529 & 0.8975 & 0.6367 & 0.1115 & 0.1917 & 0.7160 & 0.8446 & 0.4325 & 0.0693 \\
840 \cmidrule(lr){10-15}
841 9 & 0.8376 & 0.3821 & 0.4961 & 0.6293 & 0.5149 & 0.4190 & 0.6207 & 0.2706 & 0.6919 & 0.7676 & 0.0739 & 0.8534 & 0.1713 & 0.8018 \\
842 10 & 0.2861 & 0.3240 & 0.9193 & 0.6021 & 0.2301 & 0.9783 & 0.1213 & 0.5350 & 0.4845 & 0.5200 & 0.0642 & 0.2804 & 0.7556 & 0.0147 \\
843 \bottomrule
844 \end{tabular}
845 }
846 \begin{tablenotes}[flushleft]
847 \footnotesize
848 \item \hspace{-1ex} \emph{Note}: \italk{The \cmd{cmidrule(lr)\{2-9\}} and \cmd{cmidrule(lr)\{10-15\}} commands issued after 3rd and 7th rows produced the horizontal lines separating the rows 3 and 4, and 8 and 9, respectively. This command can be used to mark grouped columns as well. The grouped (merged) column headings (Block1, Block2, and Block3) were created, for example, by \cmd{multicolumn\{4\}\{c\}\{Block1\}} command. Check the code how other groups and lines were made.
849 \item \vspace{4ex}
850 \italk{\hl{Important note:}} \textcolor{magenta}{\bfseries While printing the landscape pages (containing tables and figures) the settings should be double-checked. Adobe reader was known to print the landscape pages in the correct format. Mac Preview was observed not to give the correct output (distortion observed) at the time of this writing.}
851 }
852 \end{tablenotes}
853 \label{tab210}
854 \end{table}
855 \end{landscape}
856
857 %-----------------------------------------------------------------------------
858 \section{Long Tables}
859 \italk{In the disquisition sometimes it is necessary to present data and results that go more than a single page. In such situations, long tables should be used and the package developed for this purpose and included in the class was
860 \vb{longtable} and it works well with \vb{threeparttable} package as well. The \vb{longtable} environment is used.}
861
862 \italk{The long tables have more components than regular tables. Long tables contain, in general, main title, running title, running table head, running footnote, and table final footnote. Users are urged to refer to the documentation of \vb{longtable} and the source code for more details, as there are several aspects involved in long table creation.}
863
864 %-----------------------
865 \vspace{2ex}
866 \setlength\LTleft{0pt}
867 \setlength\LTright{0pt}
868 {\small
869 {\renewcommand{\arraystretch}{0.6}
870 \begin{ThreePartTable}
871 \begin{TableNotes}
872 \baselineskip=0.5\baselineskip
873 \item[] $\dag$ MD - Methods distance i.e. total polygonal distance of all methods taken in the selected order
874 \item[] $\ddag$ TSP - Traveling salesperson distance i.e. total polygonal distance of all methods following traveling sales man technique; Origin was the outlet location where bales were finally transported; and medoid was the aggregation method where it coincided on one of the field stacks but other methods may not.
875 \end{TableNotes}
876 \begin{longtable}{lll lll ll}
877 \caption{\normalsize A long table - spanning 3 pages - an example taken from our research group work on ``Methods of optimum bale stack locations and their logistics distances and methods combined distances.''}\label{tab1}\\[-2ex]
878 \tabletopinfo
879 \endfirsthead
880
881 \multicolumn{8}{l}%
882 {{\normalsize\tablename\ \thetable{} Methods of optimum bale stack locations and their logistics distances and}} \\
883 \multicolumn{8}{l}%
884 {{\normalsize methods combined distances -- \emph{(continued).}}} \\[2ex]
885 \tabletopinfo
886 \endhead
887
888 \cmidrule{7-8}
889 \multicolumn{8}{r}{\textit{continued \ldots}}
890 \endfoot
891 \bottomrule
892 \insertTableNotes
893 \endlastfoot
894
895 % the contents of the table
896 0.41 & 3 & Origin & 0.196 & 0 & 0.196 & 0.070 & 0.045 \\
897 $[1]$ & & Field middle & 0.085 & 0.045 & 0.130 \\
898 & & Middle data range & 0.070 & 0.061 & 0.131 \\
899 & & Centroid & 0.068 & 0.062 & 0.130 \\
900 & & Geometric median & 0.065 & 0.064 & 0.129 \\
901 & & Medoid & 0.068 & 0.075 & 0.143 \\
902 \midrule
903 0.51 & 4 & Origin & 0.240 & 0 & 0.240 & 0.054 & 0.048 \\
904 $[1.25]$ & & Field middle & 0.107 & 0.050 & 0.158 \\
905 & & Middle data range & 0.108 & 0.052 & 0.160 \\
906 & & Centroid & 0.102 & 0.057 & 0.159 \\
907 & & Geometric median & 0.099 & 0.067 & 0.166 \\
908 & & Medoid & 0.101 & 0.072 & 0.172 \\
909 \midrule
910 1.01 & 8 & Origin & 0.462 & 0 & 0.462 & 0.095 & 0.051 \\
911 $[2.5]$ & & Field middle & 0.404 & 0.142 & 0.546 \\
912 & & Middle data range & 0.205 & 0.109 & 0.315 \\
913 & & Centroid & 0.206 & 0.114 & 0.320 \\
914 & & Geometric median & 0.205 & 0.109 & 0.314 \\
915 & & Medoid & 0.206 & 0.103 & 0.308 \\
916 \midrule
917 2.02 & 18 & Origin & 1.80 & 0 & 1.80 & 0.054 & 0.034 \\
918 $[5]$ & & Field middle & 0.87 & 0.30 & 1.17 \\
919 & & Middle data range & 0.87 & 0.30 & 1.17 \\
920 & & Centroid & 0.86 & 0.31 & 1.17 \\
921 & & Geometric median & 0.86 & 0.31 & 1.18 \\
922 & & Medoid & 0.89 & 0.35 & 1.24 \\
923 \midrule
924 4.05 & 33 & Origin & 5.26 & 0 & 5.26 & 0.144 & 0.100 \\
925 $[10]$ & & Field middle & 3.11 & 0.85 & 3.96 \\
926 & & Middle data range & 3.11 & 0.86 & 3.97 \\
927 & & Centroid & 3.11 & 0.86 & 3.97 \\
928 & & Geometric median & 3.11 & 0.88 & 3.99 \\
929 & & Medoid & 3.45 & 1.09 & 4.53 \\
930 \midrule
931 8.09 & 67 & Origin & 14.63 & 0 & 14.63 & 0.024 & 0.021 \\
932 $[20]$ & & Field middle & 7.29 & 2.41 & 9.71 \\
933 & & Middle data range & 7.29 & 2.43 & 9.72 \\
934 & & Centroid & 7.29 & 2.43 & 9.72 \\
935 & & Geometric median & 7.28 & 2.45 & 9.73 \\
936 & & Medoid & 7.29 & 2.41 & 9.70 \\
937 \midrule
938 16.19 & 133 & Origin & 40.67 & 0 & 40.67 & 0.074 & 0.072 \\
939 $[40]$ & & Field middle & 20.28 & 6.54 & 26.82 \\
940 & & Middle data range & 20.29 & 6.61 & 26.89 \\
941 & & Centroid & 20.28 & 6.51 & 26.79 \\
942 & & Geometric median & 20.28 & 6.58 & 26.86 \\
943 & & Medoid & 20.52 & 6.88 & 27.39 \\
944 \midrule
945 32.38 & 270 & Origin & 117.89 & 0 & 117.89 & 0.060 & 0.052 \\
946 $[80]$ & & Field middle & 58.92 & 18.11 & 77.03 \\
947 & & Middle data range & 58.92 & 18.22 & 77.14 \\
948 & & Centroid & 58.92 & 18.16 & 77.08 \\
949 & & Geometric median & 58.92 & 18.19 & 77.11 \\
950 & & Medoid & 59.18 & 18.11 & 77.29 \\
951 \midrule
952 64.75 & 540 & Origin & 333.12 & 0 & 333.12 & 0.049 & 0.043 \\
953 $[160]$ & & Field middle & 166.52 & 51.21 & 217.73 \\
954 & & Middle data range & 166.53 & 51.41 & 217.93 \\
955 & & Centroid & 166.52 & 51.26 & 217.78 \\
956 & & Geometric median & 166.52 & 51.30 & 217.82 \\
957 & & Medoid & 166.81 & 51.23 & 218.05 \\
958 \midrule
959 129.5 & 1082 & Origin & 943.38 & 0 & 943.38 & 0.051 & 0.029 \\
960 $[320]$ & & Field middle & 470.83 & 145.65 & 616.48 \\
961 & & Middle data range & 470.83 & 145.79 & 616.62 \\
962 & & Centroid & 470.83 & 145.91 & 616.74 \\
963 & & Geometric median & 470.83 & 145.83 & 616.66 \\
964 & & Medoid & 471.26 & 148.53 & 619.79 \\
965 \midrule
966 259 & 2163 & Origin & 2665.34 & 0 & 2665.34 & 0.028 & 0.027 \\
967 $[640]$ & & Field middle & 1331.20 & 410.81 & 1742.01 \\
968 & & Middle data range & 1331.21 & 411.45 & 1742.66 \\
969 & & Centroid & 1331.19 & 411.07 & 1742.27 \\
970 & & Geometric median & 1331.19 & 411.25 & 1742.44 \\
971 & & Medoid & 1331.32 & 407.51 & 1738.83 \\
972 \midrule
973 517 & 4324 & Origin & 7531.35 & 0 & 7531.35 & 0.022 & 0.020 \\
974 $[1280]$ & & Field middle & 3765.75 & 1160.34 & 4926.09 \\
975 & & Middle data range & 3765.77 & 1160.95 & 4926.72 \\
976 & & Centroid & 3765.75 & 1160.51 & 4926.26 \\
977 & & Geometric median & 3765.75 & 1160.39 & 4926.15 \\
978 & & Medoid & 3765.86 & 1159.71 & 4925.57 \\
979 \end{longtable}
980 \end{ThreePartTable}
981 }
982 }
983 \setlength{\parindent}{0.5in}
984 \vspace{-2ex}
985 %-----------------------
986
987 \kant[3]
988
989
990 %-----------------------------------------------------------------------------
991 %-----------------------------------------------------------------------------
992 \myheading{Figures in thesis/dissertation}
993
994 %-----------------------------------------------------------------------------
995 \section{Figures in the Chapters}
996 \italk{As before the class documentation should be read first (Sec. 9.2). Let us have some figures. Refer to our first figure (\cref{fig1}) and second (\cref{fig2}). This figure file (``\texttt{frog.jpg}'') is also included in the class folder, and if necessary can be replaced by any other dummy figures from the \texttt{mwe} package (Documentation Sec. 7). The following figure was coded using the regular figure environment and other commands.}
997
998 \begin{figure}[H]
999 \centering
1000 \includegraphics[width=0.4\textwidth]{frog.jpg}
1001 \caption{\label{fig:frog}This frog figure short caption is centered - NDSU.}
1002 \label{fig1}
1003 \end{figure}
1004
1005 %-----------------------------------------------------------------------------
1006 \section{Shortcut Commands for Figures in Class}
1007
1008 %-------------------------------------------
1009 \subsection{Figure Shortcut Command --- 5 Arguments}
1010 \italk{The same image using the \texttt{myfig} command (which is a shortcut defined to easily input the [caption alignment], figure placement, size, figure, caption, and label in one command). The following code shows how this is used and the figure displayed:}
1011
1012 {\singlespacing
1013 \begin{verbatim}
1014 \myfig{H}{0.4}{frog.jpg}{Figure short caption is centered.
1015 Use of myfig command.}{fig2}
1016 \end{verbatim}
1017 }
1018
1019 \myfig{H}{0.4}{frog.jpg}{Figure short caption is centered.
1020 Use of \cmd{myfig\{\}} command.}{fig2}
1021
1022 \italk{When required, by issuing the command \cmd{captionsetup\{singlelinecheck=true\}} before the figure or inside the figure environment will center the shorter caption (as did with \cref{fig1}), and left-justify the longer captions. This was the default behavior of the class and reset by making the \texttt{singlelinecheck=false}, where the caption will be always left-justified, irrespective of the length.}
1023
1024 %-------------------------------------------
1025 \subsection{Figure Shortcut Command --- 1 Optional + 5 Arguments}
1026
1027 \myfig{H}{0.4}{frog.jpg}{Figure with a long caption where it is left-justified. More text text text text text text text text used to make the title long.}{fig3}
1028
1029 \italk{\Cref{fig3} with long title makes the caption left-justified automatically. It can be seen that the caption is too close to the bottom of the image, which may be good in some cases where already some white space/margin was present in the original figure. To address this the optional vertical caption placement should be used. In \Cref{fig4} the caption was given a +ve vertical space [2ex] to move the caption down, and can be moved up using -ve values. The code which developed this figure (\cref{fig4}) with the optional argument is shown below.
1030 }
1031
1032 {\singlespacing
1033 \begin{verbatim}
1034 \myfig[2ex]{H}{0.4}{frog.jpg}{Figure with long caption where it is
1035 left-justified. More text text text text text text text text used to
1036 make the title long. Also the 6th optional caption placement
1037 was used in the \cmd{myfig[optional]\{\}} command.}{fig4}
1038 \end{verbatim}
1039 }
1040
1041 \myfig[2ex]{H}{0.4}{frog.jpg}{Caption this frog was uploaded via the file-tree menu - a long title long title long title long title long title long title long title long title long title long title.}{fig4}
1042
1043 %-----------------------------------------------------------------------------
1044 \section{Landscape Figures}
1045
1046 \italk{Landscape figures can be handled using the \cmd{myfigls\{\}} command (which is a shortcut for landscape figure similar to regular figures (1+5 arguments)). Usually, placement specifier `p' is used to vertically center the figure and caption. The following code that produced \Cref{fig5} shows how this is used:}
1047
1048 \vspace{-4ex}
1049 {\singlespace
1050 \begin{verbatim}
1051 \myfigls[5mm]{p}{0.6}{frog.jpg}{Landscape figure with long long long long long
1052 long long long long long long long long long long caption and vertical caption
1053 placement using 5mm.}{fig5}
1054 \end{verbatim}
1055 }
1056
1057 \italk{\hl{Important note:}} \textcolor{magenta}{\bfseries While printing the landscape pages (containing tables and figures) the settings should be double-checked. Adobe reader was known to print the landscape pages in the correct format. Mac Preview was observed not to give the correct output (distortion observed) at the time of this writing.}
1058
1059 % Option p vertically centers figure & 5mm +ve space added above caption
1060 \myfigls[5mm]{p}{0.9}{frog.jpg}{Landscape figure with long long long long long long long long long long long long long long long caption and vertical caption placement using 5mm.}{fig5}
1061
1062 %-----------------------------------------------------------------------------
1063 \section{Subfigures with Automated Numbering}
1064 \italk{This multiple subfigures uses \texttt{subfig} package. The main figure caption can be referenced as \Cref{fig6} and in parenthesis (\cref{fig6}). Also, the subfigures can be referenced (\cref{fig6:1a,fig6:1c,fig6:1d,fig6:1f}). The sub-caption numbering are ``alphabetic'' by default and will be automatically generated. Sizes of the sub-figures can be individually altered. Also, the number of images that occupy a single row can be readily coded with commands (refer source code), such as \cmd{subfloat\{\ldots\}}, \cmd{hspace\{\ldots\}}, and newline (\textbackslash\textbackslash).}
1065
1066 \begin{figure}[H]
1067 \captionsetup{singlelinecheck=true} % can be given in figure env.
1068 \centering
1069 \subfloat[frog1.\label{fig6:1a}]{\includegraphics[width=0.1\textwidth]{frog.jpg}}\hspace{1in}
1070 \subfloat[frog2.\label{fig6:1b}] {\includegraphics[width=0.1\textwidth]{frog.jpg}}\\
1071 \subfloat[frog3.\label{fig6:1c}]{\includegraphics[width=0.3\textwidth]{frog.jpg}}\hspace{0.5in}\\
1072
1073 \subfloat[frog4\label{fig6:1d}]{\includegraphics[width=0.145\textwidth]{frog.jpg}}\hspace{1.2in}
1074 \subfloat[Frog caption.\label{fig6:1e}]{\includegraphics[width=0.2\textwidth]{frog.jpg}}
1075 \hspace{1.2in}
1076 \subfloat[frog6.\label{fig6:1f}] {\includegraphics[width=0.145\textwidth]{frog.jpg}}
1077
1078 \captionsetup{singlelinecheck=false} % can be given again
1079 \caption{General caption of the subfigure - all the captions and sub-labels were created through \cmd{subfloat[\ldots]\{\ldots\}} command of \texttt{subfig} package.} \label{fig6}
1080 \end{figure}
1081 \clearpage
1082
1083 %-----------------------------------------------------------------------------
1084 \section{Subfigures Spanning Multiple Pages}
1085 \italk{Sometimes several subfigures running through multiple pages need to be coded. These are similar to long tables that span several pages. The caption will be repeated with ``contd\ldots'' note. The \cmd{ContinuedFloat} with another \texttt{figure} environment will carry the numbering forward. When the number of subfigures exceeds the number of alphabets (26), the numbering system should be switched to numeric, using the commands (preferably inside the figure environment; refer source code): }
1086
1087 \begin{verbatim}
1088 \renewcommand*{\thesubfigure}{\arabic{subfigure}} % numeric
1089 \renewcommand*{\thesubfigure}{\thefigure.\arabic{subfigure}} % with fig.number
1090 \end{verbatim}
1091
1092 \begin{figure}[H]
1093 \captionsetup{singlelinecheck=true} % can be given in figure env.
1094 \renewcommand*{\thesubfigure}{\arabic{subfigure}} % numeric
1095 \centering
1096 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1097 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1098 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1099 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1100 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1101 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1102 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1103 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1104 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1105 \captionsetup{singlelinecheck=false} % can be given again
1106 \caption{Multiple page sub-figures --- General caption of the subfigure - all the captions and sub-labels were created through \cmd{subfloat[\ldots]\{\ldots\}} command of \texttt{subfig} package.} \label{fig:1gen}
1107 \end{figure}
1108 \clearpage
1109
1110 \begin{figure}[p]\ContinuedFloat
1111 \captionsetup{singlelinecheck=true} % can be given in figure env.
1112 \renewcommand*{\thesubfigure}{\thefigure.\arabic{subfigure}}
1113 \centering
1114 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1115 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1116 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1117 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1118 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1119 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1120 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1121 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1122 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1123 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1124 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1125 \subfloat[SubCap] {\includegraphics[width=0.15\textwidth]{frog.jpg}}\\
1126 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1127 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1128 \subfloat[SubCap] {\includegraphics[width=0.2\textwidth]{frog.jpg}}\\
1129 \captionsetup{singlelinecheck=false} % can be given again
1130 \caption[]{Multiple page sub-figures --- General caption of the subfigure - all the captions and sub-labels were created through \cmd{subfloat[\ldots]\{\ldots\}} command of \texttt{subfig} package (\emph{contd\ldots}). \textcolor{magenta}{Notice the figure number included in the numbering}.}
1131 \end{figure}
1132 \clearpage
1133
1134 \begin{figure}[t]\ContinuedFloat
1135 \captionsetup{singlelinecheck=true} % can be given in figure env.
1136 \renewcommand*{\thesubfigure}{\arabic{subfigure}} % numeric
1137 \centering
1138 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1139 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1140 \subfloat[SubCap] {\includegraphics[width=0.2\textwidth]{frog.jpg}}\\
1141 \subfloat[SubCap]{\includegraphics[width=0.2\textwidth]{frog.jpg}}\hspace{0.5in}
1142 \subfloat[SubCap]{\includegraphics[width=0.15\textwidth]{frog.jpg}}\hspace{0.5in}
1143 \subfloat[SubCap] {\includegraphics[width=0.2\textwidth]{frog.jpg}}\\
1144 \captionsetup{singlelinecheck=false} % can be given again
1145 \caption[]{Multiple page sub-figures --- General caption of the subfigure - all the captions and sub-labels were created through \cmd{subfloat[\ldots]\{\ldots\}} command of \texttt{subfig} package (\emph{contd\ldots}) \textcolor{magenta}{Notice figure number was dropped in the numbering}.}
1146 \end{figure}
1147
1148 \italk{The \cmd{clearpage} command, which typesets all unprocessed floats, is necessary after every block of \texttt{figure} environments (3 used in this \Cref{fig:1gen}). For suppressing the TOC entries of the subsequent captions (2 on this and before page), a null TOC entry such as \cmd{caption[]\{Multiple page \ldots \}} was issued.}
1149
1150
1151 %-----------------------------------------------------------------------------
1152 %-----------------------------------------------------------------------------
1153 \myheading{Cross reference in disquisition}
1154
1155 %-----------------------------------------------------------------------------
1156 \section{Clever Way of Referencing Labels Using \texttt{cleveref} Package}
1157 \italk{Referring items automatically is a common activity in \LaTeX. Although there are basic commands available to refer (e.g., \cmd{ref}), which produces only the ``number'' of the item referred and we have to supply the context type (table, figure, equation, section, page, etc.), the use of \texttt{cleveref} package is an efficient way to do achieve this task. Shown next is the ``quote'' from the author of \texttt{cleveref} that used \texttt{quote (environment), singlespacing, raggedleft} commands.}
1158
1159 \vspace{-4ex}
1160 \textcolor{magenta}{
1161 \begin{quote}
1162 \singlespacing
1163 \raggedleft
1164 \textit{The cleveref package enhances \LaTeX's cross-referencing features, allowing the format of cross-references to be determined automatically according to the ``type'' of cross-reference (equation, section, etc.) and the context in which the cross-reference is used.}
1165 \\\hfill --- Toby Cubitt (2018)
1166 \end{quote}
1167 }
1168
1169 %-----------------------------------------------------------------------------
1170 \section{Customizing Cleveref Commands}
1171 \italk{Refer to this package for more details and customization. The way (title case or not, abbreviated or not) the cross-referenced labels (e.g., fig. \emph{vs} Fig., etc.) can be modified using these commands.
1172 }
1173
1174 \begin{verbatim}
1175 \Crefname{equation}{Eq.}{Eqs.}
1176 \Crefname{figure}{Fig.}{Figs.}
1177 \Crefname{table}{Tab.}{Tabs.}
1178 \crefname{equation}{Eq.}{Eqs.}
1179 \crefname{figure}{Fig.}{Figs.}
1180 \crefname{table}{Tab.}{Tabs.}
1181 \end{verbatim}
1182
1183 \italk{Now issuing the commands and calling again produces this (normal black text used). And notice the difference in both the results of \cmd{Cref} and \cmd{cref}. By the way, \texttt{hyperlink} package was also used and is active, and clicking on the generated labels will take the user to the item directly. }
1184
1185 \Crefname{figure}{Fig.}{Figs.}
1186 \Crefname{table}{Tab.}{Tabs.}
1187 \crefname{figure}{Fig.}{Figs.}
1188 \crefname{table}{Tab.}{Tabs.}
1189
1190 {\singlespacing
1191 \begin{verbatim}
1192 First: Refer to our first figure (\cref{fig1}) and second (\cref{fig2}).
1193 Data is presented in \Cref{tab1}; also, look at \Cref{fig1} again, after
1194 redefining the commands using:
1195 \end{verbatim}
1196 }
1197 First: :Refer to our first figure (\cref{fig1}) and second (\cref{fig2}). Data is presented in \Cref{tab1}; also, look at \Cref{fig1} again, after redefining the commands using:
1198
1199 \begin{verbatim}
1200 \Crefname{figure}{Figure}{Figures}
1201 \Crefname{table}{Table}{Tables}
1202 \crefname{figure}{fig.}{figs.}
1203 \crefname{table}{tab.}{tabs.}
1204 \end{verbatim}
1205
1206 \Crefname{figure}{Figure}{Figures}
1207 \Crefname{table}{Table}{Tables}
1208 \crefname{figure}{fig.}{figs.}
1209 \crefname{table}{tab.}{tabs.}
1210
1211 \italk{Re-issuing the commands with defaults (e.g., fig., figs., Figure, Table, eq., eqs., etc.).}
1212
1213
1214 {\singlespacing
1215 \begin{verbatim}
1216 Second: Refer to our first figure (\cref{fig1}) and second (\cref{fig2}). Data is
1217 presented in \Cref{tab1}; also, look at \Cref{fig1} again.
1218 \end{verbatim}
1219 }
1220 Second: Refer to our first figure (\cref{fig1}) and second (\cref{fig2}). Data is presented in \Cref{tab1}; also, look at \Cref{fig1} again.
1221
1222 \italk{We have used \cmd{cref\{\ldots\}} commands already in the previous chapters. The \vb{cleveref} package documentation may be referred for other commands and options. The package allows for referring ranges, multiple items, page numbers, and many more customization.
1223 }
1224
1225
1226 %-----------------------------------------------------------------------------
1227 %-----------------------------------------------------------------------------
1228 \myheading{Bibliography Citation}
1229
1230 %-----------------------------------------------------------------------------
1231 \section{Citing References Through \texttt{natbib} Package}
1232 \italk{For bibliography management in \LaTeX\ \texttt{natbib} package is used by several journals \citep{daly2010natural}. This package is very stable and widely used. The commands like \cmd{citep\{\ldots\}} citation in parenthesis and \cmd{citet\{\ldots\}} citation in running text are quite useful in particular. The compatible styles with \texttt{natbib} and NDSU class are: \texttt{plainnat, abbrvnat, unsrtnat, rusnat, agsm, chicago, apalike}, and more may be added. \url{https://ctan.mirrors.hoobly.com/macros/latex/contrib/natbib/natbib.pdf} Once correct citation commands are issued a.k.a ``cite while you write'' the REFERENCE section with all listings will be generated. More information of the package can be obtained from the Documentation: \textcolor{magenta}{\url{https://ctan.mirrors.hoobly.com/macros/latex/contrib/natbib/natbib.pdf}} and Reference Sheet: \!\!\textcolor{magenta}{\url{https://ctan.mirrors.hoobly.com/macros/latex/contrib/natbib/natnotes.pdf}}
1233 \textcolor{magenta}{\url{https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes?utm_source=overleaf&utm_medium=email&utm_campaign=onboarding}}}
1234
1235
1236 \begin{quote}
1237 \singlespacing
1238 \raggedleft
1239 \textit{The \texttt{natbib} package is a reimplementation of the \LaTeX\ \cmd{cite} command, to work with both author-year and numerical citations. The \texttt{natbib} package supports not only the various author-year bibliography styles, but also those for standard numerical citations. In fact, it can also produce numerical citations even with an author-year bibliographic style, something that permits easy switching between the two citation modes.}
1240
1241 \hfill --- Patrick W. Daly (2010)
1242 \end{quote}
1243
1244 \italk{Now the cite commands are in action. The in-text citation will be generated automatically based on the number of authors and year, and the listing on the next page will be an unnumbered chapter with ``apalike'' reference styles shown (NDSU recommended list). The reference bib file is stored in the same folder and that will be the common database (which can grow by the addition of reference entries), but the use of different style files (*.bst) automatically generates the listing based on their style. Any other style files, for example, supplied by journals, can also be used, but should be present in the same folder and the natbib package used in this document (line: 7) may be commented.}
1245
1246 \italk{\citet{calvo2004using} found something, while \citet{bari2016identification} illustrated something more. }
1247
1248 \italk{All these authors \citep{calvo2004using,cannayen2011latex,bari2016identification,sharma2012ndsu,baczkowski1990ndsu} carried out some research.}
1249
1250 %-----------------------------------------------------------------------------
1251 \section{Author-year and Numbered Citations of \texttt{natbib}}
1252 \italk{Loading the \texttt{natbib} package with appropriate options in the preamble create the author-year or numbered citations. This was not coded into the class to allow for loading other referencing systems (e.g., \texttt{biblatex}) as desired.}
1253
1254 {\singlespacing
1255 \begin{verbatim}
1256 \usepackage[round,sort&compress,authoryear]{natbib} % for author-year
1257 (or)
1258 \usepackage[numbers,sort&compress]{natbib} % for numbered citations
1259 (or)
1260 \usepackage[sort&compress]{natbib}
1261 \citestyle{plain}
1262 \end{verbatim}
1263 }
1264
1265 \italk{Or, the predefined citation styles (most accepted styles with right options), with basic loading of natbib (see above listing), are contained within the natbib code for the following bibliography styles can be used \citep{daly2010natural}. Obviously, appropriate combination will produce the desired results.\\}
1266
1267 \vspace{-6ex}
1268 \textcolor{magenta}{
1269 \begin{enumerate}
1270 \item \texttt{plain} (the 4 base styles): square braces, numerical, commas plainnat etc.: \hl{square braces, author-year, commas};
1271 \item \texttt{agu} (American Geophysical Union): \hl{square, author-year, semi-colon};
1272 \item \texttt{egu} (European Geosciences Union): \hl{round, author-year, semi-colon};
1273 \item \texttt{agms, dcu, kluwer} (Harvard set): \hl{round, author-year};
1274 \item \texttt{cospar} (Committe on Space Research): \hl{slashes, numerical, comma};
1275 \item \texttt{nature} (Journal Nature): \hl{superscripts}.
1276 \end{enumerate}
1277 }
1278
1279 \italk{
1280 The options available provide another means of specifying the punctuation
1281 for citations to be used while loading the \texttt{natbib} package as \textcolor{magenta}{\cmd{usepackage}[\emph{options}]\texttt{\{natbib\}}} are: \textbullet\:round, \textbullet\:square, \textbullet\:curly, \textbullet\:angle, \textbullet\:semicolon, \textbullet\:authoryear, \textbullet\:numbers, \textbullet\:super, \textbullet\:sectionbib, \textbullet\:sort\&compress, \textbullet\:compress, \textbullet\:nonamebreak, \textbullet\:merge, \textbullet\:elide, and \textbullet\:mcite. Refer the package documentation \citep{daly2010natural}.
1282 }
1283
1284 %-----------------------------------------------------------------------------
1285 \section{Using Bib\LaTeX\ for Citation}
1286 \italk{Using Bib\LaTeX\ for citation will be similar to citation using BibTeX, especially when \vb{natbib} is used. As given in the class documentation the Bib\LaTeX\ will be setup using the following command:
1287 }
1288
1289 \vspace{2ex}
1290 {\singlespacing
1291 \begin{verbatim}
1292 \usepackage[style=apa,natbib=true,backend=biber]{biblatex}
1293 \end{verbatim}
1294 }
1295
1296 \italk{The compatible styles that can be used as option while loading Bib\LaTeX\/ are: \textbullet\:numeric, \textbullet\:numeric-comp, \textbullet\:alphabetic, \textbullet\:authoryear, \textbullet\:authoryear-icomp, \textbullet\:authortitle, \textbullet\:verbose, \textbullet\:reading, \textbullet\:draft, \textbullet\:apa, \textbullet\:chem-acs, \textbullet\:chem-angew, \textbullet\:chem-biochem, \textbullet\:chem-rsc, \textbullet\:ieee, \textbullet\:mla, \textbullet\:musuos, \textbullet\:nuture, \textbullet\:nejm, \textbullet\:phys, \textbullet\:science, and \textbullet\:oscola.}
1297
1298
1299 %-----------------------------------------------------------------------------
1300 %-----------------------------------------------------------------------------
1301 \myheading{Other aspects in disquisition - Paper-styled Chapter}
1302
1303 %-----------------------------------------------------------------------------
1304 \section{SI units in thesis/disseration}
1305 \italk{This is a section of my thesis. SI units are available, which provides correct spacing between the number and the uint. For example, \SI{120800600}{\m\squared} gives the thousands separator and correct spacing between the number and units. The command used to produce was \textbackslash\texttt{SI\{120800600\}\{\textbackslash m\textbackslash squared\}}. Also, refer to \texttt{siunitx} package documentation for several other commands and features.}
1306
1307 %-----------------------------------------------------------------------------
1308 \section{Handling Equations}
1309 \italk{The \texttt{abovedisplayskip} through \texttt{setlength} to reduce the spacing above the equations. These equations can be referred using \texttt{cref} commands (\cref{eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8}). The code shows how the first 5 equations were produced:}
1310
1311 \vspace{3ex}
1312 {\onehalfspacing
1313 \begin{verbatim}
1314 \setlength{\abovedisplayskip}{-12pt} % required to adjust gap
1315 \begin{align}
1316 &\text{Convex area} = \frac{\text{Area}}{\text{Solidity}} \label{eq1} \\[1ex]
1317 &\text{Hollowness} = \frac{\text{Convex area - Area}}{\text{Convex area}}
1318 \label{eq2} \\[1ex]
1319 &\text{Reverse aspect ratio (RAR)} = \frac{\text{1}}{\text{Aspect ratio}}
1320 \label{eq3} \\[1ex]
1321 &\text{Rectangularity} = \frac{\text{Area}}{\text{Bounding rectangle area}}
1322 \label{eq4} \\[1ex]
1323 &\text{Feret major axis ratio (FMA)} = \frac{\text{Feret diameter}}
1324 {\text{Major axis}} \label{eq5}
1325 \end{align}
1326 \end{verbatim}
1327 }
1328
1329 \setlength{\abovedisplayskip}{-12pt} % required to adjust gap
1330 \begin{align}
1331 &\text{Convex area} = \frac{\text{Area}}{\text{Solidity}} \label{eq1} \\[1ex]
1332 &\text{Hollowness} = \frac{\text{Convex area - Area}}{\text{Convex area}} \label{eq2} \\[1ex]
1333 &\text{Reverse aspect ratio (RAR)} = \frac{\text{1}}{\text{Aspect ratio}} \label{eq3} \\[1ex]
1334 &\text{Rectangularity} = \frac{\text{Area}}{\text{Bounding rectangle area}} \label{eq4} \\[1ex]
1335 &\text{Feret major axis ratio (FMA)} = \frac{\text{Feret diameter}}{\text{Major axis}} \label{eq5} \\[1ex]
1336 &\text{Convex area Feret ratio (CAF)} = \frac{\text{Convex area}}{\text{Feret diameter}^2} \label{eq6}\\[1ex]
1337 &\text{Compactness} = \frac{\text{Area}}{\text{Feret diameter}} \label{eq7}\\[1ex]
1338 &\text{Ratio of area to length (RAL)} = \frac{\text{Area}}{\text{Major axis}^2} \label{eq8}
1339 \end{align}
1340
1341 %-----------------------------------------------------------------------------
1342 \section{Spacing adjustment around non-textual elements}
1343 \textcolor{magenta}{Reproduced from the class documentation for ready reference, as this is important.} \italk{Usually, the spacing around the non-textual elements produced by \LaTeX\ will be good and based on typography principles. The environments that create these elements (e.g., tables, figures, equations) automatically supply an additional space to set the elements apart from the regular text and this is the expected and correct behavior. However, sometimes additional space will appear above or below these elements, which may be the result of fitting the elements with respect to others of the whole chapter. However, the spacing around the non-textual elements can be altered by one or any combination of the following to produce a consistent spacing around the non-textual elements:}
1344 \begin{itemize}
1345 \item
1346 \italk{The blank line coded, usually left between paragraphs, might create additional space before the element (e.g., \texttt{equation}, \texttt{align}) and that can be removed to reduce the space above the element.}
1347 \item
1348 \italk{Proper use of vertical spacing \cmd{vspace\{\ldots\}} command with negative spacing arguments (e.g., \cmd{vspace\{-3ex\}}) can able to correct the blank space above the element. This can also be used when a blank line was issued to separate the regular text from the element. Positive vertical space can also be issued as needed.}
1349 \item
1350 \italk{When a set of equations was coded (e.g., \texttt{align}, \texttt{eqnarray}), it will be treated as a block and will not break and flow through multiple pages and gets pushed to the next page. This will create large gaps and can be broken into two or more subsets of equations to fit the page by repeating the environments.}
1351 \item
1352 \italk{The actual space around the equations (displayed items) is controlled be the \\ \cmd{abovedisplayskip[=] glue} and \cmd{belowdisplayskip[=] glue}.
1353 The \texttt{glue} is called a ``rubber'' length stating a basic length with an allowed play on both positive and negative sides. The default value for these commands was ``\texttt{12pt plus 3pt minus 9pt}'', and is also valid to use the basic length directly as:}
1354
1355 \cmd{abovedisplayskip=-12pt}
1356
1357 \italk{Another way for issuing the command is using the basic \cmd{setlength} as \\ \cmd{setlength\{}\cmd{abovedisplayskip\}\{-12pt\}}. To have the regular behavior subsequently, the default should be restored by reissuing the commands using the default values.}
1358 \item
1359 \italk{In figures, the space above the caption (the space between the bottom of the image and the top of the caption) can be controlled by using the optional argument of the \texttt{myfig, myfigls, myfigap} and \texttt{myfigapls} commands. This optional argument was specifically developed to address this caption placement issue. This may be required only for necessary adjustments as the default (without option) will work well in most cases.}
1360 \end{itemize}
1361
1362 %-----------------------------------------------------------------------------
1363 \section{Annotation Commands}
1364 \italk{Using the defined highlight, new text, deleted text, replaced text, and notes commands, the annotation features can be used by the student and the advisor. All the annotations should be commented (using \%) before submission. The commands (\textcolor{magenta}{again reproduced}) are:}
1365
1366 \textbackslash\texttt{hl\{Highlight\}} gives: \hl{Highlight}. This will be regular text.
1367
1368 \textbackslash\texttt{nt\{Test new text.\}} gives: \nt{Test new text.} This will be regular text.
1369
1370 \textbackslash\texttt{dt\{Deleted text.\}} gives: \dt{Deleted text.} This will be regular text.
1371
1372 \textbackslash\texttt{rt\{The text to be deleted\}\{Which will be replaced by this!\}} gives: \rt{The text to be deleted}{Which will be replaced by this!} This will be regular text again.
1373
1374 \textbackslash\texttt{notes\{Testing this To Do notes - for communication!\}} gives: \notes{Testing this To Do notes - for communication!}
1375
1376 %-----------------------------------------------------------------------------
1377 \section{Handling URLs}
1378 \italk{The URL typesetting in some cases will create an issue. The URLs sometimes flow into the right margin limits and will not break like normal text. As URLs carry the function of pointing to web resources, breaking them with the usual ``hyphen,'' which is an additional character, will interfere with its pointing function.}
1379
1380 \italk{The typical \cmd{url\{\ldots\}} command works most of the time; however, it fails to break the URL flowing into the right margin. This can be visualized with a ``draft'' option in the very first \cmd{documentclass[draft]\{\ldots\}} command. Making additional breaking ``after'' some characters will help the process of breaking URL, following the \texttt{url} package documentation. The command used are \cmd{UrlBreaks} and \cmd{do}. The whole set of alphabets (lower- and upper-case) and a few special symbols were coded in the class to break the URLs.}
1381
1382 \italk{The following URL command:}
1383 \vspace{-2ex}
1384 \begin{verbatim}
1385 \url{https://www.pearson.com/us/higher-education/program/Lamport-La-Te-X-A-
1386 Document-Preparation-System-2nd-Edition/PGM159713.html}
1387 \end{verbatim}
1388
1389 \noindent \italk{produces an hyperlink (shown in magenta subsequently) that points $\Rightarrow$ }\textcolor{magenta}{\url{https://www.pearson.com/us/higher-education/program/Lamport-La-Te-X-A-Document-Preparation-System-2nd-Edition/PGM159713.html}} \italk{to the webpage. Also, notice how the URL was correctly broken to fit the margin, and hovering on the URL will show the complete working URL when clicked will take the user to the webpage.}
1390
1391 \italk{In the bibliography files the URLs are included as \cmd{url\{\ldots\}} command in ``article'' or ``book'' or other compatible items as a ``note'' entry. Usually, this will be used for pointing \texttt{doi} or \texttt{www} resources. Refer to the \texttt{bib} file of this document for examples. }
1392
1393 %-----------------------------------------------------------------------------
1394 \section{Theorems Environment}
1395
1396 \italk{In mathematical research documents, theorems and proofs are among the most common elements but others, such as lemmas, propositions, axioms, corollaries, conjectures, definitions, remarks, and cases, are also used steps. The best way to typeset them is to use the American Mathematical Society (AMS) \textcolor{magenta}{asmthm} package \citep{amsthm2017}, which is the modern method and provides a lot of customization.}
1397
1398 \italk{It is natural to handle theorem elements as \LaTeX environments; however, because of several user-specific formats (e.g., numbering and variety of elements) that need to be specified, the document class do not provide predefined environments. The package documentation may be referred to define the necessary elements using \cmd{newtheorem} command, similar to \cmd{newenvironment} command to suit the user's need.}
1399
1400 \italk{The following theorem and other elements were created after defining the environment shown subsequently in the preamble:}
1401
1402 \begin{verbatim}
1403 \newtheorem{theorem}{Theorem}[section]
1404 \newtheorem{corollary}{Corollary}[theorem]
1405 \newtheorem{lemma}{Lemma}[corollary]
1406 \end{verbatim}
1407
1408 \vspace{-0.5in}
1409 \italk{
1410 \begin{theorem}
1411 Let \(f(x)\) be our function that will do wonders and this function is enough to \emph{``end the world hunger''} --- but will it? Note the use of \cmd{emph\{\ldots\}} that made the world hunger upright!
1412 \end{theorem}
1413 \begin{theorem}[Pythagorus theorem]
1414 \label{pytha}
1415 This is that famous theorem we all studied at middle school, which we still remember and apply in our daily lives
1416 \vspace{6ex}
1417 \[ a^2 + b^2 = c^2 \qquad \emph{(or)} \qquad c = \sqrt{a^2 + b^2} \]
1418 \end{theorem}
1419 \vspace{-3ex}
1420 \noindent where $a$ and $b$ are the lengths of the legs of the right triangle and $c$ is the hypotenuse.
1421 The next corollary is a consequence of \cref{pytha} and is also useful. The use of \cmd{cref} correctly inserted the item ``theorem.''
1422 \begin{corollary}
1423 It is a right rectangle whose sides measure \SI{3}{m}, \SI{4}{m}, and \SI{5}{m}.
1424 \label{coro}
1425 \end{corollary}
1426 Lemma usually follows a corollary --- and there ends my knowledge of math.
1427 \begin{lemma}
1428 Given two line segments whose lengths are $p$ and $q$, we can add them and get a new length $r$ as \(r=p+q\).
1429 \label{lem}
1430 \end{lemma}
1431 Theorems, corollaries, lemmas, and other elements can be referenced after defining the labels in an appropriate environment such as \cref{pytha}, \cref{coro}, \cref{lem} when a label is assigned. Again, \cmd{cref} commands produced the correct references and categories.
1432 }
1433
1434 %-----------------------------------------------------------------------------
1435 \section{Fun Notes}
1436 \italk{Some unexpected behavior, but logical behavior we will come across while using \LaTeX. And some of those are described here (``itemize'' environment is used to produce the bulleted list).}
1437
1438 \begin{itemize}
1439 \item
1440 \italk{Note the position of the ``period'' in} {\LARGE F., O., T., P., V., W., and Y.} \italk{and compare it with H. --- happens with some fonts. Such encroachment can be rectified by inserting ``\cmd{@}'' between the letter and period as:} {\LARGE{\verb|F\@.|}} \italk{command.}
1441
1442 \italk{Now the rectified version is:} {\LARGE F\@., O\@., T\@., P\@.; V\@.; W\@.; and Y\@.}
1443
1444 \item
1445 \italk{Notice the no space before the word ``environment'' \LaTeX environments with the code [\cmd{LaTeX environments}]. Using the spacing command ``\cmd{\:}'' (backslash-and-space) as [\cmd{LaTeX\textbackslash\:environments}] will create the enough space as \LaTeX\ environments.}
1446 \end{itemize}
1447
1448
1449 %-----------------------------------------------------------------------------
1450 %-----------------------------------------------------------------------------
1451 \myheading{Seventh chapter without tables and figures}
1452
1453 %-----------------------------------------------------------------------------
1454 \section{Test 1}
1455 \italk{Section text text text text text text text text text text text text text text text text text text text text text.}
1456
1457 %-------------------------------------------
1458 \subsection{Test 2}
1459 \italk{Subsection works.}
1460
1461 %-------------------------------------------
1462 \subsubsection{Test 3}
1463 \italk{Sub-subsection works.}
1464 \kant[3]
1465
1466 %-------------------------------------------
1467 \paragraph{Test 4}
1468 \italk{Paragraph works.}
1469
1470
1471 %-----------------------------------------------------------------------------
1472 \renewcommand{\bibname}{REFERENCES}
1473 % Compatible natbib styles: plainnat, abbrvnat, unsrtnat, rusnat, agsm, chicago, apalike
1474
1475 %bibtex used here
1476 \biblio{apalike}{mybib}\label{biblio}
1477
1478
1479 %-----------------------------------------------------------------------------
1480 %-----------------------------------------------------------------------------
1481 \appendix % single and simple regular appendix
1482
1483 %--------------------------------------------------
1484 \italk{This is a regular Appendix - where only one appendix is used. \textcolor{magenta}{In this document, we use both Appendix and Named Appendices --- which will be never the case and only one method is used --- but shown here for illustration}. This was slightly modified so that it correctly formats sections, subsections, sub subsections, figures, and tables. Here the label A is automatically supplied. The list of appendix figures and tables will be automatically updated. Obviously, for multiple appendices (A, B, C, etc.) the \cmd{namedappendices\{\ldots\}\{\ldots\}} should be used --- as followed subsequently.}
1485
1486 \italk{A few handy commands developed for handling abstract regular and landscape figures are \cmd{myfigap}, \cmd{myfigapls} similar to regular figures with 1 optional + 5 arguments are: }
1487
1488 \label{figv}
1489 \vspace{2ex}
1490 {\singlespacing
1491 \begin{verbatim}
1492 For regular appendix figures {1+5 inputs; }
1493 \myfigap[2ex]{ht}{0.5}{appenddfig1.pdf}{My appendix caption goes here}{figA1}
1494
1495 For landscape appendix figures {1+5 inputs}
1496 \myfigapls[2.5ex]{p}{1.3}{appenddfig2.pdf}{My appendix caption goes here}{figA2}
1497 \end{verbatim}
1498 }
1499
1500 \italk{Other elements such as equations are coded in the usual way. While tables use \texttt{appendixtable} environment in the usual way. Simple use of \texttt{table} environment will not number the tables correctly.}
1501
1502 \italk{Appendices will not support the \cmd{cref\{\ldots\}} command only for \textcolor{magenta}{figures and tables} (as these were redefined in the class). However, the basic \cmd{ref\{\ldots\}} preceded by Figure or Table as required should be used. For other items, such as equations, and sections the \cmd{cref\{\ldots\}} works well. Check the code and outputs below (labels were defined in their respective environment):}
1503
1504 {\singlespacing
1505 \begin{verbatim}
1506 Referred items: \cref{eqa1} text. \cref{sub1} text. \cref{figap1} text
1507 \cref{aptab1} text. \\
1508
1509 Referred items: \ref{eqa1} text. Section \ref{sub1} text. Figure \ref{figap1}
1510 text and Table \ref{aptab1} text.
1511 \end{verbatim}
1512 }
1513
1514 \italk{Referred items: \cref{eqa1} text. \cref{sub1} text. \cref{figap1} text \cref{aptab1} text. \\
1515 Referred items: \ref{eqa1} text. \ref{sub1} text. Figure \ref{figap1} text and Table \ref{aptab1} text.
1516 \\ \textcolor{magenta}{Notice the missing items (by \cmd{cref\{\ldots\}}) are marked as ??.}}
1517
1518 %-----------------------------------------------------------------------------
1519 \section{Appendix Figure}
1520
1521 \myfigap[1.5ex]{h!}{0.45}{frog.jpg}{Appendix one - figure using myfigap command - figure captions go at the bottom and is long too.}{figap1}
1522
1523 \italk{The code that created the figure above (Fig. \ref{figap1}; this cross reference was made using \cmd{ref\{\}} command) is:}
1524
1525 {\onehalfspacing
1526 \begin{verbatim}
1527 \myfigap[1.5ex]{h!}{0.45}{frog.jpg}{Appendix one - figure using myfigap command -
1528 figure captions go at the bottom and is long too.}{figap1}
1529 \end{verbatim}
1530 }
1531
1532 \italk{Shown below is an equation \cref{eqa1}. }
1533
1534 \vspace{-4ex}
1535 \begin{equation}
1536 y = mx + c
1537 \label{eqa1}
1538 \end{equation}
1539
1540 %--------------------------------------------------
1541 \subsection{One of One}
1542 \label{sub1}
1543 \kant[2]
1544
1545 \italk{The code that created the table (table~\ref{aptab1}) below is:}
1546
1547 {\onehalfspacing
1548 \begin{verbatim}
1549 \begin{appendixtable}[h]
1550 \centering
1551 \caption{One appendix full-width table captions go at the top of the table.}
1552 \setlength\tabcolsep{1.3in}
1553 \begin{tabular}{lr}
1554 \toprule
1555 Number & Month \\
1556 \midrule
1557 1 & January \\
1558 2 & February \\
1559 3 & March\\
1560 \bottomrule
1561 \label{aptab1}
1562 \end{tabular}
1563 \end{appendixtable}
1564 \end{verbatim}
1565 }
1566
1567 \begin{appendixtable}[h]
1568 \centering
1569 \caption{One appendix full-width table captions go at the top of the table.}
1570 \setlength\tabcolsep{1.3in}
1571 \begin{tabular}{cc}
1572 \toprule
1573 Number & Month \\
1574 \midrule
1575 1 & January \\
1576 2 & February \\
1577 3 & March\\
1578 \bottomrule
1579 \label{aptab1}
1580 \end{tabular}
1581 \end{appendixtable}
1582
1583 %--------------------------------------------------
1584 \subsection{Two of One}
1585
1586 \italk{Just another figure (fig.~\ref{figap2}) included for illustrating the lifting of the caption by -ve optional argument. }
1587
1588 \myfigap[-4ex]{h!}{0.6}{frog.jpg}{Appendix one - figure 2 using myfigap command - figure captions go at the bottom and is long too, while demonstrating the -ve value lifting the caption up --- not acceptable though.}{figap2}
1589
1590 %-------------------------------------------
1591 \subsubsection{Subsubsection}
1592 \italk{This also works.}
1593
1594
1595 %--------------------------------------------------
1596 %--------------------------------------------------
1597 \namedappendices{A}{Named appendix title here} % Multiple named appendices
1598
1599 \textcolor{magenta}{Note: As mentioned earlier the named appendices were included for illustration purposes. The application of both will interfere with the numbering of sections, subsections, tables, figures, and so on. One may find in TOC, LOAT, and LOAF the same numbers begin repeated, which is logical and correct behavior. But this is of \emph{no consequence} in real work as both appendix and named appendix will never be used in a single disquisition.}
1600
1601 \italk{This named appendix was made using the command:}
1602
1603 \begin{verbatim}
1604 \namedappendices{A}{Named appendix title here}
1605 \end{verbatim}
1606
1607 %-----------------------------------------------------------------------------
1608 \section{Section Test}
1609
1610 I can include appendix material here.
1611
1612 \italk{And the second figure using the shortcut command \texttt{myfigap} and uses a long caption that wraps around (refer code in page: \pageref{figv}).}
1613
1614
1615 \myfigap{H}{0.4}{frog.jpg}{Named appendix figure using myfigap command - figure captions go at the bottom - a long long long long long long long long long long long long long long long long long long long long caption.}{figaa1}
1616
1617 \kant[1]
1618
1619 \begin{appendixtable}[h]
1620 \centering
1621 \caption{Appendix table (full-width) using \texttt{tabu} package with \texttt{booktabs} commands illustrating column width coefficient (2nd column is thrice the width of 1st) and automatic overflow of rows as a paragraph. Captions go at the top of the table and left-justified.}
1622 \begin{tabu}{X X[3]}
1623 \toprule
1624 Number & Month \\
1625 \midrule
1626 1 & January, Jan, Jan, Jan, Jan, Jan, Jan, Jan \\
1627 2 & February, Feb, Feb, Feb, Feb, Feb, Feb, Feb \\
1628 \cmidrule(lr){2-2}
1629 3 & March, Mar, Mar, Mar, Mar, Mar, Mar, Mar, Mar, Mar, Mar, Mar, Mar, 2-rows\\
1630 \cmidrule(lr){2-2}
1631 4 & April, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, Apr, 3-rows\\
1632 \bottomrule
1633 \end{tabu}
1634 \end{appendixtable}
1635
1636 %-----------------------------------------------------------------------------
1637 \section{Another Section}
1638 Two sections shown. \kant[7]
1639
1640 %-------------------------------------------
1641 \subsection{Test 2}
1642 Subsection works.
1643
1644 %-------------------------------------------
1645 \subsubsection{Test 3}
1646 Sub-subsection works.
1647
1648
1649 %-----------------------------------------------------------------------------
1650 %-----------------------------------------------------------------------------
1651 \namedappendices{B}{Named second appendix title here}
1652
1653 %-----------------------------------------------------------------------------
1654 \section{Test}
1655 I can include appendix material here. \italk{Table~\ref{apbtab1} produced.}
1656
1657 \begin{appendixtable}[h]
1658 \centering
1659 \caption{Named appendix B full-width table ONE using \texttt{tabu} environment.}
1660 \begin{tabu}{ *4{X[c]} }
1661 \toprule
1662 Number & Month & Same & Same\\
1663 \midrule
1664 1 & January & January & January \\
1665 2 & February & February & February \\
1666 3 & March & March & March\\
1667 \bottomrule
1668 \label{apbtab1}
1669 \end{tabu}
1670 \end{appendixtable}
1671
1672 \vspace{-4ex}
1673 \italk{Repeated table B1 (table~\ref{apbtab2})}
1674
1675 \begin{appendixtable}[h]
1676 \centering
1677 \caption{Named appendix B full-width table TWO using \texttt{tabu} environment.}
1678 \begin{tabu}{ *4{X[c]} }
1679 \toprule
1680 Number & Month & Same & Same\\
1681 \midrule
1682 1 & January & January & January \\
1683 2 & February & February & February \\
1684 3 & March & March & March\\
1685 \bottomrule
1686 \label{apbtab2}
1687 \end{tabu}
1688 \end{appendixtable}
1689
1690 \vspace{-4ex}
1691 \italk{Figure produced (fig.~\ref{figab1}) - small one though!}
1692
1693 \myfigap{H}{0.15}{frog.jpg}{Named appendix B figure.}{figab1}
1694
1695
1696 \italk{Now a landscape figure in appendix (fig.~\ref{figab2}, which can be found in \cpageref{figab2}), and the shortcut command \texttt{myfigapls} (refer code in \cpageref{figv}).}
1697
1698 \myfigapls[2ex]{p}{0.9}{frog.jpg}{Fourth figure using myfigap command - figure captions go at the bottom}{figab2}
1699
1700 %-----------------------------------------------------------------------------
1701 \section{Normal Section}
1702 \kant[11]
1703
1704
1705 %-----------------------------------------------------------------------------
1706 %-----------------------------------------------------------------------------
1707 \namedappendices{C}{Third appendix title here}
1708
1709 \italk{Note the \hl{important note} at the end of this appendix!}
1710
1711 \kant[3]
1712
1713 %-----------------------------------------------------------------------------
1714 \section{Test1 and Program Source Code Listing}
1715 I can include appendix material here. \kant[9]
1716
1717 \italk{Computer program source codes, pseudocodes, and algorithms can be listed using the \vb{listings} package and loading the different options including the language used using \cmd{lstset\{arguments\}}. This package is an elaborate one and users should refer to the documentation for several features to suit their needs. An example of a section of Java program using \vb{lstlisting} environment (refer source code) is shown below as an illustration:}
1718
1719 {\singlespacing
1720 \begin{lstlisting}
1721 //-------------------------------------------------------------------------
1722 //
1723 // Process the color image into a stack and extract all channels of HSB
1724 // as global variable
1725 //
1726 public void extractHSBchannel(ImagePlus colimp){
1727
1728 ImageProcessor iporig = colimp.getProcessor();
1729
1730 ImagePlus impd = colimp.duplicate(); // required otherwise original will be used up
1731 impd.show(); // required to generate the stacks
1732
1733 IJ.run(impd, "HSB Stack", "");
1734 IJ.run("Stack to Images", "");
1735 int ni = WindowManager.getImageCount();
1736
1737 String[] flist = null; // blank array without size specificatiion
1738
1739 flist = WindowManager.getImageTitles();
1740
1741 H_imp = WindowManager.getImage?("Hue"); // as an array or global variable other channels can also be preserved
1742 S_imp = WindowManager.getImage?("Saturation");
1743 B_imp = WindowManager.getImage?("Brightness");
1744 }
1745 //
1746 //-------------------------------------------------------------------------
1747 \end{lstlisting}
1748 }
1749
1750 %-------------------------------------------
1751 \subsection{Test2}
1752 I can include appendix material here.
1753
1754 \italk{Shown below is another equation showing hypotenuse \Cref{eqc1}. The previous equation in the appendix one is \cref{eqa1} which was $y = mx + c$ in \cpageref{eqa1}. }
1755
1756 \vspace{-3ex}
1757 \begin{equation}
1758 r^2 = x^2 + y^2
1759 \label{eqc1}
1760 \end{equation}
1761
1762 %-------------------------------------------
1763 \vspace{-2ex}
1764 \subsubsection{Test3}
1765 I can include appendix material here.
1766
1767 %-------------------------------------------
1768 \paragraph{Test4}
1769
1770 {\hl{Important note:}
1771 \textcolor{magenta}{It should be noted that the final appendix should contain the appendix tables and figures to generate the List of Appendix Tables and List of Appendix Figures --- based on NDSU thesis class. Otherwise, these items will not be created.}
1772 }
1773
1774 \textcolor{magenta}{This issue is not present with regular chapters.}
1775
1776 \italk{However, now we have the new \cmd{closeappendices} command to ensure the list of appendix tables and figures. This has to be given at the end of the last appendix.}
1777
1778 \vspace{1cm}
1779 \begin{center}
1780 {\LARGE\bfseries
1781 Happy {\LaTeX}ing, Thesis Writing, \\
1782 and Paper Publishing!
1783 }
1784 \end{center}
1785
1786 \hfill {\footnotesize --- C. Igathinathane}
1787 \closeappendices
1788
1789 \vspace{0.5in}
1790 \begin{center}
1791 \italk{--- The End ---}
1792 \end{center}
1793 %--------------------------------------------------
1794
1795 \end{spacing}
1796
1797 \end{document}
1798 %--------------------------------------------------
1799 %--------------------------------------------------
1800 %--------------------------------------------------