Re: updated v1.3 Emacs menu

Bruce D'Arcus <[email protected]>
Newsgroups gmane.text.refdb.devel
Message-ID <[email protected]>
On Monday, December 8, 2003, at 10:07  AM, Michael Smith wrote:

>   1. Add a "Create New Document..." menu item.
>
>      Selecting that will fire up refdbnd (or some Emacs-based 
> equivalent
>      of that) and create the makefile for the document at the same
>      time as the document is created.
>
>   2. Add a "Process Document" or "Generate Output" submenu, with "PDF",
>      "HTML",  "RTF" and "All" menu items.
>
>      Selecting that will just call up the corresponding makefile for 
> the
>      document, and pass it the appropriate target name.

With 2, could you then create the makefile if it didn't exist?  Say you 
have an existing document that wasn't created with the "Create New 
Document" feature you outline: choose process document, and if there 
was no makefile, user is prompted for the style file and it's created 
and the transformation is run.

> It seems like the "Process Document" submenu will either need to work
> from the assumption that there's only one document per directory, and
> it's associated with a file called "Makefile" in the same directory. Or
> it could work by looking for a file with the extension ".mk" and the
> same base name as the document in the current buffer. That'd allow you
> to have multiple documents in the same directory.

I think I prefer the latter.

Let me just tell you how my current project (a book) is set up:

The source is all in one CVS-managed directory, called "dissent-book."  
It looks like this:

drwxr-xr-x    5 darcusb  staff         170 Oct  2 17:41 CVS
-rw-r--r--    1 darcusb  staff        1362 Sep  2 20:23 dissent-book.xml
-rw-r--r--    1 darcusb  staff         516 Aug 17 15:44 
dissent-chapter1.xml
-rw-r--r--    1 darcusb  staff       15251 Oct 31 10:03 
dissent-chapter2.xml
-rw-r--r--    1 darcusb  staff       11756 Aug 18 16:33 
dissent-chapter2.xml~
-rw-r--r--    1 darcusb  staff       19622 Aug 17 15:44 
dissent-chapter3.xml
-rw-r--r--    1 darcusb  staff       91729 Aug 17 15:44 
dissent-chapter4.xml
-rw-r--r--    1 darcusb  staff         944 Aug 17 15:44 
dissent-chapter5.xml
-rw-r--r--    1 darcusb  staff       13229 Aug 17 15:44 
dissent-chapter6.xml
-rw-r--r--    1 darcusb  staff        1779 Aug 17 15:44 
dissent-chapter7.xml
drwxr-xr-x    5 darcusb  staff         170 Sep 13 11:07 output

The output directory is where I place the fo and pdf files and such.

Here is the main file:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                     
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY bibliography SYSTEM "dbxtest.bib.xml">
<!ENTITY chapter1 SYSTEM "dissent-chapter1.xml">
<!ENTITY chapter2 SYSTEM "dissent-chapter2.xml">
<!ENTITY chapter3 SYSTEM "dissent-chapter3.xml">
<!ENTITY chapter4 SYSTEM "dissent-chapter4.xml">
<!ENTITY chapter5 SYSTEM "dissent-chapter5.xml">
<!ENTITY chapter6 SYSTEM "dissent-chapter6.xml">
<!ENTITY chapter7 SYSTEM "dissent-chapter7.xml">
]>
<book>
   <bookinfo>
     <author>
       <firstname>Bruce</firstname>
       <surname>D'Arcus</surname>
     </author>
     <affiliation>
       <orgname>Miami University</orgname>
       <orgdiv>Geography Department</orgdiv>
       <address>
	<street>216 Shideler Hall</street>
	<city>Oxford</city>
	<state>Ohio</state>
	<country>USA</country>
	<email>[email protected]</email>
       </address>
     </affiliation>
     <title>Boundaries of Dissent</title>
     <subtitle>Protest and State Power in the Media Age</subtitle>
     <copyright>
       <year>2003</year>
       <holder>Bruce D'Arcus</holder>
     </copyright>
   </bookinfo>

   &chapter1;
   &chapter2;
   &chapter3;
   &chapter4;
   &chapter5;
   &chapter6;
   &chapter7;

   &bibliography;
</book>

Aside: how to do this without entities?

Since the book is broken up into pieces, I often just run a 
transformation on an individual chapter (apart from refdb).  I don't 
know that it is necessary for RefDB to be involved there, but it might 
be helpful (say I send a draft chapter to someone).

This may be tricky though...

Bruce



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.