Publisher and Web Interface > Publisher > Creating and customizing Publisher styles > Creating a Publisher style (Publisher)
  
Creating a Publisher style (Publisher)
This procedure creates a new Publisher Style, which you can use to define customized titlepage.xml and wordml.template.xml files.
To create a new Publisher Style, you perform the following steps:
Copy a provided Publisher Style folder.
Change the ArtisanPublisher.exe.config file.
Change the Style's docbookparams.xsl file.
After creating the new Publisher Style, you can then customize it for your needs.
Copying a provided Publisher Style folder:
1. Locate the provided Publisher Style folder you want to copy.
The Publisher Style folders are subfolders of the following folder.
C:\ProgramData\PTC Integrity
Modeler\Publisher\Stylesheets\DocumentGeneration\CustomDocBook
2. Copy the Publisher Style folder for the Publisher Style on which you want to base your new Publisher Style.
Note that if you want to copy the PTC Publisher style, copy the folder named ArtisanSoftwareTools.
3. Paste the copied Publisher Style folder into the CustomDocBook folder.
4. Change the name of the pasted folder as required. Important: The name must not contain any spaces.
Changing the ArtisanPublisher.exe.config file:
These changes to the ArtisanPublisher.exe.config file make the Style available in the Generate pane.
1. Using a text editor such as Notepad, open the ArtisanPublisher.exe.config file.
If you have installed Modeler to the default location, the ArtisanPublisher.exe.config file resides in the following folder.
For 64-bit versions of Windows:
%programdata%\PTC Integrity Modeler\Publisher\ArtisanPublisher.exe.config
For 32-bit versions of Windows:
%programdata%\PTC Integrity Modeler\Publisher\ArtisanPublisher.exe.config
2. Locate the entry for the Publisher Style you copied. The entry starts with <style name=...> entry and ends with </style> entry. For example, to select the PTC style:
3. Copy the style section for the Publisher Style, and paste it on a new line after the </style> line.
4. On the new entry you pasted, change the style name and url values to that of the Publisher Style folder you created, ensuring that you do not use spaces.
5. The Style is available only for those Output Formats that are specified through <format name=...> entries. If you do not want the Style to be available for any of the Output Formats, delete the appropriate <format name=...> entries from the style section.
6. Define the default Publisher Style by ensuring that the default value of only one scheme is set to True.
7. Save the changes you have made to the ArtisanPublisher.exe.configfile.
Note that on Windows 7, UAC will prevent you from saving the file, so you will have to save the file to a different location, and then copy the saved file to the ...\Modeler\Exe\Publisher folder.
Changing the Style's docbookparams.xsl file
These changes to the docbookparams.xsl file make Publisher use the Style's Word templates for generation when the Style is selected in the Generate pane.
1. Using a text editor such as Notepad, open the Style's docbookparams.xsl file.
The docbookparams.xsl file resides in the following folder.
C:\ProgramData\PTC Integrity Modeler\Publisher\Stylesheets\documentgeneration\customdocbook\<name of style>\Word\current
2. Locate the entry that defines the path for the wordml.template parameter, and change the name of the Style folder in the path to that of your Style.
For example, if you copied the PTC style and your new style is named MyStyle, you would change the path from this:
<xsl:param name="wordml.template" select="'http://www.artisansoftwaretools/DocumentGeneration/CustomDocBook/ArtisanSoftwareTools/Word/Current/wordml.template.xml'"/>
to this:
<xsl:param name="wordml.template" select="'http://www.artisansoftwaretools/DocumentGeneration/CustomDocBook/MyStyle/Word/Current/wordml.template.xml'"/>
Note that the 'http://www.artisansoftwaretools/' part of the path is replaced with the path of the StyleSheets folder on your computer.
3. Locate the entry that defines the path for the wordml.titlepage parameter, and change the name of the Style folder in the path to that of your Style.
4. Save the changes you have made to the Style's docbookparams.xsl file.
When you next start Publisher and select the Publisher Style, the Style's Word templates will be used to generate a Word document.
You have created a new Publisher Style, now you must customize that Publisher Style for your needs. For information about what customizations you can make to a Publisher Style, refer to Overview of customizing the presentation of generated documents.