forked from jgm/pandoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelog
16869 lines (12970 loc) · 707 KB
/
changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
pandoc (2.7.2)
* Add XWiki writer (#1800, Derek Chen-Becker).
Add `Text.Pandoc.Writers.XWiki`, exporting `writeXWiki` [API change].
* Dokuwiki Reader: parse single curly brace (#5416, Mauro Bieg).
* Vimwiki reader: improve handling of internal links (#5414).
We no longer append `.html` to link targets, and we add a title
`wikilink`. This mirrors behavior of other wiki readers. Generally
the `.html` extension is not wanted. It may be important for output
to HTML in certain circumstances, but it can always be added using a
filter that matches on links with title `wikilink`.
If your workflow requires the current behavior, here is a lua filter
that will add the `.html` extension:
```lua
function Link(el)
if el.title == 'wikilink' then
el.target = el.target .. ".html"
end
return el
end
```
* ipynb reader:
+ Use format `ipynb` for raw cell where no format given.
+ Avoid introducing spurious `.0` on integers in metadata.
* Markdown reader: fenced div takes priority over setext header.
* HTML reader: read `data-foo` attribute into `foo` (#5392).
The HTML writer adds the `data-` prefix for HTML5 for nonstandard
attributes. But the attributes are represented in the AST without
the `data-` prefix, so we should strip this when reading HTML.
* LaTeX reader: Improve autolink detection (#5340).
* PowerPoint writer (Jesse Rosenthal):
+ Expand builtin reference doc to model all layouts.
The previous built-in reference doc had only title and content
layouts. Add in a section-header slide and a two-content slide, so
users can more easily modify it to build their own templates.
+ Always open up in slide view. When editing a
template/reference-doc, the user might be in Master view, but when
producing a slide show, it is assumed that slide view will be
desired.
+ Remove `handoutsMasterList` from template presentation.xml
+ Fix numerous errors in templating (#5402). Previously, some templates
produced by Office 365 (MacOS) would not render with `--reference-doc`
correctly. We now apply correct shapes for content, and build
shape trees correctly.
+ Make default placeholder type for template lookup.
+ Apply speaker notes to metadata slide if applicable.
+ Test for speaker notes after breaking header.
+ Correctly handle notes after section-title header.
Previously, if notes came after a section-title header (ie, a level-1
header in a slide-level=2 presentation), they would go on the next
slide. This keeps them on the slide with the header.
+ Internal improvements.
* ipynb writer:
+ Use format `ipynb` for raw cell where no format given.
According to nbformat docs, this is supposed to render in every
format. We don't do that, but we at least preserve it as a raw
block in markdown, so you can round-trip.
+ Consolidate adjacent raw blocks. Sometimes pandoc creates two
HTML blocks, e.g. one for the open tag and one for a close tag.
If these aren't consolidated, only one will show up in output cell.
+ Fixed carry-over of nbformat from metadata.
+ Preserve `nbformat_minor` if it's given. This helps with round-tripping.
* LaTeX writer:
+ Avoid inadvertently creating ?` or !` ligatures (#5407).
These are upside down ? and !, resp.
+ Fix footnotes in table caption and cells (#5367). This fixes a
bug wherein footnotes appeared in the wrong order, and with
duplicate numbers, when in table captions and cells.
We now use regular `\footnote` commands, even in the table
caption and the minipages containing cells. Apparently
longtable knows how to handle this.
* HTML writer: Don't add data- prefix to RDFa attributes (#5403).
* JATS writer: Ensure that plain strings go inside `<pub-id>` tag (#5397).
* Markdown writer:
+ Better rendering of numbers (#5398). If the number is integral,
we render it as an integral not a float.
+ Proper rendering of empty map in YAML metadata (#5398). Should
be `{}`, not empty string.
+ Properly escape attributes in Markdown writer (#5369).
+ Be sure implicit figures work in list contexts (#5368).
Previously they would sometimes not work: e.g., when they
occured in final paragraphs in lists that were originally
parsed as Plain and converted later using PlainToPara.
* Docx writer: Use `w:br` without attributes for line breaks (#5377).
We previously added the attribute `type="textWrapping"`, but
this causes problems on Word Online.
* LaTeX template (Andrew Dunning):
+ Ensure correct heading/table order (#5365). Improve workaround
(#1658) for tables following headings. The new solution works whether
or not the `indent` variable is enabled.
+ Remove `subparagraph` variable. The default is now to use run-in
style for level 4 and 5 headings (`\paragraph` and `\subparagraph`).
To get the previous default behavior (where these were formatted as
blocks, like `\subsubsection`), set the `block-headings` variable.
+ Add pandoc to PDF metadata (#5388).
+ Group graphics-related code (#5389).
+ Move `\setstretch` after front matter (#5179). Ensures that
`\maketitle`, `\tableofcontents`, and so forth are not affected by
changes to line spacing.
* Update data/jats.csl to avoid commas between name-part elements
(#5397).
* Add support for golang (`go`) with `--listings` (#5427).
* Text.Pandoc.Shared - improve `metaToJSON` behavior with numbers.
We now do a better job marshalling numbers from MetaString
or MetaInlines into JSON Number.
* Text.Pandoc.Writers.Shared: `metaValueToJSON`: use Number Values for
integers. Pandoc's MetaValue doesn't have a distinguished number type,
so numbers are put in MetaStrings. If the MetaString consists
entirely of digits, we convert it to a Number. We should probably
consider adding a MetaNumber constructor to MetaValue, for better
round-tripping with JSON etc. This change aids round-tripping in
ipynb metadata fields, like `toc_depth`.
* Text.Pandoc.Class: `fetchItem`: don't treat UNC paths as
protocol-relative URLs (#5127). These are paths beginning `//?/UNC/...`.
* Text.Pandoc.ImageSize: Improve `pdfSize` so it handles
a wider range of PDFs (#4322, with help from Richard Davis).
* Text.Pandoc.Pretty: avoid stack overflow by using strict sum (#5401).
* Fix harmless error in file-scope code (#5422).
* MANUAL.txt:
+ Improve 'header' and 'heading' usage (#5423, Andrew
Dunning). The term 'header' was being used where 'heading'
is more appropriate.
+ Add paragraph on options affecting markdown in ipynb.
* stack.yaml - remove -Wmissing-home-modules
This seems to cause problems with stack ghci. Remove RTS options.
* Add ghc-options to cabal.project.
* appveyor.yml - use ghc 8.6.4. Fixes segfault issues on Windows (#5037).
* linux build process: Remove clone of pandoc-citeproc (#5366).
It wasn't being used; cabal.project specifies the version to use.
pandoc (2.7.1)
* Add tectonic as an option for --pdf-engine (#5345, Cormac Relf).
Runs tectonic on STDIN instead of a temporary .tex file, so that it
looks in the working directory for `\include` and `\input` like the rest
of the engines. Allows overriding the output directory
args with `--pdf-engine-opt=--outdir --pdf-engine-opt="$DIR"`.
* Allow `-o/--output` to be used with `--print-default-data-file`,
`--print-highlighting-style`, `--print-default-template`.
Note that `-o` must occur BEFORE the `--print*` command on the command
line (this is documented, #5357).
* LaTeX reader:
+ Support `\underline`, `\ul`, `\uline` (#5359, Paul
Tilley). These are parsed as a Span with class `underline`, as
with other readers.
+ Ensure that `\Footcite` and `\Footcites` get put in a note.
* ipynb reader:
+ Remove sensitivity to `raw_html`, `raw_tex` extensions.
We now include every output format. Pruning is handled by
`--ipynb-output`.
+ Better handling of cell metadata. We now include even complex cell
metadata in the Div's attributes (as JSON, in complex cases, or
as plain strings in simple cases).
* ipynb writer:
+ Recurse into native divs for output cell data (#5354).
+ Render cell metadata fields from div attributes.
* Docx writer: avoid extra copy of abstractNum and num elements
in numbering.xml. This caused pandoc-produced docx files to
be uneditable using Word Online (#5358).
* Markdown writer: improve handling of raw blocks/inline.
We now emit raw content using `raw_attribute` when no more
direct method is available. Use of `raw_attribute` can be
forced by disabling `raw_html` and `raw_tex`.
* LaTeX writer: Add classes for frontmatter support (#5353, Andrew Dunning)
and remove frontmatter from `scrreprt`.
* LaTeX template:
+ Improve readability (#5363, Andrew Dunning).
+ Robust section numbering removal (#5351, Andrew Dunning).
Ensures that section numbering does not reappear with custom
section levels. See <https://tex.stackexchange.com/questions/473653/>.
+ Better handling of front/main/backmatter (#5348).
In pandoc 2.7 we assumed that every class with chapters would accept
`\frontmatter`, `\mainmatter`, and `\backmatter`. This is not so (e.g.
report does not). So pandoc 2.7 breaks on report class by including an
unsupported command. Instead of the `book-class` variable, we use two
variables, `has-chapters` and `has-frontmatter`, and set these
intelligently in the writer.
* Text.Pandoc.Shared: Improve `filterIpynbOutput`. Ensure that
images are prioritized over text. `best` should include everything
for ipynb.
* Tests.Old: specify `--data-dir=../data` to ensure tests can find
data files even if they haven't been installed. Remove old
`pandoc_datadir` environment variable, which hasn't done anything for a
long time.
* MANUAL.txt: Add recommendation to use `raw_attribute` with ipynb (#5354).
* Use cmark-gfm-hs 0.1.8 (note that 0.1.7 is buggy).
* Use latest pandoc-citeproc, texmath.
pandoc (2.7)
* Use XDG data directory for user data directory (#3582). Instead of
`$HOME/.pandoc`, the default user data directory is now
`$XDG_DATA_HOME/pandoc`, where `XDG_DATA_HOME` defaults to
`$HOME/.local/share` but can be overridden by setting the
environment variable. If this directory is missing, then
`$HOME/.pandoc` is searched instead, for backwards compatibility.
However, we recommend moving local pandoc data files from
`$HOME/.pandoc` to `$HOME/.local/share/pandoc`. On Windows the
default user data directory remains the same.
* Slide show formats behavior change: content under headers
less than slide level is no longer ignored, but included in
the title slide (for HTML slide shows) or in a slide after
the title slide (for beamer). This change makes possible
2D reveal.js slideshows with content in the top slide on
each stack (#4317, #5237).
* Add command line option `--ipynb-output=all|none|best` (#5339).
Output cells in ipynb notebooks often contain several different
versions of an output, with different MIME types, e.g. an HTML
table and a plain-text fallback. Specifying `--ipynb-output=best`
(the default) ensures that the best version for the output format
is used. `all` includes all versions, and `none` suppresses them
all, leaving output cells empty.
* `asciidoctor` is now an output format separate from `asciidoc`,
to accommodate some minor implementation-specific differences
(currently just in the treatment of display math).
* Add `latexmk` as an option for `--pdf-engine` (#3195).
Note that you can use `--pdf-engine-opt=-outdir=bar` to specify
a persistent temp directory.
* Markdown reader:
+ Improve tight/loose list handling (#5285). Previously the
algorithm allowed list items with a mix of Para and Plain, which
is never wanted.
+ Add newline when parsing blocks in YAML (#5271). Otherwise last
block gets parsed as a Plain rather than a Para. This is a
regression in pandoc 2.x. This patch restores pandoc 1.19
behavior.
+ Make `yamlToMeta` respect extensions (#5272, Mauro Bieg).
This adds a `ReaderOptions` parameter to `yamlToMeta` [API change].
+ Fix bug parsing fenced code blocks (#5304). Previously parsing
would break if the code block contained a string of backticks of
sufficient length followed by something other than end of line.
* LaTeX reader: don't let `\egroup` match `{`. `braced` now actually
requires nested braces. Otherwise some legitimate command and
environment definitions can break.
* Docx reader (Jesse Rosenthal):
+ Rename `getDocumentPath` as `getDocumentXmlPath`.
+ Use field notation for setting `ReaderEnv`.
+ Figure out `document.xml` path once at the beginning of parsing, and
add it to the environment, so we can avoid repeated lookups.
+ Dynamically determine main document xml path (#5277).
The desktop Word program places the main document file in
`word/document.xml`, but the online word places it in
`word/document2.xml`. This file path is actually stated in the root
`_rels/.rels` file, in the `Relationship` element with an
`http://../officedocument` type.
+ Fix paths in archive to prevent Windows failure (#5277).
Some paths in archives are absolute (have an opening slash) which, for
reasons unknown, produces a failure in the test suite on MS
Windows. This fixes that by removing the leading slash if it exists.
+ Add comments to aid code readability.
+ Trim space inside the last inline (#5273).
+ Unwrap sdt elements in footnotes and comments (#5302).
* Muse reader (Alexander Krotov):
+ Test that block level markup does not break `<verbatim>`.
+ Add secondary note support.
* ipynb reader: handle images referring to attachments. Previously
we didn't strip off the attachment: prefix, so even though the
attachment was available in the mediabag, pandoc couldn't find it.
* JATS reader:
+ Fix parsing of figures (#5321). This ensures that a figure
containing a single image is parsed as a pandoc "implicit
figure" (i.e., a Para with a single Image whose title attribute
begins with `fig:`). More complex figures will still be parsed
as divs.
+ Support `fig-group` block element (#5317).
+ Handle citations with multiple references (#5310). The `rid`
attribute can have a space-separated list of ids.
* AsciiDoc Writer: Add `writeAsciiDoctor` [API change, Tarik Graba].
Handle display math appropriately for Asciidoctor.
* JATS writer: wrap figure caption in `<p>` to fix validation (#5290,
Mauro Bieg).
* HTML writer:
+ Implement WAI-ARIA roles for (end)notes, citations, and
bibliography (#4213). Note that doc-biblioref is only used when
link-citations produces links, since it belongs on links.
+ Include content (including speaker notes) in title slides
(#4317, #5237).
* ipynb writer:
+ Ensure final newline.
+ Only include metadata under `jupyter` field.
+ Don't create attachments for images with absolute URIs,
including data: URIs (#5303).
+ Keep plain text fallbacks in output even if a richer format is
included (#5293). We don't know what output format will be needed.
See the `--ipynb-output` command line option for a way to control
what formats are included in the output.
* Markdown writer: use `markdown="1"` when appropriate for Divs:
when `native_divs` and `markdown_in_html_blocks` are disabled
but `raw_html` and `markdown_attribute` are enabled.
* LaTeX writer:
+ Use right fold for `escapeString`. This is more elegant than
the explicit recursive code we were using.
+ Avoid `{}` after control sequences when escaping.
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex
ellipsis package. This patch causes pandoc to avoid emitting
the `{}` when it is not necessary. Now `\ldots` and other
control sequences used in escaping will be followed by either
a `{}`, a space, or nothing, depending on context.
+ For beamer, include contents under headers superordinate to
slidelevel (#4317). Currently we keep the fancy title slide, and
add a new slide with the same title and whatever content was
under the header.
* Powerpoint writer (Jesse Rosenthal): support underlines.
Use span with single class "underline" as in docx writer.
* Muse writer: escape secondary notes (Alexander Krotov).
* FB2 writer: add section identifiers support (#5229, John KetzerX).
* Make `--fail-if-warnings` work for PDF output (#5343).
* Lua filters (Albert Krewinkel):
+ Load module `pandoc` before calling `init.lua` (#5287). The file
`init.lua` in pandoc's data directory is run as part of pandoc's
Lua initialization process. Previously, the `pandoc` module was
loaded in `init.lua`, and the structure for marshaling was
set up after. This allowed simple patching of element
marshaling, but made using `init.lua` more difficult. Now, all
required modules are now loaded before calling `init.lua`. The
file can be used entirely for user customization. Patching
marshaling functions, while discouraged, is still possible via
the `debug` module.
+ All Lua modules bundled with pandoc, i.e., `pandoc.List`,
`pandoc.mediabag`, `pandoc.utils`, and `text` are re-exported from the
`pandoc` module. They are assigned to the fields `List`, `mediabag`,
`utils`, and `text`, respectively.
* Text.Pandoc.Lua (Albert Krewinkel):
+ Split `StackInstances` into smaller Marshaling modules.
+ Get `CommonState` from Lua global. This allows more control over
the common state from within Lua scripts.
* LaTeX template:
+ Support the `subject` metadata variable (#5289, Pascal Wagler).
+ Add `\frontmatter`, `\mainmatter`, `\backmatter`
for book classes (#5306).
* epub3 template: Add titlepage class to section (#5269).
* HTML5 template: Add ARIA role `doc-toc` for table of contents (#4213).
* Make `--metadata-file` use selected extensions (#5279, #5272, Mauro Bieg).
* Text.Pandoc.Shared:
+ Remove `withTempDir` [API change].
+ Add new exported function `defaultUserDataDirs` [API change].
+ Add `filterIpynbOutput` [API change].
+ `compactify`: Avoid lists with a mix of Plain and Para elements
(#5285).
* Text.Pandoc.Translations: reorder alphabetically and remove `Author`
(#5334, Mauro Bieg).
* Text.Pandoc.Extensions:
+ More carefully groom ipynb default extensions.
+ Add `all_symbols_escapable` to `githubMarkdownExtensions`.
* Text.Pandoc.PDF:
+ Use system temp directory when possible (#1192). Previously we
created temp dirs in the working directory, partly (a) because
there were problems using the system temp directory on Windows,
when their pathnames included tildes, and partly (b) because
programs like `epstopdf.pl` would not be allowed to write to
directories outside the working directory in restricted mode. We
now (a) use the system temp dir except when the path includes
tildes, and (b) set `TEXMFOUTPUT` when creating the PDF, so that
subsidiary programs can use the system temp directory. This
addresses problems that occurred when pandoc was used in a
synced directory (such as Dropbox).
+ Change types of subsidiary functions to PandocIO, to allow
warnings to be threaded through (#5343).
* Text.Pandoc.MIME: add WebP (#5267, Mauro Bieg).
* Tests: avoid calling `findPandoc` multiple times.
* Old tests: remove need for temp files by using `pipeProcess`.
* Added simple ipynb reader/writer tests (#5274).
* Rearrange `--help` output in a more rational way, with common
options at the beginning and options grouped by function (#5336).
* trypandoc: Add JATS and other missing formats (Arfon Smith, #5291).
* Add missing copyright notices and remove license boilerplate (#4592,
Albert Krewinkel).
* Use latest basement/foundation on 32bit windows.
* Use latest skylighting (#5328). Custom syntax definitions no
longer try to load `language.dtd`.
* Require texmath 0.11.2.1
* Use latest pandoc-citeproc (0.16.1.1).
* MANUAL.txt:
+ Clarify variable substitution indentation in templates (#5338,
Agustín Martín Barbero).
+ Reorder custom-styles section (#5324, Mauro Bieg).
pandoc (2.6)
* Support ipynb (Jupyter notebook) as input and output format.
+ Add `ipynb` as input and output format (extension `.ipynb`).
+ Added Text.Pandoc.Readers.Ipynb [API change].
+ Added Text.Pandoc.Writers.Ipynb [API change].
+ Add `PandocIpynbDecodingError` constructor to Text.Pandoc.Error.Error
[API change].
+ Depend on ipynb library.
+ Note: there is no template for ipynb.
* Add DokuWiki reader (#1792, Alexander Krotov). This adds
Text.Pandoc.Readers.DokuWiki [API change], and adds `dokuwiki`
as an input format.
* Implement task lists (#3051, Mauro Bieg). Added `task_lists`
extension. Task lists are supported from markdown and gfm input.
They should work, to some degree, in all output formats, though in
most formats you'll get a bullet list with a unicode character for
the box. In HTML, you get checkboxes and in LaTeX/PDF output, a
box is used as the list marker. API changes:
+ Added constructor `Ext_task_lists` to `Extension`.
+ Added `taskListItemFromAscii` and `taskListItemToAscii` to
Text.Pandoc.Shared.
* Allow some command line options to take URL in addition to FILE.
`--include-in-header`, `--include-before-body`, `--include-after-body`.
* HTML reader:
+ Handle empty `start` attribute (see #5162).
+ Treat `textarea` as a verbatim environment (#5241) and preserve
spacing.
* RST reader:
+ Change treatment of `number-lines` directive (Brian Leung,
#5207). Directives of this type without numeric inputs should
not have a `startFrom` attribute; with a blank value, the
writers can produce extra whitespace.
+ Removed superfluous `sourceCode` class on code blocks (#5047).
+ Handle `sourcecode` directive as synonynm for `code` (#5204).
* Markdown reader:
+ Remove `sourceCode` class for literate Haskell code blocks
(#5047). Reverse order of `literate` and `haskell` classes on
code blocks when parsing literate Haskell, so `haskell` is
first.
+ Treat `<textarea>` as a verbatim environment (#5241).
* Org reader:
+ Handle `minlevel` option differently (#5190, Brian Leung).
When `minlevel` exceeds the original minimum level observed in
the file to be included, every heading should be shifted
rightward.
+ Allow for case of `:minlevel == 0` (#5190).
+ Fix treatment of links to images (#5191, Albert Krewinkel).
Links with descriptions which are pointing to images are no
longer parsed as inline images, but as links.
+ Add support for #+SELECT_TAGS (Brian Leung).
+ Separate filtering logic from conversion function (Brian Leung).
* TWiki reader: Fix performance issue with underscores (#3921).
* MediaWiki reader: use `_` instead of `-` in auto-identifiers (#4731).
We may not still be exactly matching mediawiki's algorithm.
* LaTeX reader:
+ Remove `sourceCode` class for literate Haskell code blocks
(#5047). Reverse order of `literate` and `haskell` classes on
code blocks when parsing literate Haskell, so `haskell` is
first.
+ Support `\DeclareMathOperator` (#5149).
+ Support `\inputminted` (#5103).
+ Support `\endinput` (#5233).
+ Allow includes with dots like `cc_by_4.0`. Previously the `.0`
was interpreted as a file extension, leading pandoc not to add
`.tex` (and thus not to find the file). The new behavior matches
tex more closely.
* Man reader:
+ Use `mapLeft` from Shared instead of defining own.
* Docx reader (Jesse Rosenthal):
+ Handle level overrides (#5134).
* Docx writer:
+ Support custom properties (#3024, #5252, Agustín Martín Barbero).
Also supports additional core properties: `subject`, `lang`,
`category`, `description`.
+ Make Level into a real type, instead of an alias for a tuple
(Jesse Rosenthal).
* ICML writer (Mauro Bieg):
+ Support custom-styles (#5137, see #2106).
+ Support unnumbered headers (#5140).
* Texinfo writer: Use header identifier for anchor if present (#4731).
Previously we were overwriting an existing identifier with a new one.
* Org writer: Preserve line-numbering for example and code blocks
(Brian Leung).
* Man/Ms writers: Don't escape `-` as `\-`. The `\-` gets rendered
in HTML and PDF as a unicode minus sign.
* Ms writer: Ensure we have a newline after .EN in disply math (#5251).
* RST writer: Don't wrap simple table header lines (#5128).
* Asciidoc writer: Shorter delimiters for tables, blockquotes
(#4364). This matches asciidoctor reference docs.
* Dokuwiki writer: Remove automatic `:` prefix before internal image
links (#5183, Damien Clochard). This prevented users from making
relative image links.
* Zimwiki writer: remove automatic colon prefix before internal
images (#5183, Damien Clochard).
* MediaWiki writer: fix caption, use 'thumb' instead of 'frame'
(#5105). Captions used to have the word 'caption' prepended; this
has been removed. Also, 'thumb' is used instead of 'frame' to
allow images to be resized.
* reveal.js writer:
+ Ensure that we don't get > 2 levels of section nesting,
even with slide level > 2 (#5168).
+ If slide level == N but there is no N-level header, make
sure the next header with level > N gets treated as a slide
and put in a section, rather than remaining loose (#5168).
* Markdown writer:
+ Make `plain` RawBlocks pass through in `plain` output.
+ Include needed whitespace after HTML figure (#5121).
We use HTML for a figure in markdown dialects that can't
represent it natively.
* Commonmark writer:
+ Fix handling of SoftBreak with `hard_line_breaks` (#5195).
+ Implement `--toc` (`writerTableOfContents`)
in commonmark/gfm writers (#5172).
* EPUB writer:
+ Ensure that picture transforms are done on metadata too.
+ Small fixes to `nav.xhtml`:
Add 'landmarks' id attribute to the landmarks nav.
Replace old default CSS removing numbers from ol.toc li
with new rules that match `nav#toc ol, nav#landmarks ol`.
We keep the `toc` class on `ol` for backwards compatibility.
* LaTeX writer:
+ Make raw content marked `beamer` pass through in `beamer`
output (pandoc/lua-filters#40).
+ Beamer: avoid duplicated `fragile` property in some cases
(#5208).
+ Add `#` special characters for listings (#4939).
This character needs special handling in `\lstinline`.
* RTF writer: use `toTableOfContents` from Shared to replace
old duplicated code.
* Pptx writer:
+ Support custom properties. Also supports additional core
properties: `subject`, `category`, `description` (#5252,
Agustín Martín Barbero).
+ Use `toTableOfContents` from Shared to replace old duplicated code.
* ODT writer (Augustín Martín Barbero):
+ Fix typo in custom properties (#2839).
+ Improve standard properties, including the following core
properties: `generator` (Pandoc/VERSION), `description`, `subject`,
`keywords`, `initial-creator` (from authors), `creation-date`
(actual creation date) (#5252).
* Custom writers:
+ Allow '-' in filenames for custom lua writers (#5187).
+ sample.lua: add `SingleQuoted`, `DoubleQuoted` (#5104).
+ sample.lua: Add a missing `>` (MichaWiedenmann).
* reveal.js template: Add `zoomKey` config (#4249).
* HTML5 template: Remove unnecessary type="text/css" on style and
link for HTML5 (#5146).
* LaTeX template (Andrew Dunning, except where noted):
+ Prevent fontspec from scaling `mainfont` to match the default
font, Latin Modern. A main font set to 12pt could
previously appear between 11pt to 13pt depending on its design.
To return to the earlier rendering, use `-V
mainfontoptions="Scale=MatchLowercase"` (#5212, #5218).
+ Display monospaced fonts without TeX ligatures when using
`--pdf-engine=lualatex`. It now matches the behaviour of other
engines (#5212, #5218).
+ Remove the deprecated `romanfont` variable. The functionality of
`mainfont` is identical (#5218).
+ Render `\subtitle` with the standard document classes.
Previously, `subtitle` only appeared when using the KOMA-Script
classes or Beamer (#5213, #5244).
+ Use Babel instead of Polyglossia for LuaLaTeX. This avoids
several language selection problems, notably with retaining
French spacing conventions when switching to a verbatim
environment or another language; and in printing Greek text
without hyphenation (#5193).
+ Use the [`xurl`](https://ctan.org/pkg/xurl) package if
available, improving the appearance of URLs by allowing them to
break at additional points (#5193).
+ Use [`bookmark`](https://ctan.org/pkg/bookmark) if available
to correct heading levels in PDF bookmarks: see the [KOMA-Script
3.26 release notes](https://komascript.de/release3.26) (#5193).
+ Require the [`xcolor`](https://ctan.org/pkg/xcolor) package to
avoid a possible error when using additional packages alongside
footnotes in tables (#5193, closes #4861).
+ Remove obsolete `fixltx2e` package, which has no functionality
with TeX Live 2015 or later (#5193).
+ Allow multiple `fontfamilies.options` (#5193, closes #5194).
+ Restrict `institute` variable to Beamer (#5219).
+ Use [`footnotehyper`](https://ctan.org/pkg/footnotehyper)
package if available to make footnotes in tables compatible
with `hyperref` (#5234).
+ Number parts and chapters in book classes only if the
`numbersections` variable is set, for consistency with other
output formats. To return to the previous behaviour, use
`-V numbersections -V secnumdepth=0` (#5235).
+ Reindent file (#5193).
+ Use built-in parskip handling with KOMA-Script classes (#5143, Enno).
+ Set default listings language for lua, assembler (#5227, John
MacFarlane). Otherwise we get an error when trying to compile code
with lua or assembler code. To change the default dialect
(currenty 5.3 for lua and x86masm for assembler), you can use
`--include-in-header` to inject something like
`\lstset{defaultdialect=[5.2]Lua}`.
* Text.Pandoc.Readers: Changed types of `readJSON`; it now runs
in an instance of PandocMonad, like the other readers and
writers. [API change]
* Text.Pandoc.Writers: Changed types of `writeJSON`; it now runs
in an instance of PandocMonad, like the other readers and
writers. [API change]
* Text.Pandoc.Error: Added `PandocUTF8DecodingError` constructor
for `PandocError`. [API change]
* Text.Pandoc.Writers.Shared - add `toTableOfContents`. [API change]
This is refactored out from the Markdown writer.
It can be used in other writers to create a table of contents.
* Improve error messages for UTF-8 decoding errors. Now we give
the filename and byte offset (#4765).
* Text.Pandoc.XML: Strip out illegal XML characters in
`escapeXMLString` (#5119).
* Text.Pandoc.Process: update `pipeProcess` (Albert Krewinkel).
The implementation of `pipeProcess` was rewritten to fix sporadic
failures caused by prematurely closed pipes.
* Use `safeRead` instead of `read` everywhere in the code
(John MacFarlane, Mauro Bieg, #5162, #5180).
* Text.Pandoc.SelfContained: Decompress `.svgz` when
converting to `data:` URI (#5163, Alexander Krotov).
* Text.Pandoc.Parsing: Remove unused `HasHeaderMap`
(#5175, Alexander Krotov). [API change]
* Normalize Windows paths to account for change in ghc 8.6 (#5127).
When pandoc is compiled with ghc 8.6, Windows paths are treated
differently, and paths beginning `\\server` no longer work.
This commit rewrites such patsh to `\\?\UNC\server` which works.
The change operates at the level of argument parsing, so it
only affects the command line program.
* Simplify/fix reading of `--metadata` values on command line
to avoid problems relating to hvr/HsYAML#7 (#5177).
* data/pandoc.lua: auto-fix nested constructor arguments (Albert
Krewinkel). Incorrect types to pandoc element constructors are
automatically converted to the correct types when possible. This was
already done for most constructors, but conversions are now also done
for nested types (like lists of lists).
* Removed custom Setup.hs, use build-type: simple. The only thing we
gained from the custom build was automatic installation of the man
page when using 'cabal install'. But custom builds cause problems,
e.g., with cross-compilation. Installation of the man page is
better handled by packagers. Note to packagers (e.g. Debian): it
may be necessary to add a step installing the man page with the
next release.
* Allow latest http-client, tasty, zip-archive, Glob.
* Require skylighting >= 0.7.5, adding support for sml, J,
typescript.
* Tests: Cleaned up `findPandoc` in `Tests.Helpers`, so it
works well with cabal v2.
* INSTALL.md:
+ Use button for installer links (John MacFarlane, Mauro Bieg,
#5167).
+ Fix links and bump required stack version (max).
+ Improve installation notes on associated software (Andrew
Dunning). Includes explanation of how to install related tools
with package managers (since the method of installing
`rsvg-convert` is not obvious).
* doc/org.md: improve documentation of org features (Albert
Krewinkel).
* doc/lua-filters.md: use 3rd level headers for module fields.
* MANUAL:
+ Clarify automatic identifiers (#5201). We remove
non-alphanumerics. This includes, e.g., emojis.
+ Fix example for Div with id (Geoffrey Ely).
+ Update list of LaTeX packages used.
+ Make it clear that `hard_line_breaks` works in `gfm` (see #5195).
+ Mention `raw_attribute` in documentation for `raw_html` and
`raw_tex` (#5240, thanks to @eiro).
+ Clarify that `$sep$` must come right before `$endfor$` in templates
(#5243, Lev Givon).
+ Document metadata support for docx, odt, pptx writers (Agustín
Martín Barbero).
+ Reorganize template variables (#5249, Andrew Dunning).
Add additional headings to categorize variables, and
alphabetize when there is large number; add more examples.
+ Document `date-meta` template variable (#5260, Tristan Stenner).
* trypandoc: Fix CSS and viewport.
pandoc (2.5)
* Text.Pandoc.App: split into several unexported submodules (Albert
Krewinkel): Text.Pandoc.App.FormatHeuristics,
Text.Pandoc.App.Opt, Text.Pandoc.App.CommandLineOptions,
Text.Pandoc.App.OutputSettings. This is motivated partly by the
desire to reduce recompilations when something is modified,
since App previously depended on virtually every other module.
* Text.Pandoc.Extensions
+ Semantically, `gfm_auto_identifiers` is now a modifier of
`auto_identifiers`; for identifiers to be set, `auto_identifiers` must
be turned on, and then the type of identifier produced depends on
`gfm_auto_identifiers` and `ascii_identifiers` are set. Accordingly,
`auto_identifiers` is now added to `githubMarkdownExtensions` (#5057).
+ Remove `ascii_identifiers` from `githubMarkdownExtensions`.
GitHub doesn't seem to strip non-ascii characters any more.
* Text.Pandoc.Lua.Module.Utils (Albert Krewinkel)
+ Test AST object equality via Haskell (#5092). Equality of Lua
objects representing pandoc AST elements is tested by unmarshalling
the objects and comparing the result in Haskell.
A new function `equals` which performs this test has been added to the
`pandoc.utils` module.
+ Improve stringify. Meta value strings (MetaString)
and booleans (MetaBool) are now converted to the literal string and the
lowercase boolean name, respectively. Previously, all values of these
types were converted to the empty string.
* Text.Pandoc.Parsing: Remove Functor and Applicative constraints where Monad
already exists (Alexander Krotov).
* Text.Pandoc.Pretty: Don't render BreakingSpace at end of line
or beginning of line (#5050).
* Text.Pandoc.Readers.Markdown
+ Fix parsing of citations, quotes, and underline emphasis
after symbols. Starting with pandoc 2.4, citations, quoted inlines,
and underline emphasis were no longer recognized after certain
symbols, like parentheses (#5099, #5053).
+ In pandoc 2.4, a soft break after an abbreviation would be
relocated before it to allow for insertion of a nonbreaking
space after the abbreviation. This behavior is here reverted.
A soft break after an abbreviation will remain, and no nonbreaking
space will be added. Those who care about this issue should take care not
to end lines with an abbreviation, or to insert nonbreaking spaces
manually.
* Text.Pandoc.Readers.FB2: Do not throw error for unknown elements in
`<body>` (Alexander Krotov). Some libraries include custom elements
in their FB2 files.
* Text.Pandoc.Readers.HTML
+ Allow `tfoot` before body rows (#5079).
+ Parse `<small>` as a Span with class "small" (#5080).
+ Allow thead containing a row with `td` rather than `th` (#5014).
* Text.Pandoc.Readers.LaTeX
+ Cleaned up handling of dimension arguments. Allow decimal points,
preceding space.
+ Don't allow arguments for verbatim, etc.
+ Allow space before bracketed options.
+ Allow optional arguments after `\\` in tables.
+ Improve parsing of `\tiny`, `\scriptsize`, etc. Parse as raw,
but know that these font changing commands take no arguments.
* Text.Pandoc.Readers.Muse
+ Trim whitespace before parsing grid table cells (Alexander Krotov).
+ Add grid tables support (Alexander Krotov).
* Text.Pandoc.Shared
+ For bibliography match Div with id `refs`, not class `references`.
This was a mismatch between pandoc's docx, epub, latex, and markdown
writers and the behavior of pandoc-citeproc, which actually looks for a
div with id `refs` rather than one with class `references`.
+ Exactly match GitHub's identifier generating algorithm (#5057).
+ Add parameter for `Extensions` to `uniqueIdent` and
`inlineListToIdentifier` (#5057). [API change]
This allows these functions to be sensitive to the settings of
`Ext_gfm_auto_identifiers` and `Ext_ascii_identifiers`, and allows us to
use `uniqueIdent` in the CommonMark reader, replacing custom code. It
also means that `gfm_auto_identifiers` can now be used in all formats.
* Text.Pandoc.Writers.AsciiDoc
+ Use `.`+ as list markers to support nested ordered lists (#5087).
+ Support list number styles (#5089).
+ Render Spans using `[#id .class]#contents#` (#5080).
* Text.Pandoc.Writers.CommonMark
+ Respect `--ascii` (#5043, quasicomputational).
+ Make sure `--ascii` affects quotes, super/subscript.
* Text.Pandoc.Writers.Docx
+ Fix bookmarks to headers with long titles (#5091).
Word has a 40 character limit for bookmark names. In addition, bookmarks
must begin with a letter. Since pandoc's auto-generated identifiers may
not respect these constraints, some internal links did not work. With
this change, pandoc uses a bookmark name based on the SHA1 hash of the
identifier when the identifier isn't a legal bookmark name.
+ Add bookmarks to code blocks (Nikolay Yakimov).
+ Add bookmarks to images (Nikolay Yakimov).
+ Refactor common bookmark creation code into a function (Nikolay Yakimov).
* Text.Pandoc.Writers.EPUB: Handle calibre metadata (#5098).
Nodes of the form
<meta name="calibre:series" content="Classics on War and Politics"/>
are now included from an epub XML metadata file. You can also include
this information in your YAML metadata, like so:
calibre:
series: Classics on War and Policitics
In addition, ibooks-specific metadata can now be included via an XML
file. (Previously, it could only be included via YAML metadata, see
#2693.)
* Text.Pandoc.Writers.HTML: Use plain `"` instead of `"` outside of
attributes.
* Text.Pandoc.Writers.ICML: Consolidate adjacent strings, inc. spaces.
This avoids splitting up the output unnecessarily into separate elements.
* Text.Pandoc.Writers.LaTeX: Don't emit `[<+->]` unless beamer output, even
if `writerIncremental` is True (#5072).
* Text.Pandoc.Writers.Muse (Alexander Krotov).
+ Output tables as grid tables if they have multi-line cells.
+ Indent simple tables only on the top level.
+ Output tables with one column as grid tables.
+ Add support for `--reference-location`.
+ Internal improvements.
* Text.Pandoc.Writers.OpenDocument: Fix list indentation (Nils Carlson,
#5095). This was a regression in pandoc 2.4.
* Text.Pandoc.Writers.RTF: Fix warnings for skipped raw inlines.
* Text.Pandoc.Writers.Texinfo: Add blank line before `@menu` section (#5055).
* Text.Pandoc.XML: in `toHtml5Entities`, prefer shorter entities
when there are several choices for a particular character.
* data/abbreviations
+ Add additional abbreviations (Andrew Dunning)
Many of these borrowed from the Chicago Manual of Style 10.42,
'Scholarly abbreviations'.
* Templates