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

Paper: test .tex paper #892

Closed
wants to merge 2 commits into from
Closed
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
Binary file added papers/test_meghann/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added papers/test_meghann/figure1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added papers/test_meghann/figure2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
261 changes: 261 additions & 0 deletions papers/test_meghann/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
\begin{abstract}
A short version of the long version that is way too long to be written as a short version anyway.
Still, when considering the facts from first principles, we find that the outcomes of this introspective approach
is compatible with the guidelines previously established.

In such an experiment it is then clear that the potential for further development not only depends on previous
relationships found but also on connections made during exploitation of this novel new experimental protocol.

Finally, it is shown that $50 \pm 50$ out of $100$ anvils meet their target when dropped from a cliff.
\end{abstract}

\section{Introduction}\label{introduction}

Twelve hundred years ago—in a galaxy just across the hill, in a desert full of sand, under a cliff relatively close to
a $1 M_{\odot}$ star\ldots

First, do not include a title, author block, or \verb|\begin{document}|, etc.
in your paper. Enter your document details including authors, affiliations and keywords in your \texttt{myst.yml} file.

\textbf{Note}: MyST Markdown (\href{https://mystmd.org}{mystmd.org}) does not use
LaTeX for \emph{reading} or \emph{rendering}, \textbf{only use this format as a convenience} if you are
already familiar with LaTeX and prefer to use it as an authoring environment.
MyST translates the LaTeX to an internal representation, and then renders in HTML and other formats.
As such, not all LaTeX will work out of the box if you come across an issue that needs attention,
please ask the editorial team who can suggest a workaround or work on a fix.
\textbf{LaTeX macros and custom packages are not supported.}

To render this document, download \href{https://mystmd.org/guide/quickstart}{mystmd} and run \texttt{myst start}.
Changes to this document will trigger a realtime rerender and show your HTML article.
SciPy does not use LaTeX to rendered the article.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sapien
tortor, bibendum et pretium molestie, dapibus ac ante. Nam odio orci, interdum
sit amet placerat non, molestie sed dui. Pellentesque eu quam ac mauris
tristique sodales. Fusce sodales laoreet nulla, id pellentesque risus convallis
eget. Nam id ante gravida justo eleifend semper vel ut nisi. Phasellus
adipiscing risus quis dui facilisis fermentum. Duis quis sodales neque. Aliquam
ut tellus dolor. Etiam ac elit nec risus lobortis tempus id nec erat. Morbi eu
purus enim. Integer et velit vitae arcu interdum aliquet at eget purus. Integer
quis nisi neque. Morbi ac odio et leo dignissim sodales. Pellentesque nec nibh
nulla. Donec faucibus purus leo. Nullam vel lorem eget enim blandit ultrices.
Ut urna lacus, scelerisque nec pellentesque quis, laoreet eu magna. Quisque ac
justo vitae odio tincidunt tempus at vitae tortor.

\section{Bibliographies, citations and block quotes}\label{bibliographies-citations-and-block-quotes}

We encourage you to include a \texttt{.bib} file, which will be automatically included by MyST.

\textbf{Please do not include any special characters that need to be escaped or any spaces in the bib-file's name or keys}. Doing so makes BibTeX cranky.

To reference citations contained in that bibliography use the \verb|\cite| command, as in \citep{hume48} (which literally is \verb|\cite{hume48}| in accordance with the \texttt{hume48} cite-key in the associated \texttt{mybib.bib} file).

If you wish to have a block quote, use the \verb|\begin{quote}| command, as in:

\begin{quote}
When it is asked, What is the nature of all our reasonings concerning matter of fact? the proper answer seems to be, that they are founded on the relation of cause and effect. When again it is asked, What is the foundation of all our reasonings and conclusions concerning that relation? it may be replied in one word, experience. But if we still carry on our sifting humor, and ask, What is the foundation of all conclusions from experience? this implies a new question, which may be of more difficult solution and explication. \cite{hume48}
\end{quote}

\subsection{DOIs in bibliographies}\label{dois-in-bibliographies}

In order to include a DOI in your bibliography, add the DOI to your bibliography
entry as a string. For example:

\begin{lstlisting}[language=bibtex]
@book{hume48,
author = {David Hume},
year = 1748,
title = {An enquiry concerning human understanding},
address = {Indianapolis, IN},
publisher = {Hackett},
doi = {10.1017/CBO9780511808432}
}
\end{lstlisting}


\section{Citing software and websites}\label{citing-software-and-websites}

Any paper relying on open-source software would surely want to include citations.
Often you can find a citation in BibTeX format via a web search.
Authors of software packages may even publish guidelines on how to cite their work.


For convenience, citations to common packages such as
Jupyter \citep{jupyter},
Matplotlib \citep{matplotlib},
NumPy \citep{numpy},
pandas \citep{pandas1,pandas2},
scikit-learn \citep{sklearn1,sklearn2}, and
SciPy \citep{scipy}
are included in this paper's \texttt{.bib} file.

In this paper we not only terraform a desert using the package terradesert \citep{terradesert}, we also catch a sandworm with it.
To cite a website, the following BibTeX format plus any additional tags necessary for specifying the referenced content is recommended.
If you are citing a team, ensure that the author name is wrapped in additional braces \texttt{\{Team Name\}}, so it is not treated as an author's first and last names.

\begin{lstlisting}[language=bibtex]
@misc{terradesert,
author = {{TerraDesert Team}},
title = {Code for terraforming a desert},
year = {2000},
url = {https://terradesert.com/code/},
note = {Accessed 1 Jan. 2000}
}
\end{lstlisting}


\section{Source code examples}\label{source-code-examples}

Of course, no paper would be complete without some source code.
Without specifying a language the highlighting looks like this:

\begin{verbatim}
def sum(a, b):
"""Sum two numbers."""

return a + b
\end{verbatim}

The \texttt{mystmd} parser recognizes \texttt{lstlisting} code-highlighting syntax:

\begin{lstlisting}[language=Python]
def sum(a, b):
"""Sum two numbers."""

return a + b
\end{lstlisting}
You can also refer to a code block with a caption \autoref{lst:sum}.
\begin{lstlisting}[label=lst:sum,language=Python,caption=Example Python Code]
def sum(a, b):
"""Sum two numbers."""

return a + b
\end{lstlisting}
Maybe also in another language, and with line numbers:
\begin{lstlisting}[language=c,numbers=left]
int main() {
for (int i = 0; i < 10; i++) {
/* do something */
}
return 0;
}
\end{lstlisting}

Or a snippet from the above code, starting at the correct line number:

\begin{lstlisting}[language=c,numbers=left,firstnumber=2]
for (int i = 0; i < 10; i++) {
/* do something */
}
\end{lstlisting}

The code will be properly formatted and presented with a copy-code button in the HTML view of your paper.

\section{Important Part}\label{important-part}

It is well known that Spice grows on the planet Dune \citep{Atr03}.
Test some maths, for example $e^{\pi i} + 3 \delta$.
Or maybe an equation on a separate line:

\begin{equation*}
g(x) = \int_0^\infty f(x) dx
\end{equation*}
or using aligned lines for a single equation:
\begin{equation}
\begin{aligned}
g(x) &= \int_0^\infty f(x) dx \\
&= \ldots
\end{aligned}
\end{equation}

The area of a circle and volume of a sphere are given as
\begin{equation}
\label{circarea}
A(r) = \pi r^2.
\end{equation}
\begin{equation}
\label{spherevol}
V(r) = \frac{4}{3} \pi r^3
\end{equation}
we can then refer back to Equation (\ref{circarea}) or
(\ref{spherevol}) later.

Mauris purus enim, volutpat non dapibus et, gravida sit amet sapien. In at
consectetur lacus. Praesent orci nulla, blandit eu egestas nec, facilisis vel
lacus. Fusce non ante vitae justo faucibus facilisis. Nam venenatis lacinia
turpis. Donec eu ultrices mauris. Ut pulvinar viverra rhoncus. Vivamus
adipiscing faucibus ligula, in porta orci vehicula in. Suspendisse quis augue
arcu, sit amet accumsan diam. Vestibulum lacinia luctus dui. Aliquam odio arcu,
faucibus non laoreet ac, condimentum eu quam. Quisque et nunc non diam
consequat iaculis ut quis leo. Integer suscipit accumsan ligula. Sed nec eros a
orci aliquam dictum sed ac felis. Suspendisse sit amet dui ut ligula iaculis
sollicitudin vel id velit. Pellentesque hendrerit sapien ac ante facilisis
lacinia. Nunc sit amet sem sem. In tellus metus, elementum vitae tincidunt ac,
volutpat sit amet mauris. Maecenas\footnote{On the one hand, a footnote.} diam
turpis, placerat\footnote{On the other hand, another footnote.} at adipiscing
ac, pulvinar id metus.

\begin{figure}[]
\includegraphics[width=0.7\textwidth]{figure1.png}
\caption{This is the caption, sandworm vorticity based on storm location in a pleasing stream plot. Based on example in \href{https://matplotlib.org/stable/plot_types/arrays/streamplot.html}{matplotlib}. \label{egfig}}
\end{figure}


\begin{figure}[]
\includegraphics[width=0.7\textwidth]{figure2.png}
\caption{This is the caption, electromagnetic signature of the sandworm based on remote sensing techniques. Based on example in \href{https://matplotlib.org/stable/plot_types/stats/hist2d.html}{matplotlib}. \label{egfig2}}
\end{figure}

As you can see in \autoref{egfig}, the vorticity is high in the margins. Additionally in Figures \ref{egfig} and \ref{egfig2} ... this is how you reference auto-numbered figures.
Use \texttt{autoref} when referring to a single figure, and \texttt{ref} if you need individual access to the number.

\begin{table}
\centering
\caption{This is the caption for the materials table.\label{mtable}}
\begin{tabular}{cc}
\toprule
\textbf{Material} & \textbf{Units} \\
\midrule
Stone & 3 \\
Water & 12 \\
Cement & $\alpha$ \\
\bottomrule
\end{tabular}
\end{table}

We show the different quantities of materials required in \autoref{mtable}.

% The statement below shows how to adjust the width of a table.

\begin{longtable}[c]{p{0.110\textwidth}p{0.02\textwidth}p{0.02\textwidth}p{0.086\textwidth}p{0.086\textwidth}p{0.086\textwidth}p{0.110\textwidth}}
\caption{This is the caption for the wide table with custom widths.\label{wide-table}} \\
\toprule
This & is & a & very & very & wide & table \\
\bottomrule
\end{longtable}

And since you are working in raw LaTeX already, you can easily make complex
table formats. Above we used \verb|\DUtablewidth| to control the width of individual parts of a table, but you can also let tex worry about that part for you:

\begin{longtable}{|l|rrr|}
\caption{Area Comparisons \label{quanitities-table}}\\
\hline
\multirow{2}{*}{\bf Projection} & \multicolumn{3}{c|}{\bf Area in square miles} \\
\cline{2-4}
& \textbf{Large Horizontal Area} & \textbf{Large Vertical Area} & \textbf{Smaller Square Area} \\
\hline
\endfirsthead
Albers Equal Area & 7,498.7 & 10,847.3 & 35.8 \\
Web Mercator & 13,410.0 & 18,271.4 & 63.0 \\
Difference & 5,911.3 & 7,424.1 & 27.2 \\
Percent Difference & 44\% & 41\% & 43\% \\
\hline
\end{longtable}

Perhaps we want to end off with a quote by Lao Tse\footnote{$\mathrm{e^{-i\pi}}$}:

\begin{quote}
Muddy water, let stand, becomes clear.
\end{quote}


129 changes: 129 additions & 0 deletions papers/test_meghann/mybib.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Feel free to delete these first few references, which are specific to the template:

@book{hume48,
author = "David Hume",
year = "1748",
title = "An enquiry concerning human understanding",
address = "Indianapolis, IN",
publisher = "Hackett",
doi = {https://doi.org/10.1017/CBO9780511808432},
}

@article{Atr03,
author = "P Atreides",
year = "2003",
title = "How to catch a sandworm",
journal = "Transactions on Terraforming",
volume = 21,
issue = 3,
pages = {261-300}
}

@misc{terradesert,
author = {{TerraDesert Team}},
title = {Code for terraforming a desert},
year = {2000},
url = {https://terradesert.com/code/},
note = {Accessed 1 Jan. 2000}
}

# These references may be helpful:

@inproceedings{jupyter,
abstract = {It is increasingly necessary for researchers in all fields to write computer code, and in order to reproduce research results, it is important that this code is published. We present Jupyter notebooks, a document format for publishing code, results and explanations in a form that is both readable and executable. We discuss various tools and use cases for notebook documents.},
author = {Kluyver, Thomas and Ragan-Kelley, Benjamin and Pérez, Fernando and Granger, Brian and Bussonnier, Matthias and Frederic, Jonathan and Kelley, Kyle and Hamrick, Jessica and Grout, Jason and Corlay, Sylvain and Ivanov, Paul and Avila, Damián and Abdalla, Safia and Willing, Carol and {Jupyter development team}},
editor = {Loizides, Fernando and Scmidt, Birgit},
location = {Netherlands},
publisher = {IOS Press},
url = {https://eprints.soton.ac.uk/403913/},
booktitle = {Positioning and Power in Academic Publishing: Players, Agents and Agendas},
year = {2016},
pages = {87--90},
title = {Jupyter Notebooks - a publishing format for reproducible computational workflows},
}

@article{matplotlib,
abstract = {Matplotlib is a 2D graphics package used for Python for application development, interactive scripting, and publication-quality image generation across user interfaces and operating systems.},
author = {Hunter, J. D.},
publisher = {IEEE COMPUTER SOC},
year = {2007},
doi = {https://doi.org/10.1109/MCSE.2007.55},
journal = {Computing in Science \& Engineering},
number = {3},
pages = {90--95},
title = {Matplotlib: A 2D graphics environment},
volume = {9},
}

@article{numpy,
author = {Harris, Charles R. and Millman, K. Jarrod and van der Walt, Stéfan J. and Gommers, Ralf and Virtanen, Pauli and Cournapeau, David and Wieser, Eric and Taylor, Julian and Berg, Sebastian and Smith, Nathaniel J. and Kern, Robert and Picus, Matti and Hoyer, Stephan and van Kerkwijk, Marten H. and Brett, Matthew and Haldane, Allan and del Río, Jaime Fernández and Wiebe, Mark and Peterson, Pearu and Gérard-Marchant, Pierre and Sheppard, Kevin and Reddy, Tyler and Weckesser, Warren and Abbasi, Hameer and Gohlke, Christoph and Oliphant, Travis E.},
publisher = {Springer Science and Business Media {LLC}},
doi = {https://doi.org/10.1038/s41586-020-2649-2},
date = {2020-09},
year = {2020},
journal = {Nature},
number = {7825},
pages = {357--362},
title = {Array programming with {NumPy}},
volume = {585},
}

@misc{pandas1,
author = {{The Pandas Development Team}},
title = {pandas-dev/pandas: Pandas},
month = feb,
year = {2020},
publisher = {Zenodo},
version = {latest},
url = {https://doi.org/10.5281/zenodo.3509134},
}

@inproceedings{pandas2,
author = {Wes McKinney},
title = {{D}ata {S}tructures for {S}tatistical {C}omputing in {P}ython},
booktitle = {{P}roceedings of the 9th {P}ython in {S}cience {C}onference},
pages = {56 - 61},
year = {2010},
editor = {{S}t\'efan van der {W}alt and {J}arrod {M}illman},
doi = {https://doi.org/10.25080/Majora-92bf1922-00a},
}

@article{scipy,
author = {Virtanen, Pauli and Gommers, Ralf and Oliphant, Travis E. and
Haberland, Matt and Reddy, Tyler and Cournapeau, David and
Burovski, Evgeni and Peterson, Pearu and Weckesser, Warren and
Bright, Jonathan and {van der Walt}, St{\'e}fan J. and
Brett, Matthew and Wilson, Joshua and Millman, K. Jarrod and
Mayorov, Nikolay and Nelson, Andrew R. J. and Jones, Eric and
Kern, Robert and Larson, Eric and Carey, C J and
Polat, {\.I}lhan and Feng, Yu and Moore, Eric W. and
{VanderPlas}, Jake and Laxalde, Denis and Perktold, Josef and
Cimrman, Robert and Henriksen, Ian and Quintero, E. A. and
Harris, Charles R. and Archibald, Anne M. and
Ribeiro, Ant{\^o}nio H. and Pedregosa, Fabian and
{van Mulbregt}, Paul and {SciPy 1.0 Contributors}},
title = {{{SciPy} 1.0: Fundamental Algorithms for Scientific
Computing in Python}},
journal = {Nature Methods},
year = {2020},
volume = {17},
pages = {261--272},
doi = {https://doi.org/10.1038/s41592-019-0686-2},
}

@article{sklearn1,
author = {Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V. and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P. and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.},
year = {2011},
journal = {Journal of Machine Learning Research},
pages = {2825--2830},
title = {Scikit-learn: Machine Learning in {P}ython},
volume = {12},
}

@inproceedings{sklearn2,
author = {Buitinck, Lars and Louppe, Gilles and Blondel, Mathieu and Pedregosa, Fabian and Mueller, Andreas and Grisel, Olivier and Niculae, Vlad and Prettenhofer, Peter and Gramfort, Alexandre and Grobler, Jaques and Layton, Robert and VanderPlas, Jake and Joly, Arnaud and Holt, Brian and Varoquaux, Gaël},
booktitle = {ECML PKDD Workshop: Languages for Data Mining and Machine Learning},
year = {2013},
pages = {108--122},
title = {{API} design for machine learning software: experiences from the scikit-learn project},
}
Loading