Scheme -> Racket in styles
Scribble style names. .tex and .css files
This commit is contained in:
parent
b6b8e29957
commit
ab70fed8a8
|
@ -65,7 +65,7 @@
|
|||
(if date `(" " ,@(decode-content (list date)) ".") null)
|
||||
(if url `(" " ,(link url (tt url))) null)))))
|
||||
|
||||
(define-on-demand bib-style (make-style "SBibliography" scheme-properties))
|
||||
(define-on-demand bib-style (make-style "RBibliography" scheme-properties))
|
||||
|
||||
(define (bibliography #:tag [tag "doc-bibliography"] . citations)
|
||||
(make-unnumbered-part
|
||||
|
|
|
@ -11,5 +11,5 @@
|
|||
(define-on-demand scheme-properties
|
||||
(let ([abs (lambda (s)
|
||||
(path->main-collects-relative (build-path (collection-path "scribble") s)))])
|
||||
(list (make-css-addition (abs "scheme.css"))
|
||||
(make-tex-addition (abs "scheme.tex")))))
|
||||
(list (make-css-addition (abs "racket.css"))
|
||||
(make-tex-addition (abs "racket.tex")))))
|
||||
|
|
|
@ -217,17 +217,17 @@
|
|||
|
||||
(define (filebox filename . inside)
|
||||
(make-nested-flow
|
||||
(make-style "Sfilebox" scheme-properties)
|
||||
(make-style "Rfilebox" scheme-properties)
|
||||
(list
|
||||
(make-styled-paragraph
|
||||
(list (make-element
|
||||
(make-style "Sfilename" scheme-properties)
|
||||
(make-style "Rfilename" scheme-properties)
|
||||
(if (string? filename)
|
||||
(filepath filename)
|
||||
filename)))
|
||||
(make-style "Sfiletitle" scheme-properties))
|
||||
(make-style "Rfiletitle" scheme-properties))
|
||||
(make-nested-flow
|
||||
(make-style "Sfilecontent" scheme-properties)
|
||||
(make-style "Rfilecontent" scheme-properties)
|
||||
(decode-flow inside)))))
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
/* See the beginning of "scribble.css". */
|
||||
|
||||
/* Monospace: */
|
||||
.ScmIn, .ScmRdr, .ScmPn, .ScmMeta,
|
||||
.ScmMod, .ScmKw, .ScmVar, .ScmSym,
|
||||
.ScmRes, .ScmOut, .ScmCmt, .ScmVal {
|
||||
.RktIn, .RktRdr, .RktPn, .RktMeta,
|
||||
.RktMod, .RktKw, .RktVar, .RktSym,
|
||||
.RktRes, .RktOut, .RktCmt, .RktVal {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
|
@ -35,84 +35,84 @@
|
|||
}
|
||||
|
||||
/* ---------------------------------------- */
|
||||
/* Scheme text styles */
|
||||
/* Racket text styles */
|
||||
|
||||
.ScmIn {
|
||||
.RktIn {
|
||||
color: #cc6633;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.ScmInBG {
|
||||
.RktInBG {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.ScmRdr {
|
||||
.RktRdr {
|
||||
}
|
||||
|
||||
.ScmPn {
|
||||
.RktPn {
|
||||
color: #843c24;
|
||||
}
|
||||
|
||||
.ScmMeta {
|
||||
.RktMeta {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ScmMod {
|
||||
.RktMod {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ScmOpt {
|
||||
.RktOpt {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.ScmKw {
|
||||
.RktKw {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ScmErr {
|
||||
.RktErr {
|
||||
color: red;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.ScmVar {
|
||||
.RktVar {
|
||||
color: #262680;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.ScmSym {
|
||||
.RktSym {
|
||||
color: #262680;
|
||||
}
|
||||
|
||||
.ScmValLink {
|
||||
.RktValLink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.ScmModLink {
|
||||
.RktModLink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.ScmStxLink {
|
||||
.RktStxLink {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ScmRes {
|
||||
.RktRes {
|
||||
color: #0000af;
|
||||
}
|
||||
|
||||
.ScmOut {
|
||||
.RktOut {
|
||||
color: #960096;
|
||||
}
|
||||
|
||||
.ScmCmt {
|
||||
.RktCmt {
|
||||
color: #c2741f;
|
||||
}
|
||||
|
||||
.ScmVal {
|
||||
.RktVal {
|
||||
color: #228b22;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@
|
|||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.ScmBlk td {
|
||||
.RktBlk td {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@
|
|||
float: right;
|
||||
}
|
||||
|
||||
.SBibliography td {
|
||||
.RBibliography td {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
|
@ -165,17 +165,17 @@
|
|||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.Sfilebox {
|
||||
.Rfilebox {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.Sfiletitle {
|
||||
.Rfiletitle {
|
||||
text-align: right;
|
||||
margin: 0em 0em 0em 0em;
|
||||
}
|
||||
|
||||
.Sfilename {
|
||||
.Rfilename {
|
||||
border-top: 1px solid #6C8585;
|
||||
border-right: 1px solid #6C8585;
|
||||
padding-left: 0.5em;
|
||||
|
@ -183,6 +183,6 @@
|
|||
background-color: #ECF5F5;
|
||||
}
|
||||
|
||||
.Sfilecontent {
|
||||
.Rfilecontent {
|
||||
margin: 0em 0em 0em 0em;
|
||||
}
|
|
@ -58,26 +58,26 @@
|
|||
(cons 'tt-chars scheme-properties)
|
||||
scheme-properties)))
|
||||
|
||||
(define-on-demand output-color (make-racket-style "ScmOut"))
|
||||
(define-on-demand input-color (make-racket-style "ScmIn"))
|
||||
(define-on-demand input-background-color (make-racket-style "ScmInBG"))
|
||||
(define-on-demand no-color (make-racket-style "ScmPlain"))
|
||||
(define-on-demand reader-color (make-racket-style "ScmRdr"))
|
||||
(define-on-demand result-color (make-racket-style "ScmRes"))
|
||||
(define-on-demand keyword-color (make-racket-style "ScmKw"))
|
||||
(define-on-demand comment-color (make-racket-style "ScmCmt"))
|
||||
(define-on-demand paren-color (make-racket-style "ScmPn"))
|
||||
(define-on-demand meta-color (make-racket-style "ScmMeta"))
|
||||
(define-on-demand value-color (make-racket-style "ScmVal"))
|
||||
(define-on-demand symbol-color (make-racket-style "ScmSym"))
|
||||
(define-on-demand variable-color (make-racket-style "ScmVar"))
|
||||
(define-on-demand opt-color (make-racket-style "ScmOpt"))
|
||||
(define-on-demand error-color (make-racket-style "ScmErr" #:tt? #f))
|
||||
(define-on-demand syntax-link-color (make-racket-style "ScmStxLink"))
|
||||
(define-on-demand value-link-color (make-racket-style "ScmValLink"))
|
||||
(define-on-demand module-color (make-racket-style "ScmMod"))
|
||||
(define-on-demand module-link-color (make-racket-style "ScmModLink"))
|
||||
(define-on-demand block-color (make-racket-style "ScmBlk"))
|
||||
(define-on-demand output-color (make-racket-style "RktOut"))
|
||||
(define-on-demand input-color (make-racket-style "RktIn"))
|
||||
(define-on-demand input-background-color (make-racket-style "RktInBG"))
|
||||
(define-on-demand no-color (make-racket-style "RktPlain"))
|
||||
(define-on-demand reader-color (make-racket-style "RktRdr"))
|
||||
(define-on-demand result-color (make-racket-style "RktRes"))
|
||||
(define-on-demand keyword-color (make-racket-style "RktKw"))
|
||||
(define-on-demand comment-color (make-racket-style "RktCmt"))
|
||||
(define-on-demand paren-color (make-racket-style "RktPn"))
|
||||
(define-on-demand meta-color (make-racket-style "RktMeta"))
|
||||
(define-on-demand value-color (make-racket-style "RktVal"))
|
||||
(define-on-demand symbol-color (make-racket-style "RktSym"))
|
||||
(define-on-demand variable-color (make-racket-style "RktVar"))
|
||||
(define-on-demand opt-color (make-racket-style "RktOpt"))
|
||||
(define-on-demand error-color (make-racket-style "RktErr" #:tt? #f))
|
||||
(define-on-demand syntax-link-color (make-racket-style "RktStxLink"))
|
||||
(define-on-demand value-link-color (make-racket-style "RktValLink"))
|
||||
(define-on-demand module-color (make-racket-style "RktMod"))
|
||||
(define-on-demand module-link-color (make-racket-style "RktModLink"))
|
||||
(define-on-demand block-color (make-racket-style "RktBlk"))
|
||||
(define-on-demand highlighted-color (make-racket-style "highlighted" #:tt? #f))
|
||||
|
||||
(define current-keyword-list
|
||||
|
|
58
collects/scribble/racket.tex
Normal file
58
collects/scribble/racket.tex
Normal file
|
@ -0,0 +1,58 @@
|
|||
|
||||
% Redefine \SColorize to produce B&W Scheme text
|
||||
\newcommand{\SColorize}[2]{\color{#1}{#2}}
|
||||
|
||||
\newcommand{\inColor}[2]{{\Scribtexttt{\SColorize{#1}{#2}}}}
|
||||
\definecolor{PaleBlue}{rgb}{0.90,0.90,1.0}
|
||||
\definecolor{LightGray}{rgb}{0.90,0.90,0.90}
|
||||
\definecolor{CommentColor}{rgb}{0.76,0.45,0.12}
|
||||
\definecolor{ParenColor}{rgb}{0.52,0.24,0.14}
|
||||
\definecolor{IdentifierColor}{rgb}{0.15,0.15,0.50}
|
||||
\definecolor{ResultColor}{rgb}{0.0,0.0,0.69}
|
||||
\definecolor{ValueColor}{rgb}{0.13,0.55,0.13}
|
||||
\definecolor{OutputColor}{rgb}{0.59,0.00,0.59}
|
||||
|
||||
\newcommand{\RktPlain}[1]{\inColor{black}{#1}}
|
||||
\newcommand{\RktKw}[1]{{\SColorize{black}{\Scribtexttt{\textbf{#1}}}}}
|
||||
\newcommand{\RktStxLink}[1]{\RktKw{#1}}
|
||||
\newcommand{\RktCmt}[1]{\inColor{CommentColor}{#1}}
|
||||
\newcommand{\RktPn}[1]{\inColor{ParenColor}{#1}}
|
||||
\newcommand{\RktInBG}[1]{\inColor{ParenColor}{#1}}
|
||||
\newcommand{\RktSym}[1]{\inColor{IdentifierColor}{#1}}
|
||||
\newcommand{\RktVal}[1]{\inColor{ValueColor}{#1}}
|
||||
\newcommand{\RktValLink}[1]{\inColor{blue}{#1}}
|
||||
\newcommand{\RktModLink}[1]{\inColor{blue}{#1}}
|
||||
\newcommand{\RktRes}[1]{\inColor{ResultColor}{#1}}
|
||||
\newcommand{\RktOut}[1]{\inColor{OutputColor}{#1}}
|
||||
\newcommand{\RktMeta}[1]{\inColor{IdentifierColor}{#1}}
|
||||
\newcommand{\RktMod}[1]{\inColor{black}{#1}}
|
||||
\newcommand{\RktRdr}[1]{\inColor{black}{#1}}
|
||||
\newcommand{\RktVarCol}[1]{\inColor{IdentifierColor}{#1}}
|
||||
\newcommand{\RktVar}[1]{{\RktVarCol{\textsl{#1}}}}
|
||||
\newcommand{\RktErrCol}[1]{\inColor{red}{#1}}
|
||||
\newcommand{\RktErr}[1]{{\RktErrCol{\textrm{\textit{#1}}}}}
|
||||
\newcommand{\RktOpt}[1]{#1}
|
||||
\newcommand{\RktIn}[1]{\incolorbox{LightGray}{\RktInBG{#1}}}
|
||||
\newcommand{\highlighted}[1]{\colorbox{PaleBlue}{\hspace{-0.5ex}\RktInBG{#1}\hspace{-0.5ex}}}
|
||||
|
||||
\newenvironment{RktBlk}{}{}
|
||||
\newenvironment{defmodule}{}{}
|
||||
\newenvironment{prototype}{}{}
|
||||
\newenvironment{argcontract}{}{}
|
||||
\newenvironment{together}{}{}
|
||||
|
||||
\newenvironment{specgrammar}{}{}
|
||||
|
||||
|
||||
\newenvironment{RBibliography}{}{}
|
||||
\newcommand{\bibentry}[1]{\parbox[t]{0.8\linewidth}{#1}}
|
||||
|
||||
\newenvironment{leftindent}{\begin{quote}}{\end{quote}}
|
||||
\newenvironment{insetpara}{\begin{quote}}{\end{quote}}
|
||||
|
||||
\newcommand{\Rfiletitle}[1]{\hfill \fbox{#1}}
|
||||
\newcommand{\Rfilename}[1]{#1}
|
||||
\newenvironment{Rfilebox}{\begin{list}{}{\topsep=0pt\partopsep=0pt%
|
||||
\listparindent=0pt\itemindent=0pt\labelwidth=0pt\leftmargin=2ex\rightmargin=2ex%
|
||||
\itemsep=0pt\parsep=0pt}\item}{\end{list}}
|
||||
\newenvironment{Rfilecontent}{}{}
|
|
@ -1,58 +0,0 @@
|
|||
|
||||
% Redefine \SColorize to produce B&W Scheme text
|
||||
\newcommand{\SColorize}[2]{\color{#1}{#2}}
|
||||
|
||||
\newcommand{\inColor}[2]{{\Scribtexttt{\SColorize{#1}{#2}}}}
|
||||
\definecolor{PaleBlue}{rgb}{0.90,0.90,1.0}
|
||||
\definecolor{LightGray}{rgb}{0.90,0.90,0.90}
|
||||
\definecolor{CommentColor}{rgb}{0.76,0.45,0.12}
|
||||
\definecolor{ParenColor}{rgb}{0.52,0.24,0.14}
|
||||
\definecolor{IdentifierColor}{rgb}{0.15,0.15,0.50}
|
||||
\definecolor{ResultColor}{rgb}{0.0,0.0,0.69}
|
||||
\definecolor{ValueColor}{rgb}{0.13,0.55,0.13}
|
||||
\definecolor{OutputColor}{rgb}{0.59,0.00,0.59}
|
||||
|
||||
\newcommand{\ScmPlain}[1]{\inColor{black}{#1}}
|
||||
\newcommand{\ScmKw}[1]{{\SColorize{black}{\Scribtexttt{\textbf{#1}}}}}
|
||||
\newcommand{\ScmStxLink}[1]{\ScmKw{#1}}
|
||||
\newcommand{\ScmCmt}[1]{\inColor{CommentColor}{#1}}
|
||||
\newcommand{\ScmPn}[1]{\inColor{ParenColor}{#1}}
|
||||
\newcommand{\ScmInBG}[1]{\inColor{ParenColor}{#1}}
|
||||
\newcommand{\ScmSym}[1]{\inColor{IdentifierColor}{#1}}
|
||||
\newcommand{\ScmVal}[1]{\inColor{ValueColor}{#1}}
|
||||
\newcommand{\ScmValLink}[1]{\inColor{blue}{#1}}
|
||||
\newcommand{\ScmModLink}[1]{\inColor{blue}{#1}}
|
||||
\newcommand{\ScmRes}[1]{\inColor{ResultColor}{#1}}
|
||||
\newcommand{\ScmOut}[1]{\inColor{OutputColor}{#1}}
|
||||
\newcommand{\ScmMeta}[1]{\inColor{IdentifierColor}{#1}}
|
||||
\newcommand{\ScmMod}[1]{\inColor{black}{#1}}
|
||||
\newcommand{\ScmRdr}[1]{\inColor{black}{#1}}
|
||||
\newcommand{\ScmVarCol}[1]{\inColor{IdentifierColor}{#1}}
|
||||
\newcommand{\ScmVar}[1]{{\ScmVarCol{\textsl{#1}}}}
|
||||
\newcommand{\ScmErrCol}[1]{\inColor{red}{#1}}
|
||||
\newcommand{\ScmErr}[1]{{\ScmErrCol{\textrm{\textit{#1}}}}}
|
||||
\newcommand{\ScmOpt}[1]{#1}
|
||||
\newcommand{\ScmIn}[1]{\incolorbox{LightGray}{\ScmInBG{#1}}}
|
||||
\newcommand{\highlighted}[1]{\colorbox{PaleBlue}{\hspace{-0.5ex}\ScmInBG{#1}\hspace{-0.5ex}}}
|
||||
|
||||
\newenvironment{ScmBlk}{}{}
|
||||
\newenvironment{defmodule}{}{}
|
||||
\newenvironment{prototype}{}{}
|
||||
\newenvironment{argcontract}{}{}
|
||||
\newenvironment{together}{}{}
|
||||
|
||||
\newenvironment{specgrammar}{}{}
|
||||
|
||||
|
||||
\newenvironment{SBibliography}{}{}
|
||||
\newcommand{\bibentry}[1]{\parbox[t]{0.8\linewidth}{#1}}
|
||||
|
||||
\newenvironment{leftindent}{\begin{quote}}{\end{quote}}
|
||||
\newenvironment{insetpara}{\begin{quote}}{\end{quote}}
|
||||
|
||||
\newcommand{\Sfiletitle}[1]{\hfill \fbox{#1}}
|
||||
\newcommand{\Sfilename}[1]{#1}
|
||||
\newenvironment{Sfilebox}{\begin{list}{}{\topsep=0pt\partopsep=0pt%
|
||||
\listparindent=0pt\itemindent=0pt\labelwidth=0pt\leftmargin=2ex\rightmargin=2ex%
|
||||
\itemsep=0pt\parsep=0pt}\item}{\end{list}}
|
||||
\newenvironment{Sfilecontent}{}{}
|
|
@ -610,7 +610,7 @@ function UpdateResults() {
|
|||
note +=
|
||||
(j==0 ? "" : ", ")
|
||||
+ '<a href="?q=' + encodeURIComponent("L:"+desc[j]) + '"'
|
||||
+' class="ScmMod" tabIndex="2"'
|
||||
+' class="RktMod" tabIndex="2"'
|
||||
+' title="show bindings from the '+desc[j]+' module'
|
||||
+' (right-click to refine current query)"'
|
||||
+' style="text-decoration: none; color: #006;"'
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
;; the second argument specifies installation/user specific, and if
|
||||
;; it's missing, then it's a page with a single version
|
||||
(define (main-page id [installation-specific? '?] #:force-scheme-css? [force-scheme-css? #f])
|
||||
(define (main-page id [installation-specific? '?] #:force-racket-css? [force-racket-css? #f])
|
||||
(define info (page-info id))
|
||||
(define title-string (car info))
|
||||
(define root (cadr info))
|
||||
|
@ -53,11 +53,11 @@
|
|||
(define page-title
|
||||
(title #:style (make-style #f (cons
|
||||
'no-toc
|
||||
(if (not force-scheme-css?)
|
||||
(if (not force-racket-css?)
|
||||
null
|
||||
(list
|
||||
(make-css-addition (build-path (collection-path "scribble")
|
||||
"scheme.css"))))))
|
||||
"racket.css"))))))
|
||||
title-string
|
||||
#;
|
||||
;; the "(installation)" part shouldn't be visible on the web, but
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"private/make-search.ss")
|
||||
|
||||
@main-page['search #t
|
||||
;; "scheme.css" needs to be installed for search results:
|
||||
#:force-scheme-css? #t]
|
||||
;; "racket.css" needs to be installed for search results:
|
||||
#:force-racket-css? #t]
|
||||
|
||||
@make-search[#f]
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
"private/manuals.ss")
|
||||
|
||||
@main-page['start #t
|
||||
;; "scheme.css" needs to be installed so it can be shared:
|
||||
#:force-scheme-css? #t]
|
||||
;; "racket.css" needs to be installed so it can be shared:
|
||||
#:force-racket-css? #t]
|
||||
|
||||
@margin-note{
|
||||
@not-on-the-web{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"../private/make-search.ss")
|
||||
|
||||
@main-page['search #f
|
||||
;; "scheme.css" needs to be installed for search results:
|
||||
#:force-scheme-css? #t]
|
||||
;; "racket.css" needs to be installed for search results:
|
||||
#:force-racket-css? #t]
|
||||
|
||||
@make-search[#t]
|
||||
|
|
|
@ -287,7 +287,7 @@
|
|||
(format "../~a" s)))])
|
||||
(list (std-path "scribble.css")
|
||||
(std-path "scribble-style.css")
|
||||
(std-path "scheme.css")
|
||||
(std-path "racket.css")
|
||||
(std-path "scribble-common.js")))
|
||||
null)]
|
||||
;; For main-directory, non-start files, up-path is #t, which makes the
|
||||
|
|
Loading…
Reference in New Issue
Block a user