Pandoc
ããããä½ã£ã¦ã¿ããã headerA headerB header1 A1 B1 header2 A2 B2 ãããã表ãä½ããã»ã«å ã§ã®æ¹è¡ã¯ãã£ããå¾åãã ã 1è¡ç®ãä½ãããããè¡ã«ãªãã local row1 = pandoc.Row( { pandoc.Cell({}), pandoc.Cell({pandoc.Plain("headerA")}), pandoâ¦
ååã表ãä½ã£ã¦ã¿ããã¨ããããpandocã®è¡¨ã«ã¯ä»ã¾ã§è§¦ãã¦ãªãTypeããããªãããããåºã¦ããã®ã§ããããããªãããªã®ã§ãã¾ãLuaã§èªç±ã«è¡¨ãä½ã£ã¦ã¿ãç·´ç¿ããããã ååãmarkdownã®è¡¨ãé£ããã¦ã¿ã¦ããã£ããã£ããã¨ããæ§é ã¯ãããªæãã ã â¦
次ã¯è¡¨ããã£ã¦ã¿ãã ãããªè¡¨ãä½ã£ã¦ã¿ãã ããã®box noteã®JSONã¯å²æãããã©ãæ§é ã¨ãã¦ã¯ãããªæãã§ããã table table_row table_header paragraph table_header paragraph text("headerA") table_header paragraph text("headerB") table_row tâ¦
ãã¦ã次ã«å¯¾å¿ããéè¦ãªæ©è½ã¨ãã¦ãç®æ¡æ¸ãã®ãã¹ãã«å¯¾å¿ãããã ã¾ããbox noteã§ãã¹ããããã¨ããããªç»é¢ã¨JSON ASTã«ãªãã { "type": "bullet_list", "content": [ { "type": "list_item", "content": [ { "type": "paragraph", "content": [ {â¦
ååä½ã£ãLuaã®ã¹ã¯ãªãããããã£ã¦ããã«ããã£ã¦ããã£ã¦ãéä¸ã«å£ãã¦ããªãããç°¡åã«ç¢ºèªã§ããããã«ãããã è¦ããã«åä½ãã¹ããå®è¡åºæ¥ãããã«ãããã ã¨ã¯ãã£ã¦ãããã®ã¹ã¯ãªããã¯pandocã«çµã¿è¾¼ã¾ãã¦ããLuaã¤ã³ã¿ããªã¿ã§ããåããªâ¦
ããå°ããè¤éãªããã¥ã¡ã³ããå¤æãã¦ã¿ããã ãã®box noteã®JSON ASTãæç²ããã¨ãããªæãã§ããã { "doc": { "type": "doc" }, "content": [ { "type": "heading", "attrs": { "level": 1, "guid": "m3hfvv22" }, "content": [ { "type": "text", "â¦
ã¡ãã£ã¨åå¼·ã¯ãã£ããç½®ãã¦ãpandocãå®éã«åããã¦ã¿ããã ã¾ããåãããã©ãããã©ããã£ã¦ç¢ºèªããã®ãã ããä½ããã®åºåãããªããã¨ã«ã¯ç¢ºèªã§ããªããè¦ããã«ã©ããã£ã¦printfãããã¯ããã®ãã¨ãããã¨ã ã ã¨ããããã§ãä¼çµ±ã¨æ ¼å¼ã®Helloâ¦
pandoc.jsonã©ã¤ãã©ãªãã¿ã¦ãããã Module pandoc.json Fields null ããã¯ãªãã ãããã¨æã£ããã ãã©ããJSã®nullãpandoc.json.nullã¨è¡¨è¨ããã¨ãããã¨ãã¨æããnilã¨ã¯éããã®ãªãã ãªããã¶ãã Functions decode å¼æ°ã«JSONã®æååãä¸ããâ¦
Lua Filterã®ç¶ããPandoc Moduleããã Pandoc Module pandocã¨ããã°ãã¼ãã«å¤æ°ã§æä¾ããã¦ãæ©è½ã¯å¤§ãã2ã¤ã以ä¸ã2ã¤ã«ã¤ã㦠Element creation ASTã®è¦ç´ ã®ä½æã«ä½¿ããã®ã Exposed pandoc functionality Luaããpandocã®æ©è½ã触ããããã«ããâ¦
ãã¦ã次ã¯pandocãªãã¡ããã¨ããã©ã¤ãã©ãªã«ã¤ãã¦ç解ããªãã¨ãããªãã¯ãã ã ãã®èª¬æã¯Lua Filterã®ããã¥ã¡ã³ã(https://pandoc.org/lua-filters.html)ã«ããããããã¨ã¦ãé·ããã¤ãããæµãèªãã§ãããã pandoc.org Introduction ããã§ãã£ã«â¦
å¼ãç¶ããLuaã®ãªãã¡ã¬ã³ã¹ãèªãã§ããã4ç« ã5ç« ã¯Cè¨èªã¨ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®è©±ãªã®ã§é£ã°ãã¦ãä»åã¯6ç« ã®æ¨æºã©ã¤ãã©ãªãèªãã§ããã Luaã§ã¯ããæ¨æºã©ã¤ãã©ãªãã¨å¼ã°ãããã®ã¯ãã¹ã¦Cã§å®è£ ããã¦ãããã¤ã¾ããå¯å¤é·å¼æ°ã¯åãä»ããªããâ¦
å¼ãç¶ããLuaã®ãªãã¡ã¬ã³ã¹ãæµãèªãã§ããã3ç« ããã 3.1 åå¥è¦å æååãªãã©ã«ã®ä¾ãé¢ç½ãã®ã§å¼ç¨ãã¨ãã以ä¸ãå ¨é¨åãå 容ã®æååã«ãªãã¨ã a = 'alo\n123"' a = "alo\n123\"" a = '\97lo\10\04923"' a = [[alo 123"]] a = [==[ alo 123"]==â¦
Luaã«ã¤ãã¦ãã£ããå¦ãã§ã¿ãããå°ãªãã¨ãtableã®æ±ãæ¹ãããããªãã¨ãã³ã¼ããæ¸ããªãããã«æãã ã©ããããLuaã®å¦ç¿ã«ã¯ãã®ãªãã¡ã¬ã³ã¹ãè¯ãããã ã翻訳ãããæ¹ã«æè¬ããããæãé£ããã¦ãã¾ã 1æåãèªãã§ãªãã®ã«çºä½çã«BOOTHã§è³¼å ¥â¦
æ¯ãã«Pandocã®Custom Readerã®ããã¥ã¡ã³ã(https://pandoc.org/custom-readers.html)ãèªãã§ã¿ãã Introduction Pandocã¯ããããªãã©ã¼ãããã®ããã¹ããèªã¿è¾¼ãããã©ãæ¨æºã«ãªããã®ã¯èªåã§èªè¾¼ã¢ããã¿ã¼ãä½ããã ããã¯Custom Readerã¨å¼ã°ãâ¦