Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Removed `writerSourceURL` from `WriterOptions` (API change).
Added `stSourceURL` to `CommonState`.
It is set automatically by `setInputFiles`.
Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`.
The type of `getInputFiles` has changed; it now returns `[FilePath]`
instead of `Maybe [FilePath]`.
Functions in Class that formerly took the source URL as a parameter
now have one fewer parameter (`fetchItem`, `downloadOrRead`,
`setMediaResource`, `fillMediaBag`).
Removed `WriterOptions` parameter from `makeSelfContained` in
`SelfContained`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We need this for getDefaultDataFile.
|
|
* readDataFile, readDefaultDataFile, getReferenceDocx,
getReferenceODT have been removed from Shared and
moved into Class. They are now defined in terms of
PandocMonad primitives, rather than being primitve
methods of the class.
* toLang has been moved from BCP47 to Class.
* NoTranslation and CouldNotLoudTranslations have
been added to LogMessage.
* New module, Text.Pandoc.Translations, exporting
Term, Translations, readTranslations.
* New functions in Class: translateTerm, setTranslations.
Note that nothing is loaded from data files until
translateTerm is used; setTranslation just sets the
language to be used.
* Added two translation data files in data/translations.
* LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage`
(polyglossia) and `\figurename`.
|
|
In Text.Pandoc.Class and Text.Pandoc.Template, resp.
We now get the datadir from CommonState.
|
|
* Add stUserDataDir to CommonState.
* Rename stUserDataDir/stCabalDataDir in PureState to
stUserDataFiles/stCabalDataFiles.
|
|
|
|
|
|
|
|
|
|
of directory.
|
|
|
|
|
|
|
|
Previously positions would be reported past the end of the chunk.
We now reset the source position within the chunk and report
positions "in chunk."
|
|
Formerly tracing was just log messages with a DEBUG log
level. We now make these things independent. Tracing
can be turned on or off in PandocMonad using `setTrace`;
it is independent of logging.
* Removed `DEBUG` from `Verbosity`.
* Removed `ParserTrace` from `LogMessage`.
* Added `trace`, `setTrace` to `PandocMonad`.
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|
|
This makes it sensitive to proper verbosity settings.
(It is now treated as INFO rather than WARNING, so one
doesn't get these messages for creation of tmp images
while making a pdf.)
API changes:
* Removed extractMediaBag from Text.Pandoc.MediaBag.
* Added Extracting as constructor for LogMessage.
|
|
|
|
|
|
|
|
This fixes a regression that was introduced when `--extract-media`
was generalized to work with any input format. We were getting
two versions of each image extracted from a docx, one with a hash,
one with the original filename, though only the hash one was used.
This patch restores the original behavior (using the original
filename).
Pointed out in comments on #3674. Thanks to @laperouse.
|
|
|
|
Also generalized type of fillMedia to any instance of PandocMonad.
|
|
Closes #3646.
|
|
Use this instead of PandocIOError when a resource is not
found in path.
This improves the error message in this case, see #3629.
|
|
|
|
This makes them easier to read.
|
|
PDF writer: Use 'report' instead of 'warn', make it sensitive
to verbosity settings.
|
|
To be used in implementing `\graphicspath` in LaTeX, and possibly
in things like PDF production via context.
Use resource path in fetchItem.
Issue an info message if we get a resource from somewhere other
than ".".
Added UsingResourceFrom to log message.
|
|
|
|
|
|
Verbosity level only affects which are printed to stdout.
(Exception: DEBUG messages are only printed, never saved to
state.)
|
|
|
|
This now contains the Verbosity definition previously
in Options, as well as a new LogMessage datatype that
will eventually be used instead of raw strings for
warnings.
This will enable us, among other things, to provide
machine-readable warnings if desired.
See #3392.
|
|
See #3392.
|
|
This was not actually being used. Since it adds considerable
complexity, it's best not to include it unless we are
actually going to use it.
The original thought was that we could do all loading in the
readers, always deferred and thus costless. This was supposed
to eliminate the need to traverse trees loading resources in
the docx, epub, odt writers and in PDF and SelfContained.
(It would also have the side effect that --extract-media could
be used with all input formats. This wasn't an intended side
effect, and it could be debated whether it's desirable, since
--extract-media was originally designed to extract the media
contained in a docx or odt or epub container.)
However, we never actually took the step of moving all of this
work to the readers, for a couple of reasons. The main reason
is that we'd still need to fetch resources in the docx,
epub, odt, pdf and self-contained writers, since the Pandoc AST might
have been built programatically and hence not generated by a reader.
So it's not clear that doing lazy loading in the readers would have
any real advantage.
I'm still not completely sure about this --- if we change our
minds it would be easy to undo this commit.
@jkr comments welcome.
|
|
* Export readFileFromDirs from Class.
* Export insertIncludedFile from Parsing.
Simplified code in LaTeX/RST readers.
|
|
This can be used in several different modules, not just
LaTeX reader.
|
|
|