changeset 130:8703f090c628 dev

`[prefix] t e' for YaTeX-typeset-environment. It automatically mark current inner environment or portion of math mode, then call typeset-region on that region saving it in texput.tex.
author yuuji@gentei.org
date Thu, 27 May 2010 16:37:44 +0900
parents b11d6271207e
children bd0a9177e5e7
files docs/yatexe docs/yatexe.tex docs/yatexj docs/yatexj.tex yatex.el yatexlib.el yatexmth.el yatexprc.el
diffstat 8 files changed, 230 insertions(+), 142 deletions(-) [+]
line wrap: on
line diff
--- a/docs/yatexe	Thu May 27 13:49:44 2010 +0900
+++ b/docs/yatexe	Thu May 27 16:37:44 2010 +0900
@@ -121,6 +121,9 @@
              ... invoke latex
 `[prefix] t r'
              ... invoke latex on region
+`[prefix] t e'
+             ... invoke latex on current environment or whole
+              portion of current formulas in math-mode.
 `[prefix] t k'
              ... kill current typesetting process
 `[prefix] t b'
@@ -175,6 +178,12 @@
 if you edit one file, and is the same as main file's if you edit splitting
 files.
 
+  The `[prefix] te' key automatically marks current inner environment or
+inner math mode and then call typeset-region with marked region.  This is
+convenient to quick view of current tabular environment or current editing
+formulas.  Keeping previewer window for `texput.dvi' is handy for
+debugging.
+
 
 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting
 
@@ -2084,61 +2093,61 @@
 Node: Main features1865
 Node: Installation3456
 Node: Typesetting4232
-Node: Calling typesetter5167
-Node: Calling previewer6512
-Node: Printing out6872
-Node: %#notation7163
-Node: Changing typesetter7538
-Node: Splitting input files7901
-Node: Static region for typesetting9328
-Node: Lpr format10456
-Node: Editing %# notation11512
-Node: Completion12030
-Node: Begin-type completion12589
-Node: Section-type completion15632
-Node: view-sectioning18066
-Node: Large-type completion19645
-Node: Maketitle-type completion20375
-Node: Arbitrary completion20926
-Node: End completion21315
-Node: Accent completion21784
-Node: Image completion22400
-Node: Greek letters completion24656
-Node: Local dictionaries25382
-Node: Commenting out26318
-Node: Cursor jump27776
-Node: Jump to corresponding object28087
-Node: Invoking image processor29487
-Node: Jump to main file30829
-Node: Jumping around the environment31193
-Node: Jumping to last completion position31610
-Node: Changing and Deleting32118
-Node: Changing LaTeX commands32509
-Node: Killing LaTeX commands33685
-Node: Filling34869
-Node: Updation of includeonly36719
-Node: What column37515
-Node: Intelligent newline38599
-Node: Usepackage checker40259
-Node: Online help40849
-Node: Browsing file hierarchy42523
-Node: Cooperation with other packages44259
-Node: Customizations44963
-Node: Lisp variables45296
-Node: All customizable variables46299
-Node: Sample definitions56182
-Node: Hook variables56694
-Node: Hook file57397
-Node: Add-in functions57735
-Node: How the add-in function works58594
-Node: Defining option-add-in60792
-Node: Defining argument-add-in61513
-Node: Defining enclosing-add-in62394
-Node: How the function is called63247
-Node: Useful functions for creating add-in63922
-Node: Contribution65326
-Node: Add-in generator65599
-Node: Etcetera70992
-Node: Copying71596
+Node: Calling typesetter5300
+Node: Calling previewer6945
+Node: Printing out7305
+Node: %#notation7596
+Node: Changing typesetter7971
+Node: Splitting input files8334
+Node: Static region for typesetting9761
+Node: Lpr format10889
+Node: Editing %# notation11945
+Node: Completion12463
+Node: Begin-type completion13022
+Node: Section-type completion16065
+Node: view-sectioning18499
+Node: Large-type completion20078
+Node: Maketitle-type completion20808
+Node: Arbitrary completion21359
+Node: End completion21748
+Node: Accent completion22217
+Node: Image completion22833
+Node: Greek letters completion25089
+Node: Local dictionaries25815
+Node: Commenting out26751
+Node: Cursor jump28209
+Node: Jump to corresponding object28520
+Node: Invoking image processor29920
+Node: Jump to main file31262
+Node: Jumping around the environment31626
+Node: Jumping to last completion position32043
+Node: Changing and Deleting32551
+Node: Changing LaTeX commands32942
+Node: Killing LaTeX commands34118
+Node: Filling35302
+Node: Updation of includeonly37152
+Node: What column37948
+Node: Intelligent newline39032
+Node: Usepackage checker40692
+Node: Online help41282
+Node: Browsing file hierarchy42956
+Node: Cooperation with other packages44692
+Node: Customizations45396
+Node: Lisp variables45729
+Node: All customizable variables46732
+Node: Sample definitions56615
+Node: Hook variables57127
+Node: Hook file57830
+Node: Add-in functions58168
+Node: How the add-in function works59027
+Node: Defining option-add-in61225
+Node: Defining argument-add-in61946
+Node: Defining enclosing-add-in62827
+Node: How the function is called63680
+Node: Useful functions for creating add-in64355
+Node: Contribution65759
+Node: Add-in generator66032
+Node: Etcetera71425
+Node: Copying72029
 
 End tag table
--- a/docs/yatexe.tex	Thu May 27 13:49:44 2010 +0900
+++ b/docs/yatexe.tex	Thu May 27 16:37:44 2010 +0900
@@ -5,7 +5,7 @@
 
 @iftex
 @c @syncodeindex fn cp
-@c Last modified Thu May 27 10:33:22 2010 on firestorm
+@c Last modified Thu May 27 16:25:29 2010 on firestorm
 @syncodeindex vr cp
 @end iftex
 
@@ -145,6 +145,9 @@
         @dots{} invoke latex
 @item [prefix] t r
         @dots{} invoke latex on region
+@item [prefix] t e
+        @dots{} invoke latex on current environment or whole
+         portion of current formulas in math-mode.
 @item [prefix] t k
         @dots{} kill current typesetting process
 @item [prefix] t b
@@ -201,6 +204,12 @@
 file if you edit one  file,  and is the same as main file's if you
 edit splitting files.
 
+  The @kbd{[prefix] te} key automatically marks current inner environment
+or inner math mode and then call typeset-region with marked region.  This
+is convenient to quick view of current tabular environment or current
+editing formulas.  Keeping previewer window for @file{texput.dvi} is
+handy for debugging.
+
 @node Calling previewer, Printing out, Calling typesetter, Typesetting
 @comment  node-name,  next,  previous,  up
 @section Calling previewer
--- a/docs/yatexj	Thu May 27 13:49:44 2010 +0900
+++ b/docs/yatexj	Thu May 27 16:37:44 2010 +0900
@@ -185,6 +185,9 @@
              ... $B%?%$%W%;%C%?(B(platex)$B5/F0(B
 `[prefix] t r'
              ... $B%?%$%W%;%C%?5/F0(B($BNN0h;XDj(B)
+`[prefix] t e'
+             ... $B%?%$%W%;%C%?5/F0(B
+             ($B%]%$%s%H0LCV$N4D6-$^$?$O?t<0%b!<%I$N$_BP>N(B)
 `[prefix] t k'
              ... $BF0:nCf$N%?%$%W%;%C%?$NDd;_(B
 `[prefix] t b'
@@ -244,6 +247,18 @@
 $B%$%k$N$"$k%G%#%l%/%H%j$N(B`texput.tex'$B$H$$$&NW;~%U%!%$%k$K=PNO$5$l$^$9$N$G!"(B
 $B>e=q$-$K$OCm0U$7$F$/$@$5$$!#(B
 
+
+$B4D6-%?%$%W%;%C%H(B
+----------------
+
+
+  `[prefix] te' $B$r2!$9$H!"%]%$%s%H0LCV$N:G$bFbB&$N4D6-!"$^$?$O?t<0%b!<%IFb(B
+$B$N>l9g$O$=$N?t<0%b!<%IA4BN$,<+F0E*$KNN0hA*Br$5$l$F!"NN0h%?%$%W%;%C%H$r8F$S(B
+$B=P$7$^$9!#(Btabular$B4D6-$d?t<0%b!<%I$GJ#;($J$b$N$r:n$C$F$$$k>l9g$O3N$+$a$?$$(B
+$BItJ,$@$1$r3NG'$G$-$k$N$GJXMx$G$9!#$3$l$b(B `texput.tex' $B$K3:EvItJ,$r=q$-=P$7(B
+$B$^$9!#%W%l%t%e!<%"$G(B `texput.dvi' $B$r3+$$$?$^$^$K$7$F$*$1$P=$@5$H3NG'$,AGAa(B
+$B$/$G$-$k$G$7$g$&!#(B
+
 
 File: yatexj, Node: Calling previewer, Next: Print out, Prev: Calling typesetter, Up: Invocation
 
@@ -2002,59 +2017,59 @@
 Node: Main features3186
 Node: Installation5035
 Node: Invocation7121
-Node: Calling typesetter8216
-Node: Calling previewer10373
-Node: Print out10970
-Node: %#notation11415
-Node: Changing typesetter11982
-Node: Splitting input files12371
-Node: Fix region for typesetting14276
-Node: lpr format16021
-Node: Editing %# notation17421
-Node: Completion18173
-Node: begin$B7?Jd40(B18817
-Node: section$B7?Jd40(B22947
-Node: 2$B8D0J>e$N0z?t$r$H$k(B section$B7?%3%^%s%I(B24733
-Node: Enclose section-type command26231
-Node: Recursive completion26631
-Node: view-sectioning27183
-Node: label-generation29644
-Node: large$B7?Jd40(B30389
-Node: maketitle$B7?Jd40(B31516
-Node: Arbitrary completion31998
-Node: end$BJd40(B32604
-Node: Accent mark completion33241
-Node: Image completion33972
-Node: Greek letter completion37506
-Node: Local dictionary38501
-Node: Commenting out39741
-Node: Cursor jump41973
-Node: $BBP1~%*%V%8%'%/%H$X$N%8%c%s%W(B42347
-Node: $B$*3(IA$-%D!<%k5/F0(B44244
-Node: $B%a%$%s%U%!%$%k$X$N%8%c%s%W(B46209
-Node: $B4D6-$rC10L$H$7$?%8%c%s%W(B46878
-Node: $B:G8e$NJd400LCV$X$N%8%c%s%W(B47542
-Node: Modifying/Deleting48020
-Node: Changing LaTeX command48674
-Node: Killing LaTeX command49690
-Node: Filling51123
-Node: Includeonly53592
-Node: What column54681
-Node: Intelligent newline56030
-Node: Usepackage cheker57965
-Node: Changing mode of YaTeX58746
-Node: Online help59893
-Node: Inclusion hierarchy browser62036
-Node: Cooperation with other packages64491
-Node: Customizations65249
-Node: Lisp variables65735
-Node: All customizable variables66769
-Node: Sample definitions77898
-Node: Hook variables78477
-Node: Hook file79837
-Node: Add-in functions80172
-Node: Etc80590
-Node: Copying81231
-Node: Concept Index82676
+Node: Calling typesetter8352
+Node: Calling previewer11116
+Node: Print out11713
+Node: %#notation12158
+Node: Changing typesetter12725
+Node: Splitting input files13114
+Node: Fix region for typesetting15019
+Node: lpr format16764
+Node: Editing %# notation18164
+Node: Completion18916
+Node: begin$B7?Jd40(B19560
+Node: section$B7?Jd40(B23690
+Node: 2$B8D0J>e$N0z?t$r$H$k(B section$B7?%3%^%s%I(B25476
+Node: Enclose section-type command26974
+Node: Recursive completion27374
+Node: view-sectioning27926
+Node: label-generation30387
+Node: large$B7?Jd40(B31132
+Node: maketitle$B7?Jd40(B32259
+Node: Arbitrary completion32741
+Node: end$BJd40(B33347
+Node: Accent mark completion33984
+Node: Image completion34715
+Node: Greek letter completion38249
+Node: Local dictionary39244
+Node: Commenting out40484
+Node: Cursor jump42716
+Node: $BBP1~%*%V%8%'%/%H$X$N%8%c%s%W(B43090
+Node: $B$*3(IA$-%D!<%k5/F0(B44987
+Node: $B%a%$%s%U%!%$%k$X$N%8%c%s%W(B46952
+Node: $B4D6-$rC10L$H$7$?%8%c%s%W(B47621
+Node: $B:G8e$NJd400LCV$X$N%8%c%s%W(B48285
+Node: Modifying/Deleting48763
+Node: Changing LaTeX command49417
+Node: Killing LaTeX command50433
+Node: Filling51866
+Node: Includeonly54335
+Node: What column55424
+Node: Intelligent newline56773
+Node: Usepackage cheker58708
+Node: Changing mode of YaTeX59489
+Node: Online help60636
+Node: Inclusion hierarchy browser62779
+Node: Cooperation with other packages65234
+Node: Customizations65992
+Node: Lisp variables66478
+Node: All customizable variables67512
+Node: Sample definitions78641
+Node: Hook variables79220
+Node: Hook file80580
+Node: Add-in functions80915
+Node: Etc81333
+Node: Copying81974
+Node: Concept Index83419
 
 End tag table
--- a/docs/yatexj.tex	Thu May 27 13:49:44 2010 +0900
+++ b/docs/yatexj.tex	Thu May 27 16:37:44 2010 +0900
@@ -10,7 +10,7 @@
 @c ノードいじったら C-l C-u C-n 全部のノード更新 C-l C-u C-e
 @c メニュー増やしたら C-l C-u C-m 全部のメニュー更新 C-l C-u C-a
 @c フォーマットするときは C-l C-e C-b
-@c Last modified Thu May 27 10:32:20 2010 on firestorm
+@c Last modified Thu May 27 16:31:56 2010 on firestorm
 @syncodeindex vr cp
 @end iftex
 
@@ -224,6 +224,9 @@
         @dots{} タイプセッタ(platex)起動
 @item [prefix] t r
         @dots{} タイプセッタ起動(領域指定)
+@item [prefix] t e
+        @dots{} タイプセッタ起動
+        (ポイント位置の環境または数式モードのみ対称)
 @item [prefix] t k
         @dots{} 動作中のタイプセッタの停止
 @item [prefix] t b
@@ -285,6 +288,15 @@
 メインファイルのあるディレクトリの@file{texput.tex}という臨時ファイルに出
 力されますので、上書きには注意してください。
 
+@subsection{環境タイプセット}
+
+  @kbd{[prefix] te} を押すと、ポイント位置の最も内側の環境、または数式モー
+ド内の場合はその数式モード全体が自動的に領域選択されて、領域タイプセットを
+呼び出します。tabular環境や数式モードで複雑なものを作っている場合は確かめた
+い部分だけを確認できるので便利です。これも @file{texput.tex} に該当部分を
+書き出します。プレヴューアで @file{texput.dvi} を開いたままにしておけば
+修正と確認が素早くできるでしょう。
+
 @node Calling previewer, Print out, Calling typesetter, Invocation
 @comment  node-name,  next,  previous,  up
 @section プレヴューア起動
--- a/yatex.el	Thu May 27 13:49:44 2010 +0900
+++ b/yatex.el	Thu May 27 16:37:44 2010 +0900
@@ -2,7 +2,7 @@
 ;;; Yet Another tex-mode for emacs - //野鳥//
 ;;; yatex.el rev. 1.74.3
 ;;; (c)1991-2010 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Thu May 27 13:45:10 2010 on firestorm
+;;; Last modified Thu May 27 14:55:07 2010 on firestorm
 ;;; $Id$
 ;;; The latest version of this software is always available at;
 ;;; http://www.yatex.org/
@@ -750,6 +750,7 @@
 (autoload 'YaTeX-goto-open-paren "yatexmth" "Goto opening paren" t)
 (autoload 'YaTeX-change-parentheses "yatexmth" "Change corresponding parens" t)
 (autoload 'YaTeX-goto-corresponding-paren "yatexmth" "\bigl\bigr jumps" t)
+(autoload 'YaTeX-typeset-math-region "yatexmth" "Typeset math-region" t)
 
 ;;autoload from yatexhlp.el
 (autoload 'YaTeX-help "yatexhlp" "YaTeX helper with LaTeX commands." t)
@@ -1449,7 +1450,7 @@
 Optional second argument CHAR is for non-interactive call from menu."
   (interactive "P")
   (message
-   (concat "J)latex R)egion B)ibtex mk(I)dx "
+   (concat "J)latex R)egion E)nv B)ibtex mk(I)dx "
 	   "latex+p(D)f "
 	   (if (fboundp 'start-process) "K)ill ")
 	   "P)review "
@@ -1461,6 +1462,7 @@
     (cond
      ((= c ?j) (YaTeX-typeset-buffer))
      ((= c ?r) (YaTeX-typeset-region))
+     ((= c ?e) (YaTeX-typeset-environment))
      ((= c ?b) (YaTeX-call-command-on-file
 		bibtex-command "*YaTeX-bibtex*" YaTeX-parent-file))
      ((= c ?i) (YaTeX-call-command-on-file
--- a/yatexlib.el	Thu May 27 13:49:44 2010 +0900
+++ b/yatexlib.el	Thu May 27 16:37:44 2010 +0900
@@ -2,7 +2,7 @@
 ;;; YaTeX and yahtml common libraries, general functions and definitions
 ;;; yatexlib.el
 ;;; (c)1994-2009 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Mon Sep 28 10:46:39 2009 on firestorm
+;;; Last modified Thu May 27 15:09:44 2010 on firestorm
 ;;; $Id$
 
 ;; General variables
@@ -1015,28 +1015,31 @@
 (defun YaTeX-mark-environment ()
   "Mark current position and move point to end of environment."
   (interactive)
+  (require 'yatexmth)
   (let ((curp (point)))
-    (if (and (YaTeX-on-begin-end-p) (match-beginning 1)) ;if on \\begin
-	(progn (goto-char (match-end 0)))
-      (if (= (char-after (point)) ?\\) nil	;if on \\end
-	(skip-chars-backward "^\n\\\\")
-	(or (bolp) (forward-char -1))))
-    (if (not (YaTeX-end-of-environment))   ;arg1 turns to match-beginning 1
-	(progn
-	  (goto-char curp)
-	  (error "Cannot found the end of current environment."))
-      (YaTeX-goto-corresponding-environment)
-      (beginning-of-line)		;for confirmation
-      (if (< curp (point))
+    (if (YaTeX-in-math-mode-p)
+	(YaTeX-mark-mathenv)
+      (if (and (YaTeX-on-begin-end-p) (match-beginning 1)) ;if on \\begin
+	  (progn (goto-char (match-end 0)))
+	(if (= (char-after (point)) ?\\) nil ;if on \\end
+	  (skip-chars-backward "^\n\\\\")
+	  (or (bolp) (forward-char -1))))
+      (if (not (YaTeX-end-of-environment)) ;arg1 turns to match-beginning 1
 	  (progn
-	    (message "Mark this environment?(y or n): ")
-	    (if (= (read-char) ?y) nil
-	      (goto-char curp)
-	      (error "Abort.  Please call again at more proper position."))))
-      (set-mark-command nil)
-      (YaTeX-goto-corresponding-environment)
-      (end-of-line)
-      (if (eobp) nil (forward-char 1)))))
+	    (goto-char curp)
+	    (error "Cannot found the end of current environment."))
+	(YaTeX-goto-corresponding-environment)
+	(beginning-of-line)		;for confirmation
+	(if (< curp (point))
+	    (progn
+	      (message "Mark this environment?(y or n): ")
+	      (if (= (read-char) ?y) nil
+		(goto-char curp)
+		(error "Abort.  Please call again at more proper position."))))
+	(set-mark-command nil)
+	(YaTeX-goto-corresponding-environment)
+	(end-of-line)
+	(if (eobp) nil (forward-char 1))))))
 
 (defun YaTeX-kill-buffer (buffer)
   "Make effort to show parent buffer after kill."
--- a/yatexmth.el	Thu May 27 13:49:44 2010 +0900
+++ b/yatexmth.el	Thu May 27 16:37:44 2010 +0900
@@ -2,7 +2,7 @@
 ;;; YaTeX math-mode-specific functions.
 ;;; yatexmth.el
 ;;; (c)1993-2006 by HIROSE Yuuji [yuuji@yatex.org]
-;;; Last modified Thu May 27 11:32:20 2010 on firestorm
+;;; Last modified Thu May 27 16:33:55 2010 on firestorm
 ;;; $Id$
 
 ;;; [Customization guide]
@@ -506,7 +506,7 @@
 	      ;;  "alignat*" "xalignat" "xalignat*" "xxalignat" "xxalignat*"
 	      YaTeX-math-begin-list
 	    )))
-	(let*((p (point)) (nest 0) me0 r
+	(let*((p (point)) (nest 0) me0 r firstp dollar
 	      (delim (concat YaTeX-sectioning-regexp "\\|^$\\|^\C-l"))
 	      (boundary
 	       (save-excursion
@@ -530,8 +530,8 @@
 			  (setq nest (1+ nest))
 			(if (= (preceding-char) ?\\ ) nil ;;\\[5pt]
 			  (setq nest (1- nest))))))
-		  (if (< nest 0) (throw 'open t))))
-	      t)
+		  (if (< nest 0)
+		      (throw 'open (cons (YaTeX-match-string 0) (point)))))))
 	     ((and (setq r (YaTeX-on-section-command-p
 			    YaTeX-math-section-type-regexp))
 		   (numberp r)
@@ -541,8 +541,10 @@
 		  (while ;(search-backward "$" boundary t);little bit fast.
 		      (YaTeX-re-search-active-backward ;;;;;; Too slow???
 		       "\\$" (concat "[^\\\\]" YaTeX-comment-prefix) boundary t)
+		    (setq dollar "$")
 		    (cond
 		     ((equal (char-after (1- (point))) ?$) ; $$ equation $$
+		      (setq dollar "$$")
 		      (backward-char 1)
 		      (setq nest (1+ nest)))
 		     ((let ((YaTeX-verbatim-environments
@@ -553,8 +555,37 @@
 		     ((and (equal (char-after (1- (point))) ?\\ )
 			   (not (equal (char-after (- (point) 3)) ?\\ )))
 		      nil)		;\$
-		     (t (setq nest (1+ nest)))))
-		  (if (= (% nest 2) 1) (throw 'dollar t))))))))))
+		     (t (setq nest (1+ nest))))
+		    (if (and (= nest 1) (null firstp))
+			(setq firstp (cons dollar (point)))))
+		  (if (= (% nest 2) 1)
+		      (throw 'dollar firstp))))))))))
+
+(defun YaTeX-mark-mathenv ()
+  "Mark current mathematic environment."
+  (interactive)
+  (let ((mmp (YaTeX-in-math-mode-p)) type bpt)
+    (if (or (null mmp) (not (stringp (setq type (car mmp)))))
+	nil				;if nil or not string, do nothing
+     (setq bpt (cdr mmp))
+     (goto-char bpt)
+     (cond
+      ((string-match "\\$" type)
+       (set-mark-command nil)
+       (skip-chars-forward "$")
+       (YaTeX-search-active-forward
+	type YaTeX-comment-prefix nil)	;if it cause error, obey it
+       (goto-char (match-end 0)))
+      ;;
+      ((string-match "^\\\\[\\[(]" type)
+       (set-mark-command nil)
+       (YaTeX-goto-corresponding-leftright)
+       (skip-chars-forward "])\\\\"))
+      ;;
+      ((string-match "^[a-z]" type)	; \begin\end type math
+       (set-mark-command nil)
+       (YaTeX-goto-corresponding-environment)
+       (goto-char (match-end 0)))))))
 
 (defun YaTeX-math-display-list (list cols)
   (goto-char (point-max))
--- a/yatexprc.el	Thu May 27 13:49:44 2010 +0900
+++ b/yatexprc.el	Thu May 27 16:37:44 2010 +0900
@@ -2,7 +2,7 @@
 ;;; YaTeX process handler.
 ;;; yatexprc.el
 ;;; (c)1993-2010 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Thu May 27 10:26:59 2010 on firestorm
+;;; Last modified Thu May 27 14:55:49 2010 on firestorm
 ;;; $Id$
 
 ;(require 'yatex)
@@ -279,6 +279,13 @@
       (put 'dvi2-command 'file buffer)
       (put 'dvi2-command 'offset lineinfo))))
 
+(defun YaTeX-typeset-environment ()
+  "Typeset current math environment"
+  (interactive)
+  (save-excursion
+    (YaTeX-mark-environment)
+    (YaTeX-typeset-region)))
+
 (defun YaTeX-typeset-buffer (&optional pp)
   "Typeset whole buffer.
 If %#! usage says other buffer is main text,

yatex.org