Commit graph

14178 commits

Author SHA1 Message Date
John MacFarlane
735a69de6b Allow --resource-path to accumulate.
Previously, if `--resource-path` were used multiple times, the last
resource path would replace the others.

With this change, each time `--resource-path` is used, it prepends
the specified path components to the existing resource path.

Similarly, when `resource-path` is specified in a defaults file,
the paths provided will be prepended to the existing resource
path.

This change also allows one to avoid using the OS-specific path
separator; instead, one can simply use `--resource-path`
a number of times with single paths. This form of command
will not have an OS-dependent behavior.

This change facilitates the use of multiple, small defaults
files: each can specify a directory containing its own
resources without clobbering the resource paths set by
the others.

Closes #6152.
2021-03-06 10:32:51 -08:00
John MacFarlane
26524246d0 Fix docker image. 2021-03-06 09:50:31 -08:00
John MacFarlane
ce7706d75b More Makefile tweaks around docker linux build. 2021-03-05 23:59:50 -08:00
John MacFarlane
70f9709455 Makefile: choose linux docker image depending on arch. 2021-03-05 23:32:03 -08:00
John MacFarlane
9837444330 Makefile: exit smoothly if no prior benchmark files found. 2021-03-05 21:11:35 -08:00
John MacFarlane
5c4eb7246b Makefile: debpkg: use new multi-arch GHC 8.10.4 docker...
...created by Olivier Benz.  This should allow us to
build on arm architecture.
2021-03-05 19:11:12 -08:00
John MacFarlane
df00cf05cb Allow ${.} in defaults files paths...
to refer to the directory where the default file is.
This will make it possible to create moveable
"packages" of resources in a directory.

Closes #5871.
2021-03-05 11:56:41 -08:00
John MacFarlane
6dd7520cc4 Implement environment variable interpolation in defaults files.
This allows the syntax `${HOME}` to be used, in fields that expect
file paths only.  Any environment variable may be interpolated
in this way. A warning will be raised for undefined variables.
The special variable `USERDATA` is automatically set to the
user data directory in force when the defaults file is parsed.
(Note: it may be different from the eventual user data directory,
if the defaults file or further command line options change that.)

Closes #5982.
Closes #5977.
Closes #6108 (path not taken).
2021-03-05 10:46:01 -08:00
John MacFarlane
a832469006 Add fields for CSL optinos to Opt.
* Add `optCSL`, `optBibliography`, `optCitationAbbreviations` to
  `Opt` [API change].
* Move `addMeta` from T.P.App.Opt to T.P.App.CommandLineOptions.
2021-03-05 10:42:33 -08:00
John MacFarlane
ccc530c588 Logging: Add EnvironmentVariableUndefined constructor to LogMessage.
[API change]
2021-03-05 10:28:46 -08:00
John MacFarlane
5f9327cfc8 Shared: Change defaultUserDataDirs -> defaultUserDataDir.
Rationale: the manual says that the XDG data directory will
be used if it exists, otherwise the legacy data directory.
So we should just determine this and use this directory,
rather than having a search path which could cause some
things to be taken from one data directory and others from
others.

[API change]
2021-03-05 10:25:18 -08:00
John MacFarlane
030209fc29 Revert "Revert "Relax --abbreviations rules so that a period isn't required.
This reverts commit 916ce4d511.

I was confused in thinking it wouldn't work.
2021-03-04 16:25:13 -08:00
John MacFarlane
916ce4d511 Revert "Relax --abbreviations rules so that a period isn't required."
This reverts commit e461b7dd45.

Ill-advised change.  This doesn't work because we parse
strings in chunks.
2021-03-04 16:22:08 -08:00
John MacFarlane
e461b7dd45 Relax --abbreviations rules so that a period isn't required.
Partially addresses #7124.
2021-03-04 16:02:46 -08:00
John MacFarlane
46e2b3dc8d Update stack resolver. 2021-03-04 09:00:23 -08:00
John MacFarlane
5d60fcf4d7 Update README.md. 2021-03-04 08:58:28 -08:00
John MacFarlane
ba2793e4fa Update man page. 2021-03-04 08:57:53 -08:00
John MacFarlane
e649b69564 Bump version to 2.12 2021-03-04 08:57:27 -08:00
John MacFarlane
bd988beb38 Update date on manual. 2021-03-04 08:49:45 -08:00
John MacFarlane
349c09b377 Update AUTHORS.md. 2021-03-04 08:48:07 -08:00
John MacFarlane
00f5a07789 Update changelog 2021-03-04 08:44:58 -08:00
John MacFarlane
92ea8a0cb6 Revert "Add T.P.Readers.LaTeX.Include."
This reverts commit b569b0226d.

Memory usage improvement in compilation wasn't very significant.
2021-03-03 19:07:16 -08:00
John MacFarlane
b569b0226d Add T.P.Readers.LaTeX.Include. 2021-03-03 18:47:17 -08:00
John MacFarlane
33e4c8dd6c Remove T.P.Readers.LaTeX.Accent.
Incorporate accentCommands into T.P.Readers.LaTeX.Inline.
2021-03-03 18:21:32 -08:00
John MacFarlane
da5e9e5956 Move enquote commands to T.P.LaTeX.Lang. 2021-03-03 11:22:42 -08:00
John MacFarlane
044bc44fc6 Moved more into T.P.Readers.LaTeX.Lang. 2021-03-03 11:08:02 -08:00
John MacFarlane
bbcc1501a5 Split out T.P.Readers.LaTeX.Inline. 2021-03-03 10:34:10 -08:00
John MacFarlane
e8e5ffe1f4 Split out T.P.Writers.LaTeX.Util. 2021-03-02 22:40:45 -08:00
John MacFarlane
fe483c653b Split out T.P.Writers.LaTeX.Citation. 2021-03-02 21:57:37 -08:00
John MacFarlane
827ecdd2de Split out T.P.Writers.LaTeX.Lang. 2021-03-02 21:33:58 -08:00
John MacFarlane
2097411e4f Split up T.P.Writers.Markdown...
with T.P.Writers.Markdown.Types and T.P.Writers.Markdown.Inline.
The module was difficult to compile on low-memory system.s
2021-03-02 21:08:13 -08:00
John MacFarlane
50e6d3ed23 Add doc/libraries.md.
A description of libraries that support pandoc.
2021-03-02 17:44:19 -08:00
John MacFarlane
b251df0c6e stack.yaml - use citeproc 0.3.0.8 2021-03-02 17:09:35 -08:00
John MacFarlane
95b1327f6b Update changelog. 2021-03-02 14:23:02 -08:00
John MacFarlane
af9f6c00aa MacOS release build: remove -split-sections.
It doesn't seem to affect executable size at all.
2021-03-02 10:06:30 -08:00
John MacFarlane
139376bbfb trypandoc: remove unneeded imports. 2021-03-02 10:03:52 -08:00
John MacFarlane
595d2e25ea cabal.project: don't explicitly set -trypandoc.
If we do, this can't be overridden on the command line.
2021-03-02 10:03:52 -08:00
John MacFarlane
651b241533 Avoid split-sections for Windows rc.
We get an error "too many sections."

Maybe a bug in stack?
https://stackoverflow.com/questions/64287505/ld-too-many-sections-90295
2021-03-02 10:01:52 -08:00
John MacFarlane
26c496d936 Use -split-sections in creating release binary.
This is supposed to reduce executable size.
2021-03-01 10:06:10 -08:00
John MacFarlane
7f1b933aaa Make T.P.Readers.LaTeX.Types an unexported module.
[API change]

This is really an implementation detail that shouldn't be
exposed in the public API.
2021-03-01 09:46:43 -08:00
John MacFarlane
382f0e23d2 Factor out T.P.Readers.LaTeX.Macro. 2021-03-01 09:46:43 -08:00
Albert Krewinkel
e1454fe0d0
Jira writer: use Span identifiers as anchors
Closes: tarleb/jira-wiki-markup#3.
2021-03-01 14:36:11 +01:00
John MacFarlane
3793ed8beb Removed unnecessary pragmas. 2021-02-28 23:43:55 -08:00
John MacFarlane
6a6291d9e3 Change T.P.Readers.LaTeX.SIunitx to export a command map...
instead of individual commands.
2021-02-28 23:05:35 -08:00
John MacFarlane
12b47656d4 Remove superfluous imports. 2021-02-28 22:57:36 -08:00
John MacFarlane
7e38b8e55a T.P.Readers.LaTeX: Don't export tokenize, untokenize.
[API change]

These were only exported for testing, which seems the
wrong thing to do.  They don't belong in the public
API and are not really usable as they are, without access
to the Tok type which is not exported.

Removed the tokenize/untokenize roundtrip test.

We put a quickcheck property in the comments which
may be used when this code is touched (if it is).
2021-02-28 22:53:42 -08:00
John MacFarlane
2463fbf61d LaTeX writer: use function instead of map for accent lookup. 2021-02-28 21:43:11 -08:00
John MacFarlane
d2bb0c7c8d Factor out T.P.Readers.LaTeX.Math. 2021-02-28 21:05:25 -08:00
John MacFarlane
5537802dc9 Fix CI for older cabal versions.
We add fields to matrix.versions to handle the cabal
command prefix (v2-, new-, nothing) and whether `--test-option`
is supported.
2021-02-28 18:33:04 -08:00
John MacFarlane
dd56822006 CI: don't use --test-option with older cabal versions (< 3). 2021-02-28 16:01:38 -08:00