Commit Graph

511 Commits (21d7fbdbeab008eeb7db2904c8a2a95ce5f452fc)

Author SHA1 Message Date
Shuhei Kadowaki 0bdab33630 Merge branch 'master' into texexports 2020-06-01 22:45:32 +09:00
Shuhei Kadowaki 55d2c975cd set rendering options with dispatch:
- remove unused field defs
- in theory extensible, once documented
- fix test
- start to change terminology, `format` -> `render`
2020-06-01 22:36:48 +09:00
Shuhei Kadowaki ae0dc70ffa refactoring:
- reorder/move things so that format-specific rendering methods are 
defined close to the format
- separate common rendering methods from format specific methods
- fix using location
2020-06-01 21:32:18 +09:00
Jonas Isensee 543f99a915 rename files and include location + move texify 2020-05-31 18:04:40 +02:00
Jonas Isensee b5477d27ff revert improvements to tex rendering 2020-05-31 17:33:11 +02:00
Jonas Isensee 9875bc10f7 pass fewer arguments and bugfixes 2020-05-31 13:26:27 +02:00
Jonas Isensee 45adb8992f some cleanup 2020-05-31 12:07:26 +02:00
Jonas Isensee 3eba5de7f4 make `texminted` output valid texfile 2020-05-31 11:48:37 +02:00
Jonas Isensee 62d56846f4 fix lots of things I missed before 2020-05-31 09:49:20 +02:00
Jonas Isensee 770496b3af remove format dict - make everything a field of format <: WeaveFormat directly 2020-05-31 09:29:26 +02:00
Jonas Isensee 6e99822905 removing duplicate code 2020-05-30 18:02:49 +02:00
Jonas Isensee 119b3332aa move around code into separate files 2020-05-30 17:49:20 +02:00
Shuhei Kadowaki db89118b4c fix typing and improve `@define_format` 2020-05-30 22:46:20 +09:00
Shuhei Kadowaki e7637de643 Merge branch 'master' into texexports 2020-05-30 22:22:10 +09:00
Shuhei Kadowaki e0e9ae8753 respect specied `fig_path`
- closes #358
2020-05-30 22:14:50 +09:00
Shuhei Kadowaki 788f926067 move description field into `formatdict` 2020-05-30 21:16:03 +09:00
Fredrik Bagge Carlson c87782f451
[RFC] Do not define Markdown.latex using eval
This PR solves #356 at the expense of a warning:
```
WARNING: Method definition latex(IO, Markdown.LaTeX) in module Markdown at /home/fredrikb/julia/usr/share/julia/stdlib/v1.5/Markdown/src/IPython/IPython.jl:28 overwritten in module WeaveMarkdown at /home/fredrikb/.julia/dev/Weave/src/WeaveMarkdown/markdown.jl:10.
  ** incremental compilation may be fatally broken for this module **
```
2020-05-27 13:04:51 +02:00
Shuhei Kadowaki 96de887308 basic assertion 2020-05-26 10:44:30 +09:00
Shuhei Kadowaki aa63b20e7c remove unncessary :doctype field 2020-05-25 22:39:59 +09:00
Shuhei Kadowaki cc936f5377 refactor formatters.jl 2020-05-25 22:39:37 +09:00
Shuhei Kadowaki f4ed10b625 define render_doc and dispatch on it with different formats
- and load minted package for TexMinted format

Co-Authored-By: null <JonasIsensee@users.noreply.github.com>
2020-05-25 20:29:57 +09:00
Shuhei Kadowaki 2fdd09b585 introduce WeaveFormat abstract type
well, we can do much more things using this, but this commit just 
introduces this type

Co-Authored-By: null <JonasIsensee@users.noreply.github.com>
2020-05-25 20:29:57 +09:00
Jonas Isensee e20042848d introduce common supertype for JMarkdown2tex and Tex 2020-05-25 20:29:57 +09:00
Shuhei Kadowaki 84e91104d5 maybe fix type errors 2020-05-25 11:44:09 +09:00
Shuhei Kadowaki 44ed8788d5 LTS compat ... 2020-05-25 11:44:09 +09:00
Shuhei Kadowaki b0db8b991c allow RMarkdown style chunk option passing:
e.g.:
- `julia, k1 = v1`
- `{julia, k1 = v1}`
- `julia k1 = v1`
2020-05-25 11:44:09 +09:00
Shuhei Kadowaki dd0c51b6e5 improve type definition of CodeChunk 2020-05-25 11:44:09 +09:00
Shuhei Kadowaki 976d822f58 refactor /reader/ 2020-05-24 22:54:58 +09:00
Shuhei Kadowaki eca4ed2559 handle codeunits gracefully in inline chunks 2020-05-24 18:17:58 +09:00
Shuhei Kadowaki 0fc915b748 use same logic 2020-05-24 17:06:31 +09:00
Shuhei Kadowaki 39d3d8d91c fix no highlight style error on pandoc2(html|pdf) output 2020-05-24 16:18:58 +09:00
Shuhei Kadowaki 0bc0d3b510 more consistent templates names, move stylesheets into ./stylesheets 2020-05-24 14:16:37 +09:00
Shuhei Kadowaki 48adeff932 serious fix 2020-05-24 03:38:32 +09:00
Shuhei Kadowaki a7de8f5f58 minor fix 2020-05-24 03:17:24 +09:00
Shuhei Kadowaki 60fc450c88
Merge pull request #341 from JunoLab/avi/preprefactor
pre #338
2020-05-24 03:14:11 +09:00
Shuhei Kadowaki 1fb40645ed refactors: almost just about code styles, doesn't change any behaviour 2020-05-24 02:36:32 +09:00
Shuhei Kadowaki 9ca328f468 add TODO 2020-05-23 23:50:28 +09:00
Shuhei Kadowaki d84504267b addspaces -> addlines 2020-05-23 23:49:29 +09:00
Shuhei Kadowaki 29ff436a00 consistent and clearer terminology:
- formatted -> body/rendered
- wdate -> weave_date
- wsource (or source) -> weave_source
- wdate -> weave_date
2020-05-23 23:05:36 +09:00
Shuhei Kadowaki f4caba1561 maxlog for deprecation warning 2020-05-23 22:51:17 +09:00
Shuhei Kadowaki 3c76b804dc separate format logic from WeaveDoc:
- this is just a first step, though
2020-05-23 22:16:56 +09:00
Shuhei Kadowaki f71a491847 rm unused stuff 2020-05-23 22:04:01 +09:00
Shuhei Kadowaki af45cc01ab even more clean up 2020-05-23 22:03:40 +09:00
Shuhei Kadowaki 31f670b74c
Merge pull request #339 from JunoLab/avi/pandoc
refactor pandoc code:
2020-05-23 21:59:42 +09:00
Shuhei Kadowaki 0f94c7b49c fix case when `weave_options` are empty 2020-05-23 21:18:16 +09:00
Shuhei Kadowaki 54ccd9b1ed refactor pandoc code:
- more sensible err handling
- annotate TODO comments
2020-05-23 21:15:05 +09:00
Shuhei Kadowaki 3f4ba672b3 Revert "rm unused dict push!"
This reverts commit ef295e9a24.
2020-05-23 20:07:59 +09:00
Shuhei Kadowaki 745abe176c Revert "rm unused field from WeaveDoc"
This reverts commit 301f9b2f27.
2020-05-23 20:07:41 +09:00
Shuhei Kadowaki 301f9b2f27 rm unused field from WeaveDoc 2020-05-23 20:03:38 +09:00
Shuhei Kadowaki ef295e9a24 rm unused dict push! 2020-05-23 19:52:00 +09:00
Shuhei Kadowaki a03a1d4c34 EXAMPLE_FOLDER 2020-05-23 19:42:19 +09:00
Shuhei Kadowaki 8aa8f0c4df easy doc access 2020-05-18 22:59:18 +09:00
Shuhei Kadowaki b4c2bbea45 deprecate `options`, change to `weave_options`:
- avoid unexpected header stripping (`options` sounds too general)
- deprecated `options` support will be remove within ≥v0.11
2020-05-18 22:10:26 +09:00
Shuhei Kadowaki 4113402908 rename `latex_keep_unicode` to `keep_unicode`, handle this in `format` 2020-05-17 12:17:24 +09:00
Shuhei Kadowaki 249c94a5c1 avoid manipulation of global struct 2020-05-17 12:14:30 +09:00
Shuhei Kadowaki 101b170ea6 some support for dynamic YAML `weave` configuration 2020-05-17 11:45:39 +09:00
Shuhei Kadowaki 6d1732247a a bit refactor 2020-05-17 11:10:25 +09:00
Shuhei Kadowaki b7233b468e no `term` option for inline code chunk 2020-05-17 11:05:30 +09:00
Shuhei Kadowaki 405deb3681 reorder things 2020-05-17 10:30:33 +09:00
Shuhei Kadowaki 87ba87d2d1 resolve CSS theme path relative to a target document when given in YAML 2020-05-17 10:29:01 +09:00
Shuhei Kadowaki cec388e94f add Weave version 2020-05-17 01:16:59 +09:00
Shuhei Kadowaki 0831144393
Merge pull request #311 from JunoLab/avi/limitdisplay
limit display:
2020-05-17 00:18:12 +09:00
Shuhei Kadowaki e60f066d31 fix when a header value is not `String` 2020-05-16 23:45:41 +09:00
Shuhei Kadowaki f86f5a7bd0 preserve header when weaving to Hugo markdown 2020-05-16 23:31:27 +09:00
Shuhei Kadowaki 5fb3fae741 no ANSI chars 2020-05-16 23:11:05 +09:00
Shuhei Kadowaki 7b53eb8e9e limit display:
- for now if we try to render a "big object" like a table with many 
rows, Weave tries to render all of the result and it can lead to that a 
document can't even be opened
2020-05-16 23:11:05 +09:00
Shuhei Kadowaki 58bc741b7f detect doctype when running a doc 2020-05-16 23:10:44 +09:00
Shuhei Kadowaki bca3ee7dd1 LTS compat ... 2020-05-16 21:04:58 +09:00
Shuhei Kadowaki ba8e9f4724 fix header handling in noweb doc 2020-05-16 20:33:48 +09:00
Shuhei Kadowaki 99a50ad86f integrate with Juno progress bar 2020-05-16 19:52:56 +09:00
Shuhei Kadowaki 2a6ee38850 fix code chunk line numbers 2020-05-16 19:52:24 +09:00
Shuhei Kadowaki c1cf566c53 refactor format.jl 2020-05-16 17:59:17 +09:00
Shuhei Kadowaki 0d3d3a8c19 rm code ... 2020-05-16 17:59:04 +09:00
Shuhei Kadowaki 6d91ab6512 no explicit header support in `convert_doc` 2020-05-16 17:53:46 +09:00
Shuhei Kadowaki 17c2151d86 a bit refactor:
- don't match slide `---` separator as header start/end
- recognize `doctype` in construction
2020-05-16 01:49:30 +09:00
Shuhei Kadowaki 492d1f330b dynamic YAML option specification 2020-05-16 01:47:52 +09:00
Shuhei Kadowaki 42115e7d52 rename writer.jl -> converter.jl 2020-05-16 00:43:33 +09:00
Shuhei Kadowaki 094ebea6cf simplify converter functions 2020-05-16 00:32:28 +09:00
Shuhei Kadowaki 7c2eb23bcd small refactors (mostly about code styles) 2020-05-16 00:32:09 +09:00
Shuhei Kadowaki bc0f687352 rm header_args 2020-05-10 15:55:37 +09:00
Shuhei Kadowaki 2e19930565
Merge pull request #323 from JunoLab/avi/bang
use bangs for destructive functions
2020-05-10 14:28:40 +09:00
Shuhei Kadowaki 54e50a54cb users should load Cairo 2020-05-10 14:07:55 +09:00
Shuhei Kadowaki d809ddf703
Merge pull request #322 from JunoLab/avi/require
don't load Weave Plots submodules into user's module
2020-05-10 14:06:09 +09:00
Shuhei Kadowaki e459bfb87d use bangs for destructive functions 2020-05-10 13:56:09 +09:00
Shuhei Kadowaki ede31bcf74 don't load Weave Plots submodules into user's module 2020-05-10 13:35:54 +09:00
Shuhei Kadowaki e89d5da250 rm unncessary `Symbol` spec:
- change `informat` and `doctype` options to 
`Union{NothingAbstractString}`
2020-05-10 13:20:44 +09:00
Shuhei Kadowaki 4b6fc2d913 fix typings 2020-05-10 00:01:49 +09:00
Shuhei Kadowaki c825076e36 simplify imports 2020-05-10 00:01:41 +09:00
Shuhei Kadowaki 68f72bdfb3 small updates 2020-05-09 23:55:11 +09:00
Shuhei Kadowaki 4dae2a0816 `WEAVE_OPTION_NAME` 2020-05-09 22:42:05 +09:00
Shuhei Kadowaki 36bdd4f82b remove weird default constructor for `WeaveDoc` 2020-05-09 22:33:58 +09:00
Shuhei Kadowaki 5f7cf529b9 chunks.jl -> types.jl 2020-05-09 21:03:00 +09:00
Shuhei Kadowaki 750b7624e0 refactor readers.jl:
- avoid unnecessary overloading on `parse_doc`
- split readers.jl into multiple scripts
2020-05-09 20:17:53 +09:00
Shuhei Kadowaki 79579053f1 refactor tests:
- simpler module evaluation test
- remove useless include_weave test
2020-05-09 17:27:51 +09:00
Shuhei Kadowaki d4413a1d78 clear sandbox module correctly 2020-05-09 16:09:11 +09:00
Shuhei Kadowaki 5dbe54316b isnothing utility 2020-05-09 11:26:32 +09:00
Shuhei Kadowaki e41202d3ff no weird Base.run overload 2020-05-09 11:25:19 +09:00
Shuhei Kadowaki 14e7635458 getvalue -> get 2020-05-09 11:25:19 +09:00
Shuhei Kadowaki 4e7fda212d ensure Weave display pops out even if an internal err occurs 2020-05-09 02:48:56 +09:00
Shuhei Kadowaki 2376a9dae9 format things 2020-05-08 23:39:17 +09:00