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
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>Eeschema</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
/* Default font. */
body {
font-family: Georgia,serif;
}
/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
font-family: Arial,Helvetica,sans-serif;
}
body {
margin: 1em 5% 1em 5%;
}
a {
color: blue;
text-decoration: underline;
}
a:visited {
color: fuchsia;
}
em {
font-style: italic;
color: navy;
}
strong {
font-weight: bold;
color: #083194;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
padding-top: 0.5em;
}
h3 {
float: left;
}
h3 + * {
clear: left;
}
h5 {
font-size: 1.0em;
}
div.sectionbody {
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
ul, ol, li > p {
margin-top: 0;
}
ul > li { color: #aaa; }
ul > li > * { color: black; }
pre {
padding: 0;
margin: 0;
}
#author {
color: #527bbd;
font-weight: bold;
font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}
#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
#footer-text {
float: left;
padding-bottom: 0.5em;
}
#footer-badges {
float: right;
padding-bottom: 0.5em;
}
#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.0em;
margin-bottom: 2.0em;
margin-right: 10%;
color: #606060;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid #dddddd;
border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid #dddddd;
border-left: 5px solid #f0f0f0;
background: #f8f8f8;
padding: 0.5em;
}
div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #f0f0f0;
color: #777777;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock > pre.content {
font-family: inherit;
font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 3px solid #dddddd;
}
div.exampleblock > div.content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: normal;
color: navy;
}
dd > *:first-child {
margin-top: 0.1em;
}
ul, ol {
list-style-position: outside;
}
ol.arabic {
list-style-type: decimal;
}
ol.loweralpha {
list-style-type: lower-alpha;
}
ol.upperalpha {
list-style-type: upper-alpha;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
div.hdlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
div.hdlist tr {
padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
font-weight: bold;
}
td.hdlist1 {
vertical-align: top;
font-style: normal;
padding-right: 0.8em;
color: navy;
}
td.hdlist2 {
vertical-align: top;
}
div.hdlist.compact tr {
margin: 0;
padding-bottom: 0;
}
.comment {
background: yellow;
}
.footnote, .footnoteref {
font-size: 0.8em;
}
span.footnote, span.footnoteref {
vertical-align: super;
}
#footnotes {
margin: 20px 0 20px 0;
padding: 7px 0 0 0;
}
#footnotes div.footnote {
margin: 0 0 5px 0;
}
#footnotes hr {
border: none;
border-top: 1px solid silver;
height: 1px;
text-align: left;
margin-left: 0;
width: 20%;
min-width: 100px;
}
div.colist td {
padding-right: 0.5em;
padding-bottom: 0.3em;
vertical-align: top;
}
div.colist td img {
margin-top: 0.3em;
}
@media print {
#footer-badges { display: none; }
}
#toc {
margin-bottom: 2.5em;
}
#toctitle {
color: #527bbd;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
font-size: 0.9em;
}
div.toclevel3 {
margin-left: 4em;
font-size: 0.9em;
}
div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }
span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }
span.big { font-size: 2em; }
span.small { font-size: 0.6em; }
span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
/*
* xhtml11 specific
*
* */
tt {
font-family: monospace;
font-size: inherit;
color: navy;
}
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead, p.table.header {
font-weight: bold;
color: #527bbd;
}
p.table {
margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
border-style: none;
}
div.tableblock > table[frame="hsides"] {
border-left-style: none;
border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
border-top-style: none;
border-bottom-style: none;
}
/*
* html5 specific
*
* */
.monospaced {
font-family: monospace;
font-size: inherit;
color: navy;
}
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
thead, p.tableblock.header {
font-weight: bold;
color: #527bbd;
}
p.tableblock {
margin-top: 0;
}
table.tableblock {
border-width: 3px;
border-spacing: 0px;
border-style: solid;
border-color: #527bbd;
border-collapse: collapse;
}
th.tableblock, td.tableblock {
border-width: 1px;
padding: 4px;
border-style: solid;
border-color: #527bbd;
}
table.tableblock.frame-topbot {
border-left-style: hidden;
border-right-style: hidden;
}
table.tableblock.frame-sides {
border-top-style: hidden;
border-bottom-style: hidden;
}
table.tableblock.frame-none {
border-style: hidden;
}
th.tableblock.halign-left, td.tableblock.halign-left {
text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
th.tableblock.valign-top, td.tableblock.valign-top {
vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
vertical-align: bottom;
}
/*
* manpage specific
*
* */
body.manpage h1 {
padding-top: 0.5em;
padding-bottom: 0.5em;
border-top: 2px solid silver;
border-bottom: 2px solid silver;
}
body.manpage h2 {
border-style: none;
}
body.manpage div.sectionbody {
margin-left: 3em;
}
@media print {
body.manpage div#toc { display: none; }
}
/*
* Theme specific overrides of the preceding (asciidoc.css) CSS.
*
*/
body {
font-family: Garamond, Georgia, serif;
font-size: 17px;
color: #3E4349;
line-height: 1.3em;
}
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
font-family: Garmond, Georgia, serif;
font-weight: normal;
border-bottom-width: 0;
color: #3E4349;
}
div.title, caption.title { color: #596673; font-weight: bold; }
h1 { font-size: 240%; }
h2 { font-size: 180%; }
h3 { font-size: 150%; }
h4 { font-size: 130%; }
h5 { font-size: 115%; }
h6 { font-size: 100%; }
#header h1 { margin-top: 0; }
#toc {
color: #444444;
line-height: 1.5;
padding-top: 1.5em;
}
#toctitle {
font-size: 20px;
}
#toc a {
border-bottom: 1px dotted #999999;
color: #444444 !important;
text-decoration: none !important;
}
#toc a:hover {
border-bottom: 1px solid #6D4100;
color: #6D4100 !important;
text-decoration: none !important;
}
div.toclevel1 { margin-top: 0.2em; font-size: 16px; }
div.toclevel2 { margin-top: 0.15em; font-size: 14px; }
em, dt, td.hdlist1 { color: black; }
strong { color: #3E4349; }
a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; }
a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; }
a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; }
div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; }
th.tableblock, td.tableblock { border: 1px solid #E8E8E8; }
ul > li > * { color: #3E4349; }
pre, tt, .monospaced { font-family: Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; }
tt, .monospaced { font-size: 0.9em; color: black;
}
div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; }
div.verseblock { border-left-width: 0; margin-left: 3em; }
div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
@media screen {
body {
max-width: 50em; /* approximately 80 characters wide */
margin-left: 16em;
}
#toc {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 13em;
padding: 0.5em;
padding-bottom: 1.5em;
margin: 0;
overflow: auto;
border-right: 3px solid #f8f8f8;
background-color: white;
}
#toc .toclevel1 {
margin-top: 0.5em;
}
#toc .toclevel2 {
margin-top: 0.25em;
display: list-item;
color: #aaaaaa;
}
#toctitle {
margin-top: 0.5em;
}
}
</style>
<script type="text/javascript">
/*<+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
var iterate = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
var mo = re.exec(i.tagName);
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
}
iterate(i);
}
}
}
iterate(el);
return result;
}
var toc = document.getElementById("toc");
if (!toc) {
return;
}
// Delete existing TOC entries in case we're reloading the TOC.
var tocEntriesToRemove = [];
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
}
for (i = 0; i < tocEntriesToRemove.length; i++) {
toc.removeChild(tocEntriesToRemove[i]);
}
// Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.element.id == "")
entry.element.id = "_toc_" + i;
var a = document.createElement("a");
a.href = "#" + entry.element.id;
a.appendChild(document.createTextNode(entry.text));
var div = document.createElement("div");
div.appendChild(a);
div.className = "toclevel" + entry.toclevel;
toc.appendChild(div);
}
if (entries.length == 0)
toc.parentNode.removeChild(toc);
},
/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////
/* Based on footnote generation code from:
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
*/
footnotes: function () {
// Delete existing footnote entries in case we're reloading the footnodes.
var i;
var noteholder = document.getElementById("footnotes");
if (!noteholder) {
return;
}
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
noteholder.removeChild(entriesToRemove[i]);
}
// Rebuild footnote entries.
var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
var note = spans[i].getAttribute("data-note");
if (!note) {
// Use [\s\S] in place of . so multi-line matches work.
// Because JavaScript has no s (dotall) regex flag.
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
spans[i].innerHTML =
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
spans[i].setAttribute("data-note", note);
}
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
}
if (n == 0)
noteholder.parentNode.removeChild(noteholder);
else {
// Process footnoterefs.
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnoteref") {
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
spans[i].innerHTML =
"[<a href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
}
}
}
},
install: function(toclevels) {
var timerId;
function reinstall() {
asciidoc.footnotes();
if (toclevels) {
asciidoc.toc(toclevels);
}
}
function reinstallAndRemoveTimer() {
clearInterval(timerId);
reinstall();
}
timerId = setInterval(reinstall, 500);
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
else
window.onload = reinstallAndRemoveTimer;
}
}
asciidoc.install(2);
/*]]>*/
</script>
</head>
<body class="book">
<div id="header">
<h1>Eeschema</h1>
<span id="author">The KiCad Team</span><br>
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p><em>Reference manual</em></p></div>
<div class="paragraph" id="copyright"><p><strong>Copyright</strong></p></div>
<div class="paragraph"><p>This document is Copyright © 2010-2015 by its contributors as listed
below. You may distribute it and/or modify it under the terms of either
the GNU General Public License (<a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a>),
version 3 or later, or the Creative Commons Attribution License
(<a href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</a>), version 3.0 or later.</p></div>
<div class="paragraph"><p>All trademarks within this guide belong to their legitimate owners.</p></div>
<div class="paragraph" id="contributors"><p><strong>Contributors</strong></p></div>
<div class="paragraph"><p>Jean-Pierre Charras, Fabrizio Tappero.</p></div>
<div class="paragraph" id="feedback"><p><strong>Feedback</strong></p></div>
<div class="paragraph"><p>Please direct any bug reports, suggestions or new versions to here:</p></div>
<div class="ulist"><ul>
<li>
<p>
About KiCad document: <a href="https://github.com/KiCad/kicad-doc/issues">https://github.com/KiCad/kicad-doc/issues</a>
</p>
</li>
<li>
<p>
About KiCad software: <a href="https://bugs.launchpad.net/kicad">https://bugs.launchpad.net/kicad</a>
</p>
</li>
<li>
<p>
About KiCad software i18n: <a href="https://github.com/KiCad/kicad-i18n/issues">https://github.com/KiCad/kicad-i18n/issues</a>
</p>
</li>
</ul></div>
<div class="paragraph" id="publication_date_and_software_version"><p><strong>Publication date and software version</strong></p></div>
<div class="paragraph"><p>Published on may 30, 2015.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_introduction_to_eeschema">1. Introduction to Eeschema</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_description">1.1. Description</h3>
<div class="paragraph"><p>Eeschema is powerful schematic capture software distributed as part of
KiCad and available under the following operating systems:</p></div>
<div class="ulist"><ul>
<li>
<p>
Linux
</p>
</li>
<li>
<p>
Apple OS X
</p>
</li>
<li>
<p>
Windows
</p>
</li>
</ul></div>
<div class="paragraph"><p>Regardless of the OS, all Eeschema files are 100% compatible from one OS
to another.</p></div>
<div class="paragraph"><p>Eeschema is an integrated application where all functions of drawing,
control, layout, library management and access to the PCB design
software are carried out within Eeschema itself.</p></div>
<div class="paragraph"><p>Eeschema is intended to work with PcbNew, which is KiCad’s printed
circuit design software. It can also export netlist files, which list
all the electrical connections, for other packages.</p></div>
<div class="paragraph"><p>Eeschema includes a component symbol editor, which can create and edit
components and manage libraries.
It also integrates the following additional but essential functions
needed for modern schematic capture software:</p></div>
<div class="ulist"><ul>
<li>
<p>
Electrical rules check (ERC) for the automatic control of incorrect and missing
connections
</p>
</li>
<li>
<p>
Export of plot files in many formats (Postscript, PDF, HPGL, and SVG)
</p>
</li>
<li>
<p>
Bill of Materials generation (via Python scripts, which allow many configurable formats).
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_technical_overview">1.2. Technical overview</h3>
<div class="paragraph"><p>Eeschema is limited only by the available memory. There is thus no real
limitation to the number of components, component pins, connections, or sheets.
In the case of multi-sheet diagrams, the representation is
hierarchical.</p></div>
<div class="paragraph"><p>Eeschema can use multi-sheet diagrams of these types:</p></div>
<div class="ulist"><ul>
<li>
<p>
Simple hierarchies (each schematic is used only once).
</p>
</li>
<li>
<p>
Complex hierarchies (some schematics are used more than once with multiple
instances).
</p>
</li>
<li>
<p>
Flat hierarchies (schematics are not explicitly connected in a master
diagram).
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_generic_eeschema_commands">2. Generic Eeschema commands</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_access_to_eeschema_commands">2.1. Access to Eeschema commands</h3>
<div class="paragraph"><p>You can reach the various commands by:</p></div>
<div class="ulist"><ul>
<li>
<p>
Clicking on the menu bar (top of screen).
</p>
</li>
<li>
<p>
Clicking on the icons on top of the screen (general commands).
</p>
</li>
<li>
<p>
Clicking on the icons on the right side of the screen (particular
commands or "tools").
</p>
</li>
<li>
<p>
Clicking on the icons on the left side of the screen (display
options).
</p>
</li>
<li>
<p>
Pressing the mouse buttons (important complementary commands). In
particular a right click opens a contextual menu for the
element under the cursor (Zoom, grid and editing of the elements).
</p>
</li>
<li>
<p>
Function keys (F1, F2, F3, F4, Insert and space keys).
Specifically: The "Escape" key often allows the canceling of a command
in progress. The "Insert" key allows the duplication of the last element
created.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Here are the various possible command locations:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/commands_overview.png" alt="commands overview">
</div>
</div>
</div>
<div class="sect2">
<h3 id="_mouse_commands">2.2. Mouse commands</h3>
<div class="sect3">
<h4 id="_basic_commands">2.2.1. Basic commands</h4>
<div class="paragraph"><p><strong>Left button</strong></p></div>
<div class="ulist"><ul>
<li>
<p>
Single click: displays the characteristics of the component or text
under the cursor in the status bar.
</p>
</li>
<li>
<p>
Double click: edit (if the element is editable) the component or text.
</p>
</li>
</ul></div>
<div class="paragraph"><p><strong>Right button</strong></p></div>
<div class="ulist"><ul>
<li>
<p>
Opens a pop-up menu.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="_operations_on_blocks">2.2.2. Operations on blocks</h4>
<div class="paragraph"><p>You can move, drag, copy and delete selected areas in all Eeschema
menus.</p></div>
<div class="paragraph"><p>Areas are selected by dragging a box around them using the left mouse button.</p></div>
<div class="paragraph"><p>Holding "Shift", "Ctrl", or "Shift + Ctrl" during selection respectively
performs copying, dragging, and deletion:</p></div>
<table class="tableblock frame-all grid-all"
style="
width:80%;
">
<col style="width:66%;">
<col style="width:34%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">left mouse button</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Move selection.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Shift + left mouse button</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Copy selection.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Ctrl + left mouse button</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Drag selection.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Ctrl + Shift + left mouse button</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete selection.</p></td>
</tr>
</tbody>
</table>
<div class="paragraph"><p>When dragging or copying, you can:</p></div>
<div class="ulist"><ul>
<li>
<p>
Click again to place the elements.
</p>
</li>
<li>
<p>
Click the right button to cancel.
</p>
</li>
</ul></div>
<div class="paragraph"><p>If a block move command has started, another command can be
selected via the pop-up menu (mouse, right button):</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/main_window_popup.png" alt="main window popup">
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_hotkeys">2.3. Hotkeys</h3>
<div class="ulist"><ul>
<li>
<p>
The "?" key displays the current hotkey list.
</p>
</li>
<li>
<p>
Hotkeys can be managed by choosing "Edit Hotkeys" in the Preferences menu.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Here is the default hot key list:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/default_hot_key_list.png" alt="Default hotkey list">
</div>
</div>
<div class="paragraph"><p>All hot keys can be redefined by the user via the hotkey editor:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/shortcuts_editor.png" alt="Hotkeys editor window">
</div>
</div>
</div>
<div class="sect2">
<h3 id="_selecting_grid_size">2.4. Selecting grid size</h3>
<div class="paragraph"><p>In Eeschema, the cursor moves over a grid, which can be displayed or
hidden. The grid is always displayed in the library manager.</p></div>
<div class="paragraph"><p>You can change the grid size via the pop-up menu or via the Preferences/Options menu.</p></div>
<div class="paragraph"><p>The default grid size is 50 mil (0.050") or 1,27 millimeters.</p></div>
<div class="paragraph"><p>This is the prefered grid to place components and wires in a schematic,
and to place pins when designing a symbol in the Component Editor.</p></div>
<div class="paragraph"><p>One can also work with a smaller grid from 25 mil to 10 mil.
This is only intended for designing the component body
or placing text and comments, not for placing pins and wires.</p></div>
</div>
<div class="sect2">
<h3 id="_zoom_selection">2.5. Zoom selection</h3>
<div class="paragraph"><p>To change the zoom level:</p></div>
<div class="ulist"><ul>
<li>
<p>
Right click to open the Pop-up menu and select the desired zoom.
</p>
</li>
<li>
<p>
Or use the function keys:
</p>
<div class="ulist"><ul>
<li>
<p>
F1: Zoom in
</p>
</li>
<li>
<p>
F2: Zoom out
</p>
</li>
<li>
<p>
F4 or simply click on the middle mouse button (without moving the mouse): Center the view around the cursor pointer position
</p>
</li>
</ul></div>
</li>
<li>
<p>
Window Zoom:
</p>
<div class="ulist"><ul>
<li>
<p>
Mouse wheel: Zoom in/out
</p>
</li>
<li>
<p>
Shift+Mouse wheel: Pan up/down
</p>
</li>
<li>
<p>
Ctrl+Mouse wheel: Pan left/right
</p>
</li>
</ul></div>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_displaying_cursor_coordinates">2.6. Displaying cursor coordinates</h3>
<div class="paragraph"><p>The display units are in inches or millimeters. However, Eeschema always
works internally in 0.001-inch (mil/thou) units.</p></div>
<div class="paragraph"><p>The following information is displayed at the bottom right hand side of
the window:</p></div>
<div class="ulist"><ul>
<li>
<p>
The zoom factor
</p>
</li>
<li>
<p>
The absolute position of the cursor
</p>
</li>
<li>
<p>
The relative position of the cursor
</p>
</li>
</ul></div>
<div class="paragraph"><p>The relative coordinates can be reset to zero with the space bar. This is
useful for making measurements between two points.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/status_bar.png" alt="status_bar">
</div>
</div>
</div>
<div class="sect2">
<h3 id="_top_menu_bar">2.7. Top menu bar</h3>
<div class="paragraph"><p>The top menu bar allows the opening and saving of schematics,
program configuration, and viewing the documentation.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/menu_bar.png" alt="menubar">
</div>
</div>
</div>
<div class="sect2">
<h3 id="_upper_toolbar">2.8. Upper toolbar</h3>
<div class="paragraph"><p>This toolbar gives access to the main functions of Eeschema.</p></div>
<div class="paragraph"><p>If Eeschema is run in standalone mode, this is the available tool set:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/toolbar_schedit_standalone.png" alt="images/toolbar_schedit_standalone.png">
</div>
</div>
<div class="paragraph"><p>If Eeschema is run from the project manager (KiCad), this is the available tool set:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/toolbar_schedit.png" alt="images/toolbar_schedit.png">
</div>
</div>
<div class="paragraph"><p>Tools to initialize a project are not available, because these tools are in the <em>Project Manager</em>.</p></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:10%;">
<col style="width:90%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/new_sch.png" alt="new schematic icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a new schematic (only in standalone mode).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/open_document.png" alt="Open schematic icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open a schematic (only in standalone mode).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/save.png" alt="icons/save_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save complete (hierarchical) schematic.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/sheetset.png" alt="Page Settings icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the sheet size and edit the title block.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/print_button.png" alt="icons/print_button_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open print dialog.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/cut_button.png" alt="icons/cut_button_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Remove the selected elements during a block move.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/copyblock.png" alt="icons/copyblock_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Copy selected elements to the clipboard during a block move.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/paste.png" alt="icons/paste_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Copy last selected element or block in the current sheet.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/undo.png" alt="icons/undo_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Undo: Cancel the last change (up to 10 levels).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/redo.png" alt="icons/redo_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Redo (up to 10 levels).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/find.png" alt="search icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Call the dialog to search components and texts in the schematic.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/find_replace.png" alt="search replace icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Call the dialog to search and replace texts in the schematic.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_in.png" alt="icons/zoom_in">
</span> <span class="image">
<img src="images/icons/zoom_out.png" alt="icons/zoom_out">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom in and out.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_redraw.png" alt="icons/zoom_redraw">
</span> <span class="image">
<img src="images/icons/zoom_fit_in_page.png" alt="icons/zoom_fit_in_page_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Refresh screen; zoom to fit.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/hierarchy_nav.png" alt="hierarchy navigator icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">View and navigate the hierarchy tree.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/leave_sheet.png" alt="icons/leave_sheet">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Leave the current sheet and go up in the hierarchy.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/libedit.png" alt="icons/libedit_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Call component editor <em>Libedit</em> to view and modify libraries and component symbols.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/library_browse.png" alt="icons/library_browse_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Display libraries (Viewlib).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/annotate.png" alt="icons_annotate_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Annotate components.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/erc.png" alt="ERC icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Electrical rules check (ERC), automatically validate electrical connections.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/netlist.png" alt="Netlist icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Export a netlist (Pcbnew, SPICE, and other formats).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/bom.png" alt="BOM icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Generate the BOM (Bill of Materials).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/edit_module.png" alt="edit_module icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Edit footprint.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/cvpcb.png" alt="run cvpcb icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Call CvPcb to assign footprints to components.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/pcbnew.png" alt="icons/pcbnew_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Call Pcbnew to perform a PCB layout.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/import_footprint_names.png" alt="Import Footprint Names icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Back-import component footprints (selected using CvPcb) into the "footprint" fields.</p></td>
</tr>
</tbody>
</table>
<div style="page-break-after:always"></div>
</div>
<div class="sect2">
<h3 id="_right_toolbar_icons">2.9. Right toolbar icons</h3>
<div class="paragraph"><p>This toolbar contains tools to:</p></div>
<div class="ulist"><ul>
<li>
<p>
Place components, wires, buses, junctions, labels, text, etc.
</p>
</li>
<li>
<p>
Create hierarchical sub-sheets and connection symbols
</p>
</li>
</ul></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:10%;">
<col style="width:5%;">
<col style="width:85%;">
<tbody>
<tr>
<td class="tableblock halign-center valign-middle" rowspan="20" ><p class="tableblock"><span class="image">
<img src="images/toolbar_schedit_rightside.png" alt="images/toolbar_schedit_rightside.png" width="80%">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/cursor.png" alt="icons/cursor_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Cancel the active command or tool.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/hierarchy_cursor.png" alt="icons/hierarchy_cursor_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Hierarchy navigation: this tool makes it possible to open the
subsheet of the displayed schematic (click in the symbol of this
subsheet), or to go back up in the hierarchy (click in a free area of
the schematic).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/new_component.png" alt="New Component icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Display the component selector.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_power.png" alt="Add Power icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Display the power symbol selector.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_line.png" alt="icons/add_line_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw a wire.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_bus.png" alt="icons/add_bus_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw a bus.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_line2bus.png" alt="icons/add_line2bus_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw wire-to-bus entry points. These elements are only graphical and do not create
a connection, thus they should not be used to connect wires together.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_bus2bus.png" alt="icons/add_bus2bus_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw bus-to-bus entry points.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/noconn.png" alt="icons/noconn_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place a "No Connect" flag. These are placed on component pins which
are not to be connected. This is useful in the ERC function to check if
pins are intentionally left not connected or are missed.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_junction.png" alt="icons/add_junction_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place a junction. This connects two crossing wires, or a wire and a pin,
when it can be ambiguous. (i.e. if an end of the wire or pin is not
connected to one of the ends of the other wire).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_line_label.png" alt="icons/add_line_label_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Local label placement. Two wires may be connected with identical labels
<strong>in the same sheet</strong>. For connections between two different sheets, you
have to use global or hierarchical labels.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_glabel.png" alt="Global label icon">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place a global label. All global labels with the same name are connected, even between
different sheets.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_hierarchical_label.png" alt="icons/add_hierarchical_label_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place a hierarchical label. This makes it possible to place a
connection between a sheet and the parent sheet that contains it.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_hierarchical_subsheet.png" alt="icons/add_hierarchical_subsheet_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place a hierarchical subsheet. You must specify the file name for this subsheet.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/import_hierarchical_label.png" alt="icons/import_hierarchical_label_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Import hierarchical labels from a subsheet. These hierarchical labels must already be
placed in the subsheet. These are equivalent to pins on a component, and must be connected
using wires.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_hierar_pin.png" alt="icons/add_hierar_pin_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place hierarchical label in a subsheet symbol. This is placed by name and does not require the
label to already exist in the subsheet itself.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_dashed_line.png" alt="icons/add_dashed_line_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Draw a line. These are only graphical and do not connect anything.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_text.png" alt="icons/add_text_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place textual comments. These are only graphical.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/image.png" alt="icons/image_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Place a bitmap image.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/delete.png" alt="icons/cancel_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete selected element.</p>
<p class="tableblock">If several superimposed elements are selected, the priority is given to
the smallest (in the decreasing priorities: junction, "No Connect", wire,
bus, text, component). This also applies to hierarchical sheets. Note:
the "Undelete" function of the general toolbar allows you to cancel last
deletions.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_left_toolbar_icons">2.10. Left toolbar icons</h3>
<div class="paragraph"><p>This toolbar manages the display options:</p></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:10%;">
<col style="width:90%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/grid.png" alt="icons/grid">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Show/Hide the grid.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/unit_inch.png" alt="icons/unit_inch">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Switch to inches.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/unit_mm.png" alt="icons/unit_mm">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Switch to millimeters.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/cursor_shape.png" alt="icons/cursor_shape">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Choose the cursor shape.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/hidden_pin.png" alt="icons/hidden_pin">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Visibility of "invisible" pins.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/lines90.png" alt="icons/lines90">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Allowed orientation of wires and buses.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="pop-up-menus-and-quick-editing">2.11. Pop-up menus and quick editing</h3>
<div class="paragraph"><p>A right-click opens a contextual menu for the selected element. This contains:</p></div>
<div class="ulist"><ul>
<li>
<p>
Zoom factor.
</p>
</li>
<li>
<p>
Grid adjustment.
</p>
</li>
<li>
<p>
Commonly edited parameters of the selected element.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Pop-up without selected element.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_popup_without_element.png" alt="eeschema_popup_without_element_png">
</div>
</div>
<div class="paragraph"><p>Editing of a label.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_popup_edit_label.png" alt="eeschema_popup_edit_label_png">
</div>
</div>
<div class="paragraph"><p>Editing a component.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_popup_edit_component.png" alt="eeschema_popup_edit_component_png">
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="main-top-menu">3. Main top menu</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="file-menu">3.1. File menu</h3>
<div class="imageblock">
<div class="content">
<img src="images/en/file_menu.png" alt="File menu">
</div>
</div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:31%;">
<col style="width:69%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">New Schematic Project</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Clear current schematic and initialize a new one</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open Schematic Project</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Load a schematic hierarchy</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open Recent</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open a list of recently opened files</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Append Schematic Sheet</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Insert the contents of another sheet into the current one</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save Schematic Project</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save current sheet and all its hierarchy.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save Current Sheet Only</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save current sheet, but not others in a
hierarchy.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save Current Sheet As…</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save current sheet with a new name.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Page Settings</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Configure page dimensions and title block.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Print</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Print schematic hierarchy (See also chapter <a href="#plot-and-print">Plot and Print</a>).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Plot</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Export to PDF, PostScript, HPGL or SVG format (See chapter <a href="#plot-and-print">Plot and Print</a>).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Close</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Quit without saving.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="preferences-menu">3.2. Preferences menu</h3>
<div class="sect3">
<h4 id="preferences">3.2.1. Preferences</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/menu_path_hotkey_editor.png" alt="Preferences menu">
</div>
</div>
<table class="tableblock frame-all grid-all"
style="
width:90%;
">
<col style="width:30%;">
<col style="width:70%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Component Libraries</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select libraries and library search path.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Set Colors Scheme</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select colors for display, print and plot.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Schematic Editor Options</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">General options (units, grid size, field names, etc.).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Language</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select interface language.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Hotkeys</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">List, edit, export, and import hotkey settings.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save Preferences</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save the project settings to the .pro file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Load Preferences</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Load the project settings from a .pro file.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="preferences-menu-libs-and-dir">3.2.2. Preferences menu / Component Libraries</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/libsettings.png" alt="Library settings">
</div>
</div>
<div class="paragraph"><p>This dialog is used to configure component libraries and search paths.
The configuration parameters are saved in the .pro file. Different
configuration files in different directories are also possible.</p></div>
<div class="paragraph"><p>Eeschema searches, in order:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
The configuration file (projectname.pro) in the current directory.
</p>
</li>
<li>
<p>
The kicad.pro configuration file in the KiCad directory. This file
can thus be the default configuration.
</p>
</li>
<li>
<p>
Default values if no file is found. It will at least then be
necessary to fill out the list of libraries to load, and then save the
configuration.
</p>
</li>
</ol></div>
<div class="paragraph"><p>The <em>Check for cache/library conflicts at schematic load</em> box is used to configure
the library conflict rescue behavior. See <a href="#rescuing-cached-components">Rescuing Cached Components</a> for more information about that.</p></div>
</div>
<div class="sect3">
<h4 id="preferences-menu-and-colors">3.2.3. Preferences menu / Set Color Scheme</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/color_settings.png" alt="Color settings">
</div>
</div>
<div class="paragraph"><p>Color scheme for various graphic elements, and background color selection (either black or
white).</p></div>
</div>
<div class="sect3">
<h4 id="preferences-and-options">3.2.4. Preferences menu / Schematic Editor Options</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/options.png" alt="Schematic Editor Options">
</div>
</div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:40%;">
<col style="width:60%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Measurement units:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the display and the cursor coordinate units
(inches or millimeters).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Grid Size:</p></td>
<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>Grid size selection.</p></div>
<div class="paragraph"><p><strong>It is recommended to work with normal grid (0.050 inches or 1,27 mm)</strong>. <em>Smaller
grids are used for component building</em>.</p></div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Default bus width:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Pen size used to draw buses.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Default line width:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Pen size used to draw objects that do not have a
specified pen size.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Default text size:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Text size used when creating new text items or labels</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Repeat draw item horizontal displacement</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">increment on X axis during element duplication (usual value 0)</p>
<p class="tableblock">(after placing an item like a component, label or wire,
a duplication is made by the <em>Insert</em> key)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Repeat draw item vertical displacement</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">increment on Y axis during
element duplication (usual value is 0.100 inches or 2,54 mm)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Repeat label increment:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Increment of label value during duplication of texts ending
in a number, such as bus members (usual value 1 or -1).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Auto save time interval:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Time in minutes between saving backups.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Part id notation:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Style of suffix that is used to denote component parts (U1A, U1.A, U1-1, etc.)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Show Grid:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">If checked: display grid.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Show hidden pins:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Display invisible (or <em>hidden</em>) pins, typically power pins. If checked,
allows the display of power pins.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Do not center and warp cursor on zoom:</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">When zooming, keep the position and cursor where they are.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Use middle mouse button to pan</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">When enabled, the sheet can be dragged around using the middle mouse button.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Limit panning to scroll size</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">When enabled, the middle mouse
button cannot move the sheet area outside the displayed area.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Pan while moving object</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">If checked, automatically shifts the window
if the cursor leaves the window during drawing or moving.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Allow buses and wires to be placed in H or V orientation only</p></td>
<td class="tableblock halign-left valign-top" ><div><div class="paragraph"><p>If checked, buses and wires can only be vertical or horizontal.</p></div>
<div class="paragraph"><p>Otherwise, buses and wires can be placed at any orientation.</p></div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Show page limits</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">If checked, shows the page boundaries on screen.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="preferences-and-language">3.2.5. Preferences and Language</h4>
<div class="paragraph"><p>Use default mode. Other languages are available mainly for development
purposes.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="help-menu">3.3. Help menu</h3>
<div class="paragraph"><p>Access to on-line help (this document) for an extensive tutorial about
KiCad. Use “Copy Version Information” when submitting bug reports to
identify your build and system.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="general-top-toolbar">4. General Top Toolbar</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="sheet-management">4.1. Sheet management</h3>
<div class="paragraph"><p>The Sheet Settings icon,
<span class="image">
<img src="images/icons/sheetset.png" alt="Sheet Settings icon">
</span>,
allows you to define the sheet size and the contents of the
title block.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/page_settings.png" alt="Page Settings">
</div>
</div>
<div class="paragraph"><p>Sheet numbering is automatically updated. You can set the date
to today by pressing the left arrow button by "Issue Date", but it
will not be automatically changed.</p></div>
</div>
<div class="sect2">
<h3 id="options-of-the-schematic-editor">4.2. Options of the schematic editor</h3>
<div class="sect3">
<h4 id="general-options">4.2.1. General options</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/options.png" alt="Schematic Editor Options">
</div>
</div>
</div>
<div class="sect3">
<h4 id="template-fields-names">4.2.2. Template fields names</h4>
<div class="paragraph"><p>You can define custom fields that will exist by default in each component
(even if left empty).</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/template_field_names.png" alt="Template Field Names settings">
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="search-tool">4.3. Search tool</h3>
<div class="paragraph"><p>The Find icon,
<span class="image">
<img src="images/icons/find.png" alt="Find icon">
</span>,
can be used to access the search tool.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/find_dialog.png" alt="Find dialog">
</div>
</div>
<div class="paragraph"><p>You can search for a reference, a value, or a text string in the current
sheet or in the whole hierarchy. Once found, the cursor will be
positioned on the found element in the relevant sub-sheet.</p></div>
</div>
<div class="sect2">
<h3 id="netlist-tool">4.4. Netlist tool</h3>
<div class="paragraph"><p>The Netlist icon,
<span class="image">
<img src="images/icons/netlist.png" alt="Netlist icon">
</span>,
opens the netlist generation tool.</p></div>
<div class="paragraph"><p>The netlist file it creates describes all connections in the entire hierarchy.</p></div>
<div class="paragraph"><p>In a multisheet hierarchy, any local label is visible only inside the
sheet to which it belongs.
Thus, the label TOTO of sheet 3 is different from the label TOTO of sheet
5 (if no connection has been intentionally introduced to connect them).
This is due to the fact that the sheet name path is internally associated with
the local label.</p></div>
<div class="paragraph"><p>Note 1:</p></div>
<div class="paragraph"><p>Label lengths have no limitations in Eeschema, but the software
exploiting the generated netlist can be limited on this point.</p></div>
<div class="paragraph"><p>Note 2:</p></div>
<div class="paragraph"><p>Avoid spaces in the labels, because they will appear as separated words.
It is not a limitation of Eeschema, but of many netlist formats, which
often assume that a label has no spaces.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/netlist_dialog.png" alt="Netlist dialog">
</div>
</div>
<div class="paragraph"><p>Option:</p></div>
<div class="paragraph"><p>Default Format:</p></div>
<div class="paragraph"><p>Check to select Pcbnew as the default format.</p></div>
<div class="paragraph"><p>Other formats can also be generated:</p></div>
<div class="ulist"><ul>
<li>
<p>
Orcad PCB2
</p>
</li>
<li>
<p>
CadStar
</p>
</li>
<li>
<p>
Spice, for simulators
</p>
</li>
</ul></div>
<div class="paragraph"><p>External plugins can be launched to extend the netlist formats list (a
PadsPcb Plugin was added here).</p></div>
</div>
<div class="sect2">
<h3 id="annotation-tool">4.5. Annotation tool</h3>
<div class="paragraph"><p>The icon
<span class="image">
<img src="images/icons/annotate.png" alt="icons_annotate_png">
</span>
gives access to the annotation tool. This tool performs an automatic
naming of all components in the schematic.</p></div>
<div class="paragraph"><p>For multi-part components (such as 7400 TTL which contains 4 gates), a
multi-part suffix is also allocated (thus a 7400 TTL designated U3 will
be divided into U3A, U3B, U3C and U3D).</p></div>
<div class="paragraph"><p>You can unconditionally annotate all the components, or only the new
components, i.e. those which were not previously annotated.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/annotate-dialog.png" alt="annotate-dialog_img">
</div>
</div>
<div class="paragraph"><p><strong>Scope</strong></p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Use the entire schematic. All the sheets are re-annotated (usual
Option).
</p>
</li>
<li>
<p>
Use the current page only. Only the current sheet is re-annotated
(this option is to be used only in special cases, for example to
evaluate the amount of resistors in the current sheet.).
</p>
</li>
<li>
<p>
Keep existing annotation. Conditional annotation, only the new
components will be re-annotated (usual option).
</p>
</li>
<li>
<p>
Reset existing annotation. Unconditional annotation, all the
components will be re-annotated (this option is to be used when there
are duplicated references).
</p>
</li>
<li>
<p>
Reset, but do not swap any annotated multi-unit parts. This keeps
all groups of multiple units (e.g. U2A, U2B) together when reannotating.
</p>
</li>
</ol></div>
<div class="paragraph"><p><strong>Annotation Order</strong></p></div>
<div class="paragraph"><p>Selects the order in which components will be numbered.</p></div>
<div class="paragraph"><p><strong>Annotation Choice</strong></p></div>
<div class="paragraph"><p>Selects the method by which numbers will be selected.</p></div>
</div>
<div class="sect2">
<h3 id="electrical-rules-check-tool">4.6. Electrical Rules Check tool</h3>
<div class="paragraph"><p>The icon
<span class="image">
<img src="images/icons/erc.png" alt="ERC icon">
</span>
gives access to the electrical rules check (ERC) tool.</p></div>
<div class="paragraph"><p>This tool performs a design verification and is particularly useful to
detect forgotten connections, and inconsistencies.</p></div>
<div class="paragraph"><p>Once you have run the ERC, Eeschema places markers to highlight problems.
The diagnosis can then be given by left clicking on the marker. An error file can also be generated.</p></div>
<div class="sect3">
<h4 id="main-erc-dialog">4.6.1. Main ERC dialog</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_erc.png" alt="ERC dialog">
</div>
</div>
<div class="paragraph"><p>Errors are displayed in the Electrical Rules Checker dialog box:</p></div>
<div class="ulist"><ul>
<li>
<p>
Total count of errors and warnings.
</p>
</li>
<li>
<p>
Errors count.
</p>
</li>
<li>
<p>
Warnings count.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Option:</p></div>
<div class="ulist"><ul>
<li>
<p>
Create ERC file report: check this option to generate an ERC report file.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Commands:</p></div>
<div class="ulist"><ul>
<li>
<p>
Delete Markers: to remove all ERC error/warnings markers.
</p>
</li>
<li>
<p>
Run: to perform an Electrical Rules Check.
</p>
</li>
<li>
<p>
Close: to exit this dialog box.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Note:</p></div>
<div class="ulist"><ul>
<li>
<p>
Clicking on an error message jumps to the corresponding marker in the
schematic.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="erc-options-dialog">4.6.2. ERC options dialog</h4>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_erc_opts.png" alt="ERC Options dialog">
</div>
</div>
<div class="paragraph"><p>This tab allows you to establish connectivity rules
between pins; you can choose between 3 options for each case:</p></div>
<div class="ulist"><ul>
<li>
<p>
No error
</p>
</li>
<li>
<p>
Warning
</p>
</li>
<li>
<p>
Error
</p>
</li>
</ul></div>
<div class="paragraph"><p>Each square of the matrix can be modified by clicking on it.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="bill-of-material-tool">4.7. Bill of Material tool</h3>
<div class="paragraph"><p>The icon
<span class="image">
<img src="images/icons/bom.png" alt="BOM icon">
</span>
gives access to the bill of materials (BOM) generator. This menu allows the
generation of a file listing of the components and/or hierarchical
connections (global labels).</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_bom.png" alt="BOM dialog">
</div>
</div>
<div class="paragraph"><p>Eeschema’s BOM generator makes use of external plugins, generally in XSLT
or Python form. Some are provided, and will be installed inside the KiCad
program files directory.</p></div>
<div class="paragraph"><p>A useful set of component properties to use for a BOM are:</p></div>
<div class="ulist"><ul>
<li>
<p>
Value - unique name for each part used.
</p>
</li>
<li>
<p>
Footprint - either manually entered or back-annotated (see below).
</p>
</li>
<li>
<p>
Field1 - Manufacturer’s name.
</p>
</li>
<li>
<p>
Field2 - Manufacturer’s Part Number.
</p>
</li>
<li>
<p>
Field3 - Distributor’s Part Number.
</p>
</li>
</ul></div>
<div class="paragraph"><p>For example:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_component_properties.png" alt="Component Properties dialog">
</div>
</div>
</div>
<div class="sect2">
<h3 id="import-tool-for-footprint-assignment">4.8. Import tool for footprint assignment:</h3>
<div class="sect3">
<h4 id="access">4.8.1. Access:</h4>
<div class="paragraph"><p>The icon
<span class="image">
<img src="images/icons/import_footprint_names.png" alt="Import Footprint Names icon">
</span>
gives access to the back-annotate tool.</p></div>
<div class="paragraph"><p>This tool allows footprint changes made in PcbNew to be imported back
into the footprint fields in Eeschema.</p></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="schematic-creation-and-editing">5. Schematic Creation and Editing</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_introduction">5.1. Introduction</h3>
<div class="paragraph"><p>A schematic can be represented by a single sheet, but, if big enough, it
will require several sheets.</p></div>
<div class="paragraph"><p>A schematic represented by several sheets is hierarchical,
and all its sheets (each one represented by its own file) constitute an
Eeschema project. The manipulation of hierarchical schematics will be
described in the <a href="#hierarchical-schematics">Hierarchical Schematics</a>
chapter.</p></div>
</div>
<div class="sect2">
<h3 id="general-considerations">5.2. General considerations</h3>
<div class="paragraph"><p>A schematic designed with Eeschema is more than a simple graphic
representation of an electronic device. It is normally the entry point
of a development chain that allows for:</p></div>
<div class="ulist"><ul>
<li>
<p>
Validating against a set of rules (<a href="#erc">Electrical Rules Check</a>) to detect errors and omissions.
</p>
</li>
<li>
<p>
Automatically generating a bill of materials (<a href="#creating-customized-netlists-and-bom-files">BOM</a>).
</p>
</li>
<li>
<p>
<a href="#creating-customized-netlists-and-bom-files">Generating a netlist</a> for simulation software such as SPICE.
</p>
</li>
<li>
<p>
<a href="#creating-customized-netlists-and-bom-files">Generating a netlist</a> for transferring to PCB layout.
</p>
</li>
</ul></div>
<div class="paragraph"><p>A schematic mainly consists of components, wires, labels, junctions,
buses and power ports. For clarity in the schematic, you can place
purely graphical elements like bus entries, comments, and polylines.</p></div>
</div>
<div class="sect2">
<h3 id="the-development-chain">5.3. The development chain</h3>
<div class="imageblock">
<div class="content">
<img src="images/en/dev-chain.png" alt="dev-chain_png">
</div>
</div>
<div class="paragraph"><p>Components are added to the schematic from component libraries. After
the schematic is made, a netlist is generated, which is later used to
import the set of connections and footprints into PcbNew.</p></div>
</div>
<div class="sect2">
<h3 id="component-placement-and-editing">5.4. Component placement and editing</h3>
<div class="sect3">
<h4 id="find-and-place-a-component">5.4.1. Find and place a component</h4>
<div class="paragraph"><p>To load a component into your schematic you can use the icon
<span class="image">
<img src="images/icons/new_component.png" alt="New Component icon">
</span>.
A dialog box allows you to type the name of the component to load.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_choose_component.png" alt="Choose Component dialog">
</div>
</div>
<div class="paragraph"><p>The Choose Component dialog will filter components by name, keywords,
and description according to what you type into the search field.</p></div>
<div class="paragraph"><p>Before placing the component in the schematic, you can rotate it, mirror
it, and edit its fields, by either using the hotkeys or the right-click
context menu. This can be done the same way after placement.</p></div>
<div class="paragraph"><p>Here is a component during placement:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/component_during_placement.png" alt="component during placement">
</div>
</div>
</div>
<div class="sect3">
<h4 id="power-ports">5.4.2. Power ports</h4>
<div class="paragraph"><p>A power port symbol is a component (the symbols are grouped in the
“power” library), so they can be placed using the component chooser.
However, as power placements are frequent, the
<span class="image">
<img src="images/icons/add_power.png" alt="Add Power icon">
</span>
tool is available. This tool is similar, except
that the search is done directly in the “power” library.</p></div>
</div>
<div class="sect3">
<h4 id="component-editing-and-modification-already-placed-component">5.4.3. Component Editing and Modification (already placed component)</h4>
<div class="paragraph"><p>There are two ways to edit a component:</p></div>
<div class="ulist"><ul>
<li>
<p>
Modification of the component itself: position, orientation, unit selection on a multi-unit component.
</p>
</li>
<li>
<p>
Modification of one of the fields of the component: reference, value, footprint, etc.
</p>
</li>
</ul></div>
<div class="paragraph"><p>When a component has just been placed, you may have to modify its value
(particularly for resistors, capacitors, etc.), but it is useless to
assign to it a reference number right away, or to select the unit
(except for components with locked units, which you have to assign
manually). This can be done automatically by the annotation function.</p></div>
<div class="sect4">
<h5 id="component-modification">Component modification</h5>
<div class="paragraph"><p>To modify some feature of a component, position the cursor on the
component, and then either:</p></div>
<div class="ulist"><ul>
<li>
<p>
Double-click on the component to open the full editing dialog.
</p>
</li>
<li>
<p>
Right-click to open the context menu and use one of the
commands: Move, Orientation, Edit, Delete, etc.
</p>
</li>
</ul></div>
</div>
<div class="sect4">
<h5 id="text-fields-modification">Text fields modification</h5>
<div class="paragraph"><p>You can modify the reference, value, position, orientation, text size and
visibility of the fields:</p></div>
<div class="ulist"><ul>
<li>
<p>
Double-click on the text field to modify it.
</p>
</li>
<li>
<p>
Right-click to open the context menu and use one of the
commands: Move, Rotate, Edit, Delete, etc.
</p>
</li>
</ul></div>
<div class="paragraph"><p>For more options, or in order to create fields,
double-click on the component to open the Component Properties
dialog.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_component_properties.png" alt="Component Properties dialog">
</div>
</div>
<div class="paragraph"><p>Each field can be visible or hidden, and displayed horizontally or
vertically. The displayed position is always indicated
for a normally displayed component (no rotation or mirroring) and is relative
to the anchor point of the component.</p></div>
<div class="paragraph"><p>The option “Reset to Library Defaults” sets the component to the original
orientation, and resets the options, size and position of each field. However,
texts fields are not modified because this could break the schematic.</p></div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="wires-buses-labels-power-ports">5.5. Wires, Buses, Labels, Power ports</h3>
<div class="sect3">
<h4 id="introduction-1">5.5.1. Introduction</h4>
<div class="paragraph"><p>All these drawing elements can also be placed with the tools on the
vertical right toolbar.</p></div>
<div class="paragraph"><p>These elements are:</p></div>
<div class="ulist"><ul>
<li>
<p>
<strong>Wires:</strong> most connections between components.
</p>
</li>
<li>
<p>
<strong>Buses:</strong> to graphically join bus labels
</p>
</li>
<li>
<p>
<strong>Polylines:</strong> for graphic presentation.
</p>
</li>
<li>
<p>
<strong>Junctions:</strong> to create connections between crossing wires or buses.
</p>
</li>
<li>
<p>
<strong>Bus entries:</strong> to show connections between wires and buses. Graphical only!
</p>
</li>
<li>
<p>
<strong>Labels:</strong> for labeling or creating connections.
</p>
</li>
<li>
<p>
<strong>Global labels:</strong> for connections between sheets.
</p>
</li>
<li>
<p>
<strong>Texts:</strong> for comments and annotations.
</p>
</li>
<li>
<p>
<strong>"No Connect" flags:</strong> to terminate a pin that does not need any connection.
</p>
</li>
<li>
<p>
<strong>Hierarchical sheets</strong>, and their connection pins.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="connections-wires-and-labels">5.5.2. Connections (Wires and Labels)</h4>
<div class="paragraph"><p>There are two ways to establish connection:</p></div>
<div class="ulist"><ul>
<li>
<p>
Pin to pin wires.
</p>
</li>
<li>
<p>
Labels.
</p>
</li>
</ul></div>
<div class="paragraph"><p>The following figure shows the two methods:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/wires_labels.png" alt="Wires labels">
</div>
</div>
<div class="paragraph"><p><strong>Note 1:</strong></p></div>
<div class="paragraph"><p>The point of “contact” of a label is the lower left
corner of the first letter of the label. This point is displayed with
a small square when not connected.</p></div>
<div class="paragraph"><p>This point must thus be in contact with the wire, or be superimposed at
the end of a pin so that the label is seen as connected.</p></div>
<div class="paragraph"><p><strong>Note 2:</strong></p></div>
<div class="paragraph"><p>To establish a connection, a segment of wire must be connected by its
ends to an another segment or to a pin.</p></div>
<div class="paragraph"><p>If there is overlapping (if a wire passes over a pin, but without being
connected to the pin end) there is no connection.</p></div>
<div class="paragraph"><p><strong>Note 3:</strong></p></div>
<div class="paragraph"><p>Wires that cross are not implicitly connected. It is necessary to
join them with a junction dot if a connection is desired.</p></div>
<div class="paragraph"><p>The previous figure (wires connected to DB25FEMALE pins 22, 21, 20, 19)
shows such a case of connection using a junction symbol.</p></div>
<div class="paragraph"><p><strong>Note 4:</strong></p></div>
<div class="paragraph"><p>If two different labels are placed on the same wire, they are connected
together and become equivalent: all the other elements connected to one
or the other labels are then connected to all of them.</p></div>
</div>
<div class="sect3">
<h4 id="connections-buses">5.5.3. Connections (Buses)</h4>
<div class="paragraph"><p>In the following schematic, many pins are connected to buses.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/sch_with_buses.png" alt="Example schematic with buses">
</div>
</div>
<div class="sect4">
<h5 id="bus-members">Bus members</h5>
<div class="paragraph"><p>From the schematic point of view, a bus is a collection of signals,
starting with a common prefix, and ending with a number. For example,
PCA0, PCA1, and PCA2 are members of the PCA bus.</p></div>
<div class="paragraph"><p>The complete bus is named PCA[N..m], where N and m are the first and
the last wire number of this bus. Thus if PCA has 20 members from 0 to
19, the complete bus is noted PCA[0..19]. A collection of signals
like PCA0, PCA1, PCA2, WRITE, READ cannot be contained in a bus.</p></div>
</div>
<div class="sect4">
<h5 id="connections-between-bus-members">Connections between bus members</h5>
<div class="paragraph"><p>Pins connected between the same members of a bus must be connected by
labels. It is not possible to connect a pin directly to a bus; this
type of connection will be ignored by Eeschema.</p></div>
<div class="paragraph"><p>In the example above, connections are made by the labels placed on wires
connected to the pins. Bus entries (wire segments at 45
degrees) to buses are graphical only, and are not necessary to form
logical connections.</p></div>
<div class="paragraph"><p>In fact, using the repetition command (<em>Insert</em> key), connections can
be very quickly made in the following way, if component pins are aligned
in increasing order (a common case in practice on components such as
memories, microprocessors…):</p></div>
<div class="ulist"><ul>
<li>
<p>
Place the first label (for example PCA0)
</p>
</li>
<li>
<p>
Use the repetition command as much as needed to place members.
Eeschema will automatically create the next labels (PCA1, PCA2…)
vertically aligned, theoretically on the position of the other pins.
</p>
</li>
<li>
<p>
Draw the wire under the first label. Then use the repetition command
to place the other wires under the labels.
</p>
</li>
<li>
<p>
If needed, place the bus entries by the same way (Place the first
entry, then use the repetition command).
</p>
</li>
</ul></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
<div class="paragraph"><p>In the Preferences/Options menu, you can set the repetition parameters:</p></div>
<div class="ulist"><ul>
<li>
<p>
Vertical step.
</p>
</li>
<li>
<p>
Horizontal step.
</p>
</li>
<li>
<p>
Label increment (which can thus be incremented by 2, 3. or
decremented).
</p>
</li>
</ul></div>
</td>
</tr></table>
</div>
</div>
<div class="sect4">
<h5 id="global-connections-between-buses">Global connections between buses</h5>
<div class="paragraph"><p>You may need connections between buses, in order to link two buses
having different names, or in the case of a hierarchy, to create
connections between different sheets. You can make these connections in
the following way.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/bus_junction.png" alt="Bus junction example">
</div>
</div>
<div class="paragraph"><p>Buses PCA [0..15], ADR [0..7] and BUS [5..10] are connected together
(note the junction here because the vertical bus wire joins the middle
of the horizontal bus segment).</p></div>
<div class="paragraph"><p>More precisely, the corresponding members are connected together : PCA0,
ADR0 are connected, (as same as PCA1 and ADR1 … PCA7 and ADR7).</p></div>
<div class="paragraph"><p>Furthermore, PCA5, BUS5 and ADR5 are connected (just as PCA6, BUS6 and
ADR6 like PCA7, BUS7 and ADR7).</p></div>
<div class="paragraph"><p>PCA8 and BUS8 are also connected (just as PCA9 and BUS9, PCA10 and
BUS10)</p></div>
</div>
</div>
<div class="sect3">
<h4 id="power-ports-connection">5.5.4. Power ports connection</h4>
<div class="paragraph"><p>When the power pins of the components are visible, they must be
connected, as for any other signal.</p></div>
<div class="paragraph"><p>Components such as gates and flip-flops may have invisible power pins.
Care must be taken with these because:</p></div>
<div class="ulist"><ul>
<li>
<p>
You cannot connect wires, because of their invisibility.
</p>
</li>
<li>
<p>
You do not know their names.
</p>
</li>
</ul></div>
<div class="paragraph"><p>And moreover, it would be a bad idea to make them visible and to connect
them like the other pins, because the schematic would become unreadable
and not in accordance with usual conventions.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">If you want to enforce the display of these invisible power pins, you
must check the option “Show invisible power pins” in the
Preferences/Options dialog box of the main menu, or the icon
<span class="image">
<img src="images/icons/hidden_pin.png" alt="images/icons/hidden_pin.png">
</span>
on the left (options) toolbar.</td>
</tr></table>
</div>
<div class="paragraph"><p>Eeschema automatically connects invisible power pins of the same name
to the power net of that name. It may be necessary to join power nets
of different names (for example, "GND" in TTL components and "VSS" in
MOS components); use power ports for this.</p></div>
<div class="paragraph"><p>It is not recommended to use labels for power connection. These only have
a “local” connection scope, and would not connect the invisible power pins.</p></div>
<div class="paragraph"><p>The figure below shows an example of power port connections.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/power_ports_example.png" alt="Power ports example">
</div>
</div>
<div class="paragraph"><p>In this example, ground (GND) is connected to power port VSS, and power
port VCC is connected to VDD.</p></div>
<div class="paragraph"><p>Two PWR_FLAG symbols are visible. They indicate that the two power ports
VCC and GND are really connected to a power source.
Without these two flags, the ERC tool would diagnose: <em>Warning: power
port not powered</em>.</p></div>
<div class="paragraph"><p>All these symbols are components of the schematic library “power”.</p></div>
</div>
<div class="sect3">
<h4 id="no-connection-symbols">5.5.5. "No Connect" flag</h4>
<div class="paragraph"><p>These symbols are very useful to avoid undesired ERC warnings.
The electric rules check ensures that no connection has been
accidentally left unconnected.</p></div>
<div class="paragraph"><p>If pins must really remain unconnected, it is necessary to place
a "No Connect" flag (tool <span class="image">
<img src="images/icons/noconn.png" alt="No connection icon">
</span>)
on these pins. These symbols do not have any influence on the
generated netlists.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="drawing-complements">5.6. Drawing Complements</h3>
<div class="sect3">
<h4 id="text-comments">5.6.1. Text Comments</h4>
<div class="paragraph"><p>It can be useful (to aid in understanding the schematic) to place
annotations such as text fields and frames. Text fields (tool
<span class="image">
<img src="images/icons/add_text.png" alt="images/icons/add_text.png">
</span>)
and Polyline (tool
<span class="image">
<img src="images/icons/add_dashed_line.png" alt="images/icons/add_dashed_line.png">
</span>)
are intended for this use, contrary to labels and wires, which are
connection elements.</p></div>
<div class="paragraph"><p>Here you can find an example of a frame with a textual comment.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/frame_example.png" alt="Frame with comment example">
</div>
</div>
</div>
<div class="sect3">
<h4 id="sheet-title-block">5.6.2. Sheet title block</h4>
<div class="paragraph"><p>The title block is edited with the tool
<span class="image">
<img src="images/icons/sheetset.png" alt="Page Settings tool">
</span>.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/page_settings.png" alt="Page settings dialog">
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="images/en/title_block.png" alt="Title block">
</div>
</div>
<div class="paragraph"><p>The sheet number (Sheet X/Y) is automatically updated.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="rescuing-cached-components">5.7. Rescuing cached components</h3>
<div class="paragraph"><p>By default, Eeschema loads component symbols out of the libraries according to the set paths.
This can cause a problem when loading a very old project: if the symbols in the library have changed
since they were used in the project, the ones in the project would be automatically replaced with
the new versions. The new versions might not line up correctly or might be oriented differently,
leading to a broken schematic.</p></div>
<div class="paragraph"><p>However, when a project is saved, a cache library is saved along with it. This allows the project
to be distributed without the full libraries. If you load a project where symbols are present both
in its cache and in the system libraries, Eeschema will scan the libraries for conflicts. Any
conflicts found will be listed in the following dialog:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/rescue-conflicts.png" alt="Rescue conflicts dialog">
</div>
</div>
<div class="paragraph"><p>You can see in this example that the project originally used a diode with the cathode facing up,
but the library now contains one with the cathode facing down. This change could ruin the project!
Pressing OK here will cause the old symbol to be saved into a special “rescue” library, and all
the components using that symbol will be renamed to avoid naming conflicts.</p></div>
<div class="paragraph"><p>If you press Cancel, no rescues will be made, so Eeschema will load all the new components by
default. Because no changes were made, you can still go back and run the rescue function again:
choose "Rescue Cached Components" in the Tools menu to call up the dialog again.</p></div>
<div class="paragraph"><p>If you would prefer not to see this dialog, you can press "Never Show Again". The default will
be to do nothing and allow the new components to be loaded. This option can be changed back in
the Component Libraries preferences.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="hierarchical-schematics">6. Hierarchical schematics</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="introduction-2">6.1. Introduction</h3>
<div class="paragraph"><p>A hierarchical representation is generally a good solution for projects
bigger than a few sheets. If you want to manage this kind of project, it
will be necessary to:</p></div>
<div class="ulist"><ul>
<li>
<p>
Use large sheets, which results in printing and handling problems.
</p>
</li>
<li>
<p>
Use several sheets, which leads you to a hierarchy structure.
</p>
</li>
</ul></div>
<div class="paragraph"><p>The complete schematic then consists in a main schematic sheet, called
root sheet, and sub-sheets constituting the hierarchy. Moreover, a
skillful subdividing of the design into separate sheets often improves
on its readability.</p></div>
<div class="paragraph"><p>From the root sheet, you must be able to find all sub-sheets.
Hierarchical schematics management is very easy with Eeschema, thanks to
an integrated "hierarchy navigator" accessible via the icon
<span class="image">
<img src="images/icons/hierarchy_nav.png" alt="icons/hierarchy_nav_png">
</span>
of the top toolbar.</p></div>
<div class="paragraph"><p>There are two types of hierarchy that can exist simultaneously: the
first one has just been evoked and is of general use. The second
consists in creating components in the library that appear like
traditional components in the schematic, but which actually correspond
to a schematic which describes their internal structure.</p></div>
<div class="paragraph"><p>This second type is used to develop integrated circuits, because in this
case you have to use function libraries in the schematic you are
drawing.</p></div>
<div class="paragraph"><p>Eeschema currently doesn’t treat this second case.</p></div>
<div class="paragraph"><p>A hierarchy can be:</p></div>
<div class="ulist"><ul>
<li>
<p>
simple: a given sheet is used only once
</p>
</li>
<li>
<p>
complex: a given sheet is used more than once (multiples instances)
</p>
</li>
<li>
<p>
flat: which is a simple hierarchy, but connections between sheets are
not drawn.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Eeschema can deal with all these hierarchies.</p></div>
<div class="paragraph"><p>The creation of a hierarchical schematic is easy, the whole hierarchy is
handled starting from the root schematic, as if you had only one
schematic.</p></div>
<div class="paragraph"><p>The two important steps to understand are:</p></div>
<div class="ulist"><ul>
<li>
<p>
How to create a sub-sheet.
</p>
</li>
<li>
<p>
How to build electric connections between sub-sheets.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="navigation-in-the-hierarchy">6.2. Navigation in the Hierarchy</h3>
<div class="paragraph"><p>Navigation among sub-sheets It is very easy thanks to the navigator tool
accessible via the button
<span class="image">
<img src="images/icons/hierarchy_nav.png" alt="icons/hierarchy_nav_png">
</span>
on the top toolbar.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/hierarchy_navigator_dialog.png" alt="hierarchy_navigator_dialog_png">
</div>
</div>
<div class="paragraph"><p>Each sheet is reachable by clicking on its name. For quick access, right
click on a sheet name, and choose to Enter Sheet.</p></div>
<div class="paragraph"><p>You can quickly reach the root sheet, or a sub-sheet thanks to the tool
<span class="image">
<img src="images/icons/hierarchy_cursor.png" alt="icons/hierarchy_cursor_png">
</span>
of the right toolbar. After the navigation tool has been
selected:</p></div>
<div class="ulist"><ul>
<li>
<p>
Click on a sheet name to select the sheet.
</p>
</li>
<li>
<p>
Click elsewhere to select the Root sheet.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="local-hierarchical-and-global-labels">6.3. Local, hierarchical and global labels</h3>
<div class="sect3">
<h4 id="properties">6.3.1. Properties</h4>
<div class="paragraph"><p>Local labels, tool
<span class="image">
<img src="images/icons/add_line_label.png" alt="icons/add_line_label_png">
</span>,
are connecting signals only within a sheet. Hierarchical labels (tool
<span class="image">
<img src="images/icons/add_hierarchical_label.png" alt="icons/add_hierarchical_label_png">
</span>)
are connecting signals only within a sheet and to a hierarchical pin
placed in the parent sheet.</p></div>
<div class="paragraph"><p>Global labels (tool
<span class="image">
<img src="images/icons/add_glabel.png" alt="Global label icon">
</span>)
are connecting signals across all the hierarchy. Power pins (type <em>power
in</em> and <em>power out</em>) invisible are like global labels because they are
seen as connected between them across all the hierarchy.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">Within a hierarchy (simple or complex) one can use both hierarchical
labels and/or global labels.</td>
</tr></table>
</div>
</div>
</div>
<div class="sect2">
<h3 id="hierarchy-creation-of-headlines">6.4. Hierarchy creation of headlines</h3>
<div class="paragraph"><p>You have to:</p></div>
<div class="ulist"><ul>
<li>
<p>
Place in the root sheet a hierarchy symbol called "sheet symbol".
</p>
</li>
<li>
<p>
Enter into the new schematic (sub-sheet) with the navigator and draw
it, like any other schematic.
</p>
</li>
<li>
<p>
Draw the electric connections between the two schematics by placing
Global Labels (HLabels) in the new schematic (sub-sheet), and labels
having the same name in the root sheet, known as SheetLabels. These
SheetLabels will be connected to the sheet symbol of the root sheet to
the other elements of the schematic like standard component pins.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="sheet-symbol">6.5. Sheet symbol</h3>
<div class="paragraph"><p>Draw a rectangle defined by two diagonal points symbolizing the
sub-sheet.</p></div>
<div class="paragraph"><p>The size of this rectangle must allow you to place later particular
labels, hierarchy pins, corresponding to the global labels (HLabels) in
the sub-sheet.</p></div>
<div class="paragraph"><p>These labels are similar to usual component pins. Select the tool
<span class="image">
<img src="images/icons/add_hierarchical_subsheet.png" alt="icons/add_hierarchical_subsheet_png">
</span>.</p></div>
<div class="paragraph"><p>Click to place the upper left corner of the rectangle. Click again to
place the lower right corner, having a large enough rectangle.</p></div>
<div class="paragraph"><p>You will then be prompted to type a file name and a sheet name for this
sub-sheet (in order to reach the corresponding schematic, using the
hierarchy navigator).</p></div>
<div class="imageblock">
<div class="content">
<img src="images/hsheet_properties_1.png" alt="hsheet_properties_1_png">
</div>
</div>
<div class="paragraph"><p>You must give at least a file name. If there is no sheet name, the file
name will be used as sheet name (usual way to do that).</p></div>
</div>
<div class="sect2">
<h3 id="connections-hierarchical-pins">6.6. Connections - hierarchical pins</h3>
<div class="paragraph"><p>You will create here points of connection (hierarchy pins) for the
symbol which has been just created.</p></div>
<div class="paragraph"><p>These points of connection are similar to normal component pins, with
however the possibility to connect a complete bus with only one point of
connection.</p></div>
<div class="paragraph"><p>There are two ways to do this:</p></div>
<div class="ulist"><ul>
<li>
<p>
Place the different pins before drawing the sub-sheet (manual
placement).
</p>
</li>
<li>
<p>
Place the different pins after drawing the sub-sheet, and the global
labels (semi-automatic placement).
</p>
</li>
</ul></div>
<div class="paragraph"><p>The second solution is quite preferable.</p></div>
<div class="paragraph"><p><strong>Manual placement:</strong></p></div>
<div class="ulist"><ul>
<li>
<p>
To select the tool
<span class="image">
<img src="images/icons/add_hierar_pin.png" alt="icons/add_hierar_pin_png">
</span>.
</p>
</li>
<li>
<p>
Click on the hierarchy symbol where you want to place this pin.
</p>
</li>
</ul></div>
<div class="paragraph"><p>See below an example of the creation of the hierarchical pin called
"CONNEXION".</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_hierarchical_label.png" alt="eeschema_hierarchical_label_png">
</div>
</div>
<div class="paragraph"><p>You can define its graphical attributes, and size or later, by editing
this pin sheet (Right click and select Edit in the PopUp menu).</p></div>
<div class="paragraph"><p>Various pin symbols are available:</p></div>
<div class="ulist"><ul>
<li>
<p>
Input
</p>
</li>
<li>
<p>
Output
</p>
</li>
<li>
<p>
Bidirectional
</p>
</li>
<li>
<p>
Tri-State
</p>
</li>
<li>
<p>
Passive
</p>
</li>
</ul></div>
<div class="paragraph"><p>These pin symbols are only graphic enhancements, and have no other role.</p></div>
<div class="paragraph"><p><strong>Automatic placement:</strong></p></div>
<div class="ulist"><ul>
<li>
<p>
Select the tool
<span class="image">
<img src="images/icons/import_hierarchical_label.png" alt="icons/import_hierarchical_label_png">
</span>.
</p>
</li>
<li>
<p>
Click on the hierarchy symbol from where you want to import the pins
corresponding to global labels placed in the corresponding schematic. A
hierarchical pin appears, if a new global label exists, i.e. not
corresponding to an already placed pin.
</p>
</li>
<li>
<p>
Click where you want to place this pin.
</p>
</li>
</ul></div>
<div class="paragraph"><p>All necessary pins can thus be placed quickly and without error. Their
aspect is in accordance with corresponding global labels.</p></div>
</div>
<div class="sect2">
<h3 id="connections---hierarchical-labels">6.7. Connections - hierarchical labels</h3>
<div class="paragraph"><p>Each pin of the sheet symbol just created, must correspond to a label
called hierarchical Label in the sub-sheet. Hierarchical labels are
similar to labels, but they provide connections between sub-sheet and
root sheet. The graphical representation of the two complementary labels
(pin and HLabel) is similar. Hierarchical labels creation is made with
the tool
<span class="image">
<img src="images/icons/add_hierarchical_label.png" alt="icons/add_hierarchical_label_png">
</span>.</p></div>
<div class="paragraph"><p>See below a root sheet example:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/hierarchical_label_root.png" alt="hierarchical_label_root_png">
</div>
</div>
<div class="paragraph"><p>Notice pin VCC_PIC, connected to connector JP1.</p></div>
<div class="paragraph"><p>Here are the corresponding connections in the sub-sheet :</p></div>
<div class="imageblock">
<div class="content">
<img src="images/hierarchical_label_sub.png" alt="hierarchical_label_sub_png">
</div>
</div>
<div class="paragraph"><p>You find again, the two corresponding hierarchical labels, providing
connection between the two hierarchical sheets.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">You can use hierarchical labels and hierarchy pins to connect two buses,
according to the syntax (Bus [N. .m]) previously described.</td>
</tr></table>
</div>
<div class="sect3">
<h4 id="labels-hierarchical-labels-global-labels-and-invisible-power-pins">6.7.1. Labels, hierarchical labels, global labels and invisible power pins</h4>
<div class="paragraph"><p>Here are some comments on various ways to provide connections, other
than wire connections.</p></div>
<div class="sect4">
<h5 id="simple-labels">Simple labels</h5>
<div class="paragraph"><p>Simple labels have a local capacity of connection, i.e. limited to the
schematic sheet where they are placed. This is due to the fact that :</p></div>
<div class="ulist"><ul>
<li>
<p>
Each sheet has a sheet number.
</p>
</li>
<li>
<p>
This sheet number is associated to a label.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Thus, if you place the label "TOTO" in sheet n° 3, in fact the true
label is "TOTO_3". If you also place a label "TOTO" in sheet n° 1 (root
sheet) you place in fact a label called "TOTO_1", different from
"TOTO_3". This is always true, even if there is only one sheet.</p></div>
</div>
<div class="sect4">
<h5 id="hierarchical-labels">Hierarchical labels</h5>
<div class="paragraph"><p>What is said for the simple labels is also true for hierarchical labels.</p></div>
<div class="paragraph"><p>Thus in the same sheet, a HLabel "TOTO" is considered to be connected to
a local label "TOTO", but not connected to a HLabel or label called
"TOTO" in another sheet.</p></div>
<div class="paragraph"><p>However a HLabel is considered to be connected to the corresponding
SheetLabel symbol in the hierarchical symbol placed in the root sheet.</p></div>
</div>
<div class="sect4">
<h5 id="invisible-power-pins">Invisible power pins</h5>
<div class="paragraph"><p>It was seen that invisible power pins were connected together if they
have the same name. Thus all the power pins declared "Invisible Power
Pins" and named VCC are connected and form the equipotential VCC,
whatever the sheet they are placed on.</p></div>
<div class="paragraph"><p>This means that if you place a VCC label in a sub-sheet, it will not be
connected to VCC pins, because this label is actually VCC_n, where n is
the sheet number.</p></div>
<div class="paragraph"><p>If you want this label VCC to be really connected to the equipotential
VCC, it will have to be explicitly connected to an invisible power pin,
thanks to a VCC power port.</p></div>
</div>
</div>
<div class="sect3">
<h4 id="global-labels">6.7.2. Global labels</h4>
<div class="paragraph"><p>Global labels that have an identical name are connected across the whole
hierarchy.</p></div>
<div class="paragraph"><p>(power labels like vcc … are global labels)</p></div>
</div>
</div>
<div class="sect2">
<h3 id="complex-hierarchy">6.8. Complex Hierarchy</h3>
<div class="paragraph"><p>Here is an example. The same schematic is used twice (two instances).
The two sheets share the same schematic because the file name is the
same for the two sheets (“other_sheet.sch”). But the sheet names must be
different.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_complex_hierarchy.png" alt="eeschema_complex_hierarchy_png">
</div>
</div>
</div>
<div class="sect2">
<h3 id="flat-hierarchy">6.9. Flat hierarchy</h3>
<div class="paragraph"><p>You can create a project using many sheets, without creating connections
between these sheets (flat hierarchy) if the next rules are respected:</p></div>
<div class="ulist"><ul>
<li>
<p>
You must create a root sheet containing the other sheets, which acts
as a link between others sheets.
</p>
</li>
<li>
<p>
No explicit connections are needed.
</p>
</li>
<li>
<p>
All connections between sheets will use global labels instead of
hierarchical labels.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Here is an example of a root sheet.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_flat_hierarchy.png" alt="eeschema_flat_hierarchy_png">
</div>
</div>
<div class="paragraph"><p>Here is the two pages, connected by global labels.</p></div>
<div class="paragraph"><p>Here is the pic_programmer.sch.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_flat_hierarchy_1.png" alt="eeschema_flat_hierarchy_1_png">
</div>
</div>
<div class="paragraph"><p>Here is the pic_sockets.sch.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_flat_hierarchy_2.png" alt="eeschema_flat_hierarchy_2_png">
</div>
</div>
<div class="paragraph"><p>Look at global labels.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_flat_hierarchy_3.png" alt="eeschema_flat_hierarchy_3_png">
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="automatic-classification-annotation">7. Automatic classification Annotation</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_introduction_2">7.1. Introduction</h3>
<div class="paragraph"><p>The automatic classification annotation tool allows you to automatically
assign a designator to components in your schematic. For multi-parts
components, assign a multi-part suffix to minimize the number of these
packages. The automatic classification annotation tool is accessible via
the icon
<span class="image">
<img src="images/icons/annotate.png" alt="icons_annotate_png">
</span>.
Here you find its main window.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/annotate-dialog.png" alt="annotate-dialog_img">
</div>
</div>
<div class="paragraph"><p>Various possibilities are available:</p></div>
<div class="ulist"><ul>
<li>
<p>
Annotate all the components (reset existing annotation option)
</p>
</li>
<li>
<p>
Annotate all the components, but do not swap any previously annotated
multi-unit parts.
</p>
</li>
<li>
<p>
Annotate new components only (i.e. those whose reference finishes by?
like IC? ) (keep existing annotation option).
</p>
</li>
<li>
<p>
Annotate the whole hierarchy (use the entire schematic option).
</p>
</li>
<li>
<p>
Annotate the current sheet only (use current page only option).
</p>
</li>
</ul></div>
<div class="paragraph"><p>The “Reset, but do not swap any annotated multi-unit parts” option keeps
all existing associations between multi-unit parts. That is, if you have
U2A and U2B, they may be reannotated to U1A and U1B respectively, but they will
never be reannotated to U1A and U2A, nor to U2B and U2A. This is useful if
you want to ensure that pin groupings are maintained, if you have already
decided by yourself which subunits are best placed where.</p></div>
<div class="paragraph"><p>The annotation order choice gives the method used to set the reference
number inside each sheet of the hierarchy.</p></div>
<div class="paragraph"><p>Except for particular cases, an automatic annotation applies to the
whole project (all sheets) and to the new components, if you don’t want
to modify previous annotations.</p></div>
<div class="paragraph"><p>The Annotation Choice gives the method used to calculate reference Id:</p></div>
<div class="ulist"><ul>
<li>
<p>
Use first free number in schematic: components are annotated from 1
(for each reference prefix). If a previous annotation exists, not yet in
use numbers will be used.
</p>
</li>
<li>
<p>
Start to sheet number*100 and use first free number: annotation start
from 101 for the sheet 1, from 201 for the sheet 2, etc. If there are
more than 99 items having the same reference prefix (U, R) inside the
sheet 1, the annotation tool uses the number 200 and more, and
annotation for sheet 2 will start from the next free number.
</p>
</li>
<li>
<p>
Start to sheet number*1000 and use first free number. Annotation start
from 1001 for the sheet 1, from 2001 for the sheet 2.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="some-examples">7.2. Some examples</h3>
<div class="sect3">
<h4 id="annotation-order">7.2.1. Annotation order</h4>
<div class="paragraph"><p>This example shows 5 elements placed, but not annotated.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_annotation_order_none.png" alt="eeschema_annotation_order_none_png">
</div>
</div>
<div class="paragraph"><p>After the annotation tool Is executed, the following result is obtained.</p></div>
<div class="paragraph"><p>Sort by X position.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_annotation_order_x.png" alt="eeschema_annotation_order_x_png">
</div>
</div>
<div class="paragraph"><p>Sort by Y position.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_annotation_order_y.png" alt="eeschema_annotation_order_y_png">
</div>
</div>
<div class="paragraph"><p>You can see that four 74LS00 gates were distributed in U1 package, and
that the fifth 74LS00 has been assigned to the next, U2.</p></div>
</div>
<div class="sect3">
<h4 id="annotation-choice">7.2.2. Annotation Choice</h4>
<div class="paragraph"><p>Here is an annotation in sheet 2 where the option use first free number
in schematic was set.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_annotation_choice_free.png" alt="eeschema_annotation_choice_free_png">
</div>
</div>
<div class="paragraph"><p>Option start to sheet number*100 and use first free number give the
following result.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_annotation_choice_x100.png" alt="eeschema_annotation_choice_x100_png">
</div>
</div>
<div class="paragraph"><p>The option start to sheet number*1000 and use first free number gives
the following result.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_annotation_choice_x1000.png" alt="eeschema_annotation_choice_x1000_png">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="erc">8. Design verification with Electrical Rules Check</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_introduction_3">8.1. Introduction</h3>
<div class="paragraph"><p>The Electrical Rules Check (ERC) tool performs an automatic check of
your schematic. The ERC checks for any errors in your sheet, such as
unconnected pins, unconnected hierarchical symbols, shorted outputs,
etc. Naturally, an automatic check is not infallible, and the software
that makes it possible to detect all design errors is not yet 100%
complete. Such a check is very useful, because it allows you to detect
many oversights and small errors.</p></div>
<div class="paragraph"><p>In fact all detected errors must be checked and then corrected before
proceeding as normal. The quality of the ERC is directly related to the
care taken in declaring electrical pin properties during library
creation. ERC output is reported as "errors" or "warnings".</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/dialog_erc.png" alt="ERC dialog">
</div>
</div>
</div>
<div class="sect2">
<h3 id="how-to-use-erc">8.2. How to use ERC</h3>
<div class="paragraph"><p>ERC can be started by clicking on the icon
<span class="image">
<img src="images/icons/erc.png" alt="ERC icon">
</span>.</p></div>
<div class="paragraph"><p>Warnings are placed on the schematic elements raising an ERC error (pins
or labels).</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
<div class="ulist"><ul>
<li>
<p>
In this dialog window, when clicking on an error message you can jump
to the corresponding marker in the schematic.
</p>
</li>
<li>
<p>
In the schematic right-click on a marker to access the corresponding
diagnostic message.
</p>
</li>
</ul></div>
</td>
</tr></table>
</div>
<div class="paragraph"><p>You can also delete error markers from the dialog.</p></div>
</div>
<div class="sect2">
<h3 id="example-of-erc">8.3. Example of ERC</h3>
<div class="imageblock">
<div class="content">
<img src="images/erc_pointers.png" alt="ERC pointers">
</div>
</div>
<div class="paragraph"><p>Here you can see four errors:</p></div>
<div class="ulist"><ul>
<li>
<p>
Two outputs have been erroneously connected together (red arrow).
</p>
</li>
<li>
<p>
Two inputs have been left unconnected (green arrow).
</p>
</li>
<li>
<p>
There is an error on an invisible power port, power flag is missing
(green arrow on the top).
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="displaying-diagnostics">8.4. Displaying diagnostics</h3>
<div class="paragraph"><p>By right-clicking on a marker the pop-up menu allows you to access the ERC
marker diagnostic window.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/erc_pointers_info.png" alt="ERC pointers info">
</div>
</div>
<div class="paragraph"><p>and when clicking on Marker Error Info you can get a description of the
error.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/erc_pointers_message.png" alt="erc_pointers_message_png">
</div>
</div>
</div>
<div class="sect2">
<h3 id="power-pins-and-power-flags">8.5. Power pins and Power flags</h3>
<div class="paragraph"><p>It is common to have an error or a warning on power pins, even though
all seems normal. See example above. This happens because, in most
designs, the power is provided by connectors that are not power sources
(like regulator output, which is declared as Power out).</p></div>
<div class="paragraph"><p>The ERC thus won’t detect any Power out pin to control this wire and
will declare them not driven by a power source.</p></div>
<div class="paragraph"><p>To avoid this warning you have to place a "PWR_FLAG" on such a power
port. Take a look at the following example:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_power_pins_and_flags.png" alt="eeschema_power_pins_and_flags_png">
</div>
</div>
<div class="paragraph"><p>The error marker will then disappear.</p></div>
<div class="paragraph"><p>Most of the time, a PWR_FLAG must be connected to GND, because usually
regulators have outputs declared as power out, but ground pins are never
power out (the normal attribute is power in), so grounds never appear
connected to a power source without a pwr_flag.</p></div>
</div>
<div class="sect2">
<h3 id="configuration">8.6. Configuration</h3>
<div class="paragraph"><p><em>The Options</em> panel allows you to configure connectivity rules to define
electrical conditions for errors and warnings check.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_erc_options.png" alt="eeschema_erc_options_png">
</div>
</div>
<div class="paragraph"><p>Rules can be changed by clicking on the desired square of the matrix,
causing it to cycle through the choices: normal, warning, error.</p></div>
</div>
<div class="sect2">
<h3 id="erc-report-file">8.7. ERC report file</h3>
<div class="paragraph"><p>An ERC report file can be generated and saved by checking the option
Write ERC report. The file extension for ERC report files is .erc. Here
is an example of ERC report file.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>ERC control (4/1/1997-14:16:4)
***** Sheet 1 (INTERFACE UNIVERSAL)
ERC: Warning Pin input Unconnected @ 8.450, 2.350
ERC: Warning passive Pin Unconnected @ 8.450, 1.950
ERC: Warning: BiDir Pin connected to power Pin (Net 6) @ 10.100, 3.300
ERC: Warning: Power Pin connected to BiDir Pin (Net 6) @ 4.950, 1.400
>> Errors ERC: 4</pre>
</div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="create-a-netlist">9. Create a Netlist</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_overview">9.1. Overview</h3>
<div class="paragraph"><p>A netlist is a file which describes electrical connections between
components. In the netlist file you can find:</p></div>
<div class="ulist"><ul>
<li>
<p>
The list of the components
</p>
</li>
<li>
<p>
The list of connections between components, called equi-potential
nets.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Different netlist formats exist. Sometimes the components list and the
equi-potential list are two separate files. This netlist is fundamental
in the use of schematic capture software, because the netlist is the
link with other electronic CAD software, like:</p></div>
<div class="ulist"><ul>
<li>
<p>
PCB software.
</p>
</li>
<li>
<p>
Schematic and PCB Simulators.
</p>
</li>
<li>
<p>
CPLD (and other programmable IC’s) compilers.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Eeschema supports several netlist formats.</p></div>
<div class="ulist"><ul>
<li>
<p>
PCBNEW format (printed circuits).
</p>
</li>
<li>
<p>
ORCAD PCB2 format (printed circuits).
</p>
</li>
<li>
<p>
CADSTAR format (printed circuits).
</p>
</li>
<li>
<p>
Spice format, for various simulators (the Spice format is also used by
other simulators).
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="netlist-formats">9.2. Netlist formats</h3>
<div class="paragraph"><p>Select the tool
<span class="image">
<img src="images/icons/netlist.png" alt="Netlist icon">
</span>
to open the netlist creation dialog box.</p></div>
<div class="paragraph"><p>Pcbnew selected</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_netlist_dialog_pcbnew.png" alt="eeschema_netlist_dialog_pcbnew_png">
</div>
</div>
<div class="paragraph"><p>Spice selected</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_netlist_dialog_spice.png" alt="eeschema_netlist_dialog_spice_png">
</div>
</div>
<div class="paragraph"><p>Using the different tabs you can select the desired format. In Spice
format you can generate netlists with either equi-potential names (it
is more legible) or net numbers (old Spice versions accept numbers
only). By clicking the Netlist button, you will be asked for a netlist
file name.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">With big projects, the netlist generation can take up to several minutes.</td>
</tr></table>
</div>
</div>
<div class="sect2">
<h3 id="netlist-examples">9.3. Netlist examples</h3>
<div class="paragraph"><p>You can see below a schematic design using the PSPICE library:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_netlist_schematic.png" alt="eeschema_netlist_schematic_png">
</div>
</div>
<div class="paragraph"><p>Example of a PCBNEW netlist file:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre># Eeschema Netlist Version 1.0 generee le 21/1/1997-16:51:15
(
(32E35B76 $noname C2 1NF {Lib=C}
(1 0)
(2 VOUT_1)
)
(32CFC454 $noname V2 AC_0.1 {Lib=VSOURCE}
(1 N-000003)
(2 0)
)
(32CFC413 $noname C1 1UF {Lib=C}
(1 INPUT_1)
(2 N-000003)
)
(32CFC337 $noname V1 DC_12V {Lib=VSOURCE}
(1 +12V)
(2 0)
)
(32CFC293 $noname R2 10K {Lib=R}
(1 INPUT_1)
(2 0)
)
(32CFC288 $noname R6 22K {Lib=R}
(1 +12V)
(2 INPUT_1)
)
(32CFC27F $noname R5 22K {Lib=R}
(1 +12V)
(2 N-000008)
)
(32CFC277 $noname R1 10K {Lib=R}
(1 N-000008)
(2 0)
)
(32CFC25A $noname R7 470 {Lib=R}
(1 EMET_1)
(2 0)
)
(32CFC254 $noname R4 1K {Lib=R}
(1 +12V)
(2 VOUT_1)
)
(32CFC24C $noname R3 1K {Lib=R}
(1 +12V)
(2 N-000006)
)
(32CFC230 $noname Q2 Q2N2222 {Lib=NPN}
(1 VOUT_1)
(2 N-000008)
(3 EMET_1)
)
(32CFC227 $noname Q1 Q2N2222 {Lib=NPN}
(1 N-000006)
(2 INPUT_1)
(3 EMET_1)
)
)
# End</pre>
</div></div>
<div class="paragraph"><p>In PSPICE format, the netlist is as follows:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>* Eeschema Netlist Version 1.1 (Spice format) creation date: 18/6/2008-08:38:03
.model Q2N2222 npn (bf=200)
.AC 10 1Meg \*1.2
.DC V1 10 12 0.5
R12 /VOUT N-000003 22K
R11 +12V N-000003 100
L1 N-000003 /VOUT 100mH
R10 N-000005 N-000004 220
C3 N-000005 0 10uF
C2 N-000009 0 1nF
R8 N-000004 0 2.2K
Q3 /VOUT N-000009 N-000004 N-000004 Q2N2222
V2 N-000008 0 AC 0.1
C1 /VIN N-000008 1UF
V1 +12V 0 DC 12V
R2 /VIN 0 10K
R6 +12V /VIN 22K
R5 +12V N-000012 22K
R1 N-000012 0 10K
R7 N-000007 0 470
R4 +12V N-000009 1K
R3 +12V N-000010 1K
Q2 N-000009 N-000012 N-000007 N-000007 Q2N2222
Q1 N-000010 /VIN N-000007 N-000007 Q2N2222
.print ac v(vout)
.plot ac v(nodes) (-1,5)
.end</pre>
</div></div>
</div>
<div class="sect2">
<h3 id="notes-on-netlists">9.4. Notes on Netlists</h3>
<div class="sect3">
<h4 id="netlist-name-precautions">9.4.1. Netlist name precautions</h4>
<div class="paragraph"><p>Many software tools that use netlists do not accept spaces in the
component names, pins, equi-potential nets or others. Systematically avoid
spaces in labels, or names and value fields of components or their pins.</p></div>
<div class="paragraph"><p>In the same way, special characters other than letters and numbers can
cause problems. Note that this limitation is not related to Eeschema,
but to the netlist formats that can then become untranslatable to
software that uses netlist files.</p></div>
</div>
<div class="sect3">
<h4 id="pspice-netlists">9.4.2. PSPICE netlists</h4>
<div class="paragraph"><p>For the Pspice simulator, you have to include some command lines in the
netlist itself (.PROBE, .AC, etc.).</p></div>
<div class="paragraph"><p>Any text line included in the schematic diagram starting with the
keyword <strong>-pspice</strong> or <strong>-gnucap</strong> will be inserted (without the keyword) at
the top of the netlist.</p></div>
<div class="paragraph"><p>Any text line included in the schematic diagram starting with the
keyword <strong>+pspice</strong> or <strong>+gnucap</strong> will be inserted (without the keyword) at
the end of the netlist.</p></div>
<div class="paragraph"><p>Here is a sample using many one-line texts and one multi-line text:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_pspice_netlist.png" alt="eeschema_pspice_netlist_png">
</div>
</div>
<div class="paragraph"><p>For example, if you type the following text (do not use a label!):</p></div>
<div class="literalblock">
<div class="content monospaced">
<pre>-PSPICE .PROBE</pre>
</div></div>
<div class="paragraph"><p>a line .PROBE will be inserted in the netlist.</p></div>
<div class="paragraph"><p>In the previous example three lines were inserted at the beginning of
the netlist and two at the end with this technique.</p></div>
<div class="paragraph"><p>If you are using multiline texts, <strong>+pspice</strong> or <strong>+gnucap</strong> keywords are
needed only once:</p></div>
<div class="literalblock">
<div class="content monospaced">
<pre>+PSPICE .model NPN NPN
.model PNP PNP
.lib C:\Program Files\LTC\LTspiceIV\lib\cmp\standard.bjt
.backanno</pre>
</div></div>
<div class="paragraph"><p>creates the four lines:</p></div>
<div class="literalblock">
<div class="content monospaced">
<pre>.model NPN NPN
.model PNP PNP
.lib C:\Program Files\LTC\LTspiceIV\lib\cmp\standard.bjt
.backanno</pre>
</div></div>
<div class="paragraph"><p>Also note that the equipotential GND must be named 0 (zero) for Pspice.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="other-formats">9.5. Other formats</h3>
<div class="paragraph"><p>For other netlist formats you can add netlist converters in the form of
plugins. These converters are automatically launched by Eeschema. Chapter
14 gives some explanations and examples of converters.</p></div>
<div class="paragraph"><p>A converter is a text file (xsl format) but one can use other languages
like Python. When using the xsl format, a tool (xsltproc.exe or
xsltproc) read the intermediate file created by Eeschema, and the
converter file to create the output file. In this case, the converter
file (a sheet style) is very small and very easy to write.</p></div>
<div class="sect3">
<h4 id="init-the-dialog-window">9.5.1. Init the dialog window</h4>
<div class="paragraph"><p>You can add a new netlist plug-in via the Add Plugin button.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_netlist_dialog_add_plugin.png" alt="eeschema_netlist_dialog_add_plugin_png">
</div>
</div>
<div class="paragraph"><p>Here is the plug-in PadsPcb setup window:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_netlist_dialog_padspcb.png" alt="eeschema_netlist_dialog_padspcb_png">
</div>
</div>
<div class="paragraph"><p>The setup will require:</p></div>
<div class="ulist"><ul>
<li>
<p>
A title (for example, the name of the netlist format).
</p>
</li>
<li>
<p>
The plug-in to launch.
</p>
</li>
</ul></div>
<div class="paragraph"><p>When the netlist is generated:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Eeschema creates an intermediate file *.tmp, for example test.tmp.
</p>
</li>
<li>
<p>
Eeschema runs the plug-in, which reads test.tmp and creates test.net.
</p>
</li>
</ol></div>
</div>
<div class="sect3">
<h4 id="command-line-format">9.5.2. Command line format</h4>
<div class="paragraph"><p>Here is an example, using xsltproc.exe as a tool to convert .xsl files,
and a file netlist_form_pads-pcb.xsl as converter sheet style:</p></div>
<div class="paragraph"><p><strong>f:/kicad/bin/xsltproc.exe -o %O.net
f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl %I</strong></p></div>
<div class="paragraph"><p>With:</p></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:58%;">
<col style="width:42%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">f:/kicad/bin/xsltproc.exe</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">A tool to read and convert xsl file</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">-o %O.net</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Output file: %O will define the output file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">File name converter (a
sheet style, xsl format).</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">%I</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Will be replaced by the intermediate file created by Eeschema
(*.tmp).</p></td>
</tr>
</tbody>
</table>
<div class="paragraph"><p>For a schematic named test.sch, the actual command line is:</p></div>
<div class="paragraph"><p>f:/kicad/bin/xsltproc.exe -o test.net
f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl test.tmp.</p></div>
</div>
<div class="sect3">
<h4 id="converter-and-sheet-style-plug-in">9.5.3. Converter and sheet style (plug-in)</h4>
<div class="paragraph"><p>This is a very simple piece of software, because its purpose is only to
convert an input text file (the intermediate text file) to another text
file. Moreover, from the intermediate text file, you can create a BOM
list.</p></div>
<div class="paragraph"><p>When using xsltproc as the converter tool only the sheet style will be
generated.</p></div>
</div>
<div class="sect3">
<h4 id="intermediate-netlist-file-format">9.5.4. Intermediate netlist file format</h4>
<div class="paragraph"><p>See Chapter 14 for more explanations about xslproc, descriptions of the
intermediate file format, and some examples of sheet style for
converters.</p></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="plot-and-print">10. Plot and Print</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_introduction_4">10.1. Introduction</h3>
<div class="paragraph"><p>You can access both print and plot commands via the file menu.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_file_menu_plot.png" alt="eeschema_file_menu_plot_png">
</div>
</div>
<div class="paragraph"><p>The suported output formats are Postscript, PDF, SVG, DXF and HPGL. You can
also directly print to your printer.</p></div>
</div>
<div class="sect2">
<h3 id="common-printing-commands">10.2. Common printing commands</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
Plot Current Page
</dt>
<dd>
<p>
prints one file for the current sheet only.
</p>
</dd>
<dt class="hdlist1">
Plot All Pages
</dt>
<dd>
<p>
allows you to plot the whole hierarchy (one print file is
generated for each sheet).
</p>
</dd>
</dl></div>
</div>
<div class="sect2">
<h3 id="plot-in-postscript">10.3. Plot in Postscript</h3>
<div class="paragraph"><p>This command allows you to create PostScript files.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plot_postscript.png" alt="eeschema_plot_postscript_png">
</div>
</div>
<div class="paragraph"><p>The file name is the sheet name with an extension .ps. You can disable
the option "Plot border and title block". This is useful if you want to create a
postscript file for encapsulation (format .eps) often used to insert a
diagram in a word processing software. The message window displays the
file names created.</p></div>
</div>
<div class="sect2">
<h3 id="plot-in-pdf">10.4. Plot in PDF</h3>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plot_pdf.png" alt="eeschema_plot_pdf.png">
</div>
</div>
<div class="paragraph"><p>Allows you to create plot files using the format PDF.
The file name is the sheet name with an extension .pdf.</p></div>
</div>
<div class="sect2">
<h3 id="plot-in-svg">10.5. Plot in SVG</h3>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plot_svg.png" alt="eeschema_plot_svg_png">
</div>
</div>
<div class="paragraph"><p>Allows you to create plot files using the vectored format SVG.
The file name is the sheet name with an extension .svg.</p></div>
</div>
<div class="sect2">
<h3 id="plot-in-dxf">10.6. Plot in DXF</h3>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plot_dxf.png" alt="eeschema_plot_dxf_png">
</div>
</div>
<div class="paragraph"><p>Allows you to create plot files using the format DXF.
The file name is the sheet name with an extension .dxf.</p></div>
</div>
<div class="sect2">
<h3 id="plot-in-hpgl">10.7. Plot in HPGL</h3>
<div class="paragraph"><p>This command allows you to create an HPGL file.
In this format you can define:</p></div>
<div class="ulist"><ul>
<li>
<p>
Page size.
</p>
</li>
<li>
<p>
Origin.
</p>
</li>
<li>
<p>
Pen width (in mm).
</p>
</li>
</ul></div>
<div class="paragraph"><p>The plotter setup dialog window looks like the following:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plot_hpgl.png" alt="eeschema_plot_hpgl_png">
</div>
</div>
<div class="paragraph"><p>The output file name will be the sheet name plus the extension .plt.</p></div>
<div class="sect3">
<h4 id="sheet-size-selection">10.7.1. Sheet size selection</h4>
<div class="paragraph"><p>Sheet size is normally checked. In this case, the sheet size defined in
the title block menu will be used and the chosen scale will be 1. If a
different sheet size is selected (A4 with A0, or A with E), the scale is
automatically adjusted to fill the page.</p></div>
</div>
<div class="sect3">
<h4 id="offset-adjustments">10.7.2. Offset adjustments</h4>
<div class="paragraph"><p>For all standard dimensions, you can adjust the offsets to center the
drawing as accurately as possible. Because plotters have an origin point
at the center or at the lower left corner of the sheet, it is necessary
to be able to introduce an offset in order to plot properly.</p></div>
<div class="paragraph"><p>Generally speaking:</p></div>
<div class="ulist"><ul>
<li>
<p>
For plotters having their origin point at the center of the sheet the
offset must be negative and set at half of the sheet dimension.
</p>
</li>
<li>
<p>
For plotters having their origin point at the lower left corner of the
sheet the offset must be set to 0.
</p>
</li>
</ul></div>
<div class="paragraph"><p>To set an offset:</p></div>
<div class="ulist"><ul>
<li>
<p>
Select sheet size.
</p>
</li>
<li>
<p>
Set offset X and offset Y.
</p>
</li>
<li>
<p>
Click on accept offset.
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect2">
<h3 id="print-on-paper">10.8. Print on paper</h3>
<div class="paragraph"><p>This command, available via the icon
<span class="image">
<img src="images/icons/print_button.png" alt="icons/print_button_png">
</span>,
allows you to visualize and generate design files for the standard
printer.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/print_dialog.png" alt="print_dialog_png">
</div>
</div>
<div class="paragraph"><p>The "Print sheet reference and title block" option enables or disables
sheet references and title block.</p></div>
<div class="paragraph"><p>The "Print in black and white" option sets printing in monochrome. This
option is generally necessary if you use a black and white laser
printer, because colors are printed into half-tones that are often not
so readable.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="component-library-editor">11. Component Library Editor</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="general-information-about-component-libraries">11.1. General Information About Component Libraries</h3>
<div class="paragraph"><p>A component is a schematic element which contains a graphical
representation, electrical connections, and fields defining the
component. Components used in a schematic are stored in component
libraries. Eeschema provides a component library editing tool that
allows you to create libraries, add, delete or transfer components
between libraries, export components to files, and import components
from files. The library editing tool provides a simple way to manage
component library files.</p></div>
</div>
<div class="sect2">
<h3 id="component-library-overview">11.2. Component Library Overview</h3>
<div class="paragraph"><p>A component library is composed of one or more components. Generally the
components are logically grouped by function, type, and/or manufacturer.</p></div>
<div class="paragraph"><p>A component is composed of:</p></div>
<div class="ulist"><ul>
<li>
<p>
Graphical items (lines, circles, arcs, text, etc ) that provide the
symbolic definition.
</p>
</li>
<li>
<p>
Pins which have both graphic properties (line, clock, inverted, low
level active, etc ) and electrical properties (input, output,
bidirectional, etc.) used by the Electrical Rules Check (ERC) tool.
</p>
</li>
<li>
<p>
Fields such as references, values, corresponding footprint names for
PCB design, etc.
</p>
</li>
<li>
<p>
Aliases used to associate a common component such as a 7400 with all
of its derivatives such as 74LS00, 74HC00, and 7437. All of these
aliases share the same library component.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Proper component designing requires:</p></div>
<div class="ulist"><ul>
<li>
<p>
Defining if the component is made up of one or more units.
</p>
</li>
<li>
<p>
Defining if the component has an alternate body style also known as a
De Morgan representation.
</p>
</li>
<li>
<p>
Designing its symbolic representation using lines, rectangles,
circles, polygons and text.
</p>
</li>
<li>
<p>
Adding pins by carefully defining each pin’s graphical elements,
name, number, and electrical property (input, output, tri-state, power
port, etc.).
</p>
</li>
<li>
<p>
Adding an alias if other components have the same symbol and pin out
or removing one if the component has been created from another
component.
</p>
</li>
<li>
<p>
Adding optional fields such as the name of the footprint used by the PCB
design software and/or defining their visibility.
</p>
</li>
<li>
<p>
Documenting the component by adding a description string and links to
data sheets, etc.
</p>
</li>
<li>
<p>
Saving it in the desired library.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="component-library-editor-overview">11.3. Component Library Editor Overview</h3>
<div class="paragraph"><p>The component library editor main window is shown below. It consists
of three tool bars for quick access to common features and a component
viewing/editing area. Not all commands are available on the tool bars
but can be accessed using the menus.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/libedit_main_window.png" alt="libedit_main_window_png">
</div>
</div>
<div class="sect3">
<h4 id="main-toolbar">11.3.1. Main Toolbar</h4>
<div class="paragraph"><p>The main tool bar typically located at the top of the main window shown
below consists of the library management tools, undo/redo commands, zoom
commands, and component properties dialogs.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/toolbar_libedit.png" alt="images/toolbar_libedit.png">
</div>
</div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:20%;">
<col style="width:80%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/save_library.png" alt="icons/save_library_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save the currently selected library. The button will be disabled if no
library is currently selected or no changes to the currently selected
library have been made.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/library.png" alt="icons/library_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the library to edit.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/delete.png" alt="icons/delete_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete a component from the currently selected library or any library
defined by the project if no library is currently selected.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/library_browse.png" alt="icons/library_browse_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open the component library browser to select the library and component
to edit.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/new_component.png" alt="icons/new_component_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a new component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/import_cmp_from_lib.png" alt="icons/import_cmp_from_lib_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Load component from currently selected library for editing.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/copycomponent.png" alt="icons/copycomponent_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a new component from the currently loaded component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/save_part_in_mem.png" alt="icons/save_part_in_mem_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Save the current component changes in memory. The library file is not
changed.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/import.png" alt="icons/import_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Import one component from a file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/export.png" alt="icons/export_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Export the current component to a file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/new_library.png" alt="icons/new_library_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Create a new library file containing the current component. Note: new
libraries are not automatically added to the project.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/undo.png" alt="icons/undo_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Undo last edit.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/redo.png" alt="icons/redo_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Redo last undo.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/part_properties.png" alt="icons/part_properties_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Edit the current component properties.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_text.png" alt="icons/add_text_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Edit the fields of current component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/erc.png" alt="icons/erc_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Test the current component for design errors.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_in.png" alt="images/icons/zoom_in.png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom in.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_out.png" alt="images/icons/zoom_out.png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom out.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_redraw.png" alt="images/icons/zoom_redraw.png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Refresh display.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_fit_in_page.png" alt="images/icons/zoom_fit_in_page.png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom to fit component in display.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/morgan1.png" alt="icons/morgan1_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the normal body style. The button is disabled if the current
component does not have an alternate body style.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/morgan2.png" alt="icons/morgan2_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the alternate body style. The button is disabled if the current
component does not have an alternate body style.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/datasheet.png" alt="icons/datasheet_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Show the associated documentation. The button will be disabled if no
documentation is defined for the current component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/toolbar_libedit_part.png" alt="images/toolbar_libedit_part.png" width="80%">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the unit to display. The drop down control will be disabled if
the current component is not derived from multiple units.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/toolbar_libedit_alias.png" alt="images/toolbar_libedit_part.png" width="80%">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select the alias. The drop down control will be disabled if the
current component does not have any aliases.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/pin2pin.png" alt="icons/pin2pin_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Pin editing: independent editing for pin shape and position for
components with multiple units and alternate symbols.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/pin_table.png" alt="icons/pin_table_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Show pin table.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="element-toolbar">11.3.2. Element Toolbar</h4>
<div class="paragraph"><p>The vertical toolbar typically located on the right hand side of the
main window allows you to place all of the elements required to design a
component. The table below defines each toolbar button.</p></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:10%;">
<col style="width:90%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/cursor.png" alt="icons/cursor_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Select tool. Right-clicking with the select tool opens the context menu
for the object under the cursor. Left-clicking with the select tool
displays the attributes of the object under the cursor in the message
panel at the bottom of the main window. Double-left-clicking with the
select tool will open the properties dialog for the object under the
cursor.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/pin.png" alt="icons/pin_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Pin tool. Left-click to add a new pin.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_text.png" alt="icons/add_text_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Graphical text tool. Left-click to add a new graphical text item.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_rectangle.png" alt="icons/add_rectangle_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Rectangle tool. Left-click to begin drawing the first corner of a
graphical rectangle. Left-click again to place the opposite corner of
the rectangle.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_circle.png" alt="icons/add_circle_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Circle tool. Left-click to begin drawing a new graphical circle from
the center. Left-click again to define the radius of the cicle.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_arc.png" alt="icons/add_arc_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Arc tool. Left-click to begin drawing a new graphical arc item from the
center. Left-click again to define the first arc end point. Left-click
again to define the second arc end point.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_polygon.png" alt="icons/add_polygon_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Polygon tool. Left-click to begin drawing a new graphical polygon item
in the current component. Left-click for each addition polygon line.
Double-left-click to complete the polygon.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/anchor.png" alt="icons/anchor_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Anchor tool. Left-click to set the anchor position of the component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/import.png" alt="icons/import_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Import a component from a file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/export.png" alt="icons/export_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Export the current component to a file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/delete.png" alt="icons/delete_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Delete tool. Left-click to delete an object from the current component.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="options-toolbar">11.3.3. Options Toolbar</h4>
<div class="paragraph"><p>The vertical tool bar typically located on the left hand side of the
main window allows you to set some of the editor drawing options. The
table below defines each tool bar button.</p></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:10%;">
<col style="width:90%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/grid.png" alt="icons/grid_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Toggle grid visibility on and off.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/unit_inch.png" alt="icons/unit_inch_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Set units to inches.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/unit_mm.png" alt="icons/unit_mm_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Set units to millimeters.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/cursor_shape.png" alt="icons/cursor_shape_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Toggle full screen cursor on and off.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="library-selection-and-maintenance">11.4. Library Selection and Maintenance</h3>
<div class="paragraph"><p>The selection of the current library is possible via the
<span class="image">
<img src="images/icons/library.png" alt="icons/library_png">
</span>
which shows you all available libraries and allows you to select one.
When a component is loaded or saved, it will be put in this library. The
library name of component is the contents of its value field.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
<div class="ulist"><ul>
<li>
<p>
You must load a library into Eeschema, in order to access its contents.
</p>
</li>
<li>
<p>
The content of the current library can be saved after modification, by
clicking on the
<span class="image">
<img src="images/icons/save_library.png" alt="icons/save_library_png">
</span>
on the main tool bar.
</p>
</li>
<li>
<p>
A component can be removed from any library by clicking on the
<span class="image">
<img src="images/icons/delete.png" alt="icons/delete_png">
</span>.
</p>
</li>
</ul></div>
</td>
</tr></table>
</div>
<div class="sect3">
<h4 id="select-and-save-a-component">11.4.1. Select and Save a Component</h4>
<div class="paragraph"><p>When you edit a component you are not really working on the component in
its library but on a copy of it in the computer’s memory. Any edit
action can be undone easily. A component may be loaded from a local library
or from an existing component.</p></div>
<div class="sect4">
<h5 id="component-selection">Component Selection</h5>
<div class="paragraph"><p>Clicking the
<span class="image">
<img src="images/icons/import_cmp_from_lib.png" alt="icons/import_cmp_from_lib_png">
</span>
on the main tool bar displays the list of the available components that
you can select and load from the currently selected library.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">If a component is selected by its alias, the name of the loaded component
is displayed on the window title bar instead of the selected alias. The list
of component aliases is always loaded with each component and can be
edited. You can create a new component by selecting an alias of the
current component from the
<span class="image">
<img src="images/toolbar_libedit_alias.png" alt="images/toolbar_libedit_alias.png">
</span>.
The first item in the alias list is the root name of the component.</td>
</tr></table>
</div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">Alternatively, clicking the
<span class="image">
<img src="images/icons/import.png" alt="icons/import_png">
</span>
allows you to load a component which has been previously saved
by the
<span class="image">
<img src="images/icons/export.png" alt="icons/export_png">
</span>.</td>
</tr></table>
</div>
</div>
<div class="sect4">
<h5 id="save-a-component">Save a Component</h5>
<div class="paragraph"><p>After modification, a component can be saved in the current library,
in a new library, or exported to a backup file.</p></div>
<div class="paragraph"><p>To save the modified component in the current library, click the
<span class="image">
<img src="images/icons/save_part_in_mem.png" alt="icons/save_part_in_mem_png">
</span>.
Please note that the update command only saves the component changes in
the local memory. This way, you can make up your mind before you save the
library.</p></div>
<div class="paragraph"><p>To permanently save the component changes to the library file, click the
<span class="image">
<img src="images/icons/save_library.png" alt="icons/save_library_png">
</span>
which will overwrite the existing library file with the component
changes.</p></div>
<div class="paragraph"><p>If you want to create a new library containing the current component,
click the
<span class="image">
<img src="images/icons/new_library.png" alt="icons/new_library_png">
</span>.
You will be asked to enter a new library name.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
<div class="paragraph"><p>New libraries are not automatically added to the current project.</p></div>
<div class="paragraph"><p>You must add any new library you wish to use in a schematic to the list
of project libraries in Eeschema using the component configuration dialog.</p></div>
<div class="paragraph"><p><span class="image">
<img src="images/en/libsettings.png" alt="Library settings" width="50%">
</span></p></div>
</td>
</tr></table>
</div>
<div class="paragraph"><p>Click the
<span class="image">
<img src="images/icons/export.png" alt="icons/export_png">
</span>
to create a file containing only the current component. This file
will be a standard library file which will contain only one component.
This file can be used to import the component into another library. In
fact, the create new library command and the export command are basically
identical.</p></div>
</div>
<div class="sect4">
<h5 id="transfer-components-to-another-library">Transfer Components to Another Library</h5>
<div class="paragraph"><p>You can very easily copy a component from a source library into a
destination library using the following commands:</p></div>
<div class="ulist"><ul>
<li>
<p>
Select the source library by clicking the
<span class="image">
<img src="images/icons/library.png" alt="icons/library_png">
</span>.
</p>
</li>
<li>
<p>
Load the component to be transferred by clicking the
<span class="image">
<img src="images/icons/import_cmp_from_lib.png" alt="icons/import_cmp_from_lib_png">
</span>.
The component will be displayed in the editing area.
</p>
</li>
<li>
<p>
Select the destination library by clicking the
<span class="image">
<img src="images/icons/library.png" alt="icons/library_png">
</span>.
</p>
</li>
<li>
<p>
Save the current component to the new library in the local memory by
clicking the
<span class="image">
<img src="images/icons/save_part_in_mem.png" alt="icons/save_part_in_mem_png">
</span>.
</p>
</li>
<li>
<p>
Save the component in the current local library file by clicking the
<span class="image">
<img src="images/icons/save_library.png" alt="icons/save_library_png">
</span>.
</p>
</li>
</ul></div>
</div>
<div class="sect4">
<h5 id="discarding-component-changes">Discarding Component Changes</h5>
<div class="paragraph"><p>When you are working on a component, the edited component is only a
working copy of the actual component in its library. This means that as
long as you have not saved it, you can just reload it to discard all
changes made. If you have already updated it in the local memory and
you have not saved it to the library file, you can always quit and start
again. Eeschema will undo all the changes.</p></div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="creating-library-components">11.5. Creating Library Components</h3>
<div class="sect3">
<h4 id="create-a-new-component">11.5.1. Create a New Component</h4>
<div class="paragraph"><p>A new component can be created by clicking the
<span class="image">
<img src="images/icons/new_component.png" alt="icons/new_component_png">
</span>.
You will be asked for a component name (this name is used as default
value for the value field in the schematic editor), the reference designator
(U, IC, R…), the number of units per package (for example a 7400 is made of
4 units per package) and if an alternate body style (sometimes referred to
as DeMorgan) is desired. If the reference designator field is left empty, it
will default to "U". These properties can be changed later, but it is preferable to
set them correctly at the creation of the component.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_component_properties.png" alt="eeschema_component_properties_png">
</div>
</div>
<div class="paragraph"><p>A new component will be created using the properties above and will
appear in the editor as shown below.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_new.png" alt="eeschema_libedit_new_png">
</div>
</div>
</div>
<div class="sect3">
<h4 id="create-a-component-from-another-component">11.5.2. Create a Component from Another Component</h4>
<div class="paragraph"><p>Often, the component that you want to make is similar to one already in
a component library. In this case it is easy to load and modify an
existing component.</p></div>
<div class="ulist"><ul>
<li>
<p>
Load the component which will be used as a starting point.
</p>
</li>
<li>
<p>
Click on the
<span class="image">
<img src="images/icons/copycomponent.png" alt="icons/copycomponent_png">
</span>
or modify its name by right-clicking on the value field and editing the text.
If you chose to duplicate the current component, you will be prompted
for a new component name.
</p>
</li>
<li>
<p>
If the model component has aliases, you will be prompted to remove
aliases from the new component which conflict with the current library.
If the answer is no the new component creation will be aborted.
Component libraries cannot have any duplicate names or aliases.
</p>
</li>
<li>
<p>
Edit the new component as required.
</p>
</li>
<li>
<p>
Update the new component in the current library by clicking the
<span class="image">
<img src="images/icons/save_part_in_mem.png" alt="icons/save_part_in_mem_png">
</span>
or save to a new library by clicking the
<span class="image">
<img src="images/icons/new_library.png" alt="icons/new_library_png">
</span>
or if you want to save this new component in an other existing
library select the other library by clicking on the
<span class="image">
<img src="images/icons/library.png" alt="icons/library_png">
</span>
and save the new component.
</p>
</li>
<li>
<p>
Save the current library file to disk by clicking the
<span class="image">
<img src="images/icons/save_library.png" alt="icons/save_library_png">
</span>.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="component-properties">11.5.3. Component Properties</h4>
<div class="paragraph"><p>Component properties should be carefully set during the component
creation or alternatively they are inherited from the copied component. To
change the component properties, click on the
<span class="image">
<img src="images/icons/part_properties.png" alt="icons/part_properties_png">
</span>
to show the dialog below.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_properties_for_component.png" alt="eeschema_properties_for_component_png">
</div>
</div>
<div class="paragraph"><p>It is very important to correctly set the number of units per package and
if the component has an alternate symbolic representation parameters
correctly because when pins are edited or created the corresponding pins
for each unit will created. If you change the number of units per
package after pin creation and editing, there will be additional work
introduced to add the new unit pins and symbols. Nevertheless, it is
possible to modify these properies at any time.</p></div>
<div class="paragraph"><p>The graphic options "Show pin number" and "Show pin name" define the
visibility of the pin number and pin name text. This text will be
visible if the corresponding options are checked. The option "Place pin
names inside" defines the pin name position relative to the pin body.
This text will be displayed inside the component outline if the option
is checked. In this case the "Pin Name Position Offset" property defines
the shift of the text away from the body end of the pin. A value from 30
to 40 (in 1/1000 inch) is reasonable.</p></div>
<div class="paragraph"><p>The example below shows a component with the "Place pin name inside"
option unchecked. Notice the position of the names and pin numbers.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_uncheck_pin_name_inside.png" alt="eeschema_uncheck_pin_name_inside_png">
</div>
</div>
</div>
<div class="sect3">
<h4 id="components-with-alternate-symbols">11.5.4. Components with Alternate Symbols</h4>
<div class="paragraph"><p>If the component has more than one symbolic repersentation, you will
have to select the different symbols of the component in order to edit
them. To edit the normal symbol, click the
<span class="image">
<img src="images/icons/morgan1.png" alt="icons/morgan1_png">
</span>.</p></div>
<div class="paragraph"><p>To edit the alternate symbol click on the
<span class="image">
<img src="images/icons/morgan2.png" alt="icons/morgan2_png">
</span>.
Use the
<span class="image">
<img src="images/toolbar_libedit_alias.png" alt="images/toolbar_libedit_part.png">
</span>
shown below to select the unit you wish to edit.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_select_unit.png" alt="eeschema_libedit_select_unit_png">
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="graphical-elements">11.6. Graphical Elements</h3>
<div class="paragraph"><p>Graphical elements create the symbolic representation of a component and
contain no electrical connection information. Their design is possible
using the following tools:</p></div>
<div class="ulist"><ul>
<li>
<p>
Lines and polygons defined by start and end points.
</p>
</li>
<li>
<p>
Rectangles defined by two diagonal corners.
</p>
</li>
<li>
<p>
Circles defined by the center and radius.
</p>
</li>
<li>
<p>
Arcs defined by the starting and ending point of the arc and its
center. An arc goes from 0° to 180°.
</p>
</li>
</ul></div>
<div class="paragraph"><p>The vertical toolbar on the right hand side of the main window allows
you to place all of the graphical elements required to design a
component’s symbolic representation.</p></div>
<div class="sect3">
<h4 id="graphical-element-membership">11.6.1. Graphical Element Membership</h4>
<div class="paragraph"><p>Each graphic element (line, arc, circle, etc.) can be defined as common
to all units and/or body styles or specific to a given unit and/or body
style. Element options can be quickly accessed by right-clicking on
the element to display the context menu for the selected element. Below
is the context menu for a line element.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_context_menu.png" alt="eeschema_libedit_context_menu_png">
</div>
</div>
<div class="paragraph"><p>You can also double-left-click on an element to modify its properties.
Below is the properties dialog for a polygon element.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_polyline_properties.png" alt="eeschema_libedit_polyline_properties_png">
</div>
</div>
<div class="paragraph"><p>The properties of a graphic element are:</p></div>
<div class="ulist"><ul>
<li>
<p>
Line width which defines the width of the element’s line in the
current drawing units.
</p>
</li>
<li>
<p>
The "Common to all units in component" setting defines if the
graphical element is drawn for each unit in component with more than one
unit per package or if the graphical element is only drawn for the
current unit.
</p>
</li>
<li>
<p>
The "Common by all body styles (DeMorgan)" setting defines if the
graphical element is drawn for each symbolic representation in
components with an alternate body style or if the graphical element is
only drawn for the current body style.
</p>
</li>
<li>
<p>
The fill style setting determines if the symbol defined by the
graphical element is to be drawn unfilled, background filled, or
foreground filled.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="graphical-text-elements">11.6.2. Graphical Text Elements</h4>
<div class="paragraph"><p>The
<span class="image">
<img src="images/icons/add_text.png" alt="icons/add_text_png">
</span>
allows for the creation of graphical text. Graphical text is always
readable, even when the component is mirrored. Please note that
graphical text items are not fields.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="multiple-units-per-component-and-alternate-body-styles">11.7. Multiple Units per Component and Alternate Body Styles</h3>
<div class="paragraph"><p>Components can have two symbolic representations (a standard symbol and
an alternate symbol often referred to as "DeMorgan") and/or have more
than one unit per package (logic gates for example). Some components can
have more than one unit per package each with different symbols and pin
configurations.</p></div>
<div class="paragraph"><p>Consider for instance a relay with two switches which can be designed as
a component with three different units: a coil, switch 1, and switch 2.
Designing a component with multiple units per package and/or alternate
body styles is very flexible. A pin or a body symbol item can be common
to all units or specific to a given unit or they can be common to both
symbolic representation so are specific to a given symbol representation.</p></div>
<div class="paragraph"><p>By default, pins are specific to each symbolic representation of each
unit, because the pin number is specific to a unit, and the shape
depends on the symbolic representation. When a pin is common to each
unit or each symbolic representation, you need to create it only once
for all units and all symbolic representations (this is usually the case
for power pins). This is also the case for the body style graphic shapes
and text, which may be common to each unit (but typically are specific
to each symbolic representation).</p></div>
<div class="sect3">
<h4 id="example-of-a-component-having-multiple-units-with-different-symbols">11.7.1. Example of a Component Having Multiple Units with Different Symbols:</h4>
<div class="paragraph"><p>This is an example of a relay defined with three units per package,
switch 1, switch 2, and the coil:</p></div>
<div class="paragraph"><p>Option: pins are not linked. One can add or edit pins for each unit
without any coupling with pins of other units.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_pins_per_part.png" alt="eeschema_libedit_pins_per_part_png">
</div>
</div>
<div class="paragraph"><p>All units are not interchangeable must be selected.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_not_interchangeable.png" alt="eeschema_libedit_not_interchangeable_png">
</div>
</div>
<div class="paragraph"><p>Unit 1</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_unit1.png" alt="eeschema_libedit_unit1_png">
</div>
</div>
<div class="paragraph"><p>Unit 2</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_unit2.png" alt="eeschema_libedit_unit2_png">
</div>
</div>
<div class="paragraph"><p>Unit 3</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_unit3.png" alt="eeschema_libedit_unit3_png">
</div>
</div>
<div class="paragraph"><p>It does not have the same symbol and pin layout and therefore is not
interchangeable with units 1 and 2.</p></div>
<div class="sect4">
<h5 id="graphical-symbolic-elements">Graphical Symbolic Elements</h5>
<div class="paragraph"><p>Shown below are properties for a graphic body element. From the relay
example above, the three units have different symbolic representations.
Therefore, each unit was created separately and the graphical body
elements must have the "Common to all units in component" disabled.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_disable_common.png" alt="eeschema_libedit_disable_common_png">
</div>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="pin-creation-and-editing">11.8. Pin Creation and Editing</h3>
<div class="paragraph"><p>You can click on the
<span class="image">
<img src="images/icons/pin.png" alt="icons/pin_png">
</span>
to create and insert a pin. The editing of all pin properties is done by
double-clicking on the pin or right-clicking on the pin to open the pin
context menu. Pins must be created carefully, because any error will
have consequences on the PCB design. Any pin already placed can be
edited, deleted, and/or moved.</p></div>
<div class="sect3">
<h4 id="pin-overview">11.8.1. Pin Overview</h4>
<div class="paragraph"><p>A pin is defined by its graphical representation, its name and its
"number". The pin’s "number" is defined by a set of 4 letters and / or
numbers. For the Electrical Rules Check (ERC) tool to be useful, the
pin’s "electrical" type (input, output, tri-state…) must also be
defined correctly. If this type is not defined properly, the schematic
ERC check results may be invalid.</p></div>
<div class="paragraph"><p>Important notes:</p></div>
<div class="ulist"><ul>
<li>
<p>
Do not use spaces in pin names and numbers.
</p>
</li>
<li>
<p>
To define a pin name with an inverted signal (overline) use the
<span class="monospaced">~</span> (tilde) character. The next <span class="monospaced">~</span> character will turn off the overline.
For example <span class="monospaced">\~FO~O</span> would display <span class="overline">FO</span> O.
</p>
</li>
<li>
<p>
If the pin name is reduced to a single symbol, the pin is regarded as
unnamed.
</p>
</li>
<li>
<p>
Pin names starting with <span class="monospaced">#</span>, are reserved for power port symbols.
</p>
</li>
<li>
<p>
A pin "number" consists of 1 to 4 letters and/ or numbers. 1,2,..9999
are valid numbers. A1, B3, Anod, Gnd, Wire, etc. are also valid.
</p>
</li>
<li>
<p>
Duplicate pin "numbers" cannot exist in a component.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="pin-properties">11.8.2. Pin Properties</h4>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_pin_properties.png" alt="eeschema_libedit_pin_properties_png">
</div>
</div>
<div class="paragraph"><p>The pin properties dialog allows you to edit all of the characteristics
of a pin. This dialog pops up automatically when you create a pin or
when double-clicking on an existing pin. This dialog allows you to modify:</p></div>
<div class="ulist"><ul>
<li>
<p>
Name and name’s text size.
</p>
</li>
<li>
<p>
Number and number’s text size.
</p>
</li>
<li>
<p>
Length.
</p>
</li>
<li>
<p>
Electrical and graphical types.
</p>
</li>
<li>
<p>
Unit and alternate representation membership.
</p>
</li>
<li>
<p>
Visibility.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="pins-graphical-styles">11.8.3. Pins Graphical Styles</h4>
<div class="paragraph"><p>Shown in the figure below are the different pin graphical styles. The
choice of graphic styles does not have any influence on the pin’s
electrical type.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_pin_properties_style.png" alt="eeschema_libedit_pin_properties_style_png">
</div>
</div>
</div>
<div class="sect3">
<h4 id="pin-electrical-types">11.8.4. Pin Electrical Types</h4>
<div class="paragraph"><p>Choosing the correct electrical type is important for the schematic ERC
tool. The electrical types defined are:</p></div>
<div class="ulist"><ul>
<li>
<p>
Bidirectional which indicates bidirectional pins commutable between
input and output (microprocessor data bus for example).
</p>
</li>
<li>
<p>
Tri-state is the usual 3 states output.
</p>
</li>
<li>
<p>
Passive is used for passive component pins, resistors, connectors,
etc.
</p>
</li>
<li>
<p>
Unspecified can be used when the ERC check doesn’t matter.
</p>
</li>
<li>
<p>
Power input is used for the component’s power pins. Power pins are
automatically connected to the other power input pins with the same
name.
</p>
</li>
<li>
<p>
Power output is used for regulator outputs.
</p>
</li>
<li>
<p>
Open emitter and open collector types can be used for logic outputs
defined as such.
</p>
</li>
<li>
<p>
Not connected is used when a component has a pin that has no internal
connection.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="pin-global-properties">11.8.5. Pin Global Properties</h4>
<div class="paragraph"><p>You can modify the length or text size of the name and/or number of all
the pins using the Global command entry of the pin context menu. Click
on the parameter you want to modify and type the new value which will
then be applied to all of the current component’s pins.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_pin_context_menu.png" alt="eeschema_libedit_pin_context_menu_png">
</div>
</div>
</div>
<div class="sect3">
<h4 id="defining-pins-for-multiple-units-and-alternate-symbolic-representations">11.8.6. Defining Pins for Multiple Units and Alternate Symbolic Representations</h4>
<div class="paragraph"><p>Components with multiple units and/or graphical representations are
particularly problematic when creating and editing pins. The majority of
pins are specific to each unit (because their pin number is specific to
each unit) and to each symbolic representation (because their form and
position is specific to each symbolic representation). The creation and
the editing of pins can be problematic for components with multiple
units per package and alternate symbolic representations. The component
library editor allows the simultaneous creation of pins. By default,
changes made to a pin are made for all units of a multiple unit
component and both representations for components with an alternate
representation.</p></div>
<div class="paragraph"><p>The only exception to this is the pin’s graphical type and name. This
dependency was established to allow for easier pin creation and editing
in most of the cases. This dependency can be disabled by toggling the
<span class="image">
<img src="images/icons/pin2pin.png" alt="icons/pin2pin_png">
</span>
on the main tool bar. This will allow you to create pins for each unit
and representation completely independently.</p></div>
<div class="paragraph"><p>A component can have two symbolic representations (representation known
as "DeMorgan") and can be made up of more than one unit as in the case
of components with logic gates. For certain components, you may want
several different graphic elements and pins. Like the relay sample shown
in section 11.7.1, a relay can be represented by three distinct units: a
coil, switch contact 1, and switch contact 2.</p></div>
<div class="paragraph"><p>The management of the components with multiple units and components with
alternate symbolic representations is flexible. A pin can be common or
specific to different units. A pin can also be common to both symbolic
representations or specific to each symbolic representation.</p></div>
<div class="paragraph"><p>By default, pins are specific to each representation of each unit,
because their number differs for each unit, and their design is
different for each symbolic representation. When a pin is common to all
units, it only has to drawn once such as in the case of power pins.</p></div>
<div class="paragraph"><p>An example is the output pin 7400 quad dual input NAND gate. Since there
are four units and two symbolic representations, there are eight
separate output pins defined in the component definition. When creating
a new 7400 component, unit A of the normal symbolic representation will
be shown in the library editor. To edit the pin style in alternate
symbolic representation, it must first be enabled by clicking the
<span class="image">
<img src="images/icons/morgan2.png" alt="icons/morgan2_png">
</span>
button on the tool bar. To edit the pin number for each unit,
select the appropriate unit using the
<span class="image">
<img src="images/toolbar_libedit_alias.png" alt="images/toolbar_libedit_alias.png">
</span>
drop down control.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="component-fields">11.9. Component Fields</h3>
<div class="paragraph"><p>All library components are defined with four default fields. The
reference designator, value, footprint assignment, and documentation
file link fields are created whenever a component is created or copied.
Only the reference designator and value fields are required. For
existing fields, you can use the context menu commands by right-clicking
on the pin. Components defined in libraries are typically defined
with these four default fields. Additional fields such as vendor, part
number, unit cost, etc. can be added to library components but generally
this is done in the schematic editor so the additional fields can be
applied to all of the components in the schematic.</p></div>
<div class="sect3">
<h4 id="editing-component-fields">11.9.1. Editing Component Fields</h4>
<div class="paragraph"><p>To edit an existing component field, right-click on the field text to
show the field context menu shown below.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_field_context_menu.png" alt="eeschema_libedit_field_context_menu_png">
</div>
</div>
<div class="paragraph"><p>To edit undefined fields, add new fields, or delete optional fields
<span class="image">
<img src="images/icons/add_text.png" alt="icons/add_text_png">
</span>
on the main tool bar to open the field properties dialog shown below.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_field_properties.png" alt="eeschema_libedit_field_properties_png">
</div>
</div>
<div class="paragraph"><p>Fields are text sections associated with the component. Do not confuse
them with the text belonging to the graphic representation of this
component.</p></div>
<div class="paragraph"><p>Important notes:</p></div>
<div class="ulist"><ul>
<li>
<p>
Modifying value fields effectively creates a new component using
the current component as the starting point for the new component. This
new component has the name contained in the value field when you save it
to the currently selected library.
</p>
</li>
<li>
<p>
The field edit dialog above must be used to edit a field that is empty
or has the invisible attribute enable.
</p>
</li>
<li>
<p>
The footprint is defined as an absolute footprint using the
LIBNAME:FPNAME format where LIBNAME is the name of the footprint library
defined in the footprint library table (see the "Footprint Library
Table" section in the Pcbnew "Reference Manual") and FPNAME is the name
of the footprint in the library LIBNAME.
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect2">
<h3 id="power-symbols">11.10. Power Symbols</h3>
<div class="paragraph"><p>Power symbols are created the same way as normal components. It may be
useful to place them in a dedicated library such as power.lib. Power
symbols consist of a graphical symbol and a pin of the type "Power
Invisible". Power port symbols are handled like any other component by
the schematic capture software. Some precautions are essential. Below is
an example of a power +5V symbol.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_power_symbol.png" alt="eeschema_libedit_power_symbol_png">
</div>
</div>
<div class="paragraph"><p>To create a power symbol, use the following steps:</p></div>
<div class="ulist"><ul>
<li>
<p>
Add a pin of type "Power input" named +5V (important because this name
will establish connection to the net +5V), with a pin number of 1
(number of no importance), a length of 0, and a "Line" "Graphic Style".
</p>
</li>
<li>
<p>
Place a small circle and a segment from the pin to the circle as
shown.
</p>
</li>
<li>
<p>
The anchor of the symbol is on the pin.
</p>
</li>
<li>
<p>
The component value is <span class="monospaced">+5V</span>.
</p>
</li>
<li>
<p>
The component reference is <span class="monospaced">\#+5V</span>. The reference text is not important
except the first character which must be <span class="monospaced">#</span> to indicate that the
component is a power symbol. By convention, every component in which the
reference field starts with a <span class="monospaced">#</span> will not appear in the component list
or in the netlist and the reference is declared as invisible.
</p>
</li>
</ul></div>
<div class="paragraph"><p>An easier method to create a new power port symbol is to use another
symbol as a model:</p></div>
<div class="ulist"><ul>
<li>
<p>
Load an existing power symbol.
</p>
</li>
<li>
<p>
Edit the pin name with name of the new power symbol.
</p>
</li>
<li>
<p>
Edit the value field to the same name as the pin, if you want to
display the power port value.
</p>
</li>
<li>
<p>
Save the new component.
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="libedit-complements">12. LibEdit - Complements</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_overview_2">12.1. Overview</h3>
<div class="paragraph"><p>A component consist of the following elements</p></div>
<div class="ulist"><ul>
<li>
<p>
A graphical representation (geometrical shapes, texts).
</p>
</li>
<li>
<p>
Pins.
</p>
</li>
<li>
<p>
Fields or associated text used by the post processors: netlist,
components list.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Two fields are to be initialized: reference and value. The name of the
design associated with the component, and the name of the associated
footprint, the other fields are the free fields, they can generally
remain empty, and could be filled during schematic capture.</p></div>
<div class="paragraph"><p>However, managing the documentation associated with any component
facilitates the research, use and maintenance of libraries. The
associated documentation consists of</p></div>
<div class="ulist"><ul>
<li>
<p>
A line of comment.
</p>
</li>
<li>
<p>
A line of key words such as TTL CMOS NAND2, separated by spaces.
</p>
</li>
<li>
<p>
An attached file name (for example an application note or a pdf file).
</p>
<div class="paragraph"><p>The default directory for attached files:</p></div>
<div class="paragraph"><p>kicad/share/library/doc</p></div>
<div class="paragraph"><p>If not found:</p></div>
<div class="paragraph"><p>kicad/library/doc</p></div>
<div class="paragraph"><p>Under linux:</p></div>
<div class="paragraph"><p>/usr/local/kicad/share/library/doc</p></div>
<div class="paragraph"><p>/usr/share/kicad/library/doc</p></div>
<div class="paragraph"><p>/usr/local/share/kicad/library/doc</p></div>
</li>
</ul></div>
<div class="paragraph"><p>Key words allow you to selectively search for a component according to
various selection criteria. Comments and key words are displayed in
various menus, and particularly when you select a component from the
library.</p></div>
<div class="paragraph"><p>The component also has an anchoring point. A rotation or a mirror is
made relative to this anchor point and during a placement this point
is used as a reference position. It is thus useful to position this
anchor accurately.</p></div>
<div class="paragraph"><p>A component can have aliases, i.e. equivalent names. This allows you to
considerably reduce the number of components that need to be created
(for example, a 74LS00 can have aliases such as 74000, 74HC00,
74HCT00…).</p></div>
<div class="paragraph"><p>Finally, the components are distributed in libraries (classified by
topics, or manufacturer) in order to facilitate their management.</p></div>
</div>
<div class="sect2">
<h3 id="position-a-component-anchor">12.2. Position a component anchor</h3>
<div class="paragraph"><p>The anchor is at the coordinates (0,0) and it is shown by the blue axes
displayed on your screen.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_anchor.png" alt="eeschema_libedit_anchor_png">
</div>
</div>
<div class="paragraph"><p>The anchor can be repositioned by selecting the icon
<span class="image">
<img src="images/icons/anchor.png" alt="icons/anchor_png">
</span>
and clicking on the new desired anchor position. The drawing will be
automatically re-centered on the new anchor point.</p></div>
</div>
<div class="sect2">
<h3 id="component-aliases">12.3. Component aliases</h3>
<div class="paragraph"><p>An alias is another name corresponding to the same component in the
library. Components with similar pin-out and representation can then be
represented by only one component, having several aliases (e.g. 7400
with alias 74LS00, 74HC00, 74LS37 ).</p></div>
<div class="paragraph"><p>The use of aliases allows you to build complete libraries quickly. In
addition these libraries, being much more compact, are easily loaded by
KiCad.</p></div>
<div class="paragraph"><p>To modify the list of aliases, you have to select the main editing
window via the icon
<span class="image">
<img src="images/icons/part_properties.png" alt="icons/part_properties_png">
</span>
and select the alias folder.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_alias.png" alt="eeschema_libedit_alias_png">
</div>
</div>
<div class="paragraph"><p>You can thus add or remove the desired alias. The current alias cannot
obviously be removed since it is edited.</p></div>
<div class="paragraph"><p>To remove all aliases, you have firstly to select the root component.
The first component in the alias list in the window of selection of the
main toolbar.</p></div>
</div>
<div class="sect2">
<h3 id="component-fields-1">12.4. Component fields</h3>
<div class="paragraph"><p>The field editor is called via the icon
<span class="image">
<img src="images/icons/add_text.png" alt="icons/add_text_png">
</span>.</p></div>
<div class="paragraph"><p>There are four special fields (texts attached to the component), and
configurable user fields</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_library_component_field.png" alt="eeschema_library_component_field_png">
</div>
</div>
<div class="paragraph"><p>Special fields</p></div>
<div class="ulist"><ul>
<li>
<p>
Reference.
</p>
</li>
<li>
<p>
Value. It is the component name in the library and the default value
field in schematic.
</p>
</li>
<li>
<p>
Footprint. It is the footprint name used for the board. Not very
useful when using CvPcb to setup the footprint list, but mandatory if
CvPcb is not used.
</p>
</li>
<li>
<p>
Sheet. It is a reserved field, not used at the time of writing.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="component-documentation">12.5. Component documentation</h3>
<div class="paragraph"><p>To edit documentation information, it is necessary to call the main
editing window of the component via the icon
<span class="image">
<img src="images/icons/part_properties.png" alt="icons/part_properties_png">
</span>
and to select the document folder.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_description.png" alt="eeschema_libedit_description_png">
</div>
</div>
<div class="paragraph"><p>Be sure to select the right alias, or the root component, because this
documentation is the only characteristic which differs between aliases.
The "Copy Doc" button allows you to copy the documentation information
from the root component towards the currently edited alias.</p></div>
<div class="sect3">
<h4 id="component-keywords">12.5.1. Component keywords</h4>
<div class="paragraph"><p>Keywords allow you to search in a selective way for a component
according to specific selection criteria (function, technological
family, etc.)</p></div>
<div class="paragraph"><p>The Eeschema research tool is not case sensitive. The most current key
words used in the libraries are</p></div>
<div class="ulist"><ul>
<li>
<p>
CMOS TTL for the logic families
</p>
</li>
<li>
<p>
AND2 NOR3 XOR2 INV… for the gates (AND2 = 2 inputs AND gate, NOR3 = 3
inputs NOR gate).
</p>
</li>
<li>
<p>
JKFF DFF… for JK or D flip-flop.
</p>
</li>
<li>
<p>
ADC, DAC, MUX…
</p>
</li>
<li>
<p>
OpenCol for the gates with open collector output. Thus if in the
schematic capture software, you search the component: by keys words
NAND2 OpenCol Eeschema will display the list of components having these
2 key words.
</p>
</li>
</ul></div>
</div>
<div class="sect3">
<h4 id="component-documentation-doc">12.5.2. Component documentation (Doc)</h4>
<div class="paragraph"><p>The line of comment (and keywords) is displayed in various menus,
particularly when you select a component in the displayed components
list of a library and in the ViewLib menu.</p></div>
<div class="paragraph"><p>If this Doc. file exists, it is also accessible in the schematic capture
software, in the pop-up menu displayed by right-clicking on the
component.</p></div>
</div>
<div class="sect3">
<h4 id="associated-documentation-file-docfilename">12.5.3. Associated documentation file (DocFileName)</h4>
<div class="paragraph"><p>Indicates an attached file (documentation, application schematic)
available ( pdf file, schematic diagram, etc.).</p></div>
</div>
<div class="sect3">
<h4 id="footprint-filtering-for-cvpcb">12.5.4. Footprint filtering for CvPcb</h4>
<div class="paragraph"><p>You can enter a list of allowed footprints for the component. This list
acts as a filter used by CvPcb to display only the allowed footprints. A
void list does not filter anything.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_libedit_footprint.png" alt="eeschema_libedit_footprint_png">
</div>
</div>
<div class="paragraph"><p>Wild-card characters are allowed.</p></div>
<div class="paragraph"><p>S014* allows CvPcb to show all the footprints with a name starting by
SO14.</p></div>
<div class="paragraph"><p>For a resistor, R? shows all the footprints with a 2 letters name
starting by R.</p></div>
<div class="paragraph"><p>Here are samples: with and without filtering</p></div>
<div class="paragraph"><p>With filtering</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_cvpcb_with_filtering.png" alt="eeschema_cvpcb_with_filtering_png">
</div>
</div>
<div class="paragraph"><p>Without filtering</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_cvpcb_without_filtering.png" alt="eeschema_cvpcb_without_filtering_png">
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="symbol-library">12.6. Symbol library</h3>
<div class="paragraph"><p>You can easily compile a graphic symbols library file containing
frequently used symbols. This can be used for the creation of components
(triangles, the shape of AND, OR, Exclusive OR gates, etc.) for saving
and subsequent re-use.</p></div>
<div class="paragraph"><p>These files are stored by default in the library directory and have a
<em>.sym</em> extension. The symbols are not gathered in libraries like the
components because they are generally not so many.</p></div>
<div class="sect3">
<h4 id="export-or-create-a-symbol">12.6.1. Export or create a symbol</h4>
<div class="paragraph"><p>A component can be exported as a symbol with the button
<span class="image">
<img src="images/icons/import.png" alt="icons/import_png">
</span>.
You can generally create only one graphic, also it will be a good idea
to delete all pins, if they exist.</p></div>
</div>
<div class="sect3">
<h4 id="import-a-symbol">12.6.2. Import a symbol</h4>
<div class="paragraph"><p>Importing allows you to add graphics to a component you are editing. A
symbol is imported with the button
<span class="image">
<img src="images/icons/import.png" alt="Import graphic icon">
</span>.
Imported graphics are added as they were created in existing graphics.</p></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="viewlib">13. Viewlib</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_introduction_5">13.1. Introduction</h3>
<div class="paragraph"><p>Viewlib allows you to quickly examine the content of libraries. Viewlib
is called by the tool
<span class="image">
<img src="images/icons/library_browse.png" alt="icons/library_browse_png">
</span>
or by the "place component" tool available from the right-hand side
toolbar.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_viewlib_choose.png" alt="eeschema_viewlib_choose_png">
</div>
</div>
</div>
<div class="sect2">
<h3 id="viewlib---main-screen">13.2. Viewlib - main screen</h3>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_viewlib_select_library.png" alt="eeschema_viewlib_select_library_png">
</div>
</div>
<div class="paragraph"><p>To examine the library content you need to select the wanted library
from the list on the left-hand side. Available components will then
appear in the second list which allow you to select a component.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_viewlib_select_component.png" alt="eeschema_viewlib_select_component_png">
</div>
</div>
</div>
<div class="sect2">
<h3 id="viewlib-top-toolbar">13.3. Viewlib top toolbar</h3>
<div class="paragraph"><p>The top tool bar in Viewlib is shown below.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/toolbar_viewlib.png" alt="images/toolbar_viewlib.png">
</div>
</div>
<div class="paragraph"><p>The available commands are.</p></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:20%;">
<col style="width:80%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/library.png" alt="icons/library_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the desired library which can be also selected in the
displayed list.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/add_component.png" alt="icons/add_component_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the component which can be also selected in the displayed
list.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/lib_previous.png" alt="icons/lib_previous_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Display previous component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/lib_next.png" alt="icons/lib_next_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Display next component.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/zoom_in.png" alt="images/icons/zoom_in.png">
</span> <span class="image">
<img src="images/icons/zoom_out.png" alt="images/icons/zoom_out.png">
</span>
<span class="image">
<img src="images/icons/zoom_redraw.png" alt="images/icons/zoom_redraw.png">
</span> <span class="image">
<img src="images/icons/zoom_fit_in_page.png" alt="images/icons/zoom_fit_in_page.png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Zoom tools.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/morgan1.png" alt="images/icons/morgan1.png">
</span> <span class="image">
<img src="images/icons/morgan2.png" alt="images/icons/morgan2.png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the representation (normal or converted) if exist.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/toolbar_viewlib_part.png" alt="images/toolbar_viewlib_part.png" width="70%">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Selection of the part, only for multi-part components.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/datasheet.png" alt="icons/datasheet_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">If it exist, display the associated documents. Exists only when called
by the place component dialog frame from Eeschema.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="image">
<img src="images/icons/export.png" alt="icons/export_png">
</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Close Viewlib and place the selected component in Eeschema.
This icon is only displayed when Viewlib has been called from Eeschema (click on a symbol in the component chooser).</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="creating-customized-netlists-and-bom-files">14. Creating Customized Netlists and BOM Files</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="intermediate-netlist-file">14.1. Intermediate Netlist File</h3>
<div class="paragraph"><p>BOM files and netlist files can be converted from an Intermediate
netlist file created by Eeschema.</p></div>
<div class="paragraph"><p>This file uses XML syntax and is called the intermediate netlist. The
intermediate netlist includes a large amount of data about your board
and because of this, it can be used with post-processing to create a BOM
or other reports.</p></div>
<div class="paragraph"><p>Depending on the output (BOM or netlist), different subsets of the
complete Intermediate Netlist file will be used in the post-processing.</p></div>
<div class="sect3">
<h4 id="schematic-sample">14.1.1. Schematic sample</h4>
<div class="imageblock">
<div class="content">
<img src="images/schematic-sample.png" alt="Schematic sample">
</div>
</div>
</div>
<div class="sect3">
<h4 id="the-intermediate-netlist-file-sample">14.1.2. The Intermediate Netlist file sample</h4>
<div class="paragraph"><p>The corresponding intermediate netlist (using XML syntax) of the circuit
above is shown below.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><?xml version="1.0" encoding="utf-8"?>
<export version="D">
<design>
<source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
<date>29/08/2010 20:35:21</date>
<tool>eeschema (2010-08-28 BZR 2458)-unstable</tool>
</design>
<components>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2141</tstamp>
</comp>
<comp ref="U2">
<value>74LS74</value>
<libsource lib="74xx" part="74LS74"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E20BA</tstamp>
</comp>
<comp ref="U1">
<value>74LS04</value>
<libsource lib="74xx" part="74LS04"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E20A6</tstamp>
</comp>
<comp ref="C1">
<value>CP</value>
<libsource lib="device" part="CP"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2094</tstamp>
</comp>
<comp ref="R1">
<value>R</value>
<libsource lib="device" part="R"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E208A</tstamp>
</comp>
</components>
<libparts>
<libpart lib="device" part="C">
<description>Condensateur non polarise</description>
<footprints>
<fp>SM*</fp>
<fp>C?</fp>
<fp>C1-1</fp>
</footprints>
<fields>
<field name="Reference">C</field>
<field name="Value">C</field>
</fields>
<pins>
<pin num="1" name="~" type="passive"/>
<pin num="2" name="~" type="passive"/>
</pins>
</libpart>
<libpart lib="device" part="R">
<description>Resistance</description>
<footprints>
<fp>R?</fp>
<fp>SM0603</fp>
<fp>SM0805</fp>
<fp>R?-*</fp>
<fp>SM1206</fp>
</footprints>
<fields>
<field name="Reference">R</field>
<field name="Value">R</field>
</fields>
<pins>
<pin num="1" name="~" type="passive"/>
<pin num="2" name="~" type="passive"/>
</pins>
</libpart>
<libpart lib="conn" part="CONN_4">
<description>Symbole general de connecteur</description>
<fields>
<field name="Reference">P</field>
<field name="Value">CONN_4</field>
</fields>
<pins>
<pin num="1" name="P1" type="passive"/>
<pin num="2" name="P2" type="passive"/>
<pin num="3" name="P3" type="passive"/>
<pin num="4" name="P4" type="passive"/>
</pins>
</libpart>
<libpart lib="74xx" part="74LS04">
<description>Hex Inverseur</description>
<fields>
<field name="Reference">U</field>
<field name="Value">74LS04</field>
</fields>
<pins>
<pin num="1" name="~" type="input"/>
<pin num="2" name="~" type="output"/>
<pin num="3" name="~" type="input"/>
<pin num="4" name="~" type="output"/>
<pin num="5" name="~" type="input"/>
<pin num="6" name="~" type="output"/>
<pin num="7" name="GND" type="power_in"/>
<pin num="8" name="~" type="output"/>
<pin num="9" name="~" type="input"/>
<pin num="10" name="~" type="output"/>
<pin num="11" name="~" type="input"/>
<pin num="12" name="~" type="output"/>
<pin num="13" name="~" type="input"/>
<pin num="14" name="VCC" type="power_in"/>
</pins>
</libpart>
<libpart lib="74xx" part="74LS74">
<description>Dual D FlipFlop, Set &amp; Reset</description>
<docs>74xx/74hc_hct74.pdf</docs>
<fields>
<field name="Reference">U</field>
<field name="Value">74LS74</field>
</fields>
<pins>
<pin num="1" name="Cd" type="input"/>
<pin num="2" name="D" type="input"/>
<pin num="3" name="Cp" type="input"/>
<pin num="4" name="Sd" type="input"/>
<pin num="5" name="Q" type="output"/>
<pin num="6" name="~Q" type="output"/>
<pin num="7" name="GND" type="power_in"/>
<pin num="8" name="~Q" type="output"/>
<pin num="9" name="Q" type="output"/>
<pin num="10" name="Sd" type="input"/>
<pin num="11" name="Cp" type="input"/>
<pin num="12" name="D" type="input"/>
<pin num="13" name="Cd" type="input"/>
<pin num="14" name="VCC" type="power_in"/>
</pins>
</libpart>
</libparts>
<libraries>
<library logical="device">
<uri>F:\kicad\share\library\device.lib</uri>
</library>
<library logical="conn">
<uri>F:\kicad\share\library\conn.lib</uri>
</library>
<library logical="74xx">
<uri>F:\kicad\share\library\74xx.lib</uri>
</library>
</libraries>
<nets>
<net code="1" name="GND">
<node ref="U1" pin="7"/>
<node ref="C1" pin="2"/>
<node ref="U2" pin="7"/>
<node ref="P1" pin="4"/>
</net>
<net code="2" name="VCC">
<node ref="R1" pin="1"/>
<node ref="U1" pin="14"/>
<node ref="U2" pin="4"/>
<node ref="U2" pin="1"/>
<node ref="U2" pin="14"/>
<node ref="P1" pin="1"/>
</net>
<net code="3" name="">
<node ref="U2" pin="6"/>
</net>
<net code="4" name="">
<node ref="U1" pin="2"/>
<node ref="U2" pin="3"/>
</net>
<net code="5" name="/SIG_OUT">
<node ref="P1" pin="2"/>
<node ref="U2" pin="5"/>
<node ref="U2" pin="2"/>
</net>
<net code="6" name="/CLOCK_IN">
<node ref="R1" pin="2"/>
<node ref="C1" pin="1"/>
<node ref="U1" pin="1"/>
<node ref="P1" pin="3"/>
</net>
</nets>
</export></pre>
</div></div>
</div>
</div>
<div class="sect2">
<h3 id="conversion-to-a-new-netlist-format">14.2. Conversion to a new netlist format</h3>
<div class="paragraph"><p>By applying a post-processing filter to the Intermediate netlist file
you can generate foreign netlist files as well as BOM files. Because
this conversion is a text to text transformation, this post-processing
filter can be written using Python, XSLT, or any other tool capable of
taking XML as input.</p></div>
<div class="paragraph"><p>XSLT itself is a an XML language very suitable for XML transformations.
There is a free program called <em>xsltproc</em> that you can download and
install. The xsltproc program can be used to read the Intermediate XML
netlist input file, apply a style-sheet to transform the input, and save
the results in an output file. Use of xsltproc requires a style-sheet
file using XSLT conventions. The full conversion process is handled by
Eeschema, after it is configured once to run xsltproc in a specific way.</p></div>
</div>
<div class="sect2">
<h3 id="xslt-approach">14.3. XSLT approach</h3>
<div class="paragraph"><p>The document that describes XSL Transformations (XSLT) is available
here:</p></div>
<div class="paragraph"><p><strong>http://www.w3.org/TR/xslt</strong></p></div>
<div class="sect3">
<h4 id="create-a-pads-pcb-netlist-file">14.3.1. Create a Pads-Pcb netlist file</h4>
<div class="paragraph"><p>The pads-pcb format is comprised of two sections.</p></div>
<div class="ulist"><ul>
<li>
<p>
The footprint list.
</p>
</li>
<li>
<p>
The Nets list: grouping pads references by nets.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Immediately below is a style-sheet which converts the Intermediate
Netlist file to a pads-pcb netlist format:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to PADS netlist format
Copyright (C) 2010, SoftPLC Corporation.
GPL v2.
How to use:
https://lists.launchpad.net/kicad-developers/msg05157.html
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF -->
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="/export">
<xsl:text>*PADS-PCB*&nl;*PART*&nl;</xsl:text>
<xsl:apply-templates select="components/comp"/>
<xsl:text>&nl;*NET*&nl;</xsl:text>
<xsl:apply-templates select="nets/net"/>
<xsl:text>*END*&nl;</xsl:text>
</xsl:template>
<!-- for each component -->
<xsl:template match="comp">
<xsl:text> </xsl:text>
<xsl:value-of select="@ref"/>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test = "footprint != '' ">
<xsl:apply-templates select="footprint"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>unknown</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&nl;</xsl:text>
</xsl:template>
<!-- for each net -->
<xsl:template match="net">
<!-- nets are output only if there is more than one pin in net -->
<xsl:if test="count(node)>1">
<xsl:text>*SIGNAL* </xsl:text>
<xsl:choose>
<xsl:when test = "@name != '' ">
<xsl:value-of select="@name"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>N-</xsl:text>
<xsl:value-of select="@code"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&nl;</xsl:text>
<xsl:apply-templates select="node"/>
</xsl:if>
</xsl:template>
<!-- for each node -->
<xsl:template match="node">
<xsl:text> </xsl:text>
<xsl:value-of select="@ref"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="@pin"/>
<xsl:text>&nl;</xsl:text>
</xsl:template>
</xsl:stylesheet></pre>
</div></div>
<div class="paragraph"><p>And here is the pads-pcb output file after running xsltproc:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>*PADS-PCB*
*PART*
P1 unknown
U2 unknown
U1 unknown
C1 unknown
R1 unknown
*NET*
*SIGNAL* GND
U1.7
C1.2
U2.7
P1.4
*SIGNAL* VCC
R1.1
U1.14
U2.4
U2.1
U2.14
P1.1
*SIGNAL* N-4
U1.2
U2.3
*SIGNAL* /SIG_OUT
P1.2
U2.5
U2.2
*SIGNAL* /CLOCK_IN
R1.2
C1.1
U1.1
P1.3
*END*</pre>
</div></div>
<div class="paragraph"><p>The command line to make this conversion is:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>kicad\\bin\\xsltproc.exe -o test.net kicad\\bin\\plugins\\netlist_form_pads-pcb.xsl test.tmp</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="create-a-cadstar-netlist-file">14.3.2. Create a Cadstar netlist file</h4>
<div class="paragraph"><p>The Cadstar format is comprised of two sections.</p></div>
<div class="ulist"><ul>
<li>
<p>
The footprint list.
</p>
</li>
<li>
<p>
The Nets list: grouping pads references by nets.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Here is the style-sheet file to make this specific conversion:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
Copyright (C) 2010, Jean-Pierre Charras.
Copyright (C) 2010, SoftPLC Corporation.
GPL v2.
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF -->
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<!-- Netlist header -->
<xsl:template match="/export">
<xsl:text>.HEA&nl;</xsl:text>
<xsl:apply-templates select="design/date"/> <!-- Generate line .TIM <time> -->
<xsl:apply-templates select="design/tool"/> <!-- Generate line .APP <eeschema version> -->
<xsl:apply-templates select="components/comp"/> <!-- Generate list of components -->
<xsl:text>&nl;&nl;</xsl:text>
<xsl:apply-templates select="nets/net"/> <!-- Generate list of nets and connections -->
<xsl:text>&nl;.END&nl;</xsl:text>
</xsl:template>
<!-- Generate line .TIM 20/08/2010 10:45:33 -->
<xsl:template match="tool">
<xsl:text>.APP "</xsl:text>
<xsl:apply-templates/>
<xsl:text>"&nl;</xsl:text>
</xsl:template>
<!-- Generate line .APP "eeschema (2010-08-17 BZR 2450)-unstable" -->
<xsl:template match="date">
<xsl:text>.TIM </xsl:text>
<xsl:apply-templates/>
<xsl:text>&nl;</xsl:text>
</xsl:template>
<!-- for each component -->
<xsl:template match="comp">
<xsl:text>.ADD_COM </xsl:text>
<xsl:value-of select="@ref"/>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test = "value != '' ">
<xsl:text>"</xsl:text> <xsl:apply-templates select="value"/> <xsl:text>"</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>""</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&nl;</xsl:text>
</xsl:template>
<!-- for each net -->
<xsl:template match="net">
<!-- nets are output only if there is more than one pin in net -->
<xsl:if test="count(node)>1">
<xsl:variable name="netname">
<xsl:text>"</xsl:text>
<xsl:choose>
<xsl:when test = "@name != '' ">
<xsl:value-of select="@name"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>N-</xsl:text>
<xsl:value-of select="@code"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>"&nl;</xsl:text>
</xsl:variable>
<xsl:apply-templates select="node" mode="first"/>
<xsl:value-of select="$netname"/>
<xsl:apply-templates select="node" mode="others"/>
</xsl:if>
</xsl:template>
<!-- for each node -->
<xsl:template match="node" mode="first">
<xsl:if test="position()=1">
<xsl:text>.ADD_TER </xsl:text>
<xsl:value-of select="@ref"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="@pin"/>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="node" mode="others">
<xsl:choose>
<xsl:when test='position()=1'>
</xsl:when>
<xsl:when test='position()=2'>
<xsl:text>.TER </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="position()>1">
<xsl:value-of select="@ref"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="@pin"/>
<xsl:text>&nl;</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet></pre>
</div></div>
<div class="paragraph"><p>Here is the Cadstar output file.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>.HEA
.TIM 21/08/2010 08:12:08
.APP "eeschema (2010-08-09 BZR 2439)-unstable"
.ADD_COM P1 "CONN_4"
.ADD_COM U2 "74LS74"
.ADD_COM U1 "74LS04"
.ADD_COM C1 "CP"
.ADD_COM R1 "R"
.ADD_TER U1.7 "GND"
.TER C1.2
U2.7
P1.4
.ADD_TER R1.1 "VCC"
.TER U1.14
U2.4
U2.1
U2.14
P1.1
.ADD_TER U1.2 "N-4"
.TER U2.3
.ADD_TER P1.2 "/SIG_OUT"
.TER U2.5
U2.2
.ADD_TER R1.2 "/CLOCK_IN"
.TER C1.1
U1.1
P1.3
.END</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="create-a-orcadpcb2-netlist-file">14.3.3. Create a OrcadPCB2 netlist file</h4>
<div class="paragraph"><p>This format has only one section which is the footprint list. Each
footprint includes its list of pads with reference to a net.</p></div>
<div class="paragraph"><p>Here is the style-sheet for this specific conversion:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
Copyright (C) 2010, SoftPLC Corporation.
GPL v2.
How to use:
https://lists.launchpad.net/kicad-developers/msg05157.html
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF -->
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<!--
Netlist header
Creates the entire netlist
(can be seen as equivalent to main function in C
-->
<xsl:template match="/export">
<xsl:text>( { Eeschema Netlist Version 1.1 </xsl:text>
<!-- Generate line .TIM <time> -->
<xsl:apply-templates select="design/date"/>
<!-- Generate line eeschema version ... -->
<xsl:apply-templates select="design/tool"/>
<xsl:text>}&nl;</xsl:text>
<!-- Generate the list of components -->
<xsl:apply-templates select="components/comp"/> <!-- Generate list of components -->
<!-- end of file -->
<xsl:text>)&nl;*&nl;</xsl:text>
</xsl:template>
<!--
Generate id in header like "eeschema (2010-08-17 BZR 2450)-unstable"
-->
<xsl:template match="tool">
<xsl:apply-templates/>
</xsl:template>
<!--
Generate date in header like "20/08/2010 10:45:33"
-->
<xsl:template match="date">
<xsl:apply-templates/>
<xsl:text>&nl;</xsl:text>
</xsl:template>
<!--
This template read each component
(path = /export/components/comp)
creates lines:
( 3EBF7DBD $noname U1 74LS125
... pin list ...
)
and calls "create_pin_list" template to build the pin list
-->
<xsl:template match="comp">
<xsl:text> ( </xsl:text>
<xsl:choose>
<xsl:when test = "tstamp != '' ">
<xsl:apply-templates select="tstamp"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test = "footprint != '' ">
<xsl:apply-templates select="footprint"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>$noname</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:value-of select="@ref"/>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test = "value != '' ">
<xsl:apply-templates select="value"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>"~"</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&nl;</xsl:text>
<xsl:call-template name="Search_pin_list" >
<xsl:with-param name="cmplib_id" select="libsource/@part"/>
<xsl:with-param name="cmp_ref" select="@ref"/>
</xsl:call-template>
<xsl:text> )&nl;</xsl:text>
</xsl:template>
<!--
This template search for a given lib component description in list
lib component descriptions are in /export/libparts,
and each description start at ./libpart
We search here for the list of pins of the given component
This template has 2 parameters:
"cmplib_id" (reference in libparts)
"cmp_ref" (schematic reference of the given component)
-->
<xsl:template name="Search_pin_list" >
<xsl:param name="cmplib_id" select="0" />
<xsl:param name="cmp_ref" select="0" />
<xsl:for-each select="/export/libparts/libpart">
<xsl:if test = "@part = $cmplib_id ">
<xsl:apply-templates name="build_pin_list" select="pins/pin">
<xsl:with-param name="cmp_ref" select="$cmp_ref"/>
</xsl:apply-templates>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
This template writes the pin list of a component
from the pin list of the library description
The pin list from library description is something like
<pins>
<pin num="1" type="passive"/>
<pin num="2" type="passive"/>
</pins>
Output pin list is ( <pin num> <net name> )
something like
( 1 VCC )
( 2 GND )
-->
<xsl:template name="build_pin_list" match="pin">
<xsl:param name="cmp_ref" select="0" />
<!-- write pin numner and separator -->
<xsl:text> ( </xsl:text>
<xsl:value-of select="@num"/>
<xsl:text> </xsl:text>
<!-- search net name in nets section and write it: -->
<xsl:variable name="pinNum" select="@num" />
<xsl:for-each select="/export/nets/net">
<!-- net name is output only if there is more than one pin in net
else use "?" as net name, so count items in this net
-->
<xsl:variable name="pinCnt" select="count(node)" />
<xsl:apply-templates name="Search_pin_netname" select="node">
<xsl:with-param name="cmp_ref" select="$cmp_ref"/>
<xsl:with-param name="pin_cnt_in_net" select="$pinCnt"/>
<xsl:with-param name="pin_num"> <xsl:value-of select="$pinNum"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
<!-- close line -->
<xsl:text> )&nl;</xsl:text>
</xsl:template>
<!--
This template writes the pin netname of a given pin of a given component
from the nets list
The nets list description is something like
<nets>
<net code="1" name="GND">
<node ref="J1" pin="20"/>
<node ref="C2" pin="2"/>
</net>
<net code="2" name="">
<node ref="U2" pin="11"/>
</net>
</nets>
This template has 2 parameters:
"cmp_ref" (schematic reference of the given component)
"pin_num" (pin number)
-->
<xsl:template name="Search_pin_netname" match="node">
<xsl:param name="cmp_ref" select="0" />
<xsl:param name="pin_num" select="0" />
<xsl:param name="pin_cnt_in_net" select="0" />
<xsl:if test = "@ref = $cmp_ref ">
<xsl:if test = "@pin = $pin_num">
<!-- net name is output only if there is more than one pin in net
else use "?" as net name
-->
<xsl:if test = "$pin_cnt_in_net>1">
<xsl:choose>
<!-- if a net has a name, use it,
else build a name from its net code
-->
<xsl:when test = "../@name != '' ">
<xsl:value-of select="../@name"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>$N-0</xsl:text><xsl:value-of select="../@code"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test = "$pin_cnt_in_net &lt;2">
<xsl:text>?</xsl:text>
</xsl:if>
</xsl:if>
</xsl:if>
</xsl:template>
</xsl:stylesheet></pre>
</div></div>
<div class="paragraph"><p>Here is the OrcadPCB2 output file.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>( { Eeschema Netlist Version 1.1 29/08/2010 21:07:51
eeschema (2010-08-28 BZR 2458)-unstable}
( 4C6E2141 $noname P1 CONN_4
( 1 VCC )
( 2 /SIG_OUT )
( 3 /CLOCK_IN )
( 4 GND )
)
( 4C6E20BA $noname U2 74LS74
( 1 VCC )
( 2 /SIG_OUT )
( 3 N-04 )
( 4 VCC )
( 5 /SIG_OUT )
( 6 ? )
( 7 GND )
( 14 VCC )
)
( 4C6E20A6 $noname U1 74LS04
( 1 /CLOCK_IN )
( 2 N-04 )
( 7 GND )
( 14 VCC )
)
( 4C6E2094 $noname C1 CP
( 1 /CLOCK_IN )
( 2 GND )
)
( 4C6E208A $noname R1 R
( 1 VCC )
( 2 /CLOCK_IN )
)
)
*</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="eeschema-plugins-interface">14.3.4. Eeschema plugins interface</h4>
<div class="paragraph"><p>Intermediate Netlist converters can be automatically launched within
Eeschema.</p></div>
<div class="sect4">
<h5 id="init-the-dialog-window-1">Init the Dialog window</h5>
<div class="paragraph"><p>One can add a new netlist plug-in user interface tab by clicking on the
Add Plugin button.</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plugin_add_plugin.png" alt="eeschema_plugin_add_plugin_png">
</div>
</div>
<div class="paragraph"><p>Here is what the configuration data for the PadsPcb tab looks like:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/eeschema_plugin_padspcb.png" alt="eeschema_plugin_padspcb_png">
</div>
</div>
</div>
<div class="sect4">
<h5 id="plugin-configuration-parameters">Plugin Configuration Parameters</h5>
<div class="paragraph"><p>The Eeschema plug-in configuration dialog requires the following
information:</p></div>
<div class="ulist"><ul>
<li>
<p>
The title: for instance, the name of the netlist format.
</p>
</li>
<li>
<p>
The command line to launch the converter.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Once you click on the netlist button the following will happen:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Eeschema creates an intermediate netlist file *.xml, for instance test.xml.
</p>
</li>
<li>
<p>
Eeschema runs the plug-in by reading test.xml and creates test.net.
</p>
</li>
</ol></div>
</div>
<div class="sect4">
<h5 id="generate-netlist-files-with-the-command-line">Generate netlist files with the command line</h5>
<div class="paragraph"><p>Assuming we are using the program <em>xsltproc.exe</em> to apply the sheet
style to the intermediate file, <em>xsltproc.exe</em> is executed with the
following command:</p></div>
<div class="paragraph"><p><em>xsltproc.exe -o <output filename> < style-sheet filename> <input XML file to convert></em></p></div>
<div class="paragraph"><p>In KiCad under Windows the command line is the following:</p></div>
<div class="paragraph"><p><em>f:/kicad/bin/xsltproc.exe -o "%O" f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"</em></p></div>
<div class="paragraph"><p>Under Linux the command becomes as follows:</p></div>
<div class="paragraph"><p><em>xsltproc -o "%O" /usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"</em></p></div>
<div class="paragraph"><p>Where <em>netlist_form_pads-pcb.xsl</em> is the style-sheet that you are
applying. Do not forget the double quotes around the file names, this
allows them to have spaces after the substitution by Eeschema.</p></div>
<div class="paragraph"><p>The command line format accepts parameters for filenames:</p></div>
<div class="paragraph"><p>The supported formatting parameters are.</p></div>
<div class="ulist"><ul>
<li>
<p>
%B ⇒ base filename and path of selected output file, minus path and
extension.
</p>
</li>
<li>
<p>
%I ⇒ complete filename and path of the temporary input file (the
intermediate net file).
</p>
</li>
<li>
<p>
%O ⇒ complete filename and path of the user chosen output file.
</p>
</li>
</ul></div>
<div class="paragraph"><p><em>%I</em> will be replaced by the actual intermediate file name</p></div>
<div class="paragraph"><p><em>%O</em> will be replaced by the actual output file name.</p></div>
</div>
<div class="sect4">
<h5 id="command-line-format-example-for-xsltproc">Command line format: example for xsltproc</h5>
<div class="paragraph"><p>The command line format for xsltproc is the following:</p></div>
<div class="paragraph"><p><path of xsltproc> xsltproc <xsltproc parameters></p></div>
<div class="paragraph"><p>under Windows:</p></div>
<div class="paragraph"><p><strong>f:/kicad/bin/xsltproc.exe -o "%O" f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"</strong></p></div>
<div class="paragraph"><p>under Linux:</p></div>
<div class="paragraph"><p><strong>xsltproc -o "%O" /usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"</strong></p></div>
<div class="paragraph"><p>The above examples assume xsltproc is installed on your PC under Windows
and all files located in kicad/bin.</p></div>
</div>
</div>
<div class="sect3">
<h4 id="bill-of-materials-generation">14.3.5. Bill of Materials Generation</h4>
<div class="paragraph"><p>Because the intermediate netlist file contains all information about
used components, a BOM can be extracted from it. Here is the plug-in
setup window (on Linux) to create a customized Bill Of Materials (BOM)
file:</p></div>
<div class="imageblock">
<div class="content">
<img src="images/en/bom-netlist-tab.png" alt="bom-netlist-tab_png">
</div>
</div>
<div class="paragraph"><p>The path to the style sheet bom2csv.xsl is system dependent. The
currently best XSLT style-sheet for BOM generation at this time is
called <em>bom2csv.xsl</em>. You are free to modify it according to your
needs, and if you develop something generally useful, ask that it become
part of the KiCad project.</p></div>
</div>
</div>
<div class="sect2">
<h3 id="command-line-format-example-for-python-scripts">14.4. Command line format: example for python scripts</h3>
<div class="paragraph"><p>The command line format for python is something like:</p></div>
<div class="paragraph"><p>python <script file name> <input filename> <output filename></p></div>
<div class="paragraph"><p>under Windows:</p></div>
<div class="paragraph"><p><strong>python *.exe f:/kicad/python/my_python_script.py "%I" "%O"</strong></p></div>
<div class="paragraph"><p>under Linux:</p></div>
<div class="paragraph"><p><strong>python /usr/local/kicad/python/my_python_script.py "%I" "%O"</strong></p></div>
<div class="paragraph"><p>Assuming python is installed on your PC.</p></div>
</div>
<div class="sect2">
<h3 id="intermediate-netlist-structure">14.5. Intermediate Netlist structure</h3>
<div class="paragraph"><p>This sample gives an idea of the netlist file format.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><?xml version="1.0" encoding="utf-8"?>
<export version="D">
<design>
<source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
<date>29/08/2010 21:07:51</date>
<tool>eeschema (2010-08-28 BZR 2458)-unstable</tool>
</design>
<components>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2141</tstamp>
</comp>
<comp ref="U2">
<value>74LS74</value>
<libsource lib="74xx" part="74LS74"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E20BA</tstamp>
</comp>
<comp ref="U1">
<value>74LS04</value>
<libsource lib="74xx" part="74LS04"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E20A6</tstamp>
</comp>
<comp ref="C1">
<value>CP</value>
<libsource lib="device" part="CP"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2094</tstamp>
<comp ref="R1">
<value>R</value>
<libsource lib="device" part="R"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E208A</tstamp>
</comp>
</components>
<libparts/>
<libraries/>
<nets>
<net code="1" name="GND">
<node ref="U1" pin="7"/>
<node ref="C1" pin="2"/>
<node ref="U2" pin="7"/>
<node ref="P1" pin="4"/>
</net>
<net code="2" name="VCC">
<node ref="R1" pin="1"/>
<node ref="U1" pin="14"/>
<node ref="U2" pin="4"/>
<node ref="U2" pin="1"/>
<node ref="U2" pin="14"/>
<node ref="P1" pin="1"/>
</net>
<net code="3" name="">
<node ref="U2" pin="6"/>
</net>
<net code="4" name="">
<node ref="U1" pin="2"/>
<node ref="U2" pin="3"/>
</net>
<net code="5" name="/SIG_OUT">
<node ref="P1" pin="2"/>
<node ref="U2" pin="5"/>
<node ref="U2" pin="2"/>
</net>
<net code="6" name="/CLOCK_IN">
<node ref="R1" pin="2"/>
<node ref="C1" pin="1"/>
<node ref="U1" pin="1"/>
<node ref="P1" pin="3"/>
</net>
</nets>
</export></pre>
</div></div>
<div class="sect3">
<h4 id="general-netlist-file-structure">14.5.1. General netlist file structure</h4>
<div class="paragraph"><p>The intermediate Netlist accounts for five sections.</p></div>
<div class="ulist"><ul>
<li>
<p>
The header section.
</p>
</li>
<li>
<p>
The components section.
</p>
</li>
<li>
<p>
The lib parts section.
</p>
</li>
<li>
<p>
The libraries section.
</p>
</li>
<li>
<p>
The nets section.
</p>
</li>
</ul></div>
<div class="paragraph"><p>The file content has the delimiter <export></p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><export version="D">
...
</export></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="the-header-section">14.5.2. The header section</h4>
<div class="paragraph"><p>The header has the delimiter <design></p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><design>
<source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
<date>21/08/2010 08:12:08</date>
<tool>eeschema (2010-08-09 BZR 2439)-unstable</tool>
</design></pre>
</div></div>
<div class="paragraph"><p>This section can be considered a comment section.</p></div>
</div>
<div class="sect3">
<h4 id="the-components-section">14.5.3. The components section</h4>
<div class="paragraph"><p>The component section has the delimiter <components></p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><components>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2141</tstamp>
</comp>
</components></pre>
</div></div>
<div class="paragraph"><p>This section contains the list of components in your schematic. Each
component is described like this:</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2141</tstamp>
</comp></pre>
</div></div>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:37%;">
<col style="width:63%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>libsource</strong></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">name of the lib where this component was found.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>part</strong></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">component name inside this library.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>sheetpath</strong></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">path of the sheet inside the hierarchy: identify the sheet
within the full schematic hierarchy.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>tstamps (time stamps)</strong></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">time stamp of the schematic file.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><strong>tstamp (time stamp)</strong></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">time stamp of the component.</p></td>
</tr>
</tbody>
</table>
<div class="sect4">
<h5 id="note-about-time-stamps-for-components">Note about time stamps for components</h5>
<div class="paragraph"><p>To identify a component in a netlist and therefore on a board, the
timestamp reference is used as unique for each component. However KiCad
provides an auxiliary way to identify a component which is the
corresponding footprint on the board. This allows the re-annotation of
components in a schematic project and does not loose the link between
the component and its footprint.</p></div>
<div class="paragraph"><p>A time stamp is an unique identifier for each component or sheet in a
schematic project. However, in complex hierarchies, the same sheet is
used more than once, so this sheet contains components having the same
time stamp.</p></div>
<div class="paragraph"><p>A given sheet inside a complex hierarchy has an unique identifier: its
sheetpath. A given component (inside a complex hierarchy) has an unique
identifier: the sheetpath + its tstamp</p></div>
</div>
</div>
<div class="sect3">
<h4 id="the-libparts-section">14.5.4. The libparts section</h4>
<div class="paragraph"><p>The libparts section has the delimiter <libparts>, and the content of
this section is defined in the schematic libraries. The libparts section
contains</p></div>
<div class="ulist"><ul>
<li>
<p>
The allowed footprints names (names use jokers) delimiter <fp>.
</p>
</li>
<li>
<p>
The fields defined in the library delimiter <fields>.
</p>
</li>
<li>
<p>
The list of pins delimiter <pins>.
</p>
</li>
</ul></div>
<div class="listingblock">
<div class="content monospaced">
<pre><libparts>
<libpart lib="device" part="CP">
<description>Condensateur polarise</description>
<footprints>
<fp>CP*</fp>
<fp>SM*</fp>
</footprints>
<fields>
<field name="Reference">C</field>
<field name="Valeur">CP</field>
</fields>
<pins>
<pin num="1" name="1" type="passive"/>
<pin num="2" name="2" type="passive"/>
</pins>
</libpart>
</libparts></pre>
</div></div>
<div class="paragraph"><p>Lines like <pin num="1" type="passive"/> give also the electrical pin
type. Possible electrical pin types are</p></div>
<table class="tableblock frame-all grid-all"
style="
width:94%;
">
<col style="width:25%;">
<col style="width:75%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Input</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Usual input pin</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Output</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Usual output</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Bidirectional</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Input or Output</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Tri-state</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Bus input/output</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Passive</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Usual ends of passive components</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Unspecified</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Unknown electrical type</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Power input</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Power input of a component</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Power output</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Power output like a regulator output</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open collector</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open collector often found in analog comparators</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open emitter</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Open emitter sometimes found in logic</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Not connected</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">Must be left open in schematic</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="the-libraries-section">14.5.5. The libraries section</h4>
<div class="paragraph"><p>The libraries section has the delimiter <libraries>. This section
contains the list of schematic libraries used in the project.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><libraries>
<library logical="device">
<uri>F:\kicad\share\library\device.lib</uri>
</library>
<library logical="conn">
<uri>F:\kicad\share\library\conn.lib</uri>
</library>
</libraries></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="the-nets-section">14.5.6. The nets section</h4>
<div class="paragraph"><p>The nets section has the delimiter <nets>. This section contains the
"connectivity" of the schematic.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><nets>
<net code="1" name="GND">
<node ref="U1" pin="7"/>
<node ref="C1" pin="2"/>
<node ref="U2" pin="7"/>
<node ref="P1" pin="4"/>
</net>
<net code="2" name="VCC">
<node ref="R1" pin="1"/>
<node ref="U1" pin="14"/>
<node ref="U2" pin="4"/>
<node ref="U2" pin="1"/>
<node ref="U2" pin="14"/>
<node ref="P1" pin="1"/>
</net>
</nets></pre>
</div></div>
<div class="paragraph"><p>This section lists all nets in the schematic.</p></div>
<div class="paragraph"><p>A possible net contains the following.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre><net code="1" name="GND">
<node ref="U1" pin="7"/>
<node ref="C1" pin="2"/>
<node ref="U2" pin="7"/>
<node ref="P1" pin="4"/>
</net></pre>
</div></div>
<table class="tableblock frame-all grid-all"
style="
width:77%;
">
<col style="width:20%;">
<col style="width:80%;">
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">net code</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">is an internal identifier for this net</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">name</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">is a name for this net</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock">node</p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock">give a pin reference connected to this net</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="more-about-xsltproc">14.6. More about xsltproc</h3>
<div class="paragraph"><p>Refer to the page: <em>http://xmlsoft.org/XSLT/xsltproc.html</em></p></div>
<div class="sect3">
<h4 id="introduction-7">14.6.1. Introduction</h4>
<div class="paragraph"><p>xsltproc is a command line tool for applying XSLT style-sheets to XML
documents. While it was developed as part of the GNOME project, it can
operate independently of the GNOME desktop.</p></div>
<div class="paragraph"><p>xsltproc is invoked from the command line with the name of the
style-sheet to be used followed by the name of the file or files to
which the style-sheet is to be applied. It will use the standard input
if a filename provided is - .</p></div>
<div class="paragraph"><p>If a style-sheet is included in an XML document with a Style-sheet
Processing Instruction, no style-sheet needs to be named in the command
line. xsltproc will automatically detect the included style-sheet and
use it. By default, the output is to <em>stdout</em>. You can specify a file
for output using the -o option.</p></div>
</div>
<div class="sect3">
<h4 id="synopsis">14.6.2. Synopsis</h4>
<div class="listingblock">
<div class="content monospaced">
<pre>xsltproc [[-V] | [-v] | [-o *file* ] | [--timing] | [--repeat] |
[--debug] | [--novalid] | [--noout] | [--maxdepth *val* ] | [--html] |
[--param *name* *value* ] | [--stringparam *name* *value* ] | [--nonet] |
[--path *paths* ] | [--load-trace] | [--catalogs] | [--xinclude] |
[--profile] | [--dumpextensions] | [--nowrite] | [--nomkdir] |
[--writesubtree] | [--nodtdattr]] [ *stylesheet* ] [ *file1* ] [ *file2* ]
[ *....* ]</pre>
</div></div>
</div>
<div class="sect3">
<h4 id="command-line-options">14.6.3. Command line options</h4>
<div class="paragraph"><p><em>-V</em> or <em>--version</em></p></div>
<div class="paragraph"><p>Show the version of libxml and libxslt used.</p></div>
<div class="paragraph"><p><em>-v</em> or <em>--verbose</em></p></div>
<div class="paragraph"><p>Output each step taken by xsltproc in processing the stylesheet and the
document.</p></div>
<div class="paragraph"><p><em>-o</em> or <em>--output file</em></p></div>
<div class="paragraph"><p>Direct output to the file named <em>file</em>. For multiple outputs, also
known as “chunking”, -o directory/ directs the output files to a
specified directory. The directory must already exist.</p></div>
<div class="paragraph"><p><em>--timing</em></p></div>
<div class="paragraph"><p>Display the time used for parsing the stylesheet, parsing the document
and applying the stylesheet and saving the result. Displayed in
milliseconds.</p></div>
<div class="paragraph"><p><em>--repeat</em></p></div>
<div class="paragraph"><p>Run the transformation 20 times. Used for timing tests.</p></div>
<div class="paragraph"><p><em>--debug</em></p></div>
<div class="paragraph"><p>Output an XML tree of the transformed document for debugging purposes.</p></div>
<div class="paragraph"><p><em>--novalid</em></p></div>
<div class="paragraph"><p>Skip loading the document’s DTD.</p></div>
<div class="paragraph"><p><em>--noout</em></p></div>
<div class="paragraph"><p>Do not output the result.</p></div>
<div class="paragraph"><p><em>--maxdepth value</em></p></div>
<div class="paragraph"><p>Adjust the maximum depth of the template stack before libxslt concludes
it is in an infinite loop. The default is 500.</p></div>
<div class="paragraph"><p><em>--html</em></p></div>
<div class="paragraph"><p>The input document is an HTML file.</p></div>
<div class="paragraph"><p><em>--param name value</em></p></div>
<div class="paragraph"><p>Pass a parameter of name <em>name</em> and value <em>value</em> to the stylesheet. You
may pass multiple name/value pairs up to a maximum of 32. If the value
being passed is a string rather than a node identifier, use
--stringparam instead.</p></div>
<div class="paragraph"><p><em>--stringparam name value</em></p></div>
<div class="paragraph"><p>Pass a paramenter of name <em>name</em> and value <em>value</em> where <em>value</em> is a
string rather than a node identifier. (Note: The string must be utf-8.)</p></div>
<div class="paragraph"><p><em>--nonet</em></p></div>
<div class="paragraph"><p>Do not use the Internet to fetch DTD’s, entities or documents.</p></div>
<div class="paragraph"><p><em>--path paths</em></p></div>
<div class="paragraph"><p>Use the list (separated by space or colon) of filesystem paths
specified by <em>paths</em> to load DTDs, entities or documents.
Enclose space-separated lists by quotation marks.</p></div>
<div class="paragraph"><p><em>--load-trace</em></p></div>
<div class="paragraph"><p>Display to stderr all the documents loaded during the processing.</p></div>
<div class="paragraph"><p><em>--catalogs</em></p></div>
<div class="paragraph"><p>Use the SGML catalog specified in SGML_CATALOG_FILES to resolve the
location of external entities. By default, xsltproc looks for the
catalog specified in XML_CATALOG_FILES. If that is not specified, it
uses /etc/xml/catalog.</p></div>
<div class="paragraph"><p><em>--xinclude</em></p></div>
<div class="paragraph"><p>Process the input document using the Xinclude specification. More
details on this can be found in the Xinclude specification:
<a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></p></div>
<div class="paragraph"><p><em>--profile --norman</em></p></div>
<div class="paragraph"><p>Output profiling information detailing the amount of time spent in each
part of the stylesheet. This is useful in optimizing stylesheet
performance.</p></div>
<div class="paragraph"><p><em>--dumpextensions</em></p></div>
<div class="paragraph"><p>Dumps the list of all registered extensions to stdout.</p></div>
<div class="paragraph"><p><em>--nowrite</em></p></div>
<div class="paragraph"><p>Refuses to write to any file or resource.</p></div>
<div class="paragraph"><p><em>--nomkdir</em></p></div>
<div class="paragraph"><p>Refuses to create directories.</p></div>
<div class="paragraph"><p><em>--writesubtree path</em></p></div>
<div class="paragraph"><p>Allow file write only within the <em>path</em> subtree.</p></div>
<div class="paragraph"><p><em>--nodtdattr</em></p></div>
<div class="paragraph"><p>Do not apply default attributes from the document’s DTD.</p></div>
</div>
<div class="sect3">
<h4 id="xsltproc-return-values">14.6.4. Xsltproc return values</h4>
<div class="paragraph"><p>xsltproc returns a status number that can be quite useful when calling
it within a script.</p></div>
<div class="paragraph"><p>0: normal</p></div>
<div class="paragraph"><p>1: no argument</p></div>
<div class="paragraph"><p>2: too many parameters</p></div>
<div class="paragraph"><p>3: unknown option</p></div>
<div class="paragraph"><p>4: failed to parse the stylesheet</p></div>
<div class="paragraph"><p>5: error in the stylesheet</p></div>
<div class="paragraph"><p>6: error in one of the documents</p></div>
<div class="paragraph"><p>7: unsupported xsl:output method</p></div>
<div class="paragraph"><p>8: string parameter contains both quote and double-quotes</p></div>
<div class="paragraph"><p>9: internal processing error</p></div>
<div class="paragraph"><p>10: processing was stopped by a terminating message</p></div>
<div class="paragraph"><p>11: could not write the result to the output file</p></div>
</div>
<div class="sect3">
<h4 id="more-information-about-xsltproc">14.6.5. More Information about xsltproc</h4>
<div class="paragraph"><p>libxml web page: <a href="http://www.xmlsoft.org/">http://www.xmlsoft.org/</a></p></div>
<div class="paragraph"><p>W3C XSLT page: <a href="http://www.w3.org/TR/xslt">http://www.w3.org/TR/xslt</a></p></div>
</div>
</div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
Last updated 2017-08-24 22:02:49 BST
</div>
</div>
</body>
</html>
|