summaryrefslogtreecommitdiff
path: root/04-identifiers-names-and-scopes.md
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-03-26 20:35:25 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-03-26 20:42:50 -0700
commitabd0895322985dd4a590f3dd96a488f4e4ff87bf (patch)
tree458be2ba2e8e9c017ff51b7e50a402b688179b4a /04-identifiers-names-and-scopes.md
parent5997e32397db4efac1cbb3b74bd29289d203a775 (diff)
downloadscala-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 '04-identifiers-names-and-scopes.md')
-rw-r--r--04-identifiers-names-and-scopes.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/04-identifiers-names-and-scopes.md b/04-identifiers-names-and-scopes.md
index a9985d1340..96b4f283e9 100644
--- a/04-identifiers-names-and-scopes.md
+++ b/04-identifiers-names-and-scopes.md
@@ -1,6 +1,7 @@
---
title: Identifiers, Names and Scopes
layout: default
+chapter: 2
---
# Identifiers, Names and Scopes
@@ -70,7 +71,7 @@ namespace as the identifier. It is an error if $T$ is not a [value type](05-type
The type of $e.x$ is the member type of the referenced entity in $T$.
-###### Example: bindings
+### Example:
Assume the following two definitions of a objects named `X` in packages `P` and `Q`.