]> git.lyx.org Git - lyx.git/commitdiff
Amend cb26ecbb: Added apa7 layout
authorKornel Benko <kornel@lyx.org>
Tue, 9 Jun 2020 12:49:26 +0000 (14:49 +0200)
committerKornel Benko <kornel@lyx.org>
Tue, 9 Jun 2020 12:49:51 +0000 (14:49 +0200)
The command addORCIDlink{}{} can be used in the preamble (like title{} or author{})
or in the body of document. For this a Flex-inset-layout seems appropriate.

lib/layouts/apa6.layout
lib/layouts/apax.inc

index 00a0420c5d47e8ee37aea93c4dfab0785109df8d..8534db099b1e1bf63e2623f64dd7b4194b8cf4da 100644 (file)
@@ -9,4 +9,5 @@ Input apax.inc
 
 NoStyle Course
 NoStyle addORCIDlink
+NoInsetLayout Flex:addORCIDlink
 
index 4080e12f0b880f70364aeb74704ab1df41179bb4..7c7031cc4b140db3482f4606345abdacfce1b872 100644 (file)
@@ -578,6 +578,9 @@ Style Course
        EndFont
 End
 
+
+# The addORCIDlink{}{} latex command can be used in the preamble,
+# but also inside some other style like note, paragraph etc
 Style addORCIDlink
        Category              FrontMatter
        InTitle               1
@@ -586,13 +589,35 @@ Style addORCIDlink
        LatexName             addORCIDlink
        LatexType             Command
        Margin                Dynamic
-       LeftMargin MMN
-       RightMargin MMN
+       LeftMargin            MMN
+       RightMargin           MMN
        Align Block
-       Argument        1
-         LabelString "Author-name"
-         Tooltip ORCID
-         Mandatory     1
+       Argument              1
+         LabelString         "Author-name"
+         Tooltip             ORCID
+         Mandatory           1
+       EndArgument
+End
+
+
+# To be used inside the document body
+InsetLayout Flex:addORCIDlink
+       LabelString           "ORCID-link: "
+       LatexName             addORCIDlink
+       Decoration            none
+       LatexType             Command
+       LyxType               custom
+       Argument              1
+         LabelString         "Author-name"
+         Mandatory           1
+       AutoInsert            1
+       Decoration            none
+       EndArgument
+       Argument              2
+         LabelString         ORCID
+         AutoInsert          1
+         Mandatory           1
+         Decoration          none
        EndArgument
 End