Difference between revisions of "Template:Book/doc"

From blackwiki
Jump to navigation Jump to search
imported>RichardF
(category parameter for lower case topic)
imported>Headbomb
(update docu)
Line 8: Line 8:
 
!width="50" valign="top" | 1.
 
!width="50" valign="top" | 1.
 
| Create a new page using <nowiki>[[Wikipedia:Books/Topic]]</nowiki> or <nowiki>[[User:Username:Books/Topic]]</nowiki> as the title of the page (where "Topic" is the subject of your book) and enter the following text. The "category" parameter can be used if the "topic" should ''not'' be capitalized - it is ''not'' a proper noun.
 
| Create a new page using <nowiki>[[Wikipedia:Books/Topic]]</nowiki> or <nowiki>[[User:Username:Books/Topic]]</nowiki> as the title of the page (where "Topic" is the subject of your book) and enter the following text. The "category" parameter can be used if the "topic" should ''not'' be capitalized - it is ''not'' a proper noun.
 +
 
<pre>
 
<pre>
 
{{subst:book
 
{{subst:book
 
   |username=
 
   |username=
 
   |topic=
 
   |topic=
 +
  |subtitle=
 
   |category=
 
   |category=
 
   |support1=
 
   |support1=
Line 25: Line 27:
 
}}
 
}}
 
</pre>
 
</pre>
 +
 
*The username parameter is for User:Username:Books/Topic "Table of contents" and "Introduction" subpages.
 
*The username parameter is for User:Username:Books/Topic "Table of contents" and "Introduction" subpages.
 
*The topic parameter is the name of the main article to be used.
 
*The topic parameter is the name of the main article to be used.
*Up to 10 support parameters can be specified for supporting articles. If needed, additional supporting articles can be added during editing.
+
*The subtitle parameter is the subtitle of the book.
*Note. ParserFunctions were not used for optional parameters because the function codes would be included in the substitution. The workaround is to delete any unnecessary links during editing.
+
*Up to 10 support parameters can be specified for supporting articles. If needed, additional supporting articles can be added during editing.
 +
*Note. ParserFunctions were not used for optional parameters because the function codes would be included in the substitution. The workaround is to delete any unnecessary links during editing.
 
Save.  
 
Save.  
 
|-
 
|-
Line 35: Line 39:
 
|-
 
|-
 
!valign="top"| 3.
 
!valign="top"| 3.
| Delete the extra and follow the applicable "Table of contents" subpage link to create a table of contents. For tips on how to create a table of contents with links to each article, see [[Help:Books/for experts#A linked table of contents in the pdf version of a book|A linked table of contents in the pdf version of a book]].
+
| Delete the extra and follow the applicable "Introduction" subpage link to create an introduction.
 
|-
 
|-
 
!valign="top"| 4.
 
!valign="top"| 4.
| Delete the extra and follow the applicable "Introduction" subpage link to create an introduction.
+
| For creating a main and supporting articles style of book, include the main article and all supporting articles that are referenced as major expansions of selected sections. Supporting article links typically are included at the top of a section using templates such as {{tl|Main}}, {{tl|See also}} and {{tl|See}}. Delete extra or add more supporting article links.
 
|-
 
|-
 
!valign="top"| 5.
 
!valign="top"| 5.
| For creating a main and supporting articles style of book, include the main article and all supporting articles that are referenced as major expansions of selected sections. Supporting article links typically are included at the top of a section using templates such as {{tl|Main}}, {{tl|See also}} and {{tl|See}}. Delete extra or add more supporting article links.
 
|-
 
!valign="top"| 6.
 
 
| If a new category is to be created for the book's topic, edit the red <nowiki>[[Category:Wikipedia:Books on Topic|Topic]]</nowiki> link.  Add the following categories to the "Books on Topic" category page.
 
| If a new category is to be created for the book's topic, edit the red <nowiki>[[Category:Wikipedia:Books on Topic|Topic]]</nowiki> link.  Add the following categories to the "Books on Topic" category page.
 +
 
<pre>
 
<pre>
 
[[Category:Wikipedia:Books on broader topic|Topic]]
 
[[Category:Wikipedia:Books on broader topic|Topic]]
 
[[Category:Topic|β]]
 
[[Category:Topic|β]]
 
</pre>
 
</pre>
 +
 
This will ensure the new books topic is properly classified for books, ''and'' it is included as a books subcategory under the encyclopedia topic.
 
This will ensure the new books topic is properly classified for books, ''and'' it is included as a books subcategory under the encyclopedia topic.
 
|}
 
|}

Revision as of 10:04, 2 October 2009

Usage

To create a new book on the topic "Topic" using the book template, follow these steps:

1. Create a new page using [[Wikipedia:Books/Topic]] or [[User:Username:Books/Topic]] as the title of the page (where "Topic" is the subject of your book) and enter the following text. The "category" parameter can be used if the "topic" should not be capitalized - it is not a proper noun.
{{subst:book
  |username=
  |topic=
  |subtitle=
  |category=
  |support1=
  |support2=
  |support3=
  |support4=
  |support5=
  |support6=
  |support7=
  |support8=
  |support9=
  |support10=
}}
  • The username parameter is for User:Username:Books/Topic "Table of contents" and "Introduction" subpages.
  • The topic parameter is the name of the main article to be used.
  • The subtitle parameter is the subtitle of the book.
  • Up to 10 support parameters can be specified for supporting articles. If needed, additional supporting articles can be added during editing.
  • Note. ParserFunctions were not used for optional parameters because the function codes would be included in the substitution. The workaround is to delete any unnecessary links during editing.

Save.

2. Return to your book page and begin editing. Optional instructions on editing a "main article" book are below.
3. Delete the extra and follow the applicable "Introduction" subpage link to create an introduction.
4. For creating a main and supporting articles style of book, include the main article and all supporting articles that are referenced as major expansions of selected sections. Supporting article links typically are included at the top of a section using templates such as {{Main}}, {{See also}} and {{See}}. Delete extra or add more supporting article links.
5. If a new category is to be created for the book's topic, edit the red [[Category:Wikipedia:Books on Topic|Topic]] link. Add the following categories to the "Books on Topic" category page.
[[Category:Wikipedia:Books on broader topic|Topic]]
[[Category:Topic|β]]

This will ensure the new books topic is properly classified for books, and it is included as a books subcategory under the encyclopedia topic.

See also