summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/struktex/struktex.el
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-26 00:19:36 +0000
committerKarl Berry <karl@freefriends.org>2010-06-26 00:19:36 +0000
commita5bf2a9c12d868210211134afe9df4b7d226cc01 (patch)
tree821bb7fbd0cd1be8eeee6a57712abd37ff194601 /Master/texmf-dist/doc/latex/struktex/struktex.el
parent3a5fcd31081ebdc323acff7877bfe16210969ead (diff)
struktex 101 (25jun10)
git-svn-id: svn://tug.org/texlive/trunk@19160 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/struktex/struktex.el')
-rw-r--r--Master/texmf-dist/doc/latex/struktex/struktex.el48
1 files changed, 39 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/latex/struktex/struktex.el b/Master/texmf-dist/doc/latex/struktex/struktex.el
index 13a65de84d1..fbdbf17bac0 100644
--- a/Master/texmf-dist/doc/latex/struktex/struktex.el
+++ b/Master/texmf-dist/doc/latex/struktex/struktex.el
@@ -3,8 +3,8 @@
;; Copyright (C) 2006 Free Software Foundation, Inc.
-;; Author: J. Hoffmann <j.hoffmann@fh-aachen.de>
-;; Maintainer: j.hoffmann@fh-aachen.de
+;; Author: J. Hoffmann <j.hoffmann_at_fh-aachen.de>
+;; Maintainer: j.hoffmann_at_fh-aachen.de
;; Created: 2006/01/17
;; Keywords: tex
@@ -17,6 +17,8 @@
(lambda ()
;; Add declaration to the list of environments which have an optional
;; argument for each item.
+ (add-to-list 'LaTeX-item-list
+ '("declaration" . LaTeX-item-argument))
(LaTeX-add-environments
"centernss"
'("struktogramm" LaTeX-env-struktogramm)
@@ -27,7 +29,7 @@
'("assign" [ "Height" ] "Statement")
"StrukTeX"
'("case" TeX-mac-case)
- "switch" "condition"
+ "switch" "Condition"
"caseend"
'("declarationtitle" "Title")
'("description" "Name" "Meaning")
@@ -36,8 +38,11 @@
'("forever" TeX-mac-forever)
"foreverend"
'("ifthenelse" TeX-mac-ifthenelse)
- "ifend"
"change"
+ "ifend"
+ '("inparallel" TeX-mac-inparallel)
+ '("task" "Description")
+ "inparallelend"
"sProofOn"
"sProofOff"
'("until" TeX-mac-until)
@@ -78,7 +83,7 @@
(format "[%s]" title)))))
(defun TeX-mac-case (macro)
- "Insert \case with all arguments, the needed \switch(es) and the final \caseend.
+ "Insert \\case with all arguments, the needed \\switch(es) and the final \\caseend.
These are optional height and the required arguments slope, number of cases,
condition, and the texts for the different cases"
(let ((height (read-string "Height (optional): "))
@@ -106,7 +111,7 @@ condition, and the texts for the different cases"
(insert "\\caseend")))
(defun TeX-mac-forever (macro)
- "Insert \forever-block with all arguments.
+ "Insert \\forever-block with all arguments.
This is only the optional height"
(let ((height (read-string "Height (optional): ")))
(insert (if (not (zerop (length height)))
@@ -117,7 +122,7 @@ This is only the optional height"
(insert "\\foreverend")))
(defun TeX-mac-ifthenelse (macro)
- "Insert \ifthenelse with all arguments.
+ "Insert \\ifthenelse with all arguments.
These are optional height and the required arguments left slope, right slope,
condition, and the possible values of the condition"
(let ((height (read-string "Height (optional): "))
@@ -139,8 +144,33 @@ condition, and the possible values of the condition"
(newline-and-indent)
(insert "\\ifend")))
+(defun TeX-mac-inparallel (macro)
+ "Insert \\inparallel with all arguments, the needed \\task(es) and the final \\inparallelend.
+These are optional height and the required arguments number of tasks
+and the descriptions for the parallel tasks"
+ (let ((height (read-string "Height (optional): "))
+ (number (read-string "Number of parallel tasks: "))
+ (text (read-string "Task no. 1: "))
+ (count 1)
+ )
+ (setq number-int (string-to-number number))
+ (insert (concat (if (not (zerop (length height)))
+ (format "[%s]" height))
+ (format "{%s}{%s}" number text)))
+ (while (< count number-int)
+ (end-of-line)
+ (newline-and-indent)
+ (newline-and-indent)
+ (setq prompt (format "Task no. %d: " (+ 1 count)))
+ (insert (format "\\task{%s}" (read-string prompt)))
+ (setq count (1+ count)))
+ (end-of-line)
+ (newline-and-indent)
+ (newline-and-indent)
+ (insert "\\inparallelend")))
+
(defun TeX-mac-until (macro)
- "Insert \until with all arguments.
+ "Insert \\until with all arguments.
These are the optional height and the required argument condition"
(let ((height (read-string "Height (optional): "))
(condition (read-string "Condition: ")))
@@ -153,7 +183,7 @@ These are the optional height and the required argument condition"
(insert "\\untilend")))
(defun TeX-mac-while (macro)
- "Insert \while with all arguments.
+ "Insert \\while with all arguments.
These are the optional height and the required argument condition"
(let ((height (read-string "Height (optional): "))
(condition (read-string "Condition: ")))