Commit Graph

117 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
72c13323d8 Remove dependency on NO_LAYOUT_CSS #define in Layout.cpp
Remove all traces of this #define.
2013-09-29 15:26:15 +02:00
Georg Baum
7bdc34a987 Implement forced local layouts
These should be used if any new style needs to be introduced in the stable
2.1 series: If the ForceLocal flag of the style is set, it will always be
written to the document header, so that even older 2.1 versions can read
and correctly output the document.
2013-05-15 07:19:49 +02:00
Georg Baum
b79c88034e Add test for Layout::write()
When running the test, you'll get the following messages:

Testing ../../src/../lib/layouts/siamltex.layout...
Layout.cpp (268): Cannot copy unknown style `Enumerate'
Testing ../../src/../lib/layouts/svglobal.layout...
Cannot delete style `Dedication'
Testing ../../src/../lib/layouts/svjog.layout...
Cannot delete style `Dedication'
Testing ../../src/../lib/layouts/svprobth.layout...
Cannot delete style `Dedication'

These are no errors of Layout::write(), but they indicate problems in the
definition of the layout files.

Kornel, it would be nice if you could do the cmake part.
2013-05-13 21:53:28 +02:00
Georg Baum
7462381a27 Fix layout write bugs found by tests 2013-03-31 18:17:40 +02:00
Georg Baum
7cf8b9da78 Implement writing of layouts
This will be needed for layout forward compatibility, and could also be used
for a layout editor. Writing was only implemented for styles, not for complete
layout files (text class). I rarely made use of default values for missing
variables which exist in read(), so the output it a bit verbose (but more safe
against future changes). Also, some things like CopyStyle are never written for
obvious reasons.
2013-03-31 15:33:26 +02:00
Juergen Spitzmueller
41060c9723 Allow to specify default argument for layout/inset argments
This default argument is inserted iff no inset argument is present. This is useful particularly for mandatory arguments that need to have a sensible default value.
2013-02-24 11:29:21 +01:00
Richard Heck
32b0e8cbdb Change LabelType Top_Environment to LabelType Above, and LabelType
Centered_Top_Environment to LabelType Centered.
2013-02-09 13:44:06 -05:00
Richard Heck
57d8b059e0 Remove references to Counter LabelType from source code. The
intention is to use Static in its place, and we now expand the
label for these, as well.
2013-02-09 13:44:05 -05:00
Julien Rioux
2eea1590b1 Separation of the various names for encodings.
Provide functions for translating to the LyX name
of an encoding from either a LaTeX name or an Iconv
name, with the possibility to specify the package.
This is in anticipation of changing to use the LyX
name of the encoding in the .lyx file format and
allowing multiple lib/encodings entries to have
the same LaTeX name (but different packages!).

The tex2lyx parser needs to worry about the iconv
name of the input encoding, so store that instead
of the latex name.
2013-01-22 23:43:18 +01:00
Juergen Spitzmueller
e27ee60098 Reset postcommandargs as well on resetargs (bug #8500) 2013-01-13 09:16:39 +01:00
Juergen Spitzmueller
37f41fd4b5 Support for command argument placement after the workarea argument 2012-12-28 11:21:24 +01:00
Juergen Spitzmueller
c3aa718151 Make the \item command in lists customizable 2012-12-19 16:55:22 +01:00
Vincent van Ravesteijn
bec9c1325e Introduce Layout::args() and simplify code 2012-12-17 22:26:11 +01:00
Juergen Spitzmueller
dd21e57bd3 Option to auto-insert a paragraph style option, particularly useful for specific mandatory arguments (such as beamer block or frame titles) 2012-12-16 13:37:14 +01:00
Juergen Spitzmueller
e93f4d470d Possibility to specify a preset argument
This will be needed for beamer plain and fragile frame support.
2012-12-10 14:09:51 +01:00
Juergen Spitzmueller
25ef8e7eef Allow to separate menu string from label string for arguments 2012-12-09 19:15:41 +01:00
Juergen Spitzmueller
ecf18084ff allow linebreak in argument delimiter string 2012-11-30 09:13:38 +01:00
Juergen Spitzmueller
1500e44cba Support for \item arguments 2012-11-29 15:34:20 +01:00
Juergen Spitzmueller
e0f392e075 Allow for some argument visual customization 2012-11-26 09:10:14 +01:00
Juergen Spitzmueller
6f086763ae Add LeftDelim and RightDelim to the Style and InsetLayout repertoire 2012-11-25 19:10:16 +01:00
Juergen Spitzmueller
182d13ee6a Do not separate the shortcut from the label string 2012-11-23 18:26:02 +01:00
Juergen Spitzmueller
2e69c66195 InsetArgument revision, first working version 2012-11-19 14:21:02 +01:00
Lars Gullik Bjønnes
6b2232a29c src/*.cpp: reformatting to increase consistency 2012-10-28 17:42:07 +01:00
Vincent van Ravesteijn
3c0e3c16c8 Fix bug #8078: Assertions in xhtml output on Windows 2012-04-30 12:58:32 +02:00
Georg Baum
a2e8cb758b Translations for listings insets
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:

1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
   and InsetListings
2012-04-10 20:21:01 +02:00
Georg Baum
1a6c599917 Extend the notermination flag to math as well.
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
2012-03-25 15:57:38 +02:00
Enrico Forestieri
07b2898afe After r40612, the check for isFullUnicode is redundant. So, partially
revert r40607 and accordingly adapt the code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40613 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 14:27:55 +00:00
Enrico Forestieri
76c376c427 Avoid \inputencoding altogether if the buffer encoding permits
(part of bug #7800).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40612 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 01:21:00 +00:00
Richard Heck
28d7db3b9f Squash warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40608 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 03:16:46 +00:00
Enrico Forestieri
08ba2b9b45 Refine fix for bug #7800. Don't use \inputencoding with unicode backends.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40607 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 00:52:03 +00:00
Enrico Forestieri
1b6f5014ae Accomodate MSVC idiosyncrasies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39881 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-18 00:21:04 +00:00
Jean-Marc Lasgouttes
69a993312d compilation fix; a couple of warnings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39873 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-17 08:57:28 +00:00
Enrico Forestieri
8edfef001d Refine fix for bug #7800. Also allow setting the document encoding to
an encoding different from the automatically chosen one.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39823 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-09 14:45:51 +00:00
Enrico Forestieri
33c5f6d628 Fix bug #7800 (Lyx cannot create dvi with Russian)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39820 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-08 22:13:38 +00:00
Richard Heck
08f21701cf Clean up a bit. These comments are no help here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39801 a592a061-630c-0410-9148-cb99ea01b6c8
2011-10-05 21:08:42 +00:00
Richard Heck
a72642a174 Remove obsolete layout tags.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38096 a592a061-630c-0410-9148-cb99ea01b6c8
2011-03-28 15:11:57 +00:00
Georg Baum
55ef7b50b5 First version of separate translation machinery for strings that go into
exported documents.
To update the translations from the .po files, run
make ../lib/layouttranslations
from po.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38016 a592a061-630c-0410-9148-cb99ea01b6c8
2011-03-23 19:17:15 +00:00
Jürgen Spitzmüller
089927dd6f make i18npreamble work with polyglossia.
We might want to rename the babelpreamble tokens to something more general.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36773 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-08 12:10:22 +00:00
Richard Heck
a61899ffe7 Allow InPreamble to be used with Paragraph-type environments. There is
no reason not to permit this, and using it with PassThru 1 allows for a
very simple Preamble layout-type that acts as ERT for the premable. Of
course, we do have the preamble in Document>Settings, but that allows
the embedding of preamble code in branches.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36562 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-28 22:08:11 +00:00
Georg Baum
d89bde0652 Load mhchem if it is requested unconditionally, fix some typos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36425 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-21 18:07:04 +00:00
Richard Heck
0940cd77d4 Better way of doing these checks, suggested by Enrico.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36356 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 22:17:53 +00:00
Richard Heck
01ec30ca86 One more isalpha issue. Original routine also removed too much, I think.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36352 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 21:36:03 +00:00
Richard Heck
c4b7ef0bd0 Automatic CSS for left and right margins, too. Fixes indentation problem
with LyXCode environment.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35401 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 17:44:52 +00:00
Richard Heck
04d6290966 Label tag should default to div for "top environment" labels.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35394 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 14:23:32 +00:00
Richard Heck
0675c802a7 Auto-generate centering info for centered labels.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35393 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 14:18:19 +00:00
Richard Heck
a5e4f310fe Add alignment to default CSS.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35392 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 14:06:36 +00:00
Richard Heck
36765b8e21 comments and whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35391 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 13:54:56 +00:00
Richard Heck
89738020e0 Add topsep and bottomsep handling to the default CSS we generate.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35385 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 13:02:45 +00:00
Richard Heck
fc9cfc5d67 Whoops.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35382 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-15 12:20:14 +00:00
Jean-Marc Lasgouttes
6aa26820fd Introduce new tag ParbreakIsNewline in Layout and InsetLayout (not yet used)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35110 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-09 21:20:29 +00:00