Skip to content

Commit

Permalink
updating repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-M committed Apr 22, 2016
1 parent ea3b7eb commit 587d982
Show file tree
Hide file tree
Showing 34 changed files with 1,270 additions and 116 deletions.
2 changes: 1 addition & 1 deletion DM_Styles.sty
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%\usepackage{showkeys}

% the default font set to sans serif (easy readable)
\renewcommand*{\familydefault}{\sfdefault}
%\renewcommand*{\familydefault}{\sfdefault}

%% == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
% To create the list of symbols used
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ CLEANEQS = grep -lr --include=*.tex '<++>' ./ | xargs sed -i 's/<++>//g'
## DEFINING TARGETS OPERATIONS
##############################

#all: $(PROJECT).pdf
all: bibliography

$(PROJECT).pdf: $(TARGETS)
Expand Down
94 changes: 90 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
% LatexProjectMakefile
% **Daniel Mejía R.**
% April, 2016
*Summary.* This document contains the specification of `LatexProjectMakefile` with some considerations about use and
# LatexProjectMakefile
##### **Daniel Mejía R.**
##### April, 2016

*Summary.*
This document contains the specification of `LatexProjectMakefile` with some considerations about use and
latex source tree organization. The styles sheet `DM_Styles.sty` has several dependencies described in the
dependencies the section [Latex package dependencies](#sec:dependencies)

Expand All @@ -13,14 +15,98 @@ Table of contents: Run pandoc with --toc option -->


## How to use this `Makefile`
<div id="sec:makefile-how-to"></div>

Look at the samples in `book_template` and `article_template` they are pretty self explanatory.

### Latex project source tree
<div id="subsec:latex-source-tree"></div>

This `Makefile` is designed to work with big projects, and big projects should be split
in several `.tex` sources which are included into its main document by means of the
`\input{}` or `\include{}` latex commands.
The recommended source tree for a latex project using this `Makefile` is,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
document-source/
├── appendices/ # Appendices tex sources
│   ├── apendix-1.tex
│   ├── ...
│   └── apendix-2.tex
├── chapters/
│   ├── chapter-appendices.tex # Here we include the sources on appendices/
│   ├── chapter-1.tex
│   ├── chapter-2.tex
│   ├── ...
│   ├── complex_chapter.tex # Some chapters can be extense
│   ├── complex_chapter_sections/ # here we include the sections of the chapter
│   │   ├── chapter_section-1.tex
│   │   ├── chapter_section-2.tex
│   │   ├── ...
│   │   └── chapter_section-N.tex
│   ├── ...
│   └── chapter-N.tex
├── figures/ # Here we put the figures to keep the root clean
│   ├── figure-1.png
│   ├── figure-2.jpg
│   ├── figure-3.eps
│   ├── ...
│   └── figure-N.png
├── references/ # Here we put the references
│   └── references.bib
├── tables/ # Here we put the tables to be included in the chapters
│   ├── table-1.tex
│   ├── table-2.tex
│   ├── ...
│   └── table-N.tex
├── Makefile # the makefile
├── DM_Stiles.sty # the style sheet
└── main-document.tex # the main document includes chapters by \input or \include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

### `Makefile` special variables
<div id="subsec:makefile-variables"></div>
Edit the following variables on the makefile according to your needs,

#### Project name and sources

* `PROJECT`: file name of the main `.tex` source file of the project.
* `APPENDICESDIR`: directory for the sources for the appendices (if they exist).
* `CHAPTERSDIR`: directory for the sources of the chapters.
* `TABLESDIR`: directory for the sources of the tables.
* `FIGURESDIR`: directory for the images included in the figures.
* `REFERENCESDIR`: directory for the `.bib` files.
* `TEXDIRS`: variable that joins all the sources detailed above.

#### Commands to build the document

* `TEX`: command to call to compile the latex document. Default `pdflatex`
* `BIBTEX`: command to compile the bibliography. Default `bibtex`
* `MAKEIDX`: command to make the index. Default `makeindex`
* `BUILDSYMBOLS`: command to build the list of simbols calling `MAKEIDX` command.

### `Makefile` targets
<div id="subsec:makefile-targets"></div>

* `all`: builds the document calling the compiler in `$(TEX)` and building references.
* `$(PROJECT).pdf`: builds the pdf calling the compiler in `$(TEX)` without building references.
* `bibliography`: builds the document and the references. This is equivalent to the target `all`.
* `clean`: deletes auxiliary files created by `latex` build process leaving the working tree decluttered.
* `clean-all`: Deletes all but the sources and figures.
* `clean-eqs`: Useful to clean unwanted characters created by the plugin `vim-latexsuite` for the `vim` editor.

Calling `make` usually should be enough to build the document.

## Latex package dependencies
<div id="sec:dependencies"></div>

The list of packages (or latex modules if you want to call them that way) that will be invoked by the style sheet `DM_Styles.sty`
are the following,

* `bibtex`.
* `nomencl`.
* `babel`.
* `inputenc`.
Expand Down
122 changes: 14 additions & 108 deletions ThesisFmt/DM_Thesis.sty → article_template/DM_Styles.sty
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% %%%
%%% DM Thesis version 3.2 - August 2015 %%%
%%% %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{DM_Thesis}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% %%%
%%% DM Thesis version 3.2 - 2016 %%%
%%% %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{DM_Styles}

%% == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
% You will see the label just next or above the relevant number in the compiled version.
% Just before the final version, remove it
%\usepackage{showkeys}

% the default font set to sans serif (easy readable)
\renewcommand*{\familydefault}{\sfdefault}
%\renewcommand*{\familydefault}{\sfdefault}

%% == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
% To create the list of symbols used
\usepackage{nomencl}
\renewcommand{\nomname}{List of symbols and abreviations}

% Definition environment
\newtheorem{definition}{Definition}

% Remark environment
\newenvironment{remark}{\noindent\textbf{Remark}\newline\noindent}{\newline}
\newenvironment{remarks}{\noindent\textbf{Remarks}\begin{itemize}}{\end{itemize}}
Expand Down Expand Up @@ -309,8 +316,6 @@
\setbondstyle{line width = \bondwidth}




%% == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
%%% math related packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -345,9 +350,6 @@
\usepackage{upgreek}





%%% other general packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand All @@ -356,11 +358,6 @@
\usepackage{natbib}


%% == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
% To create the list of symbols used
\usepackage{nomencl}
\renewcommand{\nomname}{List of symbols and abreviations}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% custom commands %%%
Expand Down Expand Up @@ -394,51 +391,9 @@


\newcommand{\tableHead}{\hline}
%\newcommand{\tableTopLine}{\hline \hline}
\newcommand{\tableTopLine}{\hline}
\newcommand{\tableBottomLine}{\hline \hline}

\newcommand{\ca}{$\displaystyle{\text{Ca}^{2+}}$ }
\newcommand{\mg}{$\displaystyle{\text{Mg}^{2+}}$ }
\newcommand{\cac}{$\displaystyle{\left[\text{Ca}^{2+}\right]}$ }
\newcommand{\mgc}{$\displaystyle{\left[\text{Mg}^{2+}\right]}$ }

\newcommand{\cair}{$\displaystyle{\left[\text{Ca}^{2+}\right]_{\text{iR}}}$ }
\newcommand{\caire}{\left[\text{Ca}^{2+}\right]_{\text{iR}} }

\newcommand{\magfluo}{Mag-Fluo-4 }
\newcommand{\magfluoec}{\left[ \text{Mag-Fluo-4} \right] }

\newcommand{\kon}{$k_{\text{on}}$ }
\newcommand{\koff}{$k_{\text{off}}$ }
\newcommand{\kone}{k_{\text{on}} }
\newcommand{\koffe}{k_{\text{off}} }

\newcommand{\keon}{$k_{1}$ }
\newcommand{\keoff}{$k_{-1}$ }
\newcommand{\kepp}{$k_{2}$ }

\newcommand{\keone}{k_{1}}
\newcommand{\keoffe}{k_{-1}}
\newcommand{\keppe}{k_{2}}

\newcommand{\kdd}{$K_{D}$ }
\newcommand{\kdde}{K_{D} }

\newcommand{\cae}{\text{Ca}^{2+}}
\newcommand{\mge}{\text{Mg}^{2+}}

\newcommand{\caec}{\left[\text{Ca}^{2+}\right]}
\newcommand{\mgec}{\left[\text{Mg}^{2+}\right]}

\newcommand{\FMm}{F_{\text{Max}}}
\newcommand{\Fmm}{F_{\text{min}}}
\newcommand{\Frr}{F_{\text{rest}}}

\newcommand{\FMmec}{$F_{\text{Max}}\,$}
\newcommand{\Fmmec}{$F_{\text{min}}\,$}
\newcommand{\Frrec}{$F_{\text{rest}}\,$}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -492,53 +447,4 @@
% position vector
\newcommand{\rr}{\vec{r}}
\newcommand{\rrtt}{\left( \vec{r},t \right)}
%\newcommand{\rre}{$\vec{r}\,$}
%\newcommand{\rrtte}{$\left( \vec{r},t \right)\,$}

%%
%% Comands for FD schemes
%%

\newcommand{\Omegad}{\widetilde{\Omega}}
\newcommand{\Omegat}{\overline{\Omega}_{t}}

\newcommand{\ddt}{\delta t}
\newcommand{\ddxx}{\delta x}
\newcommand{\ddx}[1]{\delta x_{#1}}

\newcommand{\xx}{\left( x_{1},x_{2},\ldots,x_{N},t \right)}
\newcommand{\ffbf}{f\rrtt}

\newcommand{\fij}{f_{i,j}}
\newcommand{\fijl}{f_{i,j,l}}

\newcommand{\fiii}{f_{i+1,j}}
\newcommand{\fjjj}{f_{i,j+1}}
\newcommand{\fii}{f_{i-1,j}}
\newcommand{\fjj}{f_{i,j-1}}

\newcommand{\ffiii}{f_{i+1,j,l}}
\newcommand{\ffjjj}{f_{i,j+1,l}}
\newcommand{\fflll}{f_{i,j,l+1}}
\newcommand{\ffii}{f_{i-1,j,l}}
\newcommand{\ffjj}{f_{i,j-1,l}}
\newcommand{\ffll}{f_{i,j,l-1}}

%\newcommand{\ddte}{$\delta t \,$}
%\newcommand{\ddxxe}{$\delta x \,$}
%\newcommand{\ddxe}[1]{$\delta x_{#1}\,$}
%
%\newcommand{\xxe}{$\left( x_{1},x_{2},\ldots,x_{N},t \right)\,$}
%\newcommand{\ffbfe}{$f\rrtt\,$}
%
%\newcommand{\fiiie}{$f_{i+1,j}\,$}
%\newcommand{\fjjje}{$f_{i,j+1}\,$}
%\newcommand{\fiie}{$f_{i-1,j}\,$}
%\newcommand{\fjje}{$f_{i,j-1}\,$}
%
%\newcommand{\ffiiie}{$f_{i+1,j,l}\,$}
%\newcommand{\ffjjje}{$f_{i,j+1,l}\,$}
%\newcommand{\ffllle}{$f_{i,j,l+1}\,$}
%\newcommand{\ffiie}{$f_{i-1,j,l}\,$}
%\newcommand{\ffjje}{$f_{i,j-1,l}\,$}
%\newcommand{\fflle}{$f_{i,j,l-1}\,$}
4 changes: 2 additions & 2 deletions ThesisFmt/Makefile → article_template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
################################

# Name of the main tex file without extension
PROJECT = undergrad-thesis-daniel
PROJECT = sample_article

# Style file or list of files
STYFILE = DM_Thesis.sty
STYFILE = DM_Styles.sty

## Directories to search for sources

Expand Down
14 changes: 14 additions & 0 deletions article_template/appendices/appendix-1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
\subsection{\label{ch:appendix:apx1} Appendix.}

\subsection{lorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus interdum tortor libero, in ornare magna imperdiet et. Praesent in vehicula lectus, quis egestas odio. Phasellus pulvinar feugiat elementum. Morbi ac fermentum dui, a suscipit justo. Donec in purus mauris. Vestibulum et tortor est. In pulvinar faucibus tortor, et bibendum odio tincidunt non. Phasellus quis lorem in ex convallis semper.

Nam hendrerit dictum ipsum, a hendrerit enim sollicitudin ac. Pellentesque nulla est, dignissim eget imperdiet vel, rhoncus at ex. Nulla convallis sodales sapien, ut ornare turpis luctus eget. Duis accumsan malesuada turpis, eget eleifend diam. Integer diam libero, molestie scelerisque vehicula in, blandit ut ipsum. Donec libero massa, varius vel tincidunt sit amet, lacinia sit amet neque. Mauris sollicitudin a libero vel fermentum.

Maecenas eu est iaculis turpis finibus mollis. Praesent fringilla semper justo, ut semper enim tincidunt id. Sed molestie mi a sem tincidunt, eu malesuada dolor commodo. Vestibulum ac ex id leo posuere dictum sit amet nec enim. Proin pretium eros in justo porta, sed tempor ex lacinia. Morbi pretium placerat mi, ac facilisis enim suscipit eget. Pellentesque bibendum congue nisl. In suscipit libero sit amet libero pharetra commodo. Duis lacinia ullamcorper ligula, vitae euismod libero gravida nec. Nunc non lectus commodo mi fringilla laoreet in sit amet nulla. Nunc varius felis eros. Maecenas commodo posuere dui at maximus. Sed nec maximus lectus. Mauris id eleifend tortor, ut semper ligula.

\subsection{Cras}
Cras sit amet luctus tellus. Sed eu lacus aliquam, aliquet ipsum in, vestibulum nisl. Aliquam sed vulputate dui. Quisque ullamcorper lorem erat, ut pulvinar nisl ultrices quis. Donec quis sapien faucibus, tempus mi in, rhoncus tellus. Pellentesque id blandit magna. Nam a justo ac erat ultrices vehicula. Quisque sagittis arcu non ante suscipit, a fringilla nulla ullamcorper. Cras vitae eros magna. Phasellus quis dolor ligula.

\subsection{Pallentesque}
Pellentesque urna tortor, volutpat vel elementum in, ullamcorper tristique massa. Etiam et consectetur mi, vel facilisis arcu. Aenean sit amet tincidunt massa. Maecenas cursus molestie ipsum, in bibendum nisl porttitor sit amet. Praesent euismod ipsum et congue convallis. Vivamus eget libero hendrerit, placerat neque eget, condimentum libero. In fringilla vehicula iaculis. Nullam nec lobortis sem, a posuere nisl. Vivamus vulputate vitae turpis in sodales. Integer aliquet augue et libero mattis hendrerit. Sed fringilla sit amet lectus in ornare. Quisque in hendrerit dolor. Donec malesuada lectus orci, in ultricies velit imperdiet non. Ut suscipit nisi nec ex volutpat, vitae consectetur eros ultrices. Praesent aliquam ac libero id gravida. Vestibulum malesuada, tortor eget fringilla ultrices, eros orci tristique metus, a gravida risus lacus a nisl.
3 changes: 3 additions & 0 deletions article_template/chapters/ch-appendices.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\section{\label{ch:appendices}Appendices.}

\input{appendices/appendix-1}
21 changes: 21 additions & 0 deletions article_template/chapters/chapter-1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
\section{\label{conclusions}Simple chapter.}

\subsection{lorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus interdum tortor libero, in ornare magna imperdiet et. Praesent in vehicula lectus, quis egestas odio. Phasellus pulvinar feugiat elementum. Morbi ac fermentum dui, a suscipit justo. Donec in purus mauris. Vestibulum et tortor est. In pulvinar faucibus tortor, et bibendum odio tincidunt non. Phasellus quis lorem in ex convallis semper.

Nam hendrerit dictum ipsum, a hendrerit enim sollicitudin ac. Pellentesque nulla est, dignissim eget imperdiet vel, rhoncus at ex. Nulla convallis sodales sapien, ut ornare turpis luctus eget. Duis accumsan malesuada turpis, eget eleifend diam. Integer diam libero, molestie scelerisque vehicula in, blandit ut ipsum. Donec libero massa, varius vel tincidunt sit amet, lacinia sit amet neque. Mauris sollicitudin a libero vel fermentum \cite{Bizzarri2013}.

Maecenas eu est iaculis turpis finibus mollis. Praesent fringilla semper justo, ut semper enim tincidunt id. Sed molestie mi a sem tincidunt, eu malesuada dolor commodo. Vestibulum ac ex id leo posuere dictum sit amet nec enim. Proin pretium eros in justo porta, sed tempor ex lacinia. Morbi pretium placerat mi, ac facilisis enim suscipit eget. Pellentesque bibendum congue nisl. In suscipit libero sit amet libero pharetra commodo. Duis lacinia ullamcorper ligula, vitae euismod libero gravida nec. Nunc non lectus commodo mi fringilla laoreet in sit amet nulla. Nunc varius felis eros. Maecenas commodo posuere dui at maximus. Sed nec maximus lectus. Mauris id eleifend tortor, ut semper ligula.

\begin{figure}[ht]
\centering
\includegraphics{figures/figure-1}
\caption{Serious plot of $\sin\left( x^{2} \right)/x^{2}$}
\label{fig:fig1}
\end{figure}

\subsection{Cras}
Cras sit amet luctus tellus. Sed eu lacus aliquam, aliquet ipsum in, vestibulum nisl. Aliquam sed vulputate dui. Quisque ullamcorper lorem erat, ut pulvinar nisl ultrices quis. Donec quis sapien faucibus, tempus mi in, rhoncus tellus. Pellentesque id blandit magna. Nam a justo ac erat ultrices vehicula. Quisque sagittis arcu non ante suscipit, a fringilla nulla ullamcorper. Cras vitae eros magna. Phasellus quis dolor ligula \cite{Bizzarri2013}.

\subsection{Pallentesque}
Pellentesque urna tortor, volutpat vel elementum in, ullamcorper tristique massa. Etiam et consectetur mi, vel facilisis arcu. Aenean sit amet tincidunt massa. Maecenas cursus molestie ipsum, in bibendum nisl porttitor sit amet. Praesent euismod ipsum et congue convallis. Vivamus eget libero hendrerit, placerat neque eget, condimentum libero. In fringilla vehicula iaculis. Nullam nec lobortis sem, a posuere nisl. Vivamus vulputate vitae turpis in sodales. Integer aliquet augue et libero mattis hendrerit. Sed fringilla sit amet lectus in ornare. Quisque in hendrerit dolor. Donec malesuada lectus orci, in ultricies velit imperdiet non. Ut suscipit nisi nec ex volutpat, vitae consectetur eros ultrices. Praesent aliquam ac libero id gravida. Vestibulum malesuada, tortor eget fringilla ultrices, eros orci tristique metus, a gravida risus lacus a nisl.
5 changes: 5 additions & 0 deletions article_template/chapters/complex_chapter.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\section{\label{ch:complex_chapter}Complex Chapter.}

\input{chapters/complex_chapter/section-1}
\input{chapters/complex_chapter/section-2}

Loading

0 comments on commit 587d982

Please sign in to comment.