Commit Graph

394 Commits

Author SHA1 Message Date
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
Jean-Marc Lasgouttes
e4c9689906 forgot that
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27458 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 15:14:44 +00:00
Jean-Marc Lasgouttes
6419342fbf let Parser store the stream it is working on
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27457 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 15:09:59 +00:00
Jean-Marc Lasgouttes
fa3ea10057 break parser::tokenize in parts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27454 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 14:38:27 +00:00
Jean-Marc Lasgouttes
0aaed41dd7 rename man page
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27453 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 14:36:52 +00:00
Jean-Marc Lasgouttes
357a148282 remove stuff that was actually relevant to reLyX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27445 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 13:20:33 +00:00
Jean-Marc Lasgouttes
3caf85d510 and this...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27444 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 13:11:44 +00:00
Jean-Marc Lasgouttes
c8b2234f39 move test files in their own directory
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27442 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 13:04:15 +00:00
Jean-Marc Lasgouttes
363d5e2d36 remove unused method
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27438 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-15 11:46:05 +00:00
André Pönitz
95cd89f6d6 revert accidental change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27428 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 16:33:15 +00:00
André Pönitz
7ffa606290 introduce unneeded whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27426 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 16:16:45 +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
ee81b844d3 remove useless comments in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27016 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-21 21:27:12 +00:00
André Pönitz
cb5a9b28d7 be kind to XaFooBarTeX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26871 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-12 19:19:41 +00:00
André Pönitz
01bb9e2a57 fix problem with non-recognized utf8 encoding that lead to broken .lyx
files


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26844 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-11 16:07:14 +00:00
Jean-Marc Lasgouttes
1899c81d3e whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26608 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-29 08:30:41 +00:00
Uwe Stöhr
8f76634f10 tex2lyx/preamble.cpp: fix bug 19, patch by JMarc (I'm working with this patch for 4 months now and it is really stable.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26603 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-28 20:15:08 +00:00
Jürgen Spitzmüller
63ca4f8caa * update tex2lyx man page, mostly done bei Uwe (bug 2770).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25929 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-28 07:52:27 +00:00
Uwe Stöhr
b3531611e7 tex2lyx/test-insets.tex: add test for bounding box and clipping of \includegraphics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25919 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-27 21:44:24 +00:00
Jean-Marc Lasgouttes
3b99db73e4 Remove our in tree gettext version and replace with a mechanism to import it.
* autogen.sh: use autopoint to poulate the gettext code; simplify.

	* po/Rules-lyx: move the LyX-specific code of the Makefile here.

	* configure.ac: add magic incantation telling autopoint to import 
	gettext 0.16.1. Generate config.h in toplevel directory to please 
	gettext.

	* src/tex2lyx/Makefile.am:
	* src/client/Messages.cpp: compile fix

	* remove all files that came from a gettext distribution.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25167 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-06 15:25:55 +00:00
Abdelrazak Younes
31517754ad fix MSVC warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24864 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-20 11:24:12 +00:00
Uwe Stöhr
fdea53d34b tex2lyx/preamble.cpp: handle also onecolumn and oneside as discussed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24811 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-17 15:11:41 +00:00
Uwe Stöhr
8c8a2794b3 tex2lyx/preamble.cpp: support for the \geometry settings and the paper orientation, fixes bug 4826.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24809 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-16 20:25:44 +00:00
Uwe Stöhr
001c77d65b tex2lyx/preamble.cpp: cosmetics again
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24793 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-15 23:02:53 +00:00
Uwe Stöhr
f185e01c68 - tex2lyx\box-color-size-space-align.tex: add preamble options to test the geometry settings
- tey2lyx\test-structure.tex: add paper size document class option for testing

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24791 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-15 22:48:54 +00:00