[cfe-commits] r170283 - /cfe/trunk/docs/AutomaticReferenceCounting.rst

Sean Silva silvas at purdue.edu
Sun Dec 16 11:21:18 PST 2012


This looks fantastic. Thanks!

btw I just noticed that you introduced new roles :arc-term:,
:revision:, :when-revised:. That's a really good idea!

-- Sean Silva

On Sun, Dec 16, 2012 at 4:25 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> Author: gribozavr
> Date: Sun Dec 16 05:25:45 2012
> New Revision: 170283
>
> URL: http://llvm.org/viewvc/llvm-project?rev=170283&view=rev
> Log:
> Documentation: AutomaticReferenceCounting.rst: use CSS section numbering.
> This enables us to use the same document structure as in other files.
>
> Modified:
>     cfe/trunk/docs/AutomaticReferenceCounting.rst
>
> Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AutomaticReferenceCounting.rst?rev=170283&r1=170282&r2=170283&view=diff
> ==============================================================================
> --- cfe/trunk/docs/AutomaticReferenceCounting.rst (original)
> +++ cfe/trunk/docs/AutomaticReferenceCounting.rst Sun Dec 16 05:25:45 2012
> @@ -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:
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list