From 8c55b7b5640e41feaae658e95e659bdd2101a340 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 7 Mar 2017 14:57:11 +0100 Subject: Markdown reader: Treat certain environments as inline when they occur without space surrounding them. E.g. equation, math. This avoids incorrect vertical space around equations. Closes #3309. Closes #2171. See also rstudio/bookdown#358. --- test/command/3309.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/command/3309.md (limited to 'test/command') diff --git a/test/command/3309.md b/test/command/3309.md new file mode 100644 index 000000000..083ac53c9 --- /dev/null +++ b/test/command/3309.md @@ -0,0 +1,52 @@ +Certain environments should be treated as inline unless they +are surrounded by blank lines: + +``` +% pandoc -t latex --wrap=preserve +Lorem ipsum dolor sit amet, + +\begin{equation} +E = mc^2, +\end{equation} + +consectetur adipiscing elit. +^D +Lorem ipsum dolor sit amet, + +\begin{equation} +E = mc^2, +\end{equation} + +consectetur adipiscing elit. +``` + +``` +% pandoc -t latex --wrap=preserve +Lorem ipsum dolor sit amet, +\begin{equation} +E = mc^2, +\end{equation} +consectetur adipiscing elit. +^D +Lorem ipsum dolor sit amet, +\begin{equation} +E = mc^2, +\end{equation} +consectetur adipiscing elit. +``` + +``` +% pandoc -t latex --wrap=preserve +The formula +\begin{math} +x = y +\end{math} +should be inline. +^D +The formula +\begin{math} +x = y +\end{math} +should be inline. +``` + -- cgit v1.2.3