Richard Heck [Wed, 12 Jan 2011 23:22:06 +0000 (23:22 +0000)]
Add comment.
The reason we don't need to do what I say we don't need to do is that a
given counter doesn't really care about whether it has a master. It's
when the master is stepped that we check for which other ones to reset.
So if the master doesn't exist, nothing will happen, anyway.
Richard Heck [Wed, 12 Jan 2011 22:53:41 +0000 (22:53 +0000)]
Add NoCounter layout tag. When working on output of equation numbers, I
noticed that article, for example, still has a counter "chapter". This
surprised me.
Richard Heck [Wed, 12 Jan 2011 22:23:27 +0000 (22:23 +0000)]
Inset::addToToc() can and should be const. It wasn't, I take it, because
of things like:
pit.push_back(CursorSlice(*this));
which I've had to change to:
pit.push_back(CursorSlice(const_cast<InsetCaption &>(*this)));
and similarly in a few other places.
If anyone thinks we should instead have:
explicit CursorSlice(Inset const &);
then we can also do that.
Georg Baum [Wed, 12 Jan 2011 22:03:15 +0000 (22:03 +0000)]
Exclude more conditional commands from preamble parsing:
LyX would output the parsed stuff unconditionally, so we must not translate
it in LyX document settings.
Richard Heck [Wed, 12 Jan 2011 21:25:45 +0000 (21:25 +0000)]
Fix bug #7230. Changes at r36974 had not been done properly. But this is
better than what we had, anyway, since we do not calculate the tocstring
unless we need it.
Georg Baum [Wed, 12 Jan 2011 21:04:39 +0000 (21:04 +0000)]
Fix language handling in tex2lyx:
- Add missing babel synonyms (taken from a standard TeXLive 2010 install).
Some synonyms might still be missing (if they are defined not by babel
itself, but additional packages). Adding these is now simple: Only
known_languages and known_coded_languages need to be touched.
- Translate babel language name arguments of \foreignlanguage and
\selectlanguage to LyX names.
- Translate second argument of \foreignlanguage to LyX.
- Cleanup mixed language names in the preamble parser: Now all checks are
done with LyX names, not a mix of babel and LyX names. This sets correct
quotes even if the language as given as an alias.
Richard Heck [Wed, 12 Jan 2011 16:04:59 +0000 (16:04 +0000)]
Fix bug #6894. We save counter information during updateBuffer(), and
then output \setcounter macros during snippet generation, so that we get
the right equation values.
Note: It would be possible to use this same machinery to fix bugs in
instant preview, e.g., that you always get things like (0.3) as equation
numbers, if you use equations numbered by section. I'll perhaps post a
patch for that.
Richard Heck [Tue, 11 Jan 2011 23:55:20 +0000 (23:55 +0000)]
XHTML output was a mess for grids output as LaTeX. This will probably
still be a mess in many cases, but hopefully we won't have to go here
very often.
Pavel Sanda [Fri, 7 Jan 2011 22:18:43 +0000 (22:18 +0000)]
Enumitem's "Labeling/LyX-List" should not change the original layout.
Patch from Guenter.
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg84689.html
Georg Baum [Fri, 7 Jan 2011 21:04:16 +0000 (21:04 +0000)]
Parse Flex insets defined in the layout. This is needed e.g. for
lib/doc/Math.lyx, since tex2lyx swallows the LyX part of the preamble, and
thus \shortcut would not be defined.
Georg Baum [Fri, 7 Jan 2011 19:58:31 +0000 (19:58 +0000)]
Fix invalid \size output with no active layout before sectioning environments.
Fix missing \size reset after sectioning environments.
Fix invalid \lang default (use english instead, as in the preamble)
Convert hard coded layout output of caption insets to Context class.
Uwe Stöhr [Thu, 6 Jan 2011 23:53:32 +0000 (23:53 +0000)]
stdmenus.inc: remove item that produced incorrect LaTeX code: a framed box can only have page breaks when there is no inner box, but this item created an framed box with a minipage as inner box _and_ allowed page breaks
Georg Baum [Thu, 6 Jan 2011 18:40:39 +0000 (18:40 +0000)]
Fix crash in lyx -e latex lib/doc/Shortcuts.lyx: theApp() is 0 in batch mode.
Unfortunately the commandline export of InsetInfo is still broken for MENU_INFO.
Georg Baum [Wed, 5 Jan 2011 20:32:45 +0000 (20:32 +0000)]
Fix several false errors "stray '}' in text" that were caused by
misinterpreting "\}" as "}" when it occured inside a pair of unescaped
braces, like in "\code{@\{*\}r||p\{1in\}@\{*\}}".
The reason for this bug is that Token::character() behaves differently in
tex2lyx than in mathed. See the comment in Parser.h for a more general fix.
For now I played on the safe side and only changed those places where I
definitely know that the old code was wrong.
When a document with a InsetTOC was closed, the outline was closed. But this shouldn't happen because editedInset("toc") does never return something.
The reason that this happened was that if currentBufferView() is 0, we don't even care wehther inset was specified. If inset is specified, it should match the editedInset.
Fix bug #7099: Fix bug #7099: Math toolbars don't autoshow.
When applying the preference we need to save the full session information, because when this information is not yet saved, we will lose it forever. We can enter the preferences without a saved state when we start LyX with a modified default.ui.
In GuiApplication::readUIFile() the settings for views gets removed if the ui file is newer than the saved timestamp in the settings. Later the non existing settings will be used to initialize the visibility. The default value for a non existing setting is 0. The visibility_ variable does never get changed afterwards. And therefore
we will again write 0 to the registry.
We should have read the ui file instead when we can't find the registry value.
Fix bug #7050: Assert when using DecimalAlignment in tables.
The problem is/was that when copying an InsetTableCell?, the macrocontext_position_ and the buffer_ were not copied. That's why in InsetTabular?@splitCell@521 and in InsetTabular::TeXRow() and in InsetTabular::metrics we manually copy this into the new object.
However, splitCell() returns the object by-value. So, when we call
Remove GuiToolbar::allowauto_ and define this property in the Toolbars.h::Visibility enum.
Now, there is the bug that autoallow is incorrectly set to true when visibility_ has the Visibility::SAMEROW flag. One shouldn't use >= on an enum (GuiToolbar::setVisibility), as newly added items will exhibit unexpected behaviour.
Georg Baum [Sun, 2 Jan 2011 18:16:23 +0000 (18:16 +0000)]
Fix wrong setting of bibinset options if \cite{*} was found.
Improve heuristic for outputting \bibliographystyle: Now it is suppressed
if \bibliography follows immediately, since LyX adds it automatically in that
case.
Georg Baum [Sun, 2 Jan 2011 15:39:48 +0000 (15:39 +0000)]
Improve tex2lyx roundtrip of test-insets.tex:
- Replace special verbatim commands by standard LaTeX, since it would be
extremely difficult to make tex2lyx understand them)
- Comment duplicated \bibliography{xampl}, since LaTeX cannot handle two
\bibliography calls
- Fix a regression with spaces after commands, introduced in r36943
- Parse \multicolumn with space/comments between two arguments correctly
- Parse optional arguments correctly if there are space or comments between
the command and the argument
- Remove duplicate "LyX" phrase handling (I overlooked that in r37052)
- Add new commands created with \let to the list of known commands. This is
needed to parse the arguments correctly