As of latex2rtf-2.3.16, the rtf file resulting from attached huhu.rtf,
when read into libreoffice writer or MS Word 2010,
Suggested changes:
A
(A1) cfg/style.cfg contains definition for styles \s62 and \cs62
Apparently the numbers should be unique, otherwise a \bibitem does not
become styled to "bibitem" in libreoffice writer and MS Word 2010.
The patch changes \cs62 and \cs63 to \cs162 and \cs163
(A2) Similar change to cfg/styleAPA.cfg (not tested)
B
(B) \s62 (in cfg/style.cfg and in cfg/styleAPA.cfg) includes \fi-567\li567
,
however the output for the \bibitem overrides it with emitting \li450\fi0
,
for example:
\pard\plain\s62\ql\fi-567\li567\sb0\sa0\f0\fs20\sl240\slmult1 \li450\fi0 \fs20 [{\v*\bkmkstart BIB_12}2{*\bkmkend BIB_12}]\tab
The intent is not clear (for me) here: in xrefs.c we have
void CmdThebibliography(int code){ ... PushEnvironment(BIBLIOGRAPHY_MODE); setLength("parindent", -amount); setLeftMarginIndent(getLeftMarginIndent() + amount); ... } void CmdBibitem(int code) { ... startParagraph("bibitem", PARAGRAPH_FIRST); ... }
The intended behavior may be:
(a) Definition of bibitem style decides \fi and \li values
Pro: this is in style.cfg, user can change it. In this case startParagraph() should not emit the superfluous \fi and \li commands when called from CmdBibitem()
(b) Settings in CmdThebibliography should decide indentation with:
setLength("parindent", -amount); setLeftMarginIndent(getLeftMarginIndent() + amount);
Pro: although "amount" is currently fixed to 450, we conceptually
decide the indentation at the bibliography level (e.g. from longest
label), not at bibitem.
The patch moves towards (b):
Maybe a comment in style.cfg should notify users that \fi and \li is
useless in bibitem.
startParagraph("bibitem", PARAGRAPH_FIRST);
with
startParagraph("bibitem", PARAGRAPH_LIST);
to avoid startParagraph()
setting parindent to zero.
Anonymous
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
An attempt at the alternative for B, i.e. we leave \fi and \li to
style.cfg.
Problem: if a \bibitem has a second paragraph, its left indent will
not line up with the first if user changes bibitem \fi and \li in
style.cfg
Changes:
In vertical.h:
- introduce PARAGRAPH_BIBITEM
In xrefs.c:
CmdThebibliography()
does not change parindentIt still sets left margin.
However the
amount
we should use is not known (maybe it couldbe parsed from style.cfg), so if the bibitem has a second
paragraph, its left indent will not generally match to the first.
As a stopgap measure,
amount
in CmdThebibliography is changedto match the value in style.cfg
Note: the itemize environment has a similar problem (try
attached bibitem-alternative-test.tex)
CmdBibitem()
callsstartParagraph()
withPARAGRAPH_BIBITEM
in vertical.c:
startParagraph()
now does not emit \fi and \li if called withPARAGRAPH_BIBITEM
Attachments:
bibitem-alternative.diff (patch)
bibitem-alternative-test.tex (test file, now includes second
paragraph for \bibitem and for \item in an itemize environment)