Elisabeth Henry
d3aa198619
Fix JSON-LD template
2017-07-11 03:07:16 +02:00
Elisabeth Henry
70e61bb42e
See Softbreaks as spaces in text_view
2017-07-11 03:03:20 +02:00
Elisabeth Henry
06caeaffb2
Add JSON-LD structured data to HTML files
2017-07-11 03:02:36 +02:00
Elisabeth Henry
bd0581e622
Merge branch 'master' of github.com:lise-henry/crowbook
2017-07-11 02:43:59 +02:00
Elisabeth Henry
db1a1d9a02
Fix compilation error
2017-07-11 02:41:07 +02:00
Elisabeth Henry
a4e2ba7acc
Add false to has_metadata when metadata is empty stringt
2017-07-11 02:36:36 +02:00
Elisabeth Henry
ad0a205311
Add false to has_metadata when metadata is not present
2017-07-11 02:35:48 +02:00
lise
90a17bfd69
Replace println by proper call to Logger
2017-07-08 20:13:51 +02:00
Elisabeth Henry
be114371ff
Remove snake case warning for structs mimicking the json value
2017-07-07 22:18:50 +02:00
Elisabeth Henry
c3ded497a9
Add support for grammalecte
2017-07-07 22:05:06 +02:00
Elisabeth Henry
1d7a53fb71
Make GrammarError and GrammarCheck not public
2017-07-07 21:21:41 +02:00
Elisabeth Henry
48d8041995
Fix latex rendering of part
2017-06-11 10:46:43 +02:00
Elisabeth Henry
33ee4b9f42
Add n_visited blocks
2017-06-07 19:11:05 +02:00
Elisabeth Henry
20d9ea7fb3
Add is_container method to token and use it in parser
2017-06-05 17:42:19 +02:00
Elisabeth Henry
abd4efee31
Fix a bug in superscript/subscript in code blocks
2017-06-05 17:15:32 +02:00
Elisabeth Henry
0d4da66231
Fix superscript tests
2017-06-05 16:53:42 +02:00
Elisabeth Henry
d1b44c3539
Add crowbook.markdown.superscript option
2017-06-05 16:45:57 +02:00
Elisabeth Henry
7e68d93c1d
Make text_view.rs compilation unconditional as it is required by other files
2017-06-05 15:06:51 +02:00
Elisabeth Henry
9b1bf43183
Add template syntax inside markdown inside javascript
2017-06-05 10:43:55 +02:00
Elisabeth Henry
e656187b45
Make html.if.new_game specify a file instead of being inline
2017-06-05 03:49:29 +02:00
Elisabeth Henry
ca4685f5ec
Add html.if.end_turn
2017-06-05 03:38:59 +02:00
Elisabeth Henry
9ef7b607e2
Change the way @"..."@ syntax works
2017-06-05 01:42:32 +02:00
Elisabeth Henry
a21c6187cf
Add html.if.new_game and html.if.new_turn options
2017-06-04 06:34:13 +02:00
Elisabeth Henry
165a332959
Make code block in IF generate p container if no markdown code is generated
2017-06-04 06:13:29 +02:00
Elisabeth Henry
aef081f5f3
Add support for Markdown inside javascript element
2017-06-04 05:32:26 +02:00
Elisabeth Henry
d7953815cc
Don't display javascript result if function returned nothing
2017-06-04 04:42:32 +02:00
Elisabeth Henry
c1aeb9c596
Add basic support for embedded JS in interactive fiction
2017-06-04 04:31:39 +02:00
Elisabeth Henry
40505c3c4e
Add interactive fiction html renderer cause why not
2017-06-03 15:16:01 +02:00
Elisabeth Henry
bde1c3e25d
Fix label location in latex output
2017-06-03 04:51:25 +02:00
Elisabeth Henry
e75820e380
Remove lifetime annotation (no longer needed in rustc 1.17.0)
2017-05-02 05:59:43 +02:00
Elisabeth Henry
3ec0872b73
Add support for subtitle in HTML/EPUB
2017-03-28 04:20:59 +02:00
Elisabeth Henry
9142843b4d
Enhance LaTeX titlepage
...
Also add a subtitle option
2017-03-28 03:35:40 +02:00
Elisabeth Henry
62e6a52822
Allow break after ':' in code blocks
2017-03-27 21:13:21 +02:00
Elisabeth Henry
70f9f3484c
Strip language before feeding it to syntect
2017-03-27 20:53:52 +02:00
Elisabeth Henry
532af28654
Remove debug println
2017-03-27 18:54:21 +02:00
Elisabeth Henry
dbefbc7ace
Make internal links a bit more permissive
2017-03-27 18:50:43 +02:00
Elisabeth Henry
4072e607bd
Fix typo
2017-03-27 16:26:18 +02:00
Elisabeth Henry
2c1cac6349
Fix syntax::to_tex
2017-03-27 15:30:04 +02:00
Elisabeth Henry
dc9133ad71
Add crowbook.html_as_text option
2017-03-27 08:01:31 +02:00
Elisabeth Henry
405c04d82a
Add tex.hyperref option to disable hyperref
2017-03-27 07:25:11 +02:00
Elisabeth Henry
11b42019f5
Add support for subchapters
2017-03-27 06:45:28 +02:00
Elisabeth Henry
943c87d114
Add addsubchapter method to Book
2017-03-27 06:35:16 +02:00
Elisabeth Henry
eff34097cc
Fix (hackishly) EPUB's toc for parts
2017-03-27 05:38:13 +02:00
Elisabeth Henry
e3b18bff20
Fix a bit TOC for parts in epub
2017-03-27 05:21:34 +02:00
Elisabeth Henry
2bcfe7c012
Fix bug for numbered parts
2017-03-27 04:55:04 +02:00
Elisabeth Henry
094daea23e
Fix error/warning formatting
2017-03-27 04:13:26 +02:00
Elisabeth Henry
56fa89aeff
Downgrade Latex image warning as resource handler already outputs tons of it
2017-03-27 04:11:54 +02:00
Elisabeth Henry
2d1246c435
Change 'contains file above directory' warning to debug
2017-03-27 04:07:04 +02:00
Elisabeth Henry
5b80d8efc8
Fix escaping issue in epub
2017-03-27 04:02:13 +02:00
Elisabeth Henry
c9ce72ad25
Remove unnecessary mut and commented code
2017-03-27 03:36:52 +02:00
Elisabeth Henry
29bc267990
Update html test to new output
2017-03-27 03:34:21 +02:00
Elisabeth Henry
e01844130f
Change default html chapter template and the data it can access
2017-03-27 03:29:46 +02:00
Elisabeth Henry
c7907904ac
Add bookoptions to commit (should have done this to previous but ooopsie
2017-03-27 03:06:43 +02:00
Elisabeth Henry
f81fd674a7
Update html test to new API
2017-03-27 03:02:14 +02:00
Elisabeth Henry
bf9aa69802
Remove debug println
2017-03-27 03:00:42 +02:00
Elisabeth Henry
b093968232
Add html.chapter.template and html.part.template options
2017-03-27 02:58:35 +02:00
Elisabeth Henry
26c6c9dd35
Big refactoring in the way chapters and part are handled for HTML
...
Add the following options:
* rendering.part
* rendering.chapter
Which can choose what is displayed instead of "chapter/part".
2017-03-27 02:15:16 +02:00
Elisabeth Henry
634f810f04
Factorized a bit of code in get_chapter/part_header
2017-03-26 23:48:26 +02:00
Elisabeth Henry
6aafe4a0cd
Detect sub/superscript even in inline elements
2017-03-26 21:35:03 +02:00
Elisabeth Henry
08ad8ffe28
Add superscript and subscript tests
2017-03-26 20:49:57 +02:00
Elisabeth Henry
b5b918edd9
Fix bug in collapse function
2017-03-26 20:49:37 +02:00
Elisabeth Henry
b67a55b908
Detect subscript and superscript in odt missing features
2017-03-26 20:29:37 +02:00
Elisabeth Henry
389c0be0e7
Add support for subscript.
...
This is far from perfect but unless it is added in pulldown-cmark or I
write my own markdown parser this is the best we'll get.
Closes #26
2017-03-26 20:28:13 +02:00
Elisabeth Henry
1d7e50af79
Add support for superscript
2017-03-26 20:03:42 +02:00
Elisabeth Henry
ccb8e21d9b
Add bases for futur support of subscript/superscript
2017-03-26 18:04:57 +02:00
Elisabeth Henry
cd25fb8d3d
Fix EPUB to add numbered but untitled chapter to the toc
2017-03-24 01:57:03 +01:00
Elisabeth Henry
5c5e0bd0a3
Fix double rendering of markdown in HTML titles
2017-03-21 01:12:08 +01:00
Elisabeth Henry
2ac1b6c816
Export raw metadata as text, not markdown
2017-03-20 22:28:06 +01:00
Elisabeth Henry
2faed5d0a6
Export chapter_title_raw in html dir
2017-03-20 22:26:06 +01:00
Elisabeth Henry
a474b79cee
Use chapter_title_raw in epub templates
2017-03-20 22:10:19 +01:00
Elisabeth Henry
2ad123866a
Export raw (markdown) metadata to templates
2017-03-20 21:41:01 +01:00
Elisabeth Henry
bb4a9585c4
Fix bug in epub because it used HTML where it required text in content.opf
2017-03-20 21:32:00 +01:00
Elisabeth Henry
4a8d5c0601
Escape title and author before feeding them to epub-builder
2017-03-20 21:03:37 +01:00
Elisabeth Henry
e0b850fa2d
Add guilty fixme comment for code smell
2017-03-20 03:17:11 +01:00
Elisabeth Henry
bed329466d
Consider an image as standalone even if it is inside a link
2017-03-20 03:16:05 +01:00
Elisabeth Henry
ddf1b8894c
Only include latex packages if the feature is used
2017-03-19 08:50:37 +01:00
Elisabeth Henry
eddf200944
Add url to list of features detected while parsing
2017-03-19 08:50:16 +01:00
Elisabeth Henry
c18c6f554e
Fix condition for avoiding syntect init in LaTeX
2017-03-19 08:12:19 +01:00
Elisabeth Henry
2f84869cd8
Don't init syntect if there are no code blocks in the document
2017-03-19 07:51:05 +01:00
Elisabeth Henry
c5adfc8a49
Only display a global warning for all features that are not implemented in ODT
2017-03-19 07:42:55 +01:00
Elisabeth Henry
f1fa666dc4
Detect which features are used at parse time
2017-03-19 07:42:27 +01:00
Elisabeth Henry
d53ce32c60
Downgrade some error/warning levels
2017-03-19 07:07:41 +01:00
Elisabeth Henry
b44f86be3c
Revert table tests to before API changes
2017-03-19 06:56:59 +01:00
Elisabeth Henry
1d7ce5d1e3
Deprecate crowbook.verbose
2017-03-19 06:54:53 +01:00
Elisabeth Henry
cb13570a80
Change default infolevel
...
Warnings are now displayed by default. As a consequence, the
--verbose option is now equivalent to the old --debug option, which
is suppressed.
2017-03-19 06:50:12 +01:00
Elisabeth Henry
3b29a69b68
Revert some changes done to support pulldown-cmark 0.0.9
...
Downside: this revert will have to be reverted to actually support
tables alignment.
Upside: not sure this feature is really that useful for Crowbook's
needs, and it doesn't require a breaking API change.
2017-03-19 06:30:52 +01:00
Elisabeth Henry
c8de4c2524
Fix typo in error message for link not found and move it to warning
2017-03-19 06:24:51 +01:00
Elisabeth Henry
32d7d75df8
Fix table test
2017-03-16 15:33:04 +01:00
Elisabeth Henry
7f0579a3dd
Make default alignment to None instead of Center (not used anyway though)
2017-03-16 15:09:01 +01:00
Elisabeth Henry
b729d3eab7
Upgrade to pulldown-cmark 0.0.9
...
This is still a bit unsatisfactory as the alignment is not currently used
for tables.
2017-03-14 19:37:31 +01:00
Elisabeth Henry
619e481148
Use html.highlight.theme for HTML dir rendering (instead of epub.highlight.theme)
2017-03-05 14:46:09 +01:00
Elisabeth Henry
f4217f30cb
Avoid creating an empty file if a renderer fails
...
This fixes #36 .
2017-03-04 15:16:16 +01:00
Elisabeth Henry
37e67a53dd
Make error message a bit clearer when running command in tmpdir fails.
...
Related to #35
2017-01-23 04:38:13 +01:00
Elisabeth Henry
bd3dcc00ac
Fix html test
2017-01-16 00:22:59 +01:00
Elisabeth Henry
3730f275a7
Add html.highlight.theme, tex.highlight.theme and epub.highlight.theme options
2017-01-15 23:28:10 +01:00
Elisabeth Henry
9301963616
Deprecate proofread.nb_spaces option
2017-01-15 04:16:01 +01:00
Elisabeth Henry
cb9f4d590b
Use the nnbsp escaping function of crowbook_text_processing instead of np_spaces
2017-01-15 04:10:05 +01:00
Elisabeth Henry
16aeb51b9f
Continue when setting an option fails instead of aborting
2017-01-14 01:43:28 +01:00
Elisabeth Henry
16b0ebd79b
Fix html test
2017-01-14 01:39:52 +01:00
Elisabeth Henry
8afab1509e
Fix build error when syntect feature is disactivated
2017-01-14 01:07:29 +01:00
Elisabeth Henry
474e468354
Make syntect default option for syntax highlighting
2017-01-14 00:26:50 +01:00
Elisabeth Henry
bda3f3517f
Add rendering.highlight.theme option
2017-01-14 00:20:44 +01:00
Elisabeth Henry
c5bd30cf10
Use EpubBuilder::add_cover_image
2017-01-13 19:42:58 +01:00
Elisabeth Henry
fe98e6f326
Use write! macro instead of push_str(&format!(...))
2017-01-12 02:46:04 +01:00
Elisabeth Henry
02d6cf4f48
Remove crossbeam dependency
2017-01-11 20:36:42 +01:00
Elisabeth Henry
0879b7be04
Use rayon instead of crossbeam in Book::render_all
2017-01-11 20:34:55 +01:00
Elisabeth Henry
e0820c7c72
Use rayon instead of crossbeam for grammar checking
2017-01-11 20:02:23 +01:00
Elisabeth Henry
36d18f9c31
Add the tex.stdpage option
...
Related to #34
2017-01-10 21:23:33 +01:00
Elisabeth Henry
3d83274fa1
Refactor compile_str function
2017-01-10 21:07:49 +01:00
Elisabeth Henry
a30addf218
Apply more clippy lints
2017-01-09 17:45:59 +01:00
Elisabeth Henry
6752f1566a
Run clippy on src
2017-01-09 17:08:07 +01:00
Elisabeth Henry
99baa20353
Avoid outputting latex code for repetition in code blocks
2017-01-06 20:38:38 +01:00
Elisabeth Henry
b8828cb350
Don't output the HTML code for repetition in code blocks
2017-01-06 20:35:35 +01:00
Elisabeth Henry
e54d250a44
Make proofread highligting less invasive
2017-01-06 20:19:50 +01:00
Elisabeth Henry
762099e382
Clean caribon's usage
2017-01-06 19:46:16 +01:00
Elisabeth Henry
dcf8a63fe1
Add license information to grammar_check.rs
2017-01-06 16:52:33 +01:00
Elisabeth Henry
3dc92da718
Avoid initializing syntect if it is not used
2017-01-06 03:29:11 +01:00
Elisabeth Henry
6e6055debb
Use tabularx to break lines in tabulars
2017-01-05 16:24:03 +01:00
Elisabeth Henry
72cf5ecdfe
Make quotes in italics
2017-01-05 06:53:38 +01:00
Elisabeth Henry
5590e794a9
Insert \allowbreak in code and code blocks
2017-01-05 05:31:33 +01:00
Elisabeth Henry
7837310f22
Add frame around code blocks in latex
2017-01-05 05:08:53 +01:00
Elisabeth Henry
ba32705827
Add colour suport for syntax highlighting in LaTeX
2017-01-05 04:11:16 +01:00
Elisabeth Henry
d98d31ff38
Add support for syntect in latex rendering
2017-01-05 03:56:27 +01:00
Elisabeth Henry
811b53f1b5
Fix bookoptions.rs
2017-01-05 02:30:18 +01:00
Elisabeth Henry
725bb3291a
Avoid exporting highlight.js and its CSS if syntect highlighting is activated
2017-01-05 02:16:51 +01:00
Elisabeth Henry
d92d36fe41
Add support for syntect
2017-01-05 02:06:15 +01:00
Elisabeth Henry
473cc06b4e
Mark beginning of text in Epub
2017-01-03 05:59:20 +01:00
Elisabeth Henry
fbbbccc855
Fix order of inline toc (AFTER cover and title, not before)
2017-01-03 04:16:31 +01:00
Elisabeth Henry
9343c0633c
Move to name changes in EpubBuilder
2017-01-02 21:39:27 +01:00
Elisabeth Henry
bd1e263232
Remove dead code
2017-01-02 16:36:00 +01:00
Elisabeth Henry
b1d0715e0c
Use 'external' epub building library
2017-01-02 16:26:17 +01:00
Elisabeth Henry
0155a90042
Switch order of cover and title in EPUB toc to match how they appear in book
2017-01-01 06:07:36 +01:00
Elisabeth Henry
c2b8703cca
Make escaping nnsp default for EPUB too
2017-01-01 06:06:26 +01:00
Elisabeth Henry
6f2a501fda
Fix bug in finding parent in add_chapter_from_named_source
2016-12-31 00:11:07 +01:00
Elisabeth Henry
e1c671e35f
Make --output file relative to current directory as it makes more sense
2016-12-30 23:21:36 +01:00
Elisabeth Henry
5c80e5d3e4
Remove mutability of a variable that don't need to be
2016-12-30 22:58:04 +01:00
Elisabeth Henry
9fc54f3450
Generate epub content in OEBPS
2016-12-30 22:56:55 +01:00
Elisabeth Henry
29acddfaf2
Add [] to footnote numbers in epub
2016-12-30 22:38:13 +01:00
Elisabeth Henry
32f257a720
Refactorize code of add_chapter*
2016-12-30 20:42:28 +01:00
Elisabeth Henry
d1d30b9a8f
Remove span.initial for non-epub HTML
2016-12-30 17:53:35 +01:00
Elisabeth Henry
2e71354893
Add epub.escape_nb_spaces option
2016-12-30 17:48:58 +01:00
Elisabeth Henry
b89fd180a9
Add an empty chapter title to chapters that have none
2016-12-30 15:31:22 +01:00
Elisabeth Henry
ba77498a38
Rename html_dir/chapter.html to html_dir/template.html
2016-12-30 02:21:44 +01:00
Elisabeth Henry
21b8b8d708
Change CSS of header/footer
2016-12-30 02:12:21 +01:00
Elisabeth Henry
3d280b6cc1
Merge html.dir.index.html and html.dir.chapter.html to html.dir.template
...
Also properly renders multifile HTML documents (which wasn't done because
it still checked output.html_dir instead of output.html.dir).
2016-12-30 01:11:23 +01:00
Elisabeth Henry
6e753423a6
Rename html.dir.html to html.dir.template
2016-12-30 00:51:10 +01:00
Elisabeth Henry
bdd37776e3
Split lang/ into separate subdirectories
2016-12-25 20:44:17 +01:00
Elisabeth Henry
7749a9e101
Rename tex.font_size to tex.font.size
2016-12-25 20:12:11 +01:00
Elisabeth Henry
30b9106e97
Renamed *html_dir* options to *html.dir*
2016-12-25 20:06:41 +01:00
Elisabeth Henry
ac3788f393
Renamed html_single.* options to html.standalone.*
2016-12-25 19:55:15 +01:00