From 2163290664136a358648cf968572344d6406580e Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 13 Mar 2015 12:10:32 +0000 Subject: commit before merge --- latexmkrc | 4 +- tex/report_default.tex | 121 ++++++++++++++++++++++++++++++++++++++++++++ vim/mySnippets/tex.snippets | 8 +++ vim/vimrc | 9 ---- zshrc | 1 + 5 files changed, 132 insertions(+), 11 deletions(-) create mode 100644 tex/report_default.tex diff --git a/latexmkrc b/latexmkrc index 6b4722e..b466d7b 100644 --- a/latexmkrc +++ b/latexmkrc @@ -1,2 +1,2 @@ -/* $pdf_mode = 1; */ -/* $pdf_previewer = 'zathura -s -x "vim --servername SYNCTEX --remote +%{line} %{input}" %O %S'; */ +$pdf_mode = 1; +$pdf_previewer = 'zathura -s -x "vim --servername SYNCTEX --remote +%{line} %{input}" %O %S'; diff --git a/tex/report_default.tex b/tex/report_default.tex new file mode 100644 index 0000000..e9eb94f --- /dev/null +++ b/tex/report_default.tex @@ -0,0 +1,121 @@ +\documentclass[10pt,twoside]{report} + +% Files to include +\includeonly{ + preamble/title, + preamble/authorship, + preamble/abstract, + preamble/acknowledgements, + chapters/introduction, + chapters/chap1, + chapters/chap2, + chapters/chap3, + chapters/conclusion, +} + +% Boolean variables +\newif \ifcontents \contentsfalse +\newif \ifbib \bibtrue +\newif \iflong \longtrue + +% Packages +\usepackage[utf8]{inputenx} +\usepackage[english]{babel} +\usepackage{microtype} +\usepackage{fancyhdr} +\usepackage{listings} +\usepackage{appendix} +\usepackage{vmargin} +\usepackage{setspace} +\usepackage{mathenv} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{amssymb} +\usepackage{amscd} +\usepackage{amsthm} +\usepackage{hyperref} +\usepackage{cleveref} +\usepackage{graphicx} +\usepackage{epstopdf} +\usepackage{subfigure} +\usepackage{color} + +% Packages with options +\usepackage[labelfont=sc]{caption} +\usepackage[square, numbers, comma, sort&compress]{natbib} + +% Layout options +\setlength{\parskip}{6pt} + +% Compilation options +\synctex=1 + +% Setting for the table of contents +\setcounter{secnumdepth}{3} +\setcounter{tocdepth}{3} + +% Macros +\definecolor{darkred}{rgb}{.7,0,0} +\newcommand{\real}[0]{\mathbf R} +\newcommand{\nat}[0]{\mathbf N} +\newcommand{\op}[0]{\mathcal} +\newcommand{\grad}[0]{\,\nabla\,} +\newcommand{\dive}[0] {\,\nabla\,\cdot\,} +\newcommand{\ip}[2]{\left \langle #1,#2 \right\rangle} +\newcommand{\norm}[1]{\,\| #1 \|\,} +\newcommand{\pard}[2]{\partial_{#2} #1} +\newcommand{\pardl}[2]{\frac{\partial #1}{\partial #2}} +\newcommand{\pardd}[2]{\partial_{#2}^2 #1} +\newcommand{\parddl}[2]{\frac{\partial^2 #1}{\partial #2^2}} +\newcommand{\dx}[0]{\mathrm d} +\newcommand{\hermite}[0]{\mathcal} +\newcommand{\gaussian}[1]{g_{#1}} +\newcommand{\stdgaussian}[0]{g} +\newcommand{\test}[1]{C^\infty_c(#1)} +\newcommand{\flp}[2]{L^{#1}(#2)} +\newcommand{\wlp}[3]{L^{#1}(#2, #3)} +\newcommand{\sobolev}[2]{H^{#1}(#2)} +\newcommand{\wsobolev}[3]{H^{#1}(#2, #3)} +\newcommand{\red}[1]{\textcolor{darkred}{#1}} +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} + +% Theorems +\theoremstyle{plain} +\newtheorem{assumption}{Assumption}[section] +\newtheorem{example}{Example}[section] +\newtheorem{theorem}{Theorem}[section] +\newtheorem{corollary}[theorem]{Corollary} +\newtheorem{lemma}[theorem]{Lemma} +\newtheorem{proposition}[theorem]{Proposition} +\newtheorem{axiom}[theorem]{Axiom} +\theoremstyle{definition} +\newtheorem{definition}[theorem]{Definition} +\theoremstyle{remark} +\newtheorem{remark}[theorem]{Remark} + +\begin{document} + +\pagestyle{empty} + +\setstretch{1.3} +\include{preamble/title} \cleardoublepage +\include{preamble/authorship} \cleardoublepage +\include{preamble/abstract} \cleardoublepage +\include{preamble/acknowledgements} \cleardoublepage +\ifcontents \tableofcontents \fi + +\pagestyle{plain} + + +\include{chapters/introduction} \cleardoublepage +\include{chapters/chap1} \cleardoublepage +\include{chapters/chap2} \cleardoublepage +\include{chapters/chap3} \cleardoublepage +\include{chapters/conclusion} \cleardoublepage + +\nocite* +\bibliographystyle{unsrtnat} +\bibliography{Bibliography} + +\end{document} + diff --git a/vim/mySnippets/tex.snippets b/vim/mySnippets/tex.snippets index ef275a0..a1064ea 100644 --- a/vim/mySnippets/tex.snippets +++ b/vim/mySnippets/tex.snippets @@ -17,3 +17,11 @@ endsnippet snippet sobw "Weighted Sobolev space" i \wsobolev{${1:s}}{${2:\real^n}}{${3:\rho}} $0 endsnippet + +snippet new "New command" b +\newcommand{$1}[$2]{$3} +endsnippet + +snippet smooth "Smooth function" i +\smooth{${1:\real^n}} $0 +endsnippet diff --git a/vim/vimrc b/vim/vimrc index 99d8eb9..08bf19e 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -221,15 +221,6 @@ vnoremap g^ ^ "" Latex nmap LatexChangeEnv let g:tex_fast="" - -" Synctex -function! LatexEvinceSearch() - execute "!cd " . LatexBox_GetTexRoot() . '; evince_vim_dbus.py EVINCE "`basename ' . LatexBox_GetOutputFile(). '`" ' . line('.') . ' "%:p"' -endfun - -command! LatexEvinceSearch call LatexEvinceSearch() - -autocmd FileType tex map :silent LatexEvinceSearch autocmd Filetype tex call SetTexOptions() diff --git a/zshrc b/zshrc index 804a398..38b3185 100644 --- a/zshrc +++ b/zshrc @@ -43,6 +43,7 @@ alias up='cd ~/Dropbox/phd/presentations' alias ul='cd ~/Dropbox/phd/literature' alias ur='cd ~/Dropbox/phd/reports' alias papers='cd ~/Dropbox/phd/papers' +alias books='cd ~/Dropbox/phd/books' alias cdd='cd ~/dotfiles' # Commands -- cgit v1.2.3 From c21dde32c14395ae0c4d06faddd943432723511b Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 26 Mar 2015 10:05:17 +0000 Subject: Updating dotfiles --- .gitignore | 2 +- header.tex | 27 +++++++++++++++++++++++++++ mutt/mailboxes | 2 +- vim/mySnippets/tex.snippets | 24 ++++++++++++++---------- vim/vimrc | 1 + 5 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 header.tex diff --git a/.gitignore b/.gitignore index 78dfac6..a923e12 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ mutt/mutt-colors-solarized/ mutt/temp/ passwords mutt/cache/ -mutt/cache/headers/ +mutt/cache/headers diff --git a/header.tex b/header.tex new file mode 100644 index 0000000..0c654ab --- /dev/null +++ b/header.tex @@ -0,0 +1,27 @@ +% Macros +\definecolor{darkred}{rgb}{.7,0,0} +\newcommand{\real}[0]{\mathbf R} +\newcommand{\nat}[0]{\mathbf N} +\newcommand{\op}[0]{\mathcal} +\newcommand{\grad}[0]{\nabla} +\newcommand{\dive}[0] {\,\nabla\,\cdot\,} +\newcommand{\ip}[2]{\left \langle #1,#2 \right\rangle} +\newcommand{\norm}[1]{\left\| #1 \right\|} +\newcommand{\pard}[2]{\partial_{#2} #1} +\newcommand{\pardl}[2]{\frac{\partial #1}{\partial #2}} +\newcommand{\pardd}[2]{\partial_{#2}^2 #1} +\newcommand{\parddl}[2]{\frac{\partial^2 #1}{\partial #2^2}} +\newcommand{\dd}[0]{\,\mathrm d} +\newcommand{\hermite}[0]{\mathcal} +\newcommand{\gaussian}[1]{g_{#1}} +\newcommand{\stdgaussian}[0]{g} +\newcommand{\test}[1]{C^\infty_c(#1)} +\newcommand{\flp}[2]{L^{#1}(#2)} +\newcommand{\wlp}[3]{L^{#1}(#2,#3)} +\newcommand{\sobolev}[2]{H^{#1}(#2)} +\newcommand{\wsobolev}[3]{H^{#1}(#2, #3)} +\newcommand{\red}[1]{\textcolor{darkred}{#1}} +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} +\newcommand{\smooth}[1]{C^\infty(#1)} +\newcommand{\cont}[2]{C^{#1}(#2)} +\newcommand{\Space}[0]{\mathscr} diff --git a/mutt/mailboxes b/mutt/mailboxes index 9e64508..d259b41 100644 --- a/mutt/mailboxes +++ b/mutt/mailboxes @@ -1 +1 @@ -mailboxes "+Hotmail/Hotmail" "+Main/Drafts" "+Main/Main" "+Main/Sent" "+Gmail/Gmail" "+Imperial/Imperial" +mailboxes "+Gmail/Gmail" "+Hotmail/Hotmail" "+Imperial/Imperial" "+Main/Drafts" "+Main/Main" "+Main/Sent" diff --git a/vim/mySnippets/tex.snippets b/vim/mySnippets/tex.snippets index 9c2153e..ff3fc0a 100644 --- a/vim/mySnippets/tex.snippets +++ b/vim/mySnippets/tex.snippets @@ -11,7 +11,7 @@ snippet div "Divergence" i endsnippet snippet new "New command" b -\newcommand{$1}[$2] {$3} $0 +\newcommand{$1}[$2]{$3} $0 endsnippet snippet op "Operator style" i @@ -19,11 +19,11 @@ snippet op "Operator style" i endsnippet snippet pard "Partial derivative" i -\pard{$1}{$2} $0 +\pardl{$1}{$2} $0 endsnippet snippet pardd "Double partial derivative" i -\pardd{$1}{$2} $0 +\parddl{$1}{$2} $0 endsnippet snippet herm "Hermite polynomials" i @@ -38,12 +38,16 @@ snippet sumi "Sum over index set" i \sum_{${1:i} \in ${2:I}} $0 endsnippet +snippet int "Integral" i +\int_{$1} +endsnippet + snippet ip "Inner product" i -\ip{$1}{$2} $0 +\ip{$1}{$2}$0 endsnippet snippet norm "Norm" i -\norm{$1} $0 +\norm{$1}$0 endsnippet snippet test "Test functions" i @@ -55,7 +59,7 @@ snippet lp "Flat Lp space" i endsnippet snippet lpw "Weighted Lp space" i -\wlp{${1:2}}{${2:\real^n}}{${3: \rho}} $0 +\wlp{${1:2}}{${2:\real^n}}{${3:\rho}}$0 endsnippet snippet sob "Flat Sobolev space" i @@ -66,10 +70,10 @@ snippet sobw "Weighted Sobolev space" i \wsobolev{${1:s}}{${2:\real^n}}{${3:\rho}} $0 endsnippet -snippet new "New command" b -\newcommand{$1}[$2]{$3} -endsnippet - snippet smooth "Smooth function" i \smooth{${1:\real^n}} $0 endsnippet + +snippet cont "Continuous function" i +\cont{$1}{$2} $0 +endsnippet diff --git a/vim/vimrc b/vim/vimrc index 33c095a..bef1eb2 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -66,6 +66,7 @@ nnoremap i :Latexmk nnoremap e :LatexErrors nnoremap o :LatexView nnoremap k :LatexmkStop:LatexmkClean +nnoremap h :split header.sty " Gundo nnoremap :GundoToggle -- cgit v1.2.3 From 02d2513655c0e94ac362791384d17372701e606e Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 26 Mar 2015 10:06:51 +0000 Subject: update of .gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a923e12..5754d55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ -# Plugins managed by Vundle +mutt/cache/headers vim/bundle/ vifm/Trash/ mutt/mutt-colors-solarized/ mutt/temp/ passwords mutt/cache/ -mutt/cache/headers -- cgit v1.2.3