When including files, LyX always searches the user and the system
directory, in that order. This means that when using local layout
files broken down into multiple includes, the various includes should
be specified with a path relative to the user layouts directory
(typically ~/.lyx/layouts), making this very impractical.
This commit allows including local files by specifying their path
as explicitly relative to the main layout file position, i.e., by
specifying their path with either "./" or "../". If the main layout
is not loaded from a local file, the usual search order is used,
even if the path are explicitly relative. So, for system layouts,
both "Input ./name.inc" and "Input name.inc" are equivalent.
Fixes missing outliner names in various situations. Now if the warning "Missing
outliner name" appears in the console, this correctly hints at an actual issue
with the layout.
Next to the cmd name, introduce optional latex names (that might differ
from the cmd name) and aliases (that are "obsoleted by" the cmd).
This enhances portability between the engines.
* New constant LYXFILE_LAYOUT_FORMAT in src/TextClass.cpp. This determines the
layout format corresponding to the current lyx file format.
* The Local Layout pane is changed so that the "Convert" button does not convert
to the internal layout format but to the current lyx file format, to make sure
that the file does not become unreadable with a specified earlier version of
LyX.
* If LYXFILE_LAYOUT_FORMAT == LAYOUT_FORMAT then LyX behaves as before. This is
the value defined in master.
Preliminary work for addressing #7790. Thanks to Richard for providing initial
files this is based on.
Adding to TextClass:
OutlinerName <string> <string>
(the second string is translated)
e.g.:
OutlinerName thm "Definitions & Theorems"
Adding to Layout:
AddToToc <string> (default "", means no)
IsTocCaption <bool> (default 0)
e.g.:
AddToToc thm
IsTocCaption 1
Adding to InsetLayout:
AddToToc <string> (default "", means no)
IsTocCaption <bool> (default 0)
e.g.:
AddToToc literate
Adding to inset arguments:
IsTocCaption <bool> (default 0)
These should be used if any new style needs to be introduced in the stable
2.1 series: If the ForceLocal flag of the style is set, it will always be
written to the document header, so that even older 2.1 versions can read
and correctly output the document.
objects. The problem that led to the leak is that these objects can be held in
memory long after the Buffer that created them is gone, mostly due to their
use in the CutStack. So they were previously held in a storage facility, the
DocumentClassBundle. Unfortunately, they were now being created too often,
especially by cloning. It's not really a leak, because they're accessible, but
we weren't ever destroying them.
This new approach uses a shared_ptr instead.
Thanks to Vincent for pointing out const_pointer_cast.
Add a new layout syntax CiteEngine to define the citation commands
available for a given citation engine.
Also extend the CiteFormat syntax to allow more customization. This
mechanism, previously used to produce bibliography entries in the
citation GUI based on the BibTeX entrytype, is now also used to
produce the textual labels for citation insets in the buffer view.
Thus citation styles are almost completely customizable by modules.
Modules for the basic, jurabib and natbib engines are implemented.
Layout format incremented to 37.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40820 a592a061-630c-0410-9148-cb99ea01b6c8
It's amazing we haven't seen problems with this before. The basic problem is that buf.errorList("whatever") would always return the same global, static error list, if it did not already exist. So, to a significant extent, there was only one global error list!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38978 a592a061-630c-0410-9148-cb99ea01b6c8
layout to the current format.
This probably isn't needed for branch, since local layout was a
"hidden feature" prior to 2.0, and one can update local layout by:
(a) copying to a file
(b) running layout2layout on that file
(c) pasting back into LyX
So we should probably just leave this in trunk.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38622 a592a061-630c-0410-9148-cb99ea01b6c8
allows for layout- or module-level customization of the display in the
citation dialog and of the XHTML bibliography output.
There is more of this to come, by the way. The next step is to allow
macros. That will make it easier to deal with translation issues, which
ought to be the final step.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33920 a592a061-630c-0410-9148-cb99ea01b6c8
class that is unavailable.
In addition, add some explanations about this kind of thing to the User
Guide, to which we can direct the user in the error message. This kind
of question comes up often enough that we need something right up front
about it. It isn't enough to have it in the other manuals.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33864 a592a061-630c-0410-9148-cb99ea01b6c8
only sweave is supported (for building documentation, not programs).
Layout files allow a new OutputFormat tag
Modules can be conditionned on a feature of the type from->to, indicating that
it should be possible to convert from format 'from' to format 'to'.
Layout format incremented to 15.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29874 a592a061-630c-0410-9148-cb99ea01b6c8
Don't go into an endless loop if layout2layout cannot produce the desired file format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28529 a592a061-630c-0410-9148-cb99ea01b6c8
available to tex2lyx. The point is to move the crucial routines that
deal with modules out of BufferParams.cpp, which tex2lyx does not have,
and into TextClass.cpp, which it does.
This is all cleanup that makes a lot of sense independently.
Note that LayoutModuleList will shortly become a real class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28456 a592a061-630c-0410-9148-cb99ea01b6c8
overwrites the existing definition, instead of updating it, as our Style
declarations do. This patch fixes this behavior, so that e.g.:
#\DeclareLyXModule{ERT}
#DescriptionBegin
#Make ERT Classic
#DescriptionEnd
Format 11
InsetLayout ERT
Decoration classic
End
will do as advertised.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27900 a592a061-630c-0410-9148-cb99ea01b6c8