Fixed footnotes rendering in documentation.
This commit is contained in:
parent
67e9dc92e0
commit
d7860e0eaf
|
@ -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
|
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
|
function from the @tc[fold-queue] library to process the queues of pending
|
||||||
placeholders, starting with a queue containing only that root placeholder.
|
placeholders, starting with a queue containing only that root placeholder.
|
||||||
We will have one queue for each placeholder type@note{Otherwise, when extracting
|
We will have one queue for each placeholder type.@note{It we had only one queue,
|
||||||
an element from the collection of results, we would need a @racket[cast].}. The
|
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.
|
queues' element types will therefore be these placeholder types.
|
||||||
|
|
||||||
@chunk[<fold-queue-type-element>
|
@chunk[<fold-queue-type-element>
|
||||||
|
@ -222,21 +223,17 @@ The return type for each queue will be the corresponding with-promises type.
|
||||||
@; type.
|
@; type.
|
||||||
|
|
||||||
@; TODO: clarity.
|
@; TODO: clarity.
|
||||||
@(void #|
|
@; The @tc[fold-queues] function allows us to associate each element with a tag, so
|
||||||
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
|
||||||
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
|
||||||
using this tag, which can be more lightweight than keeping a copy of the
|
@; element.
|
||||||
element.
|
@;
|
||||||
|
@; We will tag our elements with an @tc[Index], which prevents memory leakage: if
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
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.
|
||||||
able to use an array instead of a hash table.|#)
|
|
||||||
|
|
||||||
@chunk[<fold-queue-type-tag>
|
|
||||||
Index]
|
|
||||||
|
|
||||||
@subsection{The queues of placeholders}
|
@subsection{The queues of placeholders}
|
||||||
|
|
||||||
|
|
|
@ -8,21 +8,33 @@
|
||||||
; @setup-math is returned in @doc-lib-setup.
|
; @setup-math is returned in @doc-lib-setup.
|
||||||
|
|
||||||
|
|
||||||
|
(require scriblib/render-cond)
|
||||||
|
|
||||||
;(require "low-untyped.rkt")
|
;(require "low-untyped.rkt")
|
||||||
;(#lang reader "scribble-custom/lp2.rkt" #:lang typed/racket)
|
;(#lang reader "scribble-custom/lp2.rkt" #:lang typed/racket)
|
||||||
|
|
||||||
;; http://lists.racket-lang.org/users/archive/2015-January/065752.html
|
;; 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)))
|
(require (for-label (only-meta-in 0 typed/racket)))
|
||||||
(provide (for-label (all-from-out 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)
|
(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))
|
(require (for-syntax mzlib/etc))
|
||||||
(define-syntax (doc-lib-setup stx)
|
(define-syntax (doc-lib-setup stx)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user