Giter Site home page Giter Site logo

bookdown-mode's Introduction

I'm leaving this sinking ship. If you like this project, checked out the maintained version on GitLab.com.


UNDER CONSTRUCTION!

Introduction

bookdown-mode is intended to become a major mode for editing bookdown and R Markdown documents.

Bookdown makes use of the feature-rich environment of recent pandoc versions, allowing for not just inline equations, but full-fledged LaTeX-style equation blocks. In addition it incorporates BibTeX-based citations and cross-references.

To highlight all of these new features in a nice way, I intend to fuse markdown-mode with some AUCTeX (for the LaTeX equation blocks) and add a couple of custom font-locks for the cross-references etc.

Installation

Since bookdown files, and R Markdown files in general, combine chunks of both markdown and R code, the use of bookdown-mode on its own is not intended. Instead, it's best used in combination with polymode. I would recommend to use my own fork of the mode, since it already relies bookdown-mode instead over markdown-mode.

In order to use it, add the following lines to your .emacs configuration file.

;; Adding the repository
(setq load-path (append '("PATH-TO-POLYMODE"
                          "PATH-TO-POLYMODE/modes"
						  "PATH-TO-BOOKDOWN-MODE" ) load-path))
;; Install/Load the packages
(require 'bookdown-mode)
(require 'poly-R)
(require 'poly-bookdown)
;; Tell Emacs to use ESS and bookdown-mode for .Rmd files.
(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-bookdown+r-mode))

Progress

Since this is the first major mode I'm authoring, there is MUCH stuff to be done and for now the code on the Master branch doesn't do anything markdown-mode isn't already doing. But since this mode is derived from markdown-mode, there is no harm (yet :)) using it. If you are curious about the current state of the project, head over to the develop branch!

For the time being I would recommend to enable the mathematical highlighting provided by the markdown-mode to have at least a low-level fontification of your equations. To do so, add the following line to your .emacs

(custom-set-variables '(markdown-enable-math t))

This will color your inline equations. If you want to highlight your LaTeX-style equation blocks as well, insert $$ right before and after a block.

$$\begin{equation}
  M_n =  \max\left\{ X_1, \ldots, X_n \right\}
  (\#eq:rescaling)
\end{equation}$$

License

This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

A copy of the GNU General Public License, version 3, is available at http://www.r-project.org/Licenses/GPL-3

bookdown-mode's People

Contributors

thegreatwhiteshark avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.