Code Monkey home page Code Monkey logo

nature-tex's Introduction

nature-tex

LaTeX template and build code for a Nature style research article submission

Features

  • Keeps your tex organized into separate main.tex and sup.tex files
  • Preamble kept separate in naturetex.sty for cleaner tex code
  • Allows you to use a separate bibliography file with cite commands as usual
  • Generates the final single .tex file for you, as expected by Nature journals
  • Works in shared editors like Overleaf
    • You can continue to edit and compile your tex files in Overleaf. How: clone the backing repo for a blank Overleaf project, and push the files of this repo into it. Then you can edit your files in Overleaf normally in the cloud, but run this tool locally to get submission-ready files.

Prerequisites

  • Python
  • A LaTeX distribution (You'll need pdflatex, biber, and bibtex in your path)

Usage

  1. Clone this repository
  2. $ cd nature-tex
  3. $ make
  4. (Optional) You can use $ make clean to remove the generated temporary files.

This should have generated two folders, submit and proof. Inspect those to make sure everything is working.

proof/      # CONVENIENCE FILES, DO NOT SUBMIT TO NATURE
  main.pdf  # The the main manuscript as a pdf, with the figures included, for easy reading
  
submit/     # FILES READY FOR SUBMISSION TO NATURE
  main.tex  # The main manuscript tex, all as a single file, no figures
  sup.pdf   # The supplement as a pdf

Now, edit tex/main.tex, tex/sup.tex, and tex/bibliography.bib to your heart's desire, and replace the dummy tex with real science!

TeX rules

To allow proper cross referencing between the main manuscript and supplement, you must use the labels specified in cross_refs.json

You may edit cross_refs.json to add/remove any keys you might want (e.g. Notes, Box, etc)

Each (key,value) pair in cros_refs.json specifies a label type which will be kept track of and a full string which will be printed. If you use any of those labels in either the main manuscript or supplement, the python code will correctly keep track of it and replace it with a correctly numbered string.

For example:

% main.tex
\label{fig:my_cool_fig}
Hey, check out this result in \ref{fig:my_cool_fig} and \ref{sup.fig:my_extra_fig}!
% sup.tex
\label{sup.fig:my_extra_fig}
This extra fig is kinda like \ref{fig:my_cool_fig}.

Will be processed into:

% main.tex
\label{fig:my_cool_fig}
Hey, check out this result in Figure 1 and Supplementary Figure 1!
% sup.tex
\label{sup.fig:my_extra_fig}
This extra fig is kinda like Figure 1.

nature-tex's People

Contributors

amiralavi avatar

Stargazers

 avatar  avatar Sun YI avatar  avatar  avatar 王海东 avatar Christian König avatar jinyuxin avatar fightinggggg avatar Denis Vida avatar  avatar Liang (Adam)  Ding,  Ph.D. avatar João Faria avatar  avatar Zhonghua Zheng avatar Christian L. Ebbesen avatar Gran Young avatar Ben Lengerich avatar Weijia Sun avatar chongg039 avatar Cong Ma avatar

Watchers

James Cloos avatar  avatar Weijia Sun avatar

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.