On Sat, Nov 8, 2014 at 4:53 PM, Richard Heck <rgh...@lyx.org> wrote:

On 11/04/2014 01:21 PM, stefano franchi wrote:
>
>> b.  I don't quite understand where and how the widget itself is defined.
>> I am used to either define widget programmatically by creating (and
>> possibly nesting) layouts and then adding the widgets manually, or by
>> creating them by hand with QT Designer and then importing them into code. I
>> can't see either method used here. My ignorance of C++ is certainly to
>> blame and input would be welcome.
>>
>
> It's done the Qt Designer way. The designer file is at
> src/frontends/qt4/ui/BibtexUi.ui. You'll see it imported into GuiBibtex.h
> via:
>     #include "ui_BibtexUi.h"
> That header file is produced by the Qt MOC (meta-object compiler) on
> compilation.
>
>
Thanks Richard, I had missed that.


>  I still have no clear idea of:
>>
>> c.  where and how is the bibtex widget called.
>>
>
> Do you mean how it pops up? There is a createGuiBibtex() routine in
> GuiBibtex.cpp that is called from GuiView::build(). I think it is enough to
> add one of those to the "factory".
>

I meant the latter. Clear now.

>
> There are actually two very different dialog systems in existence right
> now. Don't ask. ;-)
>
>  d. where is the machinery that's needed to insert citations into LyX.
>>     Is it the src/insets/InsetBibtex.cpp class? (of which I confess I
>> have a very
>>     dim understanding)?
>>
>
> Citations themselves are inserted through GuiCitation.
>

Ok

>
> Note, by the way, that the Gui* classes interact with corresponding Inset*
> classes. So GuiBibtex manages InsetBibtex, in effect. Etc. You'll need an
> InsetBiblatex (say) as well as GuiBiblatex.
>
>  e. how the various cite commands are inserted in the insert inset pop-up
>> list.
>>
>
> This happens in GuiCitation, again. Though the citations styles themselves
> are all defined in modules corresponding to the different cite engines:
> basic.module, natbib.module, jurabib.module. This will be a big help, since
> the cite styles won't need to be hardcoded. It can all be put in modules.
> Presumably, we will need to figure out whatt the available modules are at
> load time and then use that to populate the list of choices. I'm not sure
> exactly how this part will work, but we can figure it out as we go. We'll
> also need somehow to be able to tell what reference styles are available,
> though if there is no easy way to do that, we can just make the user enter
> one as text.
>
>
Ok, clearer now. So, ui files aside, the three main C++ classes managing
bibtex are GuiBibtex+InsetBibtex and GuiCitation. The latter wouldn't need
to be touched, for the citation formats are taken care by  modules.



> About the above: The reference files don't have to be in bibtex format?
>

Yes, since a few versions ago biber  supports several bibliograpic file
formats. Endnote and Bibtex for sure, plus possibly other. Which is why you
are no longer allowed to use the .bib extension in biblatex
"addbibresource" command.


Stefano



-- 
__________________________________________________
Stefano Franchi

stefano.fran...@gmail.com <stef...@tamu.edu>
http://stefano.cleinias.org

Reply via email to