On Sun, Apr 24, 2011 at 7:21 PM, Richard Heck <rgh...@comcast.net> wrote:
> On 04/24/2011 08:58 PM, Johannes Wilm wrote: > > > > On Sun, Apr 24, 2011 at 5:42 PM, Richard Heck <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, this would maybe and partially work for citation commands. but just look at \parencites in biblatex and the use of normal () parenthesis. Programming something like this could be more complex than programming biblatex or natbib itself. And that is only the citation style. What about all the rest of it? I am thinking of things like: -- biblatex using utf8, natbib apparently using some legacy system to store the bib-file -- biblatex using a completely different set of citation types and fields than traditional bibtex -- biblatex in the near future possible just supporting bibber, currently preferring bibtex8, while natbib uses bibtex -- biblatex specifying all bibliography files in the preamble and natbib specifying them in the text itself -- biblatex specifying bibliography and citation styles as an argument to the package style, and natbib using a completely different system for that Do we actually know for sure whether natbib is meant to survive or whether its author is planning to just maintain it until everyone has converted to biblatex? Maybe we should ask the author directly? Of course, I don't know the source code as well. it just seems like a gigantic project to me to make all this user configurabel and to allow for any other possible citation system. -- > >> 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 > > -- Johannes Wilm http://www.johanneswilm.org tel: +1 (520) 399 8880