Commit graph

86 commits

Author SHA1 Message Date
Albert Krewinkel
aed7aecfc3 Lua filter docs: complete, fix MetaValue documentation 2018-10-15 21:10:05 +02:00
Albert Krewinkel
1435d0b079
Lua filters doc: add ReaderOptions to list of objects 2018-10-15 07:56:35 +02:00
Albert Krewinkel
418f6e093c
Lua filter docs: add documentation for Element/Sec 2018-10-13 16:25:54 +02:00
Albert Krewinkel
1ac87b487f
Lua filter docs: document list attributes 2018-10-11 22:30:40 +02:00
Albert Krewinkel
5f6f2c69f5
data/pandoc.lua: add datatype ListAttributes
Make ListAttributes a datatype. The type is similar to Attr.
2018-10-11 22:28:24 +02:00
Albert Krewinkel
484056a4cd
Lua filter docs: document fields of Citation objects 2018-10-11 21:25:26 +02:00
Albert Krewinkel
2e63e2f2bc
Lua filter docs: document fields of inline objects 2018-10-11 20:51:54 +02:00
Albert Krewinkel
36a6a40ef7
Documentation: add draft for Lua objects reference 2018-10-06 21:48:25 +02:00
Albert Krewinkel
05efa5a0e6
Lua filter doc: fix description of Code.text 2018-10-06 21:48:24 +02:00
John MacFarlane
ba09d2942a lua-filters.md: add links to filters, and to lua-filters repository.
Closes #4874.
2018-09-07 16:29:21 -07:00
Albert Krewinkel
fb94c0f6a1 Lua Utils module: add function blocks_to_inlines (#4799)
Exposes a function converting which flattenes a list of blocks into a
list of inlines. An example use case would be the conversion of Note
elements into other inlines.
2018-07-30 10:55:25 -07:00
Alexander Krotov
41cf6d540f More spellcheck 2018-07-02 19:07:28 +03:00
HeirOfNorton
f5b89b5adb Fix example in lua-filters docs. Fixes #4459 (#4476) 2018-03-19 21:43:43 -07:00
Albert Krewinkel
b4717a6acb
doc/org.md: Add Org-mode documentation (very first draft) 2018-02-25 14:30:15 +01:00
Albert Krewinkel
eb16f3354f
doc/lua-filters.md: document global vars set for filters 2018-02-24 23:38:27 +01:00
Alexander Krotov
b818623d42 Fix Text.Pandoc.Builder link 2018-01-22 15:43:48 +03:00
Albert Krewinkel
8d5422f36b
Lua modules: add function pandoc.utils.run_json_filter
Runs a JSON filter on a Pandoc document.
2018-01-13 00:07:03 +01:00
Albert Krewinkel
b6cec3da3f
data/pandoc.lua: fix docstrings
Change: minor
2018-01-07 22:41:59 +01:00
Albert Krewinkel
7fa286fff1
Update tool which generates lua module docs
All "helper functions" are not part of the Lua code for module pandoc,
but are added in Haskell. The respective documentation section must
therefore be excluded from automatic regeneration.
2017-12-29 10:04:55 +01:00
Albert Krewinkel
9be2c7624c
data/pandoc.lua: drop function pandoc.global_filter
The function `global_filter` was used internally to get the implicitly
defined global filter. It was of little value to end-users, but caused
unnecessary code duplication in pandoc. The function has hence been
dropped. Internally, the global filter is now received by interpreting
the global table as lua filter.

This is a Lua API change.
2017-12-29 10:04:55 +01:00
Albert Krewinkel
820ee07f72
doc/lua-filters.md: re-add docs for helper functions
These docs are dropped, as the functions are no longer part of
data/pandoc.lua, from which this section is generated. This is only a
temporary fix: a proper fix will have to re-think how this section is
updated.
2017-12-29 09:04:21 +01:00
Albert Krewinkel
ec068f2318
data/pandoc.lua: fix documentation for global_filter 2017-12-29 09:02:25 +01:00
John MacFarlane
246e8f081a Update lua-filters.md and the tool that generates it. 2017-12-28 22:02:59 -08:00
John MacFarlane
346b10392f Update docs on filters. 2017-12-28 16:39:52 -08:00
John MacFarlane
ba4b9db16d Tweaks to lua-filters.md docs 2017-12-26 10:25:05 -08:00
Albert Krewinkel
59a4745457
Lua modules: add function pandoc.utils.hierarchicalize
Convert list of Pandoc blocks into (hierarchical) list of Elements.
2017-12-23 23:29:24 +01:00
Albert Krewinkel
2c66a42ab8
Lua modules: add function pandoc.utils.normalize_date
The function parses a date and converts it (if possible) to "YYYY-MM-DD"
format.
2017-12-23 13:43:22 +01:00
Albert Krewinkel
35f0567a8f
Lua modules: add function pandoc.utils.to_roman_numeral
The function allows conversion of numbers below 4000 into roman
numerals.
2017-12-23 13:42:35 +01:00
Albert Krewinkel
dd217f75e5
doc/lua-filter.md: document pandoc.utils.stringify
Change: minor
2017-12-22 20:29:00 +01:00
Albert Krewinkel
bd3ea72371
Lua modules: added pandoc.utils module
A new module `pandoc.utils` has been created. It holds utility functions
like `sha1`, which was moved from the main `pandoc` module.
2017-12-21 22:42:59 +01:00
John MacFarlane
b88cd9c2ed filters.md: say that Text.Pandoc.JSON comes form pandoc-types.
Closes jgm/pandoc-website#16.
2017-12-14 20:54:15 -08:00
Georger Araújo
ce73dec833 Delete removed -S option from command in epub.md (#4151)
Because `--smart/-S` has been removed.
Maybe ` -f markdown+smart` shoud also be added?
2017-12-13 11:28:16 -07:00
Albert Krewinkel
4066a385ac
Lua filters: use script to initialize the interpreter
The file `init.lua` is used to initialize the Lua interpreter which is
used in Lua filters. This gives users the option to require libraries
which they want to use in all of their filters, and to extend default
modules.
2017-12-06 22:50:56 +01:00
Albert Krewinkel
6640506ddc
Lua/StackInstances: push Pandoc and Meta via constructor
Pandoc and Meta elements are now pushed by calling the respective
constructor functions of the pandoc Lua module. This makes serialization
consistent with the way blocks and inlines are pushed to lua and allows
to use List methods with the `blocks` value.
2017-12-01 17:58:12 +01:00
Albert Krewinkel
5026dfaedf
lua-filters.md: add documentation for pandoc.List 2017-12-01 17:14:28 +01:00
John MacFarlane
d070424b94 lua-filters.md - added tikz filter example. 2017-11-21 12:20:28 -08:00
John MacFarlane
1c85a158f3 Added epub.md, getting-started.md to docs.
These used to live in the website repo.
2017-11-21 08:45:43 -08:00
John MacFarlane
f28f34244a Update title and authors on lua-filters.md. 2017-11-20 16:51:45 -08:00
John MacFarlane
47e74742a8 Documented text module for lua-filters.
See #4077.
2017-11-18 13:40:47 -08:00
John MacFarlane
17f6621b21 Update man page lua filter to use text module. 2017-11-18 13:33:37 -08:00
John MacFarlane
e5e8350fcb More efficient wordcount.lua example. 2017-11-12 21:55:10 -08:00
John MacFarlane
a89d4aa924 lua-filters.md: add wordcount example. 2017-11-12 21:48:47 -08:00
John MacFarlane
5c71e5afbf Improve handout example. 2017-11-12 15:51:10 -08:00
John MacFarlane
eacf1a2f00 Fixed typo in lua-filters exmaple. 2017-11-12 15:38:10 -08:00
John MacFarlane
3d6f98c4a3 lua-filters.md doc: Added handout example. 2017-11-12 15:36:11 -08:00
Alexander Krotov
af06d52609 Fix a typo: "uisng" -> "using" 2017-11-12 16:05:01 +03:00
John MacFarlane
f9c7b49502 lua-filters.md: use real-world man page filter as example. 2017-11-11 16:18:39 -08:00
John MacFarlane
6174b5bea5 Add lua filter functions to walk inline and block elements.
Refactored some code from Text.Pandoc.Lua.PandocModule
into new internal module Text.Pandoc.Lua.Filter.

Add `walk_inline` and `walk_block` in pandoc lua module.
2017-11-11 14:41:11 -08:00
Kolen Cheung
8ebf5c5f45 partially undo commit da1e626 2017-10-26 22:27:14 -07:00
Kolen Cheung
da1e626500 doc/using-the-pandoc-api.md: proofread (minor) 2017-10-26 18:16:12 -07:00