Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Word conversion via Pandoc #256

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
*.out
*.blg
paper.pdf
paper.docx
8 changes: 8 additions & 0 deletions scipy-1.0/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ covlett: $(TEX)
clean:
@rm -f *~
latexmk -CA

.PHONY: word
word:
pandoc -s paper.tex \
--filter pandoc-crossref \
--bibliography=references.bib \
--csl static/nature.csl \
-o paper.docx
4 changes: 2 additions & 2 deletions scipy-1.0/paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ \subsection*{SciPy Today}

\begin{figure}[H]
\centering
\includegraphics[width=0.95\textwidth]{static/scipy_timeline}
\includegraphics[width=0.95\textwidth]{static/scipy_timeline.pdf}
\caption{Major milestones from SciPy's initial release in 2001 to
the release of SciPy 1.0 in 2017. Note that SciKits and GitHub
have been introduced in the ``Background'' section; more
Expand Down Expand Up @@ -880,7 +880,7 @@ \subsubsection*{Benchmark suite}

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{static/asv}
\includegraphics[width=\textwidth]{static/asv.pdf}
\caption{Results of the \texttt{scipy.spatial.cKDTree.query} benchmark from the introduction of \texttt{cKDTree} to the release of SciPy~1.0. The benchmark generates a $k$-d tree from \num{10000} uniformly distributed points in an $m$-dimensional unit hypercube, then finds the nearest (Euclidean) neighbor in the tree for each of \num{1000}~query points. Each marker in the figure indicates the execution time of the benchmark for a commit in the master branch of SciPy. Substantial performance improvements were realized when \texttt{cKDTree} was fully Cythonized and again when it was rewritten in C++. The tree was generated without application of toroidal topology (\texttt{boxsize=None}), and tests were performed by Airspeed Velocity 0.4 using Python~2.7, NumPy~1.8.2, and Cython versions 0.27.3, 0.21.1, and 0.18 (for improved backward compatibility).}
\label{fig:asvbench}
\end{figure}
Expand Down
123 changes: 123 additions & 0 deletions scipy-1.0/static/nature.csl
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
<info>
<title>Nature</title>
<id>http://www.zotero.org/styles/nature</id>
<link href="http://www.zotero.org/styles/nature" rel="self"/>
<link href="http://www.nature.com/nature/authors/gta/index.html#a5.4" rel="documentation"/>
<link href="http://www.nature.com/srep/publish/guidelines#references" rel="documentation"/>
<author>
<name>Michael Berkowitz</name>
<email>[email protected]</email>
</author>
<category citation-format="numeric"/>
<category field="science"/>
<category field="generic-base"/>
<issn>0028-0836</issn>
<eissn>1476-4687</eissn>
<updated>2018-10-24T14:53:43+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<macro name="title">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<text variable="title" font-style="italic"/>
</if>
<else>
<text variable="title"/>
</else>
</choose>
</macro>
<macro name="author">
<names variable="author">
<name sort-separator=", " delimiter=", " and="symbol" initialize-with=". " delimiter-precedes-last="never" name-as-sort-order="all"/>
<label form="short" prefix=", "/>
<et-al font-style="italic"/>
</names>
</macro>
<macro name="access">
<choose>
<if variable="volume"/>
<else-if variable="DOI">
<text variable="DOI" prefix="doi:"/>
</else-if>
<else-if type="webpage" variable="URL" match="all">
<text term="available at" text-case="capitalize-first" suffix=": "/>
<text variable="URL" suffix=". "/>
<group prefix="(" suffix=")" delimiter=": ">
<text term="accessed" text-case="capitalize-first"/>
<date variable="accessed">
<date-part name="day" suffix=" " form="ordinal"/>
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>
</group>
</else-if>
</choose>
</macro>
<macro name="issuance">
<choose>
<if type="bill book graphic legal_case legislation motion_picture report song thesis chapter paper-conference" match="any">
<group delimiter=", " prefix="(" suffix=").">
<text variable="publisher" form="long"/>
<date variable="issued">
<date-part name="year"/>
</date>
</group>
</if>
<else>
<date prefix="(" suffix=")." variable="issued">
<date-part name="year"/>
</date>
</else>
</choose>
</macro>
<macro name="container-title">
<choose>
<if type="article-journal">
<text variable="container-title" font-style="italic" form="short"/>
</if>
<else>
<text variable="container-title" font-style="italic"/>
</else>
</choose>
</macro>
<macro name="editor">
<choose>
<if type="chapter paper-conference" match="any">
<names variable="editor" prefix="(" suffix=")">
<label form="short" suffix=" "/>
<name and="symbol" delimiter-precedes-last="never" initialize-with=". " name-as-sort-order="all"/>
</names>
</if>
</choose>
</macro>
<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout vertical-align="sup" delimiter=",">
<text variable="citation-number"/>
</layout>
</citation>
<bibliography et-al-min="6" et-al-use-first="1" second-field-align="flush" entry-spacing="0" line-spacing="2">
<layout>
<text variable="citation-number" suffix="."/>
<group delimiter=" ">
<text macro="author" suffix="."/>
<text macro="title" suffix="."/>
<choose>
<if type="chapter paper-conference" match="any">
<text term="in"/>
</if>
</choose>
<text macro="container-title"/>
<text macro="editor"/>
<text variable="volume" font-weight="bold" suffix=","/>
<text variable="page"/>
<text macro="issuance"/>
<text macro="access"/>
</group>
</layout>
</bibliography>
</style>