Template talk:R: Difference between revisions
imported>Chris Day |
imported>Chris Day |
||
Line 25: | Line 25: | ||
--[[User:Larry Sanger|Larry Sanger]] 13:55, 6 May 2008 (CDT) | --[[User:Larry Sanger|Larry Sanger]] 13:55, 6 May 2008 (CDT) | ||
Just want to point out that the real reason for the problem above was an extra font tag that got removed in the [http://en.citizendium.org/wiki?title=Template:R&diff=next&oldid=100326101 following edit]. Also this | :Just want to point out that the real reason for the problem above was an extra font tag that got removed in the [http://en.citizendium.org/wiki?title=Template:R&diff=next&oldid=100326101 following edit]. Also this template has changed a lot since the above was written so those examples may not look the same as when it was written on May 6th. [[User:Chris Day|Chris Day]] 11:52, 20 May 2008 (CDT) | ||
==Formatting limits== | ==Formatting limits== |
Revision as of 10:52, 20 May 2008
Extra newline
Can anyone explain to me why there is an extra newline after this template's contents? Can anyone remove it, please?? --Larry Sanger 13:24, 6 May 2008 (CDT)
To answer my own question, it's caused by the fact that we place newlines between each use of the template, like this:
{{r|Biology}} {{r|Microbiology}} {{r|Cell Biology}}
That outputs:
- Biology [r]: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
- Microbiology [r]: The study of microorganisms (overlapping with areas of virology, bacteriology, mycology, and parasitology). [e]
- Cell Biology [r]: The study of the components of cells and their interactions. [e]
But the r template itself adds an asterisk, which adds its own newline (before the asterisk). That's two newlines. To eliminate extra newlines, you could do this:
{{r|Biology}}{{r|Microbiology}}{{r|Cell Biology}}
which outputs:
- Biology [r]: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
- Microbiology [r]: The study of microorganisms (overlapping with areas of virology, bacteriology, mycology, and parasitology). [e]
- Cell Biology [r]: The study of the components of cells and their interactions. [e]
--Larry Sanger 13:55, 6 May 2008 (CDT)
- Just want to point out that the real reason for the problem above was an extra font tag that got removed in the following edit. Also this template has changed a lot since the above was written so those examples may not look the same as when it was written on May 6th. Chris Day 11:52, 20 May 2008 (CDT)
Formatting limits
Note that even though both:
{{r|Biology}} {{r|Cell (biology)||**}}
- Biology [r]: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
- Cell (biology) [r]: The basic unit of life, consisting of biochemical networks enclosed by a membrane. [e]
and:
{{r|Biology}} **{{r|Cell (biology)||}}
- Biology [r]: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
- Cell (biology) [r]: The basic unit of life, consisting of biochemical networks enclosed by a membrane. [e]
work, however:
{{r|Biology}} *{{r|Cell (biology)||*}}
- Biology [r]: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
- Cell (biology) [r]: The basic unit of life, consisting of biochemical networks enclosed by a membrane. [e]
doesn't. The best theory about why is that it must be that thing with an extra newline being emitted - it must be coming out after the leading '*' and before the second '*' (in the no-working cases), i.e. right at the start of the template invocation. That's why the ones with the '**' (at either end) work, that new line is not splitting the two '*'s apart. In those middle ones, the reason the naked bullet is coming out right up on the left margin is that it sees:
* *[[link]]
not:
**[[link]]
and of course then we get two separate bullets, fully left-justified. Dont ask me why the **{{r|link||}} case works, because it should be seeing:
** [[link]]
if my theory about when the 'rogue' new line is appearing is correct, but clearly it's not appearing then! J. Noel Chiappa 11:47, 20 May 2008 (CDT)