Difference between revisions of "Image Database"

From Wiki
Jump to navigation Jump to search
m (< -> <)
m (test: xmlcode instead of pre)
Line 5: Line 5:
 
'''XML database file'''
 
'''XML database file'''
  
<pre>
+
<xmlcode>
 
<figurelibrary language="en">
 
<figurelibrary language="en">
 
<description>
 
<description>
Line 11: Line 11:
 
<project>ConTeXt Wiki</project>
 
<project>ConTeXt Wiki</project>
 
<product>prd_pictures</product>
 
<product>prd_pictures</product>
<comment>pictures for \ConTeXt Wiki</comment>
+
<comment>pictures for ConTeXt Wiki</comment>
 
</description>
 
</description>
 
<figure>
 
<figure>
Line 24: Line 24:
 
...
 
...
 
</figurelibrary>
 
</figurelibrary>
</pre>
+
</xmlcode>
  
 
'''Making a PDF list'''
 
'''Making a PDF list'''

Revision as of 22:51, 2 September 2004

< Graphics

ConTeXt's direct XML processing allows a rather mighty management of pictures with an XML database.

XML database file

<figurelibrary language="en">
<description>
	<organization>Pragma ADE</organization>
	<project>ConTeXt Wiki</project>
	<product>prd_pictures</product>
	<comment>pictures for ConTeXt Wiki</comment>
</description>
<figure>
	<file>filename</file>
	<label>reference</label>
	<copyright>owner</copyright>
	<comment>comment</comment>
</figure>
<figure>
...
</figure>
...
</figurelibrary>

Making a PDF list

texexec --pdf --use=fig-make --mode=compact myfile

Use pictures from database

\usemodule	[fig-base]
\usefigurebase	[myfile]

\externalfigure	[reference] % like in <label>

(is there a dtd or a relax ng schema somewhere out there? --pg)