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

This commit is contained in:
Suzanne Soy 2021-07-06 03:20:34 +01:00
commit 050c02cabe
8 changed files with 50 additions and 25 deletions

View File

@ -1771,10 +1771,13 @@ HTML that is rendered before and after element content.
bytes?)])]{ bytes?)])]{
Used as a @tech{style property} to supply a CSS file (if @racket[path] 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 is a path, string, or list), URL (if @racket[path] is a @racket[url])
string) to be referenced or included in the generated HTML. This or content (if @racket[path] is a byte string) to be referenced or
property can be attached to any style, and all additions are collected included in the generated HTML. This property can be attached to any
to the top of the generated HTML page. 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 The @racket[path] field can be a result of
@racket[path->main-collects-relative].} @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.} 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))])]{ @defstruct[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])]{
For a @racket[part] that corresponds to an HTML page, For a @racket[part] that corresponds to an HTML page,
controls how objects that subscribe to the @racketmodname[file/convertible] controls how objects that subscribe to the @racketmodname[file/convertible]

View File

@ -23,4 +23,4 @@
(define pkg-authors '(mflatt eli)) (define pkg-authors '(mflatt eli))
(define version "1.37") (define version "1.38")

View File

@ -30,4 +30,5 @@
[link-resource ([path path-string?])] [link-resource ([path path-string?])]
[head-extra ([xexpr xexpr/c])] [head-extra ([xexpr xexpr/c])]
[head-addition ([xexpr xexpr/c])]
[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])]) [render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])])

View File

@ -221,26 +221,17 @@
(string->symbol (alt-tag-name s))))) (string->symbol (alt-tag-name s)))))
(define (make-search-box top-path) ; appears on every page (define (make-search-box top-path) ; appears on every page
(let ([sa string-append] (let ([emptylabel "...search manuals..."])
[emptylabel "...search manuals..."]
[dimcolor "#888"])
`(form ([class "searchform"]) `(form ([class "searchform"])
(input (input
([class "searchbox"] ([class "searchbox"]
[style ,(sa "color: "dimcolor";")] [id "searchbox"]
[type "text"] [type "text"]
[tabindex "1"] [tabindex "1"]
[value ,emptylabel] [placeholder ,emptylabel]
[title "Enter a search string to search the manuals"] [title "Enter a search string to search the manuals"]
[onkeypress ,(format "return DoSearchKey(event, this, ~s, ~s);" [onkeypress ,(format "return DoSearchKey(event, this, ~s, ~s);"
(version) top-path)] (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"\"; }")])))))
(define search-box (make-search-box "../")) (define search-box (make-search-box "../"))
(define top-search-box (make-search-box "")) (define top-search-box (make-search-box ""))
@ -904,6 +895,7 @@
(extract js-style-addition? js-style-addition-path) (extract js-style-addition? js-style-addition-path)
(reverse extra-script-files))) (reverse extra-script-files)))
,(xml:comment "[if IE 6]><style type=\"text/css\">.SIEHidden { overflow: hidden; }</style><![endif]") ,(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))] ,@(for/list ([p (style-properties (part-style d))]
#:when (head-extra? p)) #:when (head-extra? p))
(head-extra-xexpr p))) (head-extra-xexpr p)))

View File

@ -50,7 +50,8 @@
unicode-encoding-packages)) unicode-encoding-packages))
(scribble-file "lncs/style.tex") (scribble-file "lncs/style.tex")
(list cls-file) (list cls-file)
#f)) #f
#:replacements (hash "scribble-load-replace.tex" (scribble-file "lncs/lncs-load.tex"))))
(define lncs-extras (define lncs-extras
(let ([abs (lambda (s) (let ([abs (lambda (s)

View File

@ -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

View File

@ -129,7 +129,7 @@ function NormalizePath(path) {
function DoSearchKey(event, field, ver, top_path) { function DoSearchKey(event, field, ver, top_path) {
var val = field.value; var val = field.value;
if (event && event.keyCode == 13) { if (event && event.key === 'Enter') {
var u = GetCookie("PLT_Root."+ver, null); var u = GetCookie("PLT_Root."+ver, null);
if (u == null) u = top_path; // default: go to the top path if (u == null) u = top_path; // default: go to the top path
u += "search/index.html?q=" + encodeURIComponent(val); u += "search/index.html?q=" + encodeURIComponent(val);
@ -171,10 +171,12 @@ AddOnLoad(function(){
// Pressing "S" or "s" focuses on the "...search manuals..." text field // Pressing "S" or "s" focuses on the "...search manuals..." text field
AddOnLoad(function(){ AddOnLoad(function(){
window.addEventListener("keyup", function(event) { window.addEventListener("keyup", function(e) {
if (event && (event.keyCode == 83 || event.keyCode == 115) && event.target == document.body) { if ((e.key === 's' || e.key === 'S') && e.target === document.body) {
var field = document.getElementsByClassName("searchbox")[0]; var searchBox = document.getElementById('searchbox');
field.focus(); if (searchBox) {
searchBox.focus();
}
} }
}, false); }, false);
}); });

View File

@ -152,10 +152,13 @@ table td {
padding: 0px; padding: 0px;
background-color: #eee; background-color: #eee;
border: 1px solid #ddd; border: 1px solid #ddd;
text-align: center;
vertical-align: middle; vertical-align: middle;
} }
.searchbox::placeholder {
text-align: center;
}
#contextindicator { #contextindicator {
position: fixed; position: fixed;
background-color: #c6f; background-color: #c6f;