Giter Club home page Giter Club logo

nvalt-prime's Introduction

nvalt-prime

Join the chat at https://gitter.im/bawigga/nvalt-prime

A smart nvalt Preview Theme.

Features

  • Github theme
  • Github markdown support
  • Font Awesome icons [fa-github]
  • simple checkbox support ([] and [/])
  • code highlighting
  • User Story detection (As a user, I expect ...)
  • LaTex-style math support through Mathjax
  • Hyperlinks to other notes
  • Sort table rows by click on column headers (using Stuart Langridge's sorttable.js)
  • footnotes appear in-place, rendered with bigfoot.js screenshot

Tips

NOTE [TAU]:

Instead of what is described below, I just did what is recommended as of today (Dec 2018) on highlight.js the website :

npm -g install highlight.js

It seems to be working fine (for the languages I use, at least), without needing to compile or build via bower/gulp. But I can't really be sure... It might be just a coincidence that the original highlight.js in the nvalt-prime happened to include some of the less popular languages that I have tried just to see (such as VBScript).

Anyhow, below are the original instructions that involve a build step from the original author...


  • This extensions of nvALT prime has been compiled to include support for code highlighting in some extra languages such as Rust, Clojure, Swift, ... You might want to get a customised version of highlightjs that includes support for your favorite languages. You can configure and download such a version from their website and then substitute the "vanilla" library that bower imports for your custom one. Assuming you have downloaded the highlightjs.zip file to the ~/Downloads folder, you can write
bower install
rm -rf bower_components/highlightjs/
mkdir bower_components/highlightjs
unzip ~/Downloads/highlightjs.zip -d bower_components/highlightjs
gulp

Requirements

nvalt - nvALT is a fork of the original Notational Velocity with some additional features and some interface modifications.

Installation

In a terminal:

cd ~/Library/Application\ Support/
rm -rfi nvALT/
git clone --recursive https://github.com/dg2/nvalt-prime.git nvALT

No need to restart nvALT. The changes will be picked up the next time you switch notes. You can also right click on the preview window and click refresh. The recursive clone is required to include Mathjax

Reverting

You can always restore the default just by deleting the files in ~/Library/Application Support/nvALT/.

rm -rfi ~/Library/Application\ Support/nvALT

Updating

In a terminal:

cd ~/Library/Application\ Support/nvALT/
git pull

Hacking

Just point ~/Library/Application Support/nvALT to your local git repository.

cd [your project path]
git clone [email protected]:bawigga/nvalt-prime.git
rm -rfi ~/Library/Application\ Support/nvALT
ln -s /path/to/nvalt-prime/ ~/Library/Application\ Support/nvALT

No need to restart nvALT. The changes will be picked up the next time you switch notes. You can also right click on the preview window and click refresh.

Usage

Please share how/why you use nvALT! Submit a quick comment on issue #14

Checkboxes

There are two types of checkboxes you can use:

[ ] - unchecked
[/] - checked
[ ] - checked @done

Code Highlighting

class SomeClass
    def someMethod
    end
end

Font Awesome Icons

[fa-github]

Github Markdown Theme

strikethrough: wrap text with ~~

Mathjax

For display mode, math formulae in LaTeX notation can be enclosed by \\( and \\) or \\[ \\]. For inline mode, it can be enclosed by $$ and $$. For example, the following code will display the quadratic equation in the same line as the text, but the two expressions for its solution on separate lines.

The solutions of 
$$ ax^2 + bx + c = 0 $$ 
are
\\( 
x=\frac{-b + \sqrt{b^2-4ac\ }}{2a}.  
\\)
and
\\[
x=\frac{-b - \sqrt{b^2-4ac\ }}{2a}.  
\\]


\\[
\sum_{x=1}^\infty \frac{1}{x} = 1
\\]

Sortable tables

Tables are automatically sortable: just click on the title to sort in ascending order, then click again to toggle between ascending and descending.

Name Country Height
Tom England 1.9m
Bob Scotland 2.0m
Sam Ireland 1.8m

Footnotes

Footnotes are rendered using bigfoot.js, so that they appear as easy-to-click buttons 1; when the reader clicks on these, a popover appears. This means the reader can read the note in-place, without jumping around the page 2.

When printed, the buttons are replaced by the more traditional numbers in-situ cross referencing the full text of the notes at the end of the document. This means the notes can still be read without interactivity.

Footnotes

  1. Rather than as a number.

  2. and, hopefully, be less distracted.

nvalt-prime's People

Contributors

acusti avatar bwiggs avatar dg2 avatar gitter-badger avatar jamesscottbrown avatar jnovack avatar solidline avatar tabulon 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.