File: yatexadd.doc

package info (click to toggle)
yatex 1.82-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,076 kB
  • sloc: lisp: 15,155; makefile: 194; ruby: 92; sh: 76
file content (219 lines) | stat: -rw-r--r-- 7,714 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
------------------------------------------------------------------------
			쒹pt֐̍쐬@
------------------------------------------------------------------------


yt֐Ƃ́z

	  begin ^⊮ŁAutabular ‹͂Ă鎞ɁA킽̍D
	̃X^CȂȂvȂǂƎvƂ͂܂񂩁Btabular 
	‹Ɍ炸ALaTeX ̊‹̈ɂ́Ael܂̃tH[}bg
	̂łBƂ΋Â\ tabular‹̈́A
	Ȃ蕡GȂ̂ŁAftHg̎͊֐A

		"{@{\vrule width 1pt\ }|||@{\ \vrule width 1pt}}"

	}邾̒PȊ֐̂قAlł傤B邢
	́AuȂ̗vȂB tabular Rs[ėقBv
	Ǝvlł傤B

	  YaTeX ̕t֐́A炩߁‹p̂d̓ʊ֐p
	ӂĂ̂ł͂ȂA‹p̓ʊ֐~ȂƎ̊
	`AƂRZvgɊÂ̂ŁAt֐̓o^̂
	̎葱邱ƂȂA֐`̏uԂg悤ɂȂ
	܂BuKvȂ̂́Adefun vłB


yz

	  ɁA֐ł͎g܂:-)Byatex-mode Nɂ́A
	̊֐`t@C[hĂȂĂ͂Ȃ܂B֐
	`t@C yatexhks.el(܂̓oCgRpC`
	 yatexhks.elc)ɂÃt@C load-path ɒuĂ΁A 
	쒹IɃ[h܂BȊÕt@Cɂꍇ́A
	yatex-mode-load-hook ɕt֐` Emacs-Lisp t@C[
	h悤Ȏd|Ă̂悢ł傤B


y֐`z

	  t֐ɂ́AeLaTeXR}h̃IvVԂ`̂́A
	section^⊮̈Ԃ́AWsection^⊮̈Y
	邽߂̂́AOނ܂Bł͕֋Xセ̎O‚A

		a. lj^t֐
		b. ^t֐
		c. ⊮t֐

	ƌĂԂƂɂ܂B

	  a ́Aȉ̗̂悤ɁAbegin^⊮ł\begin{‹}̒ɕt
	镶Asection^⊮ł LaTeX R}hƑ̊ԂɈ
	u镶Amaketitle^⊮ł LaTeX R}h̒Ɉʒu
	Ԃ悤Ȋ֐łB

	()	\begin{table}[ht]	(t֐ YaTeX:table)
		             ~~~~
		\put(100,200){}		(t֐ YaTeX:put)
		    ~~~~~~~~~
		\sum_{i=0}^{n}		(t֐ YaTeX:sum)
		    ~~~~~~~~~~

	lj^t֐́wLaTeXR}h̑O YaTeX: ‚OxŒ
	`܂B

	  b ́Aȉ̂悤section^R}ḧƂȂ镶Ԃ֐
	łB

	()	\newcommand{\foo}{bar}	(t֐ YaTeX::newcommand)
			    ~~~~  ~~~

	^t֐́wLaTeXR}h̑O YaTeX:: ‚OxŒ
	`܂B܂^t֐Ă΂鎞ɂsection^R}h̉
	Ԗڂ̈͂Ă̂֐ւ̈Ƃēn܂B
	āA^t֐͐̈Ž̂ƂĒ`Ä
	̒lɂ菈肷邱ƂɂȂ܂B

	(yatex.1.72̐V@\)
	  c ́AeLXg̈ꕔsection^R}ḧƂĊƂ
	ɁAw肵W̐擪Ɩ̊e|CgƂČĂ΂܂B
	Ƃ΁A

		5/3

	ƂeLXgWw肵 [prefix] S ŃZNV^R}h
	Ŋ肽ƂɁAeLXgɑ΂ĂȂ炩̏قǂ
	ƂɌĂ΂܂B

	()	5/3		5/3Ww肵 \frac Ŋ
		\frac{5/3}	5/3̃|CgʒuɌĂ΂
		      ~~~	(t֐ YaTeX::frac-region)
		

y`z

	  Ⴆ΁Atabular‹̃tH[}bgƂāA‚ł {|c|c|c|} 
	邾ŗǂ̂ȂA

		(defun YaTeX:tabular ()
		  "{|c|c|c|}")

	Ƃ΂悭AOq́AGȒ^ tabular tH[}bg}
	邽߂̊֐`ꍇ͎̂悤ɂ܂B

		(defun YaTeX:tabular ()
		  "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}")

	̎AEmacs-Lisp ̕ł́A\ g \\ ƕ\L邱ƂȂ
	ɒӂĉB

	  ܂A{} ̒A⊮ɒڃL[{[hǂݍ܂́A

		(defun YaTeX:tabular ()
		  (concat "{" (read-string "Rule: ") "}"))

	ȂǂƂΗǂł傤B

	  ɁA^t֐Ƃ \newcommand ̈ǂݍފ֐
	`ꍇᎦ܂B\newcommand ̑͐Vɒ`R}
	hȂ̂ŁAK擪 \ ܂B͂Ă̏ꍇ~j
	obt@ł͕ҏWÂ炢悤ȕGȒ`̂ŁA⊮Ȃ
	ǂł傤Blĕt֐`ƈȉ̂悤Ȃ
	̂ɂȂł傤B

		(defun YaTeX::newcommand (n)	;n͈̈ʒu
		  (cond
		   ((= n 1)			;ȂR}h
		    (read-string "Command: " "\\")) ;\͂Ƃ
		   ((= n 2) "")			;Ȃ牽Ȃ
		   (t nil)))

	ȂA^t֐ nil Ԃꍇ́Aʏ̈͊֐
	΂܂B

	  ŌɊ⊮t֐̗ƂāAeLXg \frac Ŋ
	ꍇ̗܂B\frac 2‚̈A\frac{a}{b} ̂
	ɂāA\ƂɗpR}hłBwIɂ

				a
		a/b          ----
				b

	ƒu”\ȋL@łBLaTeX\[Xa/bƏ̂쒹̊
	⊮\fracɊƁAȉ̂悤ɂȂ܂B

		\frac{a/b}

	/̕ }{ ɒuΐɂȂ܂B̂悤
	ƂΘbIɔōsȂAhC֐͈ȉ̂悤ɂ܂B

		(defun YaTeX::frac-region (beg end)	;W̐擪Ɩ
		  (catch 'done
		    (while (search-forward "/" end t)	;/ԌJԂ
		      (goto-char (match-beginning 0))	;/̈ʒuɈړ
		      (if (y-or-n-p "Replace this slash(/) to `}{'")
			  (throw 'done (replace-match "}{"))) ;uďI
		      (goto-char (match-end 0)))))


yĂ΂z

	  쒹{̂́Abegin^⊮section^⊮Amaketitle^⊮
	͎ɕt֐݂̑𒲂ׂĂĂяo܂Bbegin^⊮̏ꍇ 
	\begin{‹} ͂ꂽɌĂяo܂Bsection^⊮
	ł͑̕⊮̒OAmaketitle^⊮̏ꍇ́AR}h̒
	(‚̃Xy[X}钼O)ɌĂяo܂B^t֐́A
	section^R}ḧ͎̓ɂ̓sxĂ΂܂B⊮t
	֐́ALaTeXR}h{}eLXgɑ}ꂽɌĂ΂܂B


yQlz

	  t֐̒`̗ yatexadd.el ɗpӂ܂BۂɓƎ̕t
	֐`鎞̎QlƂĉB

	  LpƎv֐ɂ‚āAȒPɐ܂B

	E֐	YaTeX:read-position
	  	[] ̒ɓĂ悢𗅗񂵂B
	  	[htb] Ȃǂ̂悤 location w쐬܂B͂
		^[ƁA[]̂ȗ܂B[]̒ɗׂ
		 htbp ɌĂȂA(YaTeX:read-position "htbp")
		ƌĂяo܂B

	E֐	YaTeX-cplread-with-learning
	  	vvg
		ftHg⊮e[uϐV{
		[U⊮e[uϐV{
		[J⊮e[uϐV{
	  	uvvgvƂvvgoA⊮͂s܂B
		O‚̕ϐ̃e[u̒l̂⊮Ƃėp
		AVP͂ƎIɊwK܂BwK
		ʂ ~/.yatexrc  ./.yatexrc ɕۑ܂Bgp
		 YaTeX::documentstyle ֐̒`񂭂B

	E֐	YaTeX:read-coordinates
	  	{vvgAXWvvgAYWvvg(Sďȗ)
	  	u{vvg XWvvg:vƂvvgo
		āAXWǂݍ݁Au{vvg YWvvg:v
		oāAYWǂݍ݁A(XW,YW) ̗lȌ`쐬܂B
		͂^[ĂA(,)Ԃ܂B
		evvg̃ftHg͂ꂼADimension, X, Y łB

	E֐	YaTeX:check-comletion-type
	  	'begin ܂́A'section ܂́A'maketitle
	  	t֐Ă΂鎞ɁAsĂ⊮̌`Aŗ^
		̂ł邩ǂׁAłȂꍇɃG[IB
		ȂAϐ YaTeX-current-completion-type Ɍ݂̕⊮̌^
		\킷V{(̊֐̈Ɠl)i[Ă܂B


yŌɁz

	  KȊ֐`ȂAĂJĂ悢Ǝvꂽ
	AM҂܂ł艺B yatexadd.el Ɏ荞ōs
	v܂B


								LY
							yuuji@yatex.org