Fixed footnotes rendering in documentation.

This commit is contained in:
Georges Dupéron 2015-11-18 16:26:33 +01:00
parent 67e9dc92e0
commit d7860e0eaf
2 changed files with 31 additions and 22 deletions

View File

@ -202,8 +202,9 @@ When the graph constructor is called with the arguments for the root parameters,
it is equivalent to make and then resolve an initial placeholder. We will use a
function from the @tc[fold-queue] library to process the queues of pending
placeholders, starting with a queue containing only that root placeholder.
We will have one queue for each placeholder type@note{Otherwise, when extracting
an element from the collection of results, we would need a @racket[cast].}. The
We will have one queue for each placeholder type.@note{It we had only one queue,
we would have only one collection of results, and would need a @racket[cast]
when extracting nodes from the collection of results.} The
queues' element types will therefore be these placeholder types.
@chunk[<fold-queue-type-element>
@ -222,21 +223,17 @@ The return type for each queue will be the corresponding with-promises type.
@; type.
@; TODO: clarity.
@(void #|
The @tc[fold-queues] function allows us to associate each element with a tag, so
that, inside the processing function and outside, we can refer to an element
using this tag, which can be more lightweight than keeping a copy of the
element.
We will tag our elements with an @tc[Index], which prevents memory leakage: if
we kept references to the original data added to the queue, a graph's
representation would hold references to its input, which is not the case when
using simple integers to refer to other nodes, instead of using the input for
these nodes. Also, it makes lookups in the database much faster, as we will be
able to use an array instead of a hash table.|#)
@chunk[<fold-queue-type-tag>
Index]
@; The @tc[fold-queues] function allows us to associate each element with a tag, so
@; that, inside the processing function and outside, we can refer to an element
@; using this tag, which can be more lightweight than keeping a copy of the
@; element.
@;
@; We will tag our elements with an @tc[Index], which prevents memory leakage: if
@; we kept references to the original data added to the queue, a graph's
@; representation would hold references to its input, which is not the case when
@; using simple integers to refer to other nodes, instead of using the input for
@; these nodes. Also, it makes lookups in the database much faster, as we will be
@; able to use an array instead of a hash table.
@subsection{The queues of placeholders}

View File

@ -8,21 +8,33 @@
; @setup-math is returned in @doc-lib-setup.
(require scriblib/render-cond)
;(require "low-untyped.rkt")
;(#lang reader "scribble-custom/lp2.rkt" #:lang typed/racket)
;; http://lists.racket-lang.org/users/archive/2015-January/065752.html
;; http://bugs.racket-lang.org/query/?cmd=view%20audit-trail&database=default&pr=14068
;; http://bugs.racket-lang.org/query/?cmd=view%20audit-trail&pr=14068
;; &database=default
(require (for-label (only-meta-in 0 typed/racket)))
(provide (for-label (all-from-out typed/racket)))
;(require scriblib/footnote)
;(provide (all-from-out scriblib/footnote))
(require (only-in scribble/base [margin-note note]))
;; ==== hybrid footnotes/margin-note ====
(provide note)
(require (only-in scriblib/footnote [note footnote])
(only-in scribble/base margin-note)
(only-in scribble/core nested-flow style))
(define (note . args)
(cond-element
[html (element (style "refpara" '())
(list (element (style "refcolumn" '())
(list (element (style "refcontent" '())
(list args))))))]
[else (apply footnote args)]))
;; ==== ====
(require (for-syntax mzlib/etc))
(define-syntax (doc-lib-setup stx)