Giter Site home page Giter Site logo

citationsorter's Introduction

CitationSorter

CitationSorter is a Python package for sorting and organizing citations in LaTeX documents. It is designed to help you neatly arrange in-text citations within LaTeX files based on the author and publication year.

Installation

You can install CitationSorter using pip:

pip install citation-sorter

Usage

CitationSorter can be used both as a library and as a command-line tool.

As a Library

You can use CitationSorter as a library in your Python scripts. Here's an example of how to use it:

from citation_sorter import CitationSorter

# Create an instance of the CitationSorter class
sorter = CitationSorter()

# Process LaTeX files in the input folder and save the modified versions in the output folder
sorter.process_folder(input_folder='input_folder_path', output_folder='output_folder_path')

As a Command-Line Tool

You can also use CitationSorter from the command line. After installing it, you can run it as follows:

citation_sorter input_folder output_folder

Replace input_folder with the path to the folder containing your LaTeX files and output_folder with the path where you want the modified files to be saved.

LaTeX File Format

CitationSorter works with LaTeX files containing citation commands starting with \cite. It sorts the citations within these commands based on the author's name and publication year.

Example LaTeX citation command:

\cite{smith2023book, jones2022paper, brown2021article}
\cite[p.1]{smith2023book, jones2022paper, brown2021article}
\citet{smith2023book, jones2022paper, brown2021article}
\citep{smith2023book, jones2022paper, brown2021article}

License

This project is licensed under the GPL-3.0 license. See the LICENSE file for details.

citationsorter's People

Contributors

markusbink avatar

Stargazers

Nils Hellwig avatar

Watchers

 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.