-
Notifications
You must be signed in to change notification settings - Fork 5
/
PeerJ_Rev1_1_Pandoc-Scholar.tex
1967 lines (1686 loc) · 81 KB
/
PeerJ_Rev1_1_Pandoc-Scholar.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[10pt,fleqn]{wlpeerj}
\usepackage{lineno}
\usepackage{unicode-math}
\setmainfont
[ Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]{xits}
\setmathfont
[ Extension = .otf,
BoldFont = *bold,
]{xits-math}
\linenumbers
\usepackage{ifxetex,ifluatex}
\usepackage[CJK]{ucharclasses} %provides fontreplacement
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
%\else % if luatex or xelatex
% \ifxetex
% \usepackage{mathspec}
% \else
% \usepackage{fontspec}
% \fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\usepackage[unicode=true]{hyperref}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{{#1}}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{{#1}}}
\newcommand{\ImportTok}[1]{{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{{#1}}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{{#1}}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{{#1}}}
\newcommand{\BuiltInTok}[1]{{#1}}
\newcommand{\ExtensionTok}[1]{{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{{#1}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{{#1}}}
\newcommand{\RegionMarkerTok}[1]{{#1}}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
\newcommand{\NormalTok}[1]{{#1}}
\usepackage{longtable,booktabs}
% Fix footnotes in tables (requires footnote package)
\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{}
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\begin{abstract}
The timely publication of scientific results is essential for dynamic
advances in science. The ubiquitous availability of computers which are
connected to a global network made the rapid and low-cost distribution
of information through electronic channels possible. New concepts, such
as Open Access publishing and preprint servers are currently changing
the traditional print media business towards a community-driven peer
production. However, the cost of scientific literature generation, which
is either charged to readers, authors or sponsors, is still high. The
main active participants in the authoring and evaluation of scientific
manuscripts are volunteers, and the cost for online publishing
infrastructure is close to negligible. A major time and cost factor is
the formatting of manuscripts in the production stage. In this article
we demonstrate the feasibility of writing scientific manuscripts in
plain markdown (MD) text files, which can be easily converted into
common publication formats, such as PDF, HTML or EPUB, using pandoc. The
simple syntax of markdown assures the long-term readability of raw files
and the development of software and workflows. We show the
implementation of typical elements of scientific manuscripts --
formulas, tables, code blocks and citations -- and present tools for
editing, collaborative writing and version control. We give an example
on how to prepare a manuscript with distinct output formats, a DOCX file
for submission to a journal, and a LATEX/PDF version for deposition as a
PeerJ preprint. Further, we implemented new features for supporting
`semantic web' applications, such as the `journal article tag suite' -
JATS, and the `citation typing ontology' - CiTO standard. Reducing the
work spent on manuscript formatting translates directly to time and cost
savings for writers, publishers, readers and sponsors. Therefore, the
adoption of the MD format contributes to the agile production of open
science literature. Pandoc Scholar is freely available from
\url{https://github.com/pandoc-scholar}.
\end{abstract}
% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\title{Formatting Open Science: agilely creating multiple document formats for
academic manuscripts with Pandoc Scholar}
\author[1]{Albert Krewinkel}
\author[2,✉]{Robert Winkler}
\corrauthor[✉]{Prof.~Dr.~Robert Winkler}{[email protected]}
\affil[1]{Pandoc Development Team}
\affil[2]{CINVESTAV Unidad Irapuato, Department of Biochemistry and Biotechnology}
\date{}
\begin{document}
\flushbottom
\maketitle
\thispagestyle{empty}
\textbf{Keywords:} open science, document formats, markdown, latex,
publishing, typesetting
\newpage
\section{Introduction}\label{introduction}
Agile development of science depends on the continuous exchange of
information between researchers (Woelfle, Olliaro \& Todd, 2011). In the
past, physical copies of scientific works had to be produced and
distributed. Therefore, publishers needed to invest considerable
resources for typesetting and printing. Since the journals were mainly
financed by their subscribers, their editors not only had to decide on
the scientific quality of a submitted manuscript, but also on the
potential interest to their readers. The availability of globally
connected computers enabled the rapid exchange of information at low
cost. Yochai Benkler (2006) predicts important changes in the
information production economy, which are based on three observations:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
A nonmarket motivation in areas such as education, arts, science,
politics and theology.
\item
The actual rise of nonmarket production, made possible through
networked individuals and coordinate effects.
\item
The emergence of large-scale peer production, e.g.~of software and
encyclopedias.
\end{enumerate}
Immaterial goods such as knowledge and culture are not lost when
consumed or shared -- they are `nonrival' --, and they enable a
networked information economy, which is not commercially driven
(Benkler, 2006).
\subsection{Preprints and e-prints}\label{preprints-and-e-prints}
In some areas of science a preprint culture, i.e.~a paper-based exchange
system of research ideas and results, already existed when Paul Ginsparg
in 1991 initiated a server for the distribution of electronic preprints
-- `e-prints' -- about high-energy particle theory at the Los Alamos
National Laboratory (LANL), USA (Ginsparg, 1994). Later, the LANL server
moved with Ginsparg to Cornell University, USA, and was renamed as arXiv
(Butler, 2001). Currently, arXiv (\url{https://arxiv.org/}) publishes
e-prints related to physics, mathematics, computer science, quantitative
biology, quantitative finance and statistics. Just a few years after the
start of the first preprint servers, their important contribution to
scientific communication was evident (Ginsparg, 1994; Youngen, 1998;
Brown, 2001). In 2014, arXiv reached the impressive number of 1 million
e-prints (Van Noorden, 2014).
In more conservative areas, such as chemistry and biology, accepting the
publishing prior peer-review took more time (Brown, 2003). A preprint
server for life sciences (\url{http://biorxiv.org/}) was launched by the
Cold Spring Habor Laboratory, USA, in 2013 (Callaway, 2013). \emph{PeerJ
preprints} (\url{https://peerj.com/preprints/}), started in the same
year, accepts manuscripts from biological sciences, medical sciences,
health sciences and computer sciences.
The terms `preprints' and `e-prints' are used synonymously, since the
physical distribution of preprints has become obsolete. A major drawback
of preprint publishing are the sometimes restrictive policies of
scientific publishers. The SHERPA/RoMEO project informs about copyright
policies and self-archiving options of individual publishers
(\url{http://www.sherpa.ac.uk/romeo/}).
\subsection{Open Access}\label{open-access}
The term \emph{`Open Access'} (OA) was introduced 2002 by the Budapest
Open Access Initiative and was defined as:
\emph{``Barrier-free access to online works and other resources. OA
literature is digital, online, free of charge (gratis OA), and free of
needless copyright and licensing restrictions (libre OA).''} (Suber,
2012)
Frustrated by the difficulty to access even digitized scientific
literature, three scientists founded the \emph{Public Library of Science
(PLoS)}. In 2003, \emph{PLoS Biology} was published as the first fully
Open Access journal for biology (Brown, Eisen \& Varmus, 2003; Eisen,
2003).
Thanks to the great success of OA publishing, many conventional print
publishers now offer a so-called `Open Access option', i.e.~to make
accepted articles free to read for an additional payment by the authors.
The copyright in these hybrid models might remain with the publisher,
whilst fully OA usually provide a liberal license, such as the Creative
Commons Attribution 4.0 International (CC BY 4.0,
\url{https://creativecommons.org/licenses/by/4.0/}).
OA literature is only one component of a more general \emph{open}
philosophy, which also includes the access to scholarships, software,
and data (Willinsky, 2005). Interestingly, there are several different
`schools of thought' on how to understand and define \emph{Open
Science}, as well the position that any science is open by definition,
because of its objective to make generated knowledge public (Fecher \&
Friesike, 2014).
\subsection{Cost of journal article
production}\label{cost-of-journal-article-production}
In a recent study, the article processing charges (APCs) for research
intensive universities in the USA and Canada were estimated to be about
1,800 USD for fully OA journals and 3,000 USD for hybrid OA journals
(Solomon \& Björk, 2016). PeerJ (\url{https://peerj.com/}), an OA
journal for biological and computer sciences launched in 2013,
drastically reduced the publishing cost, offering its members a
life-time publishing plan for a small registration fee (Van Noorden,
2012); alternatively the authors can choose to pay an APC of 1,095 USD,
which may be cheaper, if multiple co-authors participate.
Examples such as the \emph{Journal of Statistical Software} (\emph{JSS},
\url{https://www.jstatsoft.org/}) and \emph{eLife}
(\url{https://elifesciences.org/}) demonstrate the possibility of
completely community-supported OA publications. \textbf{Fig. 1} compares
the APCs of different OA publishing business models.
\emph{JSS} and \emph{eLife} are peer-reviewed and indexed by Thomson
Reuters. Both journals are located in the Q1 quality quartile in all
their registered subject categories of the Scimago Journal \& Country
Rank (\url{http://www.scimagojr.com/}), demonstrating that high-quality
publications can be produced without charging the scientific authors or
readers.
\begin{figure}[htbp]
\centering
\includegraphics{Fig1.png}
\caption{Article Processing Charge (APCs) that authors have to pay for
with different Open Access (OA) publishing models. Data from (Solomon \&
Björk, 2016) and journal web-pages.}
\end{figure}
In 2009, a study was carried out concerning the \emph{``Economic
Implications of Alternative Scholarly Publishing Models''}, which
demonstrates an overall societal benefit by using OA publishing model
(Houghton et al., 2009). In the same report, the real publication costs
are evaluated. The relative costs of an article for the publisher are
represented in \textbf{Fig. 2}.
\begin{figure}[htbp]
\centering
\includegraphics{Fig2.png}
\caption{Estimated publishing cost for a `hybrid' journal (conventional
with Open Access option). Data from (Houghton et al., 2009).}
\end{figure}
Conventional publishers justify their high subscription or APC prices
with the added value, e.g.~journalism (stated in the graphics as
`non-article processing'). But also stakeholder profits, which could be
as high as 50\%, must be considered, and are withdrawn from the science
budget (Van Noorden, 2013).
Generally, the production costs of an article could be roughly divided
into commercial and academic/ technical costs (\textbf{Fig. 2}). For
nonmarket production, the commercial costs such as margins/ profits,
management etc. can be drastically reduced. Hardware and services for
hosting an editorial system, such as Open Journal Systems of the Public
Knowledge Project (\url{https://pkp.sfu.ca/ojs/}) can be provided by
public institutions. Employed scholars can perform editor and reviewer
activities without additional cost for the journals. Nevertheless,
`article processing', which includes the manuscript handling during peer
review and production represents the most expensive part.
Therefore, we investigated a strategy for the efficient formatting of
scientific manuscripts.
\subsection{Current standard publishing
formats}\label{current-standard-publishing-formats}
Generally speaking, a scientific manuscript is composed of contents and
formatting. While the content, i.e.~text, figures, tables, citations
etc., may remain the same between different publishing forms and journal
styles, the formatting can be very different. Most publishers require
the formatting of submitted manuscripts in a certain format. Ignoring
this \textbf{Guide for Authors}, e.g.~by submitting a manuscript with a
different reference style, gives a negative impression with a journal's
editorial staff. Too carelessly prepared manuscripts can even provoke a
straight `desk-reject' (Volmer \& Stokes, 2016).
Currently DOC(X), LATEX and/ or PDF file formats are the most frequently
used formats for journal submission platforms. But even if the content
of a submitted manuscript might be accepted during the peer review `as
is', the format still needs to be adjusted to the particular publication
style in the production stage. For the electronic distribution and
archiving of scientific works, which is gaining more and more
importance, additional formats (EPUB, (X)HTML, JATS) need to be
generated. \textbf{Tab. 1} lists the file formats which are currently
the most relevant ones for scientific publishing.
Although the content elements of documents, such as title, author,
abstract, text, figures, tables, etc., remain the same, the syntax of
the file formats is rather different. \textbf{Tab. 2} demonstrates some
simple examples of differences in different markup languages.
Documents with the commonly used Office Open XML (DOCX Microsoft Word
files) and OpenDocument (ODT LibreOffice) file formats can be opened in
a standard text editor after unzipping. However, content and formatting
information is distributed into various folders and files. Practically
speaking, those file formats require the use of special word processing
software.
From a writer's perspective, the use of \emph{What You See Is What You
Get (WYSIWYG)} programs such as Microsoft Word, WPS Office or
LibreOffice might be convenient, because the formatting of the document
is directly visible. But the complicated syntax specifications often
result in problems when using different software versions and for
collaborative writing. Simple conversions between file formats can be
difficult or impossible. In a worst-case scenario, `old' files cannot be
opened any more for lack of compatible software.
In some parts of the scientific community therefore LATEX, a typesetting
program in plain text format, is very popular. With LATEX, documents
with highest typographic quality can be produced. However, the source
files are cluttered with LATEX commands and the source text can be
complicated to read. Causes of compilation errors in LATEX are sometimes
difficult to find. Therefore, LATEX is not very user friendly,
especially for casual writers or beginners.
\textbf{Table 1}. Current standard formats for scientific publishing.
\begin{longtable}[c]{@{}lllll@{}}
\toprule
\begin{minipage}[b]{0.06\columnwidth}\raggedright\strut
\textbf{Type}
\strut\end{minipage} &
\begin{minipage}[b]{0.18\columnwidth}\raggedright\strut
\textbf{Description}
\strut\end{minipage} &
\begin{minipage}[b]{0.13\columnwidth}\raggedright\strut
\textbf{Use}
\strut\end{minipage} &
\begin{minipage}[b]{0.09\columnwidth}\raggedright\strut
\textbf{Syntax}
\strut\end{minipage} &
\begin{minipage}[b]{0.40\columnwidth}\raggedright\strut
\textbf{Reference}
\strut\end{minipage}\tabularnewline
\midrule
\endhead
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
DOCX
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
Office Open XML
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
WYSIWYG editing
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
XML, ZIP
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(Ngo, 2006)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
ODT
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
OpenDocument
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
WYSIWYG editing
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
XML, ZIP
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(Brauer et al., 2005)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
PDF
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
portable document
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
print replacement
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
PDF
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(International Organization for Standardization, 2013)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
EPUB
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
electronic publishing
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
e-books
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
HTML5, ZIP
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(Eikebrokk, Dahl \& Kessel, 2014)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
JATS
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
journal article tag suite
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
journal publishing
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
XML
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(National Information Standards Organization, 2012)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
LATEX
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
typesetting system
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
high-quality print
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
TEX
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(Lamport, 1994)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
HTML
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
hypertext markup
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
websites
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
(X)HTML
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(Raggett et al., 1999; Hickson et al., 2014)
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.06\columnwidth}\raggedright\strut
MD
\strut\end{minipage} &
\begin{minipage}[t]{0.18\columnwidth}\raggedright\strut
Markdown
\strut\end{minipage} &
\begin{minipage}[t]{0.13\columnwidth}\raggedright\strut
lightweight markup
\strut\end{minipage} &
\begin{minipage}[t]{0.09\columnwidth}\raggedright\strut
plain text MD
\strut\end{minipage} &
\begin{minipage}[t]{0.40\columnwidth}\raggedright\strut
(Ovadia, 2014; Leonard, 2016)
\strut\end{minipage}\tabularnewline
\bottomrule
\end{longtable}
\textbf{Table 2.} Examples for formatting elements and their
implementations in different markup languages.
\begin{longtable}[c]{@{}llll@{}}
\toprule
\begin{minipage}[b]{0.11\columnwidth}\raggedright\strut
\textbf{Element}
\strut\end{minipage} &
\begin{minipage}[b]{0.17\columnwidth}\raggedright\strut
\textbf{Markdown}
\strut\end{minipage} &
\begin{minipage}[b]{0.33\columnwidth}\raggedright\strut
\textbf{LATEX}
\strut\end{minipage} &
\begin{minipage}[b]{0.27\columnwidth}\raggedright\strut
\textbf{HTML}
\strut\end{minipage}\tabularnewline
\midrule
\endhead
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
\textbf{structure}
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
section
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\texttt{\#\ Intro}
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\texttt{\textbackslash{}section\{Intro\}}
\strut\end{minipage} &
\begin{minipage}[t]{0.27\columnwidth}\raggedright\strut
\texttt{\textless{}h1\textgreater{}\textless{}Intro\textgreater{}\textless{}/h1\textgreater{}}
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
subsection
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\texttt{\#\#\ History}
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\texttt{\textbackslash{}subsection\{History\}}
\strut\end{minipage} &
\begin{minipage}[t]{0.27\columnwidth}\raggedright\strut
\texttt{\textless{}h2\textgreater{}\textless{}History\textgreater{}\textless{}/h2\textgreater{}}
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
\textbf{text style}
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
bold
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\texttt{**text**}
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\texttt{\textbackslash{}textbf\{text\}}
\strut\end{minipage} &
\begin{minipage}[t]{0.27\columnwidth}\raggedright\strut
\texttt{\textless{}b\textgreater{}text\textless{}/b\textgreater{}}
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
italics
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\texttt{*text*}
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\texttt{\textbackslash{}textit\{text\}}
\strut\end{minipage} &
\begin{minipage}[t]{0.27\columnwidth}\raggedright\strut
\texttt{\textless{}i\textgreater{}text\textless{}/i\textgreater{}}
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
\textbf{links}
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\strut\end{minipage}\tabularnewline
\begin{minipage}[t]{0.11\columnwidth}\raggedright\strut
HTTP link
\strut\end{minipage} &
\begin{minipage}[t]{0.17\columnwidth}\raggedright\strut
\texttt{\textless{}https://\ arxiv.org\textgreater{}}
\strut\end{minipage} &
\begin{minipage}[t]{0.33\columnwidth}\raggedright\strut
\texttt{\textbackslash{}usepackage\{url\}\ \textbackslash{}url\{https://arxiv.org\}}
\strut\end{minipage} &
\begin{minipage}[t]{0.27\columnwidth}\raggedright\strut
\texttt{\textless{}a\ href="https://\ arxiv.org"\textgreater{}\textless{}/a\textgreater{}}
\strut\end{minipage}\tabularnewline
\bottomrule
\end{longtable}
In academic publishing, it is additionally desirable to create different
output formats from the same source text:
\begin{itemize}
\tightlist
\item
For the publishing of a book, with a print version in PDF and an
electronic version in EPUB.
\item
For the distribution of a seminar script, with an online version in
HTML and a print version in PDF.
\item
For submitting a journal manuscript for peer-review in DOCX, as well
as a preprint version with another journal style in PDF.
\item
For archiving and exchanging article data using the Journal Article
Tag Suite (JATS) (National Information Standards Organization, 2012),
a standardized format developed by the NLM.
\end{itemize}
Some of the tasks can be performed e.g.~with LATEX, but an integrated
solution remains a challenge. Several programs for the conversion
between documents formats exist, such as the e-book library program
calibre \url{http://calibre-ebook.com/}. But the results of such
conversions are often not satisfactory and require substantial manual
corrections.
Therefore, we were looking for a solution that enables the creation of
scientific manuscripts in a simple format, with the subsequent
generation of multiple output formats. The need for hybrid publishing
has been recognized outside of science (Kielhorn, 2011; DPT Collective,
2015), but the requirements specific to scientific publishing have not
been addressed so far. Therefore, we investigated the possibility to
generate multiple publication formats from a simple manuscript source
file.
\section{Concepts of markdown and
pandoc}\label{concepts-of-markdown-and-pandoc}
Markdown was originally developed by John Gruber in collaboration with
Aaron Swartz, with the goal to simplify the writing of HTML documents
\url{http://daringfireball.net/projects/markdown/}. Instead of coding a
file in HTML syntax, the content of a document is written in plain text
and annotated with simple tags which define the formatting.
Subsequently, the Markdown (MD) files are parsed to generate the final
HTML document. With this concept, the source file remains easily
readable and the author can focus on the contents rather than
formatting. Despite its original focus on the web, the MD format has
been proven to be well suited for academic writing (Ovadia, 2014). In
particular, pandoc-flavored MD (\url{http://pandoc.org/}) adds several
extensions which facilitate the authoring of academic documents and
their conversion into multiple output formats. \textbf{Tab. 2}
demonstrates the simplicity of MD compared to other markup languages.
\textbf{Fig. 3} illustrates the generation of various formatted
documents from a manuscript in pandoc MD. Some relevant functions for
scientific texts are explained below in more detail.
\begin{figure}[htbp]
\centering
\includegraphics{Fig3.png}
\caption{Workfow for the generation of multiple document formats with
pandoc. The markdown (MD) file contains the manuscript text with
formatting tags, and can also refer to external files such as images or
reference databases. The pandoc processor converts the MD file to the
desired output formats. Documents, citations etc. can be defined in
style files or templates.}
\end{figure}
\section{Markdown editors and online
editing}\label{markdown-editors-and-online-editing}
The usability of a text editor is important for the author, either
writing alone or with several co-authors. In this section we present
software and strategies for different scenarios. \textbf{Fig. 4}
summarizes various options for local or networked editing of MD files.
\begin{figure}[htbp]
\centering
\includegraphics{Fig4.png}
\caption{Markdown files can be edited on local devices or on cloud
drives. A local or remote git repository enables advanced advanced
version control.}
\end{figure}
\subsection{Markdown editors}\label{markdown-editors}
Due to MD's simple syntax, basically any text editor is suitable for
editing markdown files. The formatting tags are written in plain text
and are easy to remember. Therefore, the author is not distracted by
looking around for layout options with the mouse. For several popular
text editors, such as vim (\url{http://www.vim.org/}), GNU Emacs
(\url{https://www.gnu.org/software/emacs/}), atom
(\url{https://atom.io/}) or geany (\url{http://www.geany.org/}), plugins
provide additional functionality for markdown editing, e.g.~syntax
highlighting, command helpers, live preview or structure browsing.
Various dedicated markdown editors have been published as well. Many of
those are cross-platform compatible, such as Abricotine
(\url{http://abricotine.brrd.fr/}), ghostwriter
(\url{https://github.com/wereturtle/ghostwriter}) and CuteMarkEd
(\url{https://cloose.github.io/CuteMarkEd/}).
The lightweight format is also ideal for writing on mobile devices.
Numerous applications are available on the App stores for Android and
iOS systems. The programs Swype and Dragon
(\url{http://www.nuance.com/}) facilitate the input of text on such
devices by guessing words from gestures and speech recognition
(dictation).
\textbf{Fig. 5.} shows the editing of a markdown file, using the
cross-platform editor Atom with several markdown plugins.
\begin{figure}[htbp]
\centering
\includegraphics{Fig5.png}
\caption{Document directory tree, editing window and HTML preview using
the Atom editor.}
\end{figure}
\subsection{Online editing and collaborative
writing}\label{online-editing-and-collaborative-writing}
Storing manuscripts on network drives (\emph{The Cloud}) has become
popular for several reasons:
\begin{itemize}
\tightlist
\item
Protection against data loss.
\item
Synchronization of documents between several devices.
\item
Collaborative editing options.
\end{itemize}
Markdown files on a Google Drive (\url{https://drive.google.com}) for
instance can be edited online with StackEdit
(\url{https://stackedit.io}). \textbf{Fig. 6} demonstrates the online
editing of a markdown file on an ownCloud (\url{https://owncloud.com/})
installation. OwnCloud is an Open Source software platform, which allows
the set-up of a file server on personal webspace. The functionality of
an ownCloud installation can be enhanced by installing plugins.
\begin{figure}[htbp]
\centering
\includegraphics{Fig6.png}
\caption{Direct online editing of this manuscript with live preview
using the ownCloud Markdown Editor plugin by Robin Appelman.}
\end{figure}
Even mathematical formulas are rendered correctly in the HTML live
preview window of the ownCloud markdown plugin (\textbf{Fig. 6} ).
The collaboration and authoring platform Authorea
(\url{https://www.authorea.com/}) also supports markdown as one of
multiple possible input formats. This can be beneficial for
collaborations in which one or more authors are not familiar with
markdown syntax.
\subsection{Document versioning and change
control}\label{document-versioning-and-change-control}
Programmers, especially when working in distributed teams, rely on
version control systems to manage changes of code. Currently, Git
(\url{https://git-scm.com/}), which is also used e.g.~for the
development of the Linux kernel, is one of the most employed software
solutions for versioning. Git allows the parallel work of collaborators
and has an efficient merging and conflict resolution system. A Git
repository may be used by a single local author to keep track of
changes, or by a team with a remote repository, e.g.~on github
(\url{https://github.com/}) or bitbucket (\url{https://bitbucket.org/}).
Because of the plain text format of markdown, Git can be used for
version control and distributed writing. For the writing of the present
article, the co-authors (Germany and Mexico) used a remote Git
repository on bitbucket. The plain text syntax of markdown facilitates
the visualization of differences of document versions, as shown in
\textbf{Fig. 7}.
\begin{figure}[htbp]
\centering
\includegraphics{Fig7.png}
\caption{Version control and collaborative editing using a git
repository on bitbucket.}
\end{figure}
\section{Pandoc markdown for scientific
texts}\label{pandoc-markdown-for-scientific-texts}
In the following section, we demonstrate the potential for typesetting
scientific manuscripts with pandoc using examples for typical document
elements, such as tables, figures, formulas, code listings and
references. A brief introduction is given by Dominici (2014). The
complete Pandoc User's Manual is available at
\url{http://pandoc.org/MANUAL.html}.
\subsection{Tables}\label{tables}
There are several options to write tables in markdown. The most flexible
alternative - which was also used for this article - are pipe tables.
The contents of different cells are separated by pipe symbols
(\texttt{\textbar{}}):
\begin{verbatim}
Left | Center | Right | Default
:-----|:------:|------:|---------
LLL | CCC | RRR | DDD
\end{verbatim}
gives
\begin{longtable}[c]{@{}lcrl@{}}
\toprule
Left & Center & Right & Default\tabularnewline
\midrule
\endhead
LLL & CCC & RRR & DDD\tabularnewline
\bottomrule
\end{longtable}
The headings and the alignment of the cells are given in the first two
lines. The cell width is variable. The pandoc parameter
\texttt{-\/-columns=NUM} can be used to define the length of lines in
characters. If contents do not fit, they will be wrapped.
Complex tables, e.g.~tables featuring multiple headers or those
containing cells spanning multiple rows or columns, are currently not
representable in markdown format. However, it is possible to embed LATEX
and HTML tables into the document. These format-specific tables will
only be included in the output if a document of the respective format is
produced. This is method can be extended to apply any kind of
format-specific typographic functionality which would otherwise be
unavailable in markdown syntax.
\subsection{Figures and images}\label{figures-and-images}
Images are inserted as follows:
\begin{verbatim}
![alt text](image location/ name)
\end{verbatim}
e.g.
\begin{verbatim}
![Publishing costs](fig-hybrid-publishing-costs.png)
\end{verbatim}
The \emph{alt text} is used e.g.~in HTML output. Image dimensions can be
defined in braces:
\begin{verbatim}
![](fig-hybrid-publishing-costs.png)
\end{verbatim}
As well, an identifier for the figure can be defined with \texttt{\#},
resulting e.g.~in the image attributes
\texttt{\{\#figure1\ height=30\%\}}.
A paragraph containing only an image is interpreted as a figure. The
\emph{alt text} is then output as the figure's caption.
\subsection{Symbols}\label{symbols}
Scientific texts often require special characters, e.g.~Greek letters,
mathematical and physical symbols etc.
The UTF-8 standard, developed and maintained by \emph{Unicode
Consortium}, enables the use of characters across languages and computer
platforms. The encoding is defined as RFC document 3629 of the Network
Working group (Yergeau, 2003) and as ISO standard ISO/IEC 10646:2014
(International Organization for Standardization, 2014). Specifications
of Unicode and code charts are provided on the Unicode homepage
(\url{http://www.unicode.org/}).
In pandoc mardown documents, Unicode characters such as °, α , ä , Å can
be inserted directly and passed to the different output documents. The
correct processing of MD with UTF-8 encoding to LATEX/PDF output
requires the use of the \texttt{-\/-latex-engine=xelatex} option and the
use of an appropriate font. The Times-like XITS font
(\url{https://github.com/khaledhosny/xits-math}), suitable for high
quality typesetting of scientific texts, can be set in the LATEX
template:
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{\textbackslash{}usepackage\{unicode-math\}}
\NormalTok{\textbackslash{}setmainfont}
\NormalTok{[ Extension = .otf,}
\NormalTok{UprightFont = *-regular,}
\NormalTok{BoldFont = *-bold,}
\NormalTok{ItalicFont = *-italic,}
\NormalTok{BoldItalicFont = *-bolditalic,}
\NormalTok{]\{xits\}}
\NormalTok{\textbackslash{}setmathfont}
\NormalTok{[ Extension = .otf,}
\NormalTok{BoldFont = *bold,}
\NormalTok{]\{xits-math\}}
\end{Highlighting}
\end{Shaded}
To facilitate the input of specific characters, so-called mnemonics can
be enabled in some editors (e.g.~in atom by the \texttt{character-table}
package). For example, the 2-character Mnemonics `:u' gives `ü'
(diaeresis), or 'D*' the Greek Δ. The possible character mnemonics and
character sets are listed in RFC 1345
\url{http://www.faqs.org/rfcs/rfc1345.html} (Simonsen, 1992).
\subsection{Formulas}\label{formulas}
Formulas are written in LATEX mode using the delimiters \texttt{\$}.
E.g. the formula for calculating the standard deviation \(s\) of a
random sampling would be written as:
\begin{verbatim}
$s=\sqrt{\frac{1}{N-1}\sum_{i=1}^N(x_i-\overline{x})^{2}}$
\end{verbatim}
and gives:
\(s=\sqrt{\frac{1}{N-1}\sum_{i=1}^N(x_i-\overline{x})^{2}}\)
with \(x_i\) the individual observations, \(\overline{x}\) the sample
mean and \(N\) the total number of samples.
Pandoc parses formulas into internal structures and allows conversion
into formats other than LATEX. This allows for format-specific formula
representation and enables computational analysis of the formulas (Corbí
\& Burgos, 2015).
\subsection{Code listings}\label{code-listings}
Verbatim code blocks are indicated by three tilde symbols:
\begin{verbatim}
~~~
verbatim code
~~~
\end{verbatim}
Typesetting \texttt{inline\ code} is possible by enclosing text between
back ticks.
\begin{verbatim}
`inline code`
\end{verbatim}
\subsection{Other document elements}\label{other-document-elements}
These examples are only a short demonstration of the capacities of
pandoc concerning scientific documents. For more detailed information,
we refer to the official manual ( \url{http://pandoc.org/MANUAL.html}).
\section{Citations and biography}\label{citations-and-biography}
The efficient organization and typesetting of citations and
bibliographies is crucial for academic writing. Pandoc supports various
strategies for managing references. For processing the citations and the
creation of the bibliography, the command line parameter
\texttt{-\/-filter\ pandoc-citeproc} is used, with variables for the
reference database and the bibliography style. The bibliography will be
located automatically at the header \texttt{\#\ References} or
\texttt{\#\ Bibliography}.
\subsection{Reference databases}\label{reference-databases}
Pandoc is able to process all mainstream literature database formats,
such as RIS, BIB, etc. However, for maintaining compatibility with
LATEX/ BIBTEX, the use of BIB databases is recommended. The used
database either can be defined in the YAML metablock of the MD file (see