diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-20 22:30:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-20 22:30:34 +0000 |
commit | b78f8eca13b9e470f04335d921404e57b4ce1e46 (patch) | |
tree | 2982781550ce418fcd96ac6550f301316b247a13 /Master/texmf-dist/doc/latex/struktex/struktex.el | |
parent | 044ada565a6fefa47f32f30e2a4ad048d5ffad3d (diff) |
struktex again
git-svn-id: svn://tug.org/texlive/trunk@1995 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.el | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/struktex/struktex.el b/Master/texmf-dist/doc/latex/struktex/struktex.el index 1545000103a..13a65de84d1 100644 --- a/Master/texmf-dist/doc/latex/struktex/struktex.el +++ b/Master/texmf-dist/doc/latex/struktex/struktex.el @@ -78,26 +78,32 @@ (format "[%s]" title))))) (defun TeX-mac-case (macro) - "Insert \case with all arguments. + "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 text of the first case" +condition, and the texts for the different cases" (let ((height (read-string "Height (optional): ")) (slope (read-string "Slope: ")) (number (read-string "Number of cases: ")) (condition (read-string "Condition: ")) - (text (read-string "Text: "))) + (text (read-string "Case no. 1: ")) + (count 1) + ) + (setq number-int (string-to-number number)) (insert (concat (if (not (zerop (length height))) (format "[%s]" height)) (format "{%s}{%s}{%s}{%s}" slope number condition text))) - (end-of-line) - (newline-and-indent) - (newline-and-indent) - (insert "\\switch{ }") - (end-of-line) - (newline-and-indent) - (newline-and-indent) - (insert "\\caseend"))) + (while (< count number-int) + (end-of-line) + (newline-and-indent) + (newline-and-indent) + (setq prompt (format "Case no. %d: " (+ 1 count))) + (insert (format "\\switch{%s}" (read-string prompt))) + (setq count (1+ count))) + (end-of-line) + (newline-and-indent) + (newline-and-indent) + (insert "\\caseend"))) (defun TeX-mac-forever (macro) "Insert \forever-block with all arguments. |