Commit Graph

131 Commits

Author SHA1 Message Date
Abdelrazak Younes
8e092e6ca6 greatly simplify and comment TeXEnvironment():
* only one for loop
* uses runparams.par_end

InsetInclude and InsetIext: initialize runparams.par_begin and runparams.par_end

Except for a few additonal empty lines the LateX exports are identical for all help files. The reason for the additional empty lines is the more consistent TeXEnvironment() call.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36934 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-18 13:49:39 +00:00
Abdelrazak Younes
ffea94c5e6 latexParagraphs(): code polish.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36933 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-18 08:31:34 +00:00
Abdelrazak Younes
f48f0ad0bf latexParagraphs(): cleanup a bit and switch to a 'for' loop. Hopefully this should fix the performance problem when exporting very big document to latex.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36932 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-18 08:23:14 +00:00
Abdelrazak Younes
ca91d508b2 LaTeX export small speedup: Introduce RandomAccessList::position() and use it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36931 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-18 07:37:12 +00:00
Abdelrazak Younes
b730b1c8f8 Cleanup: TeXEnvironment doesn't need data.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36897 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-15 23:46:02 +00:00
Abdelrazak Younes
67e782190a Split TeXEnvironment() in three functions. The real optimisation is yet to come.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36896 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-15 23:39:38 +00:00
Abdelrazak Younes
1ff5754a1b get rid of TeXDeeper: this was hiding the recursiveness of TeXEnvironment without any real benefits. This will allow further simplification of the code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36895 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-15 21:48:00 +00:00
Abdelrazak Younes
811335b50c a microptimisation and a FIXME.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36894 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-15 21:11:12 +00:00
Abdelrazak Younes
fbcbeb5130 latex export optimisation step 1: There is no need for TeXOnePar to return a par iterator and to depend on that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36893 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-15 20:51:25 +00:00
Jürgen Spitzmüller
1e8bd43a70 * output_latex.cpp: fix language nesting (with polyglossia).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36775 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-08 18:25:21 +00:00
Richard Heck
fc3b06eac8 Rename a bunch of BufferParams to conform to our usual style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36524 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 18:32:29 +00:00
Jürgen Spitzmüller
fc9c1494ce further xetex disambiguation: use the flavor where the flavor is apt.
This introduces an isFullUnicode() function to OutputParams that currently only contains XETEX, but later can also contain other fully unicode-aware backends (LUATEX for instance).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36445 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 12:23:36 +00:00
Jürgen Spitzmüller
7cbeed2e40 * Introduce polyglossia support (bug 6576).
Please test this.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36433 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-22 12:10:16 +00:00
Jean-Marc Lasgouttes
b9b619641b This patch implements proper ERT behaviour for normal layouts.
In particular, it makes paragraph breaks generate single \n in latex output
when ParbreakIsNewline is true

This means that it is not necessary anymore to use newlines to break lines. 
Plain paragraph breaks can be used instead, like is done now in ERT/Listings. 
This is mainly aimed at sweave support.

lyx2lyx support courtesy of Richard Heck



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36163 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-06 15:06:19 +00:00
Vincent van Ravesteijn
222b3580d2 More include frenzy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35940 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-31 01:04:03 +00:00
Jean-Marc Lasgouttes
fde0a4bb26 spacing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35093 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-08 14:48:15 +00:00
Jean-Marc Lasgouttes
1a18cdfb39 Clean-up the code with respect to PassThru insets and layouts.
The goal is first to remove explicit testing against ERT_CODE, 
and second to allow to define layouts with the same properties as ERT insets.

This commit does not change behaviour 
* rename OutputParams::verbatim to pass_thru
* disable encoding switch inside pass_thru layouts



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35091 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-07 22:07:49 +00:00
Richard Heck
84a4ec80ab Paragraph::latex() always returned false. So remove the return value.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34676 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-15 15:49:24 +00:00
Richard Heck
c952f9a7be Fix InPreamble. I must have committed an incomplete patch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34675 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-15 15:37:39 +00:00
Richard Heck
8480d1dd9a Rename InsetOptArg as InsetArgument.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34596 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-04 22:44:58 +00:00
Richard Heck
b0097bcddb Introduce a new "RequiredArgs" tag for layouts. This functions much as
the OptionalArgs tag does and is implemented by the now misnamed
InsetOptArgs, except that its content gets wrapped in "{}" rather than
"[]". Required arguments do not actually have to be provided, but they
are always output. 

This will allow e.g. beamer's Block environment to be implemented
without ERT.

Documentation to follow.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34591 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-04 21:50:08 +00:00
Enrico Forestieri
f84a611775 Fix #6618: RTL (sub)*section after LTR text doesn't compile.
When deciding whether to switch encoding or not, the "fragileness" of
the enclosing environment (rather than that of the actual one) should
be taken into account, as we already account for the current "fragility"
by outputting the encoding switch just before switching environment.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33882 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-27 17:29:56 +00:00
Jürgen Spitzmüller
ce349ad806 Fix encoding issues in bibitems (bug #6534)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33452 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-12 16:08:30 +00:00
Enrico Forestieri
e4cff09722 Fix bug #6510: URL in the footnote will cause the `CJK' environment to terminate
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33382 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-09 14:01:21 +00:00
Jürgen Spitzmüller
425d092204 * fix spelling in comments to please John.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33262 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-29 14:44:21 +00:00
Vincent van Ravesteijn
c22298c97b Fix bug #6387: Incorrect selectlanguage command at end of document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32792 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-06 17:36:22 +00:00
Enrico Forestieri
128e349191 Restore the master language at the end of an included child document
instead of the child document language.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31665 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-18 21:48:13 +00:00
Enrico Forestieri
2245f82f96 Properly reset the stream encoding after an environment. Fixes bug #6216.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31392 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-16 20:50:40 +00:00
Abdelrazak Younes
8c053ea10c Move depthHook(), outerHook(), isFirstInSequence(), outerFont() to Text methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30957 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 18:35:39 +00:00
Abdelrazak Younes
2b9e44cb01 Move contents of paragraph_funcs.* to Text.h and Text.cpp.
The goal is to simplify the code afterwards.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30955 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:30:41 +00:00
Abdelrazak Younes
730a67e0d1 Text::Inset(): now returns a reference in order to make clear that the owner is mandatory.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30947 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 16:19:43 +00:00
Abdelrazak Younes
1919580310 Get rid of Paragraph::forcePlainLayout().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30942 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:38:55 +00:00
Abdelrazak Younes
5425c53fd1 Now that Text knows its owner, use the associated Buffer access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30941 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:29:34 +00:00
Enrico Forestieri
898c621b84 Properly restore the file encoding after a LaTeX environment with local scope.
Fixes bug #5690: Hebrew file cannot be exported to dvi or pdf.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30848 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-03 18:31:20 +00:00
Enrico Forestieri
3e9489d870 Avoid deferencing a null pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30805 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-30 03:21:04 +00:00
Enrico Forestieri
56ba7b60b1 Simpler fix for bug #5096: Language switch fails in environments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30803 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-30 00:58:37 +00:00
Enrico Forestieri
a2b706037b Revert r30800, r30768, r30767, 30766, and r30627. Soon to be replaced
with a simpler (and thus better) fix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30802 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-30 00:37:53 +00:00
Enrico Forestieri
e96dbacfee Refine fix for bug #5096: Language switch fails in environments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30800 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-28 16:15:34 +00:00
Enrico Forestieri
63f72c39be This should have gone in r30766.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30768 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-25 01:09:31 +00:00
Enrico Forestieri
1344b11e45 Move bracket to the right place, as also suggested by the indentation...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30767 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-25 00:45:52 +00:00
Enrico Forestieri
49d4119736 Smash another case of missing language switch and also avoid redundant switches.
Essentially, non-default aligned paragraphs should be treated as nested ones.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30766 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-24 22:50:32 +00:00
Enrico Forestieri
e10dc486b1 Fix bug #5096: Language switch fails in environments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30627 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 12:50:44 +00:00
Jürgen Spitzmüller
322eb96219 * Allow manual setting of bibliography indendation
that overrides bibitemWidest (bug 5960).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29840 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 08:13:56 +00:00
Jürgen Spitzmüller
737e9b2c20 start XeTeX support.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29119 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-06 06:58:30 +00:00
Jürgen Spitzmüller
d4f11c17e9 * Fix encoding problem following a Listing (bug 5783).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28830 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-17 09:25:52 +00:00
Richard Heck
2ebd679192 Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28450 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-11 17:16:05 +00:00
Georg Baum
030e249d91 fix potential problems detected by gcc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27956 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-22 18:18:47 +00:00
Jürgen Spitzmüller
17e11a930d * output_latex:cpp:
- fix some CJK nesting issues.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27665 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-22 16:40:39 +00:00
Abdelrazak Younes
4209cbc631 Tommaso patch, part 5, lots of thing to cleanup still but I'll do that afterwards.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27521 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 00:12:21 +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