Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated for Pandoc 1.10

Significant modifications to configuraiton settings to fit with changes
in Pandoc 1.10.
  • Loading branch information...
commit 607c7ac7a74632b97ea27eb17b92b06a5d352322 1 parent cc74b18
Daniel Shannon authored
View
42 .default-pandoc-config-plain.json
@@ -1,6 +1,48 @@
{
"pandoc_arguments":
{
+ "escaped_line_breaks": true,
+ "blank_before_header": true,
+ "header_attributes": true,
+ "auto_identifiers": true,
+ "implicit_header_references": true,
+ "blank_line_before_blockquote": true,
+ "fenced_code_blocks": true,
+ "line_blocks": true,
+ "fancy_lists": true,
+ "startnum": true,
+ "definition_lists": true,
+ "example_lists": true,
+ "simple_tables": true,
+ "multiline_tables": true,
+ "grid_tables": true,
+ "pipe_tables": true,
+ "table_captions": true,
+ "pandoc_title_block": true,
+ "all_symbols_escapable": true,
+ "intraword_underscores": false,
+ "strikeout": true,
+ "superscript": true,
+ "subscript": true,
+ "inline_code_attributes": true,
+ "tex_math_dollars": true,
+ "raw_html": true,
+ "markdown_in_html_blocks": true,
+ "raw_tex": true,
+ "latex_macros": true,
+ "implicit_figures": true,
+ "footnotes": true,
+ "inline_notes": true,
+ "citations": true,
+ "hard_line_breaks": false,
+ "tex_math_single_backslash": false,
+ "tex_math_double_backslash": false,
+ "markdown_attribute": false,
+ "mmd_title_block": false,
+ "abbreviations": false,
+ "autolink_bare_urls": false,
+ "link_attributes": false,
+ "mmd_header_identifiers": false,
"data_dir": "",
"markdown_strict": false,
"parse_raw": true,
View
8 Pandown.sublime-build
@@ -75,6 +75,14 @@
"pandoc_to": ["epub", ".epub"],
"prevent_viewing": true
},
+ { "name": "Pandown: EPUB3",
+ "pandoc_to": ["epub", ".epub"],
+ "prevent_viewing": true
+ },
+ { "name": "Pandown: FictionBooks 2",
+ "pandoc_to": ["fb2", ".fb2"],
+ "prevent_viewing": true
+ },
{ "name": "Pandown: AsciiDoc",
"pandoc_to": ["asciidoc", ".txt"]
},
View
172 Pandown.sublime-settings
@@ -36,6 +36,171 @@
// the readme for information about configuring these options.
"pandoc_arguments":
{
+ /////////////////////////
+ // MARKDOWN EXTENSIONS //
+ /////////////////////////
+ // A backslash followed by a newline is also a line break.
+ "escaped_line_breaks": true,
+
+ // Require a blank line before a header.
+ "blank_before_header": true,
+
+ // Headers can be assigned attributes using this syntax at the end of
+ // the line containing the header text:
+ // {#identifier .class .class key=value key=value}
+ "header_attributes": true,
+
+ // A header without specified attributes will automatically be assigned
+ // a unique identifier based on the header text.
+ "auto_identifiers": true,
+
+ // Pandoc assumes header references have been defined for each header.
+ "implicit_header_references": true,
+
+ // Require a blank line before block quotes. In nested blockquotes,
+ // require:
+ // > Quotation
+ // >
+ // > > Quotation within quotation.
+ "blank_line_before_blockquote": true,
+
+ // Fence code blocks off with tildes or backticks.
+ "fenced_code_blocks": true,
+
+ // Start lines with pipe characters to and the division into lines and
+ // leading whitespace will be preserved. Useful for setting verse and
+ // addresses.
+ "line_blocks": true,
+
+ // Pandoc allows fancier numbering using uppercase letters, lowercase
+ // letters and Roman numerals. List markers may be enclosed in parentheses
+ // or followed by a single right-parenthesis or period, then two spaces.
+ "fancy_lists": true,
+
+ // Pandoc will pay attention to the starting number for each list.
+ "startnum": true,
+
+ // Pandoc supports definition lists; see documentation here for the
+ // correct syntax: http://johnmacfarlane.net/pandoc/README.html#definition-lists
+ "definition_lists": true,
+
+ // The list marker (@) can be used to sequentially number examples in
+ // a way that persists throughout the document.
+ "example_lists": true,
+
+ // Pandoc supports four kinds of tables, the syntax for which is given at:
+ // http://johnmacfarlane.net/pandoc/README.html#tables.
+ "simple_tables": true,
+ "multiline_tables": true,
+ "grid_tables": true,
+ "pipe_tables": true,
+
+ // A table caption is a paragraph beginning with the string "Table:" or a
+ // colon alone. It may be placed at the beginning or end of a table.
+ "table_captions": true,
+
+ // Pandoc allows the inclusion of a title block that will not appear in
+ // the body of the document:
+ // % Title
+ // % Author(s) (separated by semicolons)
+ // % Date
+ "pandoc_title_block": true,
+
+ // A backslash may be used to escape any Markdown symbol.
+ "all_symbols_escapable": true,
+
+ // Using underscores within a word for emphasis is disabled by
+ // default. Use * instead.
+ "intraword_underscores": false,
+
+ // To strike letters in your text, surround them with ~~two tildes~~.
+ "strikeout": true,
+
+ // Superscripts may be written by surrounding text with ^ characters,
+ // subscripts by surrounding text with ~ characters. Escape spaces within
+ // scripts using \ .
+ "superscript": true,
+ "subscript": true,
+
+ // Add attribtues, including syntax highlighting, to inline code.
+ "inline_code_attributes": true,
+
+ // Text between two $ characters will be rendered as LaTeX math.
+ "tex_math_dollars": true,
+
+ // The default behavior in Markdown allows you to insert raw HTML
+ // anywhere in a document.
+ "raw_html": true,
+
+ // By default, Pandoc interprets Markdown in blocks of HTML as Markdown.
+ // This deviates from Markdown.pl's default behavior.
+ "markdown_in_html_blocks": true,
+
+ // Pandoc allows raw TeX to be passed in addition to raw HTML.
+ "raw_tex": true,
+
+ // If set to `true`, Pandoc will use \newcommand and \renewcommand
+ // definitions in all LaTeX math blocks.
+ "latex_macros": true,
+
+ // An image occurring by itself in a paragraph will be rendered as a
+ // figure with a caption: ![This is the caption](path/to/image.jpg)
+ "implicit_figures": true,
+
+ // Pandoc will parse footnotes in the syntax listed here:
+ // http://johnmacfarlane.net/pandoc/README.html#footnotes
+ "footnotes": true,
+ "inline_notes": true,
+
+ // Use the syntax given here for citations:
+ // http://johnmacfarlane.net/pandoc/README.html#citations
+ "citations": true,
+
+ // All newlines within a paragraph will be interpreted as linebreaks
+ // rather than spaces.
+ "hard_line_breaks": false,
+
+ // Anything between \( and \) will be interpreted as TeX inline math,
+ // and anything between \[ and \] as TeX display math.
+ "tex_math_single_backslash": false,
+
+ // Same as above, but escaped with two backslashes.
+ "tex_math_double_backslash": false,
+
+ // Markdown is only parsed within block-level tags if `markdown=1` is
+ // set in their attributes.
+ "markdown_attribute": false,
+
+ // Enables a MultiMarkdown-style title block:
+ // Title: My Title
+ // Author: Arthur Author
+ // Date: January 1, 2013
+ // Comment: This is a mmd title block, and it even includes
+ // a field spanning multiple lines.
+ "mmd_title_block": false,
+
+ // Skip PHP Markdown Extra abbreviation keys instead of parsing them
+ // as paragraphs if set to `true`.
+ "abbreviations": false,
+
+ // Makes all absolute URLs into links, even when not enclosed in <...>.
+ "autolink_bare_urls": false,
+
+ // Parse (but ignore, at the moment) MMD-style key--value attribtues
+ // in image and link references.
+ "link_attributes": false,
+
+ // Parses MMD-style header identifiers (in square brackets between header
+ // text and closing ATX #s.
+ "mmd_header_identifiers": false,
+
+
+
+
+
+ ////////////////////////////
+ // COMMAND-LINE ARGUMENTS //
+ ////////////////////////////
// Modify this setting to tell Pandoc to look for any of the following
// in the specified directory rather than ~/.pandoc or Pandoc's default
// directory tree. Note that this is not an all-purpose includes
@@ -49,13 +214,10 @@
// slideous/
// s5/
// templates/
- // Anything placed under templates and will be found by the "template"
+ // Anything placed under templates will be found by the "template"
// setting; otherwise, to set an include directory, use the "includes_paths"
- // option above.
+ // option.
"data_dir": "",
-
- // Disable Pandoc's Markdown extensions.
- "markdown_strict": false,
// "Parse untranslatable HTML codes and LaTeX environments as
// raw HTML or LaTeX, instead of ignoring them."
View
15 README.mdown
@@ -1,14 +1,11 @@
-# [Pandown Plugin for Sublime Text 2][pandown]
-
-## Updates
-Thanks to Kyle L.'s diligence, I managed to catch a few silly bugs that I'd missed. The package should now perform much better than it did before---which is to say, the package should now perform.
+# Pandown Plugin for Sublime Text 2
## Introduction
-This package is designed as a complete, versatile, and highly Subliminal [Sublime Text 2](http://sublimetext.com/) build wrapper for [Pandoc][]. Written by [Daniel Shannon][pandown] and inspired by jclement's [Pandoc (Markdown)](https://github.com/jclement/SublimePandoc) plugin, Pandown is intended to be simple and understandable out of the box but highly customizable behind the scenes. All Pandoc options are configurable, and all input and output formats are theoretically supported, with [Markdown][] implemented most completely.
+This package is designed as a complete, versatile, and highly Subliminal [Sublime Text 2](http://sublimetext.com/) build wrapper for [Pandoc][] **version 1.10 or higher**. Written by [Daniel Shannon][http://daniel.sh] and inspired by jclement's [Pandoc (Markdown)](https://github.com/jclement/SublimePandoc) plugin, Pandown is intended to be simple and understandable out of the box but highly customizable behind the scenes. All Pandoc options are configurable, and all input and output formats are theoretically supported, with [Markdown][] implemented most completely.
## Installation
-Since this is just a build script, you'll need to download and install [Pandoc][] before it'll be of any use to you. The preferred installation method is through [Sublime Package Control](http://wbond.net/sublime_packages/package_control). Users sufficiently knowledgeable and persnickety to want to use another tactic are assumed to know what to do.
+Since this is just a build script, you'll need to download and install [Pandoc][] **version 1.10 or higher** before it'll be of any use to you. The preferred installation method is through [Sublime Package Control](http://wbond.net/sublime_packages/package_control). Users sufficiently knowledgeable and persnickety to want to use another tactic are assumed to know what to do.
## Usage
@@ -20,13 +17,13 @@ This is, of course, not very much fun: you wouldn't be using Sublime if you didn
### Configuration
-You'll find menu items for Pandown's configuration files under "PreferencesPackage SettingsPandown". The Default package settings file is heavily and informatively commented, making it an excellent place to start. Make what changes you'd like in the User settings, which override the defaults, and they'll be reflected on your next build. You can also override both the Default and User settings by changing the `settings` dictionary in your `sublime-project` file.
+You'll find menu items for Pandown's configuration files under "Preferences&rarr;Package Settings&rarr;Pandown". The Default package settings file is heavily and informatively commented, making it an excellent place to start. Make what changes you'd like in the User settings, which override the defaults, and they'll be reflected on your next build. You can also override both the Default and User settings by changing the `settings` dictionary in your `sublime-project` file.
-However, because it's inconvenient to constantly edit and reload the project file, even though so many of the arguments passed to Pandoc will change from project to project, Pandown features a third way to configure Pandoc. Clicking "Preferences→Package Settings→Pandown→Settings -- Project" or choosing "Pandown: Project Settings" in the Command Palette will place a file called `pandoc-config.json` in your current project folder. Setting the values for the `pandoc_arguments` dictionary there will override the settings in your project file _and_ the settings in your `sublime-settings` files. If a config file does not exist in the same folder as the file you're building, Pandown will check the folders above it until it reaches a main project folder---that is, config files apply to the folder they're placed in and all its subfolders.
+However, because it's inconvenient to constantly edit and reload the project file, even though so many of the arguments passed to Pandoc will change from project to project, Pandown features a third way to configure Pandoc. Clicking "Preferences&rarr;Package Settings&rarr;Pandown&rarr;Settings -- Project" or choosing "Pandown: Project Settings" in the Command Palette will place a file called `pandoc-config.json` in your current project folder. Setting the values for the `pandoc_arguments` dictionary there will override the settings in your project file _and_ the settings in your `sublime-settings` files. If a config file does not exist in the same folder as the file you're building, Pandown will check the folders above it until it reaches a main project folder---that is, config files apply to the folder they're placed in and all its subfolders.
And this feature is extra-configurable: once you're familiar enough with the Pandoc options you care about to not need the complete set in each new project, you can place a `pandoc-config.json` file in your `Packages/User` folder and it, rather than the default file, will be copied. You can always delete it to restore the original behavior.
-Currently, only arguments to Pandoc will be recognized in per-project configuration files.
+Currently, only arguments to Pandoc and settings for Pandoc's Markdown extensions will be recognized in per-project configuration files.
### Templates
The basic template from which Pandoc generates its HTML is just that: basic. And not very attractive. Without much trouble, you can do better on your own. For a non-designer and non-coder type, the stylesheets included with [Brett Terpstra](http://brettterpstra.com)'s wonderful [Marked](http://markedapp.com) app are probably worth taking a look at; run an empty Markdown file through Marked and save it as HTML to get something that can become a lovely template file. (Brett has kindly made uncompressed versions of his CSS [available here](http://support.markedapp.com/kb/how-to-tips-and-tricks/writing-custom-css-for-marked).)
View
176 default-pandoc-config.json
@@ -11,6 +11,171 @@
// file, please see the Pandown README. //
//////////////////////////////////////////////////////////////////////
+ /////////////////////////
+ // MARKDOWN EXTENSIONS //
+ /////////////////////////
+ // A backslash followed by a newline is also a line break.
+ "escaped_line_breaks": true,
+
+ // Require a blank line before a header.
+ "blank_before_header": true,
+
+ // Headers can be assigned attributes using this syntax at the end of
+ // the line containing the header text:
+ // {#identifier .class .class key=value key=value}
+ "header_attributes": true,
+
+ // A header without specified attributes will automatically be assigned
+ // a unique identifier based on the header text.
+ "auto_identifiers": true,
+
+ // Pandoc assumes header references have been defined for each header.
+ "implicit_header_references": true,
+
+ // Require a blank line before block quotes. In nested blockquotes,
+ // require:
+ // > Quotation
+ // >
+ // > > Quotation within quotation.
+ "blank_line_before_blockquote": true,
+
+ // Fence code blocks off with tildes or backticks.
+ "fenced_code_blocks": true,
+
+ // Start lines with pipe characters to and the division into lines and
+ // leading whitespace will be preserved. Useful for setting verse and
+ // addresses.
+ "line_blocks": true,
+
+ // Pandoc allows fancier numbering using uppercase letters, lowercase
+ // letters and Roman numerals. List markers may be enclosed in parentheses
+ // or followed by a single right-parenthesis or period, then two spaces.
+ "fancy_lists": true,
+
+ // Pandoc will pay attention to the starting number for each list.
+ "startnum": true,
+
+ // Pandoc supports definition lists; see documentation here for the
+ // correct syntax: http://johnmacfarlane.net/pandoc/README.html#definition-lists
+ "definition_lists": true,
+
+ // The list marker (@) can be used to sequentially number examples in
+ // a way that persists throughout the document.
+ "example_lists": true,
+
+ // Pandoc supports four kinds of tables, the syntax for which is given at:
+ // http://johnmacfarlane.net/pandoc/README.html#tables.
+ "simple_tables": true,
+ "multiline_tables": true,
+ "grid_tables": true,
+ "pipe_tables": true,
+
+ // A table caption is a paragraph beginning with the string "Table:" or a
+ // colon alone. It may be placed at the beginning or end of a table.
+ "table_captions": true,
+
+ // Pandoc allows the inclusion of a title block that will not appear in
+ // the body of the document:
+ // % Title
+ // % Author(s) (separated by semicolons)
+ // % Date
+ "pandoc_title_block": true,
+
+ // A backslash may be used to escape any Markdown symbol.
+ "all_symbols_escapable": true,
+
+ // Using underscores within a word for emphasis is disabled by
+ // default. Use * instead.
+ "intraword_underscores": false,
+
+ // To strike letters in your text, surround them with ~~two tildes~~.
+ "strikeout": true,
+
+ // Superscripts may be written by surrounding text with ^ characters,
+ // subscripts by surrounding text with ~ characters. Escape spaces within
+ // scripts using \ .
+ "superscript": true,
+ "subscript": true,
+
+ // Add attribtues, including syntax highlighting, to inline code.
+ "inline_code_attributes": true,
+
+ // Text between two $ characters will be rendered as LaTeX math.
+ "tex_math_dollars": true,
+
+ // The default behavior in Markdown allows you to insert raw HTML
+ // anywhere in a document.
+ "raw_html": true,
+
+ // By default, Pandoc interprets Markdown in blocks of HTML as Markdown.
+ // This deviates from Markdown.pl's default behavior.
+ "markdown_in_html_blocks": true,
+
+ // Pandoc allows raw TeX to be passed in addition to raw HTML.
+ "raw_tex": true,
+
+ // If set to `true`, Pandoc will use \newcommand and \renewcommand
+ // definitions in all LaTeX math blocks.
+ "latex_macros": true,
+
+ // An image occurring by itself in a paragraph will be rendered as a
+ // figure with a caption: ![This is the caption](path/to/image.jpg)
+ "implicit_figures": true,
+
+ // Pandoc will parse footnotes in the syntax listed here:
+ // http://johnmacfarlane.net/pandoc/README.html#footnotes
+ "footnotes": true,
+ "inline_notes": true,
+
+ // Use the syntax given here for citations:
+ // http://johnmacfarlane.net/pandoc/README.html#citations
+ "citations": true,
+
+ // All newlines within a paragraph will be interpreted as linebreaks
+ // rather than spaces.
+ "hard_line_breaks": false,
+
+ // Anything between \( and \) will be interpreted as TeX inline math,
+ // and anything between \[ and \] as TeX display math.
+ "tex_math_single_backslash": false,
+
+ // Same as above, but escaped with two backslashes.
+ "tex_math_double_backslash": false,
+
+ // Markdown is only parsed within block-level tags if `markdown=1` is
+ // set in their attributes.
+ "markdown_attribute": false,
+
+ // Enables a MultiMarkdown-style title block:
+ // Title: My Title
+ // Author: Arthur Author
+ // Date: January 1, 2013
+ // Comment: This is a mmd title block, and it even includes
+ // a field spanning multiple lines.
+ "mmd_title_block": false,
+
+ // Skip PHP Markdown Extra abbreviation keys instead of parsing them
+ // as paragraphs if set to `true`.
+ "abbreviations": false,
+
+ // Makes all absolute URLs into links, even when not enclosed in <...>.
+ "autolink_bare_urls": false,
+
+ // Parse (but ignore, at the moment) MMD-style key--value attribtues
+ // in image and link references.
+ "link_attributes": false,
+
+ // Parses MMD-style header identifiers (in square brackets between header
+ // text and closing ATX #s.
+ "mmd_header_identifiers": false,
+
+
+
+
+
+ ////////////////////////////
+ // COMMAND-LINE ARGUMENTS //
+ ////////////////////////////
// Modify this setting to tell Pandoc to look for any of the following
// in the specified directory rather than ~/.pandoc or Pandoc's default
// directory tree. Note that this is not an all-purpose includes
@@ -28,9 +193,6 @@
// setting; otherwise, to set an include directory, use the "includes_paths"
// option above.
"data_dir": "",
-
- // Disable Pandoc's Markdown extensions.
- "markdown_strict": false,
// "Parse untranslatable HTML codes and LaTeX environments as
// raw HTML or LaTeX, instead of ignoring them."
@@ -46,8 +208,9 @@
// "Speficy the base level for headers"
"base_header_level": 1,
- // Apply code classes to all indented code blocks. N.B.: Does not
- // apply to fenced code, which must still be configured inline.
+ // Apply code classes to all indented code blocks. N.B.:
+ // does not apply to fenced code, which must still be
+ // configured inline.
// MUST BE DEFINED AS A LIST, EVEN IF EMPTY. This is correct:
// "indented_code_classes": [],
// and so is this:
@@ -118,6 +281,9 @@
// output can be viewed offline.
"self_contained": false,
+ // Use <q> tags for quotes in HTML5 output
+ "html_q_tags": false,
+
// In HTML output ONLY, restrict to ASCII characters
// with numerical HTML entities.
"ascii": false,
View
4 messages.json
@@ -1,5 +1,7 @@
{
"install": "messages/install.txt",
"1.0.0": "messages/1.0.0.txt",
- "1.1.0": "messages/1.1.0.txt"
+ "1.1.0": "messages/1.1.0.txt",
+ "1.2.0": "messages/1.2.0.txt",
+ "1.3.0": "messages/1.3.0.txt"
}
View
14 messages/1.3.0.txt
@@ -0,0 +1,14 @@
+ Pandown Plugin for Sublime Text 2
+------------------------------------------------
+ Version 1.3.0
+
+MAJOR IMPROVEMENTS
+ * Now designed to work with Pandoc version
+ 1.10 or higher. Versions lower than 1.10
+ will no longer be supported or tested.
+ Please upgrade to continue using Pandown.
+
+MINOR FIXES
+ * UTF-8 characters that were bewildering
+ Pandoc have been removed from the sample
+ files and README.
View
2  messages/install.txt
@@ -7,5 +7,7 @@ now's the time:
http://johnmacfarlane.net/pandoc/
+Note that Pandown requires Pandoc
+1.10 or later to work correctly.
As ever, it's not a bad idea to
check out the README.mdown file.
View
250 pandownBuildCommand.py
@@ -272,22 +272,6 @@ def _walkIncludes(self, lookFor, prepend=None):
def _buildPandocCmd(self, inFile, to, pandoc_from, a):
cmd = ['pandoc']
- if self.fromDirty:
- cmd.append("--from=" + pandoc_from)
- cmd.append("--to=" + to[0])
- inFile = self.tempLoc
- elif self.toWindow:
- pass
- elif self.makePDF:
- self.outFile = os.path.splitext(inFile)[0] + ".pdf"
- cmd.append("--output=" + self.outFile)
- cmd.append("--from=" + pandoc_from)
- else:
- self.outFile = os.path.splitext(inFile)[0] + to[1]
- cmd.append("--output=" + self.outFile)
- cmd.append("--to=" + to[0])
- cmd.append("--from=" + pandoc_from)
-
try:
f = open(os.path.join(sublime.packages_path(), 'Pandown', '.default-pandoc-config-plain.json'))
except IOError as e:
@@ -339,11 +323,239 @@ def _buildPandocCmd(self, inFile, to, pandoc_from, a):
s["css"].extend(p.pop("css", []))
s.update(p)
+ if pandoc_from == "markdown":
+ # Parse Pandoc Markdown extensions
+ if s["escaped_line_breaks"]:
+ pandoc_from += "+escaped_line_breaks"
+ else:
+ pandoc_from += "-escaped_line_breaks"
+
+ if s["blank_before_header"]:
+ pandoc_from += "+blank_before_header"
+ else:
+ pandoc_from += "-blank_before_header"
+
+ if s["header_attributes"]:
+ pandoc_from += "+header_attributes"
+ else:
+ pandoc_from += "-header_attributes"
+
+ if s["auto_identifiers"]:
+ pandoc_from += "+auto_identifiers"
+ else:
+ pandoc_from += "-auto_identifiers"
+
+ if s["implicit_header_references"]:
+ pandoc_from += "+implicit_header_references"
+ else:
+ pandoc_from += "-implicit_header_references"
+
+ if s["blank_line_before_blockquote"]:
+ pandoc_from += "+blank_line_before_blockquote"
+ else:
+ pandoc_from += "-blank_line_before_blockquote"
+
+ if s["fenced_code_blocks"]:
+ pandoc_from += "+fenced_code_blocks"
+ else:
+ pandoc_from += "-fenced_code_blocks"
+
+ if s["line_blocks"]:
+ pandoc_from += "+line_blocks"
+ else:
+ pandoc_from += "-line_blocks"
+
+ if s["fancy_lists"]:
+ pandoc_from += "+fancy_lists"
+ else:
+ pandoc_from += "-fancy_lists"
+
+ if s["startnum"]:
+ pandoc_from += "+startnum"
+ else:
+ pandoc_from += "-startnum"
+
+ if s["definition_lists"]:
+ pandoc_from += "+definition_lists"
+ else:
+ pandoc_from += "-definition_lists"
+
+ if s["example_lists"]:
+ pandoc_from += "+example_lists"
+ else:
+ pandoc_from += "-example_lists"
+
+ if s["simple_tables"]:
+ pandoc_from += "+simple_tables"
+ else:
+ pandoc_from += "-simple_tables"
+
+ if s["multiline_tables"]:
+ pandoc_from += "+multiline_tables"
+ else:
+ pandoc_from += "-multiline_tables"
+
+ if s["grid_tables"]:
+ pandoc_from += "+grid_tables"
+ else:
+ pandoc_from += "-grid_tables"
+
+ if s["pipe_tables"]:
+ pandoc_from += "+pipe_tables"
+ else:
+ pandoc_from += "-pipe_tables"
+
+ if s["table_captions"]:
+ pandoc_from += "+table_captions"
+ else:
+ pandoc_from += "-table_captions"
+
+ if s["pandoc_title_block"]:
+ pandoc_from += "+pandoc_title_block"
+ else:
+ pandoc_from += "-pandoc_title_block"
+
+ if s["all_symbols_escapable"]:
+ pandoc_from += "+all_symbols_escapable"
+ else:
+ pandoc_from += "-all_symbols_escapable"
+
+ if s["intraword_underscores"]:
+ pandoc_from += "+intraword_underscores"
+ else:
+ pandoc_from += "-intraword_underscores"
+
+ if s["strikeout"]:
+ pandoc_from += "+strikeout"
+ else:
+ pandoc_from += "-strikeout"
+
+ if s["superscript"]:
+ pandoc_from += "+superscript"
+ else:
+ pandoc_from += "-superscript"
+
+ if s["subscript"]:
+ pandoc_from += "+subscript"
+ else:
+ pandoc_from += "-subscript"
+
+ if s["inline_code_attributes"]:
+ pandoc_from += "+inline_code_attributes"
+ else:
+ pandoc_from += "-inline_code_attributes"
+
+ if s["tex_math_dollars"]:
+ pandoc_from += "+tex_math_dollars"
+ else:
+ pandoc_from += "-tex_math_dollars"
+
+ if s["raw_html"]:
+ pandoc_from += "+raw_html"
+ else:
+ pandoc_from += "-raw_html"
+
+ if s["markdown_in_html_blocks"]:
+ pandoc_from += "+markdown_in_html_blocks"
+ else:
+ pandoc_from += "-markdown_in_html_blocks"
+
+ if s["raw_tex"]:
+ pandoc_from += "+raw_tex"
+ else:
+ pandoc_from += "-raw_tex"
+
+ if s["latex_macros"]:
+ pandoc_from += "+latex_macros"
+ else:
+ pandoc_from += "-latex_macros"
+
+ if s["implicit_figures"]:
+ pandoc_from += "+implicit_figures"
+ else:
+ pandoc_from += "-implicit_figures"
+
+ if s["footnotes"]:
+ pandoc_from += "+footnotes"
+ else:
+ pandoc_from += "-footnotes"
+
+ if s["inline_notes"]:
+ pandoc_from += "+inline_notes"
+ else:
+ pandoc_from += "-inline_notes"
+
+ if s["citations"]:
+ pandoc_from += "+citations"
+ else:
+ pandoc_from += "-citations"
+
+ if s["hard_line_breaks"]:
+ pandoc_from += "+hard_line_breaks"
+ else:
+ pandoc_from += "-hard_line_breaks"
+
+ if s["tex_math_single_backslash"]:
+ pandoc_from += "+tex_math_single_backslash"
+ else:
+ pandoc_from += "-tex_math_single_backslash"
+
+ if s["tex_math_double_backslash"]:
+ pandoc_from += "+tex_math_double_backslash"
+ else:
+ pandoc_from += "-tex_math_double_backslash"
+
+ if s["markdown_attribute"]:
+ pandoc_from += "+markdown_attribute"
+ else:
+ pandoc_from += "-markdown_attribute"
+
+ if s["mmd_title_block"]:
+ pandoc_from += "+mmd_title_block"
+ else:
+ pandoc_from += "-mmd_title_block"
+
+ if s["abbreviations"]:
+ pandoc_from += "+abbreviations"
+ else:
+ pandoc_from += "-abbreviations"
+
+ if s["autolink_bare_urls"]:
+ pandoc_from += "+autolink_bare_urls"
+ else:
+ pandoc_from += "-autolink_bare_urls"
+
+ if s["link_attributes"]:
+ pandoc_from += "+link_attributes"
+ else:
+ pandoc_from += "-link_attributes"
+
+ if s["mmd_header_identifiers"]:
+ pandoc_from += "+mmd_header_identifiers"
+ else:
+ pandoc_from += "-mmd_header_identifiers"
+
+
+
+ if self.fromDirty:
+ cmd.append("--from=" + pandoc_from)
+ cmd.append("--to=" + to[0])
+ inFile = self.tempLoc
+ elif self.toWindow:
+ pass
+ elif self.makePDF:
+ self.outFile = os.path.splitext(inFile)[0] + ".pdf"
+ cmd.append("--output=" + self.outFile)
+ cmd.append("--from=" + pandoc_from)
+ else:
+ self.outFile = os.path.splitext(inFile)[0] + to[1]
+ cmd.append("--output=" + self.outFile)
+ cmd.append("--to=" + to[0])
+ cmd.append("--from=" + pandoc_from)
+
try:
if s["data_dir"]:
cmd.append("--data-dir=" + s["data_dir"])
- if s["markdown_strict"]:
- cmd.append("--markdown-strict")
if s["parse_raw"]:
cmd.append("--parse-raw")
if s["smart"]:
@@ -417,6 +629,8 @@ def _buildPandocCmd(self, inFile, to, pandoc_from, a):
if s["self_contained"]:
cmd.append("--self-contained")
+ if s["html_q_tags"]:
+ cmd.append("--html-q-tags")
if s["ascii"]:
cmd.append("--ascii")
if s["reference_links"]:
Please sign in to comment.
Something went wrong with that request. Please try again.