]> git.lyx.org Git - lyx.git/commitdiff
BiblioInfo: Add citestyle conditional
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 11 Jul 2024 05:41:47 +0000 (07:41 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 11 Jul 2024 05:41:47 +0000 (07:41 +0200)
lib/doc/Customization.lyx
lib/doc/de/Customization.lyx
src/BiblioInfo.cpp

index ee422b4bffa19ec6cfb0a818e67c2a2fc3c4301a..4fb1e372684bc7a2af6b80ddf1d09e34be1806b7 100644 (file)
@@ -25725,6 +25725,51 @@ Biblatex
 \family default
  format for multi-reference citations),
  the false part if this is not the case.
+\change_inserted -712698321 1720625677
+
+\end_layout
+
+\begin_layout Itemize
+
+\change_inserted -712698321 1720628578
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1720628557
+{%ifstyle:<styles>%[[true]][[false]]}
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+:
+ process the 
+\begin_inset Quotes eld
+\end_inset
+
+true
+\begin_inset Quotes erd
+\end_inset
+
+ if the current biblatex citation style matches a style in the comma-separated list of 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1720628580
+<styles>
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+,
+ else the false part.
 \end_layout
 
 \begin_layout Standard
index 42c3e8fd84e8dae116099d4739b750d3db2dd500..efdbaaff4829ac2dd3210c05d17ed1ab45339170 100644 (file)
@@ -24692,6 +24692,48 @@ Falsch
 -Teil.
 \end_layout
 
+\begin_layout Itemize
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+{%ifstyle:<styles>%[[wahr]][[falsch]]}
+\end_layout
+
+\end_inset
+
+:
+ führt den 
+\begin_inset Quotes gld
+\end_inset
+
+Wahr
+\begin_inset Quotes grd
+\end_inset
+
+-Teil aus,
+ wenn der aktuelle Biblatex-Zitierstil einer der Stile in der komma-separierten Liste 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+<styles>
+\end_layout
+
+\end_inset
+
+ ist,
+ sonst den 
+\begin_inset Quotes gld
+\end_inset
+
+Falsch
+\begin_inset Quotes grd
+\end_inset
+
+-Teil.
+\end_layout
+
 \begin_layout Standard
 Wir haben oben gesagt,
  dass 
index 01f8d36ffa9f48ae451e28c22ffc684327d4ed0e..5d4ded999689b38ced58d115705b667306dfa24c 100644 (file)
@@ -1171,6 +1171,17 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf,
                        ret = modifier_;
                else if (key == "numericallabel")
                        ret = cite_number_;
+               else if (prefixIs(key, "ifstyle:")) {
+                       // Return whether we use a particular cite style
+                       vector<string> const stls = getVectorFromString(to_ascii(subtype));
+                       string const cs = buf.masterParams().biblatex_citestyle;
+                       for (auto const & s : stls) {
+                               if (cs == s) {
+                                       ret = from_ascii("x"); // any non-empty string will do
+                                       break;
+                               }
+                       }
+               }
                else if (prefixIs(key, "ifmultiple:")) {
                        // Return whether we have multiple authors
                        docstring const kind = operator[](subtype);