Skip to content

Commit

Permalink
Updated functionality and documentation to be consistent with TheDocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ES-Alexander committed Apr 26, 2019
1 parent 90b0bf7 commit addf444
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 477 deletions.
92 changes: 1 addition & 91 deletions Assignment-Template/AssignmentTemplate2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,94 +43,4 @@

Answer
\end{enumerate}
\end{document}





%%--------------------- COMMAND USAGE ---------------------%%
%% FIGURES
% Normal figure:
% \fig{scale 1=100%}{filename}{caption \label{labelname}} (label optional)

% Figure with frame:
% \framefig{scale}{file}{caption \label{labelname}}

% Insert sub-figures (within a \begin{figure}[H] \end{figure} pair)
%\subfig{alignment}{fig-width}{img-scale/height/width}{filename}{caption}
% alignment = t(top) / b(bottom)
% width e.g. = 0.5\textwidth
% scale e.g. = scale=0.5 / height=5cm / width=3in
% filename e.g. = image / image.jpg / etc
% caption e.g. = Descriptive subfigure caption

%% COMMENTS
% Insert multi-line comments with \comment{<text>}
% Insert displayed multi-line comments using \dcom{<text>}

%% QUESTIONS
% Question syntax:
% % QN
% \que {Question summary/details}
% Question response.

%% CODE
% Insert formatted Matlab file (\matlab{filename}{label})
% Insert formatted Python file (\python{filename}{label})

%% REFERENCING
% Reference figures (\figref{label})
% Reference subfigures (\sfigref{label})
% Reference tables (\tabref{label})
% Reference code (\coderef{label})
% Reference sections (\secref{label})
% Reference appendices (\appref{label})

%% MATHS NOTATIONS
% Align (multiline) maths environment:
% \begin{align} --> \end{align}
% use \\ for newline, & for alignment character

% Inline maths environment:
% $ --> $

% Insert units with \unit{<unit>} (e.g. \unit{m}^3)
% Units without a space before are \nsunit{<unit>}

% Insert *10^n with \E{n} (e.g. \E{-5})
% To use inline in normal text mode, use \tE{n}

% Command for math formatted differentials (\D x)

% Command for short bolded vector notation (\ve{x})

% Commands for left/right surrounding braces
% \lr{thing} % -> \left( thing \right),
% \lrs{thing} %-> \left[ thing \right],
% \lra{thing} %-> \left | thing \right |

% Commands for integrals
% \eint{integrand}{wrt var}
% \eiint{integrand}{wrt var inner}{wrt var outer}
% \dint{lower limit}{upper limit}{integrand}{wrt var}
% \diint{outer_low}{out_high}{inner_low}{in_high}{integrand}{in_var}{out_var}

% Command for partial derivatives (\del{y}{t})

% Command for full derivatives, nth order (\der[2]{y}{t} or \der{y}{x})
% 'order' is optional, hence square brackets

% Command for trigonometric functions, nth power
% (e.g. \cos[2]{x} or \sin{4} or \tan[-1]{y})
% 'power' is optional

% Command for logarithms, base n (e.g. \log[2]{x} or \log{y})
% 'base' is optional

% Command for quadratic formula (\qf{a}{b}{c})

% Command for 2x2 eigenvalues working (\evals{X}{x11}{x21}{x12}{x22})

% Command for 2x2 eigenvectors working
% (\evecs{X}{\ve{v}}{v1}{v2}{x11}{x21}{x12}{x22})
\end{document}
69 changes: 42 additions & 27 deletions CommonSetup2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}

% Insert sub-figures (within a multifig)
% \subfig[img-scale/height/width][alignment]{fig-width}{filename}{caption}
% \subfig[img-scale/height/width]{alignment}{fig-width}{filename}{caption}
% alignment: applies to within the figure (normally want t (top))
%
% auto-labelling labels by the filename, reference with \sfigref{filename} or
Expand Down Expand Up @@ -244,33 +244,48 @@
\end{center}
}

% use as \python{filename}{caption}
\newcommand{\python}[2]{
\codeCaption[#1]{#2}
\lstinputlisting[
language=Python,
numbers=left,
numberstyle=\color{lightgrey}\small,
numbersep=8pt,
basicstyle=\ttm,
basewidth={.48em}, % Inter-letter spacing
otherkeywords={self,cls}, % Custom keywords
keywordstyle=\ttb\color{deepblue}, % Keywords style
emph={__init__,__call__,__eq__,__str__,__repr__}, % Custom highlighting
emphstyle=\ttb\color{deepred}, % Highlighting style
stringstyle=\color{deepgreen},
commentstyle=\color{deepred},
frame=single,
showstringspaces=false,
breaklines=true
]{#1}
\lstdefinestyle{python-IDLE}{
language=Python,
numbers=left,
numberstyle=\color{lightgrey}\small,
numbersep=8pt,
basicstyle=\ttm,
basewidth={.48em}, % Inter-letter spacing
otherkeywords={self,cls}, % Custom keywords
keywordstyle=\ttb\color{deepblue}, % Keywords style
emph={__init__,__call__,__eq__,__str__,__repr__}, % Custom highlighting
emphstyle=\ttb\color{deepred}, % Highlighting style
stringstyle=\color{deepgreen},
commentstyle=\color{deepred},
frame=single,
showstringspaces=false,
breaklines=true
}

% use as \matlab{filename}{caption}
\newcommand{\matlab}[2]{
\codeCaption[#1]{#2}
\lstset{style=Matlab-editor}
\lstinputlisting{#1}
\lstset{basicstyle=\ttfamily, basewidth={0.48em}}

% \intextCode[options]{caption}{code}
\newcommand{\intextCode}[3][]{
\codeCaption{#2}
\begin{lstlisting}[#1]
#3
\end{lstlisting}
}

% \inputCode[options]{filename}{caption}
\newcommand{\inputCode}[3][]{
\codeCaption[#2]{#3}
\lstinputlisting[#1]{#2}
}

% use as \python[options]{filename}{caption}
\newcommand{\python}[3][]{
\inputCode[style=python-IDLE, #1]{#2}{#3}
}

% use as \matlab[options]{filename}{caption}
\newcommand{\matlab}[3][]{
\inputCode[style=Matlab-editor, #1]{#2}{#3}
}

%-----------------REFERENCING------------------%
Expand Down Expand Up @@ -299,7 +314,7 @@
\newcommand{\D}{\,\mathrm{d}}

% Command for degrees symbol
\renewcommand{\deg}[1]{{#1}^\circ}
\renewcommand{\deg}[1][]{{}^\circ\nsunit{#1}}

% Command for short bolded vector notation
\newcommand{\ve}[1]{\mathbf{#1}}
Expand Down
179 changes: 1 addition & 178 deletions Minutes-Template/MinutesTemplate2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -77,181 +77,4 @@
\end{itemize}


\end{document}






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -------------------- COMMAND USAGE ---------------------- %

\comment{%%
%% MINIPAGES
\begin{minipage}{0.4\linewidth}
% minipages have their own size within the main page, as well as their
% own footnotes and other specified geometry/text features.
\end{minipage}

%% LISTS
% removes space before list
\vspace{-0.7\topsep}
\begin{itemize}
\item Main
\begin{itemize}
\item[o] Sub
\end{itemize}
\end{itemize}

%% FOOTNOTES
% Sets the footnotetext with the key of the contents of the square
% brackets (used when creating footnotes in minipages)
\footnotetext[1]{Text in footnote}
% in the main page standard footnotes can be created using
% \footnote{•}
\footnote{Text in footnote}

%% PAGENUMBERING
\pagenumbering{roman} % Roman numerals (contents, cover page)
\pagenumbering{arabic} % Arabic numerals (body, appendices)

%% COLUMNS
% Sets two columns for this section of the document
\begin{multicols}{2}
<Text in first column>
\columnbreak % this breaks to the next column
<Text in second column>
\end{multicols}

%% TABLES
\begin{table}[H]
\footnotesize % sets text size to that of footnotes, within table
\centering % centers table on screen
\caption{Table Caption}
\label{tab: Table Caption}
% Using p{n\linewidth} sets that column to justified, with width n times
% text-width of the line.
% Using c sets that column to be centered, with width auto-scaled.
% Vertical line sets that column to have a vertical border there
% Space separates columns without a border.
\begin{tabular}{|c|c|p{0.5\linewidth}|}
\hline % adds a horizontal line
\rowcolor{tableHeadColour}
\textbf{Heading1} & \textbf{Heading2} &
\textbf{Heading3} \\ %\\ changes to next row of table
\hline
\textbf{Side Heading} & Text & Text\\
\hline
\end{tabular}
\end{table}

%% CODE
% the following code allows for displaying programming code, telling
% LaTeX to just print the contents rather than try to read it as LaTeX
% text.
\begin{lstlisting}
/** Code goes in here */
\end{lstlisting}

%% PAGE RESIZING/ROTATING
\setafport % Make the following pages A4 portrait
\setafland % Make the following pages A4 landscape
\setatport % Make the following pages A3 landscape
\setatland % Make the following pages A3 landscape

%% FIGURES
% Insert figures with
\fig{scale}{filename}{caption \label{fig: <label>}}
% Insert framed figures with
\framefig{scale}{filename}{caption \label{fig: <label>}}
% Insert sub-figures (within a figure)
\subfig{alignment}{fig-width}{img-scale/height/width}{filename}{caption}
% alignment = t(top) / b(bottom)
% width e.g. = 0.5\textwidth
% scale e.g. = scale=0.5 / height=5cm / width=3in
% filename e.g. = image / image.jpg / etc
% caption e.g. = Descriptive subfigure caption
%% e.g.
\begin{figure}[H]
\centering
\subfig{t}{}{}{}{caption \label{sfig: caption}}
~ % (next column)
\subfig{t}{}{}{}{caption \label{sfig: caption}}
\caption{caption \label{fig: caption}}
\end{figure}

%% CODE
\matlab{filename}{label} % inputs a formatted .m file with caption "Listing: label"
\python{filename}{label} % inputs a formatted .py file with caption "Listing: label"

%% REFERENCING
% Reference figures:
\figref{label}
% Reference subfigures:
\sfigref{label}
% Reference tables:
\tabref{label}
% Reference code:
\coderef{label}
% Reference sections:
\secref{label}

%% MULTI-LINE COMMENTS
\comment{<text>} % multiple lines of comment in the tex code
\dcom{<text>} % multi-line comment displayed in red in the document

%% UNITS IN MATH ENVIRONMENT
% insert units into the math environment, with a space included
% between the maths and the unit (e.g. \unit{m}^3)
\unit{<unit>}
% insert units without a space
\nsunit{<unit>}

%% POWERS OF TEN
% Insert *10^n with \E{n} (e.g. \E{-5})
\E{power} % from within math environment
\tE{power} % from within text environment

%% ADDITIONAL MATH ENVIRONMENT SHORTCUTS
% Math formatted differentials (e.g. \D x)
\D var

% Bolded vector notation (e.g. \ve{r})
\ve{var}

% Commands for left/right surrounding braces
\lr{thing} % -> \left( thing \right),
\lrs{thing} %-> \left[ thing \right],
\lra{thing} %-> \left | thing \right |

% Commands for integrals
% \eint{integrand}{wrt var}
% \eiint{integrand}{wrt var inner}{wrt var outer}
% \dint{lower limit}{upper limit}{integrand}{wrt var}
% \diint{outer_low}{out_high}{inner_low}{in_high}{integrand}{in_var}{out_var}

% Partial Derivatives (e.g. \del{x}{y})
\del{func/var}{wrt var}

% Full Derivatives - nth order (e.g. \der[2]{y}{t} or \der{y}{x}
\der[order]{func/var}{wrt var} % order is optional, hence square brackets

% Trigonometric (optional power) (e.g. \cos[2]{x} or \sin{4} or \tan[-1]{y})
\cos[order]{argument}
\sin[order]{argument}
\tan[order]{argument}

% Logarithm (optional base) (e.g. \log[2]{x} or \log{y})
\log[base]{argument}

% Quadratic Formula (e.g. \qf{5}{3}{2})
\qf{a}{b}{c}

% 2x2 Eigenvalues working (e.g. \evals{X}{x11}{x21}{x12}{x22})

% Command for 2x2 eigenvectors working
% (e.g. \evecs{X}{\ve{v}}{v1}{v2}{x11}{x21}{x12}{x22})
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
Loading

0 comments on commit addf444

Please sign in to comment.