2021-06-19 17:33:24 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								[def-syntax q [[_] [str "\""]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[script "packages/font-fallback"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[script "packages/grid"]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[script "packages/image"]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 17:33:24 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[define section-var 1]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[define sub-section-var 1]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[define section-title ""]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								% custom macro
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[def-syntax section
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[[_ x][str-append-many
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[set! section-title [str-append [str-append [str section-var] [str ". "  ]] [str x]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[font [[size "20pt"][weight "800"]] section-title]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[set! section-var [+ section-var 1]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[set! sub-section-var 1]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								% custom macro
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[def-syntax subsection
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[[_ x][str-append-many
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[set! section-title [str-append [str-append [str sub-section-var] [str ". "  ]] [str x]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[font [[size "16pt"][weight "600"]] section-title]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[set! sub-section-var [+ sub-section-var 1]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								]]]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 17:33:24 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[docu-para [[class "book"][papersize "b5"]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[docu
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[call grid [[spacing "15pt"]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[call font:add-fallback [[family "Noto Serif CJK TC"]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[font-size "30pt" "Huan-gîng 使用 Clochur!"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[font-size "20pt" "Welcome to use"] [font [[family "sligeach_orig"][size "20pt"]] "Clóċur"][font-size "20pt" ", a toy editor, toy intepreter and a toy typesetting-engine frontend."]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[section "What is Clochur?"]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 17:33:24 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Clochur, or printed as "\""[font-family "sligeach_orig" "Clóċur"]"\"" in Irish language ([italic "\"CLOW-kur\""] Clóċur as Roman type, which means [q]typesetting[q]), is a toy-lisp typesetting language with a intepreter written in Python 3, and with a simple Editor written in PyQt5 and QScintilla.
							 
						 
					
						
							
								
									
										
										
										
											2021-06-19 17:33:24 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								It generate a XML that is readable for SILE, which is a typesetting engine written in Lua,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								and it generate PDF with SILE.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The functions that it has (although may be buggy or needed to be tested) is:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 - Macro expansion.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 - call SILE command.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 - count basic arithmetic expression.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[str "- lambda function"], function definition.
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[section "Simple manual"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[subsection "Editor interface"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[call img [[src "total-interface.png"] [height "200px"]]]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[subsection "Arimetic calculation and variable and function definition"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[subsection "Special character"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[subsection "Font formatting"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[subsection "Call SILE function and packages"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[subsection "Macro"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Using [font-family "Noto Sans Mono CJK TC" "def-syntax"], you can add your macro to sile. the example is a "custom-section" macro:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[call noindent][font-family "Noto Sans Mono CJK TC" "[def-syntax subsection"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[call noindent][font-family "Noto Sans Mono CJK TC" "[[_ x][str-append"]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[call noindent][font-family "Noto Sans Mono CJK TC" "[set! section-title [str-append [str-append [str sub-section-var] [str \". \"  ]] [str x]]]"]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:12:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[call noindent][font-family "Noto Sans Mono CJK TC" "[font [[size \"16pt\"][weight \"600\"]] section-title]"]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:24:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[call noindent][font-family "Noto Sans Mono CJK TC" "set! sub-section-var [+ sub-section-var 1]]]]]"]
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:24:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[str "underline
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:24:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								bold
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								italic
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								font-size
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								font-family
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								font
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								begin
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cons
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								car
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cdr
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ls-ref
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ls
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								begin
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								script
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								docu-para
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								call
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								xml-to-string
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-20 23:24:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								SILE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								print
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								set!
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								def-syntax
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								define function, closure, lambda
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								str
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								str-append
							 
						 
					
						
							
								
									
										
										
										
											2021-06-28 00:22:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								str-append-many" ]]