The attached patch changes the lyx format to 227

\begin_inset Boxed -> \begin_inset Box Boxed
\begin_inset Doublebox -> \begin_inset Box Doublebox
\begin_inset Frameless -> \begin_inset Box Frameless
\begin_inset ovalbox -> \begin_inset Box ovalbox
\begin_inset Ovalbox -> \begin_inset Box Ovalbox
\begin_inset Shadowbox -> \begin_inset Box Shadowbox

However, I'll hold off applying it because I'm unsure how best to 
proceed with lyx2lyx. The patch removes the just committed 
lyxconvert_225.py, lyxrevert_226.py, moving their contents into the 
new files lyxconvert_226.py, lyxrevert_227.py and augments these new 
files with convert_box functions. However, I can see that this is 
ugly. 

Would it be best to do this only once we freeze for a 1.4 release so 
that a released lyx2lyx would contain the equivalent of 
lyxconvert_13xformat.py and lyxrevert_14xformat.py?

José, I wonder if the present scheme, where conversion to the latest 
format is dictated by the names of the lyxconvert_xyz.py files would 
not be better served by this in lyx2lyx:

most_uptodate_format = 227

Thereafter, lyxconvert_225.py would just be a convenient placeholder 
for all functions needed to convert format 225 to the 
most_uptodate_format rather than conversion being implicitly defined 
to produce format 226.

Also, I note that if I move lyxconvert_225.py to lyxconvert_226.py and 
then try and convert a 227 format file, I get an error that looks 
like a bug to me:

$ ~/lyx/devel/lib/lyx2lyx/lyx2lyx -t 226 newfile1.lyx
Traceback (most recent call last):
  File "/home/angus/lyx/devel/lib/lyx2lyx/lyx2lyx", line 197, in ?
    main(sys.argv)
  File "/home/angus/lyx/devel/lib/lyx2lyx/lyx2lyx", line 168, in main
    parse_options(argv)
  File "/home/angus/lyx/devel/lib/lyx2lyx/lyx2lyx", line 91, in 
parse_options
    opt.end = lyxformat(a)
  File "/home/angus/lyx/devel/lib/lyx2lyx/lyx2lyx", line 118, in 
lyxformat
    opt.err.write(fmt + ": " + error.format_not_supported)
TypeError: unsupported operand types for +: 'int' and 'str'


-- 
Angus

Reply via email to