Skip to content

Commit

Permalink
Bit the bullet and converted all verbatim commands into minted \begin…
Browse files Browse the repository at this point in the history
…{dcode} - \end{dcode} blocks to get a nicer syntax highlighting. Also updated README.md accordingly.
  • Loading branch information
PhilippeSigaud committed Dec 19, 2011
1 parent d2fa334 commit 80172f3
Show file tree
Hide file tree
Showing 7 changed files with 359 additions and 361 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ I'll push the resulting pdf file on this repo, but it'd be best to generate it a
LaTeX notes
-----------

Right now, the document uses basic `verbatim` commands to present code. So, right now, you can compile the .tex files using your standard LaTeX installation.

When I want a nice rendering, I just convert the `verbatim` commands into `\begin{dcode} - \end{dcode}` pairs, and then use the [minted](http://code.google.com/p/minted/) package. `minted' uses Python's [Pygment](pygment.org) highlighter.
The document uses the [minted](http://code.google.com/p/minted/) package. `minted' uses Python's [Pygment](pygment.org) highlighter.
D code blocks are between `\begin{dcode}` and `\end{dcode}` commands. Transform them into `verbatim` commands if you do not want to use `minted`.

TODO
----
Expand Down
Binary file modified dtemplates.pdf
Binary file not shown.
7 changes: 3 additions & 4 deletions dtemplates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{datetime}
\usepackage{verbatim}

\usepackage{makeidx} % for the index
\usepackage{framed} % for the \aparte command
\usepackage{minted} % for code highlighting

\makeindex

\yyyymmdddate
%\yyyymmdddate

%%%% Redefinitions for minted / verbatim %%%%%%%%%%%%%%
%%%% Redefinitions for minted / dcode %%%%%%%%%%%%%%

% line numbering style
\renewcommand{\theFancyVerbLine}{
\sffamily
\textcolor[rgb]{0.4,0.4,0.9}{\scriptsize \arabic{FancyVerbLine}}}

% syntax highlighting style
\usemintedstyle{emacs}
\usemintedstyle{borland}

% creates the 'dcode' environment

Expand Down
Loading

0 comments on commit 80172f3

Please sign in to comment.