Commit Graph

72 Commits

Author SHA1 Message Date
Richard Heck
eba17c9763 Update documentation for parser tools a bit. 2013-05-23 16:11:47 -04:00
Uwe Stöhr
d750b6610f fix some more typos spotted by Yuri 2013-04-19 23:26:58 +02:00
Juergen Spitzmueller
ef541d474c Improve overprint conversion.
Deeply nested sequences are still problematic.
2012-12-20 13:29:04 +01:00
Juergen Spitzmueller
4f36061811 Proper support for beamer overprint environment
This has a list-like structure (with \onslide item commands). The previous implementation was rather useless, since it required lots of ERT. Since the new implementation is so different, we use ERT for conersion/reversion.

The lyx2lyx routines are not yet perfect, though.
2012-12-19 19:33:39 +01:00
Juergen Spitzmueller
d073cfb458 Support for beamer block arguments (#3280) 2012-12-09 17:19:21 +01:00
Juergen Spitzmueller
95934b8d27 Some refinements in the lyx2lyx methods 2012-12-09 13:41:42 +01:00
Juergen Spitzmueller
280861cd7d Consider paragraph params when placing arguments at paragraph start (#8449) 2012-12-09 11:40:14 +01:00
Juergen Spitzmueller
f8df33c2fd Fix unused get_containing_inset and get_containing layout parser methods and use the latter 2012-12-03 08:42:26 +01:00
Georg Baum
efa0f19836 More sensible longtable caption handling (needed for bug #7412)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40522 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 21:27:17 +00:00
Georg Baum
3da2eb41aa did anybody test this?
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40520 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-18 17:48:16 +00:00
Pavel Sanda
aef6b16811 Update FSF address, patch from cornelisbb, #7735.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39523 a592a061-630c-0410-9148-cb99ea01b6c8
2011-08-25 23:10:36 +00:00
Pavel Sanda
1246a70abd Update years
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37284 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-21 13:24:23 +00:00
Richard Heck
22c7c7b144 Another try at multirow reversion. What makes this so hard is that we
have to account for the possibility of tables within tables.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36230 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-10 13:41:43 +00:00
Richard Heck
cbbc3d34e3 So I now understand why find_token_exact is called what it is, but it
does not do what it is supposed to do, in general. Still, I guess it is
best left as it is.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36129 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 17:09:43 +00:00
Richard Heck
1702cc1fa2 At least rename this argument to something that makes sense.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36128 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 17:02:26 +00:00
Richard Heck
3f47eb1883 More documentation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36127 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:59:27 +00:00
Richard Heck
6cc1d31e38 Just a bit of safety here.
This 0 default for end is wrong. You should be able to do:
  find_token(lines, token, 0, 0)
and have that return -1. As it is, this is equivalent to:
  find_token(lines, token, 0, len(lines))
But I am afraid to change the default, in case something in lyx_1.2.py
relies upon it somehow.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36125 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:43:30 +00:00
Richard Heck
f93c44791d Use del_token where it makes sense to do so.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36124 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:33:29 +00:00
Richard Heck
b1c11faf7e This is the del_token that would be helpful.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36123 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:22:26 +00:00
Richard Heck
fbd0436847 Begin a bunch of comments on the parser tools. You can look through the
file, but it is more helpful to have them summarized here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36121 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:18:20 +00:00
Richard Heck
665c9d78d5 Add two new routines to parser_tools. Somewhere along the way, I wished
I had these. I'm not going to go back and change more code, but these
will be worth having later.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36120 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 16:04:17 +00:00
Richard Heck
d13394a73b Rename and restructure get_containing_inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36117 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 15:18:47 +00:00
Richard Heck
0e9a0224c1 New routine: get_quoted_value.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36113 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 15:11:37 +00:00
Richard Heck
23499e63ba Move get_value_string to lyx_1_6, since it is only used there. A more
suitable replacement is forthcoming.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36112 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 15:07:32 +00:00
Richard Heck
cd99f162b3 Simplify the get_value routines a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36103 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 14:26:14 +00:00
Richard Heck
859468234f Comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36100 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 01:24:38 +00:00
Richard Heck
6628aec30c This routine simply does not do what it claims to do in the comment. And
I cannot see why one would want to do what it actually does. The way it
is used in the code assumes it behaves as it now does, so far as I can
see. In particular, if we find:
	option "some string"
with the call:
	get_value(document.body, "option", i)
then this will return '"some'.

Someone please tell me if I am wrong.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36099 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 01:20:50 +00:00
Richard Heck
e0227fa396 Make sure we don't go beyond the end of the lines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36096 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-05 01:03:30 +00:00
Richard Heck
0db238a371 Factor out some common code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36084 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-04 17:39:36 +00:00
Richard Heck
f4190c9e23 Update header.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36066 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-04 15:45:51 +00:00
Richard Heck
5e4493d97b Move generally useful parser routines to parser_tools.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36065 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-04 15:44:32 +00:00
Uwe Stöhr
17c3888d25 lyx2lyx: lyx2lyx: lyx_1_6.py, parser_tools.py:
add some comments


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24246 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-12 13:54:30 +00:00
Uwe Stöhr
c594c4d561 lyx2lyx: lyx_1_6.py, parser_tools.py:
add a conversion routine for the PDF options, fixes http://bugzilla.lyx.org/show_bug.cgi?id=4612

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24245 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-12 13:48:17 +00:00
José Matox
6c57005797 fix bug 4639
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23813 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-18 19:41:50 +00:00
Georg Baum
2d6bc1d0aa Avoid endless loops, e.g when an end_deeper is missing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17225 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-16 18:33:36 +00:00
José Matox
de0c8aef7c Give to get value a default argument,
if the value is not found the default value is returned.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14556 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-07 13:59:01 +00:00
José Matox
552a471c99 Start to consolidate the functions in parser tools.
Add a unit testing for parser tools functions.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14536 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-02 14:25:43 +00:00
José Matox
8fc2c1dd05 * LyX.py
* lyx_1_1_5.py
	* lyx_1_2.py
	* lyx_1_3.py
	* lyx_1_4.py
	* lyx_1_5.py

	* parser_tools.py: remove functions that are not generic, i.e.
assume a specific pattern for the file format, and move them to the
places where they are used.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14503 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-27 18:30:13 +00:00
José Matox
857eb02a5c parser_tools.py (del_token): rename arguments to be coherent with other functions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14499 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-27 11:37:26 +00:00
Bo Peng
34001ec175 Remove all tabs in lib/lyx2lyx/*.py, corresponding to the added -tt option
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14285 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-01 19:16:09 +00:00
José Matox
bb23ef468d parser_tools.py (find_tokens, find_tokens_exact): replace range with xrange.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13625 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-10 15:50:31 +00:00
Georg Baum
8d914e2c52 * parser_tools.py (find_tokens_exact): new, extract tokens with
exact match
        * parser_tools.py (find_token2): rename to find_token_exact and make
        it work for tokens with spaces
        * lyx_1_4.py (revert_box, convert_collapsable, revert_bibtopic,
        convert_float): use find_token(s)_exact instead of find_token(s).
        This does not match "FloatList" when "Float" is searched (bug 2245)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13410 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-17 09:52:13 +00:00
Georg Baum
b8227ebda0 fix bug 2026 and bug 2088
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13226 a592a061-630c-0410-9148-cb99ea01b6c8
2006-02-13 07:48:26 +00:00
Georg Baum
53a118caea fix bug 2031 (\lyxline conversion)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10466 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-20 12:47:45 +00:00
José Matox
6c79118290 Reorganised lyx2lyx, transfering it knowleadge of the file format to LyX.py,
and using it as library. The lyx2lyx script now becomes a simple cliente.
Simple fix in the UserGuide.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8941 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-15 16:29:04 +00:00
José Matox
498724d21b up to file format 236 and also fix Bug 421.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8927 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-14 18:41:27 +00:00
José Matox
2e6ef4e5d5 remove \r from line's end when present -- lyx2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8867 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-04 15:12:14 +00:00
Georg Baum
25bf63f1a1 update file format to reflect the paperpackage bugfix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8829 a592a061-630c-0410-9148-cb99ea01b6c8
2004-07-01 14:40:59 +00:00
Angus Leeming
8424214209 Store the citation engine in BufferParams as biblio::CiteEngine rather
than a triplet of bools. Results in a file format change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8752 a592a061-630c-0410-9148-cb99ea01b6c8
2004-05-13 20:44:35 +00:00
José Matox
34b9ed8ac9 whitespace, bugfixes, and convertions dependent on the document type, if need.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8749 a592a061-630c-0410-9148-cb99ea01b6c8
2004-05-11 16:13:33 +00:00