User:Grendelkhan/Scratch

From Wikipedia, the free encyclopedia

Contents

[edit] Can't indent tables

 <div style="background: red;">
 {| border=1
 |-
 |Table!||Stuff!
 |}
 </div>
Table! Stuff!

 <div style="background: red;">
 :{| border=1
 |-
 |Table!||Stuff!
 |}
 </div>
Table! Stuff!

 <div style="background: red;">
 :<table border=1>
 <tr>
 <td>Table!</td><td>Stuff!</td>
 </tr>
 </table>
 </div>
Table! Stuff!

 <div style="background: red;">
 <table border=1>
 <tr>
 <td>Table!</td><td>Stuff!</td>
 </tr>
 </table>
 </div>
Table! Stuff!

[edit] thin cylinder

MetaPost script to replace Image:Moment of inertia thin cylinder.png

u=18mm;
textscale=u/12mm;
% this MetaPost script generates a PostScript file, which is then included in a
% TeX document. if you want to generate EPS from this, you'll have to uncomment
% the following line. (and probably do a couple more things, to boot.)
%prologues := 1;
def cylinder =
  begingroup;
  save pmax,dmax,persp,persp_nt,tens,arr;
  save harrtop,harrbot,rarrlft,rarrrt;
  save p,d;
  save axisprotrusion;
  save xax,yax,zax;
  pmax = 3; dmax = 0;
  persp_nt = 0.3;
  tens = 2-persp_nt;
  persp = persp_nt*u;
  arr = 0.3u; % how far to offset the arrows from the diagram
  axisprotrusion = 1u;  % how far do the axes protrude?
  pair harrtop,harrbot,rarrlft,rarrrt; % endpoints for arrows
  path p[],d[]; % original, dotted
  pair xax[],yax[],zax[]; % x,y,z are taken; these are for the axes
  % solid paths
  p0 = (-1u,-1u)--(-1u,1u);
  p1 = (1u,-1u)--(1u,1u);
  p2 = (-1u,1u)..tension tens..(0,1u+persp)..tension tens..(1u,1u)..tension tens..(0,1u-persp)..tension tens..cycle;
  p3 = (-1u,-1u){down}..tension tens..(0,-1u-persp)..tension tens..(1u,-1u){up};
  % dashed paths
  d0 = (-1u,-1u){up}..tension tens..(0,-1u+persp)..tension tens..(1u,-1u){down};
  % endpoints of dimension arrows
  harrtop = (-1u-arr,1u);
  harrbot = (-1u-arr,-1u);
  rarrlft = (0,1u);
  rarrrt = (1u,1u);
  % actually draw
  pickup pencircle scaled 1pt;
  for i=0 upto pmax:
    draw p[i];
  endfor;
  for i=0 upto dmax:
    draw d[i] dashed evenly;
  endfor;
  drawdblarrow (harrtop..harrbot);
  drawdblarrow (rarrlft..rarrrt);
  label.lft(btex $h$ etex scaled textscale,.5[harrtop,harrbot]);
  label.top(btex $r$ etex scaled textscale,.5[rarrlft,rarrrt]);
  % x axis
  xax0 = (0,0);
  xax1 = (1u,0);
  xax2 = (1u+axisprotrusion*0.5,0);
  drawarrow (xax1..xax2);
  draw xax0..xax1 dashed evenly;
  label.rt(btex $x$ etex scaled textscale,xax2);
  % y axis
  yax0 = (0,0);
  yax1 = point 1.5 of p0;
  yax2 = (1.5+axisprotrusion/u)[yax0,yax1];
  drawarrow (yax1..yax2);
  draw yax0..yax1 dashed evenly;
  label.ulft(btex $y$ etex scaled textscale,yax2);
  % z axis
  zax0 = (0,0);
  zax1 = (0,1u-persp);
  zax2 = (0,1u+axisprotrusion);
  drawarrow (zax1..zax2);
  draw zax0..zax1 dashed evenly;
  label.top(btex $z$ etex scaled textscale,zax2);
  endgroup;
enddef;
beginfig(1)
  cylinder;
endfig;
bye

[edit] Notes

Note the bit about

yax1 = point 1.5 of p0;
yax2 = (1.5+axisprotrusion/u)[yax0,yax1];

That gets the right point on the circumference curve.

And oh fuggles, I found out how to draw ellipses. Dashed fine timing...

[edit] Thumbs stretch small images

Wiki wiki wiki, all day long.
Wiki wiki wiki, all day long.

Image:Wiki.png

[edit] Dodgy syntax makes bad HTML


http://foo.barImage:Wiki.png


http://foo.bar Image:Wiki.png

[edit] External links in captions break images

From Wikipedia
From Wikipedia


From Wikipedia
From Wikipedia


From Wikipedia, the free encyclopedia.
From Wikipedia, the free encyclopedia.



From http://wikipedia.org, the free encyclopedia.
From http://wikipedia.org, the free encyclopedia.


[edit] isfdb

[edit] xhtml

Monaco 16000 2 31987
Monaco 16000 2 31987

[edit] Styling navboxes.

This is the code for a navbox (Template:Toolband), or will be with the changed outlined in Bugzilla:1707.

{| align=center class="toccolours"
! [[Tool (band)|Tool]]
|-
|align=center|[[Maynard James Keenan]] | [[Adam Jones]] | [[Danny Carey]] | [[Justin Chancellor]] | [[Paul d'Amour]]
|-
![[Tool (band)#Discography|Discography]]
|-
|align=center|''[[Opiate (album)|Opiate]]'' | ''[[Undertow (Tool album)|Undertow]]'' | ''[[Ænima]]'' | ''[[Salival]]'' | ''[[Lateralus]]''
|-
!Popular Songs
|-
|align=center|"[[Stinkfist]]" | "[[Schism]]" | "[[Sober (song)|Sober]]"
|-
!Related articles
|-
|align=center|''[[Progressive rock]]'' | ''[[A Perfect Circle]]'' | ''[[Peach (band)|Peach]]''
|}

This is how it renders.

Tool
Maynard James Keenan | Adam Jones | Danny Carey | Justin Chancellor | Paul d'Amour
Discography
Opiate | Undertow | Ænima | Salival | Lateralus
Popular Songs
"Stinkfist" | "Schism" | "Sober"
Related articles
Progressive rock | A Perfect Circle | Peach


Now, a user stylesheet could change that around to look like

Tool
Maynard James Keenan | Adam Jones | Danny Carey | Justin Chancellor | Paul d'Amour
Discography
Opiate | Undertow | Ænima | Salival | Lateralus
Popular Songs
"Stinkfist" | "Schism" | "Sober"
Related articles
Progressive rock | A Perfect Circle | Peach


if they, I dunno, really liked limes or something, or thought the small text crammed into the body of the box was a poor idea. Someone with actual CSS skills could probably do something much, much cooler. The idea, really, is to allow navboxes to be written with purely semantic markup, styled after the fact with CSS. (The same might be possible with meta-templates, but CSS is really the place for it.)

[edit] Thumbnail boxes improperly sized when |NUMxNUM px is used.

This ain't right.
This ain't right.


This is marginally better.
This is marginally better.


Precise.
Precise.

[edit] Math oddities.

This only causes unexpected issues when math is set to 'MathML if possible'.

baab = 0
(a + b)(ab) = baab = 0
(ab) = baab = 0
(a) = baab = 0
a = baab = 0
baab = 0
ba - ab = 0

This seems to cause problems regardless of the user's math settings.