File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed
scribble-doc/scriblib/scribblings Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,23 @@ redefined as CSS classes or Latex macros to adjust the result:
8181 note. For Latex, this name is mapped to a macro that returns nothing,
8282 leaving the reference managment to @tt{\footnote}.}
8383
84+ @item{@racket["FootnoteRefNumber " ]: Wrapped around the footnote
85+ number as a reference (inside of @racket["FootnoteRef " ]), so that the
86+ default superscript style for a footnote reference can be changed for
87+ HTML output (or potentially for Latex, if @racket["Footnote " ] is not
88+ mapped to @tt{\footnote}).}
89+
8490 @item{@racket["FootnoteTarget " ]: Wrapped around the footnote that is
8591 rendered by @racket[footnote-part-id] or as a margin note. For Latex,
8692 this name is mapped to a macro that returns nothing, leaving the
8793 reference managment to @tt{\footnote}.}
8894
95+ @item{@racket["FootnoteTargetNumber " ]: Wrapped around the footnote
96+ number rendered by @racket[footnote-part-id] or as a margin note, so
97+ that the default superscript style within a footnote can be changed
98+ for HTML (or potentially for Latex, if @racket["Footnote " ] is not
99+ mapped to @tt{\footnote}).}
100+
89101 @item{@racket["FootnoteContent " ]: For Latex, wrapped around the
90102 content of a footnote as rendered by @racket[footnote-part-id].}
91103
Original file line number Diff line number Diff line change 2626 padding-left : 1em ;
2727 text-indent : -0.5em ;
2828}
29+
30+ .FootnoteRefNumber , .FootnoteTargetNumber {
31+ vertical-align : super;
32+ font-size : .83em ;
33+ }
Original file line number Diff line number Diff line change 3333
3434(define footnote-style (make-style "Footnote " footnote-style-extras))
3535(define footnote-ref-style (make-style "FootnoteRef " footnote-style-extras))
36+ (define footnote-ref-number-style (make-style "FootnoteRefNumber " footnote-style-extras))
3637(define footnote-content-style (make-style "FootnoteContent " footnote-style-extras))
3738(define footnote-margin-content-style (make-style "FootnoteMarginContent " footnote-style-extras))
3839(define footnote-target-style (make-style "FootnoteTarget " footnote-style-extras))
40+ (define footnote-target-number-style (make-style "FootnoteTargetNumber " footnote-style-extras))
3941(define footnote-block-style (make-style "FootnoteBlock " footnote-style-extras))
4042(define footnote-block-content-style (make-style "FootnoteBlockContent " footnote-style-extras))
4143
6567 (define tag (generated-tag))
6668 (define content (decode-content text))
6769 (define target (cons (make-element footnote-target-style
68- (make-element 'superscript
70+ (make-element footnote-target-number-style
6971 (counter-target footnotes tag #f
7072 #:use-ref? #t )))
7173 content))
7577 (set id (cons target (get id null))))
7678 (make-element footnote-style
7779 (list (make-element footnote-ref-style
78- (make-element 'superscript (counter-ref footnotes tag #f
79- #:use-target? #t )))
80+ (make-element footnote-ref-number-style
81+ (counter-ref footnotes tag #f
82+ #:use-target? #t )))
8083 (if margin?
8184 (make-element footnote-margin-content-style target)
8285 (cond-element
8386 [latex
84- (make-element footnote-content-style content )]
87+ (make-element footnote-content-style target )]
8588 [else
8689 null])))))))
8790
Original file line number Diff line number Diff line change 44
55\newcommand {\Footnote }[1]{\footnote {#1}}
66\newcommand {\FootnoteRef }[1]{}
7+ \newcommand {\FootnoteRefNumber }[1]{#1}
78\newcommand {\FootnoteTarget }[1]{}
9+ \newcommand {\FootnoteTargetNumber }[1]{#1}
810\newcommand {\FootnoteContent }[1]{#1}
911\newcommand {\FootnoteMarginContent }[1]{#1}
1012
You can’t perform that action at this time.
0 commit comments