Ms writer: Improved footnotes.

This commit is contained in:
John MacFarlane 2017-03-23 11:56:13 +01:00
parent da0aae9c8f
commit 1809f64a4c
2 changed files with 7 additions and 7 deletions

View file

@ -57,7 +57,7 @@ TODO:
A big advantage of gropdf: it supports the tag
\X'pdf: pdfpic file alignment width height line-length'
and also seems to support bookmarks.
[ ] avoid blank line after footnote marker when footnote has a
[x] avoid blank line after footnote marker when footnote has a
paragraph
[ ] better smallcaps support, see below...
[ ] add via groff option to PDF module
@ -448,7 +448,12 @@ handleNotes opts fallback = do
handleNote :: PandocMonad m => WriterOptions -> Note -> MS m Doc
handleNote opts bs = do
contents <- blockListToMs opts bs
-- don't start with Paragraph or we'll get a spurious blank
-- line after the note ref:
let bs' = case bs of
(Para ils : rest) -> Plain ils : rest
_ -> bs
contents <- blockListToMs opts bs'
return $ cr <> text ".FS" $$ contents $$ text ".FE" <> cr
fontChange :: PandocMonad m => MS m Doc

View file

@ -883,7 +883,6 @@ Footnotes
.LP
Here is a footnote reference,\**
.FS
.LP
Here is the footnote.
It can go anywhere after the footnote
reference.
@ -891,7 +890,6 @@ It need not be placed at the end of the document.
.FE
and another.\**
.FS
.LP
Here's the long note.
This one contains multiple
blocks.
@ -911,7 +909,6 @@ lazy and just indent the first line of each block.
This should \f[I]not\f[] be a footnote reference, because it
contains a space.[^my note] Here is an inline note.\**
.FS
.LP
This
is \f[I]easier\f[] to type.
Inline notes may contain
@ -926,14 +923,12 @@ as well as [bracketed text].
.LP
Notes can go in quotes.\**
.FS
.LP
In quote.
.FE
.RE
.IP "1." 3
And in list items.\**
.FS
.LP
In list.
.FE
.LP