git.iko.soy/typeable/pandoc
on master help sign in
ConTeXt writer: Updated to use Text.Pandoc.Pretty.
commit2587543457c915dd5a9714f3c014a44c4b4e887a authorJohn MacFarlane <jgm@berkeley.edu> dateMon 20 Dec 2010, 19:33 (16 years ago) parent112717d
3 files changed+151−162
src/Text/Pandoc/Writers/ConTeXt.hs+71−73 tests/tables.context+1−1 tests/writer.context+79−88
src/Text/Pandoc/Writers/ConTeXt.hs+71−73
@@ -1,3 +1,4 @@
1+{-# LANGUAGE OverloadedStrings #-}
12{-
23Copyright (C) 2007-2010 John MacFarlane <jgm@berkeley.edu>
34
@@ -31,9 +32,9 @@ module Text.Pandoc.Writers.ConTeXt ( writeConTeXt ) where
3132import Text.Pandoc.Definition
3233import Text.Pandoc.Shared
3334import Text.Printf ( printf )
34−import Data.List ( isSuffixOf, intercalate, intersperse )
35+import Data.List ( intercalate )
3536import Control.Monad.State
36−import Text.PrettyPrint.HughesPJ hiding ( Str )
37+import Text.Pandoc.Pretty
3738import Text.Pandoc.Templates ( renderTemplate )
3839
3940data WriterState =
@@ -56,15 +57,18 @@ writeConTeXt options document =
5657
5758pandocToConTeXt :: WriterOptions -> Pandoc -> State WriterState String
5859pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do
60+ let colwidth = if writerWrapText options
61+ then Just $ writerColumns options
62+ else Nothing
5963 titletext <- if null title
6064 then return ""
61− else liftM render $ inlineListToConTeXt title
62− authorstext <- mapM (liftM render . inlineListToConTeXt) authors
65+ else liftM (render colwidth) $ inlineListToConTeXt title
66+ authorstext <- mapM (liftM (render colwidth) . inlineListToConTeXt) authors
6367 datetext <- if null date
6468 then return ""
65− else liftM render $ inlineListToConTeXt date
66− body <- blockListToConTeXt blocks
67− let main = render $ body $$ text ""
69+ else liftM (render colwidth) $ inlineListToConTeXt date
70+ body <- blockListToConTeXt blocks
71+ let main = render colwidth $ body
6872 let context = writerVariables options ++
6973 [ ("toc", if writerTableOfContents options then "yes" else "")
7074 , ("body", main)
@@ -104,32 +108,26 @@ stringToConTeXt = concatMap escapeCharForConTeXt
104108
105109-- | Convert Pandoc block element to ConTeXt.
106110blockToConTeXt :: Block
107− -> State WriterState BlockWrapper
108−blockToConTeXt Null = return $ Reg empty
109−blockToConTeXt (Plain lst) = do
110− st <- get
111− let options = stOptions st
112− contents <- wrapTeXIfNeeded options False inlineListToConTeXt lst
113− return $ Reg contents
111+ -> State WriterState Doc
112+blockToConTeXt Null = return empty
113+blockToConTeXt (Plain lst) = inlineListToConTeXt lst
114114blockToConTeXt (Para [Image txt (src,_)]) = do
115115 capt <- inlineListToConTeXt txt
116− return $ Pad $ text "\\placefigure[here,nonumber]{" <> capt <>
117− text "}{\\externalfigure[" <> text src <> text "]}"
116+ return $ blankline $$ "\\placefigure[here,nonumber]" <> braces capt <>
117+ braces ("\\externalfigure" <> brackets (text src)) <> blankline
118118blockToConTeXt (Para lst) = do
119− st <- get
120− let options = stOptions st
121− contents <- wrapTeXIfNeeded options False inlineListToConTeXt lst
122− return $ Pad contents
119+ contents <- inlineListToConTeXt lst
120+ return $ contents <> blankline
123121blockToConTeXt (BlockQuote lst) = do
124122 contents <- blockListToConTeXt lst
125− return $ Pad $ text "\\startblockquote" $$ contents $$ text "\\stopblockquote"
126−blockToConTeXt (CodeBlock _ str) =
127− return $ Reg $ text $ "\\starttyping\n" ++ str ++ "\n\\stoptyping\n"
128− -- \n because \stoptyping can't have anything after it, inc. }
129−blockToConTeXt (RawHtml _) = return $ Reg empty
130−blockToConTeXt (BulletList lst) = do
123+ return $ "\\startblockquote" $$ nest 0 contents $$ "\\stopblockquote" <> blankline
124+blockToConTeXt (CodeBlock _ str) =
125+ return $ "\\starttyping" <> cr <> flush (text str) <> cr <> "\\stoptyping" <> blankline
126+ -- blankline because \stoptyping can't have anything after it, inc. '}'
127+blockToConTeXt (RawHtml _) = return empty
128+blockToConTeXt (BulletList lst) = do
131129 contents <- mapM listItemToConTeXt lst
132− return $ Pad $ text "\\startitemize" $$ vcat contents $$ text "\\stopitemize"
130+ return $ "\\startitemize" $$ vcat contents $$ text "\\stopitemize" <> blankline
133131blockToConTeXt (OrderedList (start, style', delim) lst) = do
134132 st <- get
135133 let level = stOrderedListLevel st
@@ -161,20 +159,20 @@ blockToConTeXt (OrderedList (start, style', delim) lst) = do
161159 LowerAlpha -> "[a]"
162160 UpperAlpha -> "[A]"
163161 let specs = style'' ++ specs2
164− return $ Pad $ text ("\\startitemize" ++ specs) $$ vcat contents $$
165− text "\\stopitemize"
162+ return $ "\\startitemize" <> text specs $$ vcat contents $$
163+ "\\stopitemize" <> blankline
166164blockToConTeXt (DefinitionList lst) =
167− mapM defListItemToConTeXt lst >>= return . Pad . wrappedBlocksToDoc
168−blockToConTeXt HorizontalRule = return $ Pad $ text "\\thinrule"
165+ liftM vcat $ mapM defListItemToConTeXt lst
166+blockToConTeXt HorizontalRule = return $ "\\thinrule" <> blankline
169167blockToConTeXt (Header level lst) = do
170168 contents <- inlineListToConTeXt lst
171169 st <- get
172170 let opts = stOptions st
173171 let base = if writerNumberSections opts then "section" else "subject"
174− return $ Pad $ if level >= 1 && level <= 5
175− then char '\\' <> text (concat (replicate (level - 1) "sub")) <>
176− text base <> char '{' <> contents <> char '}'
177− else contents
172+ return $ if level >= 1 && level <= 5
173+ then char '\\' <> text (concat (replicate (level - 1) "sub")) <>
174+ text base <> char '{' <> contents <> char '}' <> blankline
175+ else contents <> blankline
178176blockToConTeXt (Table caption aligns widths heads rows) = do
179177 let colDescriptor colWidth alignment = (case alignment of
180178 AlignLeft -> 'l'
@@ -188,80 +186,83 @@ blockToConTeXt (Table caption aligns widths heads rows) = do
188186 zipWith colDescriptor widths aligns)
189187 headers <- if all null heads
190188 then return empty
191− else liftM ($$ text "\\HL") $ tableRowToConTeXt heads
189+ else liftM ($$ "\\HL") $ tableRowToConTeXt heads
192190 captionText <- inlineListToConTeXt caption
193191 let captionText' = if null caption then text "none" else captionText
194192 rows' <- mapM tableRowToConTeXt rows
195− return $ Pad $ text "\\placetable[here]{" <> captionText' <> char '}' $$
196− text "\\starttable[" <> text colDescriptors <> char ']' $$
197− text "\\HL" $$ headers $$
198− vcat rows' $$ text "\\HL\n\\stoptable"
193+ return $ "\\placetable[here]" <> braces captionText' $$
194+ "\\starttable" <> brackets (text colDescriptors) $$
195+ "\\HL" $$ headers $$
196+ vcat rows' $$ "\\HL" $$ "\\stoptable" <> blankline
199197
200198tableRowToConTeXt :: [[Block]] -> State WriterState Doc
201199tableRowToConTeXt cols = do
202200 cols' <- mapM blockListToConTeXt cols
203− return $ (vcat (map (text "\\NC " <>) cols')) $$
204− text "\\NC\\AR"
201+ return $ (vcat (map ("\\NC " <>) cols')) $$ "\\NC\\AR"
205202
206203listItemToConTeXt :: [Block] -> State WriterState Doc
207204listItemToConTeXt list = blockListToConTeXt list >>=
208− return . (text "\\item" $$) . (nest 2)
205+ return . ("\\item" $$) . (nest 2)
209206
210−defListItemToConTeXt :: ([Inline], [[Block]]) -> State WriterState BlockWrapper
207+defListItemToConTeXt :: ([Inline], [[Block]]) -> State WriterState Doc
211208defListItemToConTeXt (term, defs) = do
212209 term' <- inlineListToConTeXt term
213− def' <- liftM (vcat . intersperse (text "")) $ mapM blockListToConTeXt defs
214− return $ Pad $ text "\\startdescr{" <> term' <> char '}' $$ def' $$ text "\\stopdescr"
210+ def' <- liftM vsep $ mapM blockListToConTeXt defs
211+ return $ "\\startdescr" <> braces term' $$ nest 2 def' $$
212+ "\\stopdescr" <> blankline
215213
216214-- | Convert list of block elements to ConTeXt.
217215blockListToConTeXt :: [Block] -> State WriterState Doc
218−blockListToConTeXt lst = mapM blockToConTeXt lst >>= return . wrappedBlocksToDoc
216+blockListToConTeXt lst = liftM vcat $ mapM blockToConTeXt lst
219217
220218-- | Convert list of inline elements to ConTeXt.
221219inlineListToConTeXt :: [Inline] -- ^ Inlines to convert
222220 -> State WriterState Doc
223−inlineListToConTeXt lst = mapM inlineToConTeXt lst >>= return . hcat
221+inlineListToConTeXt lst = liftM hcat $ mapM inlineToConTeXt lst
224222
225223-- | Convert inline element to ConTeXt
226224inlineToConTeXt :: Inline -- ^ Inline to convert
227225 -> State WriterState Doc
228226inlineToConTeXt (Emph lst) = do
229227 contents <- inlineListToConTeXt lst
230− return $ text "{\\em " <> contents <> char '}'
228+ return $ braces $ "\\em " <> contents
231229inlineToConTeXt (Strong lst) = do
232230 contents <- inlineListToConTeXt lst
233− return $ text "{\\bf " <> contents <> char '}'
231+ return $ braces $ "\\bf " <> contents
234232inlineToConTeXt (Strikeout lst) = do
235233 contents <- inlineListToConTeXt lst
236− return $ text "\\overstrikes{" <> contents <> char '}'
234+ return $ "\\overstrikes" <> braces contents
237235inlineToConTeXt (Superscript lst) = do
238236 contents <- inlineListToConTeXt lst
239− return $ text "\\high{" <> contents <> char '}'
237+ return $ "\\high" <> braces contents
240238inlineToConTeXt (Subscript lst) = do
241239 contents <- inlineListToConTeXt lst
242− return $ text "\\low{" <> contents <> char '}'
240+ return $ "\\low" <> braces contents
243241inlineToConTeXt (SmallCaps lst) = do
244242 contents <- inlineListToConTeXt lst
245− return $ text "{\\sc " <> contents <> char '}'
246−inlineToConTeXt (Code str) = return $ text $ "\\type{" ++ str ++ "}"
243+ return $ braces $ "\\sc " <> contents
244+inlineToConTeXt (Code str) =
245+ return $ "\\type" <> braces (text str)
247246inlineToConTeXt (Quoted SingleQuote lst) = do
248247 contents <- inlineListToConTeXt lst
249− return $ text "\\quote{" <> contents <> char '}'
248+ return $ "\\quote" <> braces contents
250249inlineToConTeXt (Quoted DoubleQuote lst) = do
251250 contents <- inlineListToConTeXt lst
252− return $ text "\\quotation{" <> contents <> char '}'
251+ return $ "\\quotation" <> braces contents
253252inlineToConTeXt (Cite _ lst) = inlineListToConTeXt lst
254253inlineToConTeXt Apostrophe = return $ char '\''
255−inlineToConTeXt EmDash = return $ text "---"
256−inlineToConTeXt EnDash = return $ text "--"
257−inlineToConTeXt Ellipses = return $ text "\\ldots{}"
254+inlineToConTeXt EmDash = return "---"
255+inlineToConTeXt EnDash = return "--"
256+inlineToConTeXt Ellipses = return "\\ldots{}"
258257inlineToConTeXt (Str str) = return $ text $ stringToConTeXt str
259−inlineToConTeXt (Math InlineMath str) = return $ char '$' <> text str <> char '$'
260−inlineToConTeXt (Math DisplayMath str) = return $ text "\\startformula " <> text str <> text " \\stopformula"
258+inlineToConTeXt (Math InlineMath str) =
259+ return $ char '$' <> text str <> char '$'
260+inlineToConTeXt (Math DisplayMath str) =
261+ return $ text "\\startformula " <> text str <> text " \\stopformula"
261262inlineToConTeXt (TeX str) = return $ text str
262263inlineToConTeXt (HtmlInline _) = return empty
263−inlineToConTeXt (LineBreak) = return $ text "\\crlf\n"
264−inlineToConTeXt Space = return $ char ' '
264+inlineToConTeXt (LineBreak) = return $ text "\\crlf" <> cr
265+inlineToConTeXt Space = return space
265266inlineToConTeXt (Link [Code str] (src, tit)) = -- since ConTeXt has its own
266267 inlineToConTeXt (Link [Str str] (src, tit)) -- way of printing links...
267268inlineToConTeXt (Link txt (src, _)) = do
@@ -270,15 +271,12 @@ inlineToConTeXt (Link txt (src, _)) = do
270271 put $ st {stNextRef = next + 1}
271272 let ref = show next
272273 label <- inlineListToConTeXt txt
273− return $ text "\\useURL[" <> text ref <> text "][" <> text src <>
274− text "][][" <> label <> text "]\\from[" <> text ref <> char ']'
274+ return $ "\\useURL" <> brackets (text ref) <> brackets (text src) <>
275+ brackets empty <> brackets label <>
276+ "\\from" <> brackets (text ref)
275277inlineToConTeXt (Image _ (src, _)) = do
276− return $ text "{\\externalfigure[" <> text src <> text "]}"
278+ return $ braces $ "\\externalfigure" <> brackets (text src)
277279inlineToConTeXt (Note contents) = do
278280 contents' <- blockListToConTeXt contents
279− let rawnote = stripTrailingNewlines $ render contents'
280− -- note: a \n before } is needed when note ends with a \stoptyping
281− let optNewline = "\\stoptyping" `isSuffixOf` rawnote
282− return $ text "\\footnote{" <>
283− text rawnote <> (if optNewline then char '\n' else empty) <> char '}'
284−
281+ return $ text "\\footnote{" <>
282+ nest 2 contents' <> char '}' <> cr
tests/tables.context+1−1
@@ -172,4 +172,4 @@ Multiline table without column headers:
172172\NC Here's another one. Note the blank line between rows.
173173\NC\AR
174174\HL
175−\stoptable
175+\stoptable
tests/writer.context+79−88
@@ -61,8 +61,8 @@ after={\blank[medium]},
6161 \blank[3*medium]
6262\stopalignment
6363
64−This is a set of tests for pandoc. Most of them are adapted from
65−John Gruber's markdown test suite.
64+This is a set of tests for pandoc. Most of them are adapted from John Gruber's
65+markdown test suite.
6666
6767\thinrule
6868
@@ -94,9 +94,9 @@ with no blank line
9494
9595Here's a regular paragraph.
9696
97−In Markdown 1.0.0 and earlier. Version 8. This line turns into a
98−list item. Because a hard-wrapped line in the middle of a paragraph
99−looked like a list item.
97+In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
98+Because a hard-wrapped line in the middle of a paragraph looked like a list
99+item.
100100
101101Here's one with a bullet. * criminey.
102102
@@ -293,9 +293,8 @@ Multiple paragraphs:
293293\startitemize[n][stopper=.]
294294\item
295295 Item 1, graf one.
296−
297− Item 1. graf two. The quick brown fox jumped over the lazy dog's
298− back.
296+
297+ Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
299298\item
300299 Item 2.
301300\item
@@ -343,7 +342,7 @@ Same thing but with paragraphs:
343342 First
344343\item
345344 Second:
346−
345+
347346 \startitemize
348347 \item
349348 Fee
@@ -363,7 +362,7 @@ Same thing but with paragraphs:
363362 this is a list item indented with tabs
364363\item
365364 this is a list item indented with spaces
366−
365+
367366 \startitemize
368367 \item
369368 this is an example list item indented with tabs
@@ -379,9 +378,9 @@ Same thing but with paragraphs:
379378 begins with 2
380379\item
381380 and now 3
382−
381+
383382 with a continuation
384−
383+
385384 \startitemize[r][start=4,stopper=.,width=2.0em]
386385 \item
387386 sublist with roman numerals, starting with 4
@@ -441,110 +440,110 @@ B. Williams
441440Tight using spaces:
442441
443442\startdescr{apple}
444−red fruit
443+ red fruit
445444\stopdescr
446445
447446\startdescr{orange}
448−orange fruit
447+ orange fruit
449448\stopdescr
450449
451450\startdescr{banana}
452−yellow fruit
451+ yellow fruit
453452\stopdescr
454453
455454Tight using tabs:
456455
457456\startdescr{apple}
458−red fruit
457+ red fruit
459458\stopdescr
460459
461460\startdescr{orange}
462−orange fruit
461+ orange fruit
463462\stopdescr
464463
465464\startdescr{banana}
466−yellow fruit
465+ yellow fruit
467466\stopdescr
468467
469468Loose:
470469
471470\startdescr{apple}
472−red fruit
471+ red fruit
473472\stopdescr
474473
475474\startdescr{orange}
476−orange fruit
475+ orange fruit
477476\stopdescr
478477
479478\startdescr{banana}
480−yellow fruit
479+ yellow fruit
481480\stopdescr
482481
483482Multiple blocks with italics:
484483
485484\startdescr{{\em apple}}
486−red fruit
485+ red fruit
487486
488−contains seeds, crisp, pleasant to taste
487+ contains seeds, crisp, pleasant to taste
489488\stopdescr
490489
491490\startdescr{{\em orange}}
492−orange fruit
491+ orange fruit
493492
494−\starttyping
493+ \starttyping
495494{ orange code block }
496−\stoptyping
495+ \stoptyping
497496
498−\startblockquote
499−orange block quote
500−\stopblockquote
497+ \startblockquote
498+ orange block quote
499+ \stopblockquote
501500\stopdescr
502501
503502Multiple definitions, tight:
504503
505504\startdescr{apple}
506−red fruit
505+ red fruit
507506
508−computer
507+ computer
509508\stopdescr
510509
511510\startdescr{orange}
512−orange fruit
511+ orange fruit
513512
514−bank
513+ bank
515514\stopdescr
516515
517516Multiple definitions, loose:
518517
519518\startdescr{apple}
520−red fruit
519+ red fruit
521520
522−computer
521+ computer
523522\stopdescr
524523
525524\startdescr{orange}
526−orange fruit
525+ orange fruit
527526
528−bank
527+ bank
529528\stopdescr
530529
531530Blank line after term, indented marker, alternate markers:
532531
533532\startdescr{apple}
534−red fruit
533+ red fruit
535534
536−computer
535+ computer
537536\stopdescr
538537
539538\startdescr{orange}
540−orange fruit
539+ orange fruit
541540
542−\startitemize[n][stopper=.]
543−\item
544− sublist
545−\item
546− sublist
547−\stopitemize
541+ \startitemize[n][stopper=.]
542+ \item
543+ sublist
544+ \item
545+ sublist
546+ \stopitemize
548547\stopdescr
549548
550549\subject{HTML Blocks}
@@ -618,8 +617,7 @@ So is {\bf {\em this}} word.
618617
619618So is {\bf {\em this}} word.
620619
621−This is code: \type{>}, \type{$}, \type{\}, \type{\$},
622−\type{<html>}.
620+This is code: \type{>}, \type{$}, \type{\}, \type{\$}, \type{<html>}.
623621
624622\overstrikes{This is {\em strikeout}.}
625623
@@ -627,27 +625,25 @@ Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello~there}.
627625
628626Subscripts: H\low{2}O, H\low{23}O, H\low{many~of~them}O.
629627
630−These should not be superscripts or subscripts, because of the
631−unescaped spaces: a\letterhat{}b c\letterhat{}d, a\lettertilde{}b
632−c\lettertilde{}d.
628+These should not be superscripts or subscripts, because of the unescaped
629+spaces: a\letterhat{}b c\letterhat{}d, a\lettertilde{}b c\lettertilde{}d.
633630
634631\thinrule
635632
636633\subject{Smart quotes, ellipses, dashes}
637634
638−\quotation{Hello,} said the spider.
639−\quotation{\quote{Shelob} is my name.}
635+\quotation{Hello,} said the spider. \quotation{\quote{Shelob} is my name.}
640636
641637\quote{A}, \quote{B}, and \quote{C} are letters.
642638
643−\quote{Oak,} \quote{elm,} and \quote{beech} are names of trees. So
644−is \quote{pine.}
639+\quote{Oak,} \quote{elm,} and \quote{beech} are names of trees. So is
640+\quote{pine.}
645641
646−\quote{He said, \quotation{I want to go.}} Were you alive in the
647−70's?
642+\quote{He said, \quotation{I want to go.}} Were you alive in the 70's?
648643
649644Here is some quoted \quote{\type{code}} and a
650−\quotation{\useURL[3][http://example.com/?foo=1&bar=2][][quoted link]\from[3]}.
645+\quotation{\useURL[3][http://example.com/?foo=1&bar=2][][quoted
646+link]\from[3]}.
651647
652648Some dashes: one---two --- three---four --- five.
653649
@@ -676,8 +672,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
676672 Here's some display math:
677673 \startformula \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} \stopformula
678674\item
679− Here's one that has a line break in it:
680− $\alpha + \omega \times x^2$.
675+ Here's one that has a line break in it: $\alpha + \omega \times x^2$.
681676\stopitemize
682677
683678These shouldn't be math:
@@ -817,16 +812,16 @@ Foo \useURL[22][/url/][][biz]\from[22].
817812
818813\subsubject{With ampersands}
819814
820−Here's a
821−\useURL[23][http://example.com/?foo=1&bar=2][][link with an ampersand in the URL]\from[23].
815+Here's a \useURL[23][http://example.com/?foo=1&bar=2][][link with an ampersand
816+in the URL]\from[23].
822817
823818Here's a link with an amersand in the link text:
824819\useURL[24][http://att.com/][][AT\&T]\from[24].
825820
826821Here's an \useURL[25][/script?foo=1&bar=2][][inline link]\from[25].
827822
828−Here's an
829−\useURL[26][/script?foo=1&bar=2][][inline link in pointy braces]\from[26].
823+Here's an \useURL[26][/script?foo=1&bar=2][][inline link in pointy
824+braces]\from[26].
830825
831826\subsubject{Autolinks}
832827
@@ -846,8 +841,7 @@ An e-mail address:
846841\useURL[29][mailto:nobody@nowhere.net][][nobody@nowhere.net]\from[29]
847842
848843\startblockquote
849−Blockquoted:
850−\useURL[30][http://example.com/][][http://example.com/]\from[30]
844+Blockquoted: \useURL[30][http://example.com/][][http://example.com/]\from[30]
851845\stopblockquote
852846
853847Auto-links should not occur here: \type{<http://example.com/>}
@@ -870,39 +864,36 @@ Here is a movie {\externalfigure[movie.jpg]} icon.
870864
871865\subject{Footnotes}
872866
873−Here is a footnote reference,
874−\footnote{Here is the footnote. It can go anywhere after the footnote
875−reference. It need not be placed at the end of the document.}
876−and another.
877−\footnote{Here's the long note. This one contains multiple blocks.
867+Here is a footnote reference,\footnote{Here is the footnote. It can go
868+ anywhere after the footnote reference. It need not be placed at the end of
869+ the document.}
870+ and another.\footnote{Here's the long note. This one contains multiple
871+ blocks.
878872
879−Subsequent blocks are indented to show that they belong to the
880−footnote (as with list items).
873+ Subsequent blocks are indented to show that they belong to the footnote (as
874+ with list items).
881875
882−\starttyping
876+ \starttyping
883877 { <code> }
884−\stoptyping
878+ \stoptyping
885879
886−If you want, you can indent every line, but you can also be lazy
887−and just indent the first line of each block.}
888−This should {\em not} be a footnote reference, because it contains
889−a space.{[}\letterhat{}my note{]} Here is an inline note.
890−\footnote{This is {\em easier} to type. Inline notes may contain
891−\useURL[31][http://google.com][][links]\from[31] and \type{]}
892−verbatim characters, as well as {[}bracketed text{]}.}
880+ If you want, you can indent every line, but you can also be lazy and just
881+ indent the first line of each block.}
882+ This should {\em not} be a footnote reference, because it contains a
883+space.{[}\letterhat{}my note{]} Here is an inline note.\footnote{This is
884+ {\em easier} to type. Inline notes may contain
885+ \useURL[31][http://google.com][][links]\from[31] and \type{]} verbatim
886+ characters, as well as {[}bracketed text{]}.}
893887
894888\startblockquote
895−Notes can go in quotes.
896−\footnote{In quote.}
889+Notes can go in quotes.\footnote{In quote.}
897890\stopblockquote
898891
899892\startitemize[n][stopper=.]
900893\item
901− And in list items.
902− \footnote{In list.}
894+ And in list items.\footnote{In list.}
903895\stopitemize
904896
905−This paragraph should not be part of the note, as it is not
906−indented.
897+This paragraph should not be part of the note, as it is not indented.
907898
908899\stoptext