Re: Where is the right place for Biblatex redefinitions?

2022-09-28 Thread Jürgen Spitzmüller
Am Mittwoch, dem 28.09.2022 um 11:21 +0200 schrieb kzsta...@gmail.com:
> This may be solved by enclosing your specific settings in
> \AtEndPreamble{…}, for which you need the package etoolbox:

Or, with a reasonably new LaTeX release, use

\AddToHook{package/biblatex/after}{
...
}

which will issue the code as soon as biblatex has been loaded.

-- 
Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: TikZ

2022-09-28 Thread Daniel CLEMENT via lyx-users
Le mardi 27 septembre 2022 à 17:42 +0200, Tobias Hilbricht a écrit :
> Am Dienstag, dem 27.09.2022 um 17:06 +0200 schrieb Daniel CLEMENT via
> lyx-users:
> > Le mardi 27 septembre 2022 à 09:29 +0100, José Matos a écrit :
> > > On Fri, 2022-09-23 at 06:40 +, M.B. Schiekel wrote:
> > > > Hallo Dan,
> > > > 
> > > > LaTeX-Preamble:
> > > >\usepackage{tikz}
> > > >\usepackage{braids}
> > > > 
> > > > this works perfect - or what support do you wish?
> > > > bernhard
> > > 
> > > If you insert the tikz code inside a preview box the figure will be
> > > shown immediately, if you click over it you will see the code.
> > > 
> > > The preview box can be inserted in the same way as the tex code:
> > > 
> > > Insert -> TeX Code
> > > Insert -> Preview
> > 
> > Hmm... PFMJI, but I'd like to give this a try. Exactly how should it
> > be
> > done? 
> > 
> > If I put the tikz code inside the Preview, I just get the code in the
> > output. If I put it inside TeX Code, I get an error ("control
> > sequence
> > never def'd" about tkzTabInit)
> > 
> > I know my tikz code is OK because I was able to preview its result
> > and
> > export to eps from the Qtikz utility. But it would be sooo much
> > simpler
> > to get that directly under LyX!
> > > You are still responsible for adding the correct tikz code...
> > > 
> > > -- 
> > > José Abílio
> > 
> > -- 
> > Daniel CLEMENT
> 
> See the attached sample file. 
> Tobias
> 
> 
Thanks Tobias and Paul, problem solved. It was indeed twofold. For
reference, here is what I've done:

1) in order to get variation tables (is that correct?) to compile
correctly, I had to load the tkz-tab package instead of just tikz. (I
guess it's a superset of tikz with commands such as \TkzTabLine and so
on.)

2) My instant preview was indeed turned off, which I prefer for maths,
but there is the "no maths" option, which previews just the drawings. 

Very convenient!
-- 
Daniel CLEMENT
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


RE: Where is the right place for Biblatex redefinitions?

2022-09-28 Thread kzstatis
>I need to apply some renewcommands to the standard ext-biblatex-verbose-trad3 
>style
>
>% specific settings:
>\DeclareFieldFormat{biblabeldate}{#1}
>\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}
>\DeclareFieldFormat{issuedate}{#1}
>\renewcommand*{\volnumdatedelim}{\addcomma\space}
>\renewcommand{\newunitpunct}{\addcomma\space}
>\renewcommand*{\locpubdelim}{\addcoma\space}
>
>If I put them in the preamble, they seem to be taken into account in the pdf, 
>but they cause a lot of error warnings (sequences of "undefined" >and "already 
>defined") and I would like to avoid that, since my document is very long and I 
>might miss other error warnings. 
>My question is: Is there a better way of inserting these lines? Before the 
>bibliography in TeX code? Or where?

When you make a pdf, LyX first exports the lyx file to latex. It places the 
\usepackage for biblatex after the document specific preamble. So when pdflatex 
sees your preamble settings, it does not know yet biblatex and its commands, 
such as biblabeldate.

This may be solved by enclosing your specific settings in \AtEndPreamble{…}, 
for which you need the package etoolbox:

\usepackage{etoolbox}
\AtEndPreamble{%
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}
\DeclareFieldFormat{issuedate}{#1}
\renewcommand*{\volnumdatedelim}{\addcomma\space}
\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand*{\locpubdelim}{\addcoma\space}
}

This ensures that your specific settings are read at the very end of the 
preamble, when biblatex has already been read.

Kees


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Where is the right place for Biblatex redefinitions?

2022-09-28 Thread Mathias Girel
Dear Lyx users,
I need to apply some renewcommands to the standard
ext-biblatex-verbose-trad3 style

% specific settings:
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}
\DeclareFieldFormat{issuedate}{#1}
\renewcommand*{\volnumdatedelim}{\addcomma\space}
\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand*{\locpubdelim}{\addcoma\space}

If I put them in the preamble, they seem to be taken into account in the
pdf, but they cause a lot of error warnings (sequences of "undefined" and
"already defined") and I would like to avoid that, since my document is
very long and I might miss other error warnings.
My question is: Is there a better way of inserting these lines? Before the
bibliography in TeX code? Or where?
Thanks for your help!
Best regards
Mathias
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users