Commit Graph

838 Commits

Author SHA1 Message Date
Uwe Stöhr
b6192b7c7f texlyx: re-privatize a variable as suggested 2012-06-27 22:32:36 +02:00
Uwe Stöhr
62db3d535d tex2lyx: fix some issues spotted by Vincent 2012-06-27 02:52:09 +02:00
Uwe Stöhr
2e8ed3b3b5 tex2lyx: support fontspec scale option
Preamble.cpp:
 - support the font scaling
 - improve coding style

text.cpp: - improve logic/coding style

XeTeX-polyglossia.tex:
 - add scaling
 - change document so that it is compilable using the Libertine font
2012-06-26 00:46:02 +02:00
Uwe Stöhr
d3bcdb24cc tex2lyx/text.cpp: fix bug #8223
LyX does not yet support \framebox without an option we therefore cannot use our parse_outer_box routine (this is only for supported boxes)
2012-06-25 22:58:21 +02:00
Vincent van Ravesteijn
e20238e21f tex2lyx: Remove superfluous '\n'
Instead of adding the extra '\n' to tex2lyx, we should remove it from
BufferParams.cpp because it was introduced there unintendedly in d7eaaba9
(Juergen Spitzmueller; "support for CJK font argument"; Jun 5 2008).

This partly reverts commit c2810f922665c591a7c32d4c679e58e55132505a.
2012-06-25 11:26:20 +02:00
Jean-Marc Lasgouttes
2a13b02a94 Fix bug #8220: tex2lyx crashes on single-character commands
Fix commit [aa9fed93/lyxgit]: it is never a good idea to call substr(4) on a string without checking its length. Moreover, it is even better in this case to check that the first letters are "text" as the reminder of the code assumes...
2012-06-25 11:04:56 +02:00
Uwe Stöhr
66e3ac003f fix bug #8210
we need to store the document language from the beginning of the document in the context to be able to handle all kinds of language switch commands
2012-06-24 18:24:28 +02:00
Uwe Stöhr
8e7b5eebf0 update tex2lyx todo list
- Japanese is now supported as well as CJK
- also all XeTeX issues are now ironed out
- the support for ArmTeX has been dropped meanwhile
2012-06-24 18:20:19 +02:00
Uwe Stöhr
5ad84b9fbd support non-CJK Japanese for tex2lyx
We cannot know the exact encoding and thus con only assume one (the one that Koji uses for the docs) and output a not at the beginning
2012-06-24 18:10:36 +02:00
Uwe Stöhr
adb0d7f63f support synctex in tex2lyx.cpp
- tex2lyx/Preamble.cpp/h: handle \synctex and package srcltx
- tex2lyx/test/test-structure.tex: add \synctex
2012-06-24 16:59:21 +02:00
Uwe Stöhr
5d79cd531d tex2lyx/Preamble.cpp: fix a typo 2012-06-24 15:37:51 +02:00
Uwe Stöhr
e1b181ddd4 update tex2lyx header format really to fileformat 433
- tex2lyx/Preamble.cpp/h: not all new header definitions since fileformat 413 have yet been added to texl2yx, so do it now; also change some new default values
2012-06-24 15:29:32 +02:00
Uwe Stöhr
e7d1e5b0c9 tex2lyx comment corrections
tex2lyx/Preamble.cpp, tex2lyx/text.cpp: add info about CJK languages
2012-06-24 14:39:57 +02:00
Uwe Stöhr
a3f4f2d1e3 CJK support for tex2lyx
- support as best as possible; setting a document language is however not possible
- fixes bug #4377
2012-06-24 06:38:33 +02:00
Uwe Stöhr
3943b887a8 tex2lyx/Parser.cpp: fix bug #4468: single '\' are allowed in the special case of '+' as comment argument delimiter 2012-06-23 20:00:49 +02:00
Uwe Stöhr
d37bb54e7b - language: Kurmanji is since 2009 also supported by babel; no fileformat change necessary because Kurmanji is already covered by fileformat 432
- tex2lyx/Preamble.cpp: babel support for Kurmanji and remove comment residues of ArmTeX whose support was removed by fileformat 433
2012-06-23 18:56:10 +02:00
Uwe Stöhr
7a103ba6d7 tex2lyx/Preamble.cpp: remove a FIXME, the problem was only in trunk (bug #8211) and is now fixed 2012-06-23 16:57:22 +02:00
Uwe Stöhr
89b8f380cc tex2lyx/text.cpp: 2 typos 2012-06-23 05:20:39 +02:00
Uwe Stöhr
828f7171e8 - tex2lyx: support for the polyglossia language variants
- XeTeX-polyglossia.tex: simplifications, added some more testcases
2012-06-23 04:28:52 +02:00
Uwe Stöhr
f1f63fcad0 tex2lyx/text.cpp: whitespace fix 2012-06-23 00:53:35 +02:00
Uwe Stöhr
73f0f4dd6c - Preamble.cpp: handle \setxxxlanguage with options
- text.cpp: handle the commands \textxxx with options
- XeTeX-polyglossia.tex: add 2 more testcases
2012-06-22 17:19:46 +02:00
Uwe Stöhr
79352b9882 tex2lyx/XeTeX-polyglossia.tex: add a further test 2012-06-22 15:40:40 +02:00
Uwe Stöhr
46051b57ae XeTeX-polyglossia.tex: add missing \setotherlanguages 2012-06-22 04:43:33 +02:00
Uwe Stöhr
e8f4ce5726 tex2lyx/text.cpp: \lang is already handled by parse_text 2012-06-22 04:41:08 +02:00
Uwe Stöhr
aa9fed9322 - tex2lyx/text.cpp:
- bugfix for the parsing of polyglossia's paragraph environments
 - new support for polyglossia's language change commands \textxxx
- XeTeX-polyglossia.tex: add more testcases and add a missing \end
2012-06-22 03:41:00 +02:00
Uwe Stöhr
dda1bfc949 tex2lyx/table.cpp: please Vincent as discussed 2012-06-21 13:14:16 +02:00
Uwe Stöhr
c00fd8f8be tex2lyx/table.cpp: fix bug #8204, also OK for branch or too late? 2012-06-20 23:24:35 +02:00
Uwe Stöhr
2872f35a51 - FORMAT: document latest change
- tex2lyx/text.cpp: fix a comment
2012-06-08 02:42:22 +02:00
Uwe Stöhr
7eca5d94d1 - support a bunch of new languages (fileformat change)
- tex2lyx support for
  - fontspec fonts
  - polyglossia
2012-06-08 02:37:36 +02:00
Richard Heck
ead697d4b6 Deal with memory issue reported some time ago in connection with DocumentClass
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.
2012-05-31 12:34:29 -04:00
Richard Heck
c1e3d795f6 A few more small optimizations noted along the way. 2012-05-28 18:21:22 -04:00
Jean-Marc Lasgouttes
a756403301 "Performance" fixes suggested by cppcheck
While cppcheck did not turn out any suspicious error messages, using
the "performance" flag highlighted several nitpicks in three categories
 * do not use it++ for iterators, ++it is better
 * do not use size() to test for emptyness, empty() is here
 * do not use "const T" as a function parameter, "const & T" is better

I doubt that any of these is a real performance problem, but the code is cleaner anyway.
2012-05-28 22:42:44 +02:00
Georg Baum
de00ce40aa Forgot the test case for bug #8116. 2012-05-13 18:54:14 +02:00
Georg Baum
3ded1c8506 Fix bug #8116.
The string we parse as name may contain backslashes if \csname ... \endcsname
is used. Therefore we have to output it using asInput() instead of cs().
2012-05-13 18:41:51 +02:00
Georg Baum
b86c984bf4 Disentangle amsmath and amssymb loading.
This is needed if you load a font package incompatible to amssymb manually
(see bug #5058).
2012-05-06 20:49:49 +02:00
Georg Baum
cd691081b4 Import table cells in turn environment.
This is a part of bug #8081: Translate cells in
\begin{turn}{number}...\end{turn} to native syntax.
2012-05-06 19:12:51 +02:00
Georg Baum
c90e02ff0d Import table cells in sideways environment.
This is a part of bug #8081: Translate cells in
\begin{sideways}...\end{sideways} to native syntax. The turn environment
comes in a later commit, since this one os suitable for backporting.
2012-05-06 18:47:53 +02:00
Georg Baum
7cfac958f2 Do not swallow newlines after \usepackage. 2012-05-06 17:37:09 +02:00
Georg Baum
c9f68139cb Do not swallow math comments in tex2lyx.
This is not needed, since LyX supports comments in math. Data loss with math
comments containing a backslash in LyX has been fixed as well.
The test case was found in bug #8104.
2012-05-06 16:48:44 +02:00
Georg Baum
c1965123ed Fix bug #8104 (\date argument was eaten)
I introduced this bug in r40091 where support for empty dates was added.
I also noticed that the title_layout_found flag was not properly passed down
to all variants of parse_text*. Since this is rather a global variable I
placed it into the preamble class.

The test case of bug #8104 shows other problems as well, but those are no
regressions and will be fixed separately.

OK for branch?
2012-04-19 20:46:08 +02:00
Georg Baum
27733452f7 Native support for \lstlistoflistings 2012-04-16 21:40:59 +02:00
Georg Baum
d88f7727e9 Fix tex2lyx table output.
It is broken since the latest file format update (neither did Uwe run a test
after updating the file format, nor did I after undoing my accidental change).
The reason it was broken: the bool version of write_attribute() is chosen
for "0" instead of the string version, so each table used rotate="true".
2012-03-25 18:46:00 +02:00
Georg Baum
1a6c599917 Extend the notermination flag to math as well.
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
2012-03-25 15:57:38 +02:00
Georg Baum
e63f561c42 Revert unwanted change.
I have no idea how this was created. I hadf changed this file, but reverted
it with git chekout before committing.
2012-03-25 11:25:14 +02:00
Georg Baum
6d75800f5d Fix bug #6936.
If \hline is entered, do not create an unknown inset, but increase the number
of hlines of the current row if that is allowed. The same idea is applied to
copy-paste (not part of the bug report).
This is also a test for committing via git.
2012-03-25 11:16:32 +02:00
Lars Gullik Bjønnes
c7bb190fd3 Setup .gitignore for generated files
Setting up .gitignore or .git/info/excludes is something that should
be done. Not doing it makes it a lot harder to see actual new files
that should be added.

Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org>
2012-03-22 02:16:12 +01:00
Uwe Stöhr
ea54461d85 full support for table rotations; fileformat change 2012-03-21 23:04:45 +01:00
Uwe Stöhr
7a46910f04 support for table cell rotations; fileformat change 2012-03-16 02:29:37 +01:00
Uwe Stöhr
8e72135a3f tex2lyx/text.cpp: code improvement as proposed by Georg 2012-03-15 02:10:13 +01:00
Vincent van Ravesteijn
1d721b6ea7 Fix typo and whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40909 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 21:20:25 +00:00
Georg Baum
4f6579e9d3 Update tex2lyx to file format 427. InsetIPA is not yet supported, but the
produced output is valid format 427.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40903 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-10 11:53:47 +00:00
Uwe Stöhr
408728aed9 tex2lyx: support for inline listings (fixes last part of #8066)
OK also for branch?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40860 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 22:04:22 +00:00
Uwe Stöhr
1a5891e1fd tex2lyx/text.cpp: don't parse catBegin in verbatim environments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40859 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 21:04:21 +00:00
Uwe Stöhr
9c5a8b3224 tex2lyx/text.cpp: clarify a comment and add a question
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40857 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 01:51:19 +00:00
Uwe Stöhr
80d0710422 - text.cpp: full tex2lyx support for lstlisting (support for \lstinline will follow soon)
- test/test-insets.tex: add a more advanced examples

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40856 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-05 01:45:14 +00:00
Uwe Stöhr
b2a03f4e67 tex2lyx/text.cpp: whitespace fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40853 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 14:18:33 +00:00
Uwe Stöhr
06d9238f30 test/test-insets.tex: add examples for listings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40852 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 14:06:13 +00:00
Uwe Stöhr
df95041141 - text.cpp: - fix tex2lyx parsing of verbatim environments
- Parser.cpp: - new function to parse verbatim environments
- test/test-structure.tex: updated example

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40850 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-04 13:27:53 +00:00
Georg Baum
c2748157bb Fix parsing of \sindex{stuff} and \sindex[]{stuff}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40826 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-01 20:37:34 +00:00
Uwe Stöhr
0d165bf5d6 tex2lyx/text.cpp: a fix and a clarification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40813 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-29 22:39:21 +00:00
Georg Baum
190ab4774d Import \sindex correctly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40804 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-28 20:34:50 +00:00
Uwe Stöhr
8bca3e510f - text.cpp: escape backslashes in verbatim, fix a thinko
- test-structure.tex: add verbatim testcase

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40798 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-27 00:55:57 +00:00
Uwe Stöhr
05446b232f support for verbatim: step 2: tex2lyx support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40785 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-20 23:38:13 +00:00
Jean-Marc Lasgouttes
586e0e6b8a Set use_non_tex_fonts buffer parameter and default encoding correctly when we detect that xetex or luatex is used.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40765 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-16 10:40:02 +00:00
Julien Rioux
a99960cc04 Update tex2lyx to format 424.
The type of citation engine is determined by the citation package
being used and, in the case of natbib, its options.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40593 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:41 +00:00
Georg Baum
db9e633b7f Fix bug #5906 (missing -p command) by updating the man page.
tex2lyx does not need a -p command since it detects partial files automatically.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40591 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 17:38:48 +00:00
Georg Baum
6332326cf6 Load mathtools.sty automatically (bug #7949) and make lyx2lyx reversion
more robust.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40574 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-05 20:53:48 +00:00
Georg Baum
bf3f3f9816 Second step towards a more generic package off/auto/on handling:
File format change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40563 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-03 21:26:09 +00: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
Julien Rioux
e6051e1559 Update tex2lyx to format 420. Determine the default style
from the citation package being used or from a \bibliographystyle
command in the preamble, if any>

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40499 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-14 01:11:18 +00:00
Julien Rioux
9a101c7bef Remove extra whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40498 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-14 01:08:54 +00:00
Julien Rioux
3c41715774 Remove extra whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40497 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-14 00:20:41 +00:00
Georg Baum
9b8773826c do not hardcode packages loaded by external insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40491 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-13 19:40:05 +00:00
Uwe Stöhr
6682ae0d90 tex2lyx/text.cpp: remove development residue
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40481 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-11 23:20:23 +00:00
Uwe Stöhr
2cc4d6ae25 tex2lyx/text.cpp: add a missing ',' and use LyX's method to remove the file extension (thanks Georg)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40480 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-11 23:17:02 +00:00
Uwe Stöhr
fe8c185a6e support for Australian and Newzealand as document language; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40452 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 23:58:30 +00:00
Georg Baum
bb0432d74a Beautify output of \usepckage statements (each statement is on its own line
now) and move more packages to the new exclude mechanism.
The remaining ones are not so easy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40442 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-08 20:05:51 +00:00
Uwe Stöhr
b947a8eea1 tex2lyx/text.cpp: a method to fix #7897
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40431 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:48:44 +00:00
Richard Heck
cad2ffea44 Update tex2lyx to format 418. Nothing really to do other than write
what we expect to see.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40430 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:46:15 +00:00
Richard Heck
5d2d5e8ad5 Revert unintentional commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40429 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:44:21 +00:00
Richard Heck
8ba08a53b2 Update all layouts to format 36.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40428 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 22:41:38 +00:00
Uwe Stöhr
75cbb27e5c tex2lyx Preamble.cpp, text.cpp: fix #7845 also for spreadsheet template
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40424 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-07 21:21:22 +00:00
Vincent van Ravesteijn
0b790c05b8 CMake/Win32: Add an icon to the tex2lyx executable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40375 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 12:29:24 +00:00
Uwe Stöhr
faaccd6605 tex2lyx: support for pdfpages
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40368 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-05 00:57:42 +00:00
Georg Baum
169bc143cb fix parsing of \def macros (was broken with the spreadsheet template support)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40363 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-04 16:00:00 +00:00
Georg Baum
07b2ffa469 fix preamble output in case child docs are present
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40362 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-04 15:35:59 +00:00
Georg Baum
528c984a57 Improve longtable import (part of bug #7412).
A complete fix is currently impossible because LyX assumes that all longtable
captions are in the first head.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40361 a592a061-630c-0410-9148-cb99ea01b6c8
2011-12-04 09:35:16 +00:00
Georg Baum
5a525d932f Move some more packages from unconditionally swallowing to the package
registration mechanism, so that they are only swallowed if LyX will load them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40315 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-29 20:09:40 +00:00
Georg Baum
529a018bc3 Fix parsing of stuff with ] in \item arguments (part of bug #6127)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40295 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-27 13:29:56 +00:00
Georg Baum
76c5902b40 Parse the picture variant of \framebox correctly (part of bug #6449)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40294 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-27 11:57:47 +00:00
Uwe Stöhr
2906a35663 tex2lyx: support for Spreadsheet and chess external templates
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40270 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-25 01:01:45 +00:00
Georg Baum
76e90badc0 Beautify documents created by writer2latex (see bug #5187).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40235 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-20 20:30:12 +00:00
Georg Baum
3f8a615477 Fix bug in paragraph detection (can be seen in test case of bug #5187):
If we want to look at the token after the next token, it may be needed
to call tokenize_one() twice and not only once as done in good().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40234 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-20 20:28:55 +00:00
Georg Baum
0d28af3fba make a bit room for more ifs
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40225 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-20 17:03:00 +00:00
Georg Baum
76731046f0 Fix bug #7895: Do not output lines with only a single space.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40193 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-14 21:00:47 +00:00
Uwe Stöhr
966d76f86b tex2lyx/test/test-insets.tex: add a booktabs test table
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40192 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-14 00:13:09 +00:00
Georg Baum
f077658248 Fix bug #4553: booktabs for tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40189 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-13 19:49:50 +00:00
Georg Baum
a1cef2d55a Fix bug #3036: font changes inside \markright do not escape outside their scope
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40186 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-13 16:11:45 +00:00
Georg Baum
36f7ae1207 Do not swallow geometry settings if they are given as package options and
replace home made keyval parsing with the more robust process_keyval_opt().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40185 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-13 12:23:27 +00:00
Georg Baum
8d707723b7 Fix bug #7668 (cosmetic whitespace issues)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40184 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-13 11:29:48 +00:00
Georg Baum
2a216184c4 Fix bug #7663: Misparsing of description \item with spaces
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40182 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-13 10:40:07 +00:00
Georg Baum
c8a715d855 Fix "stray '}' in text" warnings: When parsing with FLAG_ITEM the braces need
to occur in pairs.
If you change something in tex2lyx please don't commit without running the
tests and ensuring that no warnings or errors are written on stderr.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40177 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-12 18:41:44 +00:00
Georg Baum
f441663600 tabular*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40176 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-12 17:54:50 +00:00
Peter Kümmel
a1ce213291 add header guard
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40165 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-10 20:16:22 +00:00
Uwe Stöhr
ec0458ba01 tex2lyx/text.cpp: add a comment and fix a typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40152 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 22:46:30 +00:00
Uwe Stöhr
605e660d50 tex2lyx/test/box-color-size-space-align.tex: translation and a further testcase
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40151 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 22:42:51 +00:00
Uwe Stöhr
0fb02b561c tex2lyx:
- support for \makebox
- fix import of boxes without an inner box (the on-screen display was broken because of wrong default width setting)
- fix parsing of \framebox{content}, which LyX does not support yet - we have to use ERT

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40150 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 22:42:05 +00:00
Georg Baum
a3360ac3c6 Import optional argument of tabular (vertical alignment)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40147 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 18:54:15 +00:00
Georg Baum
eb882b2666 and another one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40146 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 18:17:33 +00:00
Georg Baum
b4c6c95ad9 Forgot this in r40139.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40145 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 18:17:04 +00:00
Georg Baum
491bad7b00 Distinguish between empty argument and no argument
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40141 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 17:32:15 +00:00
Georg Baum
93d6ce915f Must not output anything between p.pushPosition() and p.popPosition().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40140 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 17:16:54 +00:00
Georg Baum
0dee3eff18 Fix bug #4213: Change tracking support for tex2lyx.
Of course this will only work if output_changes was true when creating the
.tex file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40139 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 17:03:59 +00:00
Uwe Stöhr
713c14b71d tex2lyx/text.cpp: fix remaining part of bug #7843
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40136 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-06 15:06:19 +00:00
Georg Baum
7185c39fb1 \color may have an optional argument (part of bug #6567).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40134 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-04 21:24:05 +00:00
Georg Baum
292d4e3d5d Fix bug #7843: Recognize a shaded box inside a minipage correctly.
Also a warning "\end{foo} does not match \begin{bar}" is gone.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40133 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-04 21:03:51 +00:00
Georg Baum
13241e5e56 Fix bug #7846
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40116 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-31 21:31:32 +00:00
Uwe Stöhr
0e49fd22ad tex2lyx/Preamble.cpp: fix some comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40108 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-31 01:51:46 +00:00
Georg Baum
b436f71b33 Only the packages subscript and ulem if they are automatically loaded
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40097 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-30 18:51:41 +00:00
Georg Baum
f8cc30a1f2 Create mechanism to handle packages for which we only know after parsing
the complete document whether LyX will load them or not.
Use the mechanism for the color package (fixes the color part of bug #7845).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40095 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-30 18:12:49 +00:00
Georg Baum
3d3e1e58b1 Fix bug #7700 partially: The \maketitle command is not swallowed anymore,
but the title commands in the preamble are still not recognized.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40093 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-30 13:57:49 +00:00
Georg Baum
0d10ca7e6e get rid of the modules_placeholder hack
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40092 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-30 13:44:00 +00:00
Georg Baum
c93c44bf64 Fix bug #7844: \date{} in main text is recognized
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40091 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-30 13:21:06 +00:00
Georg Baum
18d18f1b8c First step towards proper handling of partially supported packages:
Convert the preamble code into a class.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40090 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-30 12:47:45 +00:00
Uwe Stöhr
73d292be90 tex2lyx/preamble.cpp: add a note
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40074 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 21:20:09 +00:00
Uwe Stöhr
5666b903ba tex2lyx/preamble.cpp: sorting and add a comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40066 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 20:11:21 +00:00
Uwe Stöhr
a493847599 tex2lyx/preamble.cpp: fix bug #7863
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40065 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 20:03:09 +00:00
Uwe Stöhr
709e428fad tex2lyx: fix for documents using Latvian, Lithuanian, Mongolian, Turkmen and/or Vietnamese fixes bug #7862
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40064 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-29 19:32:09 +00:00
Uwe Stöhr
2bf4494dc4 tex2lyx/preamble.cpp: correct a whitespace mistake I just introduced
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40052 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-28 12:49:12 +00:00
Uwe Stöhr
b8a8d5052f tex2lyx/preamble.cpp: fix bug #7861 and #7858
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40050 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-28 12:37:59 +00:00
Uwe Stöhr
a3e5f3cd47 - tex2lyx/text.cpp: a fix for subfloat support
- tex2lyx: some testfile tweaks

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40035 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-27 13:00:09 +00:00
Uwe Stöhr
51790e6321 tex2lyx: support for subfloats
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40025 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-27 02:29:03 +00:00
Uwe Stöhr
be3e3a3b22 tex2lyx/test/test-structure.tex:
- update preamble to the features used in the file
- add some floats

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40024 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-27 02:27:42 +00:00
Uwe Stöhr
e9bf232397 tex2lyx/TODO.txt: this feature is also covered by r40020
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40023 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-27 02:24:24 +00:00
Uwe Stöhr
3d1cace2bc tex2lyx: support for wrapped floats and all their possible options
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40020 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 20:53:18 +00:00
Uwe Stöhr
f397989137 tex2lyx/preamble.cpp: revert r39962 (the string initialization was already reverted)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40019 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 19:53:29 +00:00
Vincent van Ravesteijn
042d0118ae Constify some variables in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40013 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 14:04:22 +00:00
Uwe Stöhr
dc7a53aeb4 tex2lyx/text.cpp: fix 2 typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40012 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 13:37:32 +00:00
Uwe Stöhr
e8c0344791 tex2lyx: support for hyperlinks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40005 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 05:02:37 +00:00
Uwe Stöhr
f68b287be6 tex2lyx/text.cpp: code simplification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40004 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 04:14:45 +00:00
Uwe Stöhr
df95c6273d tex2lyx: support for sideway floats including their starred (wide) counterparts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40003 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 03:23:31 +00:00
Uwe Stöhr
c55326048a tex2lyx: add strike-outs etc. to the TeX testfile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40002 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 02:46:26 +00:00
Uwe Stöhr
6dccac85ce tex2lyx: fix problem that non-empty \date in the preamble would be lost
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39994 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 01:29:24 +00:00
Uwe Stöhr
0cd0f955fb tex2lyx: addendum to r39989; support for basic (predefined) colors; useful for things like \color{green}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39991 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 01:18:27 +00:00
Uwe Stöhr
7be5a98e1d tex2lyx: testfiles: the spaces are already in box-color-size-space-align.tex
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39990 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 01:16:19 +00:00
Uwe Stöhr
e9d2c866b4 tex2lyx: addendum to r39949; handle the case that LyX's defined colors are defined but not used, now it is assures that only the color is used that is actually used for \color and \pagecolor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39989 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-26 00:31:02 +00:00
Uwe Stöhr
fc75fcafbd tex2lyx: fix a typo and a whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39987 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-25 23:34:59 +00:00
Uwe Stöhr
e2d9adadaa tex2lyx: fix bug #7856
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39983 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-25 23:17:24 +00:00
Uwe Stöhr
d1d597d9cf tex2lyx: support for beraserif.sty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39979 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-25 22:37:16 +00:00
Uwe Stöhr
2de511d90c TODO.txt: restore an entry
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39978 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-25 22:24:06 +00:00