5.6. White Papers

The Cogent White Papers are individual articles. For HTML output these articles are incorporated into a book, which is included in the Cogent Documentation bookset. For PDF output, each article is produced as a single document, available individually for distribution.

To generate the PDF files easily from a single output directory (doc/o/wp-book), we use a special Makefile. This Makefile generates HTML with the normal make html command. However, to generate PDF articles we use the command make articles. This generates PDF output and places it in the directories doc/o/p1-art through doc/o/p6-art. Here is what the Makefile looks like:

# Makefile
#

ARTS = 1 2 3 4 5 6 7

I=../../i/papers

.sgml: $(wildcard main.sgml $(I)/* ../../i/common/*.sgml \
         ../../config/cogent-both.dsl)

include ../../sgml.mak

default: html pdf

again: fresh html

articles: .articles 

.articles: .sgml
	for a in $(ARTS); do \
		cd ../p$$a-art; \
		cogsgml -tex ../../config/cogent-both.dsl main.sgml; \
		cogsgml -pdf tex/main.tex ../../config/jadetex.cfg; \
		cd ../wp-book; \
	done
	touch .articles

.PHONY : articles