Mercurial > emacs
annotate doc/lispref/two.el @ 95948:d55ec23f052d
*** empty log message ***
| author | Glenn Morris <rgm@gnu.org> |
|---|---|
| date | Sun, 15 Jun 2008 02:53:17 +0000 |
| parents | fde6f792a832 |
| children | cb5d2387102c |
| rev | line source |
|---|---|
| 84108 | 1 ;; Auxiliary functions for preparing a two volume manual. |
| 2 | |
| 87649 | 3 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
| 84108 | 4 ;; Free Software Foundation, Inc. |
| 5 | |
| 6 ;; --rjc 30mar92 | |
| 7 | |
|
95035
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
8 ;; This file is free software: you can redistribute it and/or modify |
| 84108 | 9 ;; it under the terms of the GNU General Public License as published by |
|
95035
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
10 ;; the Free Software Foundation, either version 3 of the License, or |
|
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
11 ;; (at your option) any later version. |
| 84108 | 12 |
| 13 ;; This file is distributed in the hope that it will be useful, | |
| 14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 ;; GNU General Public License for more details. | |
| 17 | |
| 18 ;; You should have received a copy of the GNU General Public License | |
|
95035
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
19 ;; along with this file. If not, see <http://www.gnu.org/licenses/>. |
|
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
20 |
| 84108 | 21 |
| 22 (defun volume-aux-markup (arg) | |
| 23 "Append `vol. NUMBER' to page number. | |
| 24 Apply to aux file that you save. | |
| 25 Then insert marked file into other volume's .aux file." | |
| 26 (interactive "sType volume number, 1 or 2: " ) | |
| 27 (goto-char (point-min)) | |
| 28 (while (search-forward "-pg" nil t) | |
| 29 (end-of-line 1) | |
| 30 (delete-backward-char 1 nil) | |
| 31 (insert ", vol.'tie" arg "}"))) | |
| 32 | |
| 33 (defun volume-index-markup (arg) | |
| 34 "Prepend `NUMBER:' to page number. Use Roman Numeral. | |
| 35 Apply only to unsorted index file, | |
| 36 Then insert marked file into other volume's unsorted index file. | |
| 37 Then run texindex on that file and save." | |
| 38 (interactive | |
| 39 "sType volume number, roman number I or II: " ) | |
| 40 (goto-char (point-min)) | |
| 41 (while (search-forward "\\entry" nil t) | |
| 42 (search-forward "}{" (save-excursion (end-of-line) (point)) nil) | |
| 43 (insert arg ":"))) | |
| 44 | |
| 45 (defun volume-numbers-toc-markup (arg) | |
| 46 (interactive | |
| 47 "sType volume number, roman number I or II: " ) | |
| 48 (goto-char (point-min)) | |
| 49 (while (search-forward "chapentry" nil t) | |
| 50 (end-of-line) | |
| 51 (search-backward "{" nil t) | |
| 52 (forward-char 1) | |
| 53 (insert arg ":"))) | |
| 54 | |
| 55 (defun volume-header-toc-markup () | |
| 56 "Insert Volume I and Volume II text into .toc file. | |
| 57 NOTE: this auxilary function is file specific. | |
| 58 This is for the *Elisp Ref Manual*" | |
| 59 (interactive) | |
| 60 (goto-char (point-min)) | |
| 61 (insert "\\unnumbchapentry {Volume 1}{}\n\\unnumbchapentry {}{}\n") | |
| 62 (search-forward "\\unnumbchapentry {Index}") | |
| 63 (forward-line 1) | |
| 64 (insert | |
| 65 "\\unnumbchapentry {}{}\n\\unnumbchapentry {}{}\n\\unnumbchapentry {}{}\n\\unnumbchapentry {}{}\n\\unnumbchapentry {Volume 2}{}\n\\unnumbchapentry {}{}\n")) | |
| 66 | |
| 67 | |
| 68 ;;; In batch mode, you cannot call functions with args; hence this kludge: | |
| 69 | |
| 70 (defun volume-aux-markup-1 () (volume-aux-markup "1")) | |
| 71 (defun volume-aux-markup-2 () (volume-aux-markup "2")) | |
| 72 | |
| 73 (defun volume-index-markup-I () (volume-index-markup "I")) | |
| 74 (defun volume-index-markup-II () (volume-index-markup "II")) | |
| 75 | |
| 76 (defun volume-numbers-toc-markup-I () (volume-numbers-toc-markup "I")) | |
| 77 (defun volume-numbers-toc-markup-II () (volume-numbers-toc-markup "II")) | |
| 78 | |
|
95035
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
79 ;; arch-tag: 848955fe-e9cf-45e7-a2f1-570ef156d6a5 |
|
fde6f792a832
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
80 ;;; two.el ends here |
