Hello Jürgen,

thanks for both of your answers. I was using the \let\cite\footcite trick already but there's a side effect: in footnotes, a \footcite brings some parenthesis around the citation. I don't need the parenthesis. I have asked tex.sx how to remove those but it would be better to have it fixed within LyX.

I've tried to validate your layout script but it always says it is invalid. Eventhough I fixed the line breaks caused by email client formating, donno if it's mine or yours. I will try 2.1beta2!

thanks,
pierre-philipp

Quoting Jürgen Spitzmüller 22/12/2013 16:33,
Jürgen Spitzmüller wrote:
How to tweak LyX to always produce \footcite instead of \cite?
\let\cite\footcite

With fortcoming LyX 2.1, you can also add a real \footcite command to the citation dialog. If you use "standard" citation (not natbib), paste the following to Document > Settings > Local Format (hit "Validate" before applying):

CiteEngine default
        cite[]
        footcite[]
        nocite
End

CiteFormat default
        # translatable bits
        _notcited not cited
        _addtobib Add to bibliography only.
        _footcite Foot:

        # macros
        !open [
        !sep ,
        !close ]

        !startlink {!<a href='#LyXCite-%clean:key%'>!}
        !endlink {!</a>!}

        !cite %!startlink%{%label%[[%label%]]
[[{%numericallabel%[[%numericallabel%]][[#%key%]]}]]}%!endlink%%!nextcite%

        !nextcite {%next%[[%!sep% %!cite%]]}
        !nexthashkey {%next%[[%!sep% #%key%%!nexthashkey%]]}
        !nextkey {%next%[[%!sep% %key%%!nextkey%]]}

        !textafter {%textafter%[[, %textafter%]]}

        # cite styles
        cite %!open%{%dialog%[[#ID]][[%!cite%]]}%!textafter%%!close%
footcite %!open%{%dialog%[[%_footcite% #ID]][[%_footcite% %!cite%]]}%!textafter%%!close%
        nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
End



Regards,
Jürgen

Reply via email to