Commit Graph

222 Commits

Author SHA1 Message Date
Martin Vermeer
5a2deb94c3 Fix bug, and introduce MultiPar parameter for flex insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20869 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 17:07:24 +00:00
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +00:00
Martin Vermeer
eca79a8a09 Better error signaling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-06 14:28:19 +00:00
Martin Vermeer
12e1d4bc8d Name change CharStyle -> Flex
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20072 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 15:29:04 +00:00
Richard Heck
8a947f63da This is one of a series of patches that will merge the layout modules development in personal/branches/rgheck back into the tree.
Design goal: Allow the use of layout "modules", which are to LaTeX packages as layout files are to LaTeX document classes. Thus, one could have a module that defined certain character styles, environments, commands, or what have you, and include it in various documents, each of which uses a different document class, without having to modify the layout files themselves. For example, a theorems.module could be used with article.layout to provide support for theorem-type environments, without having to modify article.layout itself, and the same module could be used with book.layout, etc.

This patch adds the backend. The ModuleList class holds a list of the available modules, which are retrieved from lyxmodules.lst, itself generated by configure.py. There are two LFUNs available: modules-clear and module-add, which do the obvious thing; you can test by typing these into the minibuffer, along with the name of one of the available modules: URL (a CharStyle), Endnote (a Custom Inset), and---with the spaces---End To Foot (View>LaTeX and look at the user preamble), which are themselves in lib/layouts. There are some others, too, that allow theorems to be added to classes like article and book.

The GUI will come next.

Issues: (i) The configure.py script could be improved. It'd be nice, for example, if it tested for the presence of the LaTeX packages a particular module needs. But this would mean re-working the LaTeX script, and I don't know how to do that. Note that at present, the packages are ignored. This will change shortly. (ii) I've used std::string in LyXModule, following what seemed to be a precedent in TextClass. If some of these should be docstrings, please let me know, and I'll change them. (iii) There is at present no distinction between LaTeX and DocBook modules. Should there be? That is: Should there be modules that are available when the document class is a LaTeX class and others that are available only when it is DocBook? Or should there just be one set of modules? Each module can of course indicate for what it is suitable in its description.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19893 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 17:59:49 +00:00
Martin Vermeer
77b575e562 Move background colour into the layout files -- for all collapsables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19813 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-26 20:32:58 +00:00
Martin Vermeer
30506f8e11 Clean-up in CharStyles, externalize detection of undefined styles to
layout files



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19790 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-25 14:43:59 +00:00
Martin Vermeer
6c74eefd9f One more changeover charstyle -> insetlayout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19788 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-25 12:18:23 +00:00
Martin Vermeer
e4a160c6cf Make Richard happy, add inset layout parm 'Decoration'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19786 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-25 09:57:32 +00:00
Martin Vermeer
540f3564f0 Inset configurability: separate charstyle and custom insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19769 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-24 12:45:40 +00:00
André Pönitz
39c7e2faf0 rename Layout_ptr into LayoutPtr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 19:59:07 +00:00
Martin Vermeer
a921f1b7ae layout2layout, changeover to version 5
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19723 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-22 14:36:07 +00:00
Abdelrazak Younes
98008dc568 * Layout.h
- leftMargin, rightMargin, labelsep, labelindent, parindent are now docstring.

* TextClass.h:
- leftMargin() and rightMargin(): now return a docstring.

All other files: adapt to change above.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19633 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 13:21:12 +00:00
Martin Vermeer
f20ff85503 Brown paper bag
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19627 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 11:48:53 +00:00
Martin Vermeer
dc2a40e7e9 Partial merge of CharStyle and InsetLayout stuff, first part
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19621 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-17 15:38:58 +00:00
Jean-Marc Lasgouttes
412e3b8052 revert inadvertent patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19608 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-16 16:18:04 +00:00
Jean-Marc Lasgouttes
06c43ec975 rename TextClass::ctrs_ to counters_
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19607 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-16 15:26:00 +00:00
Jean-Marc Lasgouttes
88177a89cb The counters labelstring patch. Part 1: the infrastructure.
* src/Counters.cpp (Counter::labelString/labelStringAppendix): new
	accessors for two new variables
	(Counter::setMaster): removed
	(Counter::Counter): add a version with arguments.
	(Counters::newCounter): add relevant arguments; allow to redefine
	an existing counter.
	(Counters::reset): reset the current float float.
	(Counters::theCounter): return a representation of a given counter
	using its labelstring or by default \themaster.\arabic{counter}.
	Handle appendix too.
	(Counters::counterLabel): add support for macros of the form
	\thecounter. 

	* src/TextClass.cpp (readCounters): also read LabelString and
	LabelStringAppendix. 
	(readFloats): allow to update an existing float; create the
	counter associated with the float.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19602 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-16 11:07:00 +00:00
Martin Vermeer
2bd998c29e Prepare for inset configurability
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19498 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 12:13:17 +00:00
Abdelrazak Younes
4a53fa6e01 Allow unicode in Layout names.
* Layout.h:
  - name_, obsoleted_by_, depends_on_ are now docstrings.

All other changes results from the above string -> docstring changes. In particular, we now try to translate the layout names only if possible (i.e. if they are ASCII only).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19042 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-11 13:39:08 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
André Pönitz
6add1994c7 rename LyXTextClass* into TextClass*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 19:53:54 +00:00