diff --git a/Apple Documentation Template.pdf b/Apple Documentation Template.pdf index b1c4d97..7cd91fe 100644 Binary files a/Apple Documentation Template.pdf and b/Apple Documentation Template.pdf differ diff --git a/Apple Documentation Template.tex b/Apple Documentation Template.tex index 89cc33d..a151a20 100644 --- a/Apple Documentation Template.tex +++ b/Apple Documentation Template.tex @@ -23,6 +23,7 @@ \usepackage[framemethod=TikZ]{mdframed} \usepackage{hyperref} \usepackage{lipsum} +\usepackage{minted} % Define section, subsection and subsubsection font size and color @@ -84,9 +85,10 @@ % Lists a code inside of a blue border \definecolor{BaliHaiColor}{HTML}{7CA1B3} -\newenvironment{codelisting} -{\footnotesize\mdframed[middlelinewidth=0.5pt, middlelinecolor=BaliHaiColor, skipabove=15pt]\verbatim} -{\endverbatim\endmdframed\vspace{12pt}\normalsize} +\newminted[codelisting]{objective-c}{tabsize=4, fontsize=\footnotesize} +\usemintedstyle{xcode} +\BeforeBeginEnvironment{codelisting}{\footnotesize\mdframed[middlelinewidth=0.5pt, middlelinecolor=BaliHaiColor, skipabove=15pt]}% +\AfterEndEnvironment{codelisting}{\endmdframed\vspace{12pt}\normalsize} % Lists text inside yellow border @@ -167,7 +169,7 @@ if (error != NULL) *error = [NSError errorWithDomain:ExampleDomain code:1001 - userInfo:@{NSLocalizedDescriptionKey: @"User name must have..."}]; + userInfo:@{NSLocalizedDescriptionKey: @"User has to..."}]; return NO; } @@ -175,7 +177,7 @@ if (error != NULL) *error = [NSError errorWithDomain:ExampleDomain code:1002 - userInfo:@{NSLocalizedDescriptionKey: @"Password must have..."}]; + userInfo:@{NSLocalizedDescriptionKey: @"Password has to..."}]; return NO; // logging in code diff --git a/README.md b/README.md index c7e9ac0..18b7093 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,18 @@ Apple Documentation Style - LaTeX Template ==================================== +To enable syntax highlighting you need to install Pygments and use xelatex for compilation: + +1. sudo easy_install Pygments +2. xelatex -file-line-error -synctex=1 -shell-escape -interaction=nonstopmode "File.tex" + +To integrate the template with TeXShop: + +1. navigate to ~/Library/TeXShop/Engines +2. open XeLaTeX.engine file +3. add two additional parameters -shell-escape -interaction=nonstopmode + + Table Of Contents ![Table Of Contents](https://raw.github.com/wnagrodzki/AppleDocumentationStyleLatexTemplate/master/Screen%20Shots/TOC.png "Table Of Contents") @@ -17,4 +29,4 @@ Code listing - [x] Table of contents - [x] Section, subcectio, and subsubsection style - [x] Code listing -- [ ] Syntax highlighting +- [x] Syntax highlighting diff --git a/Screen Shots/Codelisting.png b/Screen Shots/Codelisting.png index ac30c41..3d87248 100644 Binary files a/Screen Shots/Codelisting.png and b/Screen Shots/Codelisting.png differ