CSSMedia reads an XML document and a CSS stylesheet. The stylesheet describes how you want selected XML elements to look in the PDF. CSSMedia treats element names and attributes as data. It does not assume that a name such as chapter or an attribute such as class has a particular meaning.
The CSSMedia User Guide is written using DITA XML and the PDF version is generated using CSSMedia itself.
You need to have typesditac and cssmedia installed and available in your system's PATH.
npm i -g typesditacTo install cssmedia, run the following commands:
npm i -g file:cssmedia-x.x.x.tgzWhere x.x.x is the version of CSSMedia that you downloaded or built.
A CSS file and the fonts needed for the manual are available in this folder.
Execute these commands to build CSSMedia.pdf:
typesditac CSSMedia.ditamap --merge -o CSSMedia_MERGED.xml
cssmedia -x CSSMedia_MERGED.xml -c stylesheets/ditac.css -p CSSMedia.pdf
rm CSSMedia_MERGED.xml
rm -rf img/The CSS Reference is a separate PDF with the reference tables of the guide. Execute these commands to build CSSReference.pdf:
typesditac CSSReference.ditamap --merge -o CSSReference_MERGED.xml
cssmedia -x CSSReference_MERGED.xml -c stylesheets/ditac.css -p CSSReference.pdf
rm CSSReference_MERGED.xml
rm -rf img/