Coder Social home page Coder Social logo

supra's Introduction

Supra

Supra lets you write legal scholarship in Markdown.

About

Supra is a Pandoc wrapper for writing legal scholarship in Markdown. Pandoc is great for academic writing. But there are several aspects of legal scholarship that Pandoc doesn't do well, particularly the innumerable footnotes with oodles of cross-references—i.e., supra notes.

Supra makes Pandoc more useful for writing legal scholarship. Its main feature is a pre-processor that (1) inserts citations for common source types; (2) where appropriate, adds short-form citations to those sources in subsequent footnotes; and (3) adds cross-references among footnotes. Supra can then call Pandoc with an optional custom reference. Finally, a post-processor can edit the file that Pandoc produces, turning footnote cross-references into fields (which can then update automatically), adding an author footnote, and more.

Setup & Usage

For instructions on how to setup Supra, markup a document, and run the program, see the manual.

Changelog

  • 0.1.0: Initial release
  • 0.1.1: Fixed readme & blank-user journal command
  • 0.1.2: Updated documentation
  • 0.2.0: Added Pandoc and post-processing functionality
  • 0.3.0: Added support for cases and automatic *Id.*s.
  • 0.3.1: Fixed date-parts deserializing bug.

supra's People

Contributors

bryanlammon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

supra's Issues

Sources in parentheticals not rendered

Sources in parentheticals do not appear to be processed. For example:

[@AlliedAirFreight1968] at 444 (citing [@UnitedStatesWallace1949] at 794).

Renders only the first source, not the second:

Allied Air Freight, Inc. v. Pan Am. World Airways, Inc., 393 F.2d 441, 444 (2d Cir. 1968) (citing [@UnitedStatesWallace1949] at 794).

Pincites with commas

Pincites that include a comma (e.g., at 550, 551 n.12) are not supported.

This was done so that the lexer would capture citations that end with a comma. The thought was that these were more common than pincites with a comma.

But can the lexer capture both?

*Id.*s with the same pincite

*Id.*s are using pincites even if the previous citation cited to the same page.

If an Id. has the same pincite as the prior cite, it should not render the pincite.

Same pincite in subsequent footnotes

If the same pincite is used in subsequent footnotes, the second one will use a pincite instead of just Id.

Input

Text.^[[@source1] at 1.]

Text.
Text.
Text.^[*See, e.g.*, [@source1] at 1; [@source2] at 2; [@source3] at 3.]

Output

Text.1

Text. Text. Text.2

n.1: Source1, 1 U.S. 1, 1 (2001).

n.2: See, e.g., id. at 1; Source2, 2 U.S. 2, 2 (2002); Source3, 3 U.S. 3 (2003).

Note 2 should start with "See, e.g., id.;".

Error messages for footnote ends

There's an error message for when a footnote does not end with a closing bracket. But the same error is thrown thrown if the footnote ends with a citation that lacks any ending punctuation. The error message should be expanded to address both situations.

Error deserializing CSL JSON's Date Field

It looks like BetterBibTex's CSL JSON output is storing dates as either strings or integers. The deserializing code expects integers. So the deserializing code needs to account for both types.

*Id.*s ending sentences have an extra punctuation

If (1) a citation is rendered as an Id. without a pincite and (2) the citation ends with a period, and extra period is rendered.

E.g.:

  • Input: *Compare* signal.^[Compare [@PlaintiffDefendant2000] at 1002, with [@PlaintiffDefendant2000] at 1002.]
  • Expected: *Compare* signal.^[Compare id. at 1002, with id.]
  • Result: *Compare* signal.^[Compare id. at 1002, with id..]

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.