Git Product home page Git Product logo

vsc-pandoc-markdown's Introduction

Pandoc Markdown README

A VS Code extension for writing (with live preview) Markdown documents using Pandoc.

Features

  • Fully supports all Pandoc extensions (metadata, bibliography, etc.)
  • Provides full Pandoc live previewing
  • Provides an enhanced Article (CSS) style
  • Allows user-defined extra Pandoc command line options
  • Provides a function to exports to HTML
  • Access to local media from rendered preview panel (images, etc.)
  • Fully configurable via header YAML metadata

Requirements

Requieres Pandoc available from command line.

Provides

  • Pandoc Markdown: Open Preview - ([Ctrl-Shft-R] Windows / [Cmd-Shft-R] Mac) Renders current MD file in editor using Pandoc and opens/refreshes live preview panel.
  • Pandoc Markdown: Export to HTML - Exports current MD file in editor to an HTML file. Result will be located in the same directory as source file, same base name.
  • article.css - a CSS file for fine-tuning and extending Pandoc's defaults. Provides centered abstract, tables and figures; less contrasting font sizes, and a new HTML element, <aside>, for displaying figures, text and other contents as an insert to the right side of the page column.

Extension Settings

This extension contributes the following settings:

  • ArticleStyle: Set to use the provided Article style (boolean)
  • minimumWaitInterval: Milliseconds to wait after a pandoc subprocess exits before starting a new one (default: 750)
  • extraPandocArguments:Extra command-line arguments to use when invoking pandoc. Arguments should be separated with spaces (string)

Typical metadata header (YAML)

A common set of metadata variables is as follows:

---
title: Lorem ipsum
subtitle: Lorem ipsum dolor sit amet consectetur adipiscing
author: Dr Taz
keywords: Markdown, Pandoc, VSCode
bibliography: mybib.bib
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/ieee.csl
fontsize: 11.5pt
mainfont: Arial, Palatino, Georgia, Times
---

At least setting fontsize and mainfont variables is strongly recommended when using Pandoc.

For a review of all metadata variables available, please see Pandoc's reference sections YAML_metadata_block, Metadata variables, Language variables and Variables for HTML.

Please note that the YAML metadata block must occur at the beginning of the document (and there can be only one). If multiple files are given as arguments to pandoc, only the first can be a YAML metadata block.

Preview

vide

Demo

A small demo is provided in the extension's github demo directory as example.

NOTE: Further style editions can be easily done by adding additional CSS content when invoking Pandoc, for example, using the -H parameter, as many times as necesary.

Known Issues

  • TBD

Acknowledgements

  • This extension is based on the Pandoc Markdown Preview extension by kzvi. Unfortunately, it appears to be outdated and with some issues, such as error accessing local media from the rendered preview.

  • The Article style was inspired by Tufte CSS by Dave Liepmann.

  • Markdown icon by Icons8.

Thanks for your great work!

Releases

  • 0.1.2, Jul/16/21

    • Minor tweaks and doc editing
  • 0.1.1, Jul/14/21

    • Minor CSS tweaks
  • 0.1.0, Jul/13/21

    Initial release

For more information

To fully take advantege of the extended Pandoc Markdown, please see the Pandoc User’s Guide, especially the extensions section and of course the specific Pandoc’s Markdown section.

References

Enjoy!

vsc-pandoc-markdown's People

Contributors

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