| Age | Commit message (Collapse) | Author |
|
|
|
Reader: When `w:tblLook` has `w:firstColumn` set (or an equivalent bit
mask), we set row heads = 1 in the AST.
Writer: set `w:firstColumn` in `w:tblLook` when there are row
heads. (Word only allows one, so this is triggered by any number
of row heads > 0.)
Closes #9495.
|
|
...when `styles` extension is enabled. Closes #9603.
Also improve manual's coverage of custom styles.
|
|
These are now converted to inches as in the LaTeX writer.
Closes #9945.
|
|
Closes #10385.
Closes #2337.
Closes #6424.
|
|
Fixes a regression in 3.6 that caused problems parsing
text with underscores.
Closes #10497.
|
|
Closes #10490.
|
|
Closes #10491.
|
|
This case was missed when changing the reference link strategy for RST
to allow a single pass.
Closes #10484.
|
|
...that would otherwise be interpreted as list starts.
Closes #9700.
|
|
...in the same way it works for other formats (with the top-level
heading being promoted to metadata title). This needed special
treatment because of the way djot surrounds sections with Divs.
Closes #10459.
|
|
Closes #10472.
|
|
The span needs to be separated from its surroundings by spaces.
Also, a span can have attributes, which we now attach.
Closes #9878.
|
|
...is preceded by whitespace.
Closes #10414.
|
|
This change introduces a reader for mdoc, a roff-derived semantic markup
language for manual pages. The two relevant contemporary implementations
of mdoc for manual pages are mandoc (https://mandoc.bsd.lv/), which
implements the language from scratch in C, and groff
(https://www.gnu.org/software/groff/), which implements it as roff macros.
mdoc has a lot of semantics specific to technical manuals that aren't
representable in Pandoc's AST. I've taken a cue from the mandoc HTML
output and many mdoc elements are encoded as Codes or Spans with classes
named for the mdoc macro that produced them.
Much like web browsers with HTML, mandoc attempts to produce best-effort
output given all kinds of weird and crappy mdoc input. Part of the
reason it's able to do this is it uses a very accommodating parse tree
and stateful output routines specialized to the output mode, and when it
encounters some macro it wasn't expecting, it can easily give up on
whatever it was outputting and output something else. I've encoded as
much flexibility as I reasonably could into the mdoc reader here, but I
don't know how to be as flexible as mandoc.
This branch has been developed almost exclusively against mandoc's
documentation and implementation of mdoc as a reference, and the
real-world manual pages tested against are those from the OpenBSD base
system. Of ~3500 manuals in mdoc format shipped with a fresh OpenBSD
install, 17 cause the mdoc reader to exit with a parse error. Any
further chasing of edge cases is deferred to future work.
Many of the tests in test/Tests/Readers/Mdoc.hs are derived directly
from mandoc's extensive regression tests.
[API change] Adds readMdoc to the public API
|
|
The existing lexRoff does some stuff I don't want to deal with in mdoc
just yet, like lexing tbl, and some stuff I won't do at all, like
handling macro and text string definitions and switching between modes.
Uses a typeclass with associated type families to reuse most of the
escaping code between Roff (i.e. man) and Mdoc.
Future work could improve on this so that more lexing code could be
shared between Man and Mdoc. Mdoc inherits Roff's surface syntax so
hypothetically it makes sense to lex it into tokens that make sense for
roff. But it happens that the Mdoc parser is much easier to build with
an Mdoc specific token stream. Some discussion in jgm/pandoc#10225 about
the rationale.
Adds a test for the roff \A escape, which I accidentally dropped support
for in an earlier iteration without anything complaining.
|
|
Closes #10390.
|
|
The plain writer behaved as a markdown variant with Ext_line_blocks
turned off, and so empty lines in a line block would get eliminated.
This is surprising, since if there's anything where the intent can be
preserved in plain text output it's empty lines.
It's still a bit surprising to have nbsps in plain text output, as in
the test, where the distinction doesn't really matter, but that'd be an
orthogonal change.
|
|
|
|
Closes #10266.
|
|
Closes #10318.
|
|
Divs are unwrapped if the only purpose of the div seems to be to control
whether lists are presented incrementally on slides.
Closes: #10328
|
|
|
|
|
|
E.g. `|Python|_`.
Closes #6588.
|
|
Closes #9196.
|
|
For example, ``Go to `g`_ `g <www.example.com>`_.``
should produce two links to www.example.com.
Closes #5081.
|
|
Instead of having an initial pass where we collect reference
definitions, we create links with target `##SUBST##something`
or `##REF##something` or `##NOTE##something`, and resolve these
in a pass over the parsed AST.
This allows us to handle link references that are not at the
top level. Closes #10281.
|
|
Closes #10279.
|
|
If `smart` is not enabled, a command in the default template will
disable smartquote substitutions.
When `smart` is enabled, render curly apostrophes as straight
and escape straight apostrophes.
When `smart` is disabled, render curly apostrophes as curly
and don't escape straight apostrophes.
And similarly for quotes, em and en dashes.
This should give more idiomatic typst output, with fewer unnecessary
escapes.
Closes #10271.
|
|
Closes #6992.
|
|
+ Remove section numbering code from common.latex
+ Add section numbering to default.latex
+ Add logic for numbering sections in default.beamer. I moved the template setting
code to where other beamer templates are set. This makes the section-titles and
numbersections variables independent.
This should make --number-sections work with beamer.
|
|
This accords with the style in the reference docs.
|
|
With this patch, we also reuse bullet list code for list tables,
which simplifies the code.
|
|
In these cases we emit an empty comment to fix the point from
which indentation is measured; otherwise the block quote is not
parsed as a block quote.
This affects list items and admonitions.
Cloess #10236.
|
|
In commit a26ec96d89ccf532f7bca7591c96ba30d8544e4a we added an
empty `\item[]` to the beginning of a list that occurs first
in a definition list, to avoid having one item on the line with
the label.
This gave bad results in some cases (#10241) and there is a more
idiomatic solution anyway: using `\hfill`.
Closes #10241.
|
|
+ Split out common parts of latex template into partials: common.latex,
fonts.latex, font-settings.latex, passoptions.latex, hypersetup.latex,
after-header-includes.latex.
+ Split out old latex template into default.latex and default.beamer.
+ Make default.beamer the default template for beamer.
|
|
- Fix alignment of list items corresponding to cells.
- Don't enclose the list table in a `.. table::`; this leads to
doubled captions.
Closes #10226.
Closes #10227.
Modified test output for #4564.
|
|
like dokuwiki itself. Closes #8863.
|
|
Allow for quoted code blocks.
|
|
|
|
If there are no citations, don't emit an empty CSLReferences
environment.
Closes #10185.
|
|
The new commonmark-pandoc version automatically adds the
attribute `wrapper="1"` on all Divs and Spans that
are introduced just as containers for attributes that belong
properly to their contents. So we don't need to add the
attribute here.
This gives much better results in some cases. Previously the
wrapper attribute was being added even for explicit Divs and
Spans in djot, but it is not needed in these cases.
|
|
|
|
This is like `makeSections` but has an additional parameter
specifying number offsets, for use with the `--number-offset` option.
Use `makeSectionsWithOffsets` in HTML writer instead of ad hoc
and inefficient number-adjusting code.
Clarify MANUAL.txt: the `--number-offset` option should only
directly affect numbering of the first section heading in
a document; subsequent headings will increment normally.
Fix test output for #5071 to reflect this.
|
|
+ Add command line options `--table-caption-position` and
`--figure-caption-position`. These allow the user to specify whether
to put captions above or below tables and figures, respectively.
The following output formats are supported: HTML (and related such
as EPUB), LaTeX (and Beamer), Docx, ODT/OpenDocument, Typst.
+ Text.Pandoc.Options: add `CaptionPosition` and new
`WriterOptions` fields `writerFigureCaptionPosition` and
`writerTableCaptionPosition` [API change].
+ Text.Pandoc.Opt: add `Opt` fields `optFigureCaptionPosition` and
`optTableCaptionPosition` [API change].
+ Docx writer: make table/figure rendering sensitive to caption
position settings.
+ OpenDocument writer: make table/figure rendering sensitive to
caption position settings.
+ Typst writer/template: implement figure caption positions by
triggering a show rule in the default template, which determines caption
positions for figures and tables globally.
+ LaTeX writer: make table/figure rendering sensitive to caption
position settings. Closes #5116.
+ HTML writer/template: make `<figcaption>` placement sensitive to caption
position settings. For tables, `<caption>` must be the first element,
and positioning is determined by CSS, for here we set a variable
which the default template is sensitive to.
|
|
We were checking for these, and that caused problems if the math
began with `[`.
Closes #10160.
|
|
We look for the `pib` property and parse image data inside its value.
Closes #10145.
|
|
`@` style citations with suffixes.
Closes #10148.
|
|
Closes #4746.
|