This was made visible by aab1b145a5, since xhtml export for
lib/doc/Additional.lyx caused an exception. However, the cause for this was
already present earlier: All attempts to output a std::string to an
odocstream resulted in trying to change the encoding of the stream instead,
since there is no operator<<(odocstream &, std::string) defined, and an
implicit conversion to SetEnc happened instead.
This is fixed by making the SetEnc constructor explicit and adjusting all
code parts that did not compile anymore after that. The parts of the code
that did use the wrong output operator were the std::string version of
htmlize() from output_xhtml.cpp and all changed parts in the other .cpp files.
I also removed the std::string versions of html::htmlize() and
html::cleanAttr(), since it was difficult to see which encodings were used
with these. Now we are always explcit when using html::cleanAttr() and
html::htmlize().
Base classes with virtual methods should have a virtual destructor.
See Scott Meyers, Effective C++ item 7: Declare destructors virtual in
polymorphic base classes.
Previously, an empty paragraph would always yield something like:
<div><a id='magicparid-35' /></div>
because we had no way to "defer" the anchor tag. Now this is wrapped
into the div, in effect, and we abandon it all if there's no content.
throwing errors in the case where we are inside a charstyle that itself
uses a font tag, e.g., strong from the logical markup module. This at
least gets rid of most of the errors, and doesn't seem to cause any
other problems.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38220 a592a061-630c-0410-9148-cb99ea01b6c8
AMS Math 1, 2, 3
where the numbers are links.
The only thing left to do here is to parse the index entries so that we
can do something with "this ! that" and similar things.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33001 a592a061-630c-0410-9148-cb99ea01b6c8
other fixes in here, too.
There is an issue here which I guess I'll deal with later, namely, that
the name attribute for <a> is unavailable in XHTML 1.1, which is what we
need for MathML support, at least in Firefox. Firefox will deal with it
if it's there, but the document won't validate. I'll figure out what to
do about this later.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32226 a592a061-630c-0410-9148-cb99ea01b6c8
(i) We don't need (at the moment, anyway) to step list counters, since
HTML will handle those for us.
(ii) Output errors as comments to the HTML file so we can see where they
happen.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32097 a592a061-630c-0410-9148-cb99ea01b6c8
Much of the point of this is to allow us properly to handle what LyX does as:
<em>This is <strong>bold and italic</em> and now just bold.</strong>
We output:
<em>This is <strong>bold and italic</strong></em><strong> and now just bold.</strong>
which is valid.
Note how much easier this would have been if emphasis and boldness were insets
rather than ranges. ;-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32086 a592a061-630c-0410-9148-cb99ea01b6c8
a piece at a time, using the new XHTMLStream.
This just gets the basic structures working, and fixes a bunch of iconv
errors in the process.
I hate iconv errors.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32085 a592a061-630c-0410-9148-cb99ea01b6c8
lots of things that will be replaced have been left, so as not to
prevent compilation.
The point of this is that we need a good way to manage the nesting of tags,
that is, to make sure tags are properly nested. So everything here is pretty
trivial, except for XHTMLStream << EndTag.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32083 a592a061-630c-0410-9148-cb99ea01b6c8