Jump to content

User:Blainster/code examples

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Blainster (talk | contribs) at 16:02, 23 March 2007 (Reference style: add template for refs w/ reduced size text). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Reduced text

Here is the code to generate reduced size text: <div style="font-size: 80%"> at head; and </div> at foot

Reference style

New Reference style: put the footnote text inside <ref> ... </ref> tags (always remembering the second one, otherwise it fails horribly), and then add a usual "References" section with a <references /> tag in it. Simple! And, yes, it works automagically. The FAC crowd swoon when they see it :) You can also add a "name" to the <ref> (<ref name="Fred_p21">) so you can use it more than once. I think Saffron is the epitome at the moment, although it puts the <references /> tag in a "Notes" section, and has a separate "References" section referred to by the Notes, which themselves use Harvard style using the {{Harv}} template (which I had not seen until just now). -- ALoan (Talk) 21:25, 15 February 2006 (UTC)

Let me try a simpler stab at it. First, put the magic tag <references/> wherever it is that you want the list of footnotes to show up. Then, wherever you want to put a footnote into your prose, add <ref>My footnote data goes here</ref>. The "My footnore data goes here" will show up not in the prose but down at the bottom in a linked footnote. It's almost simpler to do than explain. —Bunchofgrapes (talk) 21:46, 15 February 2006 (UTC)
  • The alternate Template:Reflist does the same thing as the "references" closing tag, except it automatically generates reduced size text, and has an option to generate two or three columns.

Columns

  • Two columns with "straw" background color are created by inserting the templates {{top}}, {{mid}} (at the end of the first column), and {{bottom}} (at the end of the second column). See Template:top
  • Two columns without background can also be created with Wiki pipe syntax (see Help:Table), but this reverses row and column order:

{|
|<li>item a<li>item b<li>item c
|<li>item d<li>item e<li>item f
|}

yielding this:

  • item a
  • item b
  • item c
  • item d
  • item e
  • item f
  • Articles created

    Major Additions