On 04/24/2011 08:58 PM, Johannes Wilm wrote:


On Sun, Apr 24, 2011 at 5:42 PM, Richard Heck <rgh...@comcast.net <mailto:rgh...@comcast.net>> wrote:

    On 04/24/2011 08:30 PM, Johannes Wilm wrote:

        Yes, I wrote a small patch earlier. I thought I would try to
        refine it and develop it more once 2.0 is out the door. The
        most difficult piece it seems to me would be to provide for a
        failure free switch back and forth from and to Biblatex.

    I doubt there can be one of those, not in general. BibLaTeX can in
    principle provide more cite commands than Natbib does, so the
    BibLaTeX-->Natbib conversion can't be undone without lots of
    special handling we don't really want to do. Some sort of
    moderately sensible conversion is the all there really needs to
    be---and a warning, when changing this setting, that what's about
    to be done can't be undone.


Ok, if this is not needed, and only natbib->biblatex conversion needs to be provided, then it shouldn't be impossible.

We should try to go the other way as best we can. The conversion can perhaps be specified as part of the layout material. Maybe one idea would be to have the citation formats themselves be neutral. E.g.:
    CiteStyle Author[Year]
Format "{%before%[[%before% ]]}%author% [%year%]{%after%[[, %after%]]}"
    End
and then the engines declare which styles they support and what the command is:
    CiteEngine ...
        Style Author[Year]
            LatexCommand citet
            OptionalArg before
            OptionalArg after
        End
        ...
    End
That kind of thing. Conversion between styles could then be done by seeing if the other engine supports that form. If not, we can use some default style. (FYI, the syntax of the format is the same as with citation styles. See lib/layouts/stdcitestyles.inc. It's also a guess.)


        Yes, if that is possible at all. The Lyx-file would have to be
        fundamentally different for biblatex files (all bibliography
        databases go into the header + the bibtex executable may soon
        no longer work with it).

    I haven't looked at this in detail, but it ought to be possible to
    tell LyX to do different things in different cases. I imagine some
    layout-like thing that contains all the information about what
    cite commands there are, what they look like, etc. It can also
    contain other information about what bibliography-related commands
    need to be issued, and where they should be put. There won't be
    that many options.


yes, but to make this 100% user configurable looks like a major undertaking. Just to begin with -- you would need to add the following to syntax.default for biblatex and I'm not even sure that file has a way of handling the lines I commented below (the ones that go on indefinitely):

This is no doubt an issue, but it concerns tex2lyx only. We do our best to do proper import of such files. If we can't do it perfectly, then we can't. It can't be done now, anyway, because the tex2lyx program still produces an older format.

rh

Reply via email to