git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: Modified to use Pretty.
99a58e5John MacFarlane
src/Text/Pandoc/Writers/LaTeX.hs+30−34
@@ -1,3 +1,4 @@
1+{-# LANGUAGE OverloadedStrings #-}
1{-
2{-
2Copyright (C) 2006-2010 John MacFarlane <jgm@berkeley.edu>
3Copyright (C) 2006-2010 John MacFarlane <jgm@berkeley.edu>
3
4
@@ -32,10 +33,10 @@ import Text.Pandoc.Definition
32import Text.Pandoc.Shared
33import Text.Pandoc.Shared
33import Text.Pandoc.Templates
34import Text.Pandoc.Templates
34import Text.Printf ( printf )
35import Text.Printf ( printf )
35−import Data.List ( (\\), isSuffixOf, isPrefixOf, intersperse, intercalate )
36+import Data.List ( (\\), isSuffixOf, isPrefixOf, intercalate )
36import Data.Char ( toLower, isPunctuation )
37import Data.Char ( toLower, isPunctuation )
37import Control.Monad.State
38import Control.Monad.State
38−import Text.PrettyPrint.HughesPJ hiding ( Str )
39+import Text.Pandoc.Pretty
39import System.FilePath (dropExtension)
40import System.FilePath (dropExtension)
40
41
41data WriterState =
42data WriterState =
@@ -71,17 +72,21 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
71 "{report}" `isSuffixOf` x)
72 "{report}" `isSuffixOf` x)
72 when (any usesBookClass (lines template)) $
73 when (any usesBookClass (lines template)) $
73 modify $ \s -> s{stBook = True}
74 modify $ \s -> s{stBook = True}
75+ opts <- liftM stOptions get
76+ let colwidth = if writerWrapText opts
77+ then Just $ writerColumns opts
78+ else Nothing
74− titletext <- liftM render $ inlineListToLaTeX title
79+ titletext <- liftM (render colwidth) $ inlineListToLaTeX title
75− authorsText <- mapM (liftM render . inlineListToLaTeX) authors
80+ authorsText <- mapM (liftM (render colwidth) . inlineListToLaTeX) authors
76− dateText <- liftM render $ inlineListToLaTeX date
81+ dateText <- liftM (render colwidth) $ inlineListToLaTeX date
77 let (blocks', lastHeader) = if writerCiteMethod options == Citeproc then
82 let (blocks', lastHeader) = if writerCiteMethod options == Citeproc then
78 (blocks, [])
83 (blocks, [])
79 else case last blocks of
84 else case last blocks of
80 Header 1 il -> (init blocks, il)
85 Header 1 il -> (init blocks, il)
81 _ -> (blocks, [])
86 _ -> (blocks, [])
82 body <- blockListToLaTeX blocks'
87 body <- blockListToLaTeX blocks'
83− biblioTitle <- liftM render $ inlineListToLaTeX lastHeader
88+ biblioTitle <- liftM (render colwidth) $ inlineListToLaTeX lastHeader
84− let main = render body
89+ let main = render colwidth body
85 st <- get
90 st <- get
86 let biblioFiles = intercalate "," $ map dropExtension $ writerBiblioFiles options
91 let biblioFiles = intercalate "," $ map dropExtension $ writerBiblioFiles options
87 citecontext = case writerCiteMethod options of
92 citecontext = case writerCiteMethod options of
@@ -152,20 +157,15 @@ deVerb (other:rest) = other:(deVerb rest)
152blockToLaTeX :: Block -- ^ Block to convert
157blockToLaTeX :: Block -- ^ Block to convert
153 -> State WriterState Doc
158 -> State WriterState Doc
154blockToLaTeX Null = return empty
159blockToLaTeX Null = return empty
155−blockToLaTeX (Plain lst) = do
160+blockToLaTeX (Plain lst) = inlineListToLaTeX lst
156− st <- get
157− let opts = stOptions st
158− wrapTeXIfNeeded opts True inlineListToLaTeX lst
159blockToLaTeX (Para [Image txt (src,tit)]) = do
161blockToLaTeX (Para [Image txt (src,tit)]) = do
160 capt <- inlineListToLaTeX txt
162 capt <- inlineListToLaTeX txt
161 img <- inlineToLaTeX (Image txt (src,tit))
163 img <- inlineToLaTeX (Image txt (src,tit))
162 return $ text "\\begin{figure}[htb]" $$ text "\\centering" $$ img $$
164 return $ text "\\begin{figure}[htb]" $$ text "\\centering" $$ img $$
163− (text "\\caption{" <> capt <> char '}') $$ text "\\end{figure}\n"
165+ (text "\\caption{" <> capt <> char '}') $$ text "\\end{figure}" $$ blankline
164blockToLaTeX (Para lst) = do
166blockToLaTeX (Para lst) = do
165− st <- get
166− let opts = stOptions st
167− result <- wrapTeXIfNeeded opts True inlineListToLaTeX lst
167+ result <- inlineListToLaTeX lst
168− return $ result <> char '\n'
168+ return $ result <> blankline
169blockToLaTeX (BlockQuote lst) = do
169blockToLaTeX (BlockQuote lst) = do
170 contents <- blockListToLaTeX lst
170 contents <- blockListToLaTeX lst
171 return $ text "\\begin{quote}" $$ contents $$ text "\\end{quote}"
171 return $ text "\\begin{quote}" $$ contents $$ text "\\end{quote}"
@@ -181,8 +181,8 @@ blockToLaTeX (CodeBlock (_,classes,_) str) = do
181 modify $ \s -> s{ stVerbInNote = True }
181 modify $ \s -> s{ stVerbInNote = True }
182 return "Verbatim"
182 return "Verbatim"
183 else return "verbatim"
183 else return "verbatim"
184− return $ text ("\\begin{" ++ env ++ "}\n") <> text str <>
184+ return $ "\\begin{" <> text env <> "}" $$ flush (text str) $$
185− text ("\n\\end{" ++ env ++ "}")
185+ "\\end{" <> text env <> "}" $$ cr -- final cr needed because of footnotes
186blockToLaTeX (RawHtml _) = return empty
186blockToLaTeX (RawHtml _) = return empty
187blockToLaTeX (BulletList lst) = do
187blockToLaTeX (BulletList lst) = do
188 items <- mapM listItemToLaTeX lst
188 items <- mapM listItemToLaTeX lst
@@ -211,8 +211,8 @@ blockToLaTeX (DefinitionList lst) = do
211 items <- mapM defListItemToLaTeX lst
211 items <- mapM defListItemToLaTeX lst
212 return $ text "\\begin{description}" $$ vcat items $$
212 return $ text "\\begin{description}" $$ vcat items $$
213 text "\\end{description}"
213 text "\\end{description}"
214−blockToLaTeX HorizontalRule = return $ text $
214+blockToLaTeX HorizontalRule = return $
215− "\\begin{center}\\rule{3in}{0.4pt}\\end{center}\n"
215+ "\\begin{center}\\rule{3in}{0.4pt}\\end{center}" $$ blankline
216blockToLaTeX (Header level lst) = do
216blockToLaTeX (Header level lst) = do
217 let lst' = deVerb lst
217 let lst' = deVerb lst
218 txt <- inlineListToLaTeX lst'
218 txt <- inlineListToLaTeX lst'
@@ -229,7 +229,7 @@ blockToLaTeX (Header level lst) = do
229 let stuffing = optional <> char '{' <> txt <> char '}'
229 let stuffing = optional <> char '{' <> txt <> char '}'
230 book <- liftM stBook get
230 book <- liftM stBook get
231 let level' = if book then level - 1 else level
231 let level' = if book then level - 1 else level
232− let headerWith x y = text x <> y <> char '\n'
232+ let headerWith x y = text x <> y $$ blankline
233 return $ case level' of
233 return $ case level' of
234 0 -> headerWith "\\chapter" stuffing
234 0 -> headerWith "\\chapter" stuffing
235 1 -> headerWith "\\section" stuffing
235 1 -> headerWith "\\section" stuffing
@@ -237,7 +237,7 @@ blockToLaTeX (Header level lst) = do
237 3 -> headerWith "\\subsubsection" stuffing
237 3 -> headerWith "\\subsubsection" stuffing
238 4 -> headerWith "\\paragraph" stuffing
238 4 -> headerWith "\\paragraph" stuffing
239 5 -> headerWith "\\subparagraph" stuffing
239 5 -> headerWith "\\subparagraph" stuffing
240− _ -> txt <> char '\n'
240+ _ -> txt $$ blankline
241blockToLaTeX (Table caption aligns widths heads rows) = do
241blockToLaTeX (Table caption aligns widths heads rows) = do
242 headers <- if all null heads
242 headers <- if all null heads
243 then return empty
243 then return empty
@@ -246,13 +246,13 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
246 rows' <- mapM tableRowToLaTeX rows
246 rows' <- mapM tableRowToLaTeX rows
247 let colDescriptors = concat $ zipWith toColDescriptor widths aligns
247 let colDescriptors = concat $ zipWith toColDescriptor widths aligns
248 let tableBody = text ("\\begin{tabular}{" ++ colDescriptors ++ "}") $$
248 let tableBody = text ("\\begin{tabular}{" ++ colDescriptors ++ "}") $$
249− headers $$ vcat rows' $$ text "\\end{tabular}"
249+ headers $$ vcat rows' $$ text "\\end{tabular}"
250 let centered txt = text "\\begin{center}" $$ txt $$ text "\\end{center}"
250 let centered txt = text "\\begin{center}" $$ txt $$ text "\\end{center}"
251 modify $ \s -> s{ stTable = True }
251 modify $ \s -> s{ stTable = True }
252 return $ if isEmpty captionText
252 return $ if isEmpty captionText
253− then centered tableBody <> char '\n'
253+ then centered tableBody $$ blankline
254− else text "\\begin{table}[h]" $$ centered tableBody $$
254+ else text "\\begin{table}[h]" $$ centered tableBody $$
255− inCmd "caption" captionText $$ text "\\end{table}\n"
255+ inCmd "caption" captionText $$ text "\\end{table}" $$ blankline
256
256
257toColDescriptor :: Double -> Alignment -> String
257toColDescriptor :: Double -> Alignment -> String
258toColDescriptor 0 align =
258toColDescriptor 0 align =
@@ -285,7 +285,7 @@ listItemToLaTeX lst = blockListToLaTeX lst >>= return . (text "\\item" $$) .
285defListItemToLaTeX :: ([Inline], [[Block]]) -> State WriterState Doc
285defListItemToLaTeX :: ([Inline], [[Block]]) -> State WriterState Doc
286defListItemToLaTeX (term, defs) = do
286defListItemToLaTeX (term, defs) = do
287 term' <- inlineListToLaTeX $ deVerb term
287 term' <- inlineListToLaTeX $ deVerb term
288− def' <- liftM (vcat . intersperse (text "")) $ mapM blockListToLaTeX defs
288+ def' <- liftM vsep $ mapM blockListToLaTeX defs
289 return $ text "\\item[" <> term' <> text "]" $$ def'
289 return $ text "\\item[" <> term' <> text "]" $$ def'
290
290
291-- | Convert list of inline elements to LaTeX.
291-- | Convert list of inline elements to LaTeX.
@@ -360,7 +360,7 @@ inlineToLaTeX (Math DisplayMath str) = return $ text "\\[" <> text str <> text "
360inlineToLaTeX (TeX str) = return $ text str
360inlineToLaTeX (TeX str) = return $ text str
361inlineToLaTeX (HtmlInline _) = return empty
361inlineToLaTeX (HtmlInline _) = return empty
362inlineToLaTeX (LineBreak) = return $ text "\\\\"
362inlineToLaTeX (LineBreak) = return $ text "\\\\"
363−inlineToLaTeX Space = return $ char ' '
363+inlineToLaTeX Space = return space
364inlineToLaTeX (Link txt (src, _)) =
364inlineToLaTeX (Link txt (src, _)) =
365 case txt of
365 case txt of
366 [Code x] | x == src -> -- autolink
366 [Code x] | x == src -> -- autolink
@@ -373,15 +373,11 @@ inlineToLaTeX (Image _ (source, _)) = do
373 modify $ \s -> s{ stGraphics = True }
373 modify $ \s -> s{ stGraphics = True }
374 return $ text $ "\\includegraphics{" ++ source ++ "}"
374 return $ text $ "\\includegraphics{" ++ source ++ "}"
375inlineToLaTeX (Note contents) = do
375inlineToLaTeX (Note contents) = do
376− st <- get
377− put (st {stInNote = True})
376+ modify (\s -> s{stInNote = True})
378 contents' <- blockListToLaTeX contents
377 contents' <- blockListToLaTeX contents
379 modify (\s -> s {stInNote = False})
378 modify (\s -> s {stInNote = False})
380− let rawnote = stripTrailingNewlines $ render contents'
381 -- note: a \n before } is needed when note ends with a Verbatim environment
379 -- note: a \n before } is needed when note ends with a Verbatim environment
382− let optNewline = "\\end{Verbatim}" `isSuffixOf` rawnote
383− return $ text "\\footnote{" <>
380+ return $ text "\\footnote{" <> nest 2 contents' <> char '}'
384− text rawnote <> (if optNewline then char '\n' else empty) <> char '}'
385
381
386
382
387citationsToNatbib :: [Citation] -> State WriterState Doc
383citationsToNatbib :: [Citation] -> State WriterState Doc
tests/writer.latex+35−72
@@ -36,8 +36,8 @@
36\begin{document}
36\begin{document}
37\maketitle
37\maketitle
38
38
39−This is a set of tests for pandoc. Most of them are adapted from
39+This is a set of tests for pandoc. Most of them are adapted from John Gruber's
40−John Gruber's markdown test suite.
40+markdown test suite.
41
41
42\begin{center}\rule{3in}{0.4pt}\end{center}
42\begin{center}\rule{3in}{0.4pt}\end{center}
43
43
@@ -69,9 +69,9 @@ with no blank line
69
69
70Here's a regular paragraph.
70Here's a regular paragraph.
71
71
72−In Markdown 1.0.0 and earlier. Version 8. This line turns into a
72+In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
73−list item. Because a hard-wrapped line in the middle of a paragraph
73+Because a hard-wrapped line in the middle of a paragraph looked like a list
74−looked like a list item.
74+item.
75
75
76Here's one with a bullet. * criminey.
76Here's one with a bullet. * criminey.
77
77
@@ -161,13 +161,10 @@ Asterisks loose:
161\begin{itemize}
161\begin{itemize}
162\item
162\item
163 asterisk 1
163 asterisk 1
164−
165\item
164\item
166 asterisk 2
165 asterisk 2
167−
168\item
166\item
169 asterisk 3
167 asterisk 3
170−
171\end{itemize}
168\end{itemize}
172Pluses tight:
169Pluses tight:
173
170
@@ -184,13 +181,10 @@ Pluses loose:
184\begin{itemize}
181\begin{itemize}
185\item
182\item
186 Plus 1
183 Plus 1
187−
188\item
184\item
189 Plus 2
185 Plus 2
190−
191\item
186\item
192 Plus 3
187 Plus 3
193−
194\end{itemize}
188\end{itemize}
195Minuses tight:
189Minuses tight:
196
190
@@ -207,13 +201,10 @@ Minuses loose:
207\begin{itemize}
201\begin{itemize}
208\item
202\item
209 Minus 1
203 Minus 1
210−
211\item
204\item
212 Minus 2
205 Minus 2
213−
214\item
206\item
215 Minus 3
207 Minus 3
216−
217\end{itemize}
208\end{itemize}
218\subsection{Ordered}
209\subsection{Ordered}
219
210
@@ -242,26 +233,20 @@ Loose using tabs:
242\begin{enumerate}[1.]
233\begin{enumerate}[1.]
243\item
234\item
244 First
235 First
245−
246\item
236\item
247 Second
237 Second
248−
249\item
238\item
250 Third
239 Third
251−
252\end{enumerate}
240\end{enumerate}
253and using spaces:
241and using spaces:
254
242
255\begin{enumerate}[1.]
243\begin{enumerate}[1.]
256\item
244\item
257 One
245 One
258−
259\item
246\item
260 Two
247 Two
261−
262\item
248\item
263 Three
249 Three
264−
265\end{enumerate}
250\end{enumerate}
266Multiple paragraphs:
251Multiple paragraphs:
267
252
@@ -269,15 +254,11 @@ Multiple paragraphs:
269\item
254\item
270 Item 1, graf one.
255 Item 1, graf one.
271
256
272− Item 1. graf two. The quick brown fox jumped over the lazy dog's
257+ Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
273− back.
274−
275\item
258\item
276 Item 2.
259 Item 2.
277−
278\item
260\item
279 Item 3.
261 Item 3.
280−
281\end{enumerate}
262\end{enumerate}
282\subsection{Nested}
263\subsection{Nested}
283
264
@@ -316,7 +297,6 @@ Same thing but with paragraphs:
316\begin{enumerate}[1.]
297\begin{enumerate}[1.]
317\item
298\item
318 First
299 First
319−
320\item
300\item
321 Second:
301 Second:
322
302
@@ -330,24 +310,20 @@ Same thing but with paragraphs:
330 \end{itemize}
310 \end{itemize}
331\item
311\item
332 Third
312 Third
333−
334\end{enumerate}
313\end{enumerate}
335\subsection{Tabs and spaces}
314\subsection{Tabs and spaces}
336
315
337\begin{itemize}
316\begin{itemize}
338\item
317\item
339 this is a list item indented with tabs
318 this is a list item indented with tabs
340−
341\item
319\item
342 this is a list item indented with spaces
320 this is a list item indented with spaces
343
321
344 \begin{itemize}
322 \begin{itemize}
345 \item
323 \item
346 this is an example list item indented with tabs
324 this is an example list item indented with tabs
347−
348 \item
325 \item
349 this is an example list item indented with spaces
326 this is an example list item indented with spaces
350−
351 \end{itemize}
327 \end{itemize}
352\end{itemize}
328\end{itemize}
353\subsection{Fancy list markers}
329\subsection{Fancy list markers}
@@ -487,13 +463,11 @@ Multiple definitions, loose:
487\item[apple]
463\item[apple]
488red fruit
464red fruit
489
465
490−
491computer
466computer
492
467
493\item[orange]
468\item[orange]
494orange fruit
469orange fruit
495
470
496−
497bank
471bank
498
472
499\end{description}
473\end{description}
@@ -503,7 +477,6 @@ Blank line after term, indented marker, alternate markers:
503\item[apple]
477\item[apple]
504red fruit
478red fruit
505
479
506−
507computer
480computer
508
481
509\item[orange]
482\item[orange]
@@ -583,20 +556,17 @@ So is \textbf{\emph{this}} word.
583
556
584So is \textbf{\emph{this}} word.
557So is \textbf{\emph{this}} word.
585
558
586−This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
559+This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!, \verb!<html>!.
587−\verb!<html>!.
588
560
589\sout{This is \emph{strikeout}.}
561\sout{This is \emph{strikeout}.}
590
562
591−Superscripts: a\textsuperscript{bc}d
563+Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}}
592−a\textsuperscript{\emph{hello}} a\textsuperscript{hello~there}.
564+a\textsuperscript{hello~there}.
593
565
594−Subscripts: H\textsubscr{2}O, H\textsubscr{23}O,
566+Subscripts: H\textsubscr{2}O, H\textsubscr{23}O, H\textsubscr{many~of~them}O.
595−H\textsubscr{many~of~them}O.
596
567
597−These should not be superscripts or subscripts, because of the
568+These should not be superscripts or subscripts, because of the unescaped
598−unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b
569+spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b c\ensuremath{\sim}d.
599−c\ensuremath{\sim}d.
600
570
601\begin{center}\rule{3in}{0.4pt}\end{center}
571\begin{center}\rule{3in}{0.4pt}\end{center}
602
572
@@ -640,8 +610,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
640 Here's some display math:
610 Here's some display math:
641 \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
611 \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
642\item
612\item
643− Here's one that has a line break in it:
613+ Here's one that has a line break in it: $\alpha + \omega \times x^2$.
644− $\alpha + \omega \times x^2$.
645\end{itemize}
614\end{itemize}
646These shouldn't be math:
615These shouldn't be math:
647
616
@@ -649,8 +618,8 @@ These shouldn't be math:
649\item
618\item
650 To get the famous equation, write \verb!$e = mc^2$!.
619 To get the famous equation, write \verb!$e = mc^2$!.
651\item
620\item
652− \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if
621+ \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is
653− ``lot'' is emphasized.)
622+ emphasized.)
654\item
623\item
655 Shoes (\$20) and socks (\$5).
624 Shoes (\$20) and socks (\$5).
656\item
625\item
@@ -777,16 +746,15 @@ Foo \href{/url/}{biz}.
777
746
778\subsection{With ampersands}
747\subsection{With ampersands}
779
748
780−Here's a
781−\href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
749+Here's a \href{http://example.com/?foo=1&bar=2}{link with an ampersand in the
750+URL}.
782
751
783Here's a link with an amersand in the link text:
752Here's a link with an amersand in the link text:
784\href{http://att.com/}{AT\&T}.
753\href{http://att.com/}{AT\&T}.
785
754
786Here's an \href{/script?foo=1&bar=2}{inline link}.
755Here's an \href{/script?foo=1&bar=2}{inline link}.
787
756
788−Here's an
789−\href{/script?foo=1&bar=2}{inline link in pointy braces}.
757+Here's an \href{/script?foo=1&bar=2}{inline link in pointy braces}.
790
758
791\subsection{Autolinks}
759\subsection{Autolinks}
792
760
@@ -830,37 +798,32 @@ Here is a movie \includegraphics{movie.jpg} icon.
830
798
831\section{Footnotes}
799\section{Footnotes}
832
800
833−Here is a footnote reference,%
801+Here is a footnote reference,\footnote{Here is the footnote. It can go
834−\footnote{Here is the footnote. It can go anywhere after the footnote
835−reference. It need not be placed at the end of the document.}
802+ anywhere after the footnote reference. It need not be placed at the end of
836−and another.%
837−\footnote{Here's the long note. This one contains multiple blocks.
803+ the document.} and another.\footnote{Here's the long note. This one contains
804+ multiple blocks.
838
805
839−Subsequent blocks are indented to show that they belong to the
806+ Subsequent blocks are indented to show that they belong to the footnote (as
840−footnote (as with list items).
807+ with list items).
841
808
842−\begin{Verbatim}
809+ \begin{Verbatim}
843 { <code> }
810 { <code> }
844−\end{Verbatim}
811+ \end{Verbatim}
845−If you want, you can indent every line, but you can also be lazy
812+ If you want, you can indent every line, but you can also be lazy and just
846−and just indent the first line of each block.}
813+ indent the first line of each block.} This should \emph{not} be a footnote
847−This should \emph{not} be a footnote reference, because it contains
848−a space.{[}\^{}my note{]} Here is an inline note.%
814+reference, because it contains a space.{[}\^{}my note{]} Here is an inline
849−\footnote{This is \emph{easier} to type. Inline notes may contain
815+note.\footnote{This is \emph{easier} to type. Inline notes may contain
850−\href{http://google.com}{links} and \verb!]! verbatim characters,
816+ \href{http://google.com}{links} and \verb!]! verbatim characters, as well as
851−as well as {[}bracketed text{]}.}
817+ {[}bracketed text{]}.}
852
818
853\begin{quote}
819\begin{quote}
854−Notes can go in quotes.%
820+Notes can go in quotes.\footnote{In quote.}
855−\footnote{In quote.}
856
821
857\end{quote}
822\end{quote}
858\begin{enumerate}[1.]
823\begin{enumerate}[1.]
859\item
824\item
860− And in list items.%
825+ And in list items.\footnote{In list.}
861− \footnote{In list.}
862\end{enumerate}
826\end{enumerate}
863−This paragraph should not be part of the note, as it is not
827+This paragraph should not be part of the note, as it is not indented.
864−indented.
865
828
866\end{document}
829\end{document}