Closes PR12140

This commit is contained in:
Matthias Felleisen 2011-08-30 17:13:58 -04:00
parent c5155b6b75
commit e4039661d4
2 changed files with 19 additions and 32 deletions

View File

@ -42,27 +42,17 @@
(define leftfiguremultiwide-style (make-style "LeftfigureMultiWide" figure-style-extras))
(define (figure tag caption #:style [style centerfigure-style] . content)
(apply figure-helper style tag caption content))
(apply figure-helper figure-style style tag caption content))
(define (figure-here tag caption . content)
(apply figure-helper herefigure-style tag caption content))
(define (figure-helper style tag caption . content)
(apply figure-helper herefigure-style centerfigure-style tag caption content))
(define (figure-helper figure-style content-style tag caption . content)
(make-nested-flow
figure-style
(list
(make-nested-flow
style
(list
(make-nested-flow
figureinside-style
(append
(decode-flow content)
(list)))))
(make-paragraph
centertext-style
(list
(make-element legend-style
(list (Figure-target tag) ": "
caption)))))))
(make-nested-flow content-style (list (make-nested-flow figureinside-style (decode-flow content))))
(make-paragraph centertext-style (list (make-element legend-style (list (Figure-target tag) ": " caption)))))))
(define (*figure style tag caption content)
(make-nested-flow
@ -75,15 +65,12 @@
(list
(make-paragraph
plain
(list
(make-element legend-style
(list (Figure-target tag) ": "
caption))))))))))
(list (make-element legend-style (list (Figure-target tag) ": " caption))))))))))
(define (figure* tag caption #:style [style centerfiguremulti-style] . content)
(*figure style tag caption content))
(define (figure** tag caption #:style [style centerfiguremultiwide-style] . content)
(*figure style tag caption content))
(define (figure* tag caption . content)
(*figure centerfiguremulti-style tag caption content))
(define (figure** tag caption . content)
(*figure centerfiguremultiwide-style tag caption content))
(define figures (new-counter "figure"))
(define (Figure-target tag)

View File

@ -11,14 +11,14 @@
\newenvironment{Figure}{\begin{figure}}{\end{figure}}
\newenvironment{CenterfigureMulti}{\begin{center}}{\end{center}}
\newenvironment{CenterfigureMultiWide}{\begin{CenterfigureMulti}}{\end{CenterfigureMulti}}
\newenvironment{Centerfigure}{\begin{center}}{\end{center}}
\newenvironment{Herefigure}{\begin{center}}{\end{center}}
\newenvironment{FigureInside}{\begin{list}{}{\leftmargin=0pt\topsep=0pt\parsep=\FigOrigskip\partopsep=0pt}\item}{\end{list}}
\def\Centertext#1{\begin{center}#1\end{center}}
\newenvironment{LeftfigureMulti}{\begin{center}[t!p]}{\end{center}}
\newenvironment{LeftfigureMultiWide}{\begin{leftfigureMulti}}{\end{leftfigureMulti}}
\newenvironment{Leftfigure}{\begin{flushleft}}{\end{flushleft}}
\def\Centertext#1{\def\Centertext#1{\begin{center}#1\end{center}}}
\newenvironment{CenterfigureMulti}{\begin{figure*}[t!p]\centering}{\end{figure*}}
\newenvironment{CenterfigureMultiWide}{\begin{CenterfigureMulti}}{\end{CenterfigureMulti}}
\newenvironment{Herefigure}{\begin{figure}[ht!p]\centering}{\end{figure}}
\newenvironment{FigureInside}{\begin{list}{}{\leftmargin=0pt\topsep=0pt\parsep=\FigOrigskip\partopsep=0pt}\item}{\end{list}}