Utente:MauC66/Modulo:StyleVoc

--[=[

Uso:

 text-align:right;   produce al suo posto "text-align:right"
 text-align:justify;  produce al suo posto "text-align:justify"

Per aggiungere dei 'casi' al vocabolario presente basta seguire gli esempi. Attenzione a chiudere bene le stringhe con "" sia come indice di tabella che come comando espanso.

-->]=] local p = {} -- p stands for package


table = {} table["right"]="text-align:right" table["align right"]="text-align:right" table["right align"]="text-align:right" table["ar"]="text-align:right" table["center"]="text-align:center" table["centre"]="text-align:center" table["align center"]="text-align:center" table["center align"]="text-align:center" table["align centre"]="text-align:center" table["centre align"]="text-align:center" table["ac"]="text-align:center" table["left"]="text-align:left" table["align left"]="text-align:left" table["left align"]="text-align:left" table["al"]="text-align:left" table["justify"]="text-align:justify" table["align justify"]="text-align:justify" table["justify align"]="text-align:justify" table["aj"]="text-align:justify" table["transparent"]="background-color:transparent" table["transparency"]="background-color:transparent" table["bgt"]="background-color:transparent" table["border collapse"]="border-collapse:collapse" table["collapse"]="border-collapse:collapse" table["bc"]="border-collapse:collapse" table["border left"]="border-left:1px solid black" table["left border"]="border-left:1px solid black" table["bl"]="border-left:1px solid black" table["border right"]="border-right:1px solid black" table["right border"]="border-right:1px solid black" table["br"]="border-right:1px solid black" table["border top"]="border-top:1px solid black" table["top border"]="border-top:1px solid black" table["bt"]="border-top:1px solid black" table["border bottom"]="border-bottom:1px solid black" table["bottom border"]="border-bottom:1px solid black" table["bb"]="border-bottom:1px solid black" table["border all"]="border:1px solid black" table["border"]="border:1px solid black" table["ba"]="border:1px solid black" table["border none"]="border:none" table["no border"]="border:none" table["bn"]="border:none" table["btt"]="border-top:0px solid transparent" table["bbt"]="border-bottom:0px solid transparent" table["blt"]="border-left:0px solid transparent" table["brt"]="border-right:0px solid transparent" table["btt1"]="border-top:1px solid transparent" table["bbt1"]="border-bottom:1px solid transparent" table["blt1"]="border-left:1px solid transparent" table["brt1"]="border-right:1px solid transparent" table["ba2"]="border:2px solid black" table["bl2"]="border-left:2px solid black" table["br2"]="border-right:2px solid black" table["bt2"]="border-top:2px solid black" table["bb2"]="border-bottom:2px solid black" table["ba3"]="border:3px solid black" table["bl3"]="border-left:3px solid black" table["br3"]="border-right:3px solid black" table["bt3"]="border-top:3px solid black" table["bb3"]="border-bottom:3px solid black" table["bad"]="border:4px double black" table["bld"]="border-left:4px double black" table["brd"]="border-right:4px double black" table["btd"]="border-top:4px double black" table["bbd"]="border-bottom:4px double black" table["ba."]="border:1px dotted black" table["bl."]="border-left:1px dotted black" table["br."]="border-right:1px dotted black" table["br2."]="border-right:2px dotted black" table["bt."]="border-top:1px dotted black" table["bb."]="border-bottom:1px dotted black" table["bb2."]="border-bottom:2px dotted black" table["float"]="margin:0 auto 0 auto" table["float center"]="margin:0 auto 0 auto" table["float centre"]="margin:0 auto 0 auto" table["mc"]="margin:0 auto 0 auto" table["ma"]="margin-right:auto; margin-left:auto" table["ma5"]="margin:5px" table["mt5"]="margin-top:5px" table["mr5"]="margin-right:5px" table["mb5"]="margin-bottom:5px" table["ml5"]="margin-left:5px" table["ma10"]="margin:10px" table["mt10"]="margin-top:10px" table["mr10"]="margin-right:10px" table["mb10"]="margin-bottom:10px" table["ml10"]="margin-left:10px" table["lh95"]="line-height:95%" table["lh1"]="line-height:100%" table["lh10"]="line-height:100%" table["lh11"]="line-height:110%" table["lh12"]="line-height:120%" table["lh13"]="line-height:130%" table["lh15"]="line-height:150%" table["lh2"]="line-height:200%" table["lh20"]="line-height:200%" table["small caps"]="font-variant:small-caps " table["small capitals"]="font-variant:small-caps " table["sc"]="font-variant:small-caps " table["fvn"]="font-variant:normal" table["smaller"]="font-size:83%" table["sm"]="font-size:83%" table["sm80"]="font-size:80%" table["sm85"]="font-size:85%" table["sm90"]="font-size:90%" table["sm92"]="font-size:92%" table["sm95"]="font-size:95%" table["sm110"]="font-size:110%" table["x-smaller"]="font-size:69%" table["xs"]="font-size:69%" table["xx-smaller"]="font-size:58%" table["xxs"]="font-size:58%" table["larger"]="font-size:120%" table["lg"]="font-size:120%" table["x-larger"]="font-size:144%" table["xl"]="font-size:144%" table["xx-larger"]="font-size:182%" table["2xl"]="font-size:182%" table["xxl"]="font-size:182%" table["xxx-larger"]="font-size:207%" table["3xl"]="font-size:207%" table["xxxx-larger"]="font-size:249%" table["4xl"]="font-size:249%" table["upper case"]="text-transform:uppercase" table["upper-case"]="text-transform:uppercase" table["uppercase"]="text-transform:uppercase" table["uc"]="text-transform:uppercase" table["lower case"]="text-transform:lowercase" table["lower-case"]="text-transform:lowercase" table["lowercase"]="text-transform:lowercase" table["lc"]="text-transform:lowercase" table["capitalise"]="text-transform:capitalize" table["capitalize"]="text-transform:capitalize" table["cap"]="text-transform:capitalize" table["float left"]="float:left" table["fll"]="float:left" table["float right"]="float:right" table["flr"]="float:right" table["roman"]="font-style:normal" table["fsn"]="font-style:normal" table["italic"]="font-style:italic" table["i"]="font-style:italic" table["fsi"]="font-style:italic" table["normal"]="font-weight:normal" table["fwn"]="font-weight:normal" table["bold"]="font-weight:bold" table["b"]="font-weight:bold" table["fwb"]="font-weight:bold" table["itp"]="padding-left:2.0em; text-indent:-1.0em" table["itp.5"]="padding-left:2.5em; text-indent:-2.0em" table["it1p.5"]="padding-left:1.5em; text-indent:-1.0em" table["it1p2"]="padding-left:3.0em; text-indent:-1.0em" table["it"]="padding-left:2.0em; text-indent:-2.0em" table["it1"]="padding-left:1.0em; text-indent:-1.0em" table["it42"]="padding-left:4.0em; text-indent:-2.0em" table["pl0"]="padding-left:0" table["pl.5"]="padding-left:0.5em" table["pl1"]="padding-left:1.0em" table["pl15"]="padding-left:1.5em" table["pl2"]="padding-left:2.0em" table["pl3"]="padding-left:3.0em" table["pl3.5"]="padding-left:3.5em" table["pl4"]="padding-left:4.0em" table["pl5"]="padding-left:5.0em" table["pl6"]="padding-left:6.0em" table["pl7"]="padding-left:7.0em" table["pr0"]="padding-right:0" table["pr.5"]="padding-right:0.5em" table["pr1"]="padding-right:1.0em" table["pr15"]="padding-right:1.5em" table["pr2"]="padding-right:2.0em" table["pr3"]="padding-right:3.0em" table["pr3.5"]="padding-right:3.5em" table["pr4"]="padding-right:4.0em" table["pr5"]="padding-right:5.0em" table["pr6"]="padding-right:6.0em" table["pr7"]="padding-right:7.0em" table["pt0"]="padding-top:0" table["ptb.5"]="padding-top:0.5em; padding-bottom:0.5em" table["ptb1"]="padding-top:1em; padding-bottom:1em" table["pt.5"]="padding-top:0.5em" table["pt1"]="padding-top:1.0em" table["pt15"]="padding-top:1.5em" table["pt2"]="padding-top:2.0em" table["pt3"]="padding-top:3.0em" table["pt4"]="padding-top:4.0em" table["pt5"]="padding-top:5.0em" table["pb0"]="padding-bottom:0" table["pb.5"]="padding-bottom:0.5em" table["pb1"]="padding-bottom:1.0em" table["pb15"]="padding-bottom:1.5em" table["pb2"]="padding-bottom:2.0em" table["pb3"]="padding-bottom:3.0em" table["pb4"]="padding-bottom:4.0em" table["pb5"]="padding-bottom:5.0em" table["rtl"]="direction:rtl" table["vertical align text top"]="vertical-align:text-top" table["text top"]="vertical-align:text-top" table["vtt"]="vertical-align:text-top" table["vertical align text bottom"]="vertical-align:text-bottom" table["text bottom"]="vertical-align:text-bottom" table["vtb"]="vertical-align:text-bottom" table["vertical align top"]="vertical-align:top" table["top"]="vertical-align:top" table["vtp"]="vertical-align:top" table["vertical align baseline"]="vertical-align:baseline" table["baseline"]="vertical-align:baseline" table["vbs"]="vertical-align:baseline" table["vertical align bottom"]="vertical-align:bottom" table["bottom"]="vertical-align:bottom" table["vbm"]="vertical-align:bottom" table["vertical align middle"]="vertical-align:middle" table["middle"]="vertical-align:middle" table["vmi"]="vertical-align:middle" table["width all"]="width:100%" table["full width"]="width:100%" table["full"]="width:100%" table["wa"]="width:100%" table["w20"]="width:20%" table["quarter width"]="width:25%" table["quarter"]="width:25%" table["w25"]="width:25%" table["third width"]="width:33%" table["third"]="width:33%" table["w33"]="width:33%" table["w40"]="width:40%" table["half width"]="width:50%" table["half"]="width:50%" table["w50"]="width:50%" table["w60"]="width:60%" table["two thirds width"]="width:67%" table["two thirds"]="width:67%" table["two-thirds"]="width:67%" table["two third"]="width:67%" table["two-third"]="width:67%" table["w67"]="width:67%" table["three quarter width"]="width:75%" table["three quarter"]="width:75%" table["three-quarter"]="width:75%" table["three quarters"]="width:75%" table["three-quarters"]="width:75%" table["w75"]="width:75%" table["w80"]="width:80%" table["w100"]="width:100em" table["width narrow"]="width:0" table["narrow"]="width:0" table["w0"]="width:0" table["nowrap"]="white-space:nowrap" table["wnw"]="white-space:nowrap"


function p.vocabulary(frame) valore = mw.text.trim(frame.args[1])

   return table[valore]

end


return p



--[==[

[modifica] Documentazione

--]==]