File: substances.cwl

package info (click to toggle)
texstudio 4.3.1%2Bds-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 74,980 kB
  • sloc: cpp: 102,721; xml: 17,126; ansic: 8,143; sh: 194; javascript: 177; makefile: 28
file content (105 lines) | stat: -rw-r--r-- 2,799 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# substances package
# Matthew Bertucci 4/26/2022 for v0.2a

#include:expl3
#include:xparse
#include:l3keys2e
#include:xtemplate
#include:chemmacros
#include:chemfig
#include:ghsystem
#include:chemfig
#include:siunitx

#keyvals:\usepackage/substances#c
draft#true,false
final#true,false
index#true,false
style=%<style name%>
strict#true,false
#endkeyvals

\DeclareSubstance{id}{properties%keyvals}#s#%substancesid
\LoadSubstances{database name}
\SubstancesDatabase{name}#*

#keyvals:\DeclareSubstance
name=%<name%>
sort=%<sort name%>
alt=%<alt name%>
altsort=%<sort alt name%>
CAS=%<CAS number%>
PubChem=%<PubChem number%>
formula=%<formula%>
structure=%<structure%>
mp=%<melting point%>
bp=%<boiling point%>
density=%<density%>
phase=%<phase%>
pKa=%<pKa%>
pKa1=%<pKa1%>
pKa2=%<pKa2%>
pKb=%<pKb%>
pKb1=%<pKb1%>
pKb2=%<pKb2%>
pictograms={%<list of pictograms%>}
H={%<list of hazard statements%>}
P={%<list of precautionary statements%>}
EUH={%<list of EUH statements%>}
LD50=%<median lethal dose%>
%substancesfield
#endkeyvals

\CAS{number}#*

\SubstancesStyle{style name}#*
\SubstancesStyle*{style name}#*
\LoadSubstancesStyle{style name}

\DeclareSubstanceProperty{name}#s#%substancesfield
\DeclareSubstanceProperty{name}[pre code]
\DeclareSubstanceProperty{name}[pre code][post code]
\DeclareSubstanceProperty*{name}#s#%substancesfield
\DeclareSubstanceProperty*{name}[pre code]
\DeclareSubstanceProperty*{name}[pre code][post code]

\chem{id%keyvals}
\chem{id%keyvals}[property]
\chem[pre]{id%keyvals}
\chem[pre]{id%keyvals}[property]
\chem[pre][post]{id%keyvals}
\chem[pre][post]{id%keyvals}[property]
\chem*{id%keyvals}
\chem*{id%keyvals}[property]
\chem*[pre]{id%keyvals}
\chem*[pre]{id%keyvals}[property]
\chem*[pre][post]{id%keyvals}
\chem*[pre][post]{id%keyvals}[property]
\GetSubstanceProperty{id%keyvals}{property}
\RetrieveSubstanceProperty{id%keyvals}{property}

#keyvals:\chem#c,\chem*#c,\GetSubstanceProperty#c,\RetrieveSubstanceProperty#c
%substancesid
#endkeyvals

\ForAllSubstancesDo{code}
\AllSubstancesSequence
\AllSubstancesClist
\IfSubstancePropertyTF{id}{field}{true code}{false code}
\IfSubstancePropertyT{id}{field}{true code}
\IfSubstancePropertyF{id}{field}{false code}
\IfSubstanceFieldTF{field}{true code}{false code}
\IfSubstanceFieldT{field}{true code}
\IfSubstanceFieldF{field}{false code}
\IfSubstanceExistTF{id}{true code}{false code}
\IfSubstanceExistT{id}{true code}{false code}
\IfSubstanceExistF{id}{true code}{false code}

\SubstanceIndex{id}#*
\SubstanceIndex[opt]{id}#*
\SubstanceIndexNameEntry{sort}{name}#*
\SubstanceIndexNameAltEntry{sort}{name}{alt}#*
\SubstanceIndexAltEntry{alt sort}{name}{alt}#*

\ghspictograms{arg}#*
\ghsstatements{arg1}{arg2}#*