Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
* Org reader: allow the `-i` switch to ignore leading spaces.
* Org reader: handle awkwardly-aligned code blocks within lists.
Code blocks in Org lists must have their #+BEGIN_ aligned in a
reasonable way, but their other components can be positioned otherwise.
|
|
Text.Pandoc.Shared:
+ Remove `Element` type [API change]
+ Remove `makeHierarchicalize` [API change]
+ Add `makeSections` [API change]
+ Export `deLink` [API change]
Now that we have Divs, we can use them to represent the structure
of sections, and we don't need a special Element type.
`makeSections` reorganizes a block list, adding Divs with
class `section` around sections, and adding numbering
if needed.
This change also fixes some longstanding issues recognizing
section structure when the document contains Divs.
Closes #3057, see also #997.
All writers have been changed to use `makeSections`.
Note that in the process we have reverted the change
c1d058aeb1c6a331a2cc22786ffaab17f7118ccd
made in response to #5168, which I'm not completely
sure was a good idea.
Lua modules have also been adjusted accordingly.
Existing lua filters that use `hierarchicalize` will
need to be rewritten to use `make_sections`.
|
|
Revert "hierarchicalize: ensure that sections get ids..."
This reverts commit 212406a61d027d85712705e626954e0486a2bc34.
Revert "Improve detection of headings in Divs by hierarchicalize."
This reverts commit 6e2cfd6c97b1b8657f1f3e2b66090a2c3ba8d887.
Revert "Shared.hierarchicalize: improve handling of div and section structure."
This reverts commit 345b33762eb4cc6d57d74c76c4757a6166ee5c13.
|
|
add UnusualConversion to LogMessage [API change]
|
|
even if they're in divs. Improves #3057.
|
|
The structure
```
<h1>one</h1>
<div>
<h1>two</h1>
</div>
```
should create two coordinate sections, not a section with
a subsection. Now it does.
Extends #3057.
|
|
Previously Divs were opaque to hierarchicalize, so headings
inside divs didn't get into the table of contents, for
example (#3057).
Now hierarchicalize treats Divs as sections when appropriate.
For example, these structures both yield a section and a
subsection:
``` html
<div>
<h1>one</h1>
<div>
<h2>two</h2>
</div>
</div>
```
``` html
<div>
<h1>one</h1>
<div>
<h1>two</h1>
</div>
</div>
```
Note that
``` html
<h1>one</h1>
<div>
<h2>two</h2>
</div>
<h1>three</h1>
```
gets parsed as the structure
one
two
three
which may not always be desirable.
Closes #3057.
|
|
|
|
|
|
This is asciidoctor-specific.
Amends 98ee6ca289ad7117b7336a57bcfc6f4b54463f4e.
|
|
|
|
|
|
We now allow groups where the closing `\\}` isn't at the
beginning of a line.
Closes #5410.
|
|
It doesn't seem to be valid for HTML5, and as a result Chrome
ignores the style element. Closes #5725.
|
|
Previously decimal references were used.
But Polyglot Markup prefers hex. See #5718.
This affects the output of pandoc with `--ascii`.
|
|
this allows bibliographies to receive special formatting.
The template now contains definition of this environment (enabled
only when CSL is used).
It also defines a `\cslhangindent` length. This is set to
2em by default when the bibliography style specifies
a hanging indent. To override the length, you can
use e.g.
\setlength{\cslhangindent}{7em}
in header-includes.
Closes jgm/pandoc-citeproc#410.
|
|
When the `raw_tex` extension is set, we just carry through
`\usepackage`, `\input`, etc. verbatim as raw LaTeX.
Closes #5673.
|
|
Previously we used named character references with html5 output.
But these aren't valid XML, and we aim to produce html5 that is
also valid XHTML (polyglot markup). (This is also needed for
epub3.)
Closes #5718.
|
|
Closes #5682.
|
|
Closes #5722.
|
|
even if the pdf program is not found.
Closes #5720.
|
|
Closes #5711.
|
|
Closes #5714.
|
|
|
|
Starting numbers for ordered lists were previously ignored. Now we
specify the number if it is something other than 1.
Closes: #5709
|
|
|
|
Now that it is polymorphic, this is possible, and it's a
better choice because it resets last string pos.
|
|
* T.P.Parsing: Change type of `setLastStrPos` so it takes a
`Maybe SourcePos` rather than a `SourcePos`. [API change]
* T.P.Parsing: Make `parseFromString'` and `gridTableWith` and
`gridTableWith'` polymorphic in the parser state, constraining it with
`HasLastStrPosition`. [API change]
Closes #5708.
|
|
|
|
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change]
+ Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON'
[API change].
+ Text.Pandoc.Writers.Shared: modify `addVariablesToContext`,
`defField`, `setField`, `getField`, `resetField` to work with
Context rather than JSON values. [API change]
+ Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API
change].
+ Use new templates and doclayout in writers.
+ Use Doc-based templates in all writers.
+ Adjust three tests for minor template rendering differences.
+ Added indentation to body in docbook4, docbook5 templates.
The main impact of this change is better reflowing of content
interpolated into templates. Previously, interpolated variables
were rendered independently and intepolated as strings, which could lead
to overly long lines. Now the templates interpolated as Doc values
which may include breaking spaces, and reflowing occurs
after template interpolation rather than before.
|
|
|
|
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows
for multiple YAML metadata files to be added. The new default value has
been changed from `Nothing` to `[]`.
To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now
operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold.
Added a test (command/5700.md) which tests this functionality and
updated MANUAL.txt, as per the contributing guidelines.
With the current behavior, using `foldr1 (<>)`, values within files
specified first will be used over those in later files. (If the reverse
of this behavior would be preferred, it should be fixed by changing
foldr1 to foldl1.)
|
|
Closes #5690.
|
|
This puts RST reader into alignment with docbook reader.
|
|
Closes #5705.
|
|
Fixes #1234.
This parses admonitions not as a blockquote, but rather as a div with an
appropriate class. We also handle titles for admonitions as a nested div
with the "title" class.
(I followed the behaviour of other docbook-to-html converters in this -
there are clearly other ways you could encode it.)
In general, the handling of elements with nested title elements is very
inconsistent. I think we should make it consistent, but I'm leaivng that
for later to make this a small change.
Example:
```docbook
<warning xml:id="someId">
<title>My title</title>
<simpara>An admonition block</simpara>
</warning>
```
goes to
```html
<div id="someId" class="warning">
<div class="title">My title</div>
<p>An admonition block</p>
</div>
```
|
|
|
|
|
|
Traversal methods are updated to use the new Walk module such that
sequences with nested Inline (or Block) elements are traversed in the
order in which they appear in the linearized document.
Fixes: #5667
|
|
Lua filters must be able to traverse sequences of AST elements and to
replace elements by splicing sequences back in their place. Special
`Walkable` instances can be used for this; those are provided in a new
module `Text.Pandoc.Lua.Walk`.
|
|
the token string is modified by a parser (e.g. accent when
it only takes part of a Word token).
Closes #5686. Still not ideal, because we get the whole
`\t0BAR` and not just `\t0` as a raw latex inline command.
But I'm willing to let this be an edge case, since you
can easily work around this by inserting a space, braces,
or raw attribute. The important thing is that we no longer
drop the rest of the document after a raw latex inline
command that gobbles only part of a Word token!
|
|
|
|
Closes #5685.
|
|
Details at https://groups.google.com/forum/#!topic/pandoc-discuss/c861tTdCFTg
Fix XWiki output for
```
+----------+----------+
| Col A | Col B |
+==========+==========+
| Row A | * Item A |
| | * Item B |
+----------+----------+
```
from (notice that the following XWiki code renders as a table followed by a singleton list)
```
|=Col A|=Col B
|Row A|*. Item A
*. Item B
```
to
```
|=Col A|=Col B
|Row A|(((*. Item A
*. Item B
)))
```
|
|
|
|
|
|
This reverts commit 87ce1ffbd97f6cb2785f9fbf05f68d3185f50675.
This change caused a problem on Windows that we didn't have
before; this needs looking into.
https://ci.appveyor.com/project/jgm/pandoc/build/job/fxq96log042df8dk
.\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html
pandoc.exe: MANUAL.html: commitAndReleaseBuffer: invalid argument (invalid character)
Command exited with code 1
|
|
|
|
According to https://github.com/jgm/pandoc/issues/4725#issuecomment-399772217 not only the `lilypond` environment but also `ly` should be included in the verbatim list.
@jperon
https://github.com/jperon/lyluatex/issues/203
|