No subject
Fri Jan 31 06:23:24 EST 2014
>From suter Tue Oct 9 10:21:11 2001
Return-Path: <owner-general at lists.humbug.org.au>
Received: from diadora.client.uq.net.au (IDENT:root at diadora-2 [10.0.1.2])
by zwitterion.humbug.org.au (8.12.1/8.12.1/Debian -1) with ESMTP id f990LBIk002011
for <suter at zwitterion.humbug.org.au>; Tue, 9 Oct 2001 10:21:11 +1000
Received: from caliburn.humbug.org.au (caliburn.humbug.org.au [203.15.51.6])
by diadora.client.uq.net.au (8.12.1/8.12.1/Debian -1) with ESMTP id f990LAHa024819
for <suter at zwitterion.humbug.org.au>; Tue, 9 Oct 2001 10:21:10 +1000
Received: from mdlishum by caliburn.humbug.org.au with local (Exim 3.03 #1)
id 15qkY5-000EId-00
for general-outgoing at lists.humbug.org.au; Tue, 09 Oct 2001 10:15:05 +1000
Received: from easy.stallion.com ([203.143.238.9] helo=arduous.stallion.oz.au)
by caliburn.humbug.org.au with smtp (Exim 3.03 #1)
id 15qkY0-000EIL-00
for general at lists.humbug.org.au; Tue, 09 Oct 2001 10:15:00 +1000
Received: from stallion.stallion.oz.au by arduous.stallion.oz.au with ussmtp
id aa16814 for <general at lists.humbug.org.au>;
Tue, 9 Oct 2001 10:08:06 +1000 (EST)
Received: from gweepery.stallion.oz.au by stallion.stallion.oz.au id aa06717;
9 Oct 2001 10:07 AEST
Received: from chris by gweepery.stallion.oz.au with local (Exim 3.32 #1 (Debian))
id 15qkQt-00030t-00
for <general at lists.humbug.org.au>; Tue, 09 Oct 2001 10:07:39 +1000
To: general at lists.humbug.org.au
Subject: [H-GEN] Re: LaTeX
References: <Pine.LNX.4.30.0110051429060.503-100000 at conway.bne.pisoftware.com>
<nospam-1002261622.11876 at mx1.gbch.net>
<87pu82lh4s.fsf_-_ at freezer.home>
<sa1ykh5di3.fsf at gweepery.stallion.oz.au> <87sncxm2x6.fsf at freezer.home>
<sa669qdibn.fsf at gweepery.stallion.oz.au> <871yke3lhy.fsf at freezer.home>
From: Christopher Biggs <chris at stallion.oz.au>
In-Reply-To: <871yke3lhy.fsf at freezer.home> (Jason Henry Parker's message of "08 Oct
2001 12:37:29 +1000")
User-Agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/20.7
Date: 09 Oct 2001 10:07:39 +1000
Message-ID: <sad73x7k1g.fsf_-_ at gweepery.stallion.oz.au>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Sender: owner-general at lists.humbug.org.au
Precedence: bulk
Reply-To: general at lists.humbug.org.au
X-Loop: general at lists.humbug.org.au
List-Help: <mailto:majordomo at lists.humbug.org.au?subject=help>
List-Post: <mailto:general at lists.humbug.org.au>
List-Subscribe: <mailto: general-request at lists.humbug.org.au?subject=subscribe>
List-Id: semi-serious discussions about Humbug and Unix-related topics <general at lists.humbug.org.au>
List-Unsubscribe: <mailto: general-request at lists.humbug.org.au?subject=unsubscribe>
List-Archive: <http://archive.humbug.org.au/humbug-general/>
Status: RO
Content-Length: 4726
Lines: 75
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]
--=-=-=
I wrote:
>
> > I can send (or post) the template rules and the template file(s) if
> > you want them.
Jason Henry Parker <jasonp at uq.net.au> moved upon the face of the 'Net and spake thusly:
>
> That'd be neat; post or mail as you see fit.
>
Included below is a snippet from my .emacs, concerning my auto-insert config.
Following that are examples of my template files, which are based on
the ones shipped with the auto-insert package. Contact me off list if
you want the whole box and dice.
--
| Christopher J. Biggs -|- R & D Software Engineer -- Stallion Technologies |
| chris at stallion.oz.au -|- If it isn't broken, I just haven't touched it yet |
\---------veni vidi nuclei deceiri --- I came, I saw, I dumped core----------/
--=-=-=
Content-Disposition: inline
Content-Description: .emacs extract
;;************************ AUTO INSERT FEATURE ************************
(message "Auto-insert setup")
(require 'auto-insert-tkld)
;; Set local-insert-path to wherever you keep your personal templates.
(setq local-insert-path (concat mylisp-dir "insert"))
(or (member local-insert-path auto-insert-path)
(setq auto-insert-path (cons local-insert-path auto-insert-path)))
(defun add-auto-insert-template (name insfile &optional pattern)
"Add a new auto-insert rule.
Addition is done idempotently (based on name).
name is the name of the document type
insfile is the file-name of the template file for that template type
pattern is a regexp matching filenames for which this template should
be inserted automatically. No auto insert will be done if pattern
is nil."
(unless
;;
;; Determine if we are to insert the rule.
;;
(assoc name auto-insert-type-alist)
;;
;; If we are to insert the rule cons it onto the type list, and if there
;; is a pattern supplied, cons it onto the auto-insert pattern list too.
;;
(push (cons name insfile) auto-insert-type-alist)
(when pattern
(push (cons pattern name) auto-insert-alist))
))
(defun add-auto-insert-pattern (pattern type)
"Add a new filename->type mapping to auto-insert-alist"
(unless (assoc pattern auto-insert-alist)
(push (cons pattern type) auto-insert-alist)))
(add-auto-insert-template "Common Lisp" "lisp-insert.lsp" "\\.li?sp$")
(add-auto-insert-template "Scheme" "scheme-insert.scm" "\\.\\(scm\\|ss\\)$")
(add-auto-insert-template "Forth" "forth-insert.f" "\\.\\(f\\|4th\\|seq\\)$")
(add-auto-insert-template "LaTeX Letter" "letter-insert.ltx" "\\.let$")
(add-auto-insert-template "X-File" "x-insert.x")
(add-auto-insert-template "x" "x-insert.x")
(add-auto-insert-template "C++-Header" "h++-insert.hh"
"\\.\\(h\\++\\|hpp\\|H\\)$")
(add-auto-insert-pattern "\\.cpp$" "C++")
--=-=-=
Content-Disposition: attachment; filename=letter-insert.ltx
Content-Description: LaTeX letter template
%% -*- LaTeX -*-
%% Title: %b
%%
%% Doc: %p
%% Original Author: %U %a
%% Created: %d
%%
\documentclass[a4paper,12pt]{letter}
\usepackage{pslatex}
%% Set up the margins a bit narrower than the TeX default.
\addtolength{\hoffset}{-1cm}
\addtolength{\textwidth}{2cm}
\addtolength{\voffset}{-2cm}
\addtolength{\textheight}{4cm}
%% Some useful definitions...
\begin{document}
\fontfamily{phv}
\sffamily
\address{Christopher Biggs\\Stallion Technologies\\33 Woodstock Rd\\Toowong 4066\\Australia\\phone: +61-7-3270-4266\\fax: +61-7-3270-4245\\email: chris at stallion.oz.au}
\signature{Christopher Biggs}
\begin{letter}{%[Recipient: %] }
\opening{%[Opening: %]}
%@
\closing{Thank you for your assistance}
\end{letter}
\end{document}
%% Local Variables:
%% End:
--=-=-=
Content-Disposition: attachment; filename=latex-insert.tex
Content-Description: Generic LaTeX template
%% Title: %b
%%
%% Doc: %p
%% Original Author: %U %a
%% Created: %d
%%
\documentclass[%[Options: %]]{%[Style: %]}
%% Some useful definitions...
\begin{document}
%@
\end{document}
%% Local Variables:
%% End:
--=-=-=--
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list