Object
We've discussed how to handle cover pages and content pages in the first two, and now we're going to put the following in the Spanish Review manual.
Title and paragraph properties are controlled by the <fo:block> element, and bold and underlined words are controlled by the <fo:inline> element. Now start to describe the first title:
<fo:block
Font-size= "14pt" font-family= "Sans-serif"
Font-weight= "Bold" color= "green"
Space-before= "6pt" space-after= "6pt" >
Introduction
<fo:block>
The Space-before property and the Space-after property are two of the property setting values in the storage area. These properties are similar to cascading style sheet CSS
Font properties
Font-family,font-weight,font-style (italic), font-size,font-stretch,font-variant
Background properties
Background-color,background-image,background-repeat,background-attachment (scrolling or fixed)
Boundary properties
Border-location-info:
Location can be before,after,start,,end,,top,bottom,left or right
The info is can be a font, width, or color
Padding properties
Padding-location: '
Location is can be before,after,,start,end,top,bottom,left or right
Whitespace properties
Margin-location:
Location can be top,bottom,left or right
Text Arrange Properties
Text-align and Text-align-last (used as the last line of text); Functions can be start,end,left,right or center
Indent attributes
Text-indent (first line), Start-indent,end-indent
Other properties
Wrap-option (without constraints or constraints); Widows and orphans (determines how many rows are at the top or left of the page) Break-after and break-before;reference-orientation (rotate body 90 degrees)
With these attributes, we can explicitly locate a complex paragraph. Locating a punctuation mark using a composite data type allows the page's layout to be automatically adapted to different image resolutions:
<fo:block
Text-indent= "1em"
Font-family= "Sans-serif" font-size= "12pt"
Space-before.minimum= "2pt"
Space-before.maximum= "6pt"
Space-before.optimum= "4pt"
Space-after.minimum= "2pt"
Space-after.maximum= "6pt"
space-after.optimum= "4pt" >
This handbook covers the major topics in Spanish, but are by no means complete.
<fo:block>
If your document has many headings or paragraphs, you don't need to format all the documents one at a time. With XSLT, we can use XSLT to write a document into HTML or to translate it into a detailed xsl:fo translation. The following are the translated HTML:
<p>
This handbook covers the major topics in Spanish, but are by no means complete.
</p>
<p>
When we pronounce 中文版 words, one syllable is usually
emphasized (<B>STRESSED</B>, in linguistic terms).
The stressed syllable is underlined in the following words:com<u>pu</u>ter,<u>lan</u>guage, de& Lt;u>vel</u>opment, Suc<u>ceeds</u> Spanish words also have a stressed syllable, and there are the rules for determining which syllable carries the emphasis.
</p>
Below are the templates for headings and paragraphs:
<xsl:template match= "H3" >
<fo:block font-size= "14pt" font-family= "Sans-serif"
Font-weight= "Bold" color= "green"
Space-before= "6pt" space-after= "6pt" >
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match= "P" >
<fo:block
Text-indent= "1em"
Font-family= "Sans-serif" font-size= "12pt"
Space-before.minimum= "2pt"
Space-before.maximum= "6pt"
Space-before.optimum= "4pt"
Space-after.minimum= "2pt"
Space-after.maximum= "6pt"
space-after.optimum= "4pt" >
<xsl:apply-templates/>
</fo:block>
</xsl:template>
When this article was initialized, the template was set and the This is the tree structure of the document. The last child contact is marked with <b> and <u>. The handles in the rows are <fo:inline> elements.
<xsl:template match= "B" >
<fo:inline font-weight= "Bold" >
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match= "U" >
<fo:inline text-decoration= "Underline" >
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match= "I" >
<fo:inline font-style= "Italic" >
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
When we create an HTML file through XSLT and FOP we get: