diff --git a/collects/scribble/base.ss b/collects/scribble/base.ss index 203ec47b4b..78f058b39e 100644 --- a/collects/scribble/base.ss +++ b/collects/scribble/base.ss @@ -514,7 +514,7 @@ (define (margin-note . c) (make-nested-flow - (make-style "refpara" '(command)) + (make-style "refpara" '(command never-indents)) (list (make-nested-flow (make-style "refcolumn" null) diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index a8e1442dfd..1a64db35af 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -158,9 +158,31 @@ (when use-style? (printf "}"))))) null) + (define/private (no-noindent? p ri) + (if (delayed-block? p) + (no-noindent? (delayed-block-blocks p ri) ri) + (or + (memq 'never-indents + (style-properties + (cond + [(paragraph? p) (paragraph-style p)] + [(compound-paragraph? p) (compound-paragraph-style p)] + [(nested-flow? p) (nested-flow-style p)] + [(table? p) (table-style p)] + [(itemization? p) (itemization-style p)] + [else plain]))) + (and (nested-flow? p) + (pair? (nested-flow-blocks p)) + (no-noindent? (car (nested-flow-blocks p)) ri)) + (and (compound-paragraph? p) + (pair? (compound-paragraph-blocks p)) + (no-noindent? (car (compound-paragraph-blocks p)) ri))))) + (define/override (render-intrapara-block p part ri first? last? starting-item?) (unless first? - (printf "\n\n\\noindent ")) + (printf "\n\n") + (unless (no-noindent? p ri) + (printf "\\noindent "))) (begin0 (super render-intrapara-block p part ri first? last? starting-item?))) diff --git a/collects/scribblings/scribble/core.scrbl b/collects/scribblings/scribble/core.scrbl index cda62c2f9f..a339545f21 100644 --- a/collects/scribblings/scribble/core.scrbl +++ b/collects/scribblings/scribble/core.scrbl @@ -386,6 +386,9 @@ The currently recognized @tech{style properties} are as follows: @item{@scheme[body-id] structure --- For HTML, uses the given string as an @tt{id} attribute of the @tt{

} or @tt{

} tag.} + @item{@scheme['never-indents] --- For Latex and @tech{compound + paragraphs}; see @scheme[compound-paragraph].} + ]} @@ -430,6 +433,9 @@ The following @tech{style properties} are currently recognized: @item{@scheme['aux] --- For HTML, include the table in the table-of-contents display for the enclosing part.} + @item{@scheme['never-indents] --- For Latex and @tech{compound + paragraphs}; see @scheme[compound-paragraph].} + ] For Latex output, a paragraph as a cell value is not automatically @@ -473,6 +479,9 @@ The following @tech{style properties} are currently recognized: @item{@scheme[body-id] structure --- For HTML, uses the given string as an @tt{id} attribute of the @tt{