Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 11 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 20, 2016
@jgm Fixed Chris Forster's name. 7e6c70e
@jgm Fixed changelog formatting. b53036b
@jgm Fixed changelog. b0dc933
@jgm Clarify and shorten description of file-scope in changelog. 5f91f06
@jgm Changelog formatting. 44428ca
@jgm Fixed link to TEI in README. 08c625c
Commits on Mar 21, 2016
@jkr jkr Fix stdin handling for file-scope
Regardless of input type, we should use default handling if we are
dealing with stdin. In other words, there should be no file-scope if
there are no files. This was an issue with pandoc json, which could be
piped on stdin, but which was read by default with `--file-scope`.
a8a2d4f
@jgm Improved documentation of templates.
Note that there's no docx template.
Closes #2797.
2649a0d
@jgm Version to 1.17.0.1. edcb8b6
@jgm Updated changelog. 650c12d
@jgm Updated man page. db20790
Showing with 55 additions and 38 deletions.
  1. +10 −4 README
  2. +28 −27 changelog
  3. +15 −6 man/pandoc.1
  4. +1 −1 pandoc.cabal
  5. +1 −0 pandoc.hs
View
14 README
@@ -22,7 +22,7 @@ markup], [Haddock markup], [OPML], [Emacs Org mode], [DocBook],
[OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki markup],
[DokuWiki markup], [Haddock markup], [EPUB] (v2 or v3),
[FictionBook2], [Textile], [groff man] pages, [Emacs Org mode],
-[AsciiDoc], [InDesign ICML], [TEI XML], and [Slidy], [Slideous], [DZSlides],
+[AsciiDoc], [InDesign ICML], [TEI Simple], and [Slidy], [Slideous], [DZSlides],
[reveal.js] or [S5] HTML slide shows. It can also produce [PDF] output
on systems where LaTeX, ConTeXt, or `wkhtmltopdf` is installed.
@@ -1005,9 +1005,15 @@ where *FORMAT* is the name of the output format. A custom template
can be specified using the `--template` option. You can also override
the system default templates for a given output format *FORMAT*
by putting a file `templates/default.*FORMAT*` in the user data
-directory (see `--data-dir`, above). *Exceptions:* For `odt` output,
-customize the `default.opendocument` template. For `pdf` output,
-customize the `default.latex` template.
+directory (see `--data-dir`, above). *Exceptions:*
+
+- For `odt` output, customize the `default.opendocument`
+ template.
+- For `pdf` output, customize the `default.latex` template
+ (or the `default.beamer` template, if you use `-t beamer`,
+ or the `default.context` template, if you use `-t context`).
+- `docx` has no template (however, you can use
+ `--reference-docx` to customize the output).
Templates contain *variables*, which allow for the inclusion of
arbitrary information at any point in the file. Variables may be set
View
55 changelog
@@ -1,34 +1,37 @@
+pandoc (1.17.0.1)
+
+ * File scope is no longer used when there are no input files (i.e.,
+ when input comes from stdin). Previously file scope was triggered
+ when the `json` reader was specified and input came from `stdin`,
+ and this caused no output to be produced. (Fix due to Jesse Rosenthal;
+ thanks to Fedor Sheremetyev for calling the bug to our attention.)
+ * Improved documentation of templates (#2797).
+
pandoc (1.17)
* Added `--file-scope` option (Jesse Rosenthal).
- Traditionally pandoc operates on multiple files by first concatenating
+ By default pandoc operates on multiple files by first concatenating
them (around extra line breaks) and then processing the joined file. So
it only parses a multi-file document at the document scope. This has the
- benefit that footnotes and links can be in different files, but it also
- introduces some difficulties: (a) it is difficult to join files with
- footnotes without some sort of preprocessing, which makes it difficult
- to write academic documents in small pieces; (b) it makes it impossible
- to process multiple binary input files, which can't be catted; (c) it
- makes it impossible to process files from different input formats.
- The `--file-scope` option causes pandoc to parse the files first,
- and then combine the parsed output, instead of combining before
- parsing. This makes it impossible to have links across multiple files,
- and auto-identified headers won't work correctly if headers in multiple
- files have the same name. On the other hand, footnotes across multiple
- files will work correctly and will allow more freedom for input formats.
- `--file-scope` is selected automatically for binary input files (which
- cannot be concatenated anyway) and for pandoc json.
-
- * Add TEI Writer (csforste) and `tei` output format.
+ benefit that footnotes and links can be in different files, but for
+ some purposes it is useful to parse the individual files first
+ and then combine their outputs (e.g. when the files use footnotes
+ or links with the same labels). The `--file-scope` option causes
+ pandoc to parse the files first, and then combine the parsed output,
+ instead of combining before parsing. `--file-scope` is selected
+ automatically for binary input files (which cannot be concatenated)
+ and for pandoc json.
+
+ * Add TEI Writer (Chris Forster) and `tei` output format.
* Added a general `ByteStringReader` with warnings, used by the docx
reader (API change, Jesse Rosenthal).
* Add `readDocxWithWarnings` (API change, Jesse Rosenthal).
- * Changed type of Shared.uniqueIdent argument from [String] to Set String.
- This avoids performance problems in documents with many identically
- named headers (API change, #2671).
+ * Changed type of `Shared.uniqueIdent`'s argument from `[String]`
+ to `Set String.` This avoids performance problems in documents with
+ many identically named headers (API change, #2671).
* Removed `tex_math_single_backslash` from `markdown_github` options
(#2707).
@@ -53,12 +56,13 @@ pandoc (1.17)
links have their spaces removed, and are appropriately smushed
together (#2689).
- * HTML reader: Fixed behavior of base tag (#2777).
+ * HTML reader:
- + If the base path does not end with slash, the last component
+ + Fixed behavior of base tag (#2777).
+ If the base path does not end with slash, the last component
will be replaced. E.g. base = `http://example.com/foo`
combines with `bar.html` to give `http://example.com/bar.html`.
- + If the href begins with a slash, the whole path of the base
+ If the href begins with a slash, the whole path of the base
is replaced. E.g. base = `http://example.com/foo/` combines
with `/bar.html` to give `http://example.com/bar.html`.
+ Rewrote `htmlInBalanced`. This version avoids an exponential
@@ -124,10 +128,7 @@ pandoc (1.17)
anyway if no positioning is specified). Now LaTeX emplates can
control the overall table alignment in a document by setting the
longtable length variables `LTleft` and `LTright`. For example,
-
- \setlength\LTleft\parindent
- \setlength\LTright\fill
-
+ `\setlength\LTleft\parindent\setlength\LTright\fill`
will create left-aligned tables that respect paragraph indentation.
* Docx writer: Handle image alt text (#2754, Mauro Bieg).
View
21 man/pandoc.1
@@ -1,5 +1,5 @@
.\"t
-.TH PANDOC 1 "January 12, 2016" "pandoc 1.17"
+.TH PANDOC 1 "January 12, 2016" "pandoc 1.17.0.1"
.SH NAME
pandoc - general markup converter
.SH SYNOPSIS
@@ -18,8 +18,8 @@ reStructuredText, XHTML, HTML5, LaTeX (including \f[C]beamer\f[] slide
shows), ConTeXt, RTF, OPML, DocBook, OpenDocument, ODT, Word docx, GNU
Texinfo, MediaWiki markup, DokuWiki markup, Haddock markup, EPUB (v2 or
v3), FictionBook2, Textile, groff man pages, Emacs Org mode, AsciiDoc,
-InDesign ICML, [TEI XML], and Slidy, Slideous, DZSlides, reveal.js or S5
-HTML slide shows.
+InDesign ICML, TEI Simple, and Slidy, Slideous, DZSlides, reveal.js or
+S5 HTML slide shows.
It can also produce PDF output on systems where LaTeX, ConTeXt, or
\f[C]wkhtmltopdf\f[] is installed.
.PP
@@ -1159,9 +1159,18 @@ You can also override the system default templates for a given output
format \f[I]FORMAT\f[] by putting a file
\f[C]templates/default.*FORMAT*\f[] in the user data directory (see
\f[C]\-\-data\-dir\f[], above).
-\f[I]Exceptions:\f[] For \f[C]odt\f[] output, customize the
-\f[C]default.opendocument\f[] template.
-For \f[C]pdf\f[] output, customize the \f[C]default.latex\f[] template.
+\f[I]Exceptions:\f[]
+.IP \[bu] 2
+For \f[C]odt\f[] output, customize the \f[C]default.opendocument\f[]
+template.
+.IP \[bu] 2
+For \f[C]pdf\f[] output, customize the \f[C]default.latex\f[] template
+(or the \f[C]default.beamer\f[] template, if you use
+\f[C]\-t\ beamer\f[], or the \f[C]default.context\f[] template, if you
+use \f[C]\-t\ context\f[]).
+.IP \[bu] 2
+\f[C]docx\f[] has no template (however, you can use
+\f[C]\-\-reference\-docx\f[] to customize the output).
.PP
Templates contain \f[I]variables\f[], which allow for the inclusion of
arbitrary information at any point in the file.
View
2 pandoc.cabal
@@ -1,5 +1,5 @@
Name: pandoc
-Version: 1.17
+Version: 1.17.0.1
Cabal-Version: >= 1.10
Build-Type: Custom
License: GPL
View
1 pandoc.hs
@@ -1327,6 +1327,7 @@ convertWithOpts opts args = do
(doc, media) <- case reader of
(StringReader _) | not fileScope && readerName' /= "json" ->
sourceToDoc sources
+ _ | null sources -> sourceToDoc sources
_ -> do pairs <- mapM (\s -> sourceToDoc [s]) sources
return (mconcat $ map fst pairs, mconcat $ map snd pairs)

No commit comments for this range

Something went wrong with that request. Please try again.