From ad9a465ab1f5f9a35055da4c66e510006c27eb7d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 13 Dec 2015 07:40:26 -0700 Subject: [PATCH] Latex: 'inset style renders through a `SInsetFlow` environment --- scribble-doc/scribblings/scribble/config.scrbl | 15 +++++++++++++++ scribble-lib/scribble/latex-render.rkt | 2 +- scribble-lib/scribble/scribble.tex | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/scribble-doc/scribblings/scribble/config.scrbl b/scribble-doc/scribblings/scribble/config.scrbl index f10773d0..2a36d4fb 100644 --- a/scribble-doc/scribblings/scribble/config.scrbl +++ b/scribble-doc/scribblings/scribble/config.scrbl @@ -623,6 +623,21 @@ style: in place of @ltxd[2]{Ssection}, @ltxd[1]{Ssectionstar}, @|etc| for a part with the @racket['grouper] style property.} + @item{@ltxe{SInsetFlow} environment --- for a @racket[nested-flow] + with the @racket['inset] style name.} + + @item{@ltxe{SCodeFlow} environment --- for a @racket[nested-flow] + with the @racket['code-inset] style name.} + + @item{@ltxe{SVInsetFlow} environment --- for a @racket[nested-flow] + with the @racket['vertical-inset] style name.} + + @item{@ltxd[1]{SCodeBox}, @ltxd[1]{SVInsetBox} --- for a + @racket[nested-flow] with the @racket['code-inset] or + @racket['vertical-inset] style name, respectively, and as the + content of a table cell. The content is installed into a TeX + box using @tt{\setbox1}.} + ] @; ------------------------------------------------------------ diff --git a/scribble-lib/scribble/latex-render.rkt b/scribble-lib/scribble/latex-render.rkt index 16fa2672..f3b109aa 100644 --- a/scribble-lib/scribble/latex-render.rkt +++ b/scribble-lib/scribble/latex-render.rkt @@ -849,7 +849,7 @@ [else (error "unexpected style for box mode")]))) (let ([s (style-name (nested-flow-style t))]) (or (and (string? s) s) - (and (eq? s 'inset) "quote") + (and (eq? s 'inset) "SInsetFlow") (and (eq? s 'code-inset) "SCodeFlow") (and (eq? s 'vertical-inset) "SVInsetFlow"))) "Subflow")] diff --git a/scribble-lib/scribble/scribble.tex b/scribble-lib/scribble/scribble.tex index a5d8f774..49fdd0de 100644 --- a/scribble-lib/scribble/scribble.tex +++ b/scribble-lib/scribble/scribble.tex @@ -260,7 +260,8 @@ \listparindent=0pt\itemindent=0pt\labelwidth=0pt\leftmargin=0pt\rightmargin=0pt% \itemsep=0pt}\item}{\end{list}} -% The 'inset nested-flow style uses the `quote' environment +% For the 'inset nested-flow style: +\newenvironment{SInsetFlow}{\begin{quote}}{\end{quote}} % Indent a 'code-inset nested flow: \newcommand{\SCodePreSkip}{\vskip\abovedisplayskip}