bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 050c02cabe6e8ee1b6187c919eb63fa432776166
parent 6c8253609f4fe6d12401c5dd7d9823fa13fe1d74
Author: Suzanne Soy <ligo@suzanne.soy>
Date:   Tue,  6 Jul 2021 03:20:34 +0100

Merge tag 'v8.0' into my-changes-rebased

Diffstat:
Mscribble-doc/scribblings/scribble/core.scrbl | 20++++++++++++++++----
Mscribble-lib/info.rkt | 2+-
Mscribble-lib/scribble/html-properties.rkt | 1+
Mscribble-lib/scribble/html-render.rkt | 18+++++-------------
Mscribble-lib/scribble/lncs/lang.rkt | 3++-
Ascribble-lib/scribble/lncs/lncs-load.tex | 14++++++++++++++
Mscribble-lib/scribble/scribble-common.js | 12+++++++-----
Mscribble-lib/scribble/scribble.css | 5++++-
8 files changed, 50 insertions(+), 25 deletions(-)

diff --git a/scribble-doc/scribblings/scribble/core.scrbl b/scribble-doc/scribblings/scribble/core.scrbl @@ -1771,10 +1771,13 @@ HTML that is rendered before and after element content. bytes?)])]{ Used as a @tech{style property} to supply a CSS file (if @racket[path] -is a path, string, or list), URL (if @racket[path] is a @racket[url]) or content (if @racket[path] is a byte -string) to be referenced or included in the generated HTML. This -property can be attached to any style, and all additions are collected -to the top of the generated HTML page. +is a path, string, or list), URL (if @racket[path] is a @racket[url]) +or content (if @racket[path] is a byte string) to be referenced or +included in the generated HTML. This property can be attached to any +style, and all additions are collected and lifted to the enclosing +generated HTML. When the style property is attached to a @tech{part}, +then it is also propagated to any generated HTML for a subpart of the +part. The @racket[path] field can be a result of @racket[path->main-collects-relative].} @@ -1848,6 +1851,15 @@ For a @racket[part] that corresponds to an HTML page, adds content to the @tt{<head>} tag.} +@defstruct[head-addition ([xexpr xexpr/c])]{ + +Like @racket[head-extra] in content, but propagated to enclosing and +nested HTML pages like @racket[css-addition]. Additions to @tt{<head>} +via @racket[head-addition] appear before additions via @racket[head-extra]. + +@history[#:added "1.38"]} + + @defstruct[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])]{ For a @racket[part] that corresponds to an HTML page, controls how objects that subscribe to the @racketmodname[file/convertible] diff --git a/scribble-lib/info.rkt b/scribble-lib/info.rkt @@ -23,4 +23,4 @@ (define pkg-authors '(mflatt eli)) -(define version "1.37") +(define version "1.38") diff --git a/scribble-lib/scribble/html-properties.rkt b/scribble-lib/scribble/html-properties.rkt @@ -30,4 +30,5 @@ [link-resource ([path path-string?])] [head-extra ([xexpr xexpr/c])] + [head-addition ([xexpr xexpr/c])] [render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])]) diff --git a/scribble-lib/scribble/html-render.rkt b/scribble-lib/scribble/html-render.rkt @@ -221,26 +221,17 @@ (string->symbol (alt-tag-name s))))) (define (make-search-box top-path) ; appears on every page - (let ([sa string-append] - [emptylabel "...search manuals..."] - [dimcolor "#888"]) + (let ([emptylabel "...search manuals..."]) `(form ([class "searchform"]) (input ([class "searchbox"] - [style ,(sa "color: "dimcolor";")] + [id "searchbox"] [type "text"] [tabindex "1"] - [value ,emptylabel] + [placeholder ,emptylabel] [title "Enter a search string to search the manuals"] [onkeypress ,(format "return DoSearchKey(event, this, ~s, ~s);" - (version) top-path)] - [onfocus ,(sa "this.style.color=\"black\"; " - "this.style.textAlign=\"left\"; " - "if (this.value == \""emptylabel"\") this.value=\"\";")] - [onblur ,(sa "if (this.value.match(/^ *$/)) {" - " this.style.color=\""dimcolor"\";" - " this.style.textAlign=\"center\";" - " this.value=\""emptylabel"\"; }")]))))) + (version) top-path)]))))) (define search-box (make-search-box "../")) (define top-search-box (make-search-box "")) @@ -904,6 +895,7 @@ (extract js-style-addition? js-style-addition-path) (reverse extra-script-files))) ,(xml:comment "[if IE 6]><style type=\"text/css\">.SIEHidden { overflow: hidden; }</style><![endif]") + ,@(extract head-addition? head-addition-xexpr) ,@(for/list ([p (style-properties (part-style d))] #:when (head-extra? p)) (head-extra-xexpr p))) diff --git a/scribble-lib/scribble/lncs/lang.rkt b/scribble-lib/scribble/lncs/lang.rkt @@ -50,7 +50,8 @@ unicode-encoding-packages)) (scribble-file "lncs/style.tex") (list cls-file) - #f)) + #f + #:replacements (hash "scribble-load-replace.tex" (scribble-file "lncs/lncs-load.tex")))) (define lncs-extras (let ([abs (lambda (s) diff --git a/scribble-lib/scribble/lncs/lncs-load.tex b/scribble-lib/scribble/lncs/lncs-load.tex @@ -0,0 +1,14 @@ +% Scribble should not change the default font from CMR +% to ptm for LNCS. See Guidelines for Authors of Papers +% to be Published in Springer Computer Science Proceedings, +% section 2.3, Fonts. +% +% IMPORTANT: the default package newtxmath *still* +% changes the math font. If you want to disable it, +% uncomment the next line +% \renewcommand\packageTxfonts\relax +% However, scribble would still generate LaTeX commands +% that depend on newtxmath upon rendering symbols +% \multimap, \multimapinv, \invamp and \square in +% scribble-lib/scribble/latex-render.rkt. +\renewcommand\renewrmdefault\relax diff --git a/scribble-lib/scribble/scribble-common.js b/scribble-lib/scribble/scribble-common.js @@ -129,7 +129,7 @@ function NormalizePath(path) { function DoSearchKey(event, field, ver, top_path) { var val = field.value; - if (event && event.keyCode == 13) { + if (event && event.key === 'Enter') { var u = GetCookie("PLT_Root."+ver, null); if (u == null) u = top_path; // default: go to the top path u += "search/index.html?q=" + encodeURIComponent(val); @@ -171,10 +171,12 @@ AddOnLoad(function(){ // Pressing "S" or "s" focuses on the "...search manuals..." text field AddOnLoad(function(){ - window.addEventListener("keyup", function(event) { - if (event && (event.keyCode == 83 || event.keyCode == 115) && event.target == document.body) { - var field = document.getElementsByClassName("searchbox")[0]; - field.focus(); + window.addEventListener("keyup", function(e) { + if ((e.key === 's' || e.key === 'S') && e.target === document.body) { + var searchBox = document.getElementById('searchbox'); + if (searchBox) { + searchBox.focus(); + } } }, false); }); diff --git a/scribble-lib/scribble/scribble.css b/scribble-lib/scribble/scribble.css @@ -152,10 +152,13 @@ table td { padding: 0px; background-color: #eee; border: 1px solid #ddd; - text-align: center; vertical-align: middle; } +.searchbox::placeholder { + text-align: center; +} + #contextindicator { position: fixed; background-color: #c6f;