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"
|
("<w:fldSimple w:instr=\"SEQ Figure"
|
||||||
<> " \\* ARABIC \"><w:r><w:t>"
|
<> " \\* ARABIC \"><w:r><w:t>"
|
||||||
<> tshow fignum
|
<> tshow fignum
|
||||||
<> "</w:t></w:r></w:fldSimple>"),
|
<> "</w:t></w:r></w:fldSimple>")] : Str ": " : alt
|
||||||
Str ":", Space] : alt
|
|
||||||
else alt
|
else alt
|
||||||
return $
|
return $
|
||||||
Elem (mknode "w:p" [] (map Elem paraProps ++ contents))
|
Elem (mknode "w:p" [] (map Elem paraProps ++ contents))
|
||||||
|
|
|
@ -98,8 +98,8 @@ tableToOpenXML opts blocksToOpenXML gridTable = do
|
||||||
addLabel :: Text -> Text -> Int -> [Block] -> [Block]
|
addLabel :: Text -> Text -> Int -> [Block] -> [Block]
|
||||||
addLabel tableid tablename tablenum bs =
|
addLabel tableid tablename tablenum bs =
|
||||||
case bs of
|
case bs of
|
||||||
(Para ils : rest) -> Para (label : Space : ils) : rest
|
(Para ils : rest) -> Para (label : Str ": " : ils) : rest
|
||||||
(Plain ils : rest) -> Plain (label : Space : ils) : rest
|
(Plain ils : rest) -> Plain (label : Str ": " : ils) : rest
|
||||||
_ -> Para [label] : bs
|
_ -> Para [label] : bs
|
||||||
where
|
where
|
||||||
label = Span (tableid,[],[])
|
label = Span (tableid,[],[])
|
||||||
|
@ -108,8 +108,7 @@ addLabel tableid tablename tablenum bs =
|
||||||
("<w:fldSimple w:instr=\"SEQ Table"
|
("<w:fldSimple w:instr=\"SEQ Table"
|
||||||
<> " \\* ARABIC \"><w:r><w:t>"
|
<> " \\* ARABIC \"><w:r><w:t>"
|
||||||
<> tshow tablenum
|
<> tshow tablenum
|
||||||
<> "</w:t></w:r></w:fldSimple>"),
|
<> "</w:t></w:r></w:fldSimple>")]
|
||||||
Str ":"]
|
|
||||||
|
|
||||||
-- | Parts of a table
|
-- | Parts of a table
|
||||||
data RowType = HeadRow | BodyRow | FootRow
|
data RowType = HeadRow | BodyRow | FootRow
|
||||||
|
|
Loading…
Reference in a new issue