diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-26 20:35:25 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-26 20:42:50 -0700 |
commit | abd0895322985dd4a590f3dd96a488f4e4ff87bf (patch) | |
tree | 458be2ba2e8e9c017ff51b7e50a402b688179b4a /08-expressions.md | |
parent | 5997e32397db4efac1cbb3b74bd29289d203a775 (diff) | |
download | scala-abd0895322985dd4a590f3dd96a488f4e4ff87bf.tar.gz scala-abd0895322985dd4a590f3dd96a488f4e4ff87bf.tar.bz2 scala-abd0895322985dd4a590f3dd96a488f4e4ff87bf.zip |
Fix #6: automatic section numbering.
Add chapter number to YAML, which is replace in numbering.css.
Use CSS counters for chapters, sections, subsections | examples.
Examples are detected by looking at the H3 element's id,
which redcarpet derives from the heading's title.
It must start with "Example:", and the whole title is suppressed
by a little javascript, so we can make Examples look like in the pdf.
For example, `### Example:` becomes `Example 3.2.10`,
if it's the 10th example in Section 3.2.
Diffstat (limited to '08-expressions.md')
-rw-r--r-- | 08-expressions.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/08-expressions.md b/08-expressions.md index 4f3d6a4636..1c72e4734e 100644 --- a/08-expressions.md +++ b/08-expressions.md @@ -1,6 +1,7 @@ --- title: Expressions layout: default +chapter: 6 --- # Expressions @@ -209,7 +210,7 @@ to the type or method of $x$ in the parent trait of $C$ whose simple name is $T$. That member must be uniquely defined. If it is a method, it must be concrete. -###### Example: `super` +### Example: Consider the following class definitions ``` @@ -824,7 +825,7 @@ Here are some assignment expressions and their equivalent expansions. `x.f(i, j) = e` x.f.update(i, j, e) -------------------------- --------------------- -###### Example: imperative matrix multiplication +### Example: Here is the usual imperative code for matrix multiplication. |