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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
|
% \iffalse meta-comment
%
% Copyright (C) 2007-08 by
% Joseph Wright <joseph.wright@morningstar2.co.uk>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status ``maintained.''
%
% The current maintainer of this work is Joseph Wright.
%
% This work consists of the source file chemscheme.dtx
% and the derived files chemstyle.ins,
% chemstyle.sty,
% chemstyle.pdf,
% chemstyle.ltx,
% rsc.jdf,
% angew.jdf,
% tetlett.jdf,
% jomc.jdf,
% jacs.jdf,
% ic.jdf,
% jpc.jdf,
% orglett.jdf and
% none.jdf
% Unpacking:
% (a) If chemstyle.ins is present:
% tex chemstyle.ins
% (b) Without chemstyle.ins:
% tex chemstyle.dtx
% (c) If you use LaTeX to generate files:
% latex \let\install=y\input{chemstyle.dtx}
%
% Documentation:
% (a) Without write18 enabled:
% pdflatex chemstyle.dtx
% makeindex -s gind.ist chemstyle.idx
% makeindex -s gglo.ist -o chemstyle.gls chemstyle.glo
% pdflatex chemstyle.dtx
% makeindex -s gind.ist chemstyle.idx
% makeindex -s gglo.ist -o chemstyle.gls chemstyle.glo
% pdflatex chemstyle.dtx
% (b) With write18 enabled:
% pdflatex chemstyle.dtx
% pdflatex chemstyle.dtx
% pdflatex chemstyle.dtx
%
% Installation:
% Copy chemstyle.sty to a location searched by TeX, and
% if required by your TeX installation, run the appropriate
% command to build a hash of files (texhash, mpm --update-db,
% etc.)
%
% Note:
% The jawltxdoc.sty file is not needed for installation,
% only for building the documentation. It may be deleted.
%
%<*ignore>
% This is all taken verbatim from Heiko Oberdiek's packages
\begingroup
\def\x{LaTeX2e}%
\expandafter\endgroup
\ifcase 0\ifx\install y1\fi\expandafter
\ifx\csname processbatchFile\endcsname\relax\else1\fi
\ifx\fmtname\x\else 1\fi\relax
\else\csname fi\endcsname
%</ignore>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
----------------------------------------------------------------
The chemstyle package --- Writing chemistry with style
Maintained by Joseph Wright
E-mail: joseph.wright@morningstar2.co.uk
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
----------------------------------------------------------------
\endpreamble
\Msg{Generating chemstyle files:}
\usedir{tex/latex/chemstyle}
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}
\file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
\usedir{tex/latex/chemstyle/config}
\generate{\file{rsc.jdf}{\from{chemstyle.dtx}{rsc}}
\file{angew.jdf}{\from{chemstyle.dtx}{angew}}
\file{tetlett.jdf}{\from{chemstyle.dtx}{tetlett}}
\file{jomc.jdf}{\from{chemstyle.dtx}{jomc}}
\file{jacs.jdf}{\from{chemstyle.dtx}{jacs}}
\file{ic.jdf}{\from{chemstyle.dtx}{ic}}
\file{jpc.jdf}{\from{chemstyle.dtx}{jpc}}
\file{orglett.jdf}{\from{chemstyle.dtx}{orglett}}
}
\generate{\file{none.jdf}{\from{chemstyle.dtx}{none}}
}
\usedir{doc/latex/chemstyle}
\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
}
\endbatchfile
%</install>
%<*ignore>
\fi
% Will Robertson's trick
\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
%</ignore>
%<*driver>
\PassOptionsToClass{a4paper}{article}
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\usepackage[journal=none,xspace=true]{chemstyle}
%\OnlyDescription
% The various formatting commands used in this file are collected
% together in jawltxdoc.
\usepackage{jawltxdoc}
% To show the features of \eg, \ie and so on, a bit of work is
% required, as they are defined by jawltxdoc and by chemstyle
\let\eg\undefined
\let\ie\undefined
\let\latin\undefined
\let\etc\undefined
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
%\CheckSum{0}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
% \GetFileInfo{\jobname.sty}
%
%\changes{v1.0}{2006/08/06}{Initial release of package}
%\changes{v1.0b}{2007/09/04}{Added \pkg{microtype} and
% \pkg{notes2bib} to template}
%\changes{v1.1}{2007/09/17}{License changed from \textsc{gpl} to
% \textsc{lppl}}
%\changes{v1.1}{2007/09/17}{Phrases modified to better avoid clash
% with user's own commands}
%\changes{v1.1}{2007/09/17}{Fixed error with spacing after
% \emph{e.g.}~and \emph{i.e.}}
%\changes{v1.1}{2007/09/17}{Added \opt{phrases} option}
%\changes{v1.1}{2007/09/17}{Added \opt{siunits} option}
%\changes{v1.1}{2007/09/17}{Added \opt{xspace} option}
%\changes{v1.1a}{2007/09/18}{Fixed error in documentation compilation
% under \LaTeX}
%\changes{v1.1c}{2007/09/23}{Fixed problems with capitalisation
% of \pkg{SIunits}}
%\changes{v1.1c}{2007/09/23}{Documentation improved}
%\changes{v1.1c}{2007/09/23}{Added \pkg{SIunits} option}
%\changes{v1.1e}{2007/10/07}{Fixed packaging problem}
%\changes{v1.2}{2008/03/07}{Various internal tweaks}
%\changes{v1.2}{2008/03/07}{Removed obsolete \opt{ch} and
% \opt{chapter} options}
%
%\setkeys{lst}{language=[LaTeX]{TeX},moretexcs={mmHg,Molar,%
% molar,cmc,Hz,unit,standardstate,iPr,nPr,nBu,sBu,tBu,iBu,%
% cstsetup,latin,eg,ie,etc,invacuo,etal,floatstyle,restylefloat,%
% upsigma,uppi}}
%
%\DoNotIndex{\@fs@capt,\@fs@cfont,\@fs@iftopcapt,\@fs@mid,\@fs@post}
%\DoNotIndex{\@fs@pre,\@gobblefour,\@ifclassloaded,\@ifnextchar}
%\DoNotIndex{\@ifpackagelater,\@ifpackageloaded,\@ifundefined}
%\DoNotIndex{\@nameuse,\@undefined,\abovecaptionskip,\addto}
%\DoNotIndex{\AtBeginDocument,\begingroup,\belowcaptionskip}
%\DoNotIndex{\bfseries,\bibname,\captionsetup,\centi,\cm,\color}
%\DoNotIndex{\csgappto,\csname,\cubed,\CurrentOption,\deci}
%\DoNotIndex{\DeclareCaptionFormat,\DeclareCaptionLabelSeparator}
%\DoNotIndex{\DeclareMathSymbol,\DeclareOptionX}
%\DoNotIndex{\DeclareRobustCommand,\DeclareSymbolFont,\def}
%\DoNotIndex{\define@boolkey,\define@choicekey,\define@cmdkeys}
%\DoNotIndex{\define@key,\dm,\edef,\else,\emph,\endcsname}
%\DoNotIndex{\endgroup,\endinput,\ensuremath,\ExecuteOptionsX}
%\DoNotIndex{\expandafter,\fi,\figurename,\floatc@plain}
%\DoNotIndex{\floatc@ruled,\floatcontentscentre,\floatplacement}
%\DoNotIndex{\floatstyle,\futurelet,\gdef,\hertz,\hrule,\iffalse}
%\DoNotIndex{\ifnum,\iftrue,\ifx,\input,\InputIfFileExists}
%\DoNotIndex{\kern,\labelformat,\languagename,\let,\makeatletter}
%\DoNotIndex{\makeatother,\MakeUppercase,\mathord,\MessageBreak}
%\DoNotIndex{\metre,\milli,\mmHg,\mole,\NeedsTeXFormat,\newcommand}
%\DoNotIndex{\newcounter,\newfloat,\newif,\newunit,\OrgLettColour}
%\DoNotIndex{\PackageError,\PackageInfo,\PackageWarning}
%\DoNotIndex{\PassOptionsToPackage,\ProcessOptionsX,\providecommand}
%\DoNotIndex{\ProvidesFile,\ProvidesPackage,\quad,\refname,\relax}
%\DoNotIndex{\renewcommand,\RequirePackage,\restylefloat,\rotatebox}
%\DoNotIndex{\rpcubed,\schemename,\selectlanguage,\setkeys}
%\DoNotIndex{\si@requirecfgs,\space,\spacefactor,\tablename,\textsc}
%\DoNotIndex{\textsuperscript,\the,\unitsep,\unitsuperscript,\usk}
%\DoNotIndex{\value,\vspace,\xspace,\z@}
%
% \title{\currpkg\ --- Writing chemistry with style^^A
% \thanks{This file describes version \fileversion, last revised
% \filedate.}}
% \author{Joseph Wright^^A
% \thanks{E-mail: joseph.wright@morningstar2.co.uk}}
% \date{Released \filedate}
%
% \maketitle
%
%\begin{abstract}
% The \currpkg package provides a ``one-stop shop'' for setting up
% formatting of \LaTeX\ documents following the editorial policies of
% various chemical journals. It provides a number of handy
% chemistry-related commands, and loads several support packages to
% aid the chemist.
%\end{abstract}
%
%\begin{multicols}{2}
%\tableofcontents
%\end{multicols}
%
%\section{Introduction}
% The aim of \currpkg is to provide a quick method to set up various
% document parameters (such as caption formatting), simply by
% specifying the model journal. The package has also been designed
% to allow rapid addition of new journal styles. Each style
% definition is a separate file, and new styles can be added very
% readily. \currpkg has grown out of the \pkg{rsc} package, which had
% a similar aim but was much more limited (and less robustly
% implemented). The \currpkg package is also designed with the use
% of \pkg{biblatex} in mind: the \pkg{rsc} package is closely bound
% to traditional \BibTeX\ use.
%
% As a successor to the \pkg{rsc} package, \currpkg provides a range
% of chemistry-related additional macros. The set provided here is
% an extended version of those provide by \pkg{rsc}. Everything that
% can be done using the \pkg{rsc} \LaTeX\ package is therefore
% possible using the \currpkg package.
%
% The formatting system provided by \currpkg are intended for writing
% a variety of documents. Thus the stylistic changes made by the
% package do not seek to reproduce the appearance of printed journal
% articles. The package aims to be suitable for use in preparing
% drafts of papers, but also for writing reports, theses and so on.
%
%\section{Style options for \currpkg}
%\DescribeOption{journal}
% \currpkg should be loaded with a package option specifying which
% journal style to follow. Currently, \currpkg is aware of a the
% styles listed in Table~\ref{styles}. New styles can be developed
% by creating a new file modelled on the existing definitions;
% \currpkg will automatically search for correctly-named styles.
%\begin{table}
% \begin{tabular}{ll}
% \toprule
% Option & Journals using this style \\
% \midrule
% none & Not applicable\\
% angew & \emph{Angew.\ Chem.}, \emph{Chem.\ Eur.\ J.} \\
% jomc & \emph{J.\ Organomet.\ Chem.},
% \emph{Coord.\ Chem.\ Rev.} \\
% ic & \emph{Inorg.\ Chem.} \\
% jacs & \emph{J.\ Am.\ Chem.\ Soc.} \\
% jcp & \emph{J.\ Phys.\ Chem.\ A}, \emph{J.\ Phys.\ Chem.\ B} \\
% orglett & \emph{Org.~Lett.}\\
% rsc & \emph{Chem.\ Commun.}, \emph{Org.\ Biomol.\ Chem.} \\
% & \emph{Dalton Trans.} \\
% tetlett & \emph{Tetrahedron}, \emph{Tetrahedron Lett.} \\
% \bottomrule
% \end{tabular}
% \caption{Styles provided by \currpkg}\label{styles}
%\end{table}
% The style files provided with \currpkg have been derived from
% current practice in the target journals. It is not always easy to
% pick the correct stylistic settings from (sometimes inconsistent)
% real-world examples. The package author welcomes feedback on the
% styles provided.
%
% The \opt{none} style is notable as it is not based on a journal.
% Instead this is a minimal style, which provides the additional
% commands without making formatting changes. It is also the default
% style if no option is given. This document has been compiled
% implicity using the \opt{none} option, for example.
%
%\subsection{Creating styles}
% The process of creating a new styles for \currpkg is intended to be
% relatively easy. New styles should be saved as files with the
% extension \ext{jdf} (standing for for Journal Definition File), and
% should be saved somewhere in the path searched by
% \TeX.\footnote{Depending on your \TeX\ distribution, you may need
% to rebuild your file database after creating a new style. For
% Mik\TeX\ users, this can be done graphically or by typing
% \texttt{mpm --update-db} at the command line; for TeXLive, run
% \texttt{texhash}.} The definition files included in the package
% should provide a guide to the basic options available for producing
% new styles. Arbitrary \TeX\ commands can be included, if they are
% necessary for a particular style. For example, other packages can
% be loaded in \cs{usepackage}.
%
% The maintainer of \currpkg is happy to add new styles to the
% package, either by contribution by users or on request (when he has
% sufficient time!). If you have a new style to add (or corrections
% to an existing one), please contact the package author.
%
%\subsection{Package options}
%\DescribeOption{journal}
% As of version 1.2, \currpkg uses the \pkg{keyval} system for
% option management. The choice of journal style can therefore be
% given as a normal option or by using the key \opt{journal=}. The
% other package options provided by the package are described as they
% arise in the documentation.
%
%\DescribeMacro{\cstsetup}
% Some of the package options can only be set when loading the
% package. The choice of journal style is one of these. Others can
% be altered anywhere in the document, using the \cs{cstsetup} macro.
% This accepts a \pkg{keyval} list and processes it as needed.
%
%\DescribeOption{chemcompounds}
% \currpkg loads the \pkg{chemscheme} package, and therefore will
% pass through the opt{chemcompounds} option.
%
%\section{Naming of the references section}
% \currpkg alters the naming of the references section of a document.
% By default, \currpkg alters the value of \cs{bibname} or
% \cs{refname} (as appropriate) to the form of words chosen by the
% target journal for the ``References'' section.
%
% The ``\refname'' naming commands are language-aware, \emph{via} the
% \pkg{babel} interface. Currently, \currpkg includes appropriate
% labels for \pkg{babel} languages \opt{english}, \opt{UKenglish},
% \opt{ngerman} and \opt{french}. Other languages can be added if
% appropriate wordings are provided to the author. The naming system
% is designed to work correctly with both \pkg{natbib} and
% \pkg{biblatex}.
%
%\DescribeOption{notes}
%\DescribeOption{nonotes}
% The package recognises the \opt{notes} option for controlling how
% the references section is named. The accepts the values
% \opt{true}, \opt{false} and \opt{auto}. The Boolean values either
% enable or disable the addition of ``Notes and'' to the
% ``References'' of the section title. The \opt{auto} option works
% in conjunction with the \pkg{notes2bib} package. If notes are
% added, ``Notes and'' is included in the section title, whereas if
% no notes are given the section title remains as ``References''.
% The \opt{nonotes} option is equivalent to \opt{notes=false}.
%
%\DescribeOption{notesbefore}
% The second option for this area is \opt{notesbefore}. This takes
% \opt{true} and \opt{false} only, and sets whether ``Notes and
% References'' or ``References and Notes'' is produced.
%
%\section{Additional macros}
%\subsection{Additional units}
%\DescribeMacro{\Hz}
%\DescribeMacro{\mmHg}
%\DescribeMacro{\molar}
%\DescribeMacro{\Molar}
%\DescribeMacro{\cmc}
% Both the \pkg{SIunits} and \pkg{unitsdef} packages provide methods
% for handling a range of units, but do not include a small number of
% unit macros useful to chemists. The package therefore provides
% these, using \pkg{SIunits} by default.\footnote{This is a change in
% v1.2: previous versions used \pkg{unitsdef}.} The definitions
% follow the pattern of the appropriate package.
%\begin{LaTeXexample}
% \unit{10}{\Hz}\\
% \unit{20}{\mmHg}\\
% \unit{30}{\molar}\\
% \unit{40}{\Molar}\\
% \unit{50}{\cmc}
%\end{LaTeXexample}
%
% The \pkg{si} package is currently under development as a
% replacement for \pkg{SIunits} and \pkg{unitsdef}.\footnote{By the
% maintainer of \currpkg.} \pkg{si} includes definitions for the
% above units, and so if it is loaded the definitions are taken from
% there, rather than provided by \currpkg. Looking to the future,
% once \pkg{si} reaches version 1.0, it will become the default
% support package for \currpkg.
%
%\subsection{The standard state symbol}
%\DescribeMacro{\standardstate}
% Related to the above, but not exactly a unit is the
% \cmd{\standardstate} command.\footnote{The \cs{standardstate} macro
% is only defined if the user does not have their own version.} This
% generates the tricky \cs{standardstate} symbol.
%\begin{LaTeXexample}
% \emph{H}\standardstate\\
% $\Delta S\standardstate$
%\end{LaTeXexample}
%
%\subsection{Alkyl radicals}
%\DescribeMacro{\nPr}
%\DescribeMacro{\iPr}
%\DescribeMacro{\nBu}
%\DescribeMacro{\iBu}
%\DescribeMacro{\sBu}
%\DescribeMacro{\tBu}
% There are a few alkyl radicals that come up all of the time. No
% one seems to have put these into a package, so they are provided
% here. As you would expect, \cs{iPr} gives \iPr, \cs{iBu} gives \iBu
% and \cs{tBu} gives \tBu, and so on. The style of the output
% depends on the journal style specified; most journals seem to
% favour one version of the abbreviation.
%\begin{LaTeXexample}
% The alkyl group could be \nPr, \iPr\\
% or \nBu without affecting the selectivity.
%\end{LaTeXexample}
%
%\DescribeOption{xspace}
% When \currpkg is loaded using the \opt{xspace} option, the
% \pkg{xspace} package is automatically used to add space after the
% command names, so that |\iPr group| will result in ``\iPr\ group''
% being typeset.
%
%\DescribeOption{radhyphen}
%\DescribeOption{rademph}
%\DescribeOption{radsuper}
%\DescribeOption{radprefix}
% The appearance of these radical abbreviations is controlled by the
% package options \opt{radhyphen}, \opt{rademph}, \opt{radsuper} and
% \opt{radprefix}. The journal styles set these automatically, but
% they can be redefined at any point. The options work as might be
% expected, and are Boolean switches.
%\begin{LaTeXexample}
% \cstsetup{radhyphen=false,radsuper=true}\\
% \iPr \tBu
% \cstsetup{radhyphen=true,radsuper=false,%
% radprefix=false,rademph=false}\\
% \iBu \sBu
%\end{LaTeXexample}
%
%\subsection{Latin phrases}
%\DescribeMacro{\latin}
%\DescribeMacro{\etc}
%\DescribeMacro{\eg}
%\DescribeMacro{\ie}
%\DescribeMacro{\etal}
%\DescribeMacro{\invacuo}
% The various Latin phrases commonly used in chemistry are made
% available as the obvious commands. By altering the definition of
% \cs{latin}, this allows ready switching from italic to Roman
% typesetting. Notice that \cs{etc}, \cs{ie} and \cs{eg} are aware
% of trailing periods, and so doubling-up should not occur. Once
% again, these macros use \pkg{xspace} when given as a package option
% to handle automatic addition of spaces after these phrases.
%
%\DescribeOption{abbremph}
% The use of italic for these abbreviations is set by altering the
% package option \opt{abbremph}, which takes values \opt{true} and
% \opt{false}.
%\begin{LaTeXexample}
% \etal or \invacuo plus \latin{some text}\\
% \cstsetup{abbremph=false}
% \ie equals \eg perhaps \etc
%\end{LaTeXexample}
%
%\DescribeOption{abbrcomma}
% For American journals, where it is obligatory to follow ``\eg'' and
% ``\ie'' with a comma, the package provides a mechanism for handling
% this automatically. Thus, when using an appropriate journal style,
% |\eg|, |\eg.| and |\eg,| will all result in typesetting ``\eg,''.
% The Boolean package option \opt{abbrcomma} controls this.
%\begin{LaTeXexample}
% \eg this\\
% \cstsetup{abbrcomma=true}
% \ie that
%\end{LaTeXexample}
%
% The \cs{etc} and \cs{etal} commands are set up on the
% assumption that they come at the end of a sentence. Hence the
% spacing after these will default to an inter-sentence space. If
% you desire an inter-word space, use the normal methods
%\begin{LaTeXexample}
% \etc\ more text \\
% \etal\~have shown
%\end{LaTeXexample}
%
%\DescribeOption{nophrases}
% The definitions of all of the phrases are designed not to overwrite
% any given by the user \emph{in the preamble}. So, if you have your
% own \cs{latin} macro, it will be used even if you load \currpkg. If
% you encounter any problems, try loading the package with the
% \opt{nophrases} option; this option prevents the package even
% trying to define any of the phrase macros.
%
%\DescribeMacro{\latinemphon}
%\DescribeMacro{\latinemphoff}
% For backward-compatibiltiy with previous versions of \currpkg, the
% macros \cs{latinemphon} and \cs{latinemphoff} are provided. These
% work as would be expected, to alter the formatting produced by
% \cs{latin}. The more general \pkg{keyval} method is now preferred
% for making this change.
%
%\section{Additional information}
%\subsection{Advice for users of the \pkg{rsc} package}
% The \currpkg package is intended as a replacement for the \pkg{rsc}
% package. As such, it covers almost everything the the \pkg{rsc}
% \LaTeX\ package does, and more. Users of \pkg{rsc} are strongly
% encouraged to update to using \currpkg. The bibliography styles
% provided by \pkg{rsc} will continue to be required, of course.
% Migration of these styles to \pkg{biblatex} is an on-going project.
%
%\subsection{Interactions with other packages}
% The \currpkg package has been designed to avoid, as far as
% possible, clashes with other packages. The package requires the
% presence of the standard \pkg{graphicx} and \pkg{varioref}
% packages. If these packages need to be loaded with explicit
% options, this should be done \emph{before} loading \currpkg. The
% \pkg{chemscheme} package is also needed, as it provides the
% floating \texttt{scheme} environment essential in synthetic
% chemistry documents.
%
%\subsection{Captions above floats}
% The \texttt{scheme} float type is generated using the \pkg{float}
% package. This has the side-effect that the placement of captions
% for floats does not depended on where the \cs{caption} command
% comes inside the floating environment.\footnote{Normally this is a
% good thing.} If you wish to alter the placement of captions, the
% mechanism of the underlying \pkg{float} package will be needed.
% This requires the use of \cs{floatstyle} to load the desired
% settings, followed by \cs{restylefloat} to apply the settings.
% This is most usually done with tables.
%\begin{LaTeXexample}[\typesetfloatexample]
% \begin{table}[h]
% \caption{A caption above the float contents}
% The float contents
% \end{table}
% \floatstyle{plaintop}
% \restylefloat{table}
% \begin{table}[h]
% \caption{A second caption above the float contents}
% The second float contents
% \end{table}
%\end{LaTeXexample}
%
%\section{A template for chemical articles}
% This is a very simple template for chemistry-related documents.
% Hopefully it contains a few extra hints for getting well-formatted
% documents quickly. For simplicity, the template assumes that the
% user is writing a thesis for a U.K.~university. Hence it uses
% U.K.~defaults and RSC-based styling. Most of the packages used have
% good documentation, but a brief summary of why they are recommend
% follows. The file \file{chemstyle.ltx} will be generated by
% compiling this documentation, and contains the example ``ready to
% run''.
%\edef\LaTeXexamplefile{chemstyle.ltx}
%\begin{LaTeXexample}[\typesetcodeonly]
% \documentclass[fontsize=10pt,paper=a4]{scrreprt}
% \usepackage[english,UKenglish]{babel}
% \usepackage{geometry,upgreek,booktabs}
% \usepackage[journal=rsc,xspace=true]{chemstyle}
% \usepackage[version=3]{mhchem}
% \usepackage[footnotes]{notes2bib}
% \usepackage[final]{microtype}
% \usepackage[colorlinks]{hyperref}
% \begin{document}
% Document contents go here
% \end{document}
%\end{LaTeXexample}
%\edef\LaTeXexamplefile{\jobname.tmp}
%
% The versatile \textsc{koma}-script bundle provides more advanced
% versions of the standard document classes. If you want paragraphs
% separated out, with no indents (a common style for theses), add the
% \opt{parskip} option to the font and paper size ones given here.
%
% The \pkg{babel} system is loaded to sort out hyphenation and so on,
% and could be useful if there are any foreign-language quotes.
%
% \pkg{geometry}e allows the users to alter page layout with ease:
% much better than trying to hack the raw \LaTeX\ system.
% \pkg{booktabs} gives much nicer looking tables than the \LaTeXe\
% default. \pkg{upgreek} provides non-italic lowercase Greek letters,
% which should be used for things such as bond descriptions.
%\begin{LaTeXexample}
% $\uppi$-bond $\upsigma^*$-orbital
%\end{LaTeXexample}
%
% Load \currpkg (of course) to give not only some easy formatting,
% but also to automatically provide a float type for schemes, thanks
% to the \pkg{chemscheme} package. This also loads either
% \pkg{chemcompounds} or (optionally) \pkg{bpchem} to track compound
% numbers.
%
% The \pkg{mhchem} package provides the \cs{ce} command for rapidly
% typesetting formulas, so that you can type |\ce{H2SO4}| and get
% \ce{H2SO4}.
%
% The \pkg{microtype} package improves formatting when used with the
% pdf\TeX\ engine. By giving the \opt{final} option, it is active
% even when using \opt{draft} as a global option.
%
% Using \pkg{notes2bib} allows the user to automatically add notes to
% the bibliography from within the document body. So you can put
% |\bibnote{A note}| in the source, and this will move into the
% References section without any further effort. The \opt{footnotes}
% option means that footnotes do the same.
%
% Finally, the \pkg{hyperref} package makes headings, citations and
% so on into hyperlinks.
%
%\StopEventually{}
%
%\iffalse
%<*package>
%\fi
%\section{The package code}
%\subsection{Setup code}
% First of all, the package identifies itself and loads other
% packages needed to function. Loading \pkg{chemscheme} is deferred
% until later, to allow processing of options at the correct point.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{chemstyle}
[2008/03/08 v1.2 Writing chemistry with style]
% \end{macrocode}
%\changes{v1.1d}{2007/10/04}{Require caption in all cases}
%\changes{v1.0a}{2007/08/23}{No longer load \texttt{fixltx2e}
% package}
%\changes{v1.2}{2008/03/05}{Added \pkg{xkeyval} interface}
% Packages that are needed under all circumstances are loaded here.
% There are some limitations on the age of \pkg{xkeyval}.
% \begin{macrocode}
\RequirePackage{xkeyval}
\@ifpackagelater{xkeyval}{2005/05/07}
{}
{\PackageError{chemstyle}
{xkeyval >= 2.5 required}
{chemstyle requires the `xkeyval' package, version 2.5
or later.\MessageBreak The version loaded is:
`\@nameuse{ver@xkeyval.sty}'.\MessageBreak
This is a fatal error: loading will abort.}
\endinput}
\RequirePackage{graphicx,varioref,caption,xspace}
% \end{macrocode}
%\begin{macro}{\cst@tempa}
%\changes{v1.2}{2008/03/05}{New macro}
%\begin{macro}{\cst@tempb}
%\changes{v1.2}{2008/03/05}{New macro}
% A couple of temporary private macros.
% \begin{macrocode}
\newcommand*{\cst@tempa}{}
\newcommand*{\cst@tempb}{}
% \end{macrocode}
%\end{macro}
%\end{macro}
%
%\subsection{Option handling}
%\begin{macro}{\cst@boolkey}
% Option handling is processed using \pkg{xkeyval}. As a number of
% Boolean keys are needed, a shortcut is handy.
% \begin{macrocode}
\newcommand*{\cst@boolkey}[1]{
\define@boolkey[cst]{opt}[cst@]{#1}[true]{}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ifcst@chemcompounds}
%\begin{macro}{\ifcst@xspace}
%\begin{macro}{\ifcst@phrases}
%\begin{macro}{\ifcst@radprefix}
%\begin{macro}{\ifcst@rademph}
%\begin{macro}{\ifcst@radsuper}
%\begin{macro}{\ifcst@radhyphen}
%\begin{macro}{\ifcst@abbremph}
%\begin{macro}{\ifcst@abbrcomma}
%\begin{macro}{\ifcst@notesbefore}
% The Boolean keys are now defined.
% \begin{macrocode}
\cst@boolkey{chemcompounds}
\cst@boolkey{xspace}
\cst@boolkey{phrases}
\cst@boolkey{radprefix}
\cst@boolkey{rademph}
\cst@boolkey{radsuper}
\cst@boolkey{radhyphen}
\cst@boolkey{abbremph}
\cst@boolkey{abbrcomma}
\cst@boolkey{notesbefore}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifcst@notes}
%\begin{macro}{\ifcst@autonotes}
%\begin{macro}{\cst@tempa}
%\begin{macro}{\cst@tempb}
% For notes, some choices are available. These need a bit of
% testing.
% \begin{macrocode}
\newif\ifcst@notes
\newif\ifcst@autonotes
\define@choicekey*[cst]{opt}{notes}[\cst@tempa]
{true,false,auto}[true]
{\cst@notesfalse
\cst@autonotesfalse
\edef\cst@tempb{auto}
\ifx\cst@tempa\cst@tempb
\cst@notestrue
\cst@autonotestrue
\fi
\edef\cst@tempb{true}
\ifx\cst@tempa\cst@tempb
\cst@notestrue
\fi}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
% Some old options are no longer needed at all.
% \begin{macrocode}
\DeclareOptionX[cst]<opt>{siunits}
{\PackageInfo{chemstyle}{Option siunits no longer required}}
\DeclareOptionX[cst]<opt>{SIunits}
{\PackageInfo{chemstyle}{Option siunits no longer required}}
\DeclareOptionX[cst]<opt>{nonotes}
{\ExecuteOptionsX[cst]<opt>{notes=false}}
\DeclareOptionX[cst]<opt>{nophrases}
{\ExecuteOptionsX[cst]<opt>{phrases=false}}
% \end{macrocode}
%\begin{macro}{\cst@journal}
%\begin{macro}{\cst@language}
% The \opt{journal} option can be given with or without
% \opt{journal=}.
% \begin{macrocode}
\define@cmdkeys[cst]{opt}[cst@]{journal,language}
\DeclareOptionX*{\edef\cst@journal{\CurrentOption}}
% \end{macrocode}
%\end{macro}
%\end{macro}
% The default options are executed, and the user options are
% processed.
% \begin{macrocode}
\setkeys[cst]{opt}{
notes=true,
phrases=true,
chemcompounds=true,
xspace=true,
journal=none,
radprefix=true,
rademph=true,
radsuper=false,
radhyphen=true,
abbremph=true,
abbrcomma=false,
language=english,
notesbefore=true}
\ProcessOptionsX[cst]<opt>
% \end{macrocode}
% With the options processed, those to be passed to \pkg{chemscheme}
% are sorted out.
% \begin{macrocode}
\ifcst@chemcompounds
\PassOptionsToPackage{chemcompounds}{chemscheme}
\fi
\RequirePackage{chemscheme}
% \end{macrocode}
%\begin{macro}{\cst@disablekey}
% Some of the options are no longer relevant once the package is
% loaded. These are disabled here with a suitable message.
% \begin{macrocode}
\newcommand*{\cst@disablekey}[1]{
\define@key[cst]{opt}{#1}{\PackageWarning{chemstyle}
{Option `#1' only valid when loading package}}}
\AtBeginDocument{
\cst@disablekey{journal}
\cst@disablekey{phrases}
\cst@disablekey{nophrases}
\cst@disablekey{notes}
\cst@disablekey{nonotes}
\cst@disablekey{chemcompounds}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\cstsetup}
% A macro for changing the settings at run-time without needing to
% know the internals of the package.
% \begin{macrocode}
\newcommand*{\cstsetup}[1]{%
\iffalse{\fi\ifnum0=`}\fi
\setkeys[cst]{opt}{#1}%
\ifnum0=`{\fi\iffalse}\fi}
% \end{macrocode}
%\end{macro}
%
%\subsection{Extra units}
%\changes{v1.2}{2008/03/06}{Re-write of units section}
% The upcoming \pkg{si} package\footnote{An improved replacement for
% all of the existing unit packages.} will include the extra
% chemistry units as a loadable modules (\opt{alsoload=synchem}). A
% series of checks are therefore made before any definitions are
% given. If \pkg{si} is loaded, the necessary part of that package is
% loaded; the \cs{si@requirecfgs} macro from that package is used.
% The \cs{makeatletter} macro is needed here as otherwise the
% configuration file is loaded with the wrong category codes.
% \begin{macrocode}
\AtBeginDocument{
\@ifpackageloaded{si}
{\makeatletter
\si@requirecfgs{synchem}
\makeatother}
% \end{macrocode}
%\begin{macro}{\cmc}
%\begin{macro}{\Hz}
% Neither \pkg{unitsdef} nor \pkg{SIunits} define these two macros.
% \begin{macrocode}
{\newcommand*{\cmc}{\cubiccentimeter}
\newcommand*{\Hz}{\hertz}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\cubiccentimeter}
%\begin{macro}{\Molar}
%\begin{macro}{\molar}
%\begin{macro}{\mmHg}
%\begin{macro}{\mol}
% A check is for the \pkg{unitsdef} package, so that the
% package-dependant definitions can be given.
% \begin{macrocode}
\@ifpackageloaded{unitsdef}
{\newunit{\cubiccentimeter}{\cm\unitsuperscript{3}}
\newunit{\Molar}{\textsc{m}}
\newunit{\molar}{\mole\unitsep\dm\unitsuperscript{--3}}
\newunit{\mmHg}{mmHg}
\newunit{\mol}{\mole}}
% \end{macrocode}
% Two checks are made for \pkg{SIunits} to allow for odd
% capitalisation. If it is not found, then the package is
% loaded.\footnote{This will change when \pkg{si} reaches version
% 1.0.}
% \begin{macrocode}
{\@ifpackageloaded{SIunits}{}
{\@ifpackageloaded{siunits}{}
{\RequirePackage{SIunits}}}
\newcommand*{\cubiccentimeter}{\centi\metre\cubed}
\newcommand*{\Molar}{\textsc{m}}
\newcommand*{\molar}{\mole\usk\deci\metre\rpcubed}
\newcommand*{\mmHg}{\milli\metre Hg}
\newcommand*{\mol}{\mole}}}}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\subsection{Standard state symbol}
%\begin{macro}{\cst@varnothing}
%\changes{v1.1}{2007/09/17}{New macro}
%\begin{macro}{\standardstate}
% The ``standard state'' symbol is handy. This is produced by
% rotating the ``varnothing'' symbol from the \textsc{ams} set. Note
% that the rotation angle here has been carefully checked, but is set
% by eye. The symbol is loaded directly here, rather than using the
% \pkg{amssymb} package, to avoid any clashes.
%\changes{v1.1c}{2007/09/23}{Definition only occurs if user does not
% have own version}
%\changes{v1.1c}{2007/09/23}{Altered angle of rotation for better
% appearance}
% \begin{macrocode}
\DeclareSymbolFont{CSTAMS}{U}{msb}{m}{n}
\DeclareMathSymbol{\cst@varnothing}{\mathord}{CSTAMS}{"3F}
\providecommand*{\standardstate}%
{\textsuperscript{\rotatebox[origin=c]{138.8}%
{\ensuremath{\cst@varnothing}}}}
% \end{macrocode}
%\end{macro}
%\end{macro}
%
%\subsection{Alkyl radicals}
%\begin{macro}{\cst@radical}
%\changes{v1.2}{2008/03/07}{Re-write to allow definition to change at
% run-time}
% The \cs{cst@radical} macro does the hard work of declaring each
% abbreviation. The commands are made robust so they can (hopefully)
% be used anywhere.
% \begin{macrocode}
\newcommand*{\cst@radical}[2]{%
\expandafter\DeclareRobustCommand\expandafter*\expandafter{%
\csname #1#2\endcsname}{%
% \end{macrocode}
%\begin{macro}{\cst@emph}
%\begin{macro}{\cst@hyphen}
%\begin{macro}{\cst@super}
% To allow redefinition while running, the various component parts of
% the system are defined each time an abbreviation is used.
% \begin{macrocode}
\ifcst@radhyphen
\def\cst@hyphen{-}%
\else
\let\cst@hyphen\relax
\fi
\ifcst@radsuper
\let\cst@super\textsuperscript
\else
\let\cst@super\relax
\fi
\ifcst@rademph
\let\cst@emph\emph
\else
\let\cst@emph\relax
\fi
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
% The final check is for a prefix, which is easiest to do here.
% \begin{macrocode}
\ifcst@radprefix
\cst@super{\cst@emph{#1}}\cst@hyphen#2%
\else
#2\cst@hyphen\cst@super{\cst@emph{#1}}%
\fi
\cst@xspace}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\cst@xspace}
%\changes{v1.2}{2008/03/07}{New definition}
% A re-useable \cs{xspace}-based macro.
% \begin{macrocode}
\newcommand*{\cst@xspace}{%
\ifcst@xspace
\expandafter\xspace%
\fi}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\nPr}
%\begin{macro}{\iPr}
%\begin{macro}{\nBu}
%\begin{macro}{\iBu}
%\begin{macro}{\sBu}
%\begin{macro}{\tBu}
% With a mechanism in place, the abbreviations are declared. The
% format of the resulting output will depend upon the configuration
% file used.
% \begin{macrocode}
\cst@radical{n}{Pr}%
\cst@radical{i}{Pr}%
\cst@radical{n}{Bu}%
\cst@radical{i}{Bu}%
\cst@radical{s}{Bu}%
\cst@radical{t}{Bu}%
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\subsection{Float formatting}
% The next step is to format the floats correctly. Unfortunately,
% \pkg{memoir} does not provide all of the commands needed to achieve
% this. Thus the \pkg{float} package is needed; in order to load it,
% the \cs{newfloat} command in \pkg{memoir} is killed off. The
% \pkg{chemscheme} package does not load \pkg{float} when
% \pkg{memoir} is being used, because creating a new float type is
% catered for directly by \pkg{memoir}. Unfortunately, the
% \pkg{memoir} system isn't flexible enough for what is needed by
% \currpkg, so the hard work of \pkg{chemscheme} is undone here! For
% other document classes, \pkg{float} will already have been loaded
% by \pkg{chemscheme}.
% \begin{macrocode}
\@ifclassloaded{memoir}
{\let\newfloat\@undefined
\RequirePackage{float}}
{}
% \end{macrocode}
% The standard float types are now restyled to place the captions
% correctly (for most journals). Normally in chemical documents
% the author expects the float to be ``here'' if possible; this is
% therefore set as the default.
% \begin{macrocode}
\floatstyle{plaintop}
\restylefloat{table}
\floatstyle{plain}
\restylefloat{scheme}
\restylefloat{figure}
\floatplacement{table}{htbp}
\floatplacement{scheme}{htbp}
\floatplacement{figure}{htbp}
% \end{macrocode}
% The contents of floats are centred by default, using the hook
% from the \pkg{chemscheme} package.
% \begin{macrocode}
\floatcontentscentre
% \end{macrocode}
%
%\subsection{Cross-references}
%\changes{v1.1g}{2007/10/19}{Fixed problem with cross-referencing
% when \pkg{babel} is not loaded}
% The naming for cross-references is sorted out properly using the
% \pkg{varioref} package.
% \begin{macrocode}
\labelformat{scheme}{\schemename~#1}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
% \end{macrocode}
%
% \subsection{Latin phrases}
%\begin{macro}{\latin}
%\begin{macro}{\cst@latin}
%\changes{v1.1}{2007/09/17}{New macro}
%\changes{v1.2}{2008/03/07}{Change of definition to allow better
% working with run-time options}
%\begin{macro}{\latinemphon}
%\changes{v1.2}{2008/03/07}{New definition to work with \pkg{xkeyval}
% system}
%\begin{macro}{\latinemphoff}
%\changes{v1.2}{2008/03/07}{New definition to work with \pkg{xkeyval}
% system}
% A series of Latin phrases are provided, with a quick switch to
% print them in Roman letters if needed. A mechanism is needed to
% alter the effect of the \cs{latin} command \emph{only} if the user
% does not have their own version. This is achieved here, with
% precautions taken to ensure the user can define their own
% \cs{latin} command \emph{after} loading \currpkg and still have
% everything work properly.
% \begin{macrocode}
\newcommand*{\cst@latin}{%
\ifcst@abbremph
\expandafter\emph%
\fi}
\newcommand*{\latinemphon}{\cstsetup{abbremph=true}}
\newcommand*{\latinemphoff}{\cstsetup{abbremph=false}}
\AtBeginDocument{\providecommand*\latin{\cst@latin}}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\etc}
%\begin{macro}{\invacuo}
%\begin{macro}{\etal}
%\changes{v1.1f}{2007/10/14}{Fixed problem with full stop spacing}
%\begin{macro}{\eg}
%\changes{v1.1}{2007/09/17}{Adds comma for \textsc{acs} journals}
%\changes{v1.1f}{2007/10/14}{Fixed problem with full stop spacing}
%\changes{v1.1f}{2007/10/14}{Definition comma-mode dependent}
%\changes{v1.2}{2008/03/07}{Dynamic definition for comma mode}
%\begin{macro}{\ie}
%\changes{v1.1}{2007/09/17}{Adds comma for \textsc{acs} journals}
%\changes{v1.1f}{2007/10/14}{Fixed problem with full stop spacing}
%\changes{v1.1f}{2007/10/14}{Definition comma-mode dependent}
%\changes{v1.2}{2008/03/07}{Dynamic definition for comma mode}
% For the macros themselves, care is taken about trailing full stops.
% The \cs{xspace} command deals with any problems of spacing.
% Things could go wrong with complex punctuation, as no other checks
% are performed. All of these functions use \cs{providecommand}
% to avoid standing on the user's own versions, if they exist.
% \begin{macrocode}
\ifcst@phrases
\AtBeginDocument{
\providecommand*{\etc}
{\@ifnextchar.{\cst@etc}{\cst@etc.\cst@xspace}}
\providecommand*{\invacuo}
{\latin{in vacuo}\cst@xspace}
\providecommand*{\etal}
{\@ifnextchar.{\cst@etal}{\cst@etal.\cst@xspace}}
\providecommand*{\eg}
{\ifcst@abbrcomma
\expandafter\cst@commaabbr%
\else
\expandafter\cst@nocommaabbr%
\fi
{eg}}
\providecommand*{\ie}
{\ifcst@abbrcomma
\expandafter\cst@commaabbr%
\else
\expandafter\cst@nocommaabbr%
\fi
{ie}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%\begin{macro}{\cst@etal}
%\changes{v1.1f}{2007/10/14}{New macro}
%\begin{macro}{\cst@etc}
%\changes{v1.1f}{2007/10/14}{New macro}
%\begin{macro}{\cst@eg}
%\changes{v1.1f}{2007/10/14}{New macro}
%\begin{macro}{\cst@ie}
%\changes{v1.1f}{2007/10/14}{New macro}
% Internal macros are used for items ending in a full stop, to allow
% clean handling of spacing. Notice that \cmd{\ie} and \cmd{\eg}
% cannot come at the end of a sentence, they are designed to give
% only an inter-word space.
% \begin{macrocode}
\newcommand*{\cst@etal}{\latin{et~al}}
\newcommand*{\cst@etc}{\latin{etc}}
\newcommand*{\cst@ie}{\latin{i.e\spacefactor999\relax}}
\newcommand*{\cst@eg}{\latin{e.g\spacefactor999\relax}}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\cst@commaabbr}
%\changes{v1.2}{2008/03/07}{New macro}
%\begin{macro}{\cst@nocommaabbr}
%\changes{v1.2}{2008/03/07}{New macro}
% To handle the comma issue, two general macros are used.
% \begin{macrocode}
\newcommand*{\cst@commaabbr}[1]{%
\csname cst@#1\endcsname%
\cst@addpunct}
\newcommand*{\cst@nocommaabbr}[1]{%
\@ifnextchar.%
{\csname cst@#1\endcsname}
{\csname cst@#1\endcsname.\cst@xspace}}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\cst@addpunct}
%\changes{v1.1}{2007/09/17}{New macro}
%\changes{v1.1f}{2007/10/14}{No longer used when comma not required}
% The following macros are very closely based on those in the
% \pkg{cite} package used for moving citations after punctuation.
% The first macro is used as an initial hook. Notice that
% \cs{relax} is essential here, as it provides an argument for
% \cs{cst@add@punct} in the first round of checking.
% \begin{macrocode}
\newcommand*{\cst@addpunct}{%
\cst@add@punct\relax}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\cst@add@punct}
%\changes{v1.1}{2007/09/17}{New macro}
% Here, a plain \TeX\ \cs{futurelet} is used to test the next
% character. Notice that this macro takes a single argument, which is
% used to recursively gobble up punctuation.
% \begin{macrocode}
\newcommand*{\cst@add@punct}[1]{%
\futurelet\cst@tempa\cst@add@punct@}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\cst@add@punct@}
%\changes{v1.1}{2007/09/17}{New macro}
%\changes{v1.2}{2008/03/07}{Internal tweaks}
%\begin{macro}{\cst@tempa}
%\begin{macro}{\cst@tempb}
% The checking occurs here. If a match is made, then the process is
% repeated to allow the punctuation to be gobbled.
% \begin{macrocode}
\newcommand*{\cst@add@punct@}{%
\ifx.\cst@tempa
\let\cst@tempb\cst@add@punct
\else
\ifx,\cst@tempa
\let\cst@tempb\cst@add@punct
% \end{macrocode}
% No match, and so new punctuation is to be added and the loop ended.
% \begin{macrocode}
\else
\let\cst@tempb\cst@commapunct
\fi
\fi
\cst@tempb}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\cst@commapunct}
%\changes{v1.2}{2008/03/07}{Name change from \cs{cst@punct}}
% The \cs{cst@punct} macro holds the comma-containing punctuation to
% be added.
% \begin{macrocode}
\newcommand*{\cst@commapunct}{.,\cst@xspace}
% \end{macrocode}
%\end{macro}
%
%\subsection{Loading the style definition}
% The style definition is loaded here, once everything necessary is
% in place. A style must be loaded, so a default is provided to be
% on the safe side. The journal style file must have extension
% \ext{jdf}.
%\changes{v1.1b}{2007/09/19}{Load \pkg{caption} even when
% journal style does not exist}
% \begin{macrocode}
\InputIfFileExists{\cst@journal.jdf}
{\PackageInfo{chemstyle}
{Loaded \cst@journal.jdf}}
{\PackageWarning{chemstyle}
{Requested style `\cst@journal' does not exist\MessageBreak
Loading default style}
\InputIfFileExists{none.jdf}{}
{\PackageError{chemstyle}{Failed to load none.jdf}
{The default journal definition file was not
found\MessageBreak This is a core part of chemstyle
\MessageBreak Something is wrong with the installation}}}
% \end{macrocode}
%
% \subsection{Handling reference section naming}
%\changes{v1.2}{2008/03/07}{Re-write of reference-section renaming
% code}
%\begin{macro}{\cst@refsec}
%\changes{v1.2}{2008/03/07}{New macro}
% To enable the renaming of \cs{bibname} or \cs{refname} to the
% desired value, some work is needed. Both \pkg{natbib} and
% \pkg{biblatex} alter the behaviour here subtly. The \pkg{babel}
% package also requires careful handling. The initial step is to fin
% whether the document class defines chapters, as this affects
% whether \cs{refname} or \cs{bibname} should be changed. This is
% done inside a group so that a false definition is not left
% around.\footnote{If \cs{@undefined} is ever fixed, this will no
% longer be needed. If \eTeX\ was required, the \cs{ifdefined} would be
% a choice here; however, \eTeX\ is not going to be required just for
% this.} A second check is needed, in case the document class does not
% define any reference section at all (for example, minimal does
% not).
% \begin{macrocode}
\begingroup
\@ifundefined{chapter}
{\@ifundefined{refname}
{\PackageInfo{chemstyle}
{No bibliography name command found}
\cstsetup{notes=false}}
{\gdef\cst@refsec{\refname}}}
{\gdef\cst@refsec{\bibname}}
\endgroup
% \end{macrocode}
%\end{macro}
%\begin{macro}{\c@bibnote}
% The business-end of the work is only carried out if the \opt{notes}
% option is set to \opt{true} or \opt{auto}. The check above means
% that a reference section is also defined. First, some checking for
% the \opt{auto} option occurs; the counter used by \pkg{notes2bib}
% needs to be defined even if the package is not loaded.
% \begin{macrocode}
\ifcst@autonotes
\AtBeginDocument{
\@ifpackageloaded{notes2bib}{}
{\newcounter{bibnote}}}
\fi
% \end{macrocode}
%\end{macro}
%\begin{macro}{\cst@refname}
%\changes{v1.2}{2008/03/07}{New macro}
%\begin{macro}{\cst@ref@name}
%\changes{v1.2}{2008/03/07}{New macro}
%\begin{macro}{\cst@ref@name@}
%\changes{v1.2}{2008/03/07}{New macro}
% The internal macros to actually display the reference section name
% deals with the various options. The \cs{expandafter}s are for
% caution here: nothing \emph{should} go wrong with the nested
% \cs{if} statements.
% \begin{macrocode}
\newcommand*{\cst@refname}{%
\ifcst@notes
\ifcst@autonotes
\ifnum\the\value{bibnote}>\z@
\expandafter\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\cst@ref@name%
\else
\expandafter\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\cst@ref@name@%
\fi
\else
\expandafter\expandafter\expandafter\cst@ref@name%
\fi
\else
\expandafter\cst@ref@name@%
\fi}
\newcommand*{\cst@ref@name}[3]{%
\ifcst@notesbefore
#3\space#2\space#1%
\else
#1\space#2\space#3%
\fi}
\newcommand*{\cst@ref@name@}[3]{#1}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\cst@setrefname}
%\changes{v1.2}{2008/03/07}{New macro}
% Setting up the section name is a tricky affair. If no section is
% defined, then the whole process is skipped. Otherwise, the first
% check made s if the default language matches the definition given.
% If so, the heading is changed now.
% \begin{macrocode}
\@ifundefined{cst@refsec}
{\let\cst@setrefname\@gobblefour}
{\newcommand*{\cst@setrefname}[4]{
\edef\cst@tempa{#1}%
\ifx\cst@tempa\cst@language
\expandafter\renewcommand\expandafter*\expandafter{%
\cst@refsec}
{\cst@refname{#2}{#3}{#4}}
\fi
% \end{macrocode}
%\begin{macro}{cst@tempa}
% At the beginning of the document, a check needs to be made for
% \pkg{babel} and \pkg{biblatex}. For the later, a low-level hack is
% made to attach to the mechanism. For \pkg{babel} the appropriate
% commands are added to the \cs{captions\ldots} macro.
% \begin{macrocode}
\AtBeginDocument{
\@ifpackageloaded{biblatex}
{\def\cst@tempa{\csgappto{bib@strings@#1}}
\expandafter\cst@tempa\expandafter{\expandafter\renewcommand%
\expandafter*\expandafter{\cst@refsec}{%
\cst@refname{#2}{#3}{#4}}}}
{\@ifpackageloaded{babel}
{\def\cst@tempa{\expandafter\addto\expandafter{%
\csname captions#1\endcsname}}
\expandafter\cst@tempa\expandafter
{\expandafter\renewcommand\expandafter*\expandafter%
{\cst@refsec}{\cst@refname{#2}{#3}{#4}}}
% \end{macrocode}
%\end{macro}
% To make sure the changes are applied \emph{now}, the current
% language is re-selected.
% \begin{macrocode}
\expandafter\selectlanguage\expandafter{\languagename}}
{}}}}}
% \end{macrocode}
%\end{macro}
% Default names are loaded for a range of languages. Most
% journals stick to the same words, with only the order changing.
%\changes{v1.1c}{2007/09/23}{Added \texttt{german} alias for
% \texttt{ngerman}}
%\changes{v1.1c}{2007/09/23}{Added \texttt{frenchb} alias for
% \texttt{french}}
% \begin{macrocode}
\cst@setrefname{english}{References}{and}{Notes}
\cst@setrefname{UKenglish}{References}{and}{Notes}
\cst@setrefname{ngerman}{Literatur}{und}{Notizen}
\cst@setrefname{german}{Literatur}{und}{Notizen}
\cst@setrefname{french}{R\'ef\'erences}{et}{Notes}
\cst@setrefname{frenchb}{R\'ef\'erences}{et}{Notes}
% \end{macrocode}
%
% \iffalse
%</package>
% \fi
%
% \section{Configuration files}
%
% Each journal style needs slightly differing commands to get the
% formatting just right. This is handled here, with each style in
% a separate file. There is not a lot happening in most of these
% files, as the information is by its nature quite repetitive.
%
% \iffalse
%<*rsc>
% \fi
%
% \subsection{RSC style}
%\changes{v1.0b}{2007/09/04}{Sorted a problem with \texttt{babel}
% and figure name format}
%\changes{v1.0b}{2007/09/04}{Fixed formatting of alkyls}
%\changes{v1.1}{2007/09/17}{Fixed (another) error in alkyl formatting}
% \begin{macrocode}
\ProvidesFile{rsc.jdf}[2007/10/31 v1.1h]
\AtBeginDocument{%
\renewcommand{\figurename}{Fig.}}
\captionsetup{labelsep=quad,labelfont=bf}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=false,
radhyphen=true,
abbremph=true,
abbrcomma=false}
% \end{macrocode}
% \iffalse
%</rsc>
%<*angew>
% \fi
%
%\subsection{\emph{Angew.~Chem.}~style}
%\changes{v1.0a}{2007/08/23}{Fixed incorrect Latin formatting for
% \texttt{angew} option}
% \begin{macrocode}
\ProvidesFile{angew.def}[2007/10/31 v1.1h]
\captionsetup{labelsep=period,labelfont={bf,it},font=sf,singlelinecheck=off}
\captionsetup[table]{labelsep=colon}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=false,
radhyphen=false,
abbremph=false,
abbrcomma=false}
% \end{macrocode}
% \iffalse
%</angew>
%<*jomc>
% \fi
%
%\subsection{\emph{J.~Organomet.~Chem.}~style}
%\changes{v1.1g}{2007/10/19}{Added \texttt{jomc} style}
% \begin{macrocode}
\ProvidesFile{jomc.def}[2007/10/31 v1.1h]
\captionsetup{labelsep=period}
\captionsetup[table]{labelsep=newline,singlelinecheck=off}
\AtBeginDocument{%
\renewcommand{\figurename}{Fig.}}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=true,
radhyphen=false,
abbremph=false,
abbrcomma=false,
notesbefore=true}
% \end{macrocode}
% \iffalse
%</jomc>
%<*tetlett>
% \fi
%
%\subsection{\emph{Tetrahedron Lett.}~style}
%\changes{v1.1h}{2007/10/31}{Added \texttt{tetlett} style}
% \begin{macrocode}
\ProvidesFile{tetlett.def}[2007/10/31 v1.1h]
\captionsetup{labelsep=period,singlelinecheck=off,labelfont=bf}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=false,
radhyphen=true,
abbremph=false,
abbrcomma=true,
notesbefore=true}
% \end{macrocode}
% \iffalse
%</tetlett>
%<*jacs>
% \fi
%
%\subsection{\emph{J.~Am.~Chem.~Soc.}~style}
% \begin{macrocode}
\ProvidesFile{jacs.jdf}[2007/10/31 v1.1h]
\DeclareCaptionLabelSeparator{perquad}{.\quad}
\captionsetup{labelfont={bf,it,sf},textfont=sf,labelsep=perquad}
\captionsetup[figure]{textfont=rm}
\captionsetup{singlelinecheck=off}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=true,
radhyphen=false,
abbremph=false,
abbrcomma=true,
notesbefore=true}
\floatstyle{plaintop}
\restylefloat{scheme}
\floatstyle{plain}
\cst@notesbeforefalse
% \end{macrocode}
% \iffalse
%</jacs>
%<*ic>
% \fi
%
%\subsection{\emph{Inorg.~Chem.}~style}
% Almost exactly the same as for \emph{J.~Am.~Chem.~Soc.}, so most of
% the work is left to |jacs.jdf|.
% \begin{macrocode}
\ProvidesFile{ic.jdf}[2007/10/31 v1.1h]
\input {jacs.jdf}
\captionsetup{textfont=rm}
% \end{macrocode}
%\iffalse
%</ic>
%<*jpc>
%\fi
%
%\subsection{\emph{J.~Phys.~Chem.}~style}
%\changes{v1.0a}{2007/08/23}{Added \emph{J.~Phys.~Chem.}~style}
% \begin{macrocode}
\ProvidesFile{jpc.jdf}[2007/10/31 v1.1h]
\DeclareCaptionFormat{labelcaps}{\MakeUppercase{#1}#2#3}
\captionsetup{font=bf,labelsep=colon,format=labelcaps}
\captionsetup[figure]{format=plain,textfont=md,labelsep=period}
\captionsetup{singlelinecheck=off}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=false,
radhyphen=false,
abbremph=false,
abbrcomma=true,
notesbefore=true}
\floatstyle{plaintop}
\restylefloat{scheme}
\floatstyle{plain}
\cst@notesbeforefalse
% \end{macrocode}
%\iffalse
%</jpc>
%<*orglett>
% \fi
%
%\subsection{\emph{Org.~Lett.}~style}
%\changes{v1.0a}{2007/08/23}{Added \emph{Org.~Lett.}~style}
% \begin{macrocode}
\ProvidesFile{orglett.jdf}[2007/10/31 v1.1h]
\RequirePackage{xcolor}
% \end{macrocode}
%\begin{macro}{\OrgLettColour}
% To allow the user to control the colour of the ``bars'' in this
% style, an additional macro is provided. The purple colour looks
% about right for matching the printed journal, but if anyone has a
% better suggestion please let the package author know.
% \begin{macrocode}
\newcommand*{\OrgLettColour}{purple}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\fs@orglett}
% In order to get the distinctive coloured bars used by
% \emph{Org.~Lett.}, a new style for floats is needed. This is based
% on the \texttt{ruled} style from the \pkg{float} package.
% \begin{macrocode}
\newcommand*{\fs@orglett}{%
\def\@fs@cfont{\bfseries}%
\let\@fs@capt\floatc@ruled
\def\@fs@pre{\begingroup\color{\OrgLettColour}
\hrule height12pt depth0pt \kern2pt\endgroup}%
% \end{macrocode}
% This is the same \cs{@fs@mid} as is used in the \pkg{float} package
% for \texttt{plaintop} floats.
% \begin{macrocode}
\def\@fs@mid{\vspace\belowcaptionskip\relax}%
\def\@fs@post{\begingroup\color{\OrgLettColour}\kern2pt
\hrule height1.5pt depth0pt\endgroup}%
\let\@fs@iftopcapt\iftrue}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\fs@orglettfig}
% Figures need to be slightly different, so an almost identical
% command is needed.
% \begin{macrocode}
\newcommand*{\fs@orglettfig}{%
\def\@fs@cfont{\bfseries}%
\let\@fs@capt\floatc@plain
\def\@fs@pre{\begingroup\color{\OrgLettColour}%
\hrule height12pt depth0pt \kern2pt\endgroup}%
\def\@fs@mid{\vspace\abovecaptionskip\relax}%
\def\@fs@post{\begingroup\color{\OrgLettColour}\kern2pt
\hrule height1.5pt depth0pt\endgroup}%
\let\@fs@iftopcapt\iffalse}
% \end{macrocode}
%\end{macro}
% The new style is now applied. Users can change back to normal
% floats by changing back to the \texttt{plain} style.
% \begin{macrocode}
\floatstyle{orglettfig}
\restylefloat{figure}
\floatstyle{orglett}
\restylefloat{scheme}
\restylefloat{table}
% \end{macrocode}
% The more usual style commands now occur.
% \begin{macrocode}
\DeclareCaptionLabelSeparator{perquad}{.\quad}
\captionsetup{labelfont=bf,labelsep=perquad}
\setkeys[cst]{opt}{
radprefix=true,
rademph=true,
radsuper=true,
radhyphen=false,
abbremph=false,
abbrcomma=true,
notesbefore=true}
\cst@notesbeforefalse
% \end{macrocode}
% \iffalse
%</orglett>
%<*none>
%\fi
%\subsection{The empty style --- none}
% To allow the user to load the extra macros provided here without
% any style changes, a ``do nothing'' style is provided. It simply
% makes sure that very little changes compared to the LaTeX kernel.
% This requires undoing the defaults provided above. For commands
% where a default is needed (\eg\ the \cmd{\latin} command) the style
% of the RSC is followed. As the |float| package has been loaded,
% notice that captions will be placed below floats even if the
% \cmd{\caption} command appears above the contents of the floating
% environment.
% \begin{macrocode}
\ProvidesFile{none.jdf}[2007/10/31 v1.1h]
\floatstyle{plain}
\restylefloat{table}
\labelformat{scheme}{#1}
\labelformat{figure}{#1}
\labelformat{table}{#1}
\floatplacement{table}{tbp}
\floatplacement{scheme}{tbp}
\floatplacement{figure}{tbp}
% \end{macrocode}
% \iffalse
%</none>
% \fi
% \PrintChanges
% \PrintIndex
% \Finale
%\iffalse
%<*jawltxdoc>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jawltxdoc}
\usepackage[T1]{fontenc}
\usepackage[english,UKenglish]{babel}
\usepackage[scaled=0.95]{helvet}
\usepackage[version=3]{mhchem}
\usepackage[final]{microtype}
\usepackage[osf]{mathpazo}
\usepackage{booktabs,array,url,graphicx,courier,xspace}
\usepackage{upgreek,ifpdf,listings,float,caption,longtable}
\floatstyle{plaintop}
\restylefloat{table}
\ifpdf
\usepackage{embedfile}
\embedfile[%
stringmethod=escape,%
mimetype=plain/text,%
desc={LaTeX docstrip source archive for package `\jobname'}%
]{\jobname.dtx}
\fi
\IfFileExists{\jobname.sty}
{\usepackage{\jobname}}{}
\usepackage[numbered]{hypdoc}
\newlength\LaTeXwidth
\newlength\LaTeXoutdent
\newlength\LaTeXgap
\setlength\LaTeXgap{1em}
\setlength\LaTeXoutdent{-0.15\textwidth}
\newcommand*{\typesetexampleandcode}{%
\begin{list}{}{%
\setlength\itemindent{0pt}
\setlength\leftmargin\LaTeXoutdent
\setlength\rightmargin{0pt}
}
\item
\setlength\LaTeXoutdent{-0.15\textwidth}
\begin{minipage}[c]{\textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap}
\lst@sampleInput
\end{minipage}%
\hfill%
\begin{minipage}[c]{\LaTeXwidth}%
\hbox to\linewidth{\box\lst@samplebox\hss}%
\end{minipage}%
\end{list}
}
\newcommand*{\typesetcodeandexample}{%
\begin{list}{}{%
\setlength\itemindent{0pt}
\setlength\leftmargin{0pt}
\setlength\rightmargin{0pt}
}
\item
\begin{minipage}[c]{\LaTeXwidth}%
\hbox to\linewidth{\box\lst@samplebox\hss}%
\end{minipage}%
\lst@sampleInput
\end{list}
}
\newcommand*{\typesetfloatexample}{%
\begin{list}{}{%
\setlength\itemindent{0pt}
\setlength\leftmargin{0pt}
\setlength\rightmargin{0pt}
}
\item
\lst@sampleInput
\begin{minipage}[c]{\LaTeXwidth}%
\hbox to\linewidth{\box\lst@samplebox\hss}%
\end{minipage}%
\end{list}
}
\newcommand*{\typesetcodeonly}{%
\begin{list}{}{%
\setlength\itemindent{0pt}
\setlength\leftmargin{0pt}
\setlength\rightmargin{0pt}
}
\item
\begin{minipage}[c]{\LaTeXwidth}%
\hbox to\linewidth{\box\lst@samplebox\hss}%
\end{minipage}%
\end{list}
}
\edef\LaTeXexamplefile{\jobname.tmp}
\lst@RequireAspects{writefile}
\newbox\lst@samplebox
\lstnewenvironment{LaTeXexample}[1][\typesetexampleandcode]{%
\let\typesetexample#1
\global\let\lst@intname\@empty
\setbox\lst@samplebox=\hbox\bgroup
\setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,%
basicstyle=\small\ttfamily,basewidth=0.51em,%
keywordstyle=\color{blue}}
\lst@BeginAlsoWriteFile{\LaTeXexamplefile}
}{%
\lst@EndWriteFile\egroup
\setlength\LaTeXwidth{\wd\lst@samplebox}
\typesetexample%
}
\newcommand*{\lst@sampleInput}{%
\MakePercentComment\catcode`\^^M=10\relax
\small%
{\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
{\lst@ProcessTabulator}}%
\leavevmode \input{\LaTeXexamplefile}}%
\MakePercentIgnore%
}
\def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters
\Describe@Option}
\def\Describe@Option#1{\endgroup
\marginpar{\raggedleft\PrintDescribeEnv{#1}}%
\SpecialOptionIndex{#1}\@esphack\ignorespaces}
\def\SpecialOptionIndex#1{\@bsphack
\index{#1\actualchar{\protect\ttfamily#1}
(option)\encapchar usage}%
\index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
usage}\@esphack}
\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\currpkg}{\pkg{\jobname}\xspace}
\newcommand*{\opt}[1]{\texttt{#1}}
\newcommand*{\file}[1]{\texttt{#1}}
\newcommand*{\ext}[1]{\file{.#1}}
\newcommand*{\latin}[1]{\emph{#1}}
\newcommand*{\etc}{%
\@ifnextchar.
{\latin{etc}}
{\latin{etc.}}
\xspace}
\newcommand*{\eg}{%
\@ifnextchar.
{\latin{e.g}}
{\latin{e.g.}}
\xspace}
\newcommand*{\ie}{%
\@ifnextchar.
{\latin{i.e}}
{\latin{i.e.}}
\xspace}
\newcommand*{\AMS}{{\protect\usefont{OMS}{cmsy}{m}{n}%
A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
\providecommand*{\eTeX}{\ensuremath{\varepsilon}-\TeX}
\newcommand*{\XeTeX}
{X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\kern-.1667em\TeX}
%</jawltxdoc>
%\fi
|