| Age | Commit message (Collapse) | Author |
|
`foldl'` is exported by Prelude by base 4.20+. So we need to do
some qualified importing to avoid warnings about redundant imports.
|
|
These are just unmarked code blocks.
Closes #11339.
|
|
The reader tries to parse the rest of the opening line of a block, e.g.,
`#+begin_myblock …`, as a parameters list. It first assumes that the parameters
are in lisp-style (`:key value`), then alternatively tries to read python-style
key-value pairs (`key=value`) and falls back to reading the entire remaining
line as a single `parameter` attribute.
This method is also applied to dynamic blocks.
Closes: #11188
|
|
|
|
Sub- and superscript must be preceded by a string in Org mode. Some text
preceded by space or at the start of a paragraph was previously parsed
incorrectly as sub- or superscript.
|
|
Closes: #4287
|
|
Fixes: #8869
|
|
Org mode makes a distinction between smart parsing of quotes, and smart
parsing of special strings like `...`. The finer grained control over
these features is necessary to truthfully reproduce Emacs Org mode
behavior. Special strings are enabled by default, while smart quotes are
disabled.
The behavior of `special_string` is brought closer to the reference
implementation in that `\-` is now treated as a soft hyphen.
|
|
Handle global prefix and suffix properly.
Use all and only the styles mentioned in oc-basic.el.
|
|
|
|
(#10990)
|
|
Previously inline TeX was handled in a way that was different
from org's own export, and that could lead to information loss.
This was particularly noticeable for inline math environments
such as `equation`. Previously, an `equation` environment
starting at the beginning of a line would create a raw block,
splitting up the paragraph containing it (see #10836).
On the other hand, an `equation` environment not at the beginning
of a line would be turned into regular inline elements
representing the math. (This would cause the equation number to
go missing and in some cases degrade the math formatting.)
Now, we parse all of these as raw "latex" inlines, which will be
omitted when converting to formats other than LaTeX (and other
formats like pandoc's Markdown that allow raw LaTex).
Closes #10836.
|
|
Convert newlines to spaces as we do in other formats.
Closes #10730.
|
|
AVIF is an image extension. This commit enables the Org reader to recognise
AVIF files as images to be displayed, and not simply links.
|
|
|
|
Tabs are now preserved in the contents of *src* blocks if the the block
has the `-i` flag.
Fixes: #10071
|
|
|
|
|
|
Cloess #9639.
|
|
Closes #9475.
|
|
Closes #9279.
|
|
A purely internal change. We will use this both in inline
and block parsing.
|
|
|
|
...unless the `fancy_lists` extension is enabled.
Closes #9042.
|
|
Signed-off-by: Amneesh Singh <[email protected]>
|
|
See the regexp at https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-element.el?h=d1e4b9351941aa9241ab3aa0a34256376b7eca94#n2420.
|
|
Closes: #8578
|
|
|
|
Allow the character U+200B to be used as an escape character as described
in the Org-mode documentation https://orgmode.org/manual/Escape-Character.html
Closes issue #8716.
|
|
Fixes: #8659
|
|
Thanks and credit go to Aner Lucero, who laid the groundwork for this
feature in the 2021 GSoC project. He contributed many changes, including
modifications to the readers for HTML, JATS, and LaTeX, and to the HTML
and JATS writers.
Shared (Albert Krewinkel):
- The new function `figureDiv`, exported from `Text.Pandoc.Shared`,
offers a standardized way to convert a figure into a Div element.
Readers (Aner Lucero):
- HTML reader: `<figure>` elements are parsed as figures, with the
caption taken from the respective `<figcaption>` elements.
- JATS reader: The `<fig>` and `<caption>` elements are parsed into
figure elements, even if the contents is more complex.
- LaTeX reader: support for figures with non-image contents and for
subfigures.
- Markdown reader: paragraphs containing just an image are treated as
figures if the `implicit_figures` extension is enabled. The identifier
is used as the figure's identifier and the image description is also
used as figure caption; all other attributes are treated as belonging
to the image.
Writers (Aner Lucero, Albert Krewinkel):
- DokuWiki, Haddock, Jira, Man, MediaWiki, Ms, Muse, PPTX, RTF, TEI,
ZimWiki writers: Figures are rendered like Div elements.
- Asciidoc writer: The figure contents is unwrapped; each image in the
the figure becomes a separate figure.
- Classic custom writers: Figures are passed to the global function
`Figure(caption, contents, attr)`, where `caption` and `contents` are
strings and `attr` is a table of key-value pairs.
- ConTeXt writer: Figures are wrapped in a "placefigure" environment
with `\startplacefigure`/`\endplacefigure`, adding the features
caption and listing title as properties. Subfigures are place in a
single row with the `\startfloatcombination` environment.
- DocBook writer: Uses `mediaobject` elements, unless the figure contains
subfigures or tables, in which case the figure content is unwrapped.
- Docx writer: figures with multiple content blocks are rendered as
tables with style `FigureTable`; like before, single-image figures are
still output as paragraphs with style `Figure` or `Captioned Figure`,
depending on whether a caption is attached.
- DokuWiki writer: Caption and "alt-text" are no longer combined. The
alt text of a figure will now be lost in the conversion.
- FB2 writer: The figure caption is added as alt text to the images in
the figure; pre-existing alt texts are kept.
- ICML writer: Only single-image figures are supported. The contents of
figures with additional elements gets unwrapped.
- HTML writer: the alt text is no longer constructed from the caption,
as was the case with implicit figures. This reduces duplication, but
comes at the risk of images that are missing alt texts. Authors should
take care to provide alt texts for all images.
Some readers, most notably the Markdown reader with the
`implicit_figures` extension, add a caption that's identical to the
image description. The writer checks for this and adds an
`aria-hidden` attribute to the `<figcaption>` element in that case.
- JATS writer: The `<fig>` and `<caption>` elements are used write
figures.
- LaTeX writer: complex figures, e.g. with non-image contents and
subfigures, are supported. The `subfigure` template variable is set if
the document contains subfigures, triggering the conditional loading
of the *subcaption* package. Contants of figures that contain tables
are become unwrapped, as longtable environments are not allowed within
figures.
- Markdown writer: figures are output as implicit figures if possible,
via HTML if the `raw_html` extension is enabled, and as Div elements
otherwise.
- OpenDocument writer: A separate paragraph is generated for each block
element in a figure, each with style `FigureWithCaption`. Behavior for
single-image figures therefore remains unchanged.
- Org writer: Only the first element in a figure is given a caption;
additional block elements in the figure are appended without any
caption being added.
- RST writer: Single-image figures are supported as before; the contents
of more complex images become nested in a container of type `float`.
- Texinfo writer: Figures are rendered as float with type `figure`.
- Textile writer: Figures are rendered with the help of HTML elements.
- XWiki: Figures are placed in a group.
Co-authored-by: Aner Lucero <[email protected]>
|
|
|
|
`characterReference` now returns a Text (as it should, because some
named references don't correspond to a single Char), and uses
the `lookupEntity` function from commonmark-hs instead of the slow
one from tagsoup.
`charsInBalanced` now takes a Text parser rather than a Char parser
as argument.
[API change]
|
|
|
|
We were exporting Parser, ParserT as synonyms of Parsec, ParsecT.
There is no good reason for this and it can cause confusion.
Also, when possible, we replace imports of Text.Parsec with
T.P.Parsing. The idea is to make it easier, at some point,
to switch to megaparsec or another parsing engine if we want to.
T.P.Parsing new exports: Stream(..), updatePosString, SourceName,
Parsec, ParsecT [API change].
Removed exports: Parser, ParserT [API change].
|
|
So far, `orgStateLastPreCharPos` wasn't updated appropriately after each
parsing to native Str (by the parser `str`). In addition to solving
this, the guard `notAfterString` in `emphasisStart` is removed to allow
emphasis after Str at the first place.
|
|
|
|
This is still an unexported internal module.
Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`.
Re-export `escapeURI` and `isURI` from T.P.Shared (as they
were exported before); drop exports of `schemes` and `uriPathToPath`
[API change].
With this change, T.P.Class no longer depends on T.P.Shared.
|
|
Closes #8302.
|
|
This improves support for notebook-like org files that are intended to be used
with emacs-jupyter package.
Closes: #8236
|
|
A block of type "abstract" is assumed to define the document's abstract.
It is transferred from the main text to the metadata.
Closes: #8204
|
|
|
|
Fixes: #8201
|
|
* Add tests for zero-width and fullwidth chars in grid tables
* T.P.Parsing: simplify `gridTableWith'`, `gridTableWith` [API Change]
The functions `gridTableWith` and `gridTableWith'` no longer takes a
boolean argument that toggles whether a table head should be parsed:
both, tables with heads and without heads, are always accepted now.
* Support colspans, rowspans, and multirow headers in grid tables.
Grid tables in Markdown, reStructuredText, and Org can now contain cells
spanning over multiple columns and/or multiple rows; table headers
containing multiple rows are supported as well.
Note: the markdown writer does not yet support these more complex grid
table features.
|
|
|
|
|
|
|
|
Tables with attributes are no longer wrapped in Div elements;
attributes are added directly to the table element.
|
|
|
|
|