Skip to content
Snippets Groups Projects
Verified Commit 2b4bb43b authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

feat(sw dev1): add details on env, improve layout

parent 85f5e726
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,9 @@ sectionstyle=style2
\newcommand\lstpy[1]{\lstinline[language=python]{#1}}
\usepackage{dirtree} % Directory trees
\renewcommand\DTstyle{\scriptsize}
\renewcommand\DTbaselineskip{10pt}
%\renewcommand\DTsetlength{0.0em}{0.0em}{0.0em}{0.4pt}{1.0pt} % Adapt lines to fontsize
\usepackage[nolinks]{qrcode}
\usepackage[maxnames=1, style=authoryear, date=year, isbn=false ]{biblatex}
......@@ -99,6 +102,7 @@ sectionstyle=style2
%% =============================================================================
\begin{document}
% Title
\titleframe
......
# LaTeXmk compiler configuration file
# -----------------------------------------------------------------------------
ensure_path('TEXINPUTS', '../../style//', '../../illustrations//');
ensure_path('TEXINPUTS', '../../style//', '../../illustrations//', 'figures//');
# Set compiler option (same option for all compilers)
set_tex_cmds('-synctex=1 -interaction=nonstopmode -file-line-error %O %S');
......
......@@ -5,22 +5,12 @@
\label{sec:fs:intro}
\begin{frame}{\insertsectionhead}
\framesubtitle{\insertsubsectionhead}
A good project start with a good file system organization!
\begin{itemize}
\item Purpose
\begin{itemize}
\item ease updating/maintenance
\item keep computer tidy
\end{itemize}
\vfil
\item Content
\begin{itemize}
\item file system basics
\item environment
\item software execution
\item examples
\end{itemize}
\item Simplifies updating/maintenance
\item Keeps computer tidy
\item Facilitates navigation
\end{itemize}
\vfill
\end{frame}
\subsection{Basics}
......@@ -29,7 +19,7 @@
\framesubtitle{\insertsubsectionhead}
\begin{columns}[onlytextwidth]
\column{0.55\textwidth}
\column{0.45\textwidth}
\dirtree{%
.1 C:.
.2 Program Files.
......@@ -45,8 +35,7 @@
.2 \ldots.
}
\column{0.35\textwidth}
\begin{itemize}
\column{0.5\textwidth} \begin{itemize}
\item Directory
\item File
\item Link (shortcut, symbolic, ...)
......@@ -60,29 +49,75 @@
\label{sec:fs:env}
\begin{frame}[fragile]{\insertsectionhead}
\framesubtitle{\insertsubsectionhead}
\begin{columns}[onlytextwidth]
\column{0.55\textwidth}
\begin{lstlisting}[language=bash,frame=single]
Environment variable
\begin{itemize}
\item System-wise variable used to affect the way a process (program) runs.
\end{itemize}
When developing, the most important one is often the \lst{PATH} variable.
\begin{itemize}
\item Tells the program where to look for files to read/execute.
\begin{lstlisting}[language=bash,frame=single, linewidth=0.6\textwidth]
# Windows
set PATH=C:\\Program\ Files;C:\\Windows
\end{lstlisting}
\begin{lstlisting}[language=bash,frame=single]
# Unix
export PATH=/usr/bin:/usr/local/bin
\end{lstlisting}
\vfill
\includegraphics[width=1.0\textwidth]{termgui.png}
\end{itemize}
\column{0.35\textwidth}
\begin{itemize}
\item Environment variables
\item Terminal vs. GUI
\end{itemize}
\note[item]{Environment variables can technically be system-wise or user-wise.}
\note[item]{Common usual environment variables are: \lst{PATH}, \lst{USER},
\lst{TMPDIR}, \lst{HOME}, \lst{TERMINAL}, \lst{LANG}, etc.}
\end{frame}
\begin{frame}[fragile]{\insertsectionhead}
\framesubtitle{\insertsubsectionhead - \matlab}
\matlab uses its own \lst{Path} variable.
\begin{itemize}
\item If you have files in a different place than the current directory,\\
you \alert{must add them to \matlab's path}.
\begin{lstlisting}[language=matlab,frame=single, linewidth=0.7\textwidth]
% Add a single directory to the path
addpath('mydir')
% Add all subdirectories of the current project
addpath(genpath('.')
\end{lstlisting}
\end{itemize}
\note[item]{The complementary function \lstmat{rmpath} removes a directory
from \matlab's path.}
\note[item]{You can also add permanently some directories to \matlab path by
browsing to the \lst{Set path} option the \lst{Home} tab. This is useful for
small libraries that you reuse often. But do not forget to include them
explicitly to a project if you need to share it !}
\note[item]{The base \matlab folder (found in \lst{/Documents/Matlab}) is by
default in \matlab's path. This means that any function that you place there
will be accessible by all projects.}
\end{frame}
\subsection{GUI \latin{vs} Terminal}
\label{sec:fs:gui}
\begin{frame}[fragile]{\insertsectionhead}
\framesubtitle{\insertsubsectionhead}
\begin{columns}[onlytextwidth]
\column{0.7\textwidth}
\includegraphics[width=0.99\columnwidth]{termgui.png}
\column{0.25\textwidth}
%\begin{itemize}
% \item Environment variables
% \item Terminal vs. GUI
%\end{itemize}
\end{columns}
\end{frame}
\subsection{Software execution}
\label{sec:fs:exec}
\begin{frame}[fragile]{\insertsectionhead}
......@@ -136,9 +171,9 @@ C:\\Program\ Files\\MATLAB\\matlab.exe compute_wing.m
\vfill
\begin{lstlisting}[language=bash,frame=single]
$C:\textbackslash Users\textbackslash Thomas> call Desktop\textbackslash matlab.lnk
$C:\textbackslash Users\textbackslash Thomas> cd Documents\textbackslash Work \textbackslash ADP
$C:\textbackslash Users\textbackslash Thomas\textbackslash Documents\textbackslash Work \textbackslash ADP> my_aircraft.m
$C:\Users\Thomas> call Desktop\matlab.lnk
$C:\Users\Thomas> cd Documents\Work\ADP
$C:\Users\Thomas\Documents\Work\ADP> my_aircraft.m
\end{lstlisting}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment