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
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
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
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
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
- slightly change FIXME comment. This only applies to the newly added condition.
The other conditions should be left untouched, even if we find a way to access the TeXRow.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27237 a592a061-630c-0410-9148-cb99ea01b6c8
(All of these commits, by the way, are just stuff I'm stumbling
across while trying to deal with the newline bug.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27216 a592a061-630c-0410-9148-cb99ea01b6c8
I tested it carefully but in case this makes problems, please revert this immediately.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27205 a592a061-630c-0410-9148-cb99ea01b6c8
for entering math accents, such that an umlauted A is translated as \ddot{A},
for example.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26577 a592a061-630c-0410-9148-cb99ea01b6c8
unicodesymbols file. Also take into account that a unicode symbol
may appear in both mathmode and textmode and thus both the mathmode
and textmode features may be required. As a side effect, the problem
that the \lyxmathsym definition is added to the preamble even when
a unicode symbol appears only in textmode is solved.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26548 a592a061-630c-0410-9148-cb99ea01b6c8
* src/OutputParams.{cpp,h}:
- new param isLastPar, indicating if the current paragraph is the last in a given inset/buffer
* src/output_latex.cpp:
- set isLastPar
* src/Paragraph.cpp:
- noTrivlistCentering also in tabular cells
- in the last par, use alignment switch instead of environment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26443 a592a061-630c-0410-9148-cb99ea01b6c8
* src/Encoding.h:
- new member hasFixedWidth()
* src/output_latex.{cpp,h} (switchEncoding):
- add option to force encoding switch
* src/insets/InsetListing.cpp (latex):
- force encoding switch only in multibyte context, switch the encoding properly,
and add some error messages.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25730 a592a061-630c-0410-9148-cb99ea01b6c8
* lib/encodings:
* src/support/docstream.h:
- JIS is not a valid iconv name. Rename to ISO-2022-JP
* src/output_latex.cpp:
- fix wrong encoding switch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25510 a592a061-630c-0410-9148-cb99ea01b6c8
if (!par->forceEmptyLayout())
but in fact things can be simplified more.
Cosmetics will follow. This patch makes the action more obvious.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24453 a592a061-630c-0410-9148-cb99ea01b6c8
The need for a LayoutPtr arises from the fact that (a) we do not want to give our clients a Layout &, since we do not want them to be able to change our Layout; but (b) we also need to be able to change which layout is ours. So we cannot store a Layout const &. Or so it seems to the compiler.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23522 a592a061-630c-0410-9148-cb99ea01b6c8
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.
I'll separately re-commit some of the cleanup here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
Also a few cosmetical changes where I xould not resist.
Would be nice if the 'modules people' could verify that their baby
is strill alive...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
from the one posted to the list.
The basic idea has two parts. First, we hard code an "empty layout"
(called PlainLayout, for want of a better name) in TextClass and read it
before doing anything else. It can therefore be customized by classes,
if they want---say, to make it left-aligned. Second, InsetText's are
divided into three types: (i) normal ones, that use the "default" layout
defined by the text class; (ii) highly restrictive ones, such as ERT and
(not quite an inset) table cells, which demand the empty layout; (iii)
middling ones, which default to an empty layout and use the empty layout
in place of the default. (This is so we don't get the same problem we
had with ERT in e.g. footnotes.) The type of inset is signaled by new
methods InsetText::forceEmptyLayout() and InsetText::useEmptyLayout().
(The latter might better be called: useEmptyLayoutInsteadOfDefault(),
but that's silly.) The old InsetText::forceDefaultParagraphs() has been
split into these, plus a new method InsetText::allowParagraphCustomization().
A lot of the changes just adapt to this change.
The other big change is in GuiToolbar: We want to show LyXDefault and
the "default" layout only when they're active.
There are a handful of places where I'm not entirely sure whether we
should be using forceEmptyLayout or !allowParagraphCustomization() or
both. The InsetCaption is one of these. These places, and some others,
are marked with FIXMEs, so I'd appreciate it if people would search
through the patch and let me know whether these need changing. If they
don't, the FIXMEs can be deleted.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22966 a592a061-630c-0410-9148-cb99ea01b6c8
* src/output_latex.{cpp,h}:
- (latexParagraphs, TeXEnvironment, TeXOnePar, TeXDeeper): pass Text element
instead of ParagraphList. This is necessary to detect whether we are in the main text.
- check if we are in the main text for language switches, if needed.
* src/Buffer.cpp:
* src/insets/InsetEnvironment.cpp:
* src/insets/InsetText.cpp:
* src/mathed/InsetMathMBox.cpp:
- adapt to new latexParagraphs definition.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22666 a592a061-630c-0410-9148-cb99ea01b6c8
directing to use memoir's capitalized latex macros.
* src/LaTeXFeatures.cpp (getPackages): act on feature "SetSpace".
* src/output_latex.cpp (TeXOnePar): ditto
* lib/layouts/memoir.layout: provide feature SetSpace, indicating that
memoir provides the setspace functionality, but with a different syntax.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22551 a592a061-630c-0410-9148-cb99ea01b6c8
* src/output_latex.{cpp, h}:
- Many changes in order to allow CJK in a mulitlingual context.
* src/Paragraph.cpp:
- Fix file encoding switch and language nesting with CJK.
* src/Buffer.cpp:
- Move the opening and closing CJK and lanaguage tags to ouput_latex.cpp.
* src/Font.cpp:
- switchEncoding call now takes runparams as argument.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22011 a592a061-630c-0410-9148-cb99ea01b6c8
Now support/* should have no dependencies on src/* anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
- prevent wrong whitespace by trailing '%' on line endings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21742 a592a061-630c-0410-9148-cb99ea01b6c8
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx
I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
- simpleTeXOnePar(): renamed to latex(), beginning of de-spaghettization by truly splitting inset and character cases.
- appendChar(), appendString(): new method for buffer reading.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21117 a592a061-630c-0410-9148-cb99ea01b6c8
- Move Changes.h out of Paragraph.h
- pimpl the inset list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8