Commit graph

924 commits

Author SHA1 Message Date
Mike Pilgrem
d1096abb63 Refactor Reanimate.Povray and OS-specifc POVRay
Further to pull request #225, I realised subsequently that the common code in the two `POVRay.mkPovrayImage'` functions could be returned to module `Reanimate.Povray`, and all that needed to be Windows- or Unix-like-specific was a `runPOVRay` function.

This pull request does that refactoring.
2021-10-17 10:12:28 +08:00
Mike Pilgrem
ceb727e8da
Enable use of POV-Ray for Windows (#225)
This pull request reflects code changes made to be able to use POV-Ray for Windows, Version 3.7.0.msvc10.win64.

The changes have been tested on Windows 10 but not on unix-like operating systems. However, I don't think the code for unix-like operating systems has been affected.

The reason for the changes is explained below.

1. The POV-Ray for Windows executable is named `pvengine64.exe` on 64-bit Windows, not `povray

I've created two modules `POVRay`, specified separately for `windows` and `unix`, that export `povrayApp :: String`, yielding the correct name of the executable. The function is used in place of `"povray"` (eg in `Reanimate.Driver.Check.hasPovray`).

2. Generated file names containing `$` cause problems under PowerShell, due to automatic variables, and file names on Windows are not case sensitive

I've changed the 64-character `alphabet` in `Reanimate.Cache.encodeInt` for a 32-character one which includes only capital letters and digits. This affects both Windows and unix-like operating systems. (An alternative would be versions of `encodeInt` specified differently for `windows` and `unix`.)

3. POV-Ray for Windows requires the special command line option `/EXIT` to return

I've moved `Reanimate.Povray.mkPovrayImage'` to the two modules `POVRay`. In the `windows` version, `/EXIT` is now added to the list of switches passed to the POV-Ray executable.

4. POV-Ray for Windows cannot parse switches enclosed in `""` as switches

The cause of the problem is described in more detail in the comments in the source code of module `POVRay`.

As a work around, in the `windows` version of `mkPovrayImage'`, the POV-Ray command is written to a temporary batch file and it is that batch file which is passed to `runCmd`.

Other matters

In addition to the above, POV-Ray 3.7 includes 'Script I\O Restrictions` which can prevent the writing of files. These need to be disabled in the POV-Ray for Windows GUI (under the Options menu).
2021-10-16 16:20:34 +08:00
Mike Pilgrem
82abb4e434 Add mkColor "none" = FillNone to mkColor
Extending `mkColor :: String -> Texture` to yield `FillNone` for "none" would allow (for example) `withFillColor "none"` to 'turn color off'. For some users, that may be more intuitive and expressive than `withFillOpacity 0.0`.

The Haddock documentation is updated, accordingly.
2021-10-15 11:14:16 +08:00
Mike Pilgrem
ff162b6a33
Add withStrokeOpacity (#222)
Currently, `withFillOpacity` is provided but not the stroke equivalent.

Co-authored-by: David Himmelstrup <lemmih@gmail.com>
2021-10-13 17:16:47 +08:00
David Himmelstrup
a0780c67fc Limit aeson version to <2. 2021-10-13 15:17:08 +08:00
Mike Pilgrem
b36fdb1e1b Update for updated inkscape command line options
The current version of inkscape is 1.1.1. Its command line changed at some point and no longer includes `--without-gui`, `--file` or `--export-png`. See https://inkscape.org/doc/inkscape-man.html.

What was once:
~~~
inkscape --without-gui --file=test.svg --export-png=test.png
~~~

is now:
~~~
inkscape --export-type=png test.svg
~~~
2021-10-09 16:56:55 +08:00
Drew Fenwick
aadf8dcee5
Improve cabal hacking experience (#215)
* Add standard haskell gitignore entries

* Add cradles for using HLS with Cabal

Co-authored-by: David Himmelstrup <lemmih@gmail.com>
2021-09-11 17:43:41 +08:00
dependabot[bot]
5c0eb70584
Bump lodash from 4.17.15 to 4.17.21 in /viewer-elm (#206)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:42:12 +08:00
dependabot[bot]
3aa746f6d4
Bump glob-parent from 5.1.0 to 5.1.2 in /viewer-elm (#207)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.0 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:42:01 +08:00
dependabot[bot]
f3e5abf416
Bump tar from 4.4.13 to 4.4.19 in /viewer-elm (#214)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:41:50 +08:00
dependabot[bot]
2118e05558
Bump JamesIves/github-pages-deploy-action from 3.7.1 to 4.1.5 (#217)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 3.7.1 to 4.1.5.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/3.7.1...4.1.5)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:41:24 +08:00
dependabot[bot]
ae14f3b09f
Bump jorelali/setup-elm from 2 to 3 (#218)
Bumps [jorelali/setup-elm](https://github.com/jorelali/setup-elm) from 2 to 3.
- [Release notes](https://github.com/jorelali/setup-elm/releases)
- [Commits](https://github.com/jorelali/setup-elm/compare/v2...v3)

---
updated-dependencies:
- dependency-name: jorelali/setup-elm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:41:00 +08:00
dependabot[bot]
a7e8751784
Bump actions/setup-node from 1 to 2.4.0 (#219)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 2.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:40:48 +08:00
David Himmelstrup
df0f8e591b
Disable building against stackage nightly. (#216)
* Disable nightly build because github no longer accepts comments from forks.

* Disable azure nightly builds.

* Use stack-18 by default.
2021-09-11 13:34:52 +08:00
dependabot-preview[bot]
0f24e76ade
Upgrade to GitHub-native Dependabot (#204)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-09-11 12:59:14 +08:00
David Himmelstrup
1232618b15 Fix cert renewal for web.rgeometry.org 2021-08-11 11:04:02 +08:00
David Himmelstrup
8e2b32ba7a Fix doc references. 2021-07-04 23:23:46 +08:00
David Himmelstrup
67b875246d Update documentation links. 2021-07-04 00:25:17 +08:00
David Himmelstrup
cc6a599334 Support the rgeometry backend. 2021-07-03 22:51:01 +08:00
David Himmelstrup
5ea023980f Bump version to 1.1.4.0 v1.1.4.0 2021-03-11 16:21:48 +08:00
David Himmelstrup
5cc9de1acb Update ChangeLog.md 2021-03-11 16:21:33 +08:00
David Himmelstrup
8f36b657b9 Update getting-started section of docs. 2021-03-11 16:18:54 +08:00
Nick Bathum
df8e63e9b6 Typo: text is left-aligned. 2021-03-11 14:59:16 +08:00
David Himmelstrup
7887fef434
Update stack lts version. (#200)
* Use newest reanimate-svg.

* Use lts-16 for docker.
2021-03-11 13:08:14 +08:00
David Himmelstrup
9d9544df7d
Improve README and error handling when encountering cabal bug. (#201) 2021-03-11 13:07:34 +08:00
David Himmelstrup
3a8dc6c769
Use warnings instead of errors for stackage nightly tests. (#202) 2021-03-11 13:06:58 +08:00
David Himmelstrup
0e580e0fdf
Use newest reanimate-svg. (#197) 2021-02-20 18:46:26 +08:00
David Himmelstrup
f4878053b1 reanimateLiveEntry should recurse.
This fixes issue #195.
2021-02-09 20:47:52 +08:00
David Himmelstrup
33056d4372 Update test suite. 2021-02-06 18:44:58 +08:00
kunberg
f75196825b
Change mkRect definition
So that the RectangleNode does not get wrapped in an unnecessary GroupNode.
2021-01-17 08:39:42 +01:00
David Himmelstrup
d321b17818 Fix cabal file. 2021-01-14 16:23:17 +08:00
David Himmelstrup
4e79d3da1e Bump version to 1.1.3.2 v1.1.3.2 2021-01-14 16:20:29 +08:00
David Himmelstrup
091f065e36
Create flag for toggling hgeometry dependency. (#192) 2021-01-14 16:17:21 +08:00
David Himmelstrup
5795a59d44 Fix discord docker build. 2021-01-04 21:37:13 +08:00
David Himmelstrup
62666f0a24 Bump to 1.1.3.1 v1.1.3.1 2021-01-04 16:40:20 +08:00
David Himmelstrup
4187a6562e Update Changelog. 2021-01-04 16:40:02 +08:00
David Himmelstrup
7003c13bac Fix TCP windows issue, fix Firefox on windows. 2021-01-04 16:33:57 +08:00
David Himmelstrup
f320f5cfdf Fix docker build. 2021-01-04 15:07:40 +08:00
David Himmelstrup
300178d101 Bump version to 1.1.3.0 v1.1.3.0 2021-01-04 14:35:42 +08:00
David Himmelstrup
717808f3dc Update documentation. 2021-01-04 14:35:33 +08:00
David Himmelstrup
fb4bdf73ed Clean-up and documentation. 2021-01-04 13:54:21 +08:00
David Himmelstrup
16fd952c9a
Rework live reloading. (#191) 2021-01-04 13:17:34 +08:00
David Himmelstrup
1181e0f802 Bump deployment script version. 2020-12-14 12:05:20 +08:00
David Himmelstrup
acbaefd723 Increase shared storage between playground and discord-bot images. 2020-12-04 19:20:23 +08:00
Xie Ruifeng
ccc69c0d83 add an example for using mathChunks with non-trivial Traversable 2020-11-10 08:36:51 +08:00
Xie Ruifeng
828b033504 add mathChunks/latexCfgChunksTrans 2020-11-10 08:36:51 +08:00
Xie Ruifeng
aed68fe34a export latexCfgChunks 2020-11-10 08:36:51 +08:00
Xie Ruifeng
81bf85bea8 LaTeX: extend latex[Cfg]Chunks to use Traversable 2020-11-10 08:36:51 +08:00
lemmih
47dcf6471c Correct documentation for 'parDropA'. 2020-10-30 20:19:42 +08:00
David Himmelstrup
fce34e92b2 Simplify base docker image. 2020-10-28 17:03:09 +08:00