Code Monkey home page Code Monkey logo

lapreprint's Introduction

LaPreprint

License Stars Twitter

A template for easily creating pretty, nicely formatted preprints in LaTeX.
Want to use the template again? Here's a link to the original repo.

Features

With simple options you can enable/disable:

  • bioRxiv, medRxiv, arXiv and chemRxiv logos.
  • blue or red colour schemes
  • Figures at the end
  • Line numbers
  • Change line spacing
  • Add section numbers

See more in the wiki.

Quick start

  1. Click Use this template
  2. Open the document in your preferred environment (e.g. Overleaf or VSCode)
  3. In main.tex, edit Article setup to have the correct information
  4. Start writing! The sections are found in the main folder

If you want different sections you can easily rename them - just make sure also to edit the names in main.tex.

Acknowledgements

LaPreprint is inspired by the style of eLife and PLoS, and is based on the eLife template. Additionally, the fancy footer is modified from the the Henriques Lab template. Without all their work, this template wouldn't exist!

lapreprint's People

Contributors

da5nsy avatar roaldarbol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lapreprint's Issues

More appropriate .bib file

Ship this repo with a .bib file that celebrates good preprints! Maybe some of them are useful in documenting the template too.

Improve documentation

Write some documentation into the document text itself, in the README and maybe at the top of main.tex. Also add a LICENSE.

LaTeX Error: File `orcidlink.sty' not found.

Hey, thanks for the template!

! LaTeX Error: File `orcidlink.sty' not found.

I think I can download the style file and put it in the folder - but maybe it makes sense to put it in the repository as well.

# this works for me to compile the pdf
wget https://raw.githubusercontent.com/duetosymmetry/orcidlink-LaTeX-command/master/orcidlink.sty .
pdflatex main.tex

Margin text jump to next page

Currently, when the text in the margin is too long, it just continues down acress the footer and out of the page. Make an adjustment so it automatically continues on the next page after a certain point.

Section numbers

Hi, thank you so much for sharing such a beautiful preprint template! Currently, the sections do not come with numbering, and I wonder if it is possible to turn them on. This is quite important in many cases such as when we want to cross-reference different sections.

Make dummy content

Instead of what's there now, the text in the template should show off features alongside some dummy text.

Add other preprint servers

Just like the bioRxiv settings, but for medRxiv, arXiv, chemRxiv - and then maybe others upon request.

Fullpage supplement?

\begin{fullwidth}

\includegraphics[width=0.65\textheight]{src/figures/brighton.jpeg}
\captionof{figure}{\textbf{Photo of lovely Brighton by \href{https://unsplash.com/es/@sanekovs?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText"}{Alex Ovs} on \href{https://unsplash.com/s/photos/brighton?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText}{Unsplash}.
} As a very wide figure that takes up the entire page, including the gutter space.}

\end{fullwidth}

in appendices.tex, produces this:
Screenshot_20230712_050749

... which has some issues.

Is fullwidth fundamentally incompatible with the appendix environment?
And/or - am I doing something wrong?

Suggestion: put a link to the repo in the readme

... so that when people clone it, use it, share it, people know where to come back to for a clean copy ๐Ÿ˜„

Might be worth adding a version number in the same place, if you think that's a good idea?
Or perhaps combine the two and just have a permalink?

Subfigures in appendix

I use the subfigure command in the main text, but I haven't been able to make it work in the appendix.

MWE: https://www.overleaf.com/3229474442wzpbfnjpvtwb
See lines 63-82 of introduction.tex for successful use (quoted below for future use), and lines 31-48 of supplementary/appendices.tex for unsuccessful attempt at using the same thing in the appendix.

  • Am I doing something wrong? / Is there an easy workaround?
  • If this is not possible given the current way that appendices are handled, are there alternative ways that I could handle appendices?

\begin{figure}
    \centering
        \begin{subfigure}[b]{0.3\textwidth}
            \centering
            \includegraphics[width=\linewidth]{src/figures/brighton.jpeg}
        \end{subfigure}
        \hfill
        \centering
            \begin{subfigure}[b]{0.3\textwidth}
            \centering
            \includegraphics[width=\linewidth]{src/figures/brighton.jpeg}
        \end{subfigure}
        \hfill
        \centering
            \begin{subfigure}[b]{0.3\textwidth}
            \centering
            \includegraphics[width=\linewidth]{src/figures/brighton.jpeg}
        \end{subfigure}
    \caption{\textbf{Lorem.} Ipsum!}
\end{figure}

Generic meta-data command

Currently, there's individual commands for correspondence, contribution, presentaddress, etc. Would be leaps better to have a generic command that takes the metadata name as a parameter. Thanks to @Ejdrup for feedback.

doi is colored depending on format

It appears as if the doi field of a bib entry has a period after the forward slash, it is colored as a url. If not, it isn't colored. I tried to see how this was determined, but I couldn't work it out.

Screenshot from 2022-11-03 20-00-55

Shortening links

Would be nice not to have to specify src all the time in \input, \includegraphics, etc. Have a look at the import package - maybe it helps.

Unclosed group

Overleaf is getting very upset about something in here.
Flagging here because I do not have the skill/time to work out the issue right now.

image

Curiously, it's not causing compilation to fail, or any visible errors so far as I can tell.

using this template in tex-studio

Hi,

I am using tex-studio for writing documents, how can install this template and use it from tex-studio in linux and windows?

thanks in advance,
Andrea

Clean up preprint.cls

The class file was adopted from elsewhere, but it would be really great to clean it up and annotate it, to make it easier to work with - for myself and hopefully others too!

Using biblatex instead of bibtex

I modified the class file for using biblatex/biber instead of the old bibtex and using AnonymousPro as mono font (nicer than LM mono). The vancouver bib style is already part of TeXLive/MiKTeX :

the main doc file:

bash-3.2$ diff -u main.tex ~/Links/texmf-local-latex/LaPreprint/main.tex 
--- main.tex	2022-10-30 08:39:25.000000000 +0100
+++ /Users/voss/Links/texmf-local-latex/LaPreprint/main.tex	2022-10-30 08:35:49.000000000 +0100
@@ -88,7 +88,8 @@
 \input{src/main/results}
 \input{src/main/discussion}
 \input{src/main/formal}
-\bibliography{src/bibliography}
+
+\printbibliography
 
 % DON'T EDIT. If "endfloat" option is enabled all floats appear before appendices
 \if@endfloat\clearpage\processdelayedfloats\clearpage\fi 

Changing \citep into \parencite:

bash-3.2$ diff -u src/main/introduction.tex ~/Links/texmf-local-latex/LaPreprint/src/main/introduction.tex 
--- src/main/introduction.tex	2022-10-30 08:39:25.000000000 +0100
+++ /Users/voss/Links/texmf-local-latex/LaPreprint/src/main/introduction.tex	2022-10-30 08:37:18.000000000 +0100
@@ -1,5 +1,5 @@
 \section{Introduction} \label{intro}
-Let's begin with some great papers for those interested in radically improving the scientific infrastructure \citep{Pooley2021, Bezuidenhout2021,Brembs2021}.
+Let's begin with some great papers for those interested in radically improving the scientific infrastructure \parencite{Pooley2021, Bezuidenhout2021,Brembs2021}.
 \lipsum[1-2]
 \lipsum[3-4]
 \sidenote{This is a sidenote made with the \textbackslash sidenote package. \lipsum[1]}
\ No newline at end of file

Changes of the class file:

bash-3.2$ diff -u lapreprint.cls ~/Links/texmf-local-latex/LaPreprint/lapreprint.cls 
--- lapreprint.cls	2022-10-30 08:39:25.000000000 +0100
+++ /Users/voss/Links/texmf-local-latex/LaPreprint/lapreprint.cls	2022-10-30 08:34:53.000000000 +0100
@@ -8,7 +8,7 @@
 \RequirePackage{calc}
 \RequirePackage{etoolbox}
 \RequirePackage{regexpatch}
-\RequirePackage{ifxetex,ifluatex}
+\RequirePackage{iftex}
 \RequirePackage{marginfix}  % Solves the issue of long notes running over the bottom of the page
 
 \newif\ifxetexorluatex
@@ -84,7 +84,7 @@
   \RequirePackage{unicode-math}
   % v1.7: xits-math font name changed to XITSMath in TL2019
   \RequirePackage[default]{opensans}
-  \setmonofont[Scale=MatchUppercase]{Latin Modern Mono}
+  \setmonofont[Scale=MatchUppercase,FakeStretch=0.9]{AnonymousPro}
   % XITSMath is really STIX. Really.
   % https://tex.stackexchange.com/questions/227216/stix-versus-xits
   \setmathfont[Extension = .otf,BoldFont = XITSMath-Bold,]{XITSMath-Regular}
@@ -162,42 +162,10 @@
 % \captionsetup*[table]{skip=\medskipamount}
 
 
-\RequirePackage{natbib}
+\RequirePackage[style=vancouver]{biblatex}
+\addbibresource{src/bibliography.bib}
+
 \renewcommand{\bibfont}{\small}
-% modifed from https://github.com/gbhutani/vancouver_authoryear_bibstyle/
-\IfFileExists{vancouver-elife.bst}
-  {\bibliographystyle{vancouver-elife}}
-  {\PackageWarning{elife}{vancouver-elife.bst not found; falling back to apalike bibliography style.}\bibliographystyle{apalike}}
-
-  % Make author in citation italic
-\renewcommand{\NAT@nmfmt}[1]{{\bfseries\itshape\color{eLifeMediumGrey} #1}}
-
-% ...as well as the year
-\xpatchcmd{\NAT@citex}
-{\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}}
-{\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@nmfmt{\NAT@date}}}
-{}{\PackageWarning{eLife}{Failed to patch year format in citation}}
-
-\xpatchcmd{\NAT@citex}
-{\else\unskip\NAT@spacechar\NAT@hyper@{\NAT@date}}
-{\else\unskip\NAT@spacechar\NAT@hyper@{\NAT@nmfmt{\NAT@date}}}
-{}{\PackageWarning{eLife}{Failed to patch year format in citation}}
-
-\xpatchcmd{\NAT@citex}
-{\hyper@natlinkbreak{\NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb}\NAT@date}
-{\hyper@natlinkbreak{\NAT@nmfmt{\NAT@aysep\NAT@spacechar}}{\@citeb\@extra@b@citeb}\NAT@nmfmt{\NAT@date}}
-{}{\PackageWarning{eLife}{Failed to patch year format in citation}}
-
-\xpatchcmd{\NAT@citex}
-{\@citea\NAT@hyper@{\NAT@date}}
-{\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@date}}}
-{}{\PackageWarning{eLife}{Failed to patch year format in citation}}
-
-\xpatchcmd{\NAT@citex}
-{{\@citeb\@extra@b@citeb}\NAT@date}
-{{\@citeb\@extra@b@citeb}\NAT@nmfmt{\NAT@date}}
-{}{\PackageWarning{eLife}{Failed to patch year format in citation}}
-%% There, we're finally done with patching the year in citations.
 
 
 % headers and footers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.