Browse Source

Template for PLOS ONE journal article

tsdye 5 years ago
parent
commit
ca19ec3aaf
2 changed files with 671 additions and 1 deletions
  1. 2 1
      exporters/index.org
  2. 669 0
      exporters/plos-one-template-worg.org

+ 2 - 1
exporters/index.org

@@ -27,9 +27,10 @@ core, from =contrib/= or from external Org packages.
 - [[file:xoxo.org][XOXO]] :: Export Org files to XOXO files
 - [[file:freemind.org][Freemind]] :: Export Org files to Freemind files
 
-* Export Templates
+* Export templates
 
 - [[file:anno-bib-template-worg.org][Annotated bibliography]] :: Template for a printed annotated bibliography
+- [[file:plos-one-template-worg.org][/PLOS ONE/]] :: Template for a /PLOS ONE/ journal article 
 
 
 

+ 669 - 0
exporters/plos-one-template-worg.org

@@ -0,0 +1,669 @@
+#+OPTIONS: html-link-use-abs-url:nil html-postamble:auto
+#+OPTIONS: html-preamble:t html-scripts:t html-style:t
+#+OPTIONS: html5-fancy:nil tex:t
+#+CREATOR: <a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.3.1 (<a href="http://orgmode.org">Org</a> mode 8.2.5c)
+#+HTML_CONTAINER: div
+#+HTML_DOCTYPE: xhtml-strict
+#+TITLE: Org Mode Template for a /PLOS ONE/ Journal Article
+#+AUTHOR: Thomas S. Dye
+#+EMAIL: tsd at tsdye dot com
+
+#+call: plos-one-start(kwd="TITLE") :wrap latex
+
+
+* Instructions for Use
+
+This file provides a template to export an Org mode file to a LaTeX
+file that meets the specifications of the open-access journal
+[[http://www.plosone.org][/PLOS ONE/]]. It features:
+
+ - environment setup with [[https://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html][Emacs local variables]];
+ - [[http://orgmode.org/manual/The-Export-Dispatcher.html][asynchronous export]] to pdf via LaTeX;
+ - [[http://en.wikibooks.org/wiki/LaTeX/Document_Structure#Document_classes][custom document classes]] for article development and for submitting
+   to the journal;
+ - an optional [[http://www.plosone.org/static/supportingInformation][supporting information document]] capable of creating a
+   [[http://biostats.bepress.com/bioconductor/paper2/][compendium]] in pdf format;
+ - [[http://www.bibtex.org][BibTeX]] bibliography management with [[http://joostkremers.github.io/ebib/][Ebib]]
+
+These features are described in the following sections. In addition,
+there is a [[Checklist][checklist]] to help guide you through configuration and
+document preparation.
+
+The template is distributed as =plos-one-template.org= at
+https://github.com/tsdye/org-plos-one-template.git.
+
+** Emacs Local Variables
+
+The environment is set up with [[Local Variables][Emacs local variables]], which Emacs
+requires be found near the end of the file.  
+
+The following local variable lines initialize the Org mode LaTeX
+exporter, indicate the name of the asynchronous export initialization
+file, and then specify that asynchronous export should be used and
+that the export process should leave data behind in case there are
+problems.
+
+#+begin_example
+ # eval: (require 'ox-latex)
+ # eval: (setq org-export-async-init-file (expand-file-name "init-plos.el"))
+ # org-export-in-background: t 
+ # org-export-async-debug: t 
+#+end_example
+
+The following local variable line provides compatibility across a
+recent Org mode function name change.
+
+#+begin_example
+ # eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe))
+#+end_example
+
+
+The following local variable line executes [[Link Type for Citations][a source code block]] that
+defines an Org mode link that functions to insert a bibliographic
+reference.
+
+#+begin_example
+ # eval: (sbe "define-cite-link")
+#+end_example
+
+
+The final local variable line executes [[ebib-setup][a source code block]] that sets
+up the [[http://joostkremers.github.io/ebib/][Ebib]] BibTeX database manager.
+
+#+begin_example
+ # eval: (sbe "ebib-setup")
+#+end_example
+
+** Asynchronous Export
+
+The /PLOS ONE/ template is set up to use the asynchronous Org mode
+exporter, both for the article and for the optional supporting
+information document.
+
+To export the article with point anywhere in the Org mode buffer, type
+=C-c C-e l o= or =C-c C-e l p=. The first of these will export a LaTeX
+file, compile it with pdflatex, then attempt to open the resulting pdf
+file. The second one does the same, but does not attempt to open the
+pdf file.
+
+To export the supporting information document, move point to the
+[[Supporting Information Document]] heading and type =C-c C-e C-s l o= or
+=C-c C-e C-s l p= to export the supporting information sub-tree.
+
+** Custom Document Classes
+
+The /PLOS ONE/ template includes two custom document classes named
+=plos-devel= and =plos-submit=.  
+
+The document class =plos-devel= can be used when the article is being
+written. It includes figures in the exported document.
+
+The document class =plos-submit= can be used to make the pdf file that
+will be submitted to /PLOS ONE/. It includes figure captions, but does
+not insert the figures. /PLOS ONE/ requires that figures be submitted
+as separate tiff or eps format graphics files.
+
+The document class is set near the top of the file, with
+the =#+LATEX_CLASS:= property.  The default value set in the template
+is =plos-devel=.  In most cases it is convenient to use this document
+class until the article is complete and ready to be sent to the
+journal. Then, the =#+LATEX_CLASS:= property can be changed to
+=plos-submit= and the document exported in the usual way.
+
+** Using Ebib for Citations
+
+The file is set up to use Ebib for citations.  Ebib is a convenient
+tool that uses Emacs for display, but otherwise operates
+independently. You can learn how to use Ebib with its excellent [[http://joostkremers.github.io/ebib/][user
+manual]]. Please be aware that the current user manual is hosted on
+github and that the old user manual, hosted on sourceforge, is what
+Google finds. An easy way to tell them apart is the background color;
+the old manual has a maroon background and the new one has a
+bluish background. 
+
+Ebib is set up to know about the default bibliography database,
+local.bib. If you are used to working in a LaTeX environment and have
+one or more bibliographic databases, you can choose either to transfer
+entries from your own database to local.bib, or you can configure the
+template to use more than one bibliographic database.  There are
+instructions below on how to add a bibliographic database to the
+template. 
+
+You start Ebib with M-x ebib RET.  By default, you should see the
+local.bib with a single entry. Ebib uses single keystrokes for
+commands. Press =z= to lower Ebib and return to this document.
+
+There are several ways to insert a reference into your document. The
+first, and the one I use most often, is bound by the template to =C-c
+b=. Ebib will prompt for the citation key to use, then for the
+citation command, and finally, for Argument 1, which specifies how the
+citation will look in the Org mode buffer.
+
+The sequence =C-c b=, =sch TAB RET=, =c TAB RET=, =schulte= inserts
+the following reference: [[cite:schulte12:_multi_languag_comput_envir_liter][schulte]].  Clicking on the link will take you
+to the entry of local.bib.  Press =z= in Ebib to return to this document.
+
+*** Adding Another BibTeX Database
+
+ - [ ] Add the database name to the [[end-matter][LaTeX =\bibliography= command]]
+ - [ ] If you are making a  [[http://biostats.bepress.com/bioconductor/paper2/][compendium]], add the database name to the
+   [[compendium-contents][compendium contents table]]
+ - [ ] Modify the [[ebib-setup][Ebib setup code]] and execute the source code block
+
+** Figures
+
+/PLOS ONE/ has a [[http://www.plosone.org/static/figureGuidelines#titles][detailed specification for figures]].  You are
+encouraged to read it carefully.  In particular, you'll need to
+produce either =tiff= or =eps= files to submit to the journal.
+
+If you are planning to distribute a  [[http://biostats.bepress.com/bioconductor/paper2/][compendium]] with your paper, then
+you will want to develop the figures in the [[Supporting Information Document][supporting information
+document]] section, so the code involved in their construction can be
+easily packaged.
+
+The figures for the paper are inserted in the [[Figure Legends][section for figure
+legends]], in the usual Org mode way.
+
+I develop the paper using the =#+LATEX_CLASS:= plos-devel and insert
+the figures as LaTeX-friendly =pdf= or =jpg= files.  This way I can
+see that the figures are right with their captions and I can
+distribute the draft paper to colleagues as a single =pdf= document
+with figures.
+
+When it is time to submit to the journal, I switch the =#+LATEX_CLASS=
+to plos-submit, which removes the figures, but leaves the figure
+captions.  At that time, the LaTeX-friendly figures can be converted
+to either =tiff= or =eps= format for the journal.
+
+** /PLOS ONE/ Supporting Information Document
+
+/PLOS ONE/ will accept a  [[http://biostats.bepress.com/bioconductor/paper2/][compendium]] in =pdf= format as Supporting
+Information. The template supports this effort by partially populating
+two tables, one that lists the [[open-source-software][software used to produce the paper]] and
+the other that includes [[compendium-contents][links to graphic and other files]] archived
+within the =pdf= file. 
+
+** Checklist [0/10]                                 
+
+  - [ ] Save this file as the file name of your choice, e.g., myarticle.org.
+  - [ ] Configure the [[export-setup-plos-one][PLOS ONE initialization files]]
+  - [ ] Tangle the initialization files by [[elisp:(sbe "tangle-init-file")][clicking here]]
+  - [ ] Complete the [[author-table][author table]]
+  - [ ] Possibly configure the [[end-matter][bibliography command]], or just use the
+    default local.bib
+  - [ ] Possibly configure the [[Supporting Information Document][supporting information document]] EXPORT_TITLE
+    property to reflect the title of your article 
+  - [ ] Prepare a [[Striking Image][striking image]]
+  - [ ] Prepare a [[PLOS-One Instructions for Cover Letter][cover letter]]
+  - [ ] Optionally, export the supporting information document by
+    pressing =C-c C-e C-s l o= with the point in the [[Supporting
+    Information Document][supporting information document]] headline
+  - [ ] Export the article, by pressing =C-c C-e l o= anywhere in the document
+ 
+* Abstract
+
+# add the abstract above this line
+
+** /PLOS ONE/ instructions for the abstract [0/5]                  :noexport:
+The abstract should:
+ - [ ] Describe the main objective(s) of the study
+ - [ ] Explain how the study was done, including any model organisms
+   used, without methodological detail
+ - [ ] Summarize the most important results and their significance
+ - [ ] Not exceed 300 words
+ - [ ] Abstracts should not include:
+   - [ ] Citations
+   - [ ] Abbreviations, if possible
+* Introduction
+* Section(s) to be written
+* Discussion
+* Acknowledgments
+
+
+# acknowledge colleagues above this line
+
+#+name: end-matter
+#+begin_latex
+  % Add the base name of new .bib file(s) between the curly braces 
+  \bibliography{local}
+  \clearpage
+#+end_latex
+
+* Supporting Information
+
+# describe supporting information above this line
+
+#+LATEX: \clearpage
+
+* Figure Legends
+
+# insert figures above this line
+
+#+latex: \clearpage
+
+* Tables
+
+# insert tables above this line
+
+#+latex: \clearpage
+
+* Supporting Information Document                                
+   :PROPERTIES:
+   :EXPORT_FILE_NAME: supporting-information
+   :EXPORT_TITLE: Supporting Information for ``YOUR TITLE HERE''
+   :EXPORT_LATEX_HEADER: \input{supplementary-material-header}
+   :END:
+
+#+call: plos-one-start(kwd="EXPORT_TITLE") :wrap latex
+
+#+TOC: tables
+#+TOC: listings
+
+** Introduction
+
+
+#+name: open-source-software
+#+attr_latex: :font \footnotesize :booktabs t
+#+caption[Open source software requirements]: *Open source software requirements.*
+| Software        | Distribution      | Notes                                       |
+|-----------------+-------------------+---------------------------------------------|
+| Emacs           | [[http://www.gnu.org/software/emacs/][GNU Emacs]]         | See distribution installation instructions  |
+|                 | [[http://www.us.xemacs.org/][XEmacs]]            | See distribution installation instructions  |
+| Ebib            | [[http://joostkremers.github.io/ebib/][Ebib]]              | Easy installation via [[http://melpa.milkbox.net/#/][MELPA]]                      |
+| \LaTeX          | [[http://www.tug.org/texlive][TeX Live (Linux)]]  | See distribution installation instructions  |
+|                 | [[http://www.tug.org/mactex/][MacTeX (Mac OS X)]] | See distribution installation instructions  |
+|                 | [[http://www.tug.org/protext/][proTeXt (Windows)]] | See distribution installation instructions  |
+| \LaTeX packages | [[http://www.ctan.org/pkg/setspace][setspace]]          | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/amsmath][amsmath]]           | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/amsfonts][amssymb]]           | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/graphicx][graphicx]]          | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/cite][cite]]              | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/color][color]]             | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/caption][caption]]           | Required by /PLOS ONE/                      |
+|                 | [[http://www.ctan.org/pkg/minted][minted]]            | Used by the Supporting Information document |
+|                 | [[http://www.ctan.org/pkg/longtable][longtable]]         | Used by the Supporting Information document |
+|                 | [[http://www.ctan.org/pkg/booktabs][booktabs]]          | Used by the Supporting Information document |
+|                 | [[http://www.ctan.org/pkg/attachfile][attachfile]]        | Used by the Supporting Information document |
+|                 | [[http://www.ctan.org/tex-archive/usergrps/dante/dtk][dtklogos]]          | Used by the Supporting Information document |
+|                 | [[http://www.ctan.org/pkg/paralist][paralist]]          | Used by the Supporting Information document |
+
+
+#+caption[Compendium contents]: *Compendium contents.*
+#+attr_latex: :font \footnotesize :booktabs t
+#+name: compendium-contents
+| Description                       | File name               | Link to file                                                      |
+|-----------------------------------+-------------------------+-------------------------------------------------------------------|
+| Org mode /PLOS ONE/ template file | =plos-one-template.org= | @@latex:\attachfile[mimetype=text/plain]{plos-one-template.org}@@ |
+| Project bibliographic database    | =local.bib=             | @@latex:\attachfile[mimetype=text/plain]{local.bib}@@             |
+| /PLOS ONE/ bibliography style     | =plos2009.bst=          | @@latex:\attachfile[mimetype=text/plain]{plos2009.bst}@@          |
+
+** Section(s) to be written
+* Cover Letter                                                    
+:PROPERTIES:
+   :EXPORT_FILE_NAME: cover-letter
+   :END:
+
+** PLOS-One Instructions for Cover Letter [0/7]                   
+You should supply an approximately one page cover letter that:
+
+ - [ ] Concisely summarizes why your paper is a valuable addition to the
+   scientific literature
+ - [ ] Briefly relates your study to previously published work
+ - [ ] Specifies the type of article you are submitting (for example,
+   research article, systematic review, meta-analysis, clinical trial)
+ - [ ] Describes any prior interactions with PLOS regarding the submitted
+   manuscript
+ - [ ] Suggests appropriate /PLOS ONE/ Academic Editors to handle your
+   manuscript ([[http://www.plosone.org/static/edboard][view a complete listing of our academic editors]])
+ - [ ] Lists any recommended or opposed reviewers
+ - [ ] Your cover letter should not include requests to reduce or waive
+   publication fees. Should your manuscript be accepted, you will have
+   the opportunity to include your requests at that time. See PLOS ONE
+   Editorial Policy for more information regarding publication fees.
+* Striking Image                                                  
+
+#+begin_quote
+Authors are encouraged to upload a "striking image" that may be used
+to represent their paper online in places like the journal homepage or
+in search results. The striking image must be derived from a figure or
+supporting information file from the paper, ie. a cropped portion of
+an image or the entire image. Striking images should ideally be high
+resolution, eye-catching, single panel images, and should ideally
+avoid containing added details such as text, scale bars, and arrows.
+If no striking image is uploaded, a figure from the paper will be
+designated as the striking image.
+#+end_quote
+
+* Author Table 
+
+The =author-table= holds information on the authors and their
+affiliations.  It is assembled and placed on the title page by [[plos-one-start][this
+Emacs lisp source code block]].  Most of the column names should be
+self-explanatory. The =Corresponding= column should have "yes" or "no"
+entries that indicate whether or not the author is the corresponding
+author.
+
+#+name: author-table
+| Author name | Department | Institution | City | State | Country | Email | Corresponding |
+|-------------+------------+-------------+------+-------+---------+-------+---------------|
+
+
+*NOTE* Do not add, delete, or change the position of a column in the
+=author-table=.  The [[plos-one-start][simple-minded code]] that processes the
+table will be confused if you do.
+
+* /PLOS ONE/ Template Source Code
+** Export setup for /PLOS ONE/
+
+The following source code block can be configured for the user's set
+up by setting the =:var path-to-ox-latex= header argument to an
+appropriate value.
+
+#+name: export-setup-plos-one
+#+header: :var path-to-ox-latex="~/.emacs.d/src/org-mode/lisp"
+#+header: :noweb yes
+#+header: :results silent
+#+header: :tangle init-plos.el
+#+begin_src emacs-lisp
+  (setq load-path (cons path-to-ox-latex load-path))
+  (require 'ox-latex)
+  (setq org-confirm-babel-evaluate nil)
+  (setq org-latex-listings 'minted)
+  (setq org-latex-listings-options
+        '(("frame" "lines")
+          ("basicstyle" "\\footnotesize")
+          ("numbers" "left")
+          ("numberstyle" "\\tiny")))
+  (setq org-latex-minted-options
+        '(("frame" "lines")
+          ("fontsize" "\\footnotesize")
+          ("linenos" "")))
+  (add-to-list 'org-latex-minted-langs '(lisp "cl"))
+  (setq org-latex-pdf-process
+        '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
+          "bibtex %b"
+          "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
+          "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
+    (org-babel-do-load-languages
+     'org-babel-load-languages
+     '((R . t)
+       (dot . t)
+       (emacs-lisp . t)
+       (latex . t)
+       (org . t)
+       (sh . t)))
+    <<user-entities>>
+    (setq org-latex-packages-alist nil)
+    (add-to-list 'org-latex-packages-alist '("" "setspace"))
+    (add-to-list 'org-latex-packages-alist '("" "amsmath"))
+    (add-to-list 'org-latex-packages-alist '("" "amssymb"))
+    (add-to-list 'org-latex-packages-alist '("" "graphicx"))
+    (add-to-list 'org-latex-packages-alist '("" "cite"))
+    (add-to-list 'org-latex-packages-alist '("usenames,dvipsnames" "color"))
+    (add-to-list 'org-latex-packages-alist '("labelfont=bf,labelsep=period,justification=raggedright" "caption"))
+    (setq org-latex-tables-booktabs nil)
+    (setq org-latex-title-command nil)
+    (setq org-latex-remove-logfiles nil)
+    (setq org-latex-toc-command "\\tableofcontents\n\n")
+    (setq org-latex-classes nil)
+    (add-to-list 'org-latex-classes
+                 '("plos-submit"
+                   "\\documentclass[10pt]{article}
+    [NO-DEFAULT-PACKAGES]
+    [PACKAGES]
+    [EXTRA]
+    \\doublespacing
+    % Text layout
+    \\topmargin 0.0cm
+    \\oddsidemargin 0.5cm
+    \\evensidemargin 0.5cm
+    \\textwidth 16cm 
+    \\textheight 21cm
+    \\bibliographystyle{plos2009}
+    \\makeatletter
+    \\renewcommand{\\@biblabel}[1]{\\quad#1.}
+    \\makeatother
+    \\pagestyle{myheadings}
+    \\renewcommand{\\includegraphics}[2][]{}
+    %% ** EDIT HERE **
+    \\DeclareCaptionLabelFormat{si}{#1S#2}    
+    
+    %% ** EDIT HERE **
+    %% PLEASE INCLUDE ALL MACROS BELOW
+    %% \\newcommand{\\texttwosuperior}{$^{2}$}
+    %% \\newcommand{\\textpm}{$\\pm$}
+    \\newcommand{\\rc}{$^{14}C$}
+    %% END MACROS SECTION"
+                     ("\\section{%s}" . "\\section*{%s}")
+                     ("\\subsection{%s}" . "\\subsection*{%s}")
+                     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
+                     ("\\paragraph{%s}" . "\\paragraph*{%s}")
+                   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
+    (add-to-list 'org-latex-classes
+                 '("plos-devel"
+                   "\\documentclass[10pt]{article}
+    [NO-DEFAULT-PACKAGES]
+    [PACKAGES]
+    [EXTRA]
+    \\doublespacing
+    % Text layout
+    \\topmargin 0.0cm
+    \\oddsidemargin 0.5cm
+    \\evensidemargin 0.5cm
+    \\textwidth 16cm 
+    \\textheight 21cm
+    \\bibliographystyle{plos2009}
+    \\makeatletter
+    \\renewcommand{\\@biblabel}[1]{\\quad#1.}
+    \\makeatother
+    \\pagestyle{myheadings}
+    %% ** EDIT HERE **
+    \\DeclareCaptionLabelFormat{si}{#1S#2}    
+    
+    %% ** EDIT HERE **
+    %% PLEASE INCLUDE ALL MACROS BELOW
+    %% \\newcommand{\\texttwosuperior}{$^{2}$}
+    %% \\newcommand{\\textpm}{$\\pm$}
+    \\newcommand{\\rc}{$^{14}C$}
+    %% END MACROS SECTION"
+                     ("\\section{%s}" . "\\section*{%s}")
+                     ("\\subsection{%s}" . "\\subsection*{%s}")
+                     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
+                     ("\\paragraph{%s}" . "\\paragraph*{%s}")
+                     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
+      <<ngz-nbsp>>
+      <<tsd-textpm>>
+      <<tsd-continuation-strings>>
+      <<define-cite-link>>
+#+end_src
+
+** Include File for Supporting Information Class File
+
+#+begin_example
+,#+name: supplementary-material-latex-header
+,#+header: :tangle supplementary-material-header.tex
+,#+begin_src latex
+  \usepackage{dtklogos}% for the \BibTeX command
+  \usepackage{longtable}
+  \usepackage{minted}
+  \usemintedstyle{tango}
+  \renewcommand\listoflistingscaption{List of Source Code Block Listings}
+  \usepackage{booktabs}
+  \usepackage{paralist}
+  \usepackage[colorlinks=true,allcolors=blue]{hyperref}
+  \usepackage{attachfile}
+  \renewcommand\thefigure{S\arabic{figure}} 
+  \renewcommand\thetable{S\arabic{table}} 
+  \renewcommand\thelisting{S\arabic{listing}} 
+,#+end_src
+#+end_example
+
+** Link Type for Citations
+
+The following source code block defines a cite: link type.  The cite
+links will be inserted into the Org mode document by Ebib.  When the
+Org mode file is exported to LaTeX, a =\cite= command is inserted into
+the LaTeX file. This is the only type of citation allowed by the /PLOS
+ONE/ style.
+
+
+#+name: define-cite-link
+#+header: :results silent :exports code
+#+begin_src emacs-lisp
+  (org-add-link-type
+   "cite" 'ebib-open-org-link
+   (lambda (path desc format)
+     (cond
+       ((eq format 'latex)
+        (format "\\cite{%s}" path)))))
+#+end_src
+
+** Access Keyword Values
+
+This is taken from [[http://jkitchin.github.io/blog/2013/05/05/Getting-keyword-options-in-org-files/][John Kitchin's blog]].  It has been modified so
+=org-element-map= returns node properties in addition to keywords. 
+
+#+name: jk-keywords
+#+header: :results silent
+#+begin_src emacs-lisp
+(defun jk-org-kwds ()
+  "parse the buffer and return a cons list of (property . value)
+from lines like: #+PROPERTY: value"
+  (org-element-map (org-element-parse-buffer 'element) '(keyword node-property)
+                   (lambda (keyword) (cons (org-element-property :key keyword)
+                                           (org-element-property :value keyword)))))
+
+(defun jk-org-kwd (KEYWORD)
+  "get the value of a KEYWORD in the form of #+KEYWORD: value"
+  (cdr (assoc KEYWORD (jk-org-kwds))))
+#+end_src
+
+*** Test Keyword Values
+
+The following source code block should return the value of
+the =#+HTML_CONTAINER:= property declared near the top of this file.
+
+#+name: test-properties
+#+header: :exports both
+#+begin_src emacs-lisp
+  (jk-org-kwd "HTML_CONTAINER")
+#+end_src
+
+#+results: test-properties
+: div
+
+** Tangle the Initialization File
+
+#+name: tangle-init-file
+#+header: :results silent
+#+begin_src emacs-lisp
+(org-babel-tangle)
+#+end_src
+
+** Preamble Source Code
+
+The source code block =plos-one-start= is called before the first
+headline. It takes information from the =author-table= and creates a
+title page that meets the following [[http://www.plosone.org/static/guidelines#format][/PLOS ONE/ specification]]:
+
+#+begin_quote
+The title, authors, and affiliations should all be included on a title
+page as the first page of the manuscript file.
+#+end_quote
+
+#+name: plos-one-start
+#+header: :var tab=author-table
+#+header: :var kwd="TITLE"
+#+header: :results raw 
+#+header: :wrap latex
+#+header: :colnames no 
+#+header: :hlines yes
+#+header: :noweb yes
+#+header: :exports code
+#+begin_src emacs-lisp
+  <<jk-keywords>>
+  (require 'cl)
+  (defun author-name (recs)
+    "Format the author name list."
+    (let ((i 0))
+      (mapcar (lambda (row)
+                (concat (format "%s$^{%d%s" (first row)
+                                (incf i)
+                                (if (equal "yes" (eighth row)) ",\\ast" ""))
+                        (if (equal row (car (last recs))) "}$" "}$,")))
+              recs)))
+  
+  (defun author-affiliation (recs)
+    "Format the author affiliation list."
+    (let ((i 0))
+      (mapcar (lambda (row)
+                (format "\\bf{%d} %s, %s, %s, %s, %s" (incf i)
+                        (second row) (third row) (fourth row)
+                        (fifth row) (sixth row)))
+              recs)))
+  (defun corresponding-email (recs)
+    "Return the corresponding email."
+    (mapcar (lambda (row)
+              (format "%s" (if (equal "yes" (eighth row)) (seventh row) "")))
+            recs))
+  
+  (let* ((tab (cdr (cdr tab)))
+         (a (author-name tab))
+         (b (author-affiliation tab))
+         (c (corresponding-email tab)))
+    (concat (format "\\begin{flushleft}\n{\\Large\n\\textbf{%s}\n}\n\\\\\n"
+                    (jk-org-kwd kwd))
+            (mapconcat 'identity a "\n") "\n\\\\\n"
+            (mapconcat 'identity b "\n\\\\\n")
+            "\n\\\\\n$\\ast$ E-mail: "
+            (mapconcat 'identity c "\n")
+            "\n\\end{flushleft}\n\\newpage"))
+#+end_src
+
+** Ebib Setup
+
+This source code block initializes Ebib and binds =C-c b= to the
+command that inserts the =cite:= link.  It instructs Ebib to look for
+the BibTeX database, =local.bib=, in the current directory and puts
+=local.bib= on the list of local BibTeX file names.  The last line
+defines the command that inserts the =cite:= link.  
+
+#+name: ebib-setup
+#+begin_src emacs-lisp
+  (autoload 'ebib "ebib" "Ebib, a BibTeX database manager." t)
+  (dolist (hook '(org-mode-hook))
+    (add-hook hook (lambda () (local-set-key "\C-cb" 'ebib-insert-bibtex-key))))
+  (setq ebib-bib-search-dirs (quote ("./")))
+  (setq ebib-preload-bib-files (quote ("local.bib")))
+  (setq ebib-local-bibtex-filenames (quote ("local.bib")))
+  (setq ebib-citation-commands
+        (quote ((org-mode (("cite" "[[cite:%K][%A]]"))))))
+#+end_src
+
+If you want to add another BibTeX database to the setup, then you
+might need to modify this code in three places.  For example, to also
+load a database named =main.bib= that is found in the =biblio= folder
+of the user's home directory:
+
+#+begin_example
+  (setq ebib-bib-search-dirs (quote ("./" "~/biblio")))
+  (setq ebib-preload-bib-files (quote ("local.bib" "main.bib")))
+  (setq ebib-local-bibtex-filenames (quote ("local.bib" "main.bib")))
+#+end_example
+
+
+* Local Variables                
+
+#+begin_example
+# eval: (require 'ox-latex)
+# eval: (setq org-export-async-init-file (expand-file-name "init-plos.el"))
+# org-export-in-background: t 
+# org-export-async-debug: t 
+# eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe))
+# eval: (sbe "define-cite-link")
+# eval: (sbe "ebib-setup")
+#+end_example
+
+
+              
+