Commit Graph

38 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
93cc3b9416 revert some new features so that tex2lyx outputs format 247 proper again.
The reverted features could (and should) be reapplied as soon as tex2lyx can output unicode (bug 4379).

The patch of this change can be found here:
http://bugzilla.lyx.org/show_bug.cgi?id=4379

and can be applied with -R in this case.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24557 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-29 18:11:46 +00:00
André Pönitz
835d051ae3 more Lexer;
also move tex2lyx specific code to tex2lyx


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24129 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-05 19:01:43 +00:00
Richard Heck
6f1cb456cf Improve performance of TextClass type objects by making BaseClassList and DocumentClassBundle containers of pointers rather than of objects, thus reducing the need to copy. Since these classes are singletons that live the life of the process, there's not much need to worry about memory leaks.
We take the opportunity to make TextClass objects noncopyable, nonassignable, etc.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23526 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 23:31:40 +00:00
Richard Heck
926ad3d183 Get rid of LayoutPtr.h.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23524 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 21:55:33 +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
Stefan Schimanski
3f5e1c0e27 * tex2lyx support for multiple optional argument using \newlyxcommand
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22282 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:33:01 +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
Jean-Marc Lasgouttes
a6f32927ea Fix bug 3750: this code is a kludge and should be removed when tex2lyx is
updated to support format >= 257 (with InsetCaption).

	* src/Layout.cpp (forCaption): new method. Returns a pointer to a newly 
	allocated Layout suitable for representing a caption.

	* src/tex2lyx/tex2lyx.cpp (tex2lyx): allocate a captionlayout object

	* src/tex2lyx/text.cpp: use the captionlayout object to recognize the 
	\caption command.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18962 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-02 16:02:41 +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
Bo Peng
8cc88bf1ec Rename files under src/tex2lyx
src/tex2lyx/lyxfont.C                              src/tex2lyx/LyXFont.cpp    LyXFont
src/tex2lyx/lyxfont.h                              src/tex2lyx/LyXFont.h    LyXFont
src/tex2lyx/texparser.C                            src/tex2lyx/Parser.cpp    ['Token', 'Parser']
src/tex2lyx/tex2lyx.C                              src/tex2lyx/tex2lyx.cpp  NOCLASSES
src/tex2lyx/texparser.h                            src/tex2lyx/Parser.h    ['Token', 'Parser']
src/tex2lyx/text.C                                 src/tex2lyx/text.cpp  NOCLASSES
src/tex2lyx/tex2lyx.h                              src/tex2lyx/tex2lyx.h NOCLASSES
src/tex2lyx/context.C                              src/tex2lyx/Context.cpp    ['Font', 'Context']
src/tex2lyx/gettext.C                              src/tex2lyx/gettext.cpp  NOCLASSES
src/tex2lyx/boost.C                                src/tex2lyx/boost.cpp  NOCLASSES
src/tex2lyx/table.C                                src/tex2lyx/table.cpp  NOCLASSES
src/tex2lyx/preamble.C                             src/tex2lyx/preamble.cpp  NOCLASSES
src/tex2lyx/math.C                                 src/tex2lyx/math.cpp  NOCLASSES
src/tex2lyx/context.h                              src/tex2lyx/Context.h    ['Font', 'Context']
src/tex2lyx/Spacing.h                              src/tex2lyx/Spacing.h    Spacing
src/tex2lyx/lengthcommon.C                         src/tex2lyx/lengthcommon.cpp  NOCLASSES



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18022 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:53:06 +00:00
Bo Peng
00e305c9d9 Rename .C ==> .cpp for files in src, part one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:41:58 +00:00
Georg Baum
8e6e970d7b Next step of true unicode filenames: Use support::FileName instead of
std::string at many places (not all yet).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16069 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 21:30:39 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Georg Baum
425dfd3a24 Fix bug 2289
* src/tex2lyx/text.C
	(void parse_noweb): new, parse a noweb code chunck
	(void parse_text): handle noweb <<xxx>>= and [[xxx]] constructs

	* src/tex2lyx/tex2lyx.[Ch]: new global variable noweb_mode and
	command line option to set it

	* src/tex2lyx/preamble.C
	(parse_preamble): prepend "literate-" to the textclass name in
	noweb mode

	* lib/configure.py
	(checkConverterEntries): fix literate -> lyx converter
	(checkConverterEntries): fix typo in latex -> sxw converter


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14635 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-13 09:46:28 +00:00
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Georg Baum
23a95c2293 * text.C, tex2lyx.h (translate_len): make public
* table.C (handle_tabular): translate widths to LyX (bug 2290)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13403 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-16 15:37:35 +00:00
Georg Baum
233c69505a partial fix for bug 20
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10356 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-26 11:58:43 +00:00
Georg Baum
b38d210152 better environment handling in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10185 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-14 15:19:01 +00:00
Georg Baum
38044d2cf7 fix relative file names in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9975 a592a061-630c-0410-9148-cb99ea01b6c8
2005-05-25 16:01:19 +00:00
Georg Baum
d7b224d692 fix bug 1750
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9444 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 13:22:20 +00:00
Georg Baum
9c1ace9a87 partial longtable support for tex2lyx (partial fix for bug 220)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9378 a592a061-630c-0410-9148-cb99ea01b6c8
2004-12-15 20:21:43 +00:00
Georg Baum
cfed2612eb handle natbib and jurabib packages and citation commands
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8882 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-10 09:40:53 +00:00
Georg Baum
27b0ba7483 make tex2lyx produce version 235 lyx files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8854 a592a061-630c-0410-9148-cb99ea01b6c8
2004-07-29 17:03:37 +00:00
Georg Baum
3c102d9778 improve font handling, small const fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8825 a592a061-630c-0410-9148-cb99ea01b6c8
2004-06-28 06:53:12 +00:00
Georg Baum
cb73d69ae4 improve tex2lyx paragraph and comment handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8815 a592a061-630c-0410-9148-cb99ea01b6c8
2004-06-18 06:47:19 +00:00
Jean-Marc Lasgouttes
f5d5eebe3c latest patch from Georg: support a syntax table for unsupported commands
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8104 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-19 10:35:50 +00:00
André Pönitz
e096cc5104 Georg's latest improvements
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8042 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-05 10:14:13 +00:00
André Pönitz
33f19b9ccc Georg Baum's monster patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7963 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-23 11:46:33 +00:00
Angus Leeming
ffdb0baea3 Get rid of trailing whitespace 'noise' in future patches for the
forseeable future.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7724 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 18:27:24 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00
Angus Leeming
90499e36a9 More 'standard conformant blurb' nonsense.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7573 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-19 10:04:35 +00:00
Jean-Marc Lasgouttes
c544107e32 architectural changes to tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7494 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-04 10:26:10 +00:00
Jean-Marc Lasgouttes
dd750828d5 * text.C (check_layout): \layout -> \begin_layout
(parse_text_in_inset): convenience function

	* tex2lyx.C (main): \the_end -> \end_document

	* preamble.C (end_preamble): update version number to 225

	* text.C (parse_text): replace test on "lyxcode" with test on
	LyXLayout::freespacing.
	(check_end_layout): new function, used to check whether we need to
	add an \end_layout


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7434 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-28 23:50:24 +00:00
Jean-Marc Lasgouttes
214a32a77d output \layout tags lazily
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7428 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-28 21:58:09 +00:00
Angus Leeming
812b659d89 Enable tex2lyx to read the LyX textclass and to use this info a little.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7362 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-26 00:15:38 +00:00
André Pönitz
5552f4045f make tex2lyx lyxstring agnostic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7222 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-30 11:36:08 +00:00
André Pönitz
c7a6b81cea lots of small improvements
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6838 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-23 15:14:43 +00:00
André Pönitz
c8d7cbd790 *** empty log message ***
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6830 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-17 15:05:17 +00:00