Wikipedia talk:Image markup with HTMLProposed Software changeI've (Tarquin) made a suggestion to the tech mailing list which would simplify image markup for floated images. but this comes at a small cost. I'll explain the proposed changes here & people can comment on whether they like this trade-off or now.
CurrentHere's what we currently have. For a floating image with a small caption: <div style="float:right;margin:0 0 1em 1em;">[[Image:image name|alt text]] ''Caption''</div> With a logner caption, you need to add in the width of the image, to limit the width of the div element. (otherwise it displays as wide as the caption and looks odd). This is the markup for a long caption, 300px for example: <div style="float:right;margin:0 0 1em 1em;width:300px">[[Image:image name|alt text]] ''Caption''</div> ProposedAll this involves is adding a CSS class to our stylesheet. For small-caption images, we'd write: <div class="floatright">[[Image:image name|alt text]] ''Caption''</div> I think this is much simpler. But for wide captions, we'd need to write: <div class="floatright" style="width:300px">[[Image:image name|alt text]] ''Caption''</div> Whether this is better, worse, or about the same as before is debatable. PS I should have said that as I see it, this is very much a halfway house before we get better image markup! CommentsI think every picture that has a caption should have a width specification, otherwise effects are unpredictable depending on browser, font size etc. Even a slightly overflowing picture box is highly annoying because it invades article space. I also think that the "margin:0 0 1em 1em" is not necessary, it's sufficient to just say "margin:10px" to get a margin of 10 pixels on all sides. Under these circumstances, I don't really see much of a simplification. I would support this change anyway, if I wouldn't think that current image handling is fairly braindead and should be rewritten to a large extent. After that, DIVs will probably not be directly entered anymore, so I consider minor optimizations in that area of little help. But I won't scream if it gets into our stylesheet regardless. --Eloquence 11:08 24 Jun 2003 (UTC) Why don't we modify the wiki markup to create the div and apply the style? [[Image:image name|left|alt text]] or something? I think any impure wiki markup is a bad idea. CGS 12:05 24 Jun 2003 (UTC). ProposedBy Ævar Arnfjörð Bjarmason I propose the following syntax for images that are to have caption text: [[Image:Wikipedesketch1.png|right|Proposed Wikipedia mascotte|This is the caption text to the proposed mascotte]] which would render as: ( 200px is the width of the image, this information could be included on-the-fly by PHP <div class="floatright" style="width:200px;"> <img src="http://en.wikipedia.org/uploat/what/ever/Wikipedesketch1.png" alt="Proposed Wikipedia mascotte"> <p>This is the caption text to the proposed mascotte</p> </div> OR <div class="floatright" style="width:200px;"> <img src="http://en.wikipedia.org/uploat/what/ever/Wikipedesketch1.png" alt="Proposed Wikipedia mascotte"> <br> This is the caption text to the proposed mascotte </div> (The only difference being <p></p> ( which i personally favor ) and not <br> ) Pros
Coins
if anyone else has a good idea about how the parser can seperate ALT text and caption please point it out. Perhaps we could use the following: [[Image:Wikipedesketch1.png|right|Proposed Wikipedia mascotte||This is the caption text to the proposed mascotte]] Which is exactly the same as the above, except it presumes that the caption text is always the text after the ||, this is however unstandard since a dauble pipe is not currently used in the wikisyntax, i reccomend the first idea, to just presume that we have that order. CommentsTable auto-sizeBla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Tables are for tabular data. You can tell this because it is called the table element. Pet peeve. CGS 12:24 24 Jun 2003 (UTC). I'd also like to see text-align:center in the floatright class. It's not always what's desired, but it can always be overridden by a style="text-align:left" if need be. -- John Owens 12:34 24 Jun 2003 (UTC)
That way, the div code can stay the same, and only the paragraph containing the caption need be modified. Even better, perhaps we could define a "caption" class that causes all captions to be displayed in a certain way (small font, emphasized maybe), but again, there's that width problem. I really dunno. All I'm sure of is that I strongly vote against using tables of any kind for this. -- Wapcaplet 13:36 24 Jun 2003 (UTC)
First off, I think that the "Proposed" is far superior to the "Current", because the current form of the style attribute is highly abstruse.
but it looks like such a fundamental rewriting of wiki code that nobody would want to do it. So we might as well do the same thing as a stylesheet-defined HTML tag. (Stylesheets can define brand-new tags, right?) -Smack 22:32 1 Jul 2003 (UTC) how to pad
This is really just a hack, and not recommended for a number of obvious reasons. padding is better, but margin-lefg is even better because it places the spacing only where it is needed. Which I think looks better. -- Egil 13:43 May 5, 2003 (UTC) PS: I also have left out the <small> for captions, since it decreases readability. The Wikipedia:Manual of Style recommends straight italics, and at least to my taste that makes the image caption stand out to a sufficient degree. -- Egil Sequence of imagesMoved from the village pump: Can some kind soul show me how to put a sequence of four images down the right hand side of the page so that they form one unit and no text can sneak in between them. I'm referring to Sistine Chapel that I illustrated. I reckon the page would look nicer if I had all four pics together and there would be no problems with pics overlapping in different browsers. Thanks.
<table align=right> <tr><td> <div style="float:right;"> [[image:___Name___ | __Description_]] <br> <small>''More detailed explanation<br> [[media:___Name___ | Larger version]]''</small> <br><br> [[image:___Name2___ | __Description_]] <br> <small>''More detailed explanation<br> [[media:___Name2___ | Larger version]]''</small> <br><br> [[image:___Name3___ | __Description_]] <br> <small>''More detailed explanation<br> [[media:___Name3___ | Larger version]]''</small> <br><br> [[image:___Name4___ | __Description_]] <br> <small>''More detailed explanation<br> [[media:___Name4___ | Larger version]]''</small> </div> </td></tr> </table> --Menchi 09:08 14 Jun 2003 (UTC)
Thanks to wapcaplet for the section on markup.
Side by side imagesThere was discussion of side by side images on the pump a while back (now archived) and I asked for comments about what I've done in the mandolin article and got no response. I raise it again here because if it's a good answer that I've given I'll add it to this gallery, so others can use it. I think this gallery is an excellent idea. If we just link to pages for markup examples there's the danger it will change (an acceptable risk for the pump but not for longer-lived pages), to link to old versions is cumbersome (but may be appropriate in some circumstances), and to put all the examples that I hope will eventually be here into the markup section of the image policy page seems excessive. But obviously, if there are pitfalls to what I've done I want to fix it, not spread it. The obvious circumvention is to combine the two photos into one image using a photo editor. I've not done this because:
But, there may well be other ramifications I haven't thought of. Andrewa 20:57, 4 Oct 2003 (UTC)
Alt versus title attributesI've just spotted - and changed - what I consider to be an error on the Extended image syntax page. Namely, it repeatedly described the images associated text as its alt text, when in fact it is (quite rightly) also used for the related but different purpose of a title attribute - one is instead of the image, the other is as well as it. On that page, I went through and called it caption text throughout, but this page already uses alt text and caption for two different things, so I'm not sure how it could better be worded. And as for Wikipedia:Alternate text for images - surely the whole article is based on a false assumption. Am I going mad, or has everyone else decided to ignore the fact that it's also a title attribute? - IMSoP 12:39, 30 Jan 2004 (UTC) Article link using Image?Is there any way to use a small image icon as a link to an article? Having clickable icons would be very handy for data tables and the like. Over at Talk:Ryanair we have been discussing using a Unicode airplane (✈) as a link to the destination airport, like this Cork ✈. Unfortunately, this doesn't work with many browsers. What I'd like to do is link the image File:1a2.png to the airport. Easy to do in HTML, but is it possible in Wiki? Seabhcán 14:31, 26 Nov 2004 (UTC)
|
Portal di Ensiklopedia Dunia