]> git.lyx.org Git - features.git/commitdiff
Add layout for APA v6 class and associated module and template.
authorRichard Heck <rgheck@lyx.org>
Thu, 27 Dec 2012 20:50:09 +0000 (15:50 -0500)
committerRichard Heck <rgheck@lyx.org>
Thu, 27 Dec 2012 20:52:05 +0000 (15:52 -0500)
Also, add Jacob Bishop to the list of contributors, since this is
his work. Thanks, Jacob!
(cherry picked from commit 824b0313b3da3b1d504c1cff6c320fcd54749c92)

lib/generate_contributions.py
lib/layouts/apa6.layout [new file with mode: 0644]
lib/layouts/natbibapa.module [new file with mode: 0644]
lib/templates/APA6.lyx [new file with mode: 0644]

index 6358b5ea8a832e383d97f977073ca791430e5631..4a0b5a8409f2d192a20673930e30b9cdd63d5651 100755 (executable)
@@ -433,6 +433,14 @@ contributers = [
                  "3 January 2009",
                  u"small bugfixes, CMake build system, Slovak translation"),
 
+     contributer(u"Jacob Bishop",
+                 "bishop.jacob () gmail ! com",
+                 "GPL",
+                 "Contributions...APA 6 Layout",
+                 "m=135654106502977",
+                 "26 December 2012",
+                 u"APA 6 Layout"),
+
      contributer(u"Punyashloka Biswal",
                  "punya.biswal () gmail ! com",
                  "GPL",
diff --git a/lib/layouts/apa6.layout b/lib/layouts/apa6.layout
new file mode 100644 (file)
index 0000000..f5e2a06
--- /dev/null
@@ -0,0 +1,511 @@
+#% Do not delete the line below; configure depends on this
+#  \DeclareLaTeXClass[apa6,apacite.sty,endfloat.sty,endnotes.sty,flushend.sty,txfonts.sty]{article (APA6)}
+# Author: Jacob Bishop <bishop.jacob@gmail.com> based on the apa 
+# layout written by Randy Gobbel.
+Format 35
+Columns                 1
+Sides                   1
+PageStyle               Headers
+
+
+ClassOptions
+       Other "man"
+       FontSize              10|11|12
+End
+
+
+Preamble
+EndPreamble
+
+
+Style Standard
+       LatexName             dummy
+       LatexType             Paragraph
+       Margin                Static
+       ParIndent             MM
+       ParSkip               0.4
+       ParSep                0.4
+       TopSep                1.0
+       BottomSep             1.0
+       Align                 Block
+       AlignPossible         Block, Left, Right, Center
+       LabelType             No_Label
+End
+
+
+Style Title
+    Category              FrontMatter
+       LatexName             title
+       LatexType             Command
+       InTitle               1
+       Font
+         Size                Huge
+       EndFont
+       Align                 Center
+       HTMLTitle             true
+End
+
+
+Style ShortTitle
+    Category              FrontMatter
+       LatexName             shorttitle
+       LatexType             Command
+       InTitle               1
+       Align                 Left
+       AlignPossible         Left, Right, Center
+       Margin                Dynamic
+       Labeltype             Static
+       LabelString           "Short title:"
+       Labelsep              M
+       Font
+         Shape               SmallCaps
+         Size                Small
+       EndFont
+       LabelFont
+         Series              Bold
+         Size                Small
+         Shape               Up
+       EndFont
+End
+
+
+Style Author
+    Category              FrontMatter
+       LatexName             author
+       LatexType             Command
+       InTitle               1
+       Align                 Center
+       AlignPossible         Left, Right, Center
+       TopSep                0.5
+       BottomSep             0.5
+       Font
+         Shape               Italic
+         Size                Small
+       EndFont
+End
+
+
+Style TwoAuthors
+    Category              FrontMatter
+       LatexName             twoauthors
+       LatexType             Command
+       InTitle               1
+End
+
+
+Style ThreeAuthors
+    Category              FrontMatter
+       LatexName             threeauthors
+       LatexType             Command
+       InTitle               1
+End
+
+
+Style FourAuthors
+    Category              FrontMatter
+       LatexName             fourauthors
+       LatexType             Command
+       InTitle               1
+End
+
+Style FiveAuthors
+    Category              FrontMatter
+       LatexName             fiveauthors
+       LatexType             Command
+       InTitle               1
+End
+
+Style SixAuthors
+    Category              FrontMatter
+       LatexName             sixauthors
+       LatexType             Command
+       InTitle               1
+End
+
+Style LeftHeader
+    Category              FrontMatter
+       LatexName             leftheader
+       LatexType             Command
+       InTitle               1
+       Align                 Left
+       AlignPossible         Left, Right, Center
+       Margin                Dynamic
+       Labeltype             Static
+       LabelString           "Left header:"
+       Labelsep              M
+       Font
+         Size                Small
+         Shape               SmallCaps
+       EndFont
+       LabelFont
+         Series              Bold
+         Size                Small
+       EndFont
+End
+
+
+Style Affiliation
+    Category              FrontMatter
+       LatexName             affiliation
+       LatexType             Command
+       InTitle               1
+       Margin                Dynamic
+       ParSkip               0.4
+       BottomSep             1.0
+       TopSep                1.5
+       ParSep                1.5
+       Align                 Left
+       AlignPossible         Block, Left, Right, Center
+       LabelType             Static
+       LabelString           "Affiliation:"
+       Labelsep              M
+       LabelFont
+         Series              Bold
+         Size                Small
+       EndFont
+End
+
+Style TwoAffiliations
+    Category              FrontMatter
+       LatexName             twoaffiliations
+       LatexType             Command
+       InTitle               1
+End
+
+Style ThreeAffiliations
+    Category              FrontMatter
+       LatexName             threeaffiliations
+       LatexType             Command
+       InTitle               1
+End
+
+Style FourAffiliations
+    Category              FrontMatter
+       LatexName             fouraffiliations
+       LatexType             Command
+       InTitle               1
+End
+
+Style FiveAffiliations
+    Category              FrontMatter
+       LatexName             fiveaffiliations
+       LatexType             Command
+       InTitle               1
+End
+
+Style SixAffiliations
+    Category              FrontMatter
+       LatexName             sixaffiliations
+       LatexType             Command
+       InTitle               1
+End
+
+
+Style Note
+    Category              FrontMatter
+       LatexName             note
+       LatexType             Command
+       InTitle               1
+       Margin                Dynamic
+       ParSkip               0.4
+       BottomSep             1.5
+       TopSep                1.5
+       ParSep                1.5
+       Align                 Left
+       AlignPossible         Block, Left, Right, Center
+       LabelType             Static
+       LabelString           "Note:"
+       Labelsep              M
+       LabelFont
+         Series              Bold
+         Size                Small
+       EndFont
+End
+
+
+Style Abstract
+    Category              FrontMatter
+       LatexName             abstract
+       LatexType             Command
+       InTitle               1
+       Font
+         Size                Small
+       EndFont
+       Margin                Dynamic
+       LeftMargin            MMN
+       RightMargin           MMN
+       Align                 Block
+       AlignPossible         Block, Left, Right, Center
+       Labeltype             Static
+       LabelString           "Abstract:"
+       Labelsep              M
+       LabelFont
+         Series              Bold
+         Size                Small
+       EndFont
+End
+
+Style Keywords
+    Category              FrontMatter
+       LatexName             keywords
+       LatexType             Command
+       InTitle               1
+       Font
+         Size                Small
+       EndFont
+       Margin                Dynamic
+       LeftMargin            MMN
+       RightMargin           MMN
+       Align                 Block
+       AlignPossible         Block, Left, Right, Center
+       TopSep                0.8
+       BottomSep             0.8
+       Labeltype             Static
+       LabelString           "Keywords:"
+       Labelsep              M
+       LabelFont
+         Size                Small
+         Shape               Italic
+       EndFont
+End
+
+Style AuthorNote
+    Category              FrontMatter
+       LatexName             authornote
+       LatexType             Command
+       InTitle               1
+       Font
+         Size                Small
+       EndFont
+       Margin                Dynamic
+       ParSkip               0.4
+       BottomSep             1.5
+       TopSep                1.5
+       ParSep                1.5
+       Align                 Left
+       LeftMargin            MMN
+       RightMargin           MMN
+       Align                 Block
+       AlignPossible         Block, Left, Right, Center
+       Labeltype             Static
+       LabelString           "Author Note:"
+       Labelsep              M
+       LabelFont
+         Series              Bold
+         Size                Small
+       EndFont
+End
+
+
+Style Acknowledgments
+       ObsoletedBy           AuthorNote
+End
+
+
+Style Journal
+    Category              Preamble
+       LatexName             journal
+       LatexType             Command
+    InPreamble            1
+End
+
+
+Style Copyright
+    Category              Preamble
+       LatexName             ccoppy
+       LatexType             Command
+    InPreamble            1
+       Align                 Right
+End
+
+
+Style CopNum
+    Category              Preamble
+       LatexName             copnum
+       LatexType             Command
+    InPreamble            1
+       Align                 Right
+End
+
+Style Volume
+    Category              Preamble
+       LatexName             volume
+       LatexType             Command
+    InPreamble            1
+End
+
+Style ThickLine
+       LatexName             thickline
+       LatexType             Command
+       KeepEmpty             1
+End
+
+
+
+Input stdlayouts.inc
+
+Style CenteredCaption
+       Margin                First_Dynamic
+       LatexType             Command
+       LatexName             caption
+       NeedProtect           1
+       LabelSep              xx
+       ParSkip               0.4
+       TopSep                0.5
+       Align                 Center
+       LabelType             Sensitive
+       LabelString           "Senseless!"
+       OptionalArgs          1
+       LabelFont
+         Series              Bold
+       EndFont
+       LatexName             centeredcaption
+       Align                 Center
+End
+
+
+Style FitFigure
+       LatexName             fitfigure
+       LatexType             Command
+End
+
+
+Style FitBitmap
+       LatexName             fitbitmap
+       LatexType             Command
+End
+
+
+Input stdsections.inc
+Input stdstarsections.inc
+Input stdinsets.inc
+
+Input stdfloats.inc
+Input stdcounters.inc
+
+NoStyle Part
+NoCounter part
+NoStyle Part*
+NoStyle Chapter
+NoCounter chapter
+NoStyle Chapter*
+NoStyle Section*
+NoStyle Subsection*
+NoStyle Subsubsection*
+NoStyle Paragraph*
+NoStyle Subparagraph*
+
+
+Style Section
+       LabelType             No_Label
+       Align                 Center
+       Font
+         Series              Bold
+         Size                Huge
+       EndFont
+               TocLevel 1
+End
+
+
+Style Subsection
+       LabelType             No_Label
+       Font
+         Series              Bold
+         Size                Larger
+       EndFont
+               TocLevel 2
+End
+
+
+Style Subsubsection
+       LabelType             No_Label
+       Font
+         Series              Bold
+         Size                Large
+       EndFont
+               TocLevel 3
+End
+
+
+Style Paragraph
+       LabelType             No_Label
+       Font
+         Series              Bold
+         Size                Normal
+       EndFont
+               TocLevel 4
+End
+
+
+Style Subparagraph
+       LabelType             No_Label
+       Font
+         Series              Bold
+         Size                Normal
+         Shape               Italic
+       EndFont
+               TocLevel 5
+End
+
+
+Style Itemize
+    Category              List
+       Margin                Static
+       LatexType             Item_Environment
+       LatexName             APAitemize
+       NextNoIndent          1
+       LeftMargin            MMN
+       LabelSep              xx
+       ItemSep               0.2
+       TopSep                0.7
+       BottomSep             0.7
+       ParSep                0.3
+       Align                 Block
+       AlignPossible         Block, Left
+       LabelType             Itemize
+       LabelString           "*"
+End
+
+
+Style Enumerate
+    Category              List
+       Margin                Static
+       LatexType             Item_Environment
+       LatexName             APAenumerate
+       NextNoIndent          1
+       LeftMargin            MMN
+       LabelSep              xx
+       ParSkip               0.0
+       ItemSep               0.2
+       TopSep                0.7
+       BottomSep             0.7
+       ParSep                0.3
+       Align                 Block
+       AlignPossible         Block, Left
+       LabelType             Enumerate
+       RefPrefix             enu
+End
+
+
+Style Seriate
+    Category              List
+       Margin                Static
+       LatexType             Item_Environment
+       LatexName             seriate
+       NextNoIndent          1
+       LeftMargin            MMN
+       LabelSep              x
+       ParSkip               0.0
+       ItemSep               0.9
+       TopSep                0.5
+       BottomSep             0.5
+       ParSep                0.0
+       Align                 Block
+       AlignPossible         Block, Left
+       LabelType             Counter
+       LabelCounter          enumii
+       LabelString           "(\alph{enumii})"
+       LabelStringAppendix   "(\alph{enumii})"
+       RefPrefix             ser
+End
+
diff --git a/lib/layouts/natbibapa.module b/lib/layouts/natbibapa.module
new file mode 100644 (file)
index 0000000..08cd0fa
--- /dev/null
@@ -0,0 +1,18 @@
+#\DeclareLyXModule[natbib.sty,apacite.sty]{Natbibapa}\r
+#DescriptionBegin \r
+#This module adds support for using natbib together with\r
+#apacite (the bibliography style need not be apacite--it\r
+#         could be apacite, apacitex, or any bibliography\r
+#         that works with both the natbib and apacite\r
+#         packages.\r
+#DescriptionEnd \r
+#Requires:\r
+#Excludes:\r
+\r
+Format 35\r
+\r
+Preamble\r
+    \usepackage[natbibapa]{apacite}\r
+EndPreamble\r
+\r
+Provides natbib 1\r
diff --git a/lib/templates/APA6.lyx b/lib/templates/APA6.lyx
new file mode 100644 (file)
index 0000000..fbca660
--- /dev/null
@@ -0,0 +1,286 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/\r
+\lyxformat 413\r
+\begin_document\r
+\begin_header\r
+\textclass apa6\r
+\options jou\r
+\use_default_options false\r
+\begin_modules\r
+natbibapa\r
+\end_modules\r
+\maintain_unincluded_children false\r
+\begin_local_layout\r
+Style Journal\r
+LatexName             journal\r
+LatexType             Command\r
+#      InTitle               0\r
+    InPreamble            1\r
+End\r
+\end_local_layout\r
+\language english\r
+\language_package default\r
+\inputencoding auto\r
+\fontencoding global\r
+\font_roman default\r
+\font_sans default\r
+\font_typewriter default\r
+\font_default_family default\r
+\use_non_tex_fonts false\r
+\font_sc false\r
+\font_osf false\r
+\font_sf_scale 100\r
+\font_tt_scale 100\r
+\r
+\graphics default\r
+\default_output_format default\r
+\output_sync 0\r
+\bibtex_command default\r
+\index_command default\r
+\paperfontsize default\r
+\spacing single\r
+\use_hyperref false\r
+\papersize default\r
+\use_geometry false\r
+\use_amsmath 1\r
+\use_esint 1\r
+\use_mhchem 1\r
+\use_mathdots 1\r
+\cite_engine natbib_authoryear\r
+\use_bibtopic false\r
+\use_indices false\r
+\paperorientation portrait\r
+\suppress_date false\r
+\use_refstyle 1\r
+\index Index\r
+\shortcut idx\r
+\color #008000\r
+\end_index\r
+\secnumdepth 3\r
+\tocdepth 3\r
+\paragraph_separation indent\r
+\paragraph_indentation default\r
+\quotes_language english\r
+\papercolumns 1\r
+\papersides 1\r
+\paperpagestyle default\r
+\tracking_changes false\r
+\output_changes false\r
+\html_math_output 0\r
+\html_css_as_file 0\r
+\html_be_strict false\r
+\end_header\r
+\r
+\begin_body\r
+\r
+\begin_layout Journal\r
+Journal of Important Stuff\r
+\begin_inset Note Note\r
+status open\r
+\r
+\begin_layout Plain Layout\r
+The journal name, volume, ccopy, and copnum appear only in jou and doc modes.\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Volume\r
+Vol.\r
+ 0 (2007), pp.~1--22\r
+\end_layout\r
+\r
+\begin_layout Copyright\r
+© The Author\r
+\end_layout\r
+\r
+\begin_layout CopNum\r
+ISSN XXX-XXXX-XXXX\r
+\end_layout\r
+\r
+\begin_layout Title\r
+Long Title of the Paper Which is Very Descriptive of the Work Being Done\r
+\begin_inset Note Note\r
+status open\r
+\r
+\begin_layout Plain Layout\r
+Warning: Don't force a newline in manuscript mode.\r
+ It won't compile.\r
+ If you want to in jou or doc mode, that's fine.\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout ShortTitle\r
+Short Title of Paper\r
+\end_layout\r
+\r
+\begin_layout Author\r
+Author Name\r
+\end_layout\r
+\r
+\begin_layout LeftHeader\r
+Author\r
+\begin_inset Note Note\r
+status open\r
+\r
+\begin_layout Plain Layout\r
+The left header is used for the author's last name(s), and appears on even-page\r
+ headers in jou mode.\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Affiliation\r
+Big Name University\r
+\begin_inset Newline newline\r
+\end_inset\r
+\r
+Department of Psychology\r
+\end_layout\r
+\r
+\begin_layout Note\r
+Draft of 12/ 16/12.\r
+\end_layout\r
+\r
+\begin_layout Abstract\r
+This the abstract for my document.\r
+ The purpose of this document is to demonstrate the new apa6 class that\r
+ I have been working on.\r
+ There was a layout file for the original apa document class which was authored\r
+ by Randy Gobbel.\r
+ This document is based on that layout, but includes many additions and\r
+ updates.\r
+ I really don't like having relevant information in a preamble if it is\r
+ not necessary.\r
+ So, styles for all the necessary commands have been included as part of\r
+ the document instead.\r
+\end_layout\r
+\r
+\begin_layout Keywords\r
+apa6, layout, template, LyX\r
+\end_layout\r
+\r
+\begin_layout AuthorNote\r
+We would like to acknowledge all of the many people who contributed to this\r
+ work.\r
+\end_layout\r
+\r
+\begin_layout Section\r
+Section Heading\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
+ Standard text.\r
\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+This is more standard text.\r
+ This is more standard text.\r
+ This is more standard text.\r
+ This is more standard text.\r
+ This is more standard text.\r
+ This is more standard text.\r
\r
+\end_layout\r
+\r
+\begin_layout Subsection\r
+Subsection Heading\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+This is more standard text.\r
+ If you use the nifty natbibapa module, then you can select apacite as the\r
+ bibliography style below.\r
+ This allows you to do awesome stuff.\r
+ For example, check out this inline citation.\r
\r
+\begin_inset CommandInset citation\r
+LatexCommand citet\r
+key "jame76"\r
+\r
+\end_inset\r
+\r
+ declared...notice that it uses \r
+\begin_inset Quotes eld\r
+\end_inset\r
+\r
+and\r
+\begin_inset Quotes erd\r
+\end_inset\r
+\r
+ between names.\r
+ Now check out this one \r
+\begin_inset CommandInset citation\r
+LatexCommand citep\r
+key "gree00"\r
+\r
+\end_inset\r
+\r
+.\r
+ It uses \r
+\begin_inset Quotes eld\r
+\end_inset\r
+\r
+&\r
+\begin_inset Quotes erd\r
+\end_inset\r
+\r
+ between names just like it is supposed to.\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset Note Note\r
+status collapsed\r
+\r
+\begin_layout Plain Layout\r
+Unlike the original apa class, the apa6 class does not override whatever\r
+ citation style is listed in the bibliography.\r
+ However, for compliance with apa6, you should set the style to apacite.\r
+\end_layout\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\begin_layout Standard\r
+\begin_inset CommandInset bibtex\r
+LatexCommand bibtex\r
+bibfiles "sample"\r
+options "apacite"\r
+\r
+\end_inset\r
+\r
+\r
+\end_layout\r
+\r
+\end_body\r
+\end_document\r