On 02/09/14, 20:25 , Georg Baum wrote:
> Rainer M Krug wrote:
> 
>> On 02/07/14, 10:49 , Vincent van Ravesteijn wrote:
>>> On Fri, Feb 7, 2014 at 10:02 AM, Rainer M Krug <rai...@krugs.de> wrote:
>>>
>>>> The idea would be that a round-trip framework is envisaged, which
>>>> provides the facilities to easily expand it from one export backend
>>>> (docx) to another (possibly odt? markdown?).
>>>
>>> This sounds like a sort of testing framework which would indicate for
>>> each export backend which features are exported and imported
>>> successfully. It would be cool to have some matrix showing how mature
>>> each of the supported formats is.
>>
>> Nicely put! That would be brilliant. Not only formats, but converters:
>> different converters convert different features.
> 
> Yes, such a matrix would indeed be a nice tool.
> 
>>> Would this also solve some of the LyX->LaTeX->LyX roundtrip issues ?
> 
> Some, but I believe not many. The main LyX->LaTeX->LyX problems come from 
> the fact that LaTeX as a macro language is really ugly to parse. Only some 
> of them come from the fact that the exported LaTeX contains less information 
> than the original LyX file. One feature where additional metadata would 
> definitely help are branches.
> 
>> Partly - if the export to LaTeX is split from the round trip LyX <->
>> LaTeX I would say yes, with the caveat, that only a subset of features
>> would be supported by the round trip. In contrast, export - import would
>> (hopefully sometime in the case of import from LaTeX) the full set of
>> LyX and LaTeX features with (possibly ugly in LyX) the export / import.
> 
> This is not possible. There are LyX features that simply do not appear in 
> the exported LaTeX, so they can't be imported (e.g. branches or notes). It 
> might be possible to support all LaTeX features, but the cost would be 
> extremely high, so there will always be LaTeX files which can't be imported 
> (usually the stuff found in .cls or .sty files).

OK - in this regard you are right - haven't considered branches. But LyX
notes could be exported as LaTeX comments starting with %%LyX-Note%%.

Branches: isn't there conditional compiling in LaTeX? In this way
branches could be kept and switched by activating these in the preamble?

> 
>> So: yes, the round-trip framework could be used for a subset of features
>> initially for LyX <-> LaTeX, which can then be extended over time - I
>> guess this would be the easiest to start with, actually.
> 
> This does not make sense IMHO. Why artificially restrict the roundtrip?

Because, as you said above, some features in LyX can not be exported
into LaTeX and the other way round? In addition, the round-trip would be
needed to mainly edit content, and not that much formating - how a
section header looks in word or in LyX is irrelevant, as long as it is
recognised in the re-import / re-export for round-trip as a section
header. In Contrast, when exporting (non-round trip) one wants a
document as similar as possible to the LyX / LaTeX pdf (in most cases).

> 
> The LyX->LaTeX->LyX roundtrip is special in the sense that the LaTeX->LyX 
> step is very tightly integrated with LyX. Therefore it is indeed a good 
> starting point, but not in the way of splitting off a separate roundtrip, 
> but by extending the existing export/import with the additional metadata 
> file you mentioned. The advantage would be that you would not need to put 
> too much stuff into the metadata file, so it would be clear quickly the 
> general approach works.

You are right - LaTeX is a special case, as it is the default backend
for LyX. So there are more strict requirements for the round-trip, and
all improvements in the round-trip should be immediately in the LaTeX
importer as well. But the story is different with other backends, e.g.
docx, where, if you go to replicating the LaTeX view, you might end with
"painted" documents which are not easily to be re-imported into LyX. But
for round trip, the look is not that relevant, as long as the content
and the structure can be re-imported.

Rainer

> 
> 
> Georg
> 

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      rai...@krugs.de

Skype:      RMkrug

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to