scribble: use Latex skull package only if needed
original commit: 93bcc58a0c348429a6fc145d83211d4e038f95e6
This commit is contained in:
parent
16ff0ec9a4
commit
201f279940
|
@ -117,8 +117,14 @@
|
||||||
(extract-style-style-files (paragraph-style p) ht pred extract)
|
(extract-style-style-files (paragraph-style p) ht pred extract)
|
||||||
(extract-content-style-files (paragraph-content p) d ri ht pred extract)]))
|
(extract-content-style-files (paragraph-content p) d ri ht pred extract)]))
|
||||||
|
|
||||||
|
(define/public (string-to-implicit-styles e) null)
|
||||||
|
|
||||||
(define/private (extract-content-style-files e d ri ht pred extract)
|
(define/private (extract-content-style-files e d ri ht pred extract)
|
||||||
(cond
|
(cond
|
||||||
|
[(string? e) (let ([ses (string-to-implicit-styles e)])
|
||||||
|
(when (pair? ses)
|
||||||
|
(for ([s (in-list ses)])
|
||||||
|
(extract-style-style-files s ht pred extract))))]
|
||||||
[(element? e)
|
[(element? e)
|
||||||
(when (style? (element-style e))
|
(when (style? (element-style e))
|
||||||
(extract-style-style-files (element-style e) ht pred extract))
|
(extract-style-style-files (element-style e) ht pred extract))
|
||||||
|
|
|
@ -40,6 +40,9 @@
|
||||||
(define/override (render-part-depth) n)
|
(define/override (render-part-depth) n)
|
||||||
(super-new))))
|
(super-new))))
|
||||||
|
|
||||||
|
(define-runtime-path skull-tex "scribble-skull.tex")
|
||||||
|
(define skull-style (make-style #f (list (tex-addition skull-tex))))
|
||||||
|
|
||||||
(define (render-mixin %)
|
(define (render-mixin %)
|
||||||
(class %
|
(class %
|
||||||
(inherit-field prefix-file style-file style-extra-files)
|
(inherit-field prefix-file style-file style-extra-files)
|
||||||
|
@ -706,6 +709,12 @@
|
||||||
[else (display-protected (format "~s" i))])
|
[else (display-protected (format "~s" i))])
|
||||||
null)
|
null)
|
||||||
|
|
||||||
|
(define/override (string-to-implicit-styles e)
|
||||||
|
(for/fold ([ses null]) ([ch (in-string e)])
|
||||||
|
(case ch
|
||||||
|
[(#\☠) (cons skull-style ses)]
|
||||||
|
[else ses])))
|
||||||
|
|
||||||
(define/private (display-protected s)
|
(define/private (display-protected s)
|
||||||
(if (eq? (rendering-tt) 'exact)
|
(if (eq? (rendering-tt) 'exact)
|
||||||
(display s)
|
(display s)
|
||||||
|
|
1
collects/scribble/scribble-skull.tex
Normal file
1
collects/scribble/scribble-skull.tex
Normal file
|
@ -0,0 +1 @@
|
||||||
|
\usepackage{skull}
|
|
@ -6,7 +6,6 @@
|
||||||
\usepackage{stabular}
|
\usepackage{stabular}
|
||||||
\usepackage{relsize}
|
\usepackage{relsize}
|
||||||
\usepackage{wasysym}
|
\usepackage{wasysym}
|
||||||
\usepackage{skull}
|
|
||||||
\usepackage{textcomp}
|
\usepackage{textcomp}
|
||||||
\usepackage{framed}
|
\usepackage{framed}
|
||||||
\usepackage[htt]{hyphenat}
|
\usepackage[htt]{hyphenat}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user