Commit Graph

1162 Commits

Author SHA1 Message Date
Richard Heck
7a584f71bd Simplify some lyx2lyx code.
Also, if the local layout we are removing is all there was, then
we can remove the entire block.
2016-12-13 22:03:59 -05:00
Richard Heck
b75c718d57 New format for changes to iopart.layout made at 91f980cf31. 2016-12-13 21:49:04 -05:00
Juergen Spitzmueller
a5ebabbb99 speed up lyx2lyx reversion for non-Hebrew documents 2016-12-13 07:30:40 +01:00
Juergen Spitzmueller
e8b1ec66fc Fix some thinkos in the revert_quotes routine 2016-12-12 10:49:08 +01:00
Juergen Spitzmueller
fceae79325 revert_quotes: consider verbatim layouts and some forgotten insets. 2016-12-10 12:54:12 +01:00
Juergen Spitzmueller
e8c932ff84 Enable InsetQuote in verbatim and Hebrew
In this context, the inset outputs straight quotes in LaTeX.

File format change.

Fixes: #7309
2016-12-10 11:53:42 +01:00
Günter Milde
81f5e596b4 File format update after 418016bf79
Removing unsupported encoding "pt254" from \inputencoding values makes documents using this value invalid (J.S.).
2016-12-07 18:38:41 +01:00
Uwe Stöhr
87c00f3383 add support for Urdu and Syriac
- fileformat change
- I could not update the tex2lyx testfiles because of bug #10440 (there is now a probable fix)
2016-10-28 00:21:58 +02:00
Uwe Stöhr
d9c52c7a3f support for Amharic, Asturian, Kannada and Khmer
- fileformat change
- I could not update the tex2lyx test files because of bug #10440
- maybe the lyx2lyx routine could be improved but since a document can also begin with another layout than "Standard" I could not use the lyx2lyx function put_cmd_in_ert
2016-10-22 15:33:59 +02:00
Uwe Stöhr
f179173e42 support for the languages Bosnian, Friulian, Macedonian, Piedmontese and Romansh
- file format change
- note that I could not update the tex2lyx test files because of bug #10440
2016-10-16 15:33:23 +02:00
Richard Heck
e57e008e88 Remove debugging code. 2016-08-05 21:39:58 -04:00
Juergen Spitzmueller
90f6eb01a4 Include all [scr]article styles in beamer article layouts.
File format change. On format reversion, we need to put some extra code
in the local layout that emulates the 2.3 behavior.
Simply Input'ing the respective layouts is unfortunately not enough,
due to the insertion order.

See #9977
2016-08-04 11:42:06 +02:00
Richard Heck
0f4c14bba2 Fix hang reported at #10307.
Also, add a FIXME explaining what we'd need to do to fix the
convert_TeX_brace_to_Argument routine properly.
2016-07-23 13:44:34 -04:00
José Matos
cca93dacae Improve the file format upgrade and downgrade for microtype
Add get_bool_value to parser_tools to be used in other places.
Make the upgrade convertion seamless from lyx writing the file (regarding
microtypes, there are still other dragons to chase. :-)
2016-07-13 15:01:17 +01:00
Richard Heck
5df323a0dd Introduce "inverted" branch insets: These are branches whose content
is output when a branch is NOT activated. Fixes bug #7698.

At the moment, inversion is controlled through the branch settings
dialog. There is no provision for inserting inverted insets directly,
or for changing them from the context menu. Both of these could be
done, of course. The latter would need LFUN_BRANCH_TOGGLE_INVERTED.
2016-07-11 23:56:32 -04:00
Richard Heck
ed87044d91 We do not need to enter the format numbers for 2.3 at this time.
The code just below fills thiss automatically.

(cherry picked from commit 3d8082346e16770f3af4ee6d617c8fe91e9292e1)
2016-07-11 22:49:29 -04:00
Richard Heck
a11e07a62f Only trim right end of lines in header. This allows us to preserve
whitespace in local layout.
2016-07-10 00:19:19 -04:00
Richard Heck
1db883e183 In lib/lyx2lyx/: s/while 1/while True/ 2016-06-25 17:38:06 -04:00
Richard Heck
92fae708ae Style. 2016-06-24 16:02:35 -04:00
Georg Baum
d66d6f7805 Remove external date inset
The external date inset was implemented as a demonstrator for external insets
in general. It was never intended for production code. Now that we have several
external insets defined we do not need the demonstrator anymore. This fixes
bugs #4398 and #9948.
2016-06-19 21:23:25 +02:00
Georg Baum
5ab19af782 Skip paragraph parameters for dash conversion
Some of them are directly passed to LaTeX, but for all of them a token
\twohyphens or \threehyphens is not valid. This fixes bug #10243.
2016-06-19 17:05:13 +02:00
Georg Baum
ff93b83953 implement lyx2lyx roundtrip for \use_microtype 2016-06-17 21:11:53 +02:00
Georg Baum
c6610453e0 Use unicode cmdline args consistently
Previously the commandline arguments were processed in an operating system
dependent encoding if running under python 2. Now they are converted to
unicode during the parsing, using the more modern argpase instead of optparse.
The individual conversion methods do no longer need to know anything about
commandline encoding. This fixes a bug similar to #10218 if running under
python 2 which I probably introduced during the python 3 conversion.
2016-06-16 22:05:56 +02:00
Georg Baum
166420d02c Make lyx2lyx infrastructure python3 ready
The LyX class works now with python 3. Certain file format conversions may
still fail (convert_multiencoding() is a hot candidate), but this will need
to be fixed in the individual modules.
2016-06-12 21:21:15 +02:00
Georg Baum
72c6602b13 Improve comments and add missing decoding call
We do already fill the first line of the body in the first pass, so the body
has to be converted to the correct encoding as well.
2016-06-11 14:46:48 +02:00
Georg Baum
9558d863c8 Some python 3 fixes for lyx2lyx
These were found by 2to3 and later adapted to use the compatibility code
which was already used in some parts of lyx2lyx, e.g. lyx_1_5.py.
2016-06-11 11:06:11 +02:00
Georg Baum
e93013057f Add missing backslashes
Found by 2to3, but useful for python2 as well for consistency reasons.
2016-06-08 22:17:14 +02:00
Pavel Sanda
ba2b86fa5d Introduce basic support for microtype.sty.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg192743.html
2016-06-02 22:48:58 -07:00
Scott Kostyshak
847b69ea89 lyx2lyx: Set last minor version of 2.1.x series 2016-04-11 20:41:23 -04:00
Enrico Forestieri
d4ca8d7404 Introduce the latexpar separator.
This is the same as the parbreak separator and is represented on screen
as the old parbreak. Old parbreak separators are converted to latexpar
separators when they are used for introducing blank lines in the
latex output rather than for separating environments.
Instead, parbreak separators are now represented on screen by a
double line. In essence, latexpar and parbreak separators produce
the same output but are represented differently on screen.
The context menu does not account for latexpar separators and only
"true" separators can be turned each into the other one.
2016-04-06 05:25:27 +02:00
Jean-Marc Lasgouttes
fd1ee3b424 Rename Caption:LongTableNoNumber to Caption:Unnumbered
The term LongTable has been deprecated and moreover the renaming makes the interface easier to the eye.

File format updated to 507. (conversion based on jamatos patch)
Layout format updated to 60.
tex2ylx tests updated.
Document EmbeddedObjects.lyx has been updated.
2016-03-30 16:07:00 +02:00
Uwe Stöhr
0d30333ec6 acmsiggraph.layout: revert c1e0b243 partly 2016-02-03 00:03:55 +01:00
Uwe Stöhr
4a8a2ef9a8 lyx_2_2.py: remove double code
thanks Guillaume
2016-01-27 22:51:49 +01:00
Guillaume Munch
f58638c704 New LFUN tabular-feature: convert "inset-modify tabular" in LyX files
* Increase LyX format

* New function convert_info_insets in lyx2lyx_tools.py
  Use this function in the future for future updates of info insets

* Convert "inset-modify tabular" to "tabular-feature" in info insets

* Remove icon naming hack regarding "inset-modify tabular"
2016-01-27 18:33:09 +01:00
Uwe Stöhr
c1e0b24304 acmsiggraph.layout: update layout for ACM siggraph 0.92
fileformat change: update fileformat for all files
2016-01-27 01:58:13 +01:00
Guillaume Munch
9267b2b245 Amend 5c2d0499 2016-01-14 20:17:46 +00:00
Guillaume Munch
5c2d049996 Add \save_transient_properties parameter (#9841)
Increment LyX format to 504.

With this new parameter, the user can indicate that some other parameters that
are frequently switched must not be recorded in the file (as if they were a
setting specific to the user or transient, rather than a document setting). This
will play nicer with version control systems.

See the discussion, e.g.:
http://thread.gmane.org/gmane.editors.lyx.devel/157824/focus=157993 (third
solution mentioned)

TODO:
* The interface remains to be set up. We cannot change this setting from LyX
  for now.
* If save_transient_properties is false, we should read the user setting as a
  per-user-per-document (session) setting (e.g. like the cursor position).
* Once the above is done, we can treat \justification the same way (but it would
  be even better if \justification was moved to lyxrc).
2016-01-12 21:25:34 +00:00
Juergen Spitzmueller
61b54f87df Simplify the logic 2015-12-28 16:11:26 +01:00
Juergen Spitzmueller
2e6f54b37f Eclude possible unwandted case 2015-12-28 16:10:26 +01:00
Juergen Spitzmueller
952a963c15 Escape correctly 2015-12-28 16:09:47 +01:00
Juergen Spitzmueller
28a22f40fb Whitespace 2015-12-28 13:42:36 +01:00
Juergen Spitzmueller
b930f2a18e Remove unneeded warning. 2015-12-28 12:34:11 +01:00
Juergen Spitzmueller
ee1a99b340 cosmetics 2015-12-28 12:26:29 +01:00
Juergen Spitzmueller
3762e3604a Assure backslash is on its own line in verbatim mode in get_ert
Also document the method
2015-12-28 09:15:21 +01:00
Juergen Spitzmueller
77f5baec8f Fix thinko in revert_newgloss: only dissolve ERTs in glosses! 2015-12-27 18:20:49 +01:00
Juergen Spitzmueller
106d89f7e6 revert_tabularvalign: fix removal of tabularvalign feature tag 2015-12-27 17:34:01 +01:00
Juergen Spitzmueller
6b5d5666ac Fix thinko in revert_tabularvalign 2015-12-27 17:23:16 +01:00
Juergen Spitzmueller
a80da13cc1 Rewrite and split the moderncv conversion routine.
This fixes several conversion problems, amongst others the redundant
\end_layout reported by Kornel.
2015-12-27 12:48:11 +01:00
Juergen Spitzmueller
4d7453ac86 Remove redundant \\end_layout in jss-article Code Chunk reversion. 2015-12-26 12:08:10 +01:00
Juergen Spitzmueller
c76d91bb47 Fix gloss, glossgroup and forest reversion routines.
These were using lyx2latex, assuming the result can be used in verbatim
insets as is, which is not the case (mostly due to \\backslash).

A new lyx2verbatim function is now used instead. Also, ERT insets are
dissolved in the gloss reversion process.
2015-12-25 12:03:38 +01:00