Emacså ã§å²ç¢ã®ç€é¢ã衚瀺ããæ£è(SGF圢åŒ)ãç·šéããŸãã
Emacs 27.1
init.elã«æ¬¡ã®ã³ãŒããè¿œå ããŠãã ããã
(with-eval-after-load "org"
(require 'igo-org)
(igo-org-setup))
ãŸããHTMLãšããŠãšã¯ã¹ããŒããããšãã«ç€é¢ã衚瀺ãããå Žåã¯åŸè¿°ã®èšå®ãè¿œå ããŠãã ããã
orgææžå ã«igoç¹æ®ãããã¯ãæ¿å ¥ããŸãã(æäœäŸ: C-c C-, SPC i g o RET)
#+begin_igo
#+end_igo
ãããã¯ã®äžã« (;SZ[9]) ãšå ¥åãããš9è·¯ç€ã衚瀺ãããŸãããŸãã¯ãããã¯å 㧠C-c i ãæŒããšç€é¢ãµã€ãºãæå®ããŠåæåã§ããããã«ãªã£ãŠããŸãã
åŸã¯é©åœã«ç³ã眮ããããããªãŒç·šéã¢ãŒãã§åæç€é¢ãèšå®ããããã³ã¡ã³ããèšå®ããããããšããã®æäœæ¯ã«ãããã¡ã®ããã¹ããæžãæãããŸãã
#+begin_igo
ã®åŸã«ãããã¯æ¯ã®ãªãã·ã§ã³ãæå®ã§ããŸãã
äŸãã°æ¬¡ã®ããã«ãããšãããã¯ãç€é¢åããããšã(orgãã¡ã€ã«ãéãããšãç)ã«æåããæé çªå·ã衚瀺ãããŸãã
#+begin_igo :move-number t
(;FF[4]GM[1]SZ[9];B[fd];W[df];B[ff];W[dd])
#+end_igo
æå¹ãªãªãã·ã§ã³ã«ã¯æ¬¡ã®ãã®ããããŸãã
ãªãã·ã§ã³å | æå³ | å€ |
---|---|---|
:status-bar | ã¹ããŒã¿ã¹ããŒã®è¡šç€ºç¶æ | nil, noã®ãšãé衚瀺 |
:move-number | æé çªå·ã®è¡šç€ºç¶æ | nil, noã®ãšãé衚瀺 |
:branch-text | åå²æå(A,B,âŠ)ã®è¡šç€ºç¶æ | nil, noã®ãšãé衚瀺 |
:editable | ç·šéå¯èœ | nil, noã®ãšãç·šéäžå¯èœ |
:read-only | ç·šéçŠæ¢(:editableã®é) | nil, noã®ãšãç·šéå¯èœ |
:path | æåã«è¡šç€ºããç€é¢(ããŒã) | ç€é¢ãžãã©ãçãçµè·¯(åŸè¿°) |
:display | ãšã¯ã¹ããŒãæã®è¡šç€ºæ¹æ³ | 衚瀺æ¹æ³ã瀺ãå€(åŸè¿°) |
:grid-interval | æ Œåç·ã®éé | ãã¯ã»ã«æ°(ããã©ã«ã㯠igo-board-view-grid-interval-default) |
orgãã¡ã€ã«å
ã« #+IGO_BLOCK_DEFAULTS:
ãèšè¿°ããããšã§ããã¡ã€ã«å
ã§ã®ãªãã·ã§ã³ã®ããã©ã«ãå€ãèšå®ã§ããŸãã(泚æ:çŸåšã®æãå€æŽæã¯ãã¡ã€ã«ãéãçŽãå¿
èŠããããŸã)
äŸ:
#+IGO_BLOCK_DEFAULTS: :grid-interval 24 :move-number t
:path ãªãã·ã§ã³ã¯æåã«è¡šç€ºããç€é¢(ã²ãŒã æšã®ããŒã)ãæå®ããŸãã
ãã¹(ç€é¢ãžãã©ãçãçµè·¯)ã¯æ¬¡ã®èŠçŽ ã䞊ã¹ããã®ã§ãæåã®ç€é¢(ã«ãŒã)ããåèŠçŽ ãæå®ããç€é¢ãé çªã«ãã©ãæçµçã«å°éããç€é¢ãéžæãããŸãã
æ°å | çŸåšã®ç€é¢ããæ°åã§æå®ããã ãåŸã®ç€é¢(éäžåå²ãããå Žåã¯æåã®åå²(A)ãéžæ)(ç¡ãå Žåã¯æåŸã®ç€é¢) |
-æ°å | çŸåšã®ç€é¢ããæ°åã§æå®ããã ãåã®ç€é¢(ç¡ãå Žåã¯æåã®ç€é¢) |
ã¢ã«ãã¡ãããäºæå | SGF座æšãšã¿ãªãããã®å Žæã«æã€çŸåšã®ç€é¢ããæãè¿ãç€é¢(å¹ åªå æ¢çŽ¢) |
倧æåã¢ã«ãã¡ãããäžæå | çŸåšã®ç€é¢ä»¥éã®æåã®åå²ã§ã®åå²å (A:0, B:1, âŠ)ãæå®ãããã®ãšèŠãªãããã®åå²çŽåŸã®ç€é¢ |
_ (ã¢ã³ããŒããŒ) | çŸåšã®ç€é¢ä»¥éã®æåã®åå²ãããç€é¢(åå²ãç¡ããã°æåŸã®ç€é¢) |
äŸ:
- 0 : æåã®ç€é¢
- 12 : æåãã12æç®ã®ç€é¢
- cd : æåã«3ã®4ã«çæããç€é¢
- cc/fc : æåã«å·Šäžäžã (cc)ã«çæããåŸã次ã«æåã«äºééã(fc)ããç€é¢
- cc/2 : æåã«çæããåŸã®2æç®
- A/B/A : åå²ãAãBãAã®é ã«éžæããç€é¢
- _ : æåã®åå²(ç¡ããã°æåŸã®ç€é¢)
- _/-1 : æåã®åå²(ç¡ããã°æåŸã®ç€é¢)ã®äžã€å
init.elã«æ¬¡ã®ã³ãŒããè¿œå ããŠãã ããã
(autoload 'igo-sgf-mode "igo-sgf-mode")
(add-to-list 'auto-mode-alist '("\\.sgf$" . igo-sgf-mode))
sgfãã¡ã€ã«ãéããšèªåçã«ç€é¢ã衚瀺ãããŸãã
泚æ: sgfãã¡ã€ã«ã¯ãªã»ãããã§ã¹ãããã¯ã®ã£ã¢ã³ãªã©å²ç¢ä»¥å€ã®ã²ãŒã ã®æ£èãè¡šçŸã§ããŸããããªããããããæ±ãå Žåã¯ãGMããããã£ã1以å€ã®ãšãã«igo-sgf-modeãèµ·åããªãããã«ããå¿ èŠããããŸã(æªå®è£ )ã
ä»»æã®SGFããã¹ãããªãŒãžã§ã³ã§å²ã£ãäžã§ M-x igo-edit-region ãå®è¡ãããšããã®ç¯å²ããšãã£ã¿åãããŸãã
igo-sgf-mode.el ã igo-org.el ã igo-editor.el ã䜿ã£ãŠå®è£ ãããŠããŸããigo-sgf-mode.elã¯ãããã¡å šäœããigo-org.elã¯begin_igoïœend_igoã®éãèªåçã«ãšãã£ã¿åããŸãã
ãšãã£ã¿ã¯å€§ããåããŠæ¬¡ã®ãããªã¢ãŒããæã£ãŠããŸãã
- ããã¹ãã¢ãŒã
- åºå®ã¢ãŒã(ãšã©ãŒãç¡ããªã£ãŠãããã¹ãã®ãŸãŸ)
- èªåå埩ã¢ãŒã(ãšã©ãŒãç¡ããªã£ããšãã«èªåçã«ã°ã©ãã£ã«ã«ã¢ãŒãã«ç§»è¡ãã)
åã¢ãŒãã§äœ¿ããããŒæäœã¯æ¬¡ã®éãã§ãã
æäœ | 説æ | é¢æ° |
---|---|---|
C-c q | ãšãã£ã¿ã®çµäº | igo-editor-quit |
C-c g | ã°ã©ãã£ã«ã«ã¢ãŒããžç§»è¡ | igo-editor-graphical-mode |
C-c i | ç€é¢ã®åæå | igo-editor-init-board |
æäœ | 説æ | é¢æ° |
---|---|---|
C-c g | ããã¹ãã¢ãŒããžç§»è¡ | igo-editor-text-mode |
C-x c-q | ç·šéå¯èœç¶æ åãæ¿ã | igo-editor-toggle-editable |
a, |<ãã¿ã³ã¯ãªã㯠| æåãž | igo-editor-first-node |
e, >|ãã¿ã³ã¯ãªã㯠| æåŸãž(ããã©ã«ãéžæã§ãã©ããæãŸã§) | igo-editor-last-node |
b, <ãã¿ã³ã¯ãªã㯠| åãž | igo-editor-previous-node |
f, >ãã¿ã³ã¯ãªã㯠| 次ãž(ããã©ã«ãéžæã§ãã©ããå Žå) | igo-editor-next-node |
M-b | åã®åå²å°ç¹ãž | igo-editor-previous-fork |
M-f | 次ã®åå²å°ç¹ãž | igo-editor-next-fork |
n | 次ã®ç€é¢ãåå²ã®äžããéžæããŠè¡šç€º | igo-editor-select-next-node |
Q | çæã¢ãŒã | igo-editor-move-mode |
F | ããªãŒç·šéã¢ãŒã | igo-editor-free-edit-mode |
M | ããŒã¯ç·šéã¢ãŒã | igo-editor-mark-edit-mode |
s s | ã¹ããŒã¿ã¹ããŒè¡šç€ºåãæ¿ã | igo-editor-toggle-status-bar |
s n | æé çªå·è¡šç€ºåãæ¿ã | igo-editor-toggle-move-number |
s b | åå²è¡šç€ºåãæ¿ã | igo-editor-toggle-branch-text |
c | ã³ã¡ã³ãã®ç·šé | igo-editor-edit-comment |
N | æé çªå·ã®ç·šé | igo-editor-edit-move-number |
g | 察å±æ å ±ã®ç·šé | igo-editor-edit-game-info |
x | ç€é¢ã®SVGç»ååºå | igo-editor-export-image |
C-c i | ç€é¢ã®åæå | igo-editor-init-board |
æäœ | 説æ | é¢æ° |
---|---|---|
P, Passãã¿ã³ã¯ãªã㯠| ãã¹ | igo-editor-pass |
p | ç³ã眮ã | igo-editor-put-stone |
ç€é¢ãã¯ãªã㯠| ç³ã眮ã | igo-editor-move-mode-board-click |
Passãã¿ã³å³ã¯ãªã㯠| çæããã¹ãã«å¯Ÿããã¡ãã¥ãŒã衚瀺 | igo-editor-pass-click-r |
ç€é¢ãå³ã¯ãªã㯠| 亀ç¹(ç³ã空ç¹)ã«å¯Ÿããã¡ãã¥ãŒã衚瀺 | igo-editor-move-mode-board-click-r |
\dollar | çŸåšã®ç€é¢ãã«ãŒãã«ãã | igo-editor-make-current-node-root |
(çŸåšã®æãäžçªæåã®ç€é¢ã§ã®ã¿äœ¿çšã§ããŸã)
æäœ | 説æ | é¢æ° |
---|---|---|
Quitãã¿ã³ã¯ãªã㯠| çæã¢ãŒããžåãæ¿ã | igo-editor-move-mode |
p | 亀ç¹ãéžæäžã®ç¶æ ã«ãã | igo-editor-free-edit-put |
ç€é¢ãã¯ãªã㯠| 亀ç¹ãéžæäžã®ç¶æ ã«ãã | igo-editor-free-edit-board-down |
B, Blackãã¿ã³ã¯ãªã㯠| é»ç³ãéžæãã | igo-editor-free-edit-black |
W, Whiteãã¿ã³ã¯ãªã㯠| çœç³ãéžæãã | igo-editor-free-edit-white |
E, Emptyãã¿ã³ã¯ãªã㯠| 空ç¹ãéžæãã | igo-editor-free-edit-empty |
T, Turnãã¿ã³ã¯ãªã㯠| 次ã®æçªãå転ããã | igo-editor-free-edit-toggle-turn |
æäœ | 説æ | é¢æ° |
---|---|---|
Quitãã¿ã³ã¯ãªã㯠| çæã¢ãŒããžåãæ¿ã | igo-editor-move-mode |
p | 亀ç¹ãéžæäžã®ç¶æ ã«ãã | igo-editor-mark-edit-put |
ç€é¢ãã¯ãªã㯠| 亀ç¹ãéžæäžã®ç¶æ ã«ãã | igo-editor-mark-edit-board-down |
X, Xãã¿ã³ã¯ãªã㯠| ÃããŒã¯ãéžæãã | igo-editor-mark-edit-cross |
O, Oãã¿ã³ã¯ãªã㯠| âããŒã¯ãéžæãã | igo-editor-mark-edit-circle |
S, SQãã¿ã³ã¯ãªã㯠| â¡ããŒã¯ãéžæãã | igo-editor-mark-edit-square |
T, TRãã¿ã³ã¯ãªã㯠| â³ããŒã¯ãéžæãã | igo-editor-mark-edit-triangle |
E, Textãã¿ã³ã¯ãªã㯠| ããã¹ããéžæãã | igo-editor-mark-edit-text |
D, Delãã¿ã³ã¯ãªã㯠| æ¶å»ãéžæãã | igo-editor-mark-edit-del |
åã®æã«æ»ã£ãŠå¥ã®å Žæã«æã€ãšèªåçã«åå²ãäœãããŸãããšãã£ã¿ã¯å šãŠã®åå²ãããªãŒæ§é ã§èšé²ããŠããŸãã
åå²ã¯åå²çŽåã®ç€é¢ã§Aããå§ãŸãã¢ã«ãã¡ãããã§è¡šç€ºãããŸãã
åå²ç®æã瀺ãã¢ã«ãã¡ãããããå·Šã¯ãªãã¯ããããšããã®åå²ã«é²ã¿ãŸãã
ã次ãžé²ãããã¿ã³ã¯æåŸã«éžãã åå²ãžé²ã¿ãŸããããããŸã éžæããŠããªãå Žåã¯æ瀺çã«æå®ããå¿ èŠããããŸãã
åå²ãåé€ãããå Žåãåå²ã®(ã¢ã«ãã¡ãããã®)é çªãå€æŽãããå Žåã¯ãã¢ã«ãã¡ãããã ãå³ã¯ãªãã¯ã ããŠãã ãããåå²ã«å¯Ÿããæäœããããã¢ããã¡ãã¥ãŒã§è¡šç€ºãããŸãã
org-modeææžäžã«æ£èãåã蟌ãã ã®ãªããšã¯ã¹ããŒãåŸã®ææžã«ãç€é¢ã衚瀺ãããŠæ¬²ãããšæãããšã§ããããããã§ã¯HTMLã§ã®ãšã¯ã¹ããŒãæã«ç€é¢ãåºåããæ¹æ³ã«ã€ããŠèª¬æããŸãã
æšæºã®HTMLããã¯ãšã³ãã¯ç¹æ®ãããã¯ãdivã¿ã°ã§å²ãã 圢ã§åºåããŸãã #+begin_igo
ïœ #+end_igo
ãç¹æ®ãããã¯ãªã®ã§ãHTMLã§åºåãããš <div class="igo"><p>
SGFããã¹ã </p></div>
ã®åœ¢ã§åºåãããŸãã
ç€é¢ã®åœ¢ã§è¡šç€ºããããå Žåã¯ãããŒãžèªã¿èŸŒã¿å®äºæã«JavaScriptã§äžæ¬å€æãããšè¯ãã§ãããã
äŸãã°æäœã®JavaScriptç¢ç€ã䜿çšãããªãã° misohena/js_igo: JavaScript Go Game Board ãã igo.js, igo_view.js, igo.css ãããŠã³ããŒãããäžã§ã次ã®ããã«ããŸãã
#+HTML_HEAD: <script src="igo.js"></script>
#+HTML_HEAD: <script src="igo_view.js"></script>
#+HTML_HEAD: <link rel="stylesheet" href="igo.css" />
#+HTML_HEAD: <script>window.addEventListener("load", ev=>{ for(elem of document.querySelectorAll("div.igo")){ let sgf = elem.textContent; while(elem.hasChildNodes()){elem.removeChild(elem.firstChild);} new igo.GameView(elem, sgf, {"showBranchText": true, "showLastMoveMark": true, "showComment": true, "path":1000}); }});</script>
ãäºãã«äºé£æãããšããã
#+begin_igo
(;FF[4]GM[1]SZ[9];B[fd];W[df];B[ff];W[dd])
#+end_igo
igoç¹æ®ãããã¯ã®åºå(å€æçµæ)èªäœãå€ããæ¹æ³ããããŸãã
igoç¹æ®ãããã¯ã®åºåãå€ããããã«ã¯org-modeã®ãšã¯ã¹ããŒã¿ãã«ã¹ã¿ãã€ãºããªããã°ãªããŸãããããã®æ¹æ³ãšããŠæ¬¡ã®äžã€ãçšæããŸããã
- æ¢åã®HTMLããã¯ãšã³ããä¿®æ£ãã
- HTMLããã¯ãšã³ããã掟çããæ°ããããã¯ãšã³ããå®çŸ©ãã
- ãããã¡ããŒã«ã«å€æ°ãæžãæ¿ãã
æã䜿ãåæã®è¯ãæ¹æ³ã¯æ¢åã®HTMLããã¯ãšã³ããä¿®æ£ããããšã§ããäžåºŠèšå®ããŠããŸãã°ãã¡ã€ã«æ¯ã«èšå®ããå¿ èŠã¯ãããŸããããæ®æ®µéãã®æäœã§ãšã¯ã¹ããŒãã§ããŸãã
次ã®ã³ãŒãã init.el ã«è¿œå ããŠãã ããã
(with-eval-after-load "ox-html"
(require 'igo-org-export-html)
(igo-org-modify-html-backend))
ãããš org-mode ã®HTMLããã¯ãšã³ããèªã¿èŸŒãŸããçŽåŸã«ãããæžãæ¿ããŠigoç¹æ®ãããã¯( #+begin_igo
ïœ #+end_igo
éšå)ãç¹å¥ã«åŠçããããã«ããŸãã
ããã©ã«ãã¯æäœã®JavaScriptç¢ç€ã䜿ãHTMLãåºåããã®ã§ã misohena/js_igo: JavaScript Go Game Board ãã igo.js, igo_view.js, igo.css ãããŠã³ããŒãããŠhtmlãšåãå Žæã«é 眮ããŠãã ããã
ããšã¯éåžžéãHTMLãšããŠãšã¯ã¹ããŒãããã ãã§ãã
äœããã®çç±ã§HTMLããã¯ãšã³ããçŽæ¥ä¿®æ£ããŠæ¬²ãããªãå Žåãæ°ããå°çšã®ããã¯ãšã³ããå®çŸ©ããããšãåºæ¥ãŸãã
次ã®ã³ãŒããå®è¡ãããš igo-html ãšããååã®ããã¯ãšã³ããç»é²ãããŸãã
(require 'igo-org-export-html)
(igo-org-define-html-backend t)
igo-org-define-html-backend
ã®åŒæ°ã« t
ãæå®ãããšã¡ãã¥ãŒã«é
ç®ãè¿œå ããŸãã
C-c C-e
ã§ãšã¯ã¹ããŒãã®ã¡ãã¥ãŒãåºããåŸã g ãæŒãããšã§ãã®ããã¯ãšã³ããæå®ã§ããŸãã
ããã¯ãšã³ããã«ã¹ã¿ãã€ãºããªããŠãããã¡ã€ã«ããšã«ãããã¡ããŒã«ã«å€æ°ãèšå®ããããšã§å€æåŠçãå€æŽã§ããŸãã
ãã®æ¹æ³ã䜿ãã«ã¯ãorg-modeææžã®äžã«æ¬¡ã®ã³ãŒããè¿œå ããŠãã ããã
#+begin_src emacs-lisp :exports results :results none
(require 'igo-org-export-html)
(igo-org-set-html-filters-local)
#+end_src
:exports results
ãæå®ããããšã§ãšã¯ã¹ããŒãã®ãã³ã«ãœãŒã¹ãããã¯ãè©äŸ¡ããã :results none
ãæå®ããããšã§çµæã®åºåãæå¶ããŠããŸãã
åŸã¯éåžžéãHTMLãšããŠãšã¯ã¹ããŒãããŠãã ããã
org-modeã®ããã©ã«ãèšå®ã§ã¯ãšã¯ã¹ããŒããããã³ã«ãœãŒã¹ãããã¯ãè©äŸ¡ãããèããŠããã®ã§ yes ãå ¥åããŠãã ããã
ãããšãããã¡ããŒã«ã«å€æ°ã«å€æãã£ã«ã¿ãèšå®ãããigoç¹æ®ãããã¯ãç¹å¥ã«å€æãããŸãã
igo-org-export-html.el ã䜿çšããŠå€æããå Žåã次ã®ãªãã·ã§ã³ã䜿çšã§ããŸãã
ãªãã·ã§ã³ | æå³ | ããã©ã«ãå€ |
---|---|---|
#+IGO_JS_PATH: <path-to-directory> | ã¹ã¯ãªããã®ãããã£ã¬ã¯ããªãžã®ãã¹ | igo-org-js-pathã®å€ (./) |
#+IGO_JS_TEMPLATE: <header-template> | HTMLã®HEADã«æ¿å ¥ããããã¹ãã®é圢(displayãjsã®ãšã) | igo-org-js-templateã®å€ |
#+IGO_LAZY_JS_TEMPLATE: <block-template> | igoç¹æ®ãããã¯ã®äžã«æ¿å ¥ããããã¹ãã®é圢(displayãlazy-jsã®ãšã) | igo-org-lazy-js-templateã®å€ |
#+IGO_HEADER_TEMPLATE: <header-template> | HTMLã®HEADã«æ¿å ¥ããããã¹ãã®é圢(displayãcustomã®ãšã) | igo-org-header-templateã®å€ |
#+IGO_BLOCK_TEMPLATE: <block-template> | igoç¹æ®ãããã¯ã®äžã«æ¿å ¥ããããã¹ãã®é圢(displayãcustomã®ãšã) | igo-org-block-templateã®å€ |
#+IGO_ENABLE: <boolean> | igoç¹æ®ãããã¯ãå€æãããã©ãã | t |
#+IGO_DISPLAY: <display-type> | igoç¹æ®ãããã¯ãã©ã®ããã«å€æããã | js |
#+IGO_ENABLE: nil
ãæå®ãããšãã¡ã€ã«å
ã§äžåã®å€æãæå¶ã§ããŸãã
#+IGO_DISPLAY:
ã«ã¯æ¬¡ã®ãããããæå®ã§ããŸãã
<display-type> | 衚瀺æ¹æ³ |
---|---|
none | é衚瀺 |
noconv | å€æããªã(SGFããã¹ãã®ãŸãŸ) |
js | js_igoã«ããJavaScriptç¢ç€ |
lazy-js | js_igoã«ããJavaScriptç¢ç€(é 延èªã¿èŸŒã¿åã<head></head>ã«ã¹ã¯ãªãããæ¿å ¥ããªã) |
svg | SVGç»ååã蟌㿠|
custom | #+IGO_HEADER_TEMPLATE: ãš #+IGO_BLOCK_TEMPLATE: ãäœ¿çš |
ãŸãã衚瀺æ¹æ³ã¯ãããã¯æ¯ã« #+begin_igo :display <display-type>
ã®åœ¢ã§ãæå®ã§ããŸãã
äŸ:
#+IGO_JS_PATH: ./js_igo/
#+IGO_DISPLAY: svg
#+begin_igo :move-number t :path A/A/B
....çç¥(SVGã§è¡šç€º)....
#+end_igo
#+begin_igo :read-only t :move-number t :path 5 :display js
....çç¥(js_igoã§è¡šç€º)....
#+end_igo
衚瀺æ¹æ³ã«ãã£ãŠã¯ãã³ãã¬ãŒãæååãæå®ã§ããŸãã
ãªãã·ã§ã³ã® <header-template> ã®éšåã¯ãHTMLã®HEADèŠçŽ å
ã«æ¿å
¥ããããã¹ãã®é圢ã§ãã衚瀺æ¹æ³ã js ã§ãããããã¯ãååšããå Žåã #+IGO_JS_TEMPLATE:
ãªãã·ã§ã³ã§æå®ããé圢ã䜿ãããŸãããŸãã衚瀺æ¹æ³ã custom ã§ãããããã¯ãååšããå Žåã #+IGO_HEADER_TEMPLATE:
ãªãã·ã§ã³ã§æå®ããé圢ã䜿ãããŸãã
<header-template> ã®äžã§ã¯æ¬¡ã®èšæ³ã䜿çšã§ããŸãã
% <var-name> % | 眮ãæãå |
---|---|
%PATH% | #+IGO_JS_PATH: ãªãã·ã§ã³ã®å€ |
ãªãã·ã§ã³ã® <block-template> ã®éšåã¯ãigoç¹æ®ãããã¯ã®äžã«æ¿å
¥ããããã¹ãã®é圢ã§ãã衚瀺æ¹æ³ã lazy-js ã®ãããã¯ã«ã¯ #+IGO_LAZY_JS_TEMPLATE:
ãªãã·ã§ã³ã§æå®ããé圢ã䜿ãããŸãããŸãã衚瀺æ¹æ³ã custom ã§ãããããã¯ã«ã¯ #+IGO_BLOCK_TEMPLATE:
ãªãã·ã§ã³ã§æå®ããé圢ã䜿ãããŸãã
<header-template> ã®äžã§ã¯æ¬¡ã®èšæ³ã䜿çšã§ããŸãã
% <var-name> % | 眮ãæãå |
---|---|
%PATH% | #+IGO_JS_PATH: ãªãã·ã§ã³ã®å€ |
%SGF% | SGFããã¹ã |
%OPT_JSON% | js_igoçšã®ãªãã·ã§ã³ |
%SVG% | ç€é¢ãSVGåããããã¹ã |
ãŸãã%ã®åŸã«æ¬¡ã®ãããããæå®ããããšã§ããã¹ãå ã®äžéšã®æåããšã¹ã±ãŒãã§ããŸãã
èšæ³ | 眮ãæããæå | 眮ãæãåŸã®æå |
---|---|---|
%HTML_<var-name>% | & < > | & < > |
%ATTR_<var-name>% | & < > â | & < > " |
%LITERAL_<var-name>% | \ â æ¹è¡ <!â <script </script | \ " \n <\!â <\script <\/script |
ã€ãŸããHTMLã®å±æ§ã®äžã«èšè¿°ãããšãã¯%ATTR_ããHTMLã®å
容éšåã«èšè¿°ãããšãã¯%HTML_ããJavaScriptã®æååãªãã©ã«å
ã«èšè¿°ãããšãã¯%LITERAL_ã䜿çšããŠãã ãããäŸãã°SGFãJavaScriptã®æååã«ããŠè§£æãããå Žåã parseSGF("%LITERAL_SGF%")
ã®ããã«èšè¿°ããŸãã