Docx writer: move ": " out of the caption bookmark.
This is needed so that native references to the figure are included as "As seen in Figure X, it is..." instead of "As seen in [Figure: , it is..."
This commit is contained in:
parent
f4d9b443d8
commit
6509ff6204
2 changed files with 4 additions and 6 deletions
|
@ -880,8 +880,7 @@ blockToOpenXML' opts (SimpleFigure attr@(imgident, _, _) alt (src, tit)) = do
|
|||
("<w:fldSimple w:instr=\"SEQ Figure"
|
||||
<> " \\* ARABIC \"><w:r><w:t>"
|
||||
<> tshow fignum
|
||||
<> "</w:t></w:r></w:fldSimple>"),
|
||||
Str ":", Space] : alt
|
||||
<> "</w:t></w:r></w:fldSimple>")] : Str ": " : alt
|
||||
else alt
|
||||
return $
|
||||
Elem (mknode "w:p" [] (map Elem paraProps ++ contents))
|
||||
|
|
|
@ -98,8 +98,8 @@ tableToOpenXML opts blocksToOpenXML gridTable = do
|
|||
addLabel :: Text -> Text -> Int -> [Block] -> [Block]
|
||||
addLabel tableid tablename tablenum bs =
|
||||
case bs of
|
||||
(Para ils : rest) -> Para (label : Space : ils) : rest
|
||||
(Plain ils : rest) -> Plain (label : Space : ils) : rest
|
||||
(Para ils : rest) -> Para (label : Str ": " : ils) : rest
|
||||
(Plain ils : rest) -> Plain (label : Str ": " : ils) : rest
|
||||
_ -> Para [label] : bs
|
||||
where
|
||||
label = Span (tableid,[],[])
|
||||
|
@ -108,8 +108,7 @@ addLabel tableid tablename tablenum bs =
|
|||
("<w:fldSimple w:instr=\"SEQ Table"
|
||||
<> " \\* ARABIC \"><w:r><w:t>"
|
||||
<> tshow tablenum
|
||||
<> "</w:t></w:r></w:fldSimple>"),
|
||||
Str ":"]
|
||||
<> "</w:t></w:r></w:fldSimple>")]
|
||||
|
||||
-- | Parts of a table
|
||||
data RowType = HeadRow | BodyRow | FootRow
|
||||
|
|
Loading…
Reference in a new issue