Referencing to a Common Reference Page

By JSV JSV

Description

This addresses these problems:

  1. The [[footnote]] tag creates a list only for the current page, rather than for a list common to all (or some) pages.
  2. Use of the ^^superscript^^ mark-up causes the baseline to be moved, making the text look ugly.
  3. The underlining of references disrupts the text.

A CSS solution, and a non-CSS solution is offered here.

  1. The CSS solution uses a [[span]] tag of class ref, and benefits from the automatic inclusion of [ and ] symbols either side (which widen the focus target). Unfortunately, IE6 does not render the :before and :after elements of the style, so you may adapt this to omit the :before and :after, and put them into the referring block as escaped literals.
  2. The non-CSS version packs the same information into a style attribute for a [[span]] tag, but does not change the text decoration of the link.

Attribution

Based on code found here.

Code

CSS version

Referring code (in your page)

[[span class="ref"]][[[references|3]]][[/span]]

CSS code (in your custom CSS Theme)

.ref{position:relative;
 font-size:85%;
 top:-0.9ex;
 margin-left:0.2em;
 margin-right:0.1em;
}.refa{text-decoration:none;
 border-bottom:solid1pxblack;
}.refa:before{content: "["
}.refa:after{content: "]"
}

Non-CSS version (using style)

[[span style="position:relative; font-size:85%; top:-0.9ex; margin-left:0.2em; margin-right:0.1em;"]]@@[@@[[[references|3]]]@@]@@[[/span]]

In action

Standard footnote (illustrating the problem)

Superscripting normally disrupts the spacing in your text lines (the rest of this sentence has been put here as padding, to provide sufficient text to show that the line spacing is disrupted in this example). Here is an example of a standard footnote. You'll see that the line spacing is disrupted (the rest of this sentence has been put here as padding, to provide sufficient text to show that the line spacing is disrupted in this example).

Suggested reference format (CSS example)

See this page for the CSS example.

Suggested reference format (non-CSS, inline example)

Superscripting normally disrupts the spacing in your text lines (the rest of this sentence has been put here as padding, to provide sufficient text to show that the line spacing is preserved in this example). This line contains a reference[3 ] to another page, using the non-CSS method. You'll notice that the line spacing is not disrupted by the superscripted reference (the rest of this sentence has been put here as padding, to provide sufficient text to show that the line spacing is preserved in this example).


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by JSV

Page Collections and Sequence Boxes - 16 Feb 2012 01:28
Easy Table Title Footers - 15 Feb 2012 00:49


Rate this solution

If you think this solution is useful — rate it up!

rating: +6
Spacing: reply to Vittek
JSV JSV 01 Jun 2009 13:24

The spacing is uneven. The spacing between the line containing the superscript '1' and the line above is larger. Because the default line spacing is dynamic (responding to the size of the content of the line), the superscript makes the content taller, and therefore the line height changes just for that line.
If you can't see anything wrong with the example, then it's possible that your browser does not display the paragraph like my browser does (I've tried with IE and Firefox)… but with small text, it's only a few pixels difference, so might be difficult to see in some cases — which is OK.

by JSV JSV , 01 Jun 2009 13:24
Re: Spacing: reply to Vittek
Vittek Vittek 01 Jun 2009 17:56

Oh, THAT spacing! I was looking at the space from on word to the next, not between line.
Yes, there is a little more space between those two lines, if you look closely, and maybe in other cirmustances (depending of font, dimensions, browser and so on) the space would be a lot more noticeable. My bad.

by Vittek Vittek , 01 Jun 2009 17:56
Spacing
Vittek Vittek 01 Jun 2009 13:17

What do you mean with "the spacing is disrupted?" I can't see anything wrong in the first example (the standard footnote).

by Vittek Vittek , 01 Jun 2009 13:17
Footnotes
. footnote text
page revision: 5, last edited: 16 Feb 2012 01:38
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).

AltStyle によって変換されたページ (->オリジナル) /