Commit Graph

134 Commits

Author SHA1 Message Date
Richard Heck
eb26d85dc9 Add limits to searches in convert_TeX_brace_to_Argument. 2014-05-18 11:24:53 -04:00
Juergen Spitzmueller
769b585176 Beamer block conversion: consider ERT arguments with leading/trailing blanks
Should also go to branch.
2014-05-08 15:14:44 +02:00
Georg Baum
d6fecb4aa4 Fix table rotate conversion to 2.0 format
The old code did create invalid documents, since the space between the rotate
flag dn the previous flag was removed.
2014-04-27 20:58:53 +02:00
Juergen Spitzmueller
dced492489 Fix conversion of beamer block titles that end with a non-ERT inset.
Should also go to branch!
2014-04-26 17:39:56 +02:00
Georg Baum
52d2588613 Fix lyx2lyx math package defaults (bug #9069)
lyx2lyx sets all new math packages to off when converting from old formats.
This is correct if any command which would cause an automatic package loading
exists in the document. However, it is wrong if no command exists: This leads
to problems if later a command is added (bug #9069), which is especially
annoying for templates.
The fix consists of two parts:
1) convert_use_package() considers now the used commands like
   revert_use_package(), and uses them to decide whether to set the package to
   auto or off.
2) convert_undertilde() and revert_undertilde() use a slightly adjusted copy of
   convert_use_package() and revert_use_package(), so that the bug is also
   fixed for undertilde. We cannot use the latter functions directly, because
   of "\usepackage undertilde" vs. "\use_undertilde".
2014-04-25 22:39:22 +02:00
Georg Baum
5710f68c34 Fix math package conversion to 2.0 format
When doing the lyx2lyx round trip of the 2.0.8 user guide from format
413 -> 474 -> 413 you get an invalid document, because the math packages
mhchem and undertilde are incorrectly converted.
It turned out that the old reversion code did only work for particular
package oderings. The new one works for abitrary sorted packages.
2014-04-25 22:12:04 +02:00
Georg Baum
2fe07e1fe1 Fix data loss in user guide conversion to 2.0.x
When doing the lyx2lyx round trip of the 2.0.8 user guide from format
413 -> 474 -> 413 you do not get a zero diff. The most important problem is
caused by the conversion of the argument insets to the old syntax: This
conversion adds an additional empty line (harmless), and it destroys the
document structure if the first inset in e.g. a subsection is not an argument
inset, but e.g. an index or label inset.
The fix is quite easy: Ensure that the paragraph begin is set to the first
argument inset.
2014-04-25 21:35:51 +02:00
Georg Baum
cacd2a041d Fix warning in lyx2lyx 2.0<->2.1 round trip
revert_justification() issues a warning if the \justification parameter does
not exist, and LyX itself always writes it unconditionally as well, so add it
also in lyx2lyx when converting old documents.
Currently this does not have any user visible effect, but it decouples the
default value of BufferParams::justification from the conversion of old
documents: Now it is possible to set the default to false in LyX, and old
documents will still be converted correctly.
2014-04-24 21:52:32 +02:00
Richard Heck
b5c2cba0b3 Fix problem with verbatim reversion. 2014-04-11 14:49:41 -04:00
Richard Heck
0ded71a480 Fix silly mistake spotted by Jurgen.
Give k a more descriptive name.
Prettify a bit of the code.
2014-02-07 10:36:55 -05:00
Juergen Spitzmueller
9d6c2bf407 Fix lyx2lyx chunk conversion (bugs #8877, #8876) 2014-02-06 10:11:02 +01:00
Richard Heck
1f231c9538 Typo. 2014-01-31 09:38:00 -05:00
Juergen Spitzmueller
a7a585c7bd beamer conversion: deal with more complicated block titles 2014-01-24 09:24:12 +01:00
Juergen Spitzmueller
50066b46ab Improve beamer conversion: Support default list overlay specification without ERT 2013-12-13 14:55:34 +01:00
Juergen Spitzmueller
0aaf2f2008 Improve beamer frame conversion: frame arguments that use multiple ERTs (one ERT inset per argument) are converted 2013-12-06 11:57:33 +01:00
Juergen Spitzmueller
ac7f7dbdce Factor out identical frame argument conversion 2013-12-06 10:53:49 +01:00
Juergen Spitzmueller
0f18bc753c Improve beamer frame conversion: consider explicit EndFrames between two identical frame types 2013-11-11 09:16:17 +01:00
Juergen Spitzmueller
4741cb99c7 Improve beamer collorary argument conversion (#8828) 2013-09-03 19:02:28 +02:00
Richard Heck
3d36751849 Convert "i = i +1" to "i += 1" and similar. 2013-07-24 10:59:51 -04:00
Richard Heck
0a6e781aea Somehow this line got commented out. 2013-07-24 10:57:36 -04:00
Richard Heck
dad943ad6c Fix dumb mistake. 2013-07-24 10:56:33 -04:00
Richard Heck
c1ead6afa1 Simplify a bunch of lyx2lyx code. 2013-07-24 09:56:02 -04:00
Richard Heck
2cdf3d2f6e Remove debugging code. 2013-07-24 09:48:11 -04:00
Richard Heck
96bb5f6dd7 Move helper functions where they belong. 2013-07-24 09:47:14 -04:00
Richard Heck
556a195033 Fix problem with Initial layout conversion reported by Scott on
the list.
2013-07-24 09:41:59 -04:00
Juergen Spitzmueller
50426600db Fix beamer frame conversion 2013-07-04 18:25:04 +02:00
Richard Heck
89ced5c3c3 Fix problem with chunk lyx2lyx conversion spotted by Scott.
We assume chunks come at us in a certain form. If not, then
we cannot handle the conversion. In that case, we just leave
the chunks as they were and they will appear as unknown layouts.
2013-06-03 13:01:39 -04:00
Richard Heck
8f044f3c95 Patch to convert Sweave chunk paragraphs to insets (bug #8588). Work
by Liviu (C++) and Richard (Python).
2013-05-30 10:20:34 -04:00
Uwe Stöhr
6c0bc842b7 moderncv.layout: support the command \social
- \social can be used for social network addresses in the address block
2013-05-29 01:11:14 +02:00
Uwe Stöhr
ea2d5947e9 support to set Tibetan as document language
- polyglossia supports http://en.wikipedia.org/wiki/Standard_Tibetan so we can support it too
- fileformat change
2013-05-28 23:40:17 +02:00
Uwe Stöhr
e28625160a aa.layout: updated for A&A 8.2 2013-05-26 05:29:24 +02:00
Jean-Marc Lasgouttes
f04c7711b0 Fix empty width support for Box inset
* InsetBox and GuiBox: Use proper empty length instead of the broken -9.99col% trick
* some slight changes to the logic of GuiBox to make sure that values are set as needed.
* lengthToWidget(): handle properly the empty length case. All the other related Qt helpers did it already, it was probably an oversight. Also set the default_unit parameter as optional (not needed in this patch actually, but I got carried away :)
* allow generating LaTeX code for an empty length, since some broken code does that.
2013-05-24 15:44:59 +02:00
Julien Rioux
cde541d785 New \cite_engine_type default.
The default citation capability of LaTeX is not a true numerical
citation engine, rather it uses a mixture of labels/numbers. Thus
we now distinguish them: "numerical" always increments the bibitem
counter and uses its value as a numerical citation label, while
"default" only uses the bibitem counter when no label is provided.

LyX file format incremented to 471.
2013-05-16 20:39:23 +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
c61ef8b205 Support \caption* (bug #3209)
This was a low hanging fruit which would have to wait for a long time because
of a file format change if it was not implemented before 2.1.
2013-03-22 22:23:38 +01:00
Uwe Stöhr
22ad7e4369 support for \mbox and \fbox
- fileformat change
- it was a pity that LyX did not yet support a simple rectangular frame without a defined width but LyX did this for e.g. oval frames
- \fbox and \mbox often occur in TeX files and can now be imported
2013-03-22 01:33:58 +01:00
Uwe Stöhr
b79bc9b566 lyx2lyx/lyx_2_1.py: typos 2013-03-21 02:11:42 +01:00
Uwe Stöhr
f08f5821ec support for the Iwona fonts
- the support for Iwona is exactly the same as for the Kurier fonts
- fileformat change
2013-03-19 00:57:37 +01:00
Juergen Spitzmueller
d8be21fb6c Capitalization fix.
This would be a file format change, but since the previous version is just two hours old, I will do without.
2013-03-18 15:06:49 +01:00
Juergen Spitzmueller
3ab2798b6e Powerdot updates
* Powerdot now also uses the native overlay item arguments
* a list option argument is finally available
* \pause natively supported (like in beamer)
* support for \onslide (via InsetFlex)
* support for \twocolumn

File format change.
2013-03-18 13:36:56 +01:00
Juergen Spitzmueller
4e803c7ebf Fix beamer frame title coversion 2013-03-17 08:40:38 +01:00
Juergen Spitzmueller
370bbbc7f2 Old beamer frames bite the dust
With this commit, old beamer frames are converted to new ones. The old styles are removed (including the infamous \lyxframe).

This should be tested with as much beamer documents as possible (I have already done so), also, tex2lyx now probably produces invalid LyX files.
2013-03-16 12:52:00 +01:00
Georg Baum
13d4b59ac5 Small tweak to cancel revertion
From version 425 to 463, the cancel package is used automatically.
Take this into accound when converting to old formats: For the step
464->463 do nothing if cancel was set to auto. For the step 425->424,
add the \usepackage statement as before.
2013-02-28 21:03:07 +01:00
Kornel Benko
8f36aef17a Added "cancel" to the GUI handled list of LaTeX packages.
Generalized convert_use_???() and revert_use_???() routines in lyx2lyx.
2013-02-27 13:12:03 +01:00
Julien Rioux
9dd1b7c578 Use the LyX name of encodings instead of the LaTeX names.
- Use the LyX name of encodings instead of the LaTeX names.
  The LyX name must be unique, while the name used by LaTeX
  not necessarily, e.g. different packages might implement
  support for the same encoding.

- Rename koi8 to koi8-r, so that the LyX and LaTeX names match.

- Rename euc-jp-plain to euc-jp-platex, jis-plain to jis-platex
  and shift-jis-plain to shift-jis-platex.

- Add utf8-platex encoding (fixes #8408).

LyX file format incremented to 463.
2013-02-18 23:52:42 +01:00
Uwe Stöhr
eabe77839b moderncv.layout: update to modernCV 1.3
- this new modernCV version fixes the annoying linebreak bug I was suffering so long, it moreover adds 2 new features

- lyx2lyx/lyx_2_1.py: updated to revert the new features
2013-02-16 01:02:32 +01:00
Juergen Spitzmueller
6885007f1d Adjust Libertine font support to most recent version
This needs yet a file format change. I hope the interface is stable now (I had an exchange with the package maintainer, Bob Tennent, about that)
2013-02-15 10:45:11 +01:00
Juergen Spitzmueller
557e2f5ef9 Simplify support for kurier fonts 2013-02-12 20:33:42 +01:00
Uwe Stöhr
487d3bffab support for the kurier sansserif fonts
- fileformat change
2013-02-11 00:47:09 +01:00
Uwe Stöhr
33e185e5ed IEEEtran.layout: support for conference articles
- IEEEtran-Conference.lyx: new template for conference articles of the IEEE
2013-02-09 03:23:34 +01:00