Commit Graph

35 Commits

Author SHA1 Message Date
Uwe Stöhr
219b5645c2 Inset files: add includes to compile with cxx11
see the list thread "Re: use FindCXX11Compiler.cmake also for MSVC"
2015-12-10 01:15:16 +01:00
Georg Baum
8a047a4112 Add missing intializations
These were found by cppcheck:
Member variable 'x' is not initialized in the constructor.
The crash #9788 would not have happened if this had been done earlier.
2015-10-10 21:04:28 +02:00
Georg Baum
59b705dcd9 Move global variable to preamble
This will be needed in the future, when I need to parse the preamble twice
for detecting japanese encoding (bug #8218).
2015-01-06 19:21:34 +01:00
Georg Baum
c1c439b94d Handle unknown table column specifiers (bug #9311)
Previously tex2lyx did ignore table columns if the column specifier was
unknown. This can lead to data loss, and now it does not ignore these columns,
but assumes that the column specifiers use only once character. This can still
lead to data loss, but less often.
2014-12-29 22:54:06 +01:00
Jean-Marc Lasgouttes
be42f1398d Fix bug #5408: tex2lyx cannot handle verbatim code
- Implement catcode setting in Parser
- add a new Parser::verbatimStuff method that reads verbatim contents
- use this method to parse "verbatim" environment.
- use it to parse \verb too.
- rename Parser::verbatimEnvironment to ertEnvironment.

TODO:
- use for other verbatim-like cases (Sweave chunk, lstlisting...)
- factor out the function that outputs ERT (including line breaks)
- maybe implement Parser::unparse (if needed)
2013-02-04 10:25:58 +01:00
Jean-Marc Lasgouttes
f775add258 Whitespace only 2012-12-14 12:33:39 +01: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
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
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
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
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
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
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
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
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
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
Abdelrazak Younes
27f3327fa1 tex2lyx: disambiguate duplicate trim() function by reusing trim() from src/support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39870 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-16 08:22:20 +00:00
Georg Baum
0f3c4c2f04 Fix several false errors "stray '}' in text" that were caused by
misinterpreting "\}" as "}" when it occured inside a pair of unescaped
braces, like in "\code{@\{*\}r||p\{1in\}@\{*\}}".
The reason for this bug is that Token::character() behaves differently in
tex2lyx than in mathed. See the comment in Parser.h for a more general fix.
For now I played on the safe side and only changed those places where I
definitely know that the old code was wrong.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37117 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-05 20:32:45 +00:00
Georg Baum
812c27d793 Improve tex2lyx roundtrip of test-insets.tex:
- Replace special verbatim commands by standard LaTeX, since it would be
  extremely difficult to make tex2lyx understand them)
- Comment duplicated \bibliography{xampl}, since LaTeX cannot handle two
  \bibliography calls
- Fix a regression with spaces after commands, introduced in r36943
- Parse \multicolumn with space/comments between two arguments correctly
- Parse optional arguments correctly if there are space or comments between
  the command and the argument
- Remove duplicate "LyX" phrase handling (I overlooked that in r37052)
- Add new commands created with \let to the list of known commands. This is
  needed to parse the arguments correctly


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37064 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-02 15:39:48 +00:00
Georg Baum
5247a0ed1c Increase tex2lyx output format to 334.
331:     Set the caption flag for longtable caption rows
332:     Nothing to do (empty lyx2lyx conversion)
333:     Nothing to do (tex2lyx did already use the new style names because it
         uses the current layout files)
334:     Nothing to do (tex2lyx did already produce the new format, since it
         used the LaTeX paper names also in the output and did not suffer from
	 bug 4868)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37012 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-27 18:10:23 +00:00
Georg Baum
e4efa00f8c Increase tex2lyx output format to 322.
321: Move leftlines/rightlines from column headers to cells
322: Nothing to do (tex2lyx does not produce plain layouts)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37009 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-27 17:56:48 +00:00
Georg Baum
5e5a078503 Increase tex2lyx output format to 277.
Nothing to do, since tex2lyx does not produce the invalid tables.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36847 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-12 20:01:53 +00:00
Georg Baum
c0b20c1c92 increase tex2lyx output format to 265
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36841 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-12 14:33:34 +00:00
Jean-Marc Lasgouttes
337c6d1577 First serious step for utf8 file format format. tex2lyx is now able to
read utf8 tex documents and translate them to lyxformat 249.

There is still no code to discover the encoding and use it, but it is the
easiest part (I hope).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27563 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 17:02:00 +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
Jean-Marc Lasgouttes
9b4a26a252 rename assert.h to lassert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24559 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-30 08:26:40 +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
Richard Heck
ac6e5b871c Get rid of the boost::shared_ptr's in TextClass.{h,cpp}. It's not clear what these were really doing here now, and they will cause bugs now that DocumentClass objects are more dynamic.
Abdel suggested it might be worth pimpl'ing the FloatList and Counter objects, to get the header dependencies back down.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23530 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 03:41:12 +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
Uwe Stöhr
97aa558cac support for \pagebreak:
- rename former "pagebreak" to "newpage" since it produces a \newpage
- new LFUN
- menu entry
- tex2lyx support
- fileformat change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21732 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 02:10:00 +00:00
Bo Peng
04591a6e34 Rename .C ==> .cpp for files in src/tex2lyx, part two
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18023 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:53:30 +00:00