diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-28 23:58:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-28 23:58:21 +0000 |
commit | 4c1354bc80518900881117ec3e90b129ed171556 (patch) | |
tree | 9a0364aee8da100535810029d3645e3a8ee8aeb8 /Master/texmf-dist/doc/latex/youngtab/youngtab.el | |
parent | ae233f18c699dd1960b4a2e0c092af269f79735b (diff) |
rearrange youngtab
git-svn-id: svn://tug.org/texlive/trunk@17597 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/youngtab/youngtab.el')
-rw-r--r-- | Master/texmf-dist/doc/latex/youngtab/youngtab.el | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/youngtab/youngtab.el b/Master/texmf-dist/doc/latex/youngtab/youngtab.el new file mode 100644 index 00000000000..458049e8e2f --- /dev/null +++ b/Master/texmf-dist/doc/latex/youngtab/youngtab.el @@ -0,0 +1,42 @@ +;;; youngtab.el - Support for the user macros of the youngtab package +;; by Volker B"orchers, <boercher@physik.uni-bremen.de> +;; This program can be redistributed and/or modified under the terms +;; of the LaTeX Project Public License Distributed from CTAN +;; archives in directory macros/latex/base/lppl.txt; either +;; version 1 of the License, or any later version. + +;;-((and (not( = elisp favorite-language)) (concat "lucky" "it" "works" (!)))) + +(TeX-add-style-hook "youngtab" + (function + (lambda () + (TeX-add-symbols + '("Yboxdim" "Box Dimension") + '("Ylinethick" "Line Thickness") + '("Yinterspace" "Space between 2 Tableaux") + '("Yvcentermath" TeX-arg-young-bool) + '("Ystdtext" TeX-arg-young-bool) + '("yng" (TeX-arg-young t)) + '("young" TeX-arg-young) + )))) + +(defun TeX-arg-young (optional &optional isyng) + "Insert macros young and yng. +Ask for the rows of a tableau. +Do not accept non-numbers for yng." + (let ((num 0)) + (insert "(") + (while (>= num 0) + (setq num (1+ num)) + (setq row (read-input (concat (int-to-string num) ". Row: "))) + (if (zerop (length row)) + (setq num -1) + (if (and isyng (<= (string-to-int row) 0)) + (setq num (- num 1)) + (insert (if (> num 1) "," "") row))))) + (insert ")")) + +(defun TeX-arg-young-bool (optional) + "To handle the switches Yvcentermath and Ystdtext" + (insert (if (y-or-n-p "true(y) or false(n)? ") "1" "0"))) + |