On 02/10/14, 21:09 , Georg Baum wrote: > Rainer M Krug wrote: > >> On 02/09/14, 20:25 , Georg Baum wrote: >> >>> 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? > > Yes. IIRC there was even a discussion about how to translate branches into > LaTeX if-statements some time ago, so branches are may not be the best > example. Anyway, there will always be features without direct LaTeX > representation, > >>>> 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? > > OK, if you meant these features I agree, then I probably misunderstood you > in the first place. > >> 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). > > This is a useful feature as well, but IMHO not restricted to roundtrip: Even > if you want to do a one-way export (e.g. because you know that somebody else > will continue to work on the document and it will never come back to you), a > switch similar to the "clean" option of writer2latex would be a good thing > to have.
I agree - there would be nothing stopping you to use the round-trip export for a semantic export, as you define it below. > >> 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. > > I believe this alls boils down to semantic export as Stefano called it vs. > "painted" export, and semantic export would be useful with roundtrip and > without. Nothing to add here - a semantic export would be really a very useful addition to LyX. > > > 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
signature.asc
Description: OpenPGP digital signature