Difference between revisions of "Help:Using Templates and HTML in Note Fields"

From ISFDB
Jump to navigation Jump to search
(→‎Non-Linking Templates: Wording tweaks)
(43 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 +
{{HelpHeader}}
  
 +
All ISFDB records include a note field. Note fields support a number of templates and limited use of HTML.
 +
 +
== Templates ==
 +
 +
Note that this section covers the ISFDB templates which can be used in the Notes field of '''ISFDB records'''. Some of them roughly correspond to, but are distinct from, the linking templates available within the '''ISFDB Wiki''', which are listed on page [[Help:Linking templates]].
 +
 +
=== Special Templates ===
 +
If you enter <nowiki>{{BREAK}}</nowiki> anywhere in a Note field, everything after the <nowiki>{{BREAK}}</nowiki> will be displayed on a separate Web page, which will be linked from the main record page. ("BREAK" must be in all caps.)
 +
 +
=== Linking Templates ===
 +
 +
Most ISFDB templates are "linking templates", which means that they generate hyperlinks to other ISFDB records, ISFDB Wiki pages or third party Web pages. Linking templates are case-insensitive, e.g. "BL", "bl" and "Bl" generate the same links.
 +
 +
Note that when linking to a supported third party Web site by record number, the preferred method is to enter it in the "External ID" field. The use of linking templates in Notes should be limited to:
 +
 +
* third party records which do not directly match the publication, e.g. "The skeleton OCLC record <nowiki>{{OCLC|123456}}</nowiki> may be related", or
 +
* cases where detailed information about the linked record needs to be provided, e.g. "Page count from <nowiki>{{BNB|011585872}}</nowiki>".
 +
 +
At this time the following linking templates are supported:
 +
 +
{|border="1" cellspacing="1" cellpadding="2" style="text-align:center"
 +
|-
 +
!scope="col" |Template
 +
!scope="col" |Functionality
 +
!scope="col" |Example
 +
 +
|-
 +
| A
 +
| Links to an Author record within ISFDB using the author's name
 +
| <nowiki>{{A|Jules Verne}}</nowiki>
 +
|-
 +
| ASIN
 +
| Links to an Amazon.com page using an ASIN
 +
| <nowiki>{{ASIN|B000JMLBHU}}</nowiki>
 +
|-
 +
| Audible-ASIN
 +
| Links to an Audible.com page using an Audible ASIN (different from regular Amazon ASINs)
 +
| <nowiki>{{Audible-ASIN|B002V1BVK4}}</nowiki>
 +
|-
 +
| BL
 +
| Links to the British Library using a British Library system number
 +
| <nowiki>{{BL|011388149}}</nowiki>
 +
|-
 +
| Bleiler1
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| Bleiler78
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| BNB
 +
| Links British National Bibliography using a British Library system number or a BNB number
 +
| <nowiki>{{BNB|011585872}}</nowiki>
 +
|-
 +
| BnF
 +
| Links to Bibliothèque nationale de France using the last part of the BnF URL
 +
| <nowiki>{{BnF|cb317942828}}</nowiki>
 +
|-
 +
| Clute/Grant
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| Clute/Nicholls
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| Contento
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| Currey
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| DNB
 +
| Links to Deutsche Nationalbibliothek using DBN's permanent record number
 +
| <nowiki>{{DNB|1076016375}}</nowiki>
 +
|-
 +
| FantLab
 +
| Links to FantLab.ru's home page
 +
|
 +
|-
 +
| FantLab-author
 +
| Links to FantLab.ru using an author number
 +
| <nowiki>{{FantLab-author|1105}}</nowiki>
 +
|-
 +
| FantLab-title
 +
| Links to FantLab.ru using a work/title number
 +
| <nowiki>{{FantLab-title|46395}}</nowiki>
 +
|-
 +
| FantLab-pub
 +
| Links to FantLab.ru using an edition/publication number
 +
| <nowiki>{{FantLab-pub|50465}}</nowiki>
 +
|-
 +
| JNB
 +
| Links to Japanese National Bibliography using a Japanese National Bibliography number (JPNO)
 +
| <nowiki>{{JBN|22859001}}</nowiki>
 +
|-
 +
| KBR
 +
| Links to De Belgische Bibliografie/La Bibliographie de Belgique using a permanent ID
 +
| <nowiki>{{KBR|15789982}}</nowiki>
 +
|-
 +
| LCCN
 +
| Links to the catalog of the Library of Congress using an LCCN
 +
| <nowiki>{{LCCN|89040470}}</nowiki>
 +
|-
 +
| Locus1
 +
| Links to the home page of The Locus Index to Science Fiction
 +
|
 +
|-
 +
| LTF-title
 +
| Links to a La Tercera Fundaci&#243;n title using its "ficha" (title) number
 +
| <nowiki>{{LTF-title|46395}}</nowiki>
 +
|-
 +
| LTF-pub
 +
| Links to a La Tercera Fundaci&#243;n publication using its "libro" (publication) number
 +
| <nowiki>{{LTF-pub|50465}}</nowiki>
 +
|-
 +
| Miller/Contento
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| NDL
 +
| Links to the Japanese National Diet Library using a record number
 +
| <nowiki>{{NDL|027806225}}</nowiki>
 +
|-
 +
| NILF
 +
| Links to Fantascienza using Numero Identificativo della Letteratura Fantastica
 +
| <nowiki>{{NILF|107292}}</nowiki>
 +
|-
 +
| NooSFere
 +
| Links to NooSFere using NooSFere's "numlivre" ID
 +
| <nowiki>{{NooSFere|2146570233}}</nowiki>
 +
|-
 +
| OCLC
 +
| Links to WorldCat/OCLC using an OCLC number
 +
| <nowiki>{{OCLC|880913738}}</nowiki>
 +
|-
 +
| PPN
 +
| Links to De Nederlandse Bibliografie using a PPN number
 +
| <nowiki>{{PPN|854168982}}</nowiki>
 +
|-
 +
| Publisher
 +
| Links to a Publisher record within ISFDB using the name of a publisher
 +
| <nowiki>{{Publisher|Tor}}</nowiki>
 +
|-
 +
| PubS
 +
| Links to a Publication Series record within ISFDB using its name
 +
| <nowiki>{{PubS|Ace Double}}</nowiki>
 +
|-
 +
| Reginald1
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| Reginald3
 +
| Displays the short name of this bibliographic source and links to its Title record within ISFDB
 +
|
 +
|-
 +
| S
 +
| Links to a title Series record within ISFDB using its name
 +
| <nowiki>{{S|Quincey Morris (Dracula spin-off)}}</nowiki>
 +
|-
 +
| SF-Leihbuch
 +
| Links to the SF-Leihbuch site using a "permalink" code
 +
| <nowiki>{{SF-Leihbuch|1692}}</nowiki>
 +
|-
 +
| SFBG
 +
| Links to the SFBG home page
 +
|
 +
|-
 +
| SFBG-title
 +
| Links to the SFBG using a title code
 +
| <nowiki>{{SFBG-title|LTUS-VKR}}</nowiki>
 +
|-
 +
| SFBG-pub
 +
| Links to the SFBG using an publication code
 +
| <nowiki>{{SFBG-pub|LTUS-VKR-01RC}}</nowiki>
 +
|-
 +
| SFBG-publisher
 +
| Links to the SFBG using a publisher code
 +
| <nowiki>{{SFBG-publisher|LTUS}}</nowiki>
 +
|-
 +
| SFE3
 +
| Links to the home page of the Third edition of The Encyclopedia of Science Fiction
 +
|
 +
|-
 +
| Tuck
 +
| Displays the short name of this bibliographic source and links to its Series record within ISFDB
 +
|
 +
 +
|}
 +
 +
=== Non-Linking Templates ===
 +
 +
{|border="1" cellspacing="1" cellpadding="2" style="text-align:center"
 +
|-
 +
!scope="col" |Template
 +
!scope="col" |Functionality
 +
!scope="col" |Example
 +
|-
 +
| Incomplete
 +
| Does not take a parameter. Displays the words "Contents incomplete." Intended to be used in publication notes to indicate that not all eligible title records have been entered yet. Not supposed to be used if ineligible (typically non-genre) titles are intentionally excluded.
 +
| <nowiki>{{Incomplete}}</nowiki>
 +
|-
 +
| ISBN
 +
| Displays the words "Additional ISBN" followed by a space and the specified parameter
 +
| <nowiki>{{ISBN|978-0-9953378-2-4}}</nowiki> will display "Additional ISBN 978-0-9953378-2-4" (Note that, unlike the corresponding Wiki template, this ISFDB template does not link to "Book sources".)
 +
|-
 +
| MultiS
 +
| Does not take a parameter. Displays the words "Note that this title belongs to multiple series. Because of software limitations, only one of them currently appears in the Series field."
 +
| <nowiki>{{MultiS}}</nowiki>
 +
|-
 +
| MultiPubS
 +
| Does not take a parameter. Displays the words "Note that this publication belongs to multiple publication series. Because of software limitations, only one of them currently appears in the Publication Series field."
 +
| <nowiki>{{MultiPubS}}</nowiki>
 +
|-
 +
| Narrator
 +
| Displays the words "Narrated by" followed by a space and the specified parameter
 +
| <nowiki>{{Narrator|Popi Ardissone}}</nowiki> will display "Narrated by Popi Ardissone"
 +
|-
 +
| Tr
 +
| Displays the words "Translated by" followed by a space and the specified parameter
 +
| <nowiki>{{Tr|Charles Baudelaire}}</nowiki> will display "Translated by Charles Baudelaire"
 +
|}
 +
 +
== HTML ==
 +
 +
All note fields permit HTML, Hyper Text Markup Language, to be entered as part of their text, and will display that HTML when the record is displayed in response to a database query. In theory a very wide variety of effects could be implemented in this way, but in practice only a few HTML constructs are used to avoid overly complex pages or security problems. Moderators have the option to question any HTML constructs other than those which are listed here.
 +
 +
This page lists the HTML constructs commonly used in ISFDB note fields, and describes how to enter them.
 +
 +
==Conventions==
 +
On this page, HTML examples and their results are shown in <code>light shaded background</code> and actual tags are shown in <code>'''Shaded boldface'''</code>.
 +
 +
If you edit this page or look at the wiki source you will see '''code''' and '''nowiki''' tags being used. Those are present to allow the examples to display properly -- they should '''NOT''' be part of any HTML you enter in ISFDB note fields. In the link examples, wikicode (square brackets) is used to make the results appear correctly, since '''a''' tags do not render correctly in wiki pages. Do '''not''' enter this into ISFDB note fields, use the forms displayed using the '''a''' tags instead.
 +
 +
==Tags and Tag Pairs (An Intro to Basic HTML)==
 +
All HTML is entered as one or more '''Tags'''. A tag starts with a "'''<'''" character, and ends with a "'''>'''" character. The opening < is followed by code for the tag, which is one or more letters (or in some cases digits). This may be followed by a space and some parameters or settings, depending on the specific tag involved.
 +
 +
=== Supported HTML tags ===
 +
 +
* 'b'
 +
* 'blockquote'
 +
* 'br'
 +
* 'center'
 +
* 'cite'
 +
* 'del'
 +
* 'em'
 +
* 'i'
 +
* 'li'
 +
* 'ol'
 +
* 'p'
 +
* 'pre'
 +
* 's'
 +
* 'strong'
 +
* 'sub'
 +
* 'sup'
 +
* 'table'
 +
* 'td'
 +
* 'th'
 +
* 'tr'
 +
* 'u'
 +
* 'ul'
 +
 +
===Tag Pairs===
 +
Most tags come in pairs, a start tag  and a stop tag. The stop tag has a slash ("'''/'''") before its code. For example if there were a tag with the code "test" the start tag would be '''<code><nowiki><test></nowiki></code>''', and the end tag would be '''<code><nowiki></test></nowiki></code>'''.
 +
 +
Tags may be nested, but not interleaved. For example, the following would be a valid case of nested tags:
 +
 +
<code>'''<nowiki><i></nowiki>'''italics and '''<nowiki><b></nowiki>'''bold italics'''<nowiki></b></nowiki>''' '''<nowiki></i></nowiki>'''</code>
 +
 +
The following is an example of '''INVALID''' interleaving of tags:
 +
 +
<code>'''<nowiki><i></nowiki>'''italics and '''<nowiki><b></nowiki>'''bold italics '''<nowiki></i></nowiki>''' Just bold? '''<nowiki></b></nowiki>'''</code>
 +
 +
More simply stated: if a tag pair starts inside another tag pair, it must be closed before the outer tag pair is closed.
 +
 +
If a tag is part of a tag pair, it is '''important''' to enter a matching end tag for each start tag. Otherwise the tag's effect may continue onto the display page beyond the note field, causing an incorrect display of the rest of the ISFDB record.
 +
 +
There are some cases where the closing tag of a tag pair may safely be omitted. The only one commonly used in ISFDB note fields is the '''<nowiki><li></nowiki>''' tag, whose closing tag is optional.
 +
 +
===Unpaired Tags===
 +
Some tags are not part of a tag pair, and do not require a matching close tag. The most common one used in ISFDB note fields is '''<nowiki><br></nowiki>''', the line break (see the following section). Such tags may end with a space and a slash (/), to indicate that they are "self-closing". However, this is strictly optional for all such unpaired tags used in ISFDB note fields. This is true in all current versions of HTML and all current browsers. Moreover, future versions of HTML are expected to continue to support the  form without the closing slash, so editors may use either form in ISFDB note fields.
 +
 +
==Line breaks==
 +
If you need to create a line break within a Note field, simply use the Enter/Return key on your keyboard. In the past it was necessary to use the HTML "break" tag, which is entered as '''<nowiki><br /></nowiki>''' or '''<nowiki><br></nowiki>''', but this is no longer required.
 +
 +
==Italics==
 +
To display text in italics, such as for a book title, use the '''i''' tag. This is part of a tag pair, and '''MUST''' be closed or the rest of the record will be displayed in italics.
 +
 +
For example, this HTML:
 +
 +
<code>First published in '''<nowiki><i></nowiki>'''Megabook of Great SF'''<nowiki></i></nowiki>''' (1955)</code>
 +
 +
would display like this:
 +
 +
<code>First published in <i>Megabook of Great SF</i> (1955)</code>
 +
 +
==Boldface==
 +
To display text in boldface, such as for emphasis, use the '''b''' tag. This is part of a tag pair, and '''MUST''' be closed or the rest of the record will be displayed in bold.
 +
 +
For example, this HTML:
 +
 +
<code>It is '''<nowiki><b></nowiki>'''very important'''<nowiki></b></nowiki>''' to close all tag pairs.</code>
 +
 +
would display like this:
 +
 +
<code>It is <b>very important</b> to close all tag pairs.</code>
 +
 +
Unlike italics, boldface is rarely used in ISFDB note fields. The use of boldface for titles is discouraged.  Although the ISFDB is not bound to any particular citation style,  most of them, including the most popular one created by the MLA (Modern Language Association), require that the titles of books and magazines (container publications) be entered using italics. The titles of shorter works which are contained in publications, like essays and stories, should be entered using standard double quotes.
 +
 +
==Links==
 +
 +
The standard way to link an ISFDB record to another online record is by entering the other record's ID in the External ID field -- see [[Template:PublicationFields:ExternalIDs]] for details. If you need to link to a supported external ID which is not directly related to the current ISFDB record, e.g. you want to add a note to the effect that the record "should not to be confused with OCLC 123456", use the appropriate linking template listed above.
 +
 +
If the third party Web site that you want to link to is not supported, i.e. it is not listed in the External ID drop-down list or the list of linking templates, you can link to it with a direct HTML hypertext link using the '''&lt;a&gt;...&lt;/a&gt;''' (anchor) tag. This is a tag pair, and '''MUST''' be closed with '''&lt;/a&gt;'''or the rest of the record may not display at all.
 +
 +
The '''&lt;a&gt;''' tag has a single parameter, href, which gives the URL (web address) of the site to link to. The URL follows an equals sign and MUST be enclosed in double quotes to work correctly. That is, the full parameter is <code>'''href="URL_Here"'''</code>. The text between the start tag and the close tag will be shown as the NAME of the link, the text on which a user may click to follow the link. The link NAME need not be the same as the URL.
 +
 +
A hypertext link is most often used in an ISFDB record's note field to link the record to the Internet source from which data has been used and/or verified.
 +
 +
Be careful to enter '''only''' links which are relevant and useful to the record. Links to websites other than sources of data are very unusual and should be avoided. Title records now have a designated field to enter these links; they should not be used in the Title Note field. Links in publication records should only be entered in the Note field, and HTML is required.
 +
 +
Only those links which are very likely to remain stable should be entered. If the link target changes, in the case of some websites that use "floating targets", it may lead a user to the wrong page.  The information it was supposed to link to will not be visible to the ISFDB user, often with no easy way to find it. Of course, the editor of the record has the option of giving the source of the data without having to provide a link.
 +
 +
Note that links to records in the Locus online database are '''NOT''' stable. Locus periodically reindexes, changing the page division points and thus the page ID for any particular reference. For this reason, links to Locus should '''not''' be entered into ISFDB note fields, as there is no way to automatically update them. Simply noting the source as "Locus1" is sufficient.
 +
 +
If you are unsure whether a particular link or sort of link is stable, ask at the [[ISFDB:Help desk|Help Desk]] before using it. 
 +
 +
:'''<u>WARNING</u>:''' You may see a '''target=''' parameter in links copied from other sites.  This parameter tells the a web browser where to display the results of clicking on the link (and says nothing about what to display).  DO NOT use '''target=''' in links you add to the ISFDB, as doing so may interfere with the software's display management.  The link:
 +
:<code><a href="<nowiki>http://some.where.com/this.html</nowiki>" target="main">A Link</a></code>
 +
:should be entered as:
 +
:<code><a href="<nowiki>http://some.where.com/this.html</nowiki>">A Link</a></code>
 +
 +
===Links to Other ISFDB Records===
 +
Note that although you can include links to other ISFDB records, they may not be stable over the long run as our records get merge, deleted or re-created using different record IDs. If you choose to link to another ISFDB record, avoid using the following types of links:
 +
 +
* Links to ISFDB publication records using publication tags, e.g. http://www.isfdb.org/cgi-bin/pl.cgi?PHNTSTSCHB2013 . There are known technical issues with these tags, including tag duplication. We expect to eliminate publication tags once we finish moving all publication-specific comments from the Wiki to the database. Use record IDs instead, e.g. http://www.isfdb.org/cgi-bin/pl.cgi?437351 .
 +
* Links to ISFDB author records using author names, e.g. http://www.isfdb.org/cgi-bin/ea.cgi?Ray_Bradbury. These links may not work for author names with Unicode characters. Use numeric author IDs instead, e.g. http://www.isfdb.org/cgi-bin/ea.cgi?194 .
 +
* Links to award listings using two-letter award abbreviations like http://www.isfdb.org/cgi-bin/ay.cgi?An1952 . These abbreviations are deprecated and may not be supported in the future. Use the current URL format instead, e.g. http://www.isfdb.org/cgi-bin/ay.cgi?1+1952 .
 +
 +
==Unnumbered Lists==
 +
To display an unnumbered or "bulleted" list, you use two types of tags. The '''ul''' (unnumbered list) tag starts and stops the entire list, and the '''li''' (list item) tag marks off individual items in the list.
 +
 +
Many editors use this construct to display a series of separate notations in the note field.
 +
 +
The '''ul''' tag '''MUST''' be closed properly with a <code>'''<nowiki></ul></nowiki>'''</code> tag, or the rest of the record will display incorrectly as part of the list. You may see cases where the '''li''' tags do not have matching  <code>'''<nowiki></li></nowiki>'''</code> tags. This will work correctly in all current web browsers and HTML versions, and the next version of the HTML standard (HTML5) explicitly permits it. Future versions of HTML are expected to support this also. Therefore closing <code>'''<nowiki></li></nowiki>'''</code> tags may be used or omitted in ISFDB note fields as each editor prefers, and there should be no difference in the resulting display.
 +
 +
It is possible to place one unnumbered list inside a single list item for another (outer) list. This is rarely done in ISFDB note fields, however, because (1) it is usually unnecessary, and (2) it makes editing more complex. Do not use this technique unless there is a clear need for it, and you are confident that you are closing both inner and outer lists correctly.
 +
 +
===Examples of Lists===
 +
Here is an example of a complete unordered list.
 +
 +
This HTML:
 +
 +
<code>
 +
'''<nowiki><ul></nowiki>'''<br />
 +
'''<nowiki><li></nowiki>'''Copyright 1984 by Jane Jones.'''<nowiki></li></nowiki>'''<br />
 +
'''<nowiki><li></nowiki>'''Cover artist credited on back cover.'''<nowiki></li></nowiki>'''<br />
 +
'''<nowiki><li></nowiki>'''Third printing by number line.'''<nowiki></li></nowiki>'''<br />
 +
'''<nowiki><li></nowiki>'''No date stated for this printing, but Locus shows it as May 1987.'''<nowiki></li></nowiki>'''<br />
 +
'''<nowiki></ul></nowiki>'''<br />
 +
</code>
 +
 +
would display like this:
 +
 +
<code>
 +
<ul>
 +
<li>Copyright 1984 by Jane Jones.</li>
 +
<li>Cover artist credited on back cover.</li>
 +
<li>Third printing by number line.</li>
 +
<li>No date stated for this printing, but Locus shows it as May 1987.</li>
 +
</ul>
 +
</code>
 +
 +
------
 +
Here is an example not using the closing '''<nowiki></li></nowiki>''' tags.
 +
 +
This HTML:
 +
 +
<code>
 +
'''<nowiki><ul></nowiki>'''<br />
 +
'''<nowiki><li></nowiki>'''Copyright 1984 by Jane Jones.<br />
 +
'''<nowiki><li></nowiki>'''Cover artist credited on back cover.<br />
 +
'''<nowiki><li></nowiki>'''Third printing by number line.<br />
 +
'''<nowiki><li></nowiki>'''No date stated for this printing, but Locus shows it as May 1987.<br />
 +
'''<nowiki></ul></nowiki>'''<br />
 +
</code>
 +
 +
would '''also''' display like this:
 +
 +
<code>
 +
<ul>
 +
<li>Copyright 1984 by Jane Jones.
 +
<li>Cover artist credited on back cover.
 +
<li>Third printing by number line.
 +
<li>No date stated for this printing, but Locus shows it as May 1987.
 +
</ul>
 +
</code>
 +
 +
It is not required that each list item starts on a new line, as shown in the examples above. The HTML will display a new line for each list item in any case. But it is easier to edit a note field when each list item tag starts a new line, and clearer what the HTML means. Most unnumbered lists in the ISFDB have been entered in this way.
 +
 +
==HTML Entities==
 +
Some characters are reserved in HTML, and so should not be used in note fields. Instead, it is possible to use ''HTML Entities'' to display such characters.
 +
 +
For example, it is a very bad idea to use the less than (<) or greater than (>) signs in your note text, because the browser may mix them with tags. Even if it doesn't, error checking routines may complain about such text.
 +
 +
An HTML entity takes the form '''<code>&entity_name;</code>''' -- the and sign (&) and semicolon (;) are required. (It is also possible to use the form '''<code>&#entity_number;</code>'''.)
 +
 +
Here are some of the HTML entities that might be used in ISFDB note pages:
 +
{| class="TablePager"
 +
|+ Partial list of HTML entities
 +
!Display!!Description!!Entity Name
 +
|-
 +
|< ||less than ||&amp;lt;
 +
|-
 +
|> ||greater than ||&amp;gt;
 +
|-
 +
|& ||ampersand ||&amp;amp;
 +
|-
 +
|¢ ||cent ||&amp;cent;
 +
|-
 +
|£ ||pound ||&amp;pound;
 +
|-
 +
|¥ ||yen ||&amp;yen;
 +
|-
 +
|€ ||euro ||&amp;euro;
 +
|-
 +
|§ ||section ||&amp;sect;
 +
|-
 +
|© ||copyright ||&amp;copy;
 +
|-
 +
|® ||registered trademark ||&amp;reg;
 +
|-
 +
|™ ||trademark ||&amp;trade;
 +
|}
 +
For more information and a longer list, see [http://www.w3schools.com/tags/ref_entities.asp this w3schools page].

Revision as of 16:16, 14 October 2019

This page is a help or manual page for the ISFDB database. It describes standards or methods for entering or maintaining data in the ISFDB database, or otherwise working with the database. Other help pages may be found via the category below. To discuss what should go on this page, use the talk page.

If, after exploring the Help system, you still have a question, please visit the Help desk and let us know. We probably know the answer, but we need your help to know what we left out of the help pages.

If you are new to editing the ISFDB, please see Help:Getting Started.

For more on this and other header templates, see Header templates.


All ISFDB records include a note field. Note fields support a number of templates and limited use of HTML.

Templates

Note that this section covers the ISFDB templates which can be used in the Notes field of ISFDB records. Some of them roughly correspond to, but are distinct from, the linking templates available within the ISFDB Wiki, which are listed on page Help:Linking templates.

Special Templates

If you enter {{BREAK}} anywhere in a Note field, everything after the {{BREAK}} will be displayed on a separate Web page, which will be linked from the main record page. ("BREAK" must be in all caps.)

Linking Templates

Most ISFDB templates are "linking templates", which means that they generate hyperlinks to other ISFDB records, ISFDB Wiki pages or third party Web pages. Linking templates are case-insensitive, e.g. "BL", "bl" and "Bl" generate the same links.

Note that when linking to a supported third party Web site by record number, the preferred method is to enter it in the "External ID" field. The use of linking templates in Notes should be limited to:

  • third party records which do not directly match the publication, e.g. "The skeleton OCLC record {{OCLC|123456}} may be related", or
  • cases where detailed information about the linked record needs to be provided, e.g. "Page count from {{BNB|011585872}}".

At this time the following linking templates are supported:

Template Functionality Example
A Links to an Author record within ISFDB using the author's name {{A|Jules Verne}}
ASIN Links to an Amazon.com page using an ASIN {{ASIN|B000JMLBHU}}
Audible-ASIN Links to an Audible.com page using an Audible ASIN (different from regular Amazon ASINs) {{Audible-ASIN|B002V1BVK4}}
BL Links to the British Library using a British Library system number {{BL|011388149}}
Bleiler1 Displays the short name of this bibliographic source and links to its Title record within ISFDB
Bleiler78 Displays the short name of this bibliographic source and links to its Title record within ISFDB
BNB Links British National Bibliography using a British Library system number or a BNB number {{BNB|011585872}}
BnF Links to Bibliothèque nationale de France using the last part of the BnF URL {{BnF|cb317942828}}
Clute/Grant Displays the short name of this bibliographic source and links to its Title record within ISFDB
Clute/Nicholls Displays the short name of this bibliographic source and links to its Title record within ISFDB
Contento Displays the short name of this bibliographic source and links to its Title record within ISFDB
Currey Displays the short name of this bibliographic source and links to its Title record within ISFDB
DNB Links to Deutsche Nationalbibliothek using DBN's permanent record number {{DNB|1076016375}}
FantLab Links to FantLab.ru's home page
FantLab-author Links to FantLab.ru using an author number {{FantLab-author|1105}}
FantLab-title Links to FantLab.ru using a work/title number {{FantLab-title|46395}}
FantLab-pub Links to FantLab.ru using an edition/publication number {{FantLab-pub|50465}}
JNB Links to Japanese National Bibliography using a Japanese National Bibliography number (JPNO) {{JBN|22859001}}
KBR Links to De Belgische Bibliografie/La Bibliographie de Belgique using a permanent ID {{KBR|15789982}}
LCCN Links to the catalog of the Library of Congress using an LCCN {{LCCN|89040470}}
Locus1 Links to the home page of The Locus Index to Science Fiction
LTF-title Links to a La Tercera Fundación title using its "ficha" (title) number {{LTF-title|46395}}
LTF-pub Links to a La Tercera Fundación publication using its "libro" (publication) number {{LTF-pub|50465}}
Miller/Contento Displays the short name of this bibliographic source and links to its Title record within ISFDB
NDL Links to the Japanese National Diet Library using a record number {{NDL|027806225}}
NILF Links to Fantascienza using Numero Identificativo della Letteratura Fantastica {{NILF|107292}}
NooSFere Links to NooSFere using NooSFere's "numlivre" ID {{NooSFere|2146570233}}
OCLC Links to WorldCat/OCLC using an OCLC number {{OCLC|880913738}}
PPN Links to De Nederlandse Bibliografie using a PPN number {{PPN|854168982}}
Publisher Links to a Publisher record within ISFDB using the name of a publisher {{Publisher|Tor}}
PubS Links to a Publication Series record within ISFDB using its name {{PubS|Ace Double}}
Reginald1 Displays the short name of this bibliographic source and links to its Title record within ISFDB
Reginald3 Displays the short name of this bibliographic source and links to its Title record within ISFDB
S Links to a title Series record within ISFDB using its name {{S|Quincey Morris (Dracula spin-off)}}
SF-Leihbuch Links to the SF-Leihbuch site using a "permalink" code {{SF-Leihbuch|1692}}
SFBG Links to the SFBG home page
SFBG-title Links to the SFBG using a title code {{SFBG-title|LTUS-VKR}}
SFBG-pub Links to the SFBG using an publication code {{SFBG-pub|LTUS-VKR-01RC}}
SFBG-publisher Links to the SFBG using a publisher code {{SFBG-publisher|LTUS}}
SFE3 Links to the home page of the Third edition of The Encyclopedia of Science Fiction
Tuck Displays the short name of this bibliographic source and links to its Series record within ISFDB

Non-Linking Templates

Template Functionality Example
Incomplete Does not take a parameter. Displays the words "Contents incomplete." Intended to be used in publication notes to indicate that not all eligible title records have been entered yet. Not supposed to be used if ineligible (typically non-genre) titles are intentionally excluded. {{Incomplete}}
ISBN Displays the words "Additional ISBN" followed by a space and the specified parameter {{ISBN|978-0-9953378-2-4}} will display "Additional ISBN 978-0-9953378-2-4" (Note that, unlike the corresponding Wiki template, this ISFDB template does not link to "Book sources".)
MultiS Does not take a parameter. Displays the words "Note that this title belongs to multiple series. Because of software limitations, only one of them currently appears in the Series field." {{MultiS}}
MultiPubS Does not take a parameter. Displays the words "Note that this publication belongs to multiple publication series. Because of software limitations, only one of them currently appears in the Publication Series field." {{MultiPubS}}
Narrator Displays the words "Narrated by" followed by a space and the specified parameter {{Narrator|Popi Ardissone}} will display "Narrated by Popi Ardissone"
Tr Displays the words "Translated by" followed by a space and the specified parameter {{Tr|Charles Baudelaire}} will display "Translated by Charles Baudelaire"

HTML

All note fields permit HTML, Hyper Text Markup Language, to be entered as part of their text, and will display that HTML when the record is displayed in response to a database query. In theory a very wide variety of effects could be implemented in this way, but in practice only a few HTML constructs are used to avoid overly complex pages or security problems. Moderators have the option to question any HTML constructs other than those which are listed here.

This page lists the HTML constructs commonly used in ISFDB note fields, and describes how to enter them.

Conventions

On this page, HTML examples and their results are shown in light shaded background and actual tags are shown in Shaded boldface.

If you edit this page or look at the wiki source you will see code and nowiki tags being used. Those are present to allow the examples to display properly -- they should NOT be part of any HTML you enter in ISFDB note fields. In the link examples, wikicode (square brackets) is used to make the results appear correctly, since a tags do not render correctly in wiki pages. Do not enter this into ISFDB note fields, use the forms displayed using the a tags instead.

Tags and Tag Pairs (An Intro to Basic HTML)

All HTML is entered as one or more Tags. A tag starts with a "<" character, and ends with a ">" character. The opening < is followed by code for the tag, which is one or more letters (or in some cases digits). This may be followed by a space and some parameters or settings, depending on the specific tag involved.

Supported HTML tags

  • 'b'
  • 'blockquote'
  • 'br'
  • 'center'
  • 'cite'
  • 'del'
  • 'em'
  • 'i'
  • 'li'
  • 'ol'
  • 'p'
  • 'pre'
  • 's'
  • 'strong'
  • 'sub'
  • 'sup'
  • 'table'
  • 'td'
  • 'th'
  • 'tr'
  • 'u'
  • 'ul'

Tag Pairs

Most tags come in pairs, a start tag and a stop tag. The stop tag has a slash ("/") before its code. For example if there were a tag with the code "test" the start tag would be <test>, and the end tag would be </test>.

Tags may be nested, but not interleaved. For example, the following would be a valid case of nested tags:

<i>italics and <b>bold italics</b> </i>

The following is an example of INVALID interleaving of tags:

<i>italics and <b>bold italics </i> Just bold? </b>

More simply stated: if a tag pair starts inside another tag pair, it must be closed before the outer tag pair is closed.

If a tag is part of a tag pair, it is important to enter a matching end tag for each start tag. Otherwise the tag's effect may continue onto the display page beyond the note field, causing an incorrect display of the rest of the ISFDB record.

There are some cases where the closing tag of a tag pair may safely be omitted. The only one commonly used in ISFDB note fields is the <li> tag, whose closing tag is optional.

Unpaired Tags

Some tags are not part of a tag pair, and do not require a matching close tag. The most common one used in ISFDB note fields is <br>, the line break (see the following section). Such tags may end with a space and a slash (/), to indicate that they are "self-closing". However, this is strictly optional for all such unpaired tags used in ISFDB note fields. This is true in all current versions of HTML and all current browsers. Moreover, future versions of HTML are expected to continue to support the form without the closing slash, so editors may use either form in ISFDB note fields.

Line breaks

If you need to create a line break within a Note field, simply use the Enter/Return key on your keyboard. In the past it was necessary to use the HTML "break" tag, which is entered as <br /> or <br>, but this is no longer required.

Italics

To display text in italics, such as for a book title, use the i tag. This is part of a tag pair, and MUST be closed or the rest of the record will be displayed in italics.

For example, this HTML:

First published in <i>Megabook of Great SF</i> (1955)

would display like this:

First published in Megabook of Great SF (1955)

Boldface

To display text in boldface, such as for emphasis, use the b tag. This is part of a tag pair, and MUST be closed or the rest of the record will be displayed in bold.

For example, this HTML:

It is <b>very important</b> to close all tag pairs.

would display like this:

It is very important to close all tag pairs.

Unlike italics, boldface is rarely used in ISFDB note fields. The use of boldface for titles is discouraged. Although the ISFDB is not bound to any particular citation style, most of them, including the most popular one created by the MLA (Modern Language Association), require that the titles of books and magazines (container publications) be entered using italics. The titles of shorter works which are contained in publications, like essays and stories, should be entered using standard double quotes.

Links

The standard way to link an ISFDB record to another online record is by entering the other record's ID in the External ID field -- see Template:PublicationFields:ExternalIDs for details. If you need to link to a supported external ID which is not directly related to the current ISFDB record, e.g. you want to add a note to the effect that the record "should not to be confused with OCLC 123456", use the appropriate linking template listed above.

If the third party Web site that you want to link to is not supported, i.e. it is not listed in the External ID drop-down list or the list of linking templates, you can link to it with a direct HTML hypertext link using the <a>...</a> (anchor) tag. This is a tag pair, and MUST be closed with </a>or the rest of the record may not display at all.

The <a> tag has a single parameter, href, which gives the URL (web address) of the site to link to. The URL follows an equals sign and MUST be enclosed in double quotes to work correctly. That is, the full parameter is href="URL_Here". The text between the start tag and the close tag will be shown as the NAME of the link, the text on which a user may click to follow the link. The link NAME need not be the same as the URL.

A hypertext link is most often used in an ISFDB record's note field to link the record to the Internet source from which data has been used and/or verified.

Be careful to enter only links which are relevant and useful to the record. Links to websites other than sources of data are very unusual and should be avoided. Title records now have a designated field to enter these links; they should not be used in the Title Note field. Links in publication records should only be entered in the Note field, and HTML is required.

Only those links which are very likely to remain stable should be entered. If the link target changes, in the case of some websites that use "floating targets", it may lead a user to the wrong page. The information it was supposed to link to will not be visible to the ISFDB user, often with no easy way to find it. Of course, the editor of the record has the option of giving the source of the data without having to provide a link.

Note that links to records in the Locus online database are NOT stable. Locus periodically reindexes, changing the page division points and thus the page ID for any particular reference. For this reason, links to Locus should not be entered into ISFDB note fields, as there is no way to automatically update them. Simply noting the source as "Locus1" is sufficient.

If you are unsure whether a particular link or sort of link is stable, ask at the Help Desk before using it.

WARNING: You may see a target= parameter in links copied from other sites. This parameter tells the a web browser where to display the results of clicking on the link (and says nothing about what to display). DO NOT use target= in links you add to the ISFDB, as doing so may interfere with the software's display management. The link:
<a href="http://some.where.com/this.html" target="main">A Link</a>
should be entered as:
<a href="http://some.where.com/this.html">A Link</a>

Links to Other ISFDB Records

Note that although you can include links to other ISFDB records, they may not be stable over the long run as our records get merge, deleted or re-created using different record IDs. If you choose to link to another ISFDB record, avoid using the following types of links:

Unnumbered Lists

To display an unnumbered or "bulleted" list, you use two types of tags. The ul (unnumbered list) tag starts and stops the entire list, and the li (list item) tag marks off individual items in the list.

Many editors use this construct to display a series of separate notations in the note field.

The ul tag MUST be closed properly with a </ul> tag, or the rest of the record will display incorrectly as part of the list. You may see cases where the li tags do not have matching </li> tags. This will work correctly in all current web browsers and HTML versions, and the next version of the HTML standard (HTML5) explicitly permits it. Future versions of HTML are expected to support this also. Therefore closing </li> tags may be used or omitted in ISFDB note fields as each editor prefers, and there should be no difference in the resulting display.

It is possible to place one unnumbered list inside a single list item for another (outer) list. This is rarely done in ISFDB note fields, however, because (1) it is usually unnecessary, and (2) it makes editing more complex. Do not use this technique unless there is a clear need for it, and you are confident that you are closing both inner and outer lists correctly.

Examples of Lists

Here is an example of a complete unordered list.

This HTML:

<ul>
<li>Copyright 1984 by Jane Jones.</li>
<li>Cover artist credited on back cover.</li>
<li>Third printing by number line.</li>
<li>No date stated for this printing, but Locus shows it as May 1987.</li>
</ul>

would display like this:

  • Copyright 1984 by Jane Jones.
  • Cover artist credited on back cover.
  • Third printing by number line.
  • No date stated for this printing, but Locus shows it as May 1987.


Here is an example not using the closing </li> tags.

This HTML:

<ul>
<li>Copyright 1984 by Jane Jones.
<li>Cover artist credited on back cover.
<li>Third printing by number line.
<li>No date stated for this printing, but Locus shows it as May 1987.
</ul>

would also display like this:

  • Copyright 1984 by Jane Jones.
  • Cover artist credited on back cover.
  • Third printing by number line.
  • No date stated for this printing, but Locus shows it as May 1987.

It is not required that each list item starts on a new line, as shown in the examples above. The HTML will display a new line for each list item in any case. But it is easier to edit a note field when each list item tag starts a new line, and clearer what the HTML means. Most unnumbered lists in the ISFDB have been entered in this way.

HTML Entities

Some characters are reserved in HTML, and so should not be used in note fields. Instead, it is possible to use HTML Entities to display such characters.

For example, it is a very bad idea to use the less than (<) or greater than (>) signs in your note text, because the browser may mix them with tags. Even if it doesn't, error checking routines may complain about such text.

An HTML entity takes the form &entity_name; -- the and sign (&) and semicolon (;) are required. (It is also possible to use the form &#entity_number;.)

Here are some of the HTML entities that might be used in ISFDB note pages:

Partial list of HTML entities
Display Description Entity Name
< less than &lt;
> greater than &gt;
& ampersand &amp;
¢ cent &cent;
£ pound &pound;
¥ yen &yen;
euro &euro;
§ section &sect;
© copyright &copy;
® registered trademark &reg;
trademark &trade;

For more information and a longer list, see this w3schools page.