Commit Graph

418 Commits

Author SHA1 Message Date
Uwe Stöhr
1b16d1545b tex2lyx/preamble.cpp: comment out no longer used code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30169 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-19 00:00:46 +00:00
Uwe Stöhr
0aa4d9d25e tex2lyx/preamble.cpp: remove no longer used code
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30166 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-18 23:41:55 +00:00
Uwe Stöhr
1bcba82d8d tex2lyx/preamble.cpp: fix a bug reported by JMarc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30165 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-18 23:35:49 +00:00
Uwe Stöhr
8bda8d10b8 tex2lyx/text.cpp: \linebreak and \pagebreak are first supported by LyX with fileformat 300
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30106 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-15 00:33:54 +00:00
Uwe Stöhr
693b64674b tex2lyx/preamble.cpp: textcomp is also supported by LyX since we support Unicode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30105 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-15 00:33:05 +00:00
Uwe Stöhr
d69af206ee tex2lyx/preamble.cpp: forgot this in last commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30104 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-15 00:21:34 +00:00
Uwe Stöhr
affc633c38 tex2lyx/preamble.cpp:
- better whitespace preamble output (still not perfect)
- support for fileformat 258
- proper solution how to treat LyX specific preamble stuff; this solves long standing issues (the old solution failed when more than one LyX specific command was used in a file)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30103 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-15 00:16:31 +00:00
Uwe Stöhr
0eb2e5c22c tex2lyx/test/test-insets.tex: correct code for nomenclatures
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30102 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-15 00:15:13 +00:00
Uwe Stöhr
36e82b8d45 tex2lyx/text.cpp: tipo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30101 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 23:58:37 +00:00
Uwe Stöhr
868ffa3864 tex2lyx: whitespace and typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30100 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 21:29:24 +00:00
Uwe Stöhr
14021f7233 tex2lyx: support for fileformat 257: command inset instead of layout inset for captions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30098 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 14:21:20 +00:00
Uwe Stöhr
f1a2bf1c66 test/test-structure.tex: add caption with OptArg
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30097 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 14:20:22 +00:00
Uwe Stöhr
c9a726bd43 tex2lyx/preamble.cpp: support for fileformat 256
- the code for \clear***page was already there
- tex2lyx allows already to use any input encoding

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30096 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 12:39:07 +00:00
Uwe Stöhr
6f1cd6eba2 tex2lyx/preamble.cpp: using amsmath and esint automatically is safer than not to use them. The automatic usage is also our default when you create a new LyX file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30095 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 12:25:17 +00:00
Uwe Stöhr
a65af1e391 tex2lyx/preamble.cpp: support for fileformat 254: esint
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30094 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 12:21:30 +00:00
Uwe Stöhr
1e4def9460 tex2lyx:
- correct the conversion of InsetCommand
- code optimization
- support for format 253: nomenclature is now recognized

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30093 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 02:16:51 +00:00
Uwe Stöhr
6dad0a4cd7 test/test-structure.tex: add nomenclature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30092 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-14 02:14:42 +00:00
Uwe Stöhr
5858128386 tex2lyx/text.cpp: code optimization as also suggested by JMarc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30087 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-13 15:34:31 +00:00
Uwe Stöhr
ebda762af9 test/test-structure.tex: add labeling list
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30069 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-12 13:07:20 +00:00
Uwe Stöhr
f2d0a94b91 tex2lyx/test/test-insets.tex: more tests
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30060 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-11 23:56:48 +00:00
Uwe Stöhr
f8d655d4e2 tex2lyx/text.cpp: tex2lyx supports now fileformat 252
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30059 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-11 23:46:41 +00:00
Uwe Stöhr
be48e7f9e5 tex2lyx/preamble.cpp:
- support for url, varioref, prettyref
- reduce the sometimes huge amount of whitespace in the preamble after importing files

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30058 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-11 23:45:17 +00:00
Uwe Stöhr
5742cf9ce6 tex2lyx: testfiles modified as preparation for the upcoming tex2lyx work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30044 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-11 17:56:05 +00:00
Richard Heck
4df7d8ab1a A little cleanup of the layout files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29903 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-02 13:45:32 +00:00
Jean-Marc Lasgouttes
3e3179b4d4 Hopefully complete fix to bug #5935
Make several Parser methods return copies of tokens, because the
vector containing the token may get reallocated when it grows.

Revert now useless changeset 29557.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29627 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-11 11:02:25 +00:00
Jean-Marc Lasgouttes
440df1c789 (partial?) fix to bug 5935
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29557 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-07 10:09:03 +00:00
Abdelrazak Younes
33924e31ef Fix MSVC warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29511 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 13:27:53 +00:00
Enrico Forestieri
ccc77c73da Speed up FileName operator== (Georg's solution).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29498 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-02 17:12:31 +00:00
Enrico Forestieri
b0936fac4c When performing a reverse DVI search and the tmpdir is a symlink, the
DVI viewer passes back the resolved path, such that the search fails,
as internally LyX uses the unresolved path.
This patch fixes this bug by using the new method FileName::realPath
which resolves a path by getting rid of any '.', '..', or symlink
path components.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29476 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 15:18:11 +00:00
Jean-Marc Lasgouttes
0a99e817f1 Fix bug #5912: http://www.lyx.org/trac/ticket/5912
The problem was that \" was forgotten in the list of accents to check
in unicodesymbols (because it used to have its own german-centric derogatory
handling).

I took the Comprehensive LaTeX Symbols List (table 6) and added all the
missing accents.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29387 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-23 13:08:31 +00:00
Jean-Marc Lasgouttes
2e45185cd5 improve tex2lyx Usage display (on error...); describe option -e on man page; remove non-implemented -p and -r options
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29346 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-19 22:13:43 +00:00
Uwe Stöhr
8b96731805 math.cpp: fix a typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28976 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-30 01:43:40 +00:00
Jean-Marc Lasgouttes
a6d6c632fd Overhaul of the tex2lyx manpage
- make it autogenerated
- clean up the markup
- remove obsolete information
- try to update in general

Hopefully I did not break the markup...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28871 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-19 22:31:22 +00:00
Uwe Stöhr
662846f227 preamble.cpp: fix http://bugzilla.lyx.org/show_bug.cgi?id=5846
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28751 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-10 23:55:25 +00:00
Jürgen Spitzmüller
c4f0fb88f1 * tex2lyx/Makefile.am:
- add tex2lyx.1 to the distribution.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28728 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-08 10:49:06 +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
Jürgen Spitzmüller
3ccf39a084 * tex2lyx/preamble.cpp:
- fix thinko that caused tex2lyx to silently drop custom preamble entries in non-LyX-generated tex files.
	  (bug 5788). Patch from Jean-Marc.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28567 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-20 09:46:03 +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
Jean-Marc Lasgouttes
f83ae91f05 Add a new command line parameter -e that sets the default (latex) encoding.
This is overridden by any subsequent inputenc command.

The current encoding is also passed down to \input or \included files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28295 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-30 14:47:06 +00:00
Jean-Marc Lasgouttes
a4391b65ca now that tex2lyx reads the files as utf8, file names should be correct
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28294 a592a061-630c-0410-9148-cb99ea01b6c8
2009-01-30 14:42:35 +00:00
Jean-Marc Lasgouttes
632da1cc57 very basic support for switching encoding in a document (no context of grouping right now)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27721 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-27 14:16:02 +00:00
Jean-Marc Lasgouttes
c0828f5c52 small spacing bug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27599 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 23:29:11 +00:00
Jean-Marc Lasgouttes
552da336ac Now tex2lyx is able to parse stuff that is in unicodesymbols file, as well
as accents. Time will tell how robust this is.

All support for InsetLatexAccent has been removed.

I did not do the support for \inputencoding yet, because it is more difficult 
to get right...



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27596 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 23:24:56 +00:00
Jean-Marc Lasgouttes
28f43b1896 Now tex2lyx is able to set the encoding from what it reads in the preamble.
What works:
- parsing of inputenc should work
- \inputencoding is acted on in the preamble

What does not work:
- \inputencoding in the text
- all the corner cases I have not considered, and all buggy stuff in the
  'what works' paragraph
- InsetLatexAccent are still created, but I do not know when they got added
to the code.

The only notable trick in the code is that I had to disable buffering. Otherwise
the whole text was read before I had a chance to change the encoding...

Finally I remove the artificial limitation that forbid
  \usepackage[opt1,opt2]{package1,package2}



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27592 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 21:51:18 +00:00
Enrico Forestieri
d2bd215690 Fix for mingw/cygwin
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27573 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 19:18:40 +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
Jean-Marc Lasgouttes
7d9a6e19fd forgot to move one file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27550 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 14:27:01 +00:00
Jean-Marc Lasgouttes
bb04efd5a8 Now the document is not parsed at the beginning anymore.
Instead, new token are read when requested. The idea from now is
to be able to chenge encoding on the fly.

Now it is time to see whether idocstream actually works...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27489 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 20:30:45 +00:00
Jean-Marc Lasgouttes
ffafdb2bbe move the catInit call around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27481 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 19:30:58 +00:00
André Pönitz
bb12808b20 remove libtool
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27468 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 17:45:55 +00:00