aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-12-16 11:25:45 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-12-16 11:25:45 +0000
commitb22acbb043a23fe0c862a8b61c01baeac5522a37 (patch)
tree3897a85a0bf48d644178388a6540f3630f4ae0e3
parentd53c2d30cf89eca5c165d682f6cc1261f54674fd (diff)
Documentation: AutomaticReferenceCounting.rst: use CSS section numbering.
This enables us to use the same document structure as in other files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170283 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/AutomaticReferenceCounting.rst57
1 files changed, 52 insertions, 5 deletions
diff --git a/docs/AutomaticReferenceCounting.rst b/docs/AutomaticReferenceCounting.rst
index 7996d5c509..9babf8f321 100644
--- a/docs/AutomaticReferenceCounting.rst
+++ b/docs/AutomaticReferenceCounting.rst
@@ -1,7 +1,3 @@
-.. sectnum::
-.. contents::
- :local:
-
.. FIXME: move to the stylesheet or Sphinx plugin
.. raw:: html
@@ -10,13 +6,64 @@
.arc-term { font-style: italic; font-weight: bold; }
.revision { font-style: italic; }
.when-revised { font-weight: bold; font-style: normal; }
+
+ /*
+ * Automatic numbering is described this article:
+ * http://dev.opera.com/articles/view/automatic-numbering-with-css-counters/
+ */
+ /*
+ * Automatic numbering for the TOC.
+ * This is wrong from the semantics point of view, since it is an ordered
+ * list, but uses "ul" tag.
+ */
+ div#contents.contents.local ul {
+ counter-reset: toc-section;
+ list-style-type: none;
+ }
+ div#contents.contents.local ul li {
+ counter-increment: toc-section;
+ background: none; // Remove bullets
+ }
+ div#contents.contents.local ul li a.reference:before {
+ content: counters(toc-section, ".") " ";
+ }
+
+ /* Automatic numbering for the body. */
+ body {
+ counter-reset: section subsection subsubsection;
+ }
+ .section h2 {
+ counter-reset: subsection subsubsection;
+ counter-increment: section;
+ }
+ .section h2 a.toc-backref:before {
+ content: counter(section) " ";
+ }
+ .section h3 {
+ counter-reset: subsubsection;
+ counter-increment: subsection;
+ }
+ .section h3 a.toc-backref:before {
+ content: counter(section) "." counter(subsection) " ";
+ }
+ .section h4 {
+ counter-increment: subsubsection;
+ }
+ .section h4 a.toc-backref:before {
+ content: counter(section) "." counter(subsection) "." counter(subsubsection) " ";
+ }
</style>
.. role:: arc-term
.. role:: revision
.. role:: when-revised
-.. title:: Objective-C Automatic Reference Counting (ARC)
+==============================================
+Objective-C Automatic Reference Counting (ARC)
+==============================================
+
+.. contents::
+ :local:
.. _arc.meta: