How to set the same font across the document

This tutorial will talk you through the following:

  • Using the native normal style
  • Set the same normal style across the document

Let's get started

In the Step 10 tutorial we have the following files:

 

File\Folder

Description

step10.book

The budget book that will use the native normal style

step10a.book

The budget book that will enforce consistent style across the document

Templates\StyleTemplate.docx

The style template documents

Narratives\Document with Courier New Font.docx

Narratives\Document with Times New Roman Font.docx

Narratives\Document with Wide Latin Font.docx

Documents with the different styles

 

Styles, Styles and the Styles

Through time the document content and style tend to change, especially when multiple people contribute content to the same book.

To help you manage document consistency, we have introduced the "StyleTemplate" attribute that allows you to set the consistent Normal document style across the budget book. 

The Step 10 tutorial documents have exactly the same content, but use the three different fonts:

  • Courier New
  • Times New Roman
  • Wide Latin



Figure 1

 


Figure 2


Figure 3


Figure 4

Let’s move forward and generate the book with the step10.book file.

When it is done, every page looks different on the resulting book file, but at the same time, every page has its own style.

 


Figure 5

Now, let’s generate the book with the step10a.book file.

When it is done, every page looks the same on the resulting book file, and the all pages look consistent.

 



Figure 6

How it is done

To specify a consistent look for all the pages in the document, we have added StyleTemplate="Templates\StyleTemplate.docx" attribute in to our “step10a.book” file 

 

<BookName="StyleTemplate - Quick Steps Tutorial"
      Value=""
      Version="1.0"
      StyleTemplate="Templates\StyleTemplate.docx"      >
  <SectionName="Main Book Section"
           TopMargin="1"BottomMargin="1"RightMargin="1"LeftMargin="1">
    <Section  Name="Document with Times New Roman Font"
              NodePath="Narratives\Document with Times New Roman Font.docx"
              PageBreakAfter="True"/>
    <Section  Name="Document with Courier New Font"
              NodePath="Narratives\Document with Courier New Font.docx"
              PageBreakAfter="True"/>
    <Section  Name="Document with Wide Latin Font"
              NodePath="Narratives\Document with Wide Latin Font.docx"
              PageBreakAfter="True"/>
  </Section>
</Book>

And created “StyleTemplate.docx” which, has the normal style set to use the Calibri font

 


Figure 7

 


Figure 8

Conclusion 

Use the style template to enforce consistency of your content across the document.


Site Map | Printable View | © 2008 - 2017 Budget In Brief | Powered by mojoPortal | HTML 5 | CSS | Design by styleshout