Commit Graph

281 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
60d2b3295a * new per-document default output format. File format change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29181 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-10 11:06:53 +00:00
Jürgen Spitzmüller
ca6d526ba1 * BufferParams.cpp:
- move loading of the xetex packages xunicode and xltxtra
	  to the end of the preamble

Now the UserGuide compiles with XeTeX!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29120 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 08:10:50 +00:00
Jürgen Spitzmüller
737e9b2c20 start XeTeX support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29119 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 06:58:30 +00:00
Jürgen Spitzmüller
5a4e4dec15 Fix bug 5863:
* beamer.layout:
* powerdot.layout:
	- those provide geometry

* BufferParams.cpp:
* GuiDocument.cpp:
	- implement provides("geometry")

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28957 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-28 10:48:16 +00:00
Jean-Marc Lasgouttes
7bd971ff32 isAvailable is static
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28702 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-04 17:02:22 +00:00
Vincent van Ravesteijn
36aa11863b Fix bug 5806: http://bugzilla.lyx.org/show_bug.cgi?id=5806.
Branch names with spaces impossible

Read the whole line to catch the whole branch name.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28620 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-26 00:24:12 +00:00
Richard Heck
f946b6ed0b Move some more code around so as to make module-related routines available
to tex2lyx.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28574 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-21 16:45:37 +00:00
Richard Heck
084de459fb Make Andre a little happier.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28560 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-19 19:10:59 +00:00
Georg Baum
9aad4bc27f Better fix for bug 1476 (following an idea by Jean-Marc).
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
2009-02-17 20:25:56 +00:00
Richard Heck
52d3a1e426 Move some code around in an effort to make information about modules
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
2009-02-11 23:22:10 +00:00
Richard Heck
0a5514d2a4 Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28453 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-11 19:51:56 +00:00
Richard Heck
61bef3b043 Access private data directly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28452 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-11 19:48:54 +00:00
Richard Heck
4407eb186f Use the typedef.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28451 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-11 19:35:22 +00:00
André Pönitz
20d5148dca move ColorSet to a header of its own to reduce #include dependencies
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28426 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-09 23:30:24 +00:00
Jürgen Spitzmüller
ef6be5f499 * load CJKutf8 package, if available, for CJK documents in utf8 encoding
(first part of fix to bug 5386)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28142 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-14 09:26:13 +00:00
Jürgen Spitzmüller
743a29799b * use ulem instead of soul for change tracking
(fixes bugs 5091, 5480, 5647).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28114 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-12 08:01:28 +00:00
Jürgen Spitzmüller
3d48607f1a * BufferParams.{cpp,h}:
- pass graphics driver to geometry (bug 5613)
	- put papersize options to package call, not in \geometry
	  which broke compilation in some cases (bug 3838)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27917 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-19 09:32:04 +00:00
André Pönitz
f1cba8ff64 more latin1..utf8 schanges. all of src/* should be utf8 now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27425 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 15:58:50 +00:00
Abdelrazak Younes
c8c3487036 MSVC/Cmake compilation fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27382 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-11 14:22:42 +00:00
Richard Heck
c573ab4976 Fix final default-module-related bug reported by Philippe. The comments
in the code should explain what the problem was.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27313 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-06 14:59:14 +00:00
Richard Heck
3ac4460c07 Forgot to change this line.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27282 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:46:22 +00:00
Richard Heck
362d6e468f This patch fixes a set of bugs reported by Philippe relating to excluded
and default modules. The lesson, in the end, is that we need to do all the
removal of modules that no longer `fit', for whatever reason, before we
do anything else. So the patch basically just moves the `removal' code
into a new routine that gets called before the routines that add default
modules and then check consistency.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27281 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:42:16 +00:00
Richard Heck
5e45cd4c44 Revert the last few patches. I'll commit a more general fix all at once.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27280 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:32:37 +00:00
Richard Heck
3a9a0fc3e6 Comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27279 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:15:09 +00:00
Richard Heck
c94d0da408 More fixes for bugs noticed by Philippe.
We want to do all the excluding before we do any of the adding.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27278 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:13:25 +00:00
Richard Heck
df475c2002 Add some comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27277 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:07:52 +00:00
Richard Heck
b0035f07b1 Fix bug reported by Philippe relating to excluded modules: Excluded
modules need to be removed before anything else is done.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27276 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-05 19:01:59 +00:00
Richard Heck
9dfac74265 This patch introduces ProvidesModule and ExcludesModule layout tags.
See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg145129.html.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27041 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-23 00:27:03 +00:00
Richard Heck
721b269732 Another one for Abdel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26999 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-20 20:45:47 +00:00
Richard Heck
2351615f0a Fix LFUN_LAYOUT_MODULE_ADD: We need to make sure that the module
isn't already added, that its requirements are satisfied, and that
it doesn't conflict with any loaded modules. Mostly, this just
moves existing code into a new routine where we can get at it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26995 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-20 19:48:32 +00:00
Richard Heck
5e505119fa OK, I lied. A little more. Just trying to keep the cleanup separate from
the real stuff.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26925 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 17:29:01 +00:00
Richard Heck
297d5d1f4e Factorize out some of this. Just a bit more cleanup, prior to the patch
I've been promising....


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26923 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 17:14:46 +00:00
Richard Heck
8bc9c319d2 Fix bug connected with excluded modules and default modules: We need to make
sure that default modules do not exclude loaded modules and also that loaded
modules do not exclude them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26922 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-16 15:29:56 +00:00
Uwe Stöhr
4331cbf30f babel handling: revert r26857 and r26858 for the reasons I posted o the list
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26870 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 17:21:18 +00:00
Jürgen Spitzmüller
d45ca67d1d ** fix bug 2114. Fileformat change.
** fix bug 5343 (patch from Richard, prerequisite for the other fix)

* Buffer.cpp:
	- increment format to 343
* src/BufferParams.{cpp,h}:
	- new param \use_default_options that allows to select/deselect
	  the "Other" class options defined in the layout file.
* src/frontends/qt4/GuiDocument.cpp:
* src/frontends/qt4/ui/LaTeXUi.ui:
	- add GUI to set \use_default_options, display predefined options in the dialog
	- update dialog correctly on class change.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26860 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 09:36:00 +00:00
Abdelrazak Younes
4d4ee5d7a6 Factorize out the hardcoded babel tests. This whole thing is a real mess...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26858 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 07:56:06 +00:00
Abdelrazak Younes
bc8e829ce0 Simplify and optimize a bit the special babel language detection; and add a FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26857 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 07:19:43 +00:00
Uwe Stöhr
d30e01fd08 Support for Mongolian, fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26848 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-11 23:52:31 +00:00
Uwe Stöhr
19c27c8714 BufferParams.cpp: typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26842 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-11 12:47:51 +00:00
Richard Heck
2078e09e67 The default modules should be kept in order.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26801 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-07 15:53:05 +00:00
Uwe Stöhr
dfcd6fb7ea make Latvian documents compilable, fixes http://bugzilla.lyx.org/show_bug.cgi?id=5324
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26752 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 19:12:12 +00:00
Uwe Stöhr
8d11bc23be BufferParams.cpp: make Lithuanian documents compilable, fixes http://bugzilla.lyx.org/show_bug.cgi?id=5323
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26746 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 13:42:37 +00:00
Uwe Stöhr
ce09194e43 GuiDocument.cpp, BufferParams.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5294
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26628 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-29 19:33:37 +00:00
Uwe Stöhr
4c48e7746b BufferParams.cpp, LaTeXFeatures.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5291
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26627 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-29 19:18:00 +00:00
André Pönitz
e5ae1a4b75 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26481 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-21 19:27:20 +00:00
Uwe Stöhr
eb963540d4 various listings fixes by Vincent, see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg143302.html
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26341 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-08 21:51:38 +00:00
Jürgen Spitzmüller
db9885f882 final touch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26207 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 07:48:24 +00:00
Jürgen Spitzmüller
5da25426f5 * adjust line lengths
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26206 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 07:30:09 +00:00
Jürgen Spitzmüller
a2906cb877 ** proper implementation of pLaTeX by Tetsuya Makimura and me, fixes many remaining problems and bugs with language "japanese" (bugs 4863, 4290, 4700 and partially 4697) **
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26200 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-18 17:26:09 +00:00
Richard Heck
163d827729 Support for removing "default" modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25917 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-27 17:46:27 +00:00
Richard Heck
a28c584064 Move the default module loading from makeDocumentClass() to setBaseClass().
This makes the Document>Settings dialog behave better.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25882 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-25 16:48:48 +00:00
Richard Heck
56a35c2c61 Add UseModule tag for layout files. This allows the AMS files, in particular, to "require" the
theorems-ams module, which is what most users will want. A later commit will allow users also
to "exclude" this module, in case they wanted to do that.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25880 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-25 15:51:27 +00:00
Uwe Stöhr
ffa15bc301 BufferParams.cpp: clarify the babel loading logic: treat jurabib the same as hyperref, japanese, and vietnamese
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25707 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-18 22:22:17 +00:00
Jürgen Spitzmüller
ce13748eae Restore 1.5.x babel loading order (bug 5024)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25632 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-15 13:08:27 +00:00
Richard Heck
f854295dab 'Default'-->'Empty' in Bo's recent commit. Default means something else in the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25556 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-11 03:41:56 +00:00
Bo Peng
763ef015ce Improve the local layout feature by better handling of unknown textclass, unknown layouts, and switch between textclasses.
* src/TextClass.h[.cpp]: add addLayoutIfNeeded() and createDefaultLayout()
	* src/Layout.h[.cpp]: add unknown_ to mark if a layout is a default layout for an unknown one.
	* src/LayoutFile.cpp: add addDefaultClass and change addLayoutFile to addLocalLayout.
	* src/Text.cpp: add unknown layouts that are not recognizable by a new textclass.
	* src/frontends/qt4/GuiToolbar.cpp: display (unknown) for unknown layouts.
	* src/frontends/qt4/GuiDocument.cpp: restore 'browse layout' button.
	* src/frontends/qt4/ui/LaTeXUi.ui: restore 'browse layout' button.
	* src/CutAndPaste.cpp: do not convert unknown layouts from pasted text
	* src/BufferParams.cpp: add a default textclass when a document with unknown textclass is loaded.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25555 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-11 02:43:02 +00:00
Enrico Forestieri
1e801d0361 Fix bug 2721
http://bugzilla.lyx.org/show_bug.cgi?id=2721


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25409 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-01 12:46:46 +00:00
Jean-Marc Lasgouttes
d3bf7155b8 rewrap long lines
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25404 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-30 11:02:21 +00:00
Jürgen Spitzmüller
d7eaaba900 ** support for CJK font argument. File Format change **
* src/BufferParams.{cpp,h}:
	- new param fontsCJK (font_cjk).

* src/output_latex.cpp:
	- use fontsCJK param.

* src/Buffer.cpp:
	- increase file format

* src/frontends/qt4/GuiDocument.cpp:
* src/frontends/qt4/ui/FontUi.ui:
	- GUI for the CJK font param

* lib/lyx2lyx/lyx_1_6.py:
	- remove font_cjk param on reversion.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25135 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-05 06:18:34 +00:00
Richard Heck
3e28f0fc57 Add some constness where we can.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24883 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-22 14:02:35 +00:00
Uwe Stöhr
b2b4cb1fe3 BufferParams.cpp: fix the order for page sizes, fileformat change is needed, fixes http://bugzilla.lyx.org/show_bug.cgi?id=4868
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24792 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-15 22:54:13 +00:00
Uwe Stöhr
2a18b2a5cc BufferParams.cpp: follow Jürgen's advice to load subfig after \PassOptionsToPackage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24753 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-13 20:46:49 +00:00
Uwe Stöhr
842587a1a6 BufferParams.cpp: load the subfig package conditionally to make it work with the caption package
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24746 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-13 01:23:50 +00:00
Enrico Forestieri
c4bcdf837a Make it less ugly and safer, as when adding to the preamble one doesn't
have to check whether \makeatletter has already been added or not.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24713 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-10 22:35:17 +00:00
Jürgen Spitzmüller
764b5cf859 support for default master document.
file format change.

This is the last feature for today. Promised.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24540 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-28 16:38:56 +00:00
André Pönitz
b35b731fbf move citation enums into header of their own
remove biblio:: namespace


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24385 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-20 15:00:11 +00:00
Richard Heck
8a69ffd3bf Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got everything, but this does compile, and it seems to work at least reasonably well. Any problems should of course be reported to the list.
For the record, this developer is sorry that the problems with this code were not noticed much earlier. It's not fun to do so much work and then have it all reverted.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24373 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-20 03:08:11 +00:00
Bo Peng
76d272da30 Embedding: revert embedding options and extra_embedded_files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24328 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-18 17:06:03 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
André Pönitz
e1453ef687 lexer cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24134 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-05 21:24:57 +00:00
Enrico Forestieri
fd0e789dea Only add \makeatletter and \makeatother to the preamble when actually needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24068 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-31 01:26:57 +00:00
Uwe Stöhr
30663a8019 Fileformat change.
Provide only one Japanese language that is encoding independent, patch partly by Koji Yokata.
This fixes http://bugzilla.lyx.org/show_bug.cgi?id=4597

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24053 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-29 23:25:40 +00:00
Richard Heck
700af7e701 Add support for document-local layout information. GUI is to follow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23913 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-24 12:31:07 +00:00
André Pönitz
6b28f08ff2 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23891 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-21 21:47:37 +00:00
Bo Peng
0f9a8fcad4 Add use_bundled_format rc entry to allow creation of new buffers in bundled format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23768 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 22:41:54 +00:00
André Pönitz
f2c9b56fb4 cosmetics/#include cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 00:22:54 +00:00
Bo Peng
48f9225e27 Embed: allow the use of embedded layout and class (.cls, .sty) files.
* src/EmbeddedFiles.h|cpp: add validate() function to validate loaded .lyx file.
	* src/LayoutFile.h|cpp: add Layout_Type parameter to addLayoutFile to load an embedded layout.
	* src/BufferParams.h|cpp: read layout from temp directory, then local directory.
	* src/frontends/qt4/GuiDocument.cpp: handle embedded layout type
	* src/LyXFunc.cpp: handle embedded layout when a layout is re-read.
	* src/Buffer.cpp: validate after a buffer is read. handle exceptions properly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23667 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-11 18:31:38 +00:00
Bo Peng
932998494b Embedding: add option \extra_embedded_files to buffer params. This increase
LyX file format to 318. The Embedded files panel of document settings has
been simplied, with working add and remove buttons. Note that bease BufferParams
lacks buffer path information, extraEmbeddedFiles are vector<string>, instead
of EmbeddedFileList (as previously planned).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23606 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-09 23:04:14 +00:00
Richard Heck
6edb3984bf BaseClassList --> LayoutFileList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23532 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 03:53:21 +00:00
Richard Heck
9dfbadcb2c Improve handling of local layout files. There are two bugs here that still need fixing, though: 4593 and 4594.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23372 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-01 16:32:16 +00:00
Richard Heck
2b3bd7b5f4 This is the last of the commits that hopes to enforce the distinction between "layout files" and "document classes" that was introduced by the modules code. For the most part, these changes just refactor code from TextClass between: (a) a TextClass base class; (b) a LayoutFile subclass, which represents the information in a .layout file; and (c) a DocumentClass subclass, which represents the layout information associated with a Buffer---a LayoutFile plus Modules. Methods from TextClass have been apportioned between the three classes depending upon what is needed where, and signatures have been changed where necessary so that the right kind of class is required.
At this point, there are no simple TextClass objects in the main LyX code, and it is impossible to create them, since the TextClass constructor is protected. Only LayoutFile and DocumentClass objects can be constructed, and for the most part these are constructed only by their respective containers: BaseClassList and DocumentClassBundle. There is an exception: LayoutFile does have a public default constructor, but if anyone knows how to make it go away, please do.

There will be one or two more commits along these lines, but these will be simple renamings. For example, BaseClassList should be LayoutFileList.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23343 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-29 02:45:33 +00:00
Richard Heck
2c382f2f47 More work towards type safety regarding TextClass's. A couple bugs have been fixed here, too, discovered along the way.
Note that we no longer rely upon BaseClassList to be sorted. This would allow layout descriptions---such as "article (AMS)"---to be translated, and the ordering of the list in Document>Settings will then follow the translations.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23334 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 21:04:55 +00:00
Richard Heck
224e6ad0a3 baseclasslist --> BaseClassList singleton. Prep for further type safety.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23322 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 14:49:01 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
Richard Heck
b2475f6625 Replace boost::shared_ptr<TextClass> with a global cache of sorts of the TextClass's used by Buffers---or, more strictly, constructed by BufferParams::makeTextClass(). The action is in TextClass.{h,cpp}.
I've left the typedef in TextClassPtr.h. At the moment, it's kind of silly. But I've left it mostly because it helps to identify where the TextClass's stored in the TextClassBundle are used, and maybe it'd be worth having some sort of strong typedef like the one for BaseClassIndex here.

I need to check whether the textClass_ member of InsetCollapsable is needed now. I think not.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23232 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 19:31:31 +00:00
Richard Heck
4c6180d209 Try to make the distinction between base classes and text classes clearer in the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23198 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:59:49 +00:00
Richard Heck
69de04feac Restore Andre's TextClassIndex, but now in the form of BaseClassIndex. It seems worth distinguishing more clearly than we do at the moment between TextClass's and BaseClass's. The latter correspond to *.layout files; the former are based upon *.layout files but may be modified by modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23197 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 16:29:40 +00:00
Richard Heck
c7afa2d658 More cleanup from Andre.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23194 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:44:11 +00:00
Richard Heck
ebd4f002af Andre's s/getBaseClass/baseClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23191 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:12:41 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Richard Heck
4ab6f265e9 Add support for column separation in page margins. Fixes bug 3337.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23059 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-19 05:24:48 +00:00
Jürgen Spitzmüller
ebc4649508 Fix a crash following the input of an invalid paragraph separation value in the document settings dialog (bug 4556).
* src/frontends/qt4/GuiDocument.cpp:
	- disallow input of defskip length without actual length value.

* src/BufferParams.cpp (readToken):
	- there might be documents with the invalif "\defskip defskip" param. Reset this to "\defskip medskip".

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23022 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-15 14:13:05 +00:00
Richard Heck
b76e95b942 Fix TextClass::read API. Also some cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22988 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-14 03:38:08 +00:00
Jean-Marc Lasgouttes
11bea5a763 Use a set<string> instead of a vecctor<string> for list of features. This
allows to simplify the code to some extent.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22734 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-01 15:12:04 +00:00
Jürgen Spitzmüller
f62fbd05d2 * src/BufferParams.{cpp,h}:
- (paperSizeName): add missing paper sizes. Add an argument to the function
	  that returns context-sensitive information (depending on the purpose)
	- (paperSizeName): Do not hardcode "letter" for default paper size (bug 2098).
	- (dvips_options): pass purpose DVIPS to paperSizeName
* src/Converter.cpp:
	- (dvipdfm_options): pass purpose DVIPDFM to paperSizeName.
* src/Format.cpp:
	- (view): pass purpose XDVI to paperSizeName (fix bug 4432).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22664 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-25 12:54:25 +00:00
Pavel Sanda
2eb75da023 PDFoptions: improve the functionality in case the hyperrref is
already loaded by the textclass.

Some corner cases still missing (see fixme and link below).
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134643.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22660 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-24 01:20:51 +00:00
Jean-Marc Lasgouttes
0df54152bc Move spacing code around (and fix a bug)
* LaTeXFeatures.cpp (getPackages): remove some specific spacing code;
	move listings support to simplefeatures array.

	* src/Spacing.cpp (writeEnvirBegin, writeEnvirEnd): code factorization
	(writePreamble): new method containing former code from LaTeXFeatures;
	use \setSpacing instead of \setSingleSpacing.

	* src/BufferParams.cpp (validate, writeLaTeX): handle spacing here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22644 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-22 08:41:45 +00:00
Jürgen Spitzmüller
804e912910 Fix hyperref-soul conflict and sanitize hyperref management
* src/BufferParams.cpp:
	- always require hyperref if it's used.
	- only call PDFOptions::writeLaTeX if hyperref is required
	  (and not provided by textclass).
* src/PDFOptions.{cpp,h}:
	- (writeLaTeX): remove unneeded hyper_required argument
* src/LaTeXFeatures.cpp:
	- special definition for pdflatex ct markup when hyperref is used
	  (fix bug 4504).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22629 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-19 11:17:12 +00:00
Richard Heck
7c28905b17 This commit adds some new functionality to the modules stuff. In particular, it introduces the concept of "required" and "excluded" modules: A given module may require one of some list of modules, or it may be incompatible with some other modules. (Complex Boolean combinations are not supported!!) These facts can be noted in the module file, and the UI responds appropriately: Required and excluded modules are noted in the description, and the "Add" button is enabled only if at least one of the required modules has already been selected and no excluded module is selected. Getting this to work involved a fair bit of cleanup of the existing code---including ways Angus, I think, had already pointed out were required---and also involved changing the syntax of the headers of the module files, but in ways that are probably best anyway.
None of the extant modules require any other modules, but the Theorem modules all exclude one another. (See the screenshot.) When I modularize the AMS classes---that is the next task---we'll have requires.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22456 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-09 18:51:02 +00:00
Jürgen Spitzmüller
9e5eebc14c *** Requires tag for classes, layouts and custom insets ***
* src/TextClass{cpp,h}:
	- implement Requires tag for class and InsetLayout.
* src/Layout.{cpp,h}:
	- implement Requires tag for layouts.
	- increase layouts format to 6.
* src/Paragraph.cpp:
	- request required features for paragraph layouts.
* src/LaTeXFeatures.cpp:
	- add some packages needed by modules.
	- remove Preamble method for InsetLayout. This is now done
	  in InsetFlex::validate.
* src/BufferParams.cpp (validate):
	- request required features for the class.
* src/insets/InsetLayout.h:
	- new member "requires".
* src/insets/InsetFlex.{cpp,h}:
	- implement validate method and request required features and preamble snippets.

* lib/layouts/*.{layout,module,inc}:
	- increase layouts format to 6.
	- use Requires tags in some modules (more can be done later).

* lib/doc/Customization.lyx:
	- document Requires tag.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22414 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 16:59:10 +00:00
Richard Heck
0fce3ff6bd Pass by const reference. Thanks Andre and Peter.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22405 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-06 18:17:25 +00:00
Richard Heck
ef86256c39 Remove commented out code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22402 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-06 17:23:19 +00:00
Richard Heck
9a7cd29f5b Rationalize the handling of makeTextClass().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22388 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 17:04:56 +00:00
Richard Heck
80e98c5b71 Implement checks for available modules both in BufferParams and in the gui.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22387 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-05 16:56:30 +00:00
Jean-Marc Lasgouttes
6376641f4e Move part of Buffer::validate into a new method BufferParams::validate.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22146 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-14 14:51:47 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
André Pönitz
cbaca4a129 fix typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22071 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-10 23:14:09 +00:00
Jürgen Spitzmüller
35cb68ba14 * src/BufferParams.cpp (readToken):
- initialize pair<bool, lyx::textclass_type> pp.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21939 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-03 16:42:43 +00:00
Jürgen Spitzmüller
433eda2cca * src/BufferParams.cpp (readToken):
- fix assertion introduced with rev. 21800 (bug 4395).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21925 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 17:59:53 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
Abdelrazak Younes
c886bc68c2 * FileName:
- introduce changeExtension(): the goal is to replace progressively the one in filetools.cpp
- get rid of internal_path() checking for Win32 as the path is always normalized with slashes with QFileInfo.

* BufferParams: get rid of filepath member. This was used only once and was fixing a path in BufferParam was wrong anyway.

* Buffer::filePath(): always regenerate instead of caching it in BufferParams.

 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21847 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 15:25:07 +00:00
Bo Peng
3f30fe7421 If there exists a local layout file, use the local copy instead of the system one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21800 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-26 15:45:54 +00:00
Jürgen Spitzmüller
fa07bad49c * LaTeXFeatures.cpp (useLanguage):
- require the CJK package for CJK languages.
* BufferParams.cpp (writeEncodingPreamble):
	- load CJK package if required.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21652 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 12:37:18 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
André Pönitz
437693005c *sigh*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21408 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 18:30:05 +00:00
André Pönitz
09df753df4 pimpl not needed here
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21395 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 23:42:27 +00:00
André Pönitz
a8cd9a4b8f cosmetics. mainly replace #include "dostring.h" by #include "strfwd.h"
in header files when possible. Adjust .cpp files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21358 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 22:17:22 +00:00
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
André Pönitz
3b3ac62e58 create some helper functions in FileName
cosmetics;


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21022 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-17 22:21:50 +00:00
Uwe Stöhr
7075eaadef The huge URL patch:
- rename the lfun to href-insert.png
- rename the files to Hyperlink...
- the former URLUi produces now \href commands (hyperref)

Only missing thing is the lyx2lyx conversion routine - this will be done by Richard

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20950 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 19:06:09 +00:00
Uwe Stöhr
0b6fa6ef30 BufferParams.cpp: - load the japanese package only when japanese is not already provided.
- fix japanese babel handling

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20929 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 23:31:16 +00:00
Uwe Stöhr
392ddbfdbd BufferParams.cpp: babel must be loaded even when there is no given language parameter, due to the Japanese support package that does this later
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20880 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 23:03:14 +00:00
Uwe Stöhr
1484691640 BufferParams.cpp: empty the encodings when the Japanese plain encodings are used to prevent that inputenc is used (according to the suggestion by JMarc)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20879 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 22:26:17 +00:00
Uwe Stöhr
71ea6e7a8b BufferParams.cpp: next step for proper traditional Japanese support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20861 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 00:59:16 +00:00
Uwe Stöhr
ae0f514870 support for the Vietnamese languages
fileformat increased to 291

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20738 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-04 23:20:39 +00:00
Uwe Stöhr
6081aa09fa BufferParams.cpp: add comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20591 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 15:16:45 +00:00
Uwe Stöhr
c57143d682 BufferParams.cpp: change the package loading to:
former                  now
needed packages         needed packages
---                     babel
hyperref                hyperref
LyX-specific stuff      LyX-specific stuff
user preamble           user preamble
babel                   ---

This is needed because hyperref should be loaded after babel but has to be loaded before the LyX-specific stuff. The LyX-specific stuff has to be loaded before the user preamble.

It shouldn't harm to load babel before the user preamble, I even think this is an advantage because many packages need the loaded babel for  translations and the users are able to change babel translation.

The new scheme compile fine with all LyX docs and my German math manual. When you have an example where this scheme doesn't work, please shout!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20508 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-25 21:20:57 +00:00
Uwe Stöhr
39de8e95a4 BufferParams.cpp: whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20432 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-22 12:55:12 +00:00
Uwe Stöhr
9c59de3c67 PDFOptions.cpp: clean up the appearance of the parameters in the LaTeX-output
BufferParams.cpp: move the hyperref call to the right position

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20431 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-22 12:53:22 +00:00
Uwe Stöhr
f675f011be PDF-support patches by Pavel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20429 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-22 11:39:19 +00:00
André Pönitz
1b79e53ffe cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20392 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 22:42:16 +00:00
André Pönitz
3ff14b8300 Pavel Sanda's "PDFOptions" patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20389 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 22:31:18 +00:00
Richard Heck
e020bc1806 Fulfill promise to Andre: TextClass_ptr --> TextClassPtr.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20349 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-18 17:46:14 +00:00
Richard Heck
3ddc46bab0 Whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20266 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-13 22:25:37 +00:00
Richard Heck
411b7abcfa Fix crash when layout file cannot be read due to failure to call makeTextClass() in that case.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20153 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 17:50:09 +00:00
Richard Heck
ec29fd3461 Revert accidental commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20152 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 17:49:37 +00:00
Richard Heck
aebd5ebaf9 Fix crash when layout file cannot be read due to failure to call makeTextClass() in that case.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20150 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 17:46:02 +00:00
Richard Heck
8947e56702 Clarify comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20008 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 15:46:03 +00:00
Richard Heck
d7a33bc841 This patch continues 19964. It takes advantage of the work there to simplify a few things elsewhere. First, in ControlDocument::dispatchParams(), we're setting the TextClass and then dispatching the BufferParams, which sets it again now. So we can get rid of the first call. This, however, requires loading the TextClass somewhere other than LFUN_TEXTCLASS_APPLY, which I do in BufferParams::setBaseClass(), which is when you'd actually need to do it. So I've moved some of the loading logic there. (It seemed a good idea to make setBaseClass() return whether it was successful, then, though this isn't used at the moment.)
That makes another simplification both possible and desirable. For some reason, whenever you change the Document Class combobox in Document Settings, LyX tries to read whatever you choose _before_ you try to hit "Apply". Why? I see no good reason. You get the warning earlier that way, but maybe you weren't going to try to load it anyway and were going to change your mind. So I have removed that behavior, in which case you'll get the warning when you try to apply the parameters. This means we can also remove ControlDocument::loadTextclass().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-01 04:03:24 +00:00
Bo Peng
cc6fe67c35 Embedding feature patch 3: basic gui support
*  lib/ui/stdmenus.inc: add menu item embedded files
	*  src/BufferParams.cpp: set default embedded status to false
	*  src/EmbeddedFiles.h|cpp: add a few member functions
	*  src/frontends/qt4/Dialogs.cpp: add embedding dialog
	*  src/frontends/qt4/GuiEmbeddedFiles.h|cpp: embedding dialog
	*  src/frontends/qt4/ui/EmbeddedFilesUi.ui: embedding dialog
	*  src/frontends/controllers/ControlEmbeddedFiles.h|cpp: embedding dialog control
	*  src/frontends/qt4/Makefile.am: build system update
	*  src/frontends/controllers/Makefile.am
	*  development/scons/scons_manifest.py


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19953 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 15:42:35 +00:00
Bo Peng
692363bbca Embedding patch two: read/write embedded files'
*  src/insets/InsetGraphics.h
	*  src/insets/InsetExternal.cpp
	*  src/insets/InsetGraphics.cpp
	*  src/insets/InsetInclude.cpp
	*  src/insets/Inset.h
	*  src/insets/InsetInclude.h
	*  src/insets/InsetExternal.h: register embedded files
	*  src/EmbeddedFiles.h|cpp: core of embedded files
	*  src/Buffer.h|cpp: read/write embed file
	*  src/BufferParams.h|cpp: embedded flag
	*  src/Makefile.am
	*  po/POTFILES.in
	*  development/scons/scons_manifest.py: build system updates


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19924 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 20:46:42 +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
Richard Heck
6e93e77f22 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 first patch does some reworking of the infrastructrue. We need to distinguish between the TextClass that a particular document is using and the layout of that document, since modules, in particular, can modify the layout. The solution adopted here is to add a TextClass pointer to BufferParams, which will hold the layout. The layout itself is then constructed from the TextClass the document is using. At present, this is completely trivial, but that will change when modules are added.

The pointer in question is a boost::shared_ptr. This is needed because CutAndPaste saves a copy of the layout with each cut or copied selection. We cannot assume the selection vanishes when the document is closed, so there are two options: (i) keep a list of all the layouts that have ever been used by any document; (ii) used some kind of smart pointer. The latter seems preferable, as the former would waste memory. More importantly, the use of a smart pointer allows modules to be modified on disk and then reloaded while LyX is running, and it will eventually allow the same for layout files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19756 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 16:41:13 +00:00
André Pönitz
2caa98bee0 disable some tests for standard C++ features; add a line counting stream for lates output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19446 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 08:57:17 +00:00
Jürgen Spitzmüller
3154def278 * src/BufferParams.cpp (writeEncodingPreamble):
- correct encoding check.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19171 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-23 16:46:26 +00:00