Vés al contingut

Fitxer:Periodic table simple en.svg

El contingut de la pàgina no s'admet en altres llengües.
De la Viquipèdia, l'enciclopèdia lliure

Fitxer original (fitxer SVG, nominalment 946 × 618 píxels, mida del fitxer: 856 Ko)

Descripció a Commons

Resum

Descripció
English: Simple periodic table with English element names and standard atomic weights (IUPAC, 2009). [Temporarily converted to paths till fixing Wikipedia’s font problem with DejaVu Sans Condensed, but also the previous version of this image works correctly outside of Wikipedia, before Nihonium, Moscovium, Tennessine, and Oganesson were discovered.
Data 25 de setembre de 2013, 15:12:02
Font Treball propi
Autor László Németh
SVG genesis
InfoField
 
El codi font d'aquest SVG és vàlid.
 
Aquesta imatge vectorial ha estat creada amb Inkscape

Source code:

; Created in LibreOffice 4.1.2 with this LibreLogo program
; Usage: Put this code into an English language document in LibO Writer,
; fix one program line for older LibreOffice versions, see FIXME in the code,
; and click on the Start icon of the View»Toolbars»Logo toolbar.
; NEED INTERNET CONNECTION TO RUN THIS PROGRAM! (table data downloaded from Wikipedia)
lang = input “Language (af, ca, cs, de, el, en, et, fi, fr, it, nl, pt, pt-br...)?”
bw = int input “Color (0 = COLORED, 1 = BLACK/WHITE)?”
; Source pages: http://www.wikidata.org/wiki/Q13584100
; data fields: Wikipedia page, column of element names, sorting by this column (optional)
sources = {“ru”: [“%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D1%85%D0%B8%D0%BC%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D1%85_%D1%8D%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82%D0%BE%D0%B2”, 2], “fr”: [“Liste_des_%C3%A9l%C3%A9ments_chimiques”, 2], “de”: [“Liste_der_chemischen_Elemente”, 1, 3], “el”: [“%CE%9A%CE%B1%CF%84%CE%AC%CE%BB%CE%BF%CE%B3%CE%BF%CF%82_%CF%87%CE%B7%CE%BC%CE%B9%CE%BA%CF%8E%CE%BD_%CF%83%CF%84%CE%BF%CE%B9%CF%87%CE%B5%CE%AF%CF%89%CE%BD_%CE%BA%CE%B1%CF%84%CE%AC_%CE%B1%CF%84%CE%BF%CE%BC%CE%B9%CE%BA%CF%8C_%CE%B1%CF%81%CE%B9%CE%B8%CE%BC%CF%8C”, 2], “it”: [“Elementi_per_numero_atomico”, 2], “hu”: [“K%C3%A9miai_elemek_list%C3%A1ja”, 3],  “ca”: [“Llista_d%27elements_per_nombre_at%C3%B2mic”, 2], “no”: [“Grunnstoffliste”, 2], “cs”: [“Seznam_chemick%C3%BDch_prvk%C5%AF”, 3], “uk”: [“%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D1%85%D1%96%D0%BC%D1%96%D1%87%D0%BD%D0%B8%D1%85_%D0%B5%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82%D1%96%D0%B2”, 2], “et”: [“Keemiliste_elementide_loend”, 2], “nl”: [“Lijst_van_elementen”, 2, 3], “fi”: [“Luettelo_alkuaineista”, 2, 3], “eo”: [“Listo_de_kemiaj_elementoj_la%C5%AD_atomnumero”, 3], “pt”: [“Anexo:Lista_de_elementos_qu%C3%ADmicos”, 2], “sv”: [“Lista_%C3%B6ver_grund%C3%A4mnen”, 2, 3], “af”: [“Lys_van_elemente_volgens_atoomgetal”, 2], “pl”: [“Pierwiastki_chemiczne_wed%C5%82ug_liczby_atomowej”, 2]}

IF lang != “en” [
  langpage = sources[lang[: 2]][0]
  langfield = sources[lang[: 2]][1] ; column with element names on the Wikipedia page
  IF COUNT(sources[lang[: 2]]) = 3 [ langsort = sources[lang[: 2]][2] ] [ langsort = 0 ]
]

GLOBAL annotation, posx, posy, size, font, font2, lang
font = “DejaVu Sans”
font2 = “DejaVu Sans Condensed” ; Wikimedia has got problem with it, convert the result to path in Inkscape, if needed.
posx = 30
posy = 40
size = 42

; load and process element data from Wikipedia (embedded Python)
exec(“import urllib.request”)
exec(“data = urllib.request.urlopen("http://en.wikipedia.org/w/index.php?action=raw&title=List_of_elements").readlines()”)
exec(“table = [[j.strip(" |[]") for j in i.decode("utf-8").replace("style=\\\"background-color:#","0x").replace("\\\" | ","||").split("||")] for i in data if re.match("^\| *\d+ *\|\|", i.decode("utf-8"))]”)

; load and process other language data
IF lang != “en” [
  exec(“data = urllib.request.urlopen("http://%s.wikipedia.org/w/index.php?action=raw&title=%s").readlines()” % (lang[: 2], langpage))
  IF langsort > 0 [
    exec(“langtable = [[i.decode("utf-8").split("||")[%d-1].split("{")[0].split("|")[-1].strip(" \t[]").split(" ")[0].split("<")[0].split("(")[0].strip(" \t[]").split("|")[-1], int(i.decode("utf-8").split("||")[%d-1].strip(" \t"))] for i in data if re.match(".*\|[ \t]*\d+[ \t]*\|\|", i.decode("utf-8"))]” % (langfield, langsort))
    exec(“import operator”)
    exec(“langtable.sort(key=operator.itemgetter(1))”)
    exec(“langtable = [i[0] for i in langtable]”)
  ] [
    IF lang = “no” [ exec(“data = [i.decode("utf-8").replace("|", "||").replace("{{Grunnstoff/Linje |","").encode("utf-8") for i in data]”) ]
    IF lang = “pl” [ exec(“data = [i.decode("utf-8").replace("#", "|0||").replace("–","||").replace("\x27","").encode("utf-8") for i in data]”) ]

exec(“langtable = [i.decode("utf-8").replace("", "||").replace("", "").split("||")[%d].split("/")[0].strip(" []").split("|")[-1].split("(")[0] for i in data if re.match("^(|\|) *\d+ *(|\|\|)", i.decode("utf-8"))]” % (langfield-1))

  ]
] [ langtable = [] ]

; a few fixes
table[79][3] = “Mercury” ; instead of Mercury (element)
table[11][7] = “24.31” ; Mg
table[25][7] = “55.85” ; Fe
table[63][7] = “157.3” ; Gd

; add missing positions TO the table
FOR i IN RANGE 56 71 [
  table[i][5] = i – (56 – 4)
  table[i][6] = 8.5
]
FOR i IN RANGE 88 103 [
  table[i][5] = i – (88 – 4)
  table[i][6] = 9.5
]

IF lang = “pt” OR lang = “pt-br” [
  FOR i in [[1, “Hidrogénio/Hidrogênio”], [7, “Azoto/Nitrogênio”], [8, “Oxigénio/Oxigênio”], [10, “Néon/Neônio”], [18, “Árgon/Argônio”], [33, “Arsénio/Arsênio”], [34, “Selénio/Selênio”], [36, “Crípton/Criptônio”], [40, “Zircóni/Zircôni”], [42, “Molibdénio/Molibdênio”], [44, “Ruténio/Rutênio”], [51, “Antimónio/Antimônio”], [54, “Xénon/Xenônio”], [74, “Tungsténio/Tungstênio”], [75, “Rénio/Rênio”], [86, “Rádon/Radônio”], [93, “Neptúnio/Netúnio”], [94, “Plutónio/Plutônio”], [97, “Berkélio/Berquélio”], [99, “Einsténio/Einstênio”], [103, “Laurêncio/Lawrêncio”]] [
    IF lang = “pt-br” [ ptbr = 1 ] [ ptbr = 0 ]
    langtable[i[0]-1] = i[1].split(“/”)[ptbr]
  ]
]

; helper functions
to get_color s
ecolors = {'alkali metal': 0xff6666,'alkaline earth metal': 0xffdead,'lanthanide': 0xffbfff,'rare earth metal': 0xffbffe,'actinide': 0xff99cc,'superactinide': 0xd1ddff,'eka-superactinide': 0xc6dd9d,'transition metal': 0xffc0c0,'metalloid': 0xcccc99,'noble gas': 0xc0ffff,'poor metal': 0xcccccc,'diatomic nonmetal': 0xe7ff8f,'polyatomic nonmetal': 0xa1ffc3,'unknown': 0xffffff}
for i in ecolors [
  if i in s [ output ecolors[i] ]
]
output 0xffffff
end

TO width_of_last_object
OUTPUT _.drawpage.getByIndex(_.drawpage.getCount()-1).getSize().Width / 100 * __MM_TO_PT__; IN PT
END ; FIXME: remove the space before the “END”

TO delete_last_object
_.drawpage.remove(_.drawpage.getByIndex(_.drawpage.getCount()-1))
END

TO element size d l18n bw
PENUP POSITION [posx + INT(d[5])*size, posy + FLOAT(d[6])*size*1.2] HEADING 0
; show group number
IF INT(d[0]) IN [1, 2, 4, 5, 6, 7, 8, 9, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30] [
  IF lang in [“af”, “ca”, “en”, “eo”, “no”, “pl”, “pt”, “pt-br”, “sv”] [
    FORWARD size/2 + size/5 LABEL [0, 1, d[5]]
  ] [
    FORWARD size/2 + size/5 LABEL [0, 4.5, d[5]]
    groupname = {“1”: “I. A.”, “2”: “II. A.”, “3”: “III. B.”, “4”: “IV. B.”, “5”: “V. B.”, “6”: “VI. B.”, “7”: “VII. B.”, “8”: “     ╭───”, “9”: “VIII. B.”, “10”: “───╮     ”, “11”: “I. B.”, “12”: “II. B.”, “13”: “III. A.”, “14”: “IV. A.”, “15”: “V. A.”, “16”: “VI. A.”, “17”: “VII. A.”, “18”: “VIII. A.”}[d[5]]
    IF lang not in [“hu”] [ groupname = SUB (“[.]”, “”, groupname) ]
    FONTSIZE 10 LABEL [0, 1, groupname]
  ]
  BACK size/2 + size/5
]
IF bw [ FILLCOLOR “WHITE” ] [ FILLCOLOR get_color(d[1]) ]
PENDOWN RECTANGLE [size, size*1.2] PENUP
IF “M” IN d[2] OR “m” IN d[2] OR 2 < COUNT (d[2]) [ FONTFAMILY font2 ] [ FONTFAMILY font ]
FONTWEIGHT “BOLD”
FONTSIZE size/2.1
TEXT d[2]
FONTWEIGHT “UPRIGHT” FONTFAMILY font
BACK size*1.2/2-size/20
fontsiz = 5.6
FONTSIZE size/fontsiz
IF l18n [
  name = l18n[INT(d[0])-1]
] [ name = d[3] ]
if lang != “de” [ name = name.lower() ]
LABEL [0, 1, name]
fontdescratio = 492/2048 ; DejaVu Sans Condensed
IF width_of_last_object() > size * 0.95 [
  delete_last_object
  FONTFAMILY font2
  LABEL [0, 1, name]
  width = width_of_last_object
  IF width > size * 0.95 [
    delete_last_object
    fontsiz2 = size/fontsiz * size/width * 0.95
    FORWARD size/fontsiz*fontdescratio - fontsiz2*fontdescratio
    FONTSIZE fontsiz2
    LABEL [0, 1, name]
    BACK size/fontsiz*fontdescratio - fontsiz2*fontdescratio
  ]
]
FONTSIZE size/5.8 FONTFAMILY font2
FORWARD [-size/2 + size/20, size*1.2/2-size/20 + size*0.6 – size/20]
HEADING 0 LABEL [1, -1, d[0]]
RIGHT 90 FORWARD size – size/10 LEFT 90
weight = FINDALL(“(\d+[.]\d+|\[\d+\])”, d[7])[0]
IF weight[0] != “[” [
   wsize = COUNT(FINDALL(“^\d+”, weight)[0])
   w2size = COUNT(FINDALL(“[.]\d+”, weight)[0])
   IF w2size > 4 – wsize [ weight = (“%.” + STR(4 – wsize) + “f”) % FLOAT weight ]
]
IF d[2] IN [“H”, “Li”, “B”, “C”, “N”, “O”, “Mg”, “Si”, “S”, “Cl”, “Br”, “Zn”, “Se”, “Mo”, “Tl”] [ weight = weight + “*” ]
IF lang not in [“en”] [ weight = SUB (“[.]”, “,”, weight) ]
LABEL [-1, -1, weight]
END

HOME CLEARSCREEN HIDETURTLE PENSIZE 0.5 PENUP
bwtext = {FALSE: “”, TRUE: “_bw”}[bw] ; save black and white images with “_bw” label

PICTURE “periodic_table_simple_%s%s.svg” % (lang, bwtext) [
    FONTSIZE size/5.8 FONTFAMILY font2
    ; legend
    POSITION [posx + size/2 + size/5.8/2, posy + size * 1.2 * 7.5 + size/20] HEADING 0 LABEL [-1, -1, “*”]
    legend = “H: [1.00784, 1.00811]\nLi: [6.938, 6.997]\nB: [10.806, 10.821]\nC: [12.0096, 12.0116]\nN: [14.00643, 14.00728]\nO: [15.99903, 15.99977]\nMg: [24.304, 24.307]\nSi: [26.084, 26.086]\nS: [32.059, 32.076]\nCl: [35.446, 35.457]\nBr: [79.901, 79.907]\nTl: [204.382, 204.385]\nZn: 65.38(2)\nSe: 78.96(3)\nMo: 95.96(2)”
    if lang not in [“en”] [ legend = SUB (“[.]”, “,”, legend) ]
    LABEL [1, -1, legend]
    POSITION [posx + size * 3.5, posy + size * 1.2 * 8.5] HEADING 0 PENDOWN
    LEFT 90 FORWARD 2*size/5/3 RIGHT 90 FORWARD size * 1.2 * 3 – size/20 – size/5.8/2 LEFT 90 FORWARD 5*size/5/3 PENUP 
    POSITION [posx + 2.5*size + size/20, posy + size * 5.5 * 1.2 + size/20] HEADING 0
    LABEL [1, -1, “57–71”]
    PENUP POSITION [posx + size * 3.5, posy + size * 1.2 * 9.5] HEADING 0 PENDOWN
    LEFT 90 FORWARD 4*size/5/3 RIGHT 90 FORWARD size * 1.2 * 3 – size/20 – size/5.8/2 LEFT 90 FORWARD 1.2*size/5/3 PENUP
    POSITION [posx + 2.5*size + size/20, posy + size * 6.5 * 1.2 + size/20] HEADING 0
    LABEL [1, -1, “89–103”]
    ; draw elements
    FOR i IN table [ element size i langtable bw ]
]

}} }}

Llicència

Jo, el titular dels drets d'autor d'aquest treball, el public sota la següent llicència:
Creative Commons CC-Zero L'ús d'aquest fitxer és regulat sota les condicions de Creative Commons de CC0 1.0 lliurament al domini públic universal.
La persona que ha associat un treball amb aquest document ha dedicat l'obra domini públic, renunciant en tot el món a tots els seus drets de d'autor i a tots els drets legals relacionats que tenia en l'obra, en la mesura permesa per la llei. Podeu copiar, modificar, distribuir i modificar l'obra, fins i tot amb fins comercials, tot sense demanar permís.

Llegendes

Afegeix una explicació d'una línia del que representa aquest fitxer

Elements representats en aquest fitxer

representa l'entitat

Historial del fitxer

Cliqueu una data/hora per veure el fitxer tal com era aleshores.

Data/horaMiniaturaDimensionsUsuari/aComentari
actual12:38, 5 set 2022Miniatura per a la versió del 12:38, 5 set 2022946 × 618 (856 Ko)Smasongarrisonslimmed down with svgomg // Editing SVG source code using c:User:Rillke/SVGedit.js
16:35, 10 oct 2018Miniatura per a la versió del 16:35, 10 oct 2018946 × 618 (1,51 Mo)Nl74text to path version of the previous file
16:05, 10 oct 2018Miniatura per a la versió del 16:05, 10 oct 2018946 × 618 (571 Ko)Nl74Update with new element names (IUPAC, 2016)
16:03, 10 oct 2018Miniatura per a la versió del 16:03, 10 oct 2018946 × 618 (1,21 Mo)Nl74Reverted to version as of 22:09, 28 October 2013 (UTC)
15:56, 10 oct 2018Miniatura per a la versió del 15:56, 10 oct 2018946 × 618 (565 Ko)Nl74Update with the new official element names
23:09, 28 oct 2013Miniatura per a la versió del 23:09, 28 oct 2013946 × 618 (1,21 Mo)Nl74fix rounding (converted path)
23:07, 28 oct 2013Miniatura per a la versió del 23:07, 28 oct 2013946 × 618 (211 Ko)Nl74fix rounding
16:55, 25 set 2013Miniatura per a la versió del 16:55, 25 set 2013946 × 618 (1,42 Mo)Nl74Convert to paths (till fixing Wikimedia's DejaVu Sans Condensed problem)
14:42, 25 set 2013Miniatura per a la versió del 14:42, 25 set 2013946 × 618 (211 Ko)Nl74test (Wikimedia doesn't render DejaVu Sans Condensed, maybe font-stretch will fix)
14:18, 25 set 2013Miniatura per a la versió del 14:18, 25 set 2013946 × 618 (211 Ko)Nl74User created page with UploadWizard

La pàgina següent utilitza aquest fitxer:

Ús global del fitxer

Utilització d'aquest fitxer en altres wikis:

Metadades