diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index 8888b06062..6be22c6091 100644 --- a/collects/scribble/html-render.ss +++ b/collects/scribble/html-render.ss @@ -1119,7 +1119,7 @@ (define/override (render-blockquote t part ri) `((blockquote ,(if (string? (blockquote-style t)) - `([class ,(blockquote-style t)]) + `([class ,(regexp-replace #rx"^[\\]" (blockquote-style t) "")]) `()) ,@(append-map (lambda (i) (render-block i part ri #f)) (blockquote-paragraphs t))))) diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index 8f0a8c7428..35dc6155b8 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -403,10 +403,14 @@ (define/override (render-blockquote t part ri) (let ([kind (or (blockquote-style t) "quote")]) - (printf "\\begin{~a}" kind) + (if (regexp-match #rx"^[\\]" kind) + (printf "~a{" kind) + (printf "\\begin{~a}" kind)) (parameterize ([current-table-mode (list "blockquote" t)]) (render-flow (make-flow (blockquote-paragraphs t)) part ri #f)) - (printf "\\end{~a}" kind) + (if (regexp-match #rx"^[\\]" kind) + (printf "}") + (printf "\\end{~a}" kind)) null)) (define/override (render-other i part ri) diff --git a/collects/scribble/private/manual-style.ss b/collects/scribble/private/manual-style.ss index d4f0eba918..9f49153f4c 100644 --- a/collects/scribble/private/manual-style.ss +++ b/collects/scribble/private/manual-style.ss @@ -199,10 +199,15 @@ `(part ,(doc-prefix '(lib "scribblings/guide/guide.scrbl") "hash-lang")))) (define (margin-note . c) - (make-styled-paragraph - (list (make-element "refcolumn" - (list (make-element "refcontent" (decode-content c))))) - "refpara")) + (make-blockquote + "\\refpara" + (list + (make-blockquote + "refcolumn" + (list + (make-blockquote + "refcontent" + (flow-paragraphs (decode-flow c)))))))) (define void-const (schemeresultfont "#")) diff --git a/collects/scribble/scribble.css b/collects/scribble/scribble.css index 832ef53ba5..4c7f2b626f 100644 --- a/collects/scribble/scribble.css +++ b/collects/scribble/scribble.css @@ -152,9 +152,16 @@ table td { width: 13em; font-size: 85%; border: 0.5em solid #F5F5DC; + margin: 0 0 0 0; } .refcontent { + margin: 0 0 0 0; +} + +.refcontent p { + margin-top: 0; + margin-bottom: 0; } /* ---------------------------------------- */ diff --git a/collects/scribble/scribble.tex b/collects/scribble/scribble.tex index 9362008f1d..e346c5faed 100644 --- a/collects/scribble/scribble.tex +++ b/collects/scribble/scribble.tex @@ -42,8 +42,6 @@ \newcommand{\schemeopt}[1]{#1} \newcommand{\textsub}[1]{$_{\hbox{\textsmaller{#1}}}$} \newcommand{\textsuper}[1]{$^{\hbox{\textsmaller{#1}}}$} -\newcommand{\refcolumn}[1]{#1} -\newcommand{\refcontent}[1]{#1} \newcommand{\intextcolor}[2]{\textcolor{#1}{#2}} \newcommand{\intextrgbcolor}[2]{\textcolor[rgb]{#1}{#2}} \newcommand{\incolorbox}[2]{{\fboxrule=0pt\fboxsep=0pt\colorbox{#1}{#2}}} @@ -58,9 +56,12 @@ \newcommand{\noborder}[1]{#1} \newcommand{\imageleft}[1]{} % drop it \renewcommand{\smaller}[1]{\textsmaller{#1}} -\newcommand{\refpara}[1]{\marginpar{\raggedright \footnotesize #1}} \newcommand{\planetName}[1]{PLane\hspace{-0.1ex}T} +\newcommand{\refpara}[1]{\marginpar{\raggedright \footnotesize #1}} +\newenvironment{refcolumn}{}{} +\newenvironment{refcontent}{}{} + \newcommand{\titleAndEmptyVersion}[2]{\title{#1}\maketitle} \newcommand{\titleAndVersion}[2]{\title{#1\\{\normalsize Version #2}}\maketitle} diff --git a/collects/scribblings/scribble/config.scrbl b/collects/scribblings/scribble/config.scrbl index a27f064e1f..af22fb0779 100644 --- a/collects/scribblings/scribble/config.scrbl +++ b/collects/scribblings/scribble/config.scrbl @@ -43,12 +43,15 @@ When a string is uses as a style in an @scheme[element], @scheme[styled-paragraph], @scheme[table], @scheme[styled-itemization], or @scheme[blockquote], it corresponds to a CSS class for HTML output or a Tex macro/environment for Latex -output. In Latex output, the string is used as a macro name for a +output. In Latex output, the string is used as a command name for a @scheme[styled-paragraph] and an environment name for a -@scheme[table], @scheme[itemization], or @scheme[blockquote]. In -addition, for an itemization, the style string is suffixed with -@scheme["Item"] and used as a CSS class or Tex macro name to use for -the itemization's items (in place of @tt{item} in the case of Latex). +@scheme[table], @scheme[itemization], or @scheme[blockquote], except +that a @scheme[blockquote] style name that starts with @litchar{\} is +used (sans @litchar{\}) as a command instead of an environment. +In addition, for an itemization, the style string is +suffixed with @scheme["Item"] and used as a CSS class or Tex macro +name to use for the itemization's items (in place of @tt{item} in the +case of Latex). Scribble includes a number of predefined styles that are used by the exports of @scheme[scribble/manual], but they are not generally diff --git a/collects/scribblings/scribble/manual.scrbl b/collects/scribblings/scribble/manual.scrbl index ce2eb65ca3..145649a0aa 100644 --- a/collects/scribblings/scribble/manual.scrbl +++ b/collects/scribblings/scribble/manual.scrbl @@ -1141,7 +1141,7 @@ centered table with the @scheme[pre-flow] parsed by an inset command-line example (e.g., in typewriter font).} @defproc[(margin-note [pre-content any/c] ...) paragraph?]{Produces -a paragraph to be typeset in the margin instead of inlined.} +a @tech{blockquote} to be typeset in the margin instead of inlined.} @; ------------------------------------------------------------------------ @section[#:tag "index-entries"]{Index-Entry Descriptions} diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl index 34b71f2cec..bc0a15666a 100644 --- a/collects/scribblings/scribble/struct.scrbl +++ b/collects/scribblings/scribble/struct.scrbl @@ -476,7 +476,8 @@ The @scheme[style] can be A @techlink{blockquote} has a style and a list of @tech{blocks}. The @scheme[style] field is normally a string that corresponds to a CSS -class for HTML output or Latex environment for Latex output (see +class for HTML output or Latex environment for Latex output where a +leading @litchar{\} in the style name is treated specially (see @secref["extra-style"]). }