Skip to content

Commit

Permalink
Updating README.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeSigaud committed Jan 22, 2013
1 parent 983b5db commit 4c4da6b
Showing 1 changed file with 35 additions and 16 deletions.
51 changes: 35 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,43 @@
D Template Tutorial
===================
# D Template Tutorial

What's it's about
-----------------

This project is about a wonderful part of the [D programming language](www.dlang.org "D Website"): templates. It contains a (not-so) small LaTeX document on templates aiming to be a kind of tutorial.
## What's it's about

This project is about a wonderful part of the [D programming language](www.dlang.org "D Website"): templates.
It contains a markdown document on templates aiming to be a kind of tutorial.

It's divided in 6 chapters:

* `Introduction` is just, well, the introduction text, explaining the goal of this document and the formatting conventions used.
* `Basics` is about templates syntax, basic building blocks (`static if`, eponymous trick) and function, struct and class templates.
* `Some More Advanced Considerations` is about more advanced ideas, like constraints, tuples or operator overloading.
* `Around Templates` deals with other metaprogramming constructs interacting with templates: traits, compile-time function evaluation (CTFE) and string mixins.
* `Examples` presents some more detailed examples of what can be done with D templates.
* The `Appendix` gives some explanation on the `is` expression and links on other templates resources.


If you find any inexactitude, plain error or missing subject, don't hesitate to open an issue on github!

The master document is `dtemplates.tex` and calls the other subfiles:

* `dtemplates_intro.tex` is just, well, the introduction text, explaining the goal of this document and the formatting conventions used.
* `dtemplates_basics.tex` is about templates syntax, basic building blocks (`static if`, eponymous trick) and function, struct and class templates.
* `dtemplates_advanced.tex` is about more advanced ideas, like constraints, tuples or operator overloading
* `dtemplates_around.tex` deals with other metaprogramming constructs interacting with templates: traits, compile-time function evaluation (CTFE) and string mixins.
* `dtemplates_examples.tex` presents some more detailed examples of what can be bone with D templates.
* `dtemplates_appendix.tex` gives some explanation on the `is` expression and links on other templates resources.
## Other formats

The markdown syntax used for the doc is the extended version used by Pandoc (mainly for tables or code sections).
Using markdown files and [Pandoc](http://johnmacfarlane.net/pandoc/), I generate the HTML, pdf and epub versions. Feel free to comment on them also.


## LaTeX notes

This tutorial doc used to be made of LaTeX files. You can still find them in the `latex` folder, but I'll phase them out (I just keep

The master document is `dtemplates.tex` and calls the other subfiles:

I'll push the resulting pdf file on this repo, but it'd be best to generate it anew on your computer.
* `dtemplates_intro.tex`
* `dtemplates_basics.tex`
* `dtemplates_advanced.tex`
* `dtemplates_around.tex`
* `dtemplates_examples.tex`
* `dtemplates_appendix.tex`

LaTeX notes
-----------

The document uses the [minted](http://code.google.com/p/minted/) package. `minted` uses Python's [Pygment](pygments.org) highlighter.
The LaTeX files use the [minted](http://code.google.com/p/minted/) package. `minted` uses Python's [Pygment](pygments.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`.

0 comments on commit 4c4da6b

Please sign in to comment.