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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd">
<article lang="ja">
<title>Auto Multiple Choice</title>
<articleinfo>
<title>Auto Multiple Choice</title>
<subtitle>自動採点と評定の可能な選択式試験問題のデザイン</subtitle>
<date>@/PACKAGE_V_ISODATE/@</date>
<abstract>
<para>AMCは、プレーンテキストあるいはLaTeXで記述されたマークシート方式の選択式試験問題を使用して、答案用紙のスキャン画像からのOMR(光学マーク認識)により自動採点と評定のできるユーティリティ群です。この文書はその使用説明書です。(バージョン@/PACKAGE_V_DEB/@~@/PACKAGE_V_VC/@)</para>
<para>AMCのWebサイトは<ulink
url="https://www.auto-multiple-choice.net/">https://www.auto-multiple-cho
ice.net/</ulink>にあり、ソースコードは<ulink
url="https://gitlab.com/jojo_boulix/auto-multiple-choice/">https://gitlab
.com/jojo_boulix/auto-multiple-choice/</ulink>にあります。</para>
</abstract>
<author>
<firstname>Alexis</firstname>
<affiliation>
<address><email>paamc@passoire.fr</email></address>
</affiliation>
<surname>Bienvenue</surname>
<contrib>主な著者</contrib>
</author>
<author>
<firstname>Anirvan</firstname>
<surname>Sarkar</surname>
<contrib>著者・編集者</contrib>
</author>
<author>
<firstname>Hiroto</firstname>
<surname>Kagotani</surname>
<contrib>編集者</contrib>
</author>
<author>
<firstname>Frédéric</firstname>
<surname>Bréal</surname>
<contrib>著者・編集者</contrib>
</author>
<copyright>
<year>2008-2018</year>
<holder>Alexis Bienvenüe</holder>
</copyright>
<othercredit class="translator">
<surname>Bérard</surname>
<firstname>Jean</firstname>
<contrib>フランス語版から英語版への翻訳</contrib>
</othercredit>
<othercredit class="translator">
<surname>Khaznadar</surname>
<firstname>Georges</firstname>
<contrib>フランス語版から英語版への翻訳</contrib>
</othercredit>
<othercredit class="translator">
<surname>Kagotani</surname>
<firstname>Hiroto</firstname>
<contrib>英語版から日本語版への翻訳</contrib>
</othercredit>
<legalnotice>
<para>この文書はGNU一般公衆利用許諾書バージョン2またはそれ以降に従って利用することができます。</para>
</legalnotice>
</articleinfo>
<sect1 id="license">
<title>ライセンス</title>
<para>Auto Multiple Choiceはフリーソフトウェアです。あなたはこれを、フリーソフトウェア財団によって発行されたGNU一般公衆利用許諾書バージョン2か、(希望によっては)それ以降のバージョンのいずれかの定める条件の下で再頒布または改変することができます。</para>
<para>このプログラムは有用であることを願って頒布されますが、*全くの無保証* です。商業可能性の保証や特定の目的への適合性は、言外に示されたものも含め全く存在しません。詳しくはGNU一般公衆利用許諾書をご覧ください。あなたはこのプログラムと共に、GNU一般公衆利用許諾書の複製物を1部受け取ったはずです。もし受け取っていなければ、<ulink url="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</ulink>をご覧ください。</para>
</sect1>
<sect1 id="prerequis">
<title>必要条件</title>
<sect2 id="prerequis.os">
<title>オペレーティングシステム</title>
<para>AMCユーティリティはLinux用に開発されています。MAC OS XにもMacPortsを用いてインストールすることができます。</para>
</sect2>
<sect2 id="prerequis.soft">
<title>ソフトウェア</title>
<note>
<para>AMCをdebあるいはRPMパッケージを用いて(debian、Ubuntuとその派生、Mandriva、openSUSE、Fedora上で)インストールすれば、AMCに必要なソフトウェアはすべて自動的にインストールされます。</para>
</note>
<para>AMCを用いるのに不可欠となる主要なパッケージあるいはソフトウェアは次のとおりです。</para>
<itemizedlist>
<listitem>
<para>LaTeX</para>
</listitem>
<listitem>
<para>画像処理ライブラリImageMagickとOpenCV</para>
</listitem>
<listitem>
<para>Perl<indexterm><primary>Perl</primary></indexterm>(GUI用にGtk2-PerlとGlade::XMLを含む)</para>
</listitem>
</itemizedlist>
<sect3 id="prerequis.soft.v">
<title>AMCで用いるソフトウェアの推奨バージョン</title>
<para>AMCで用いるソフトウェアのバージョンが古いと、そのバグにより正常な動作の妨げになるものがあります。</para>
<itemizedlist>
<listitem>
<para><package>Net::CUPS</package>(debianパッケージ<package>libnet-cups-perl</package>)の古いバージョンを用いると、試験問題用紙の印刷のコマンドによって、AMCのGUIが異常終了してしまいます。このバグは<package>Net::CUPS</package>のバージョン0.61以降で修正されています。</para>
</listitem>
<listitem>
<para>ImageMagickの古いバージョンを用いると、採点記入済の答案を受験者ごとにPDFファイルにまとめる機能が、複数ページの答案の場合に動作しません。このバグはImageMagickのバージョン6.5.5以降で修正されています。</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2 id="prerequis.latex">
<title>LaTeX</title>
<para>AMCのバージョン1.1からは、試験問題をLaTeX言語で記述することは必須ではなくなりました(プレーンテキストでの代替文法については<xref linkend="AMC-TXT"/>を参照)。しかし、LaTeXは試験問題を記述するためのネイティブなAMC言語であり、比べものにならない自由度で試験問題をデザインすることができます。LaTeX形式に抵抗のある人でも、用意されたテンプレートで自分の選択式試験問題をすぐに書き始められます。</para>
</sect2>
</sect1>
<sect1 id="usagenotes">
<title>利用メモ</title>
<sect2 id="num.limits">
<title>数値的な限界</title>
<para>(0.156以降の)現在までのバージョンでは、試験あたりの受験者数は4,095人まで、試験あたりの(受験者ごとの)ページ数は63ページまでに限定されています(これらのデフォルト値は変更可能です。<xref endterm="binary.code.title" linkend="binary.code"/>参照)。</para>
<para>設問ごとの選択肢数は199個までに限定されています(このデフォルト値は変更できません)。</para>
<para>LaTeX自体の限界でコンパイルができないことがあり、例えば、「<errortext>No room for a new \toks</errortext>」というエラーが出ます。この場合、<code>\usepackage{etex}</code>コマンドにより<package>etex</package>パッケージを試してみてください。</para>
</sect2>
<sect2 id="versions">
<title>バージョン</title>
<para>問題が出ることは多くはありませんが、あるプロジェクトを実施している間(試験問題用紙を印刷してから採点して成績をつけ終わるまでの期間)はプログラムのバージョンを変更しないことをお勧めします。何らかのプロジェクトを実施している最中に適用してしまうと、AMCの正常な動作に干渉してしまうような修正がいくつかあります。</para>
<itemizedlist>
<listitem>
<para>バージョン0.155以前のAMCでコンパイル・印刷を行った後、バージョン0.156以降でそのプロジェクトを扱う場合、LaTeXファイルの<package>automultiplechoice</package>パッケージを読み込んでいる部分で、次のように<option>versionA</option>オプションを付けてください。</para>
<programlisting>\usepackage[box,completemulti,versionA]{automultiplechoice}</programlisting>
</listitem>
<listitem>
<para>バージョン0.262以降、チェックボックスの描画が若干大きくなりました。このせいで試験問題用紙のレイアウトが変わってしまう可能性があります。</para>
</listitem>
<listitem>
<para>バージョン0.267以降、A4版の試験問題用紙を作成したい場合は、LaTeXファイルで次のように明示的に指定する必要があります。
</para>
<programlisting>\documentclass[a4paper]{article}</programlisting>
</listitem>
<listitem>
<para>バージョン0.394以降、<package>graphicx</package>パッケージが必要な場合は明示的にロードする必要があります(それより前のバージョンでは、AMCによってロードされていました)。</para>
</listitem>
<listitem>
<para>LaTeXの<command>\AMCcode</command>コマンドはバージョン0.5.18で書き直されました。これによってより堅牢になり設定を柔軟に変更しやすくなりましたが、旧バージョン用に書かれたLaTeXのソースで同じレイアウトを得るためには修正する必要があります。</para>
</listitem>
<listitem>
<para>バージョン1.1.0より、AMCの全データは多数のXMLファイルではなくSQLiteデータベースに格納されます。プロジェクトを最初に開いたときに、古いXMLファイルが新しい形式に変換されます。</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="install">
<title>インストール</title>
<para>debian、Ubuntuあるいはその派生OSでは、debian公式リポジトリとubuntu AMCリポジトリを用いることができます。Mandriva、openSUSE、Fedoraでは、ビルド済のRPMパッケージを用いることができます。インストール手順は<ulink url="http://auto-multiple-choice.net/download">AMCウェブサイト</ulink>で説明されています。</para>
<para>ソースコードのアーカイブは、プロジェクトの<ulink url="http://download.auto-multiple-choice.net/">ダウンロードエリア</ulink>でダウンロードでき、その場合は端末上で次のコマンドを使ってください。</para>
<screen>tar xvzf auto-multiple-choice_xxxx_dist.tar.gz
cd auto-multiple-choice-xxx
make
sudo make install</screen>
</sect2>
<sect2 id="launch">
<title>起動</title>
<para>インストールが完了したら、Gnomeの一般メニュー(あるいは、KDEなどの対応するメニュー)から<menuchoice><guimenu>アプリケーション</guimenu><guisubmenu>教育</guisubmenu><guimenuitem>Auto Multiple Choice</guimenuitem></menuchoice>を選ぶことにより、GUIを起動することができます。また、<userinput>auto-multiple-choice</userinput>コマンドを使用することもできます。</para>
</sect2>
</sect1>
<sect1 id="AMC-TXT">
<title>AMC-TXT構文</title>
<para>LaTeX語にまだ慣れておらず、勉強する時間もない方のために、AMCにはAMC-TXTという特別な形式の簡単なテキストファイルを処理するフィルターが含まれています。この節では、AMC-TXTファイルの構文を詳しく解説します。LaTeXを用いて試験問題を精密に制御する場合は、この節はスキップしてください。</para>
<para>単純な例から始めましょう:</para>
<!--NAME: AMC-TXT形式の単純な例
DESC: 非常に単純なAMC-TXTの使用例(ドキュメントより抜粋)。これはLaTeXの知識をまったくもたずに試験問題を記述する非常に単純なテキスト形式です。-->
<programlisting id="modeles-simple-txt.txt"># AMC-TXTソースファイル
Title: はじめてのAMC試験問題
Lang: JA
Presentation: 以下の設問に最も適切な解答を
選択してください。
* カメルーンの首都はどれですか?
+ ヤウンデ
- ドゥアラ
- クリビ
** 以下の数のうち、正の数はどれですか?
- -2
+ 2
+ 10</programlisting>
<important>
<para>試験問題を含んだファイルは、UTF-8でエンコードされたプレーンテキストファイルでなければなりません。UTF-8はいくつかのテキストエディタ(<command>gedit</command>など)のデフォルトエンコーディングです。テキストをボールドにしたり、画像が埋め込めたりするような、OpenOffice/LibreOfficeやそれに類するエディタを使用しないでください。これらはテキスト以外に多量のデータを保存し、AMCはそれを読むことができません。</para>
</important>
<note>
<para>デフォルトとして用いられるフォントは<ulink url="http://www.linuxlibertine.org/">libertine</ulink>で、これは多数の言語の文字を含んだオープンソースフォントです。このフォントをインストールするか、そうでなければ他のフォントを選ぶ必要があります(下記オプション参照)。debian/ubuntuパッケージでAMCをインストールすれば、このフォントは推奨パッケージとしていっしょにインストールされます。</para>
</note>
<para>AMC-TXTの構造はすでにおわかりのとおりです。最初に全体的なオプションがあり、そして設問が続きます。</para>
<sect2 id="txt.comments">
<title>コメント</title>
<para>AMC-TXTソースファイル内の<quote><code>#</code></quote>文字で<emphasis>始まる</emphasis>行にはコメントを書くことができます。AMCはこれらの行を無視します。</para>
</sect2>
<sect2 id="txt.opts">
<title>全体オプション</title>
<para>以下のオプションを(任意の順序で)使用することができます:</para>
<variablelist>
<varlistentry>
<term>Lang:</term>
<listitem>
<para>試験問題が記述されている言語を指定するのに用います。現時点では、DE(ドイツ語)、ES(スペイン語)、FR(フランス語)、IT(イタリア語)、NL(オランダ語)、NO(ノルウェー語)、PT(ポルトガル語)、JA(日本語、<xref linkend="txt-japanese"/>参照)、AR(アラビア語、<xref linkend="txt-arabic"/>参照)のみがサポートされています。オプションを指定しないと、英語が選択されます。他の言語用にローカライズ文字列を定義することもできます(<option>L-xxx</option>形式のオプション参照)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>PaperSize:</term>
<listitem>
<para>用紙サイズを設定します。設定可能な値は、<code>A3</code>、<code>A4</code>、<code>A5</code>、<code>A6</code>、<code>B3</code>、<code>B4</code>、<code>B5</code>、<code>B6</code>、<code>letter</code>、<code>legal</code>、<code>ANSIA</code>、<code>ANSIB</code>、<code>ANSIC</code>、<code>ANSID</code>、<code>ANSIE</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Title:</term>
<listitem>
<para>試験タイトル。試験問題用紙の上部に印刷されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Presentation:</term>
<listitem>
<para>試験の注意事項を記述する文章(時間、規則など)です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ShuffleQuestions:</term>
<listitem>
<para>1なら(デフォルト)、設問がシャフルされ、用紙ごとに順序が変わります。0なら、ファイルに記述された通りの順序で設問が並びます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RandomSeed:</term>
<listitem>
<para>シャフル用の乱数生成器のシードはこのオプションで変更することができます。設定されている値(1から4194303の範囲で選択できます)が変更されると、シャフル結果が変わります。当然ですが、問題用紙を印刷したあとはこの値を変更してはなりません。</para>
<note>
<para>この値はxyファイルに(<code>\rngstate{1}{1527384}</code>のように)記録されます。デフォルト値は1527384です。</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>Code:</term>
<listitem>
<para>正の整数値<replaceable>n</replaceable>を指定すると、<replaceable>n</replaceable>桁分の受験番号をマークする欄が試験問題用紙に追加されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CodeDigitsDirection:</term>
<listitem>
<para>受験番号欄の方向を(<code>virtical</code>または<code>horizontal</code>で)設定します。設定しない場合は桁数により(桁数が少なければ水平、多ければ垂直に)自動選択されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Columns:</term>
<listitem>
<para>正の整数値<replaceable>n</replaceable>を指定すると、問題用紙を<replaceable>n</replaceable>カラムで生成します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CompleteMulti:</term>
<listitem>
<para>1なら(デフォルト)、複数選択問題(正解数が0以上の任意個)において、「該当なし」の選択肢を追加します。これをしないと、「受験者がこの設問に解答しなかった」のと「受験者がこの設問に正解がないと考えた」のが区別できません。この選択肢をつけたくない場合は0に設定してください。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>L-None:</term>
<listitem>
<para>「<emphasis>該当なし</emphasis>」(上記オプション参照)に代わる文字列を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>QuestionBlocks:</term>
<listitem>
<para>1なら(デフォルト)、各設問は複数のカラムやページにまたがらないように透明な枠で囲まれます。0なら、必要に応じて設問が分割され、読み易さは多少犠牲になりますがページ数が節約できます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>L-Question:</term>
<listitem>
<para>必要なら、試験問題内での「<emphasis>問</emphasis>」に代わる文字列を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>L-Name:</term>
<listitem>
<para>受験者の氏名記入欄に表示する「<emphasis>氏名</emphasis>」に代わる文字列を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>L-Student:</term>
<listitem>
<para><option>Code</option>オプションが使用された場合に、受験者に、受験番号と氏名を記入するよう指示する短い文章です。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>TitleWidth:</term>
<listitem>
<para><option>Code:</option>を使用しない場合のタイトル領域の幅。デフォルト値は<code>.47\linewidth</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NameFieldWidth:</term>
<listitem>
<para>氏名フィールドの幅。LaTeXの通常の長さ単位が使用できます。デフォルト値は、<option>Code:</option>を使用する場合は<code>5.8cm</code>で、使用しない場合は<code>.47\linewidth</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NameFieldLines:</term>
<listitem>
<para>氏名フィールドボックスの行数。デフォルト値は、<option>Code:</option>を使用する場合は<code>2</code>で、使用しない場合は<code>1</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NameFieldLinespace:</term>
<listitem>
<para>氏名フィールドボックスの行間。デフォルト値は<code>.5em</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Pages:</term>
<listitem>
<para>各問題用紙の最小ページ数を指定します。問題がこのページ数より少ない場合は白紙ページが追加されます。別紙答案用紙を使用している場合は、<option><replaceable>q</replaceable>+<replaceable>a</replaceable></option> (例 <option>4+2</option>)のように書くことができ、<replaceable>q</replaceable>は問題用紙自身の最小ページ数、<replaceable>q</replaceable>+<replaceable>a</replaceable>は答案用紙も含めた最小ページ数になります。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ManualDuplex:</term>
<listitem>
<para>1にすると(これはデフォルト値ではありません)、各試験問題用紙のページ数が偶数になり、PDFの試験問題用紙を手動で印刷する際、両面印刷モードで一度に行うことができます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SingleSided:</term>
<listitem>
<para>1にすると(これはデフォルト値ではありません)、設問のページ数が奇数の場合でも、設問と別紙答案用紙の間に空ページが追加されません。このモードは試験問題用紙を片面印刷するときや、設問と答案用紙を分ける必要がないときに有用です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>BoxColor:</term>
<listitem>
<para>受験者がマークするボックスの色です。これによりボックスは指定した色(例えば<emphasis>red</emphasis>や、薄いグレーもありえます)で印刷され、データ取込み時の誤検出を軽減します。色は、有効な<command>xcolor</command>(詳細はLaTeXの<command>xcolor</command>ドキュメント参照)で、<emphasis>red</emphasis>、<emphasis>magenta</emphasis>、<emphasis>pink</emphasis>、<emphasis>lightgray</emphasis>、<emphasis>cyan</emphasis>や、<code>#RRGGBB</code>の形式で<code>#FFBEC8</code>(淡い赤)のように指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DefaultScoringS:</term>
<listitem>
<para>単一選択問題(唯一の選択肢のみが正解になる設問)でのデフォルト採点基準です。詳細は<xref linkend="bareme"/>を参照してください。デフォルト値は、正解に1点、それ以外に0点です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DefaultScoringM:</term>
<listitem>
<para>複数選択問題(正解の選択肢が0個、1個あるいは複数個ありうる設問)でのデフォルト採点基準です。詳細は<xref linkend="bareme"/>を参照してください。デフォルト値は<code>haut=2</code>で、完答に2点、1箇所の誤り(マークすべきでないボックスをマークしたり、マークすべきボックスをマークしなかったり)ごとに1点減点します(ただし負にはしない)。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>LaTeX:</term>
<listitem>
<para>文章中にLaTeXコマンドを使用したい場合は、このオプションを1にしてください。これにより例えば、<code>$\sqrt{a+b}$</code>のような数式を挿入できます。0なら(デフォルト)、記述した文章がそのまま印刷されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>LaTeX-Preambule:</term>
<listitem>
<para>LaTeXプリアンブルに追加したいコマンド(例えば<command>\usepackage</command>コマンドなど)を設定します。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>LaTeX-BeginDocument:</term>
<listitem>
<para>LaTeXの<command>document</command>環境の先頭に挿入したいコマンド(例えばマクロ定義など)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Disable:</term>
<listitem>
<para>無効にする機能のリストをコンマで区切って指定します。現在実装されている機能は<code>verbatim</code>(<xref linkend="parse_verbatim"/>参照)、<code>images</code>(<xref linkend="parse_images"/>参照)、<code>embf</code>(<xref linkend="parse_embf"/>参照)、<code>local_latex</code>(<xref linkend="parse_local_latex"/>参照)です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>PackageOptions:</term>
<listitem>
<para>LaTeXのautomultiplechoiceパッケージに渡す追加オプションを与えます(<xref linkend="sec.package.options"/>参照)。</para>
</listitem>
</varlistentry>
</variablelist>
<sect3 id="txt.separate">
<title>別紙答案用紙</title>
<para>試験問題に別紙答案用紙を用いる場合は、次のオプションを指定してください:</para>
<variablelist>
<varlistentry>
<term>SeparateAnswerSheet:</term>
<listitem>
<para>1なら、別紙答案用紙が追加されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AnswerSheetTitle:</term>
<listitem>
<para>別紙答案用紙のタイトルです。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AnswerSheetPresentation:</term>
<listitem>
<para>別紙答案用紙の注意書きです。例えば、解答をこの用紙に記入しなければ<emphasis>無効</emphasis>であることを受験者に伝えます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AnswerSheetColumns:</term>
<listitem>
<para>別紙答案用紙のカラム数です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AutoMarks:</term>
<listitem>
<para>1にすると、<option>automarks</option>オプション(<xref linkend="sec.package.options"/>参照)を使用します。</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
<sect2 id="txt.questions">
<title>設問</title>
<para>単一選択問題(唯一の選択肢のみが正解となる設問)は、行を<code>*</code>で始め、複数選択問題(任意個の正解がある設問)は<code>**</code>で始めます。そのうしろに設問文を続け、以降の行に<code>+</code>で始まる正しい選択肢と、<code>-</code>で始まる誤った選択肢を書きます。</para>
<sect3 id="txt.questions.opts">
<title>設問オプション</title>
<para>設問にはいくつかオプションが設定できます。それらは次の例のように、<code>*</code>か<code>**</code>のあとに角括弧で囲み、カンマで区切って並べます:</para>
<programlisting>*[ordered,horiz,id=sum] 1足す1は
いくつですか?
- 0
- 1
+ 2</programlisting>
<para>設問に使用できるオプションは以下のとおりです:</para>
<variablelist>
<varlistentry>
<term>horiz</term>
<listitem>
<para>選択肢を横に並べていきます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>columns=<replaceable>n</replaceable></term>
<listitem>
<para>選択肢を<replaceable>n</replaceable>カラムに配置します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ordered</term>
<listitem>
<para>選択肢をシャフルせず、記述ファイル内と同じ順序を保ちます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>id=<replaceable>xxxx</replaceable></term>
<listitem>
<para>設問に名前をつけ、出力した採点表の得点がどの設問のものかわかりやすくします。この名前にはアクセントなどを含まずLaTeXの特殊文字(<code>_</code>、<code>^</code>、<code>%</code>など)でない単純な文字しか使用できません。</para>
<para>旧版との互換性のため<option>id</option>のかわりに<option>name</option>も使用できますが、<option>id</option>を使用してください。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>indicative</term>
<listitem>
<para>この設問の採点結果を、受験者の最終得点に加えません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>next</term>
<listitem>
<para><option>ShuffleQuestions</option>オプションで設問をシャフルする場合でも、直前の設問の次にこの設問を配置します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>first</term>
<listitem>
<para>この設問を常にグループの先頭に配置します(<xref linkend="sec.txt-groups"/>を参照してください)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>last</term>
<listitem>
<para>この設問を常にグループの末尾に配置します(<xref linkend="sec.txt-groups"/>を参照してください)。</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 id="txt.questions.scoring">
<title>採点基準</title>
<para>特定の設問や選択肢の開始文字(<code>*</code>、<code>**</code>、<code>+</code>、<code>-</code>)とオプションの後に、波括弧で囲んで採点基準を設定することができます。例えば次の例のようになりますが、採点基準の詳細については、<xref linkend="bareme"/>を参照してください。</para>
<programlisting>*{b=2,m=-1} フランスの首都はどれですか?
+ パリ
- リール
- マルセイユ
- ワガドゥグー
-{-2} ニューヨーク
**[ordered,horiz,id=positive]{haut=1} 以下の数のうち、正の数はどれですか?
- -2
+ 2
+ 10
</programlisting>
</sect3>
<sect3 id="txt.questions.open">
<title>記述式設問</title>
<para>次の例のように<code><</code>と<code>></code>で囲むことにより、記述式の設問(<xref linkend="openquestions"/>参照)を定義することができます:</para>
<programlisting>*<lines=4> 月について述べよ。
-[O]{0} 誤り
-[P]{1} 部分点
+[V]{2} 正解</programlisting>
<para>以下のグローバルオプションを使用することも検討すべきです:</para>
<variablelist>
<varlistentry>
<term>L-OpenText:</term>
<listitem>
<para>別紙答案用紙に記入するよう指示するテキスト(関連する場合のみ)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>L-OpenReserved:</term>
<listitem>
<para>採点用ボックスに記入しないようボックス脇に表示するテキスト。</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
<sect2 id="txt.multiline">
<title>複数行</title>
<para>文章はどこで切って次の行に続けても(それが空行であっても)、それがオプションや次の設問文や選択肢の開始と混同さえされなければかまいません。例として次の設問を見てください:</para>
<programlisting>* 2
+ 2はいくつですか?
- 0
+ 4
- 10</programlisting>
<para>これは正しいAMC-TXTの設問ですが、これは意図したとおりには扱われません。それは、2行目が、1行目の続きと認識されず、この設問の最初の選択肢の形式になっているためです!</para>
<para>同様の問題は次のAMC-TXTの設問でも発生します。ここでは、「<code>Gershwin:</code>」が全体オプションの定義とみなされてしまいます。</para>
<programlisting>* みなさんは、George
Gershwin: (作曲家)を知っています。
彼が生まれたのは何年ですか?
+ 1898年
- 1892年
- 1902年</programlisting>
<para>正しい書き方は次のようになります:</para>
<programlisting>* みなさんは、George Gershwin:
(作曲家)を知っています。
彼が生まれたのは何年ですか?
+ 1898年
- 1892年
- 1902年</programlisting>
<para>空行があると改行が挿入されます:</para>
<programlisting>Presentation: タイトル
試験の説明。
** 難問です。
空には星が何個ありますか?
- 1個
- 2個
- 何千万個も</programlisting>
</sect2>
<sect2 id="txt.title">
<title>タイトル</title>
<para>タイトルをつけるには、<code>[==</code>と<code>==]</code>で囲みます。</para>
</sect2>
<sect2 id="parse_verbatim">
<title>逐語的コンテント</title>
<para><emphasis>逐語的</emphasis>なブロック(プログラムのコードのような)を得るには、それを<code>[verbatim]</code>と<code>[/verbatim]</code>で囲みます:</para>
<programlisting>* 次のプログラムは何を出力しますか?
[verbatim]
main( )
{
printf("hello, world\n");
}
[/verbatim]
+ [| hello, world |]
- [| hello |]
- [| world |]</programlisting>
</sect2>
<sect2 id="parse_embf">
<title>太字、斜体、タイプライター、アンダーライン</title>
<para><emphasis>太字</emphasis>のテキストを出力するには、それを<code>[*</code>と<code>*]</code>で囲みます。<emphasis>斜体</emphasis>のテキストを出力するには、それを<code>[_</code>と<code>_]</code>で囲みます。<emphasis>タイプライター</emphasis>のテキストを出力するには、それを<code>[|</code>と<code>|]</code>で囲みます。<emphasis>アンダーライン</emphasis>のテキストを出力するには、それを<code>[/</code>と<code>/]</code>で囲みます。</para>
<programlisting>* [_フランス_]の[*首都*]はどこですか?
+ パリ
- リール
- マルセイユ</programlisting>
</sect2>
<sect2 id="parse_images">
<title>画像</title>
<para>次の構文を用いて文書に画像を追加することができます:</para>
<programlisting>![height=2cm]images/bird.png!</programlisting>
<para>これにより、プロジェクトディレクトリにある画像<filename>images/bird.png</filename>が、2cmの高さで追加されます。角括弧内で使用できるオプションはLaTeXコマンド<command>\includegraphics</command>のオプションと同じです
(例えば<parameter>width=3cm</parameter>や<parameter>keepaspectratio</parameter>)。横幅の3/4の幅で画像をセンタリングしたい場合は、次のようにします。</para>
<programlisting>!{center}[width=.75\linewidth]images/map.pdf!</programlisting>
</sect2>
<sect2 id="parse_local_latex">
<title>LaTeXコードの断片</title>
<para>文書内に小さなLaTeXコード片を置くには、次のように二重の角括弧内にそれを入れます:</para>
<programlisting>[[\multiSymbole{}]]の記号のある設問の正解は1個とは限りません。0個の場合や複数の場合があります。</programlisting>
</sect2>
<sect2 id="sec.txt-groups">
<title>設問グループ</title>
<para>次の構文により、複数の設問をグループに入れ、シャフルしても離ればなれにならないようにできます:</para>
<programlisting>*( マーチン・ルーサー・キングに関する問題
* 生年はいつですか?
- 1901年
+ 1929年
- 1968年
* 没年はいつですか?
- 1945年
- 1515年
+ 1968年
- 1999年
* どこで生まれましたか?
+ アトランタ
- メンフィス
- ニューヨーク
*) マーチン・ルーサー・キングに関する問題はここまで</programlisting>
<para>次のように、グループにオプションを指定することができます:</para>
<programlisting>*([shuffle=false,columns=2] マーチン・ルーサー・キングに関する問題</programlisting>
<para>以下のオプションが使用できます:</para>
<variablelist>
<varlistentry>
<term>shuffle=<replaceable>xxx</replaceable></term>
<listitem>
<para>グループ内の設問をシャフルするかどうかを、<replaceable>true</replaceable>か<replaceable>false</replaceable>で示します。デフォルト値はグローバルな<option>ShuffleQuestions</option>オプションから得ます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>columns=<replaceable>n</replaceable></term>
<listitem>
<para>グループの設問のカラム数。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>group=<replaceable>nom</replaceable></term>
<listitem>
<para>グループに名前をつけます(内部的な事情)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>numquestions=<replaceable>n</replaceable></term>
<listitem>
<para>このオプションによりグループの先頭の<replaceable>n</replaceable>個の設問だけが使用されます。設問がシャフルされている場合は、グループから<replaceable>n</replaceable>個の設問をランダムに選べるようになります。</para>
<note>
<para><option>first</option>と<option>last</option>のオプションのついた設問には影響しません(必ず挿入されます)。さらに、<option>next</option>オプションで結びついた設問どうしは一つの設問としてカウントされます。</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>needspace=<replaceable>dimen</replaceable></term>
<listitem>
<para>グループを開始するのに必要な高さを(<replaceable>4cm</replaceable> のように単位を付けて)指定します。現在のページの残りの垂直スペースがこれより少なければ、グループを次のページから開始します。</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="txt-arabic">
<title>アラビア語</title>
<para>アラビア語で試験問題を作成するのは少し特殊です。もちろん次のオプションを用います。</para>
<programlisting>Lang: AR</programlisting>
<para>さらに、以下の全体オプションを使用することができます:</para>
<variablelist>
<varlistentry>
<term>ArabicFont:</term>
<listitem>
<para>アラビア語テキストに用いるフォントです。デフォルト値は<ulink url="http://arabeyes.org/">ArabEyes</ulink>プロジェクト(debian/ubuntuではttf-arabeyesパッケージにあります)のフォント<emphasis>Rasheeq</emphasis>です。</para>
</listitem>
</varlistentry>
</variablelist>
<note>
<para>非アラビア文字を挿入するには、<option>LaTeX</option>オプションをオンにして、挿入したい文字をLaTeXコマンド<command>\textLR</command>の引数として<code>\textLR{xelatex command}</code>のように指定してください。</para>
</note>
</sect2>
<sect2 id="txt-japanese">
<title>日本語</title>
<para>日本語の試験問題は次のオプションを用いて生成することができます。</para>
<programlisting>Lang: JA</programlisting>
<para>AMCは、生成されるLaTeXソースにいくらか調整を行い、日本語テキストが処理できるようにします。</para>
<warning>
<para>この場合、AMCはAMC-TXTソースファイルから作られたLaTeXファイルを処理するのに<command>platex</command>コマンドを用います。これには、<emphasis>最近</emphasis>のバージョンの<command>platex</command>が必要です。いくつかの旧版linuxディストリビューションに含まれているtexlive 2009に付属の<command>platex</command>は、AMCに対応して<emphasis>いません</emphasis>。</para>
</warning>
</sect2>
<sect2 id="txt.includes">
<title>他のファイルのインクルード</title>
<para>次のようにして他のファイルをインクルードできます:</para>
<programlisting>IncludeFile: <replaceable>file-to-include.txt</replaceable></programlisting>
<warning>
<para>異なるプロジェクトから同じファイルをインクルードするときは十分に注意してください!仮にプロジェクトAとBから<filename>/home/alexis/questions-a.txt</filename>をインクルードしているとしましょう。プロジェクトAは完了し、現在プロジェクトBが進行中です。<filename>/home/alexis/questions-a.txt</filename>にある設問の採点基準を更新し、さらに他の設問を追加します。もし、プロジェクトAの採点をこの新しい採点基準で更新する必要が生じたとき、プロジェクトAで使用した設問のほかに新たな設問があることからAMC内で不整合が生じ、Aの採点はすべておかしくなってしまいます。</para>
</warning>
</sect2>
</sect1>
<sect1 id="latex">
<title>LaTeXソースファイル</title>
<para>この節では、LaTeXソースファイルから試験問題をデザインできるようにするためのLaTeXコマンドを説明します。別の形式をソースファイルにする場合は、この節はスキップしてください。選択式試験問題は、<package>automultiplechoice</package>パッケージを用いてLaTeXファイルで記述できます。LaTeXファイルは、<command>latex</command>コマンドでコンパイルして生成されたdviファイルを表示することで、いつでも確認することができます。</para>
<para>選択式試験問題用のLaTeXファイルをどのように作ればいいかを簡潔に示すいくつかの例から始めます。それぞれのLaTeXファイルはテンプレートとして用意されているので、これらのテンプレートの一つを用いて選択式試験問題プロジェクトを作ることができます。</para>
<sect2 id="latex.simple">
<title>簡単な例</title>
<para><!--NAME: 単純な例
DESC: 単一選択問題1件と複数選択問題1件からなる単純な例(ドキュメントより抜粋)--><programlisting
id="modeles-simple.tex" linenumbering="numbered">\documentclass[a4paper]{article}
\usepackage[utf8x]{inputenc} <co id="simple.latin1"
linkends="simple.latin1.exp"/>
\usepackage[T1]{fontenc}
\usepackage[box,completemulti,lang=JA]{automultiplechoice} <co id="simple.amc"
linkends="simple.amc.exp"/>
\begin{document}
\onecopy{10}{ <co id="simple.exemplaire" linkends="simple.exemplaire.exp"/>
%%% 試験問題用紙ヘッダー開始: <co id="simple.entete"
linkends="simple.entete.exp"/>
\noindent{\bf QCM \hfill TEST}
\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
\centering\large\bf テスト\\ 試験日 2008年1月1日\end{minipage}
\namefield{\fbox{ <co id="simple.champnom" linkends="simple.champnom.exp"/>
\begin{minipage}{.5\linewidth}
氏名:
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}
}}
\begin{center}
試験時間 : 10 分。
資料の持込みと電子計算機の使用は禁じます。
\multiSymbole{}の記号のある設問の正解は1個とは限りません。
0個の場合や複数の場合があります。
それ以外の設問には正解が1個だけあります。
\emph{非常に悪い解答}にはマイナス点がつくことがあります。
\end{center}
\vspace{1ex}
%%% ヘッダー終了
\begin{question}{総理大臣} <co id="simple.qr" linkends="simple.qr.exp"/>
次のうち、日本の総理大臣になったことがある人を一人選びなさい。
\begin{choices}
\correctchoice{大隈重信}
\wrongchoice{湯川秀樹}
\wrongchoice{聖徳太子}
\wrongchoice{徳川家康}
\end{choices}
\end{question}
\begin{questionmult}{都道府県} <co id="simple.qrmult"
linkends="simple.qrmult.exp"/>
次のうち、日本の都道府県はどれか、すべて選びなさい。
\begin{choices}
\correctchoice{石川}
\wrongchoice{山田}
\correctchoice{宮崎}
\end{choices}
\end{questionmult}
% \AMCaddpagesto{3} <co id="AMCaddpage" linkends="AMCaddpage.exp"/>
} <co id="simple.fin" linkends="simple.fin.exp"/>
\end{document}
</programlisting></para>
<para>この例題の解説:</para>
<para><calloutlist>
<callout arearefs="simple.latin1" id="simple.latin1.exp">
<para><package>inputenc</package>および<package>fontenc</package>パッケージにより、試験問題の文章にUTF-8エンコーディングを用いることができます。もちろん、使用したいエンコーディングに合わせて変更することもできます。(訳注: 日本語の試験問題において、後述する最近の<command>platex</command>を使用する場合は、なくてもUTF-8で動作します。)</para>
</callout>
<callout arearefs="simple.amc" id="simple.amc.exp">
<para>ここで使われている<package>automultiplechoice</package>パッケージのオプションは、設問が2ページにまたがるのを防ぎ(<option>box</option>)、複数選択問題にどの選択肢も該当しないことを示すもう一つの選択肢を自動追加します(<option>completemulti</option>)。</para>
</callout>
<callout arearefs="simple.exemplaire" id="simple.exemplaire.exp">
<para><command>onecopy</command>コマンドは(異なる)試験問題を必要数(ここでは10)実体化します。LaTeXの環境を用いた代替の構文については<xref linkend="sec.unecopie"/>を参照してください。</para>
</callout>
<callout arearefs="simple.entete" id="simple.entete.exp">
<para>この行以降は、試験問題用紙のヘッダーを記述します。</para>
</callout>
<callout arearefs="simple.champnom" id="simple.champnom.exp">
<para><command>namefield</command>コマンドは受験者が氏名を記入する欄を指定します。</para>
</callout>
<callout arearefs="simple.qr" id="simple.qr.exp">
<para><command>question</command>および<command>choices</command>環境は、単一の正解のある選択式問題を作成します。固有の識別名(ここでは<emphasis>総理大臣</emphasis>)を指定する必要があります。</para>
</callout>
<callout arearefs="simple.qrmult" id="simple.qrmult.exp">
<para><command>questionmult</command>および<command>choices</command>環境は、任意個数の正解のある選択式問題を作成します。受験者は、正解と思われるすべてのボックスにマークするか、(6行目のパッケージ読込みでの<option>completemulti</option>オプションで自動的に追加された)最後のボックスにマークすることになります。</para>
</callout>
<callout arearefs="AMCaddpage" id="AMCaddpage.exp">
<para>各試験問題のページ数を3ページに固定するには、この行をアンコメントしてください。(<xref linkend="latex.layout.npages"/>参照)</para>
</callout>
<callout arearefs="simple.fin" id="simple.fin.exp">
<para>(9行目で始まった)<command>onecopy</command>コマンドの終わりを表します。</para>
</callout>
</calloutlist></para>
</sect2>
<sect2 id="latex.shuffle">
<title>設問グループとシャフルの例</title>
<para>この例では、設問の順序は試験問題の実体ごとに変えたいけれど、同じ分野の設問どうしはいっしょにまとめておきたい場合を考えます。この目的のためには、設問グループを二つ作成し、各グループ内で設問をランダムにシャフルします。</para>
<para><!--NAME: 設問グルーピング
DESC: 二つの異なる設問グループの各内部で設問がシャフルされる例(ドキュメントより抜粋)--><programlisting
id="modeles-groups.tex" linenumbering="numbered">\documentclass[a4paper]{article}
\usepackage[box,completemulti,lang=JA]{automultiplechoice}
\begin{document}
%%% グループの準備
\setdefaultgroupmode{withoutreplacement}
\element{地理}{
\begin{question}{パリ}
パリはどの大陸にありますか?
\begin{choices}
\correctchoice{ヨーロッパ}
\wrongchoice{アフリカ}
\wrongchoice{アジア}
\wrongchoice{火星}
\end{choices}
\end{question}
}
\element{地理}{
\begin{question}{カメルーン}
カメルーンの首都はどれですか?
\begin{choices}
\correctchoice{ヤウンデ}
\wrongchoice{ドゥアラ}
\wrongchoice{アブダビ}
\end{choices}
\end{question}
}
\element{歴史}{
\begin{question}{応仁}
応仁の乱はいつ始まりましたか?
\begin{choiceshoriz}
\correctchoice{1467年}
\wrongchoice{1967年}
\wrongchoice{1419年}
\end{choiceshoriz}
\end{question}
}
\element{歴史}{
\begin{questionmult}{Nantes}
\emph{ナントの勅令}について正しいのはどれですか?
\begin{choices}
\correctchoice{1598年に発布された}
\correctchoice{ルイ14世により破棄された}
\wrongchoice{ヘンリ2世により発布された}
\end{choices}
\end{questionmult}
}
%%% copies
\onecopy{10}{
%%% 試験問題用紙ヘッダー開始:
\noindent{\bf QCM \hfill TEST}
\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
\centering\large\bf 歴史と地理\\ 試験日 2008年1月1日
\end{minipage}
\namefield{\fbox{\begin{minipage}{.5\linewidth}
氏名:
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}}}
%%% ヘッダー終了
\begin{center}
\hrule\vspace{2mm}
\bf\Large 地理
\vspace{1mm}\hrule
\end{center}
\insertgroup{地理}
\begin{center}
\hrule\vspace{2mm}
\bf\Large 歴史
\vspace{2mm}\hrule
\end{center}
\insertgroup{歴史}
}
\end{document}
</programlisting></para>
</sect2>
<sect2 id="secensemble">
<title>別紙答案用紙を用いた例</title>
<para>この例では、マーク用のボックスをすべて別紙に集めて配置したい場合を考えます。こうすれば、不正行為はさらに難しくなり、また重要なのは、受験者一人につき用紙を1枚だけスキャンすればいいので、スキャンを手動で行う場合の手間が軽減されます。この例は設問数が少なく1枚に収まるため、このような配置はこの特定の場合ではあまり有用ではないかもしれません。このレイアウトを多数の設問向けに修正するのはおまかせします!</para>
<para><!--NAME: 別紙答案用紙
DESC: 各受験者用にすべてのマーク用ボックスを1枚の別紙に集めた例(ドキュメントより抜粋)--><programlisting
id="modeles-separate.tex" linenumbering="numbered">\documentclass[a4paper]{article}
\usepackage[box,completemulti,separateanswersheet,lang=JA]{automultiplechoice} <co
id="ensemble.opt" linkends="ensemble.opt.exp"/>
\begin{document}
\AMCrandomseed{1237893}
\def\AMCformQuestion#1{{\sc 問 #1:}} <co
id="ensemble.fq" linkends="ensemble.fq.exp"/>
\setdefaultgroupmode{withoutreplacement}
\element{general}{
\begin{question}{総理大臣}
次のうち、日本の総理大臣になったことがある人を一人選びなさい。
\begin{choices}
\correctchoice{大隈重信}
\wrongchoice{湯川秀樹}
\wrongchoice{聖徳太子}
\wrongchoice{徳川家康}
\end{choices}
\end{question}
}
\element{general}{
\begin{questionmult}{都道府県}
次のうち、日本の都道府県はどれか、すべて選びなさい。
\begin{choices}
\correctchoice{石川}
\wrongchoice{山田}
\correctchoice{宮崎}
\end{choices}
\end{questionmult}
}
\element{general}{
\begin{question}{EU}
欧州連合には2009年1月現在、何ヶ国が加盟していますか?
\begin{choiceshoriz}[o]
\wrongchoice{15}
\wrongchoice{21}
\wrongchoice{25}
\correctchoice{27}
\wrongchoice{31}
\end{choiceshoriz}
\end{question}
}
\onecopy{5}{
%%% 試験問題用紙ヘッダー開始:
\noindent{\bf QCM \hfill TEST}
\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
\centering\large\bf テスト\\ 試験日 2008年1月1日
\end{minipage}
\begin{center}\em
試験時間 : 10 分。
資料の持込みと電子計算機の使用は禁じます。
\multiSymbole{}の記号のある設問の正解は1個とは限りません。
0個の場合や複数の場合があります。
それ以外の設問には正解が1個だけあります。
\emph{非常に悪い解答}にはマイナス点がつくことがあります。
\end{center}
\vspace{1ex}
%%% ヘッダー終了
\insertgroup{general}
\AMCcleardoublepage <co id="ensemble.cp" linkends="ensemble.cp.exp"/>
% \AMCaddpagesto{3} <co id="AMCaddpage.separateanswersheet.sujet"
linkends="AMCaddpage.separateanswersheet.sujet.exp"/>
\AMCformBegin <co id="debut.form" linkends="debut.form.exp"/>
%%% 答案用紙ヘッダー開始
{\large\bf Answer sheet:}
\hfill \namefield{\fbox{ <co id="ensemble.nom" linkends="ensemble.nom.exp"/>
\begin{minipage}{.5\linewidth}
氏名:
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}
}}
\begin{center}
\bf\em 解答はこの用紙にのみ行わなければなりません:
他の用紙に行った解答は無視されます。
\end{center}
%%% 答案用紙ヘッダー終了
\AMCform <co id="ensemble.formulaire" linkends="ensemble.formulaire.exp"/>
% \AMCaddpagesto{5} <co id="AMCaddpage.separateanswersheet.total"
linkends="AMCaddpage.separateanswersheet.total.exp"/>
}
\end{document}</programlisting>以下の解説により、上の例がより明確になるでしょう:<calloutlist>
<callout arearefs="ensemble.opt" id="ensemble.opt.exp">
<para><option>separateanswersheet</option>オプションにより、所望の配置ができるようになります。</para>
</callout>
<callout arearefs="ensemble.fq" id="ensemble.fq.exp">
<para>別紙答案用紙上での設問番号の表示方法をこのように変更することができます(この行はなくてもかまいません)。</para>
</callout>
<callout arearefs="ensemble.cp" id="ensemble.cp.exp">
<para>この改ページはマーク用ボックスを集めた答案専用の用紙の前に置きます。両面印刷を行う場合は、このページが次の用紙に印刷されるように<command>\AMCcleardoublepage</command>を使用してください。片面印刷の場合は、単純に<command>\clearpage</command>でもかまいません。</para>
</callout>
<callout arearefs="AMCaddpage.separateanswersheet.sujet"
id="AMCaddpage.separateanswersheet.sujet.exp">
<para>各試験問題の問題ページ数を3ページに固定するには、この行をアンコメントしてください。(<xref linkend="latex.layout.npages"/>参照)(このままではコメントアウトされているので、何も起きません)</para>
</callout>
<callout arearefs="debut.form" id="debut.form.exp">
<para>このコマンドは答案用紙部の開始を示します。答案用紙側にしか現れない設問(例えば<command>\AMCcodeGrid</command>で生成される擬似的な設問)を適切に扱うために必要です。</para>
</callout>
<callout arearefs="ensemble.nom" id="ensemble.nom.exp">
<para>受験者の氏名は答案用紙側に記入しないと意味がありません!</para>
</callout>
<callout arearefs="ensemble.formulaire" id="ensemble.formulaire.exp">
<para><command>AMCform</command>コマンドにより、マーク用ボックスがすべて出力されます。</para>
</callout>
<callout arearefs="AMCaddpage.separateanswersheet.total"
id="AMCaddpage.separateanswersheet.total.exp">
<para>各試験問題のページ数(問題ページと答案ページの合計)を5ページに固定するには、この行をアンコメントしてください。(<xref linkend="latex.layout.npages"/>参照)</para>
</callout>
</calloutlist></para>
<warning>
<para>別紙答案用紙を用いる場合、アルファベット(あるいは<option>digits</option>オプションを使用する場合は数字。<xref linkend="sec.package.options" />参照)がマーク用ボックス内に印刷されます。マーク有無を正確に検出するために、受験者にはボックスをしっかり塗りつぶすように(単純にチェックマークだけでは不十分)指示する必要があります。また、マーク判定閾値(マークのあるボックス内での黒ピクセルの割合で定義)を0.5付近に調整する必要があります。</para>
</warning>
</sect2>
<sect2 id="latex.commands">
<title>LaTeXコマンドの説明</title>
<sect3 id="sec.package.options">
<title id="sec.package.options.title">パッケージオプション</title>
<para><package>automultiplechoice</package>パッケージを使用するには、<programlisting>\usepackage[...]{automultiplechoice}</programlisting>という行を用い、<option>...</option>部分はカンマで区切ったオプションのリストを指定します。指定できるオプションは以下のとおりです:</para>
<itemizedlist>
<listitem>
<para><option>lang=<replaceable>XX</replaceable></option>: 試験問題の言語を<replaceable>XX</replaceable>に設定します。現時点では、DE(ドイツ語)、ES(スペイン語)、FR(フランス語)、IT(イタリア語)、JA(日本語)、NL(オランダ語)、NO(ノルウェー語)、PT(ポルトガル語)のみ指定可能です。<package>automultiplechoice</package>が<option>completemulti</option>オプションで挿入する「該当なし」のような数種類の文字列も翻訳されます。</para>
</listitem>
<listitem>
<para><option>pdfform</option>: 記入可能なPDFファイルを生成します。</para>
<note>
<para>AMCには作成したPDFの自動送信機能はありません。</para>
</note>
</listitem>
<listitem>
<para><option>box</option>: 各設問をボックスに入れ、改ページで分割されないようにします。</para>
<note>
<para>状況により、設問ごとに<command>\AMCnobloc</command>を用いてこのオプションをキャンセルすることもできます。<programlisting>{\AMCnobloc%
\begin{question}{EU}
欧州連合には2009年1月現在、何ヶ国が加盟していますか?
\begin{choiceshoriz}[o]
\wrongchoice{15}
\wrongchoice{21}
\wrongchoice{25}
\correctchoice{27}
\wrongchoice{31}
\end{choiceshoriz}
\end{question}
}%</programlisting></para>
</note>
</listitem>
<listitem>
<para><option>asbox</option>: 別紙答案用紙内で<option>box</option>と同様に働きます。</para>
</listitem>
<listitem>
<para><option>completemulti</option>: 「該当なし」の選択肢を複数選択問題の最後に自動的に付け足します。これにより、複数選択問題において、解答がされない場合とどの選択肢も該当しないという解答とが区別できるようになります。この動作は、個別の設問において、<command>questionmult</command>環境の内部で
<command>\AMCcompleteMulti</command>あるいは<command>\AMCnoCompleteMulti</command>コマンドを用いることで、強制あるいはキャンセルすることができます。</para>
</listitem>
<listitem>
<para><option>noshuffle</option>: 各設問の選択肢を自動シャフルしないようにします。</para>
</listitem>
<listitem>
<para><option>noshufflegroups</option>: 試験問題の設問グループを自動シャフルしないようにします。(<xref endterm="Groups.questions.title" linkend="Groups.questions"/>参照)</para>
</listitem>
<listitem>
<para><option>answers</option>: 試験問題用紙ではなく、模範解答を生成します。</para>
</listitem>
<listitem>
<para><option>indivanswers</option>: 各試験問題用の模範解答を生成します。</para>
</listitem>
<listitem>
<para><option>separateanswersheet</option>: マーク用ボックスをすべてまとめて試験問題用紙の最後に配置するようにします(通常このオプションは、受験者一人あたり用紙を1枚だけスキャンしたいときに使用します。使用例は<xref linkend="secensemble"/>を参照してください)。</para>
</listitem>
<listitem>
<para><option>digits</option>: <option>separateanswersheet</option>オプションを用いる場合に、<option>digits</option>オプションにより選択肢を(デフォルトの)アルファベットではなく数字で識別します。</para>
</listitem>
<listitem>
<para><option>outsidebox</option>: <option>separateanswersheet</option>を用いる場合に、このオプションによりアルファベット(あるいは数字)を答案用紙のボックスの外側に印刷します。</para>
</listitem>
<listitem>
<para><option>init</option>: 時刻を用いて乱数生成を初期化します。
<emphasis>このオプションはテスト用です。実際の試験では使用しないでください!</emphasis></para>
</listitem>
<listitem>
<para><option>insidebox</option>: <option>separateanswersheet</option>を用いない場合に、このオプションによりアルファベット(あるいは数字)を受験者がマークするボックス内に印刷します。</para>
</listitem>
<listitem>
<para><option>catalog</option>: 将来の試験で組み合わせて使えるように設問のカタログを作成します。設問は番号ではなく識別名で区別されます<!-- 訳注: 仏文にしかない記述 -->。このレイアウトには<command>\onecopy</command>を使用する必要はありません。</para>
</listitem>
<listitem>
<para><option>postcorrect</option>: スキャン画像の解析を終えてから(採点時)、出題者が作成した答案用紙を正解として指定したい場合にこのオプションを用います。詳細は<xref linkend="postcorrect"/>を参照してください。</para>
</listitem>
<listitem>
<para><option>fullgroups</option>: <command>\insertgroup</command>と<command>\copygroup</command>のオプションパラメータの使用を取り消します。したがって、グループ全体が挿入およびコピーされます。(<xref endterm="Groups.questions.title" linkend="Groups.questions"/>参照)</para>
</listitem>
<listitem>
<para><option>storebox</option>: ボックスの形状(デフォルトは長方形。<xref endterm="box.style.title" linkend="box.style"/>参照)を長円や円に変更した場合に、automultiplechoiceが<option>\savebox</option>ではなく、<option>\storebox</option>を使用してボックスの形状を保存するようにします。</para>
</listitem>
<listitem>
<para><option>automarks</option>: <option>separateanswersheet</option>(別紙答案用紙)モードにおいて、試験問題のページに四隅のマーカーを印刷したくない場合に使用してください。マーカーは別紙答案用紙にのみ印刷されます。この場合に試験問題ページ上のページ番号の書式を変更するには、<command>\AMCsubjectPageTag</command>コマンドを次のように再定義してください:</para>
<programlisting>\renewcommand\AMCsubjectPageTag{%
\fbox{\texttt{\the\AMCid@etud:\thepage}}%
}</programlisting>
<warning>
<para><option>automarks</option>オプションは、AMCが試験問題ページ上のデータを処理できなくなりますので、これを読み取る必要がない場合にのみ使用してください。</para>
</warning>
</listitem>
<listitem>
<para><option>nopage</option>: 余白、四隅のマーカー、識別ボックスが必要ない場合、つまり(練習問題などのため)文書をAMCで使用する予定がない場合に使用してください。</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="sec.unecopie">
<title>試験問題数の記述</title>
<para>試験問題用紙の内容を記述したLaTeXソースコードは<command>\onecopy</command>コマンドの呼出しに含まれている必要があります。これの最初の引数は生成する実体の部数、2番目が実体を生成するコードです。</para>
<programlisting>\onecopy{50}{ ... }</programlisting>
<para>代替の構文として<command>examcopy</command>環境も使用可能で、部数はそのオプションで指定します(デフォルトは5)。</para>
<programlisting>\begin{examcopy}[50]
...
\end{examcopy}</programlisting>
<note>
<para>examcopyを使用するには<package>environ</package>パッケージをインストールする必要があります。このパッケージは、Ubuntuディストリビューション9.10(Karmic Koala)までで用いられているTeX Live 2007ディストリビューションでは使用できません。</para>
</note>
<para>問題用紙番号が奇数か偶数かにより設問内容を変えたい場合には、<command>\exemplairepair</command>コマンドを使用してください。(訳注: 隣の問題と確実に差異を設けるために使用できます。<command>\exemplairepair</command>奇数番号用<command>\else</command>偶数番号用<command>\fi</command>のように使用します。<command>examcopy</command>環境内では直接には記述できません。)</para>
<para><command>\AMCStudentNumber</command> コマンドにより問題用紙番号が表示されます。</para>
</sect3>
<sect3 id="latex.qr">
<title id="latex.qr.title">設問と選択肢</title>
<para>単一選択問題(正解が1個)では、次のようなモデルを用います: <programlisting linenumbering="unnumbered">\begin{question}{識別名}
ここに問題文...
\begin{choices}
\correctchoice{正しい選択肢}
\wrongchoice{誤った選択肢}
\wrongchoice{別の誤った選択肢}
\end{choices}
\end{question}</programlisting></para>
<important>
<para>各設問には異なる識別名を用いなければなりません。識別名には、数字、アルファベットと、単純な文字が使えます(アンダースコア、波括弧、角括弧などLaTeXで特殊な意味をもつ文字は使えません)。設問識別名は角括弧で数字を囲んだ形式で終わらないようにしてください。この形式は受験番号記入欄用に予約されています。</para>
</important>
<note>
<para>各設問の選択肢の数は199個までです。</para>
</note>
<important>
<para>設問を入れ子にしてはいけません。採点表のエクスポートが正しく行われなくなります(<xref endterm="sec.export.notes.title" linkend="sec.export.notes"/>参照)。</para>
</important>
<para>特定の設問について選択肢をシャフルせず順序を保つには、<option>choices</option>環境の<option>o</option>オプションを使用します。3行目を次のようにしてください:<programlisting>\begin{choices}[o]</programlisting></para>
<para>選択肢を2カラムに配置するには、<package>multicol</package>パッケージを使用できます。<programlisting>\usepackage{multicol}</programlisting>を用いてプリアンブル部(<package>automultiplechoice</package>への参照の直後など)でロードし、以下に示すようにmulticols環境の中にchoices環境を入れてください:<programlisting>\begin{multicols}{2}
\begin{choices}
\correctchoice{正しい選択肢}
\wrongchoice{誤った選択肢}
\wrongchoice{別の誤った選択肢}
\end{choices}
\end{multicols}</programlisting></para>
<para>選択肢がもっと短い場合、<option>choices</option>環境のかわりに<option>choiceshoriz</option>を用いることで、選択肢を横に並べていくことができます。</para>
<para>(正解が任意個あるような)複数選択問題には、<option>question</option>環境のかわりに<option>questionmult</option>を使用します。</para>
<para>どの選択肢を選んだかが成績に無関係な設問には、次の例のように<code>\QuestionIndicative</code>コマンドが使用できます。</para>
<para><programlisting>\begin{question}{難易度}\QuestionIndicative
\scoring{auto=0,v=-1,e=-2}
この授業は易しいですか難しいですか?0(非常に難しい)から5(非常に易しい)の範囲で選んでください。
\begin{choiceshoriz}[o]
\correctchoice{0}
\correctchoice{1}
\correctchoice{2}
\correctchoice{3}
\correctchoice{4}
\correctchoice{5}
\end{choiceshoriz}
\end{question}</programlisting>
</para>
<sect4 id="latex.lastchoice">
<title>Last choice</title>
<para><command>\lastchoices</command>コマンドを使用すると、一部の選択肢をシャフルせず常に末尾に置くことができます。</para>
<programlisting>\begin{question}{color}
なに色ですか?
\begin{choiceshoriz}
\wrongchoice{赤}
\wrongchoice{青}
\wrongchoice{黄}
\lastchoices
\correctchoice{透明}
\wrongchoice{わからない}
\end{choiceshoriz}
\end{question}
\begin{questionmult}{number}
いくつですか?
\begin{choiceshoriz}
\wrongchoice{なし}
\correctchoice{1}
\wrongchoice{2}
\wrongchoice{3}
\lastchoices
\correctchoice{あまり多くない}
\wrongchoice{たくさん}
\end{choiceshoriz}
\end{questionmult}</programlisting>
</sect4>
<sect4>
<title>設問番号</title>
<para>次の設問の番号は<code>\AMCnumero</code>コマンドで変更できます。各試験問題の実体化前に</para>
<para><programlisting>\AMCnumero{1}</programlisting></para>
<para>が呼び出されますが、どこで使用してもかまいません。</para>
<note>
<para>特定の設問の番号を非表示にして、番号の増加を抑制するには、次の例のように<command>\AMCquestionNumberfalse</command>を使用します:</para>
<programlisting>{
\AMCquestionNumberfalse
\def\AMCbeginQuestion#1#2{}
\begin{question}
...
\end{question}
}</programlisting>
</note>
</sect4>
</sect3>
<sect3 id="latex.explain">
<title id="latex.explain.title">設問の模範解答解説</title>
<para>設問に対する解答に解説を加えるには、<command>\explain</command>コマンドを使うことができます。解説はオプションであり、模範解答と設問カタログファイルにのみ表示されます。</para>
<warning>
<para>個別模範解答には表示されません。</para>
</warning>
<para>単純な例を示します:</para>
<para><programlisting>\begin{question}{解説}
次の中で標高が一番高いのはどれですか?
\begin{choices}
\correctchoice{サガルマータ}
\wrongchoice{K2}
\wrongchoice{モンブラン}
\wrongchoice{アコンカグア}
\end{choices}
\explain{サガルマータは文字どおり「世界の頂上」という意味で、世界一の標高をもつエベレスト山の地元名です。}
\end{question}</programlisting></para>
<note>
<para><command>explain</command>コマンドは<option>question</option>系の環境内でのみ使用できます。これには<option>question</option>、<option>questionmult</option>、<option>questionmultx</option>環境があります。</para>
</note>
<para>デフォルトではこのコマンドは解説の前に<emphasis>解説: </emphasis>と表示します。この動作は<command>\AMCtext</command>コマンドで変更できます(<xref linkend="AMCtext"/>参照)。</para>
<para>このデフォルト動作を特定の設問でのみ変更したい場合は、<command>\AMCtext</command>コマンドを次の例のように<command>\explain</command>の前に使用してください:</para>
<para><programlisting>\begin{question}{標高}
次の中で標高が一番高いのはどれですか?
\begin{choices}
\correctchoice{サガルマータ}
\wrongchoice{K2}
\wrongchoice{モンブラン}
\wrongchoice{アコンカグア}
\end{choices}
\explain{サガルマータは文字どおり「世界の頂上」という意味で、世界一の標高をもつエベレスト山の地元名です。}
\end{question}
\begin{question}{仲間はずれ}
次の中から仲間はずれを選びなさい。
\begin{choices}
\correctchoice{キリマンジャロ}
\wrongchoice{ヒマラヤ}
\wrongchoice{アルプス}
\wrongchoice{アンデス}
\end{choices}
\AMCtext{explain}{\textit{\textbf{理由: }}}
\explain{キリマンジャロは山ですが、残りは山脈です。}
\end{question}
\begin{questionmult}{ヒマラヤ}
次の中でヒマラヤにあるのはどれですか?すべて選びなさい。
\begin{choices}
\correctchoice{エベレスト山}
\correctchoice{K2}
\wrongchoice{モンブラン}
\wrongchoice{アコンカグア}
\end{choices}
\explain{アコンカグアはアンデス山脈にあり、モンブランはアルプスにあります。}
\end{questionmult}</programlisting></para>
<para>このようにすると、最初と三つめの設問では解説の前に<emphasis>解説: </emphasis>と表示しますが、二つ目の設問の解説の前には<emphasis>理由: </emphasis>と表示されます。</para>
</sect3>
<sect3 id="latex.choices.multicol">
<title>選択肢を複数カラムに配置</title>
<para>(スペースを節約するために)選択肢を複数のカラムに置くには、LaTeXの<package>multicol</package>パッケージを用いて、<option>multicols</option>環境内に<option>choices</option>環境を入れることができます。</para>
<para>選択肢がカラムの1行におさまらない場合、その一部が次のカラムに分割されてしまうことがあり、これは受験者を混乱させるかもしれません。この現象を避けるには、<command>\AMCBoxedAnswers</command>コマンドを使用して、各選択肢をボックスに入れてしまうことができます。使用例を示します:</para>
<para><programlisting>\begin{question}{2カラム}
鳥とは何ですか?
\begin{multicols}{2}\AMCBoxedAnswers
\begin{choices}
\correctchoice{翼をもった動物で、卵を産みます。あらゆる種類の色をもった鳥がいます。}
\wrongchoice{木製の大きな家具で、多くの場合、家庭用の衣類を保管するのに使われます。}
\wrongchoice{蒸気で動く機械で、高速に缶を密封することができます。}
\end{choices}
\end{multicols}
\end{question}</programlisting></para>
<para>複数カラム等のブロック内の選択肢間の垂直間隔はパラメータ化されており、寸法<parameter>AMCinterBrep</parameter>により変更することができます:</para>
<para><programlisting>\AMCinterBrep=.5ex</programlisting></para>
</sect3>
<sect3 id="latex.choices.space">
<title>選択肢間のスペース</title>
<para>通常の選択肢間の垂直間隔もパラメータ化されており、寸法<parameter>AMCinterIrep</parameter>により変更することができます:</para>
<para><programlisting>\AMCinterIrep=.75ex</programlisting></para>
</sect3>
<sect3 id="marks.display.area">
<title id="marks.display.area.title">得点表記領域の定義</title>
<para>得点表記領域に<package>tikz</package>パッケージを用いてオプションを付加することができます(<xref
endterm="marks.position.title" linkend="marks.position"/>参照)。</para>
<programlisting>\usepackage{tikz}</programlisting>
<sect4 id="latex.zone.std">
<title><option>separateanswersheet</option>オプションを使用しない場合</title>
<para>以下のコマンドを<command>\begin{document}</command>コマンドから<command>\onecopy</command>コマンドまでの間に入力してください:</para>
<programlisting>\AMCsetScoreZone{width=1.5em,height=1.5ex,depth=.5ex,position=margins}</programlisting>
<para><parameter>width</parameter>, <parameter>height</parameter>, <parameter>depth</parameter>の各変数は得点表記領域の寸法を表します。</para>
<para><parameter>position</parameter>の値は、none, question, margin, marginsのいずれかです。</para>
</sect4>
<sect4 id="latex.zone.separate">
<title><option>separateanswersheet</option>オプションを使用する場合</title>
<para>以下のコマンドを<command>\begin{document}</command>コマンドから<command>\onecopy</command>コマンドまでの間に入力してください:</para>
<programlisting>\AMCsetScoreZoneAnswerSheet{width=1.5em,height=1.5ex,depth=.5ex,position=question}</programlisting>
<para><parameter>width</parameter>, <parameter>height</parameter>, <parameter>depth</parameter>の各変数は得点表記記入領域の寸法を表します。</para>
<para><parameter>position</parameter>の値は、none, question, margin, marginsのいずれかです。</para>
<warning>
<para><option>margins</option> オプションはAMC-TXTでは動作しません。</para>
<para>これらのコマンドを、試験問題の印刷<emphasis>後</emphasis>に入力してはいけません。</para>
</warning>
</sect4>
</sect3>
<sect3 id="Groups.questions">
<title id="Groups.questions.title">設問のグループ</title>
<para>設問をグループに入れることにより、グループ内の設問をシャフルして試験問題の実体ごとに順序を変えることができます。それぞれの設問グループは通常文字によるグループ名をもたなければなりません。</para>
<para>設問を一つ一つグループに入れるには、次の例のようにします。</para>
<para><programlisting>\element{マイグループ}{
\begin{question}{簡単}
では、1足す1はいくつですか?
\begin{choiceshoriz}
\correctchoice{2}
\wrongchoice{0}
\wrongchoice{3}
\end{choiceshoriz}
\end{question}
}</programlisting></para>
<important>
<para><command>element</command>を用いたグループの構築は1回しか行ってはいけません。そのため、これらは、試験問題の実体ごとに内容を繰り返す<command>onecopy</command>コマンドの<emphasis>前に</emphasis>置かなければなりません。</para>
</important>
<para>最後に、グループの内容は<command>insertgroup</command>コマンドを用いて、<programlisting>\insertgroup{mygroup}</programlisting>のようにして試験問題用紙に出力されます。</para>
<para>グループの出力方法は<command>setgroupmode</command>コマンド(グループの作成後、<command>onecopy</command>の前に1度だけ実行)で設定するグループモードによって制御されます:</para>
<programlisting>\setgroupmode{mygroup}{XXX}</programlisting>
<para><code>XXX</code>は以下のいずれかです:</para>
<variablelist>
<varlistentry>
<term>fixed</term>
<listitem>
<para>このモードでは、出力のたびに、グループの要素を先頭から取ります。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>cyclic</term>
<listitem>
<para>そのグループで前回使用した要素の次から要素を取り、必要ならリサイクルします。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>withreplacement</term>
<listitem>
<para>グループを使用する前にシャフルする以外は<code>fixed</code>と同様です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>withoutreplacement</term>
<listitem>
<para><code>cyclic</code>と同様ですが、リサイクルでグループの先頭に戻るときにシャフルします。</para>
</listitem>
</varlistentry>
</variablelist>
<para>次に作成するグループ(グループは最初の<command>element</command>で作成されます)のデフォルトのグループモードは、次のコマンドで設定できます:</para>
<programlisting>\setdefaultgroupmode{XXX}</programlisting>
<para>モードをまったく指定していない場合は、<code>fixed</code>モードが使用されます。</para>
<para>グループを構築すると、<command>shufflegroup</command>コマンドを次のように用いてグループ内の設問をシャフルすることができます:<programlisting>\shufflegroup{マイグループ}</programlisting></para>
<para>しかし、<command>shufflegroup</command>コマンドは、グループモードを適切に使用することでいつでも置き換えられます。</para>
<warning>
<para>AMC 1.2.2014.111201より前のバージョンでレイアウトした試験問題を再利用し、デフォルト(<code>fixed</code>)以外のモードを選択する場合は、<command>\shufflegroup</command>コマンドを忘れずに削除してください。</para>
</warning>
<para>設問グループは、次のようなコマンドによって、より細かく操作することができます:</para>
<itemizedlist>
<listitem>
<para><code>\insertgroup[n]{マイグループ}</code>は、(オプションのパラメータ<replaceable>n</replaceable>を使用することにより)グループ内の最初の<replaceable>n</replaceable>要素だけ出力します。</para>
</listitem>
<listitem>
<para><code>\insertgroupfrom[n]{グループ名}{i}</code>は<code>\insertgroup[n]{groupname}</code>と同じですが、<replaceable>i</replaceable>番目(先頭は0番目)の要素から開始します。</para>
</listitem>
<listitem>
<para><code>\cleargroup{マイグループ}</code>は、グループの中身を空にします。</para>
</listitem>
<listitem>
<para><code>\copygroup{グループA}{グループB}</code>は、<replaceable>グループA</replaceable>の全要素を<replaceable>グループB</replaceable>の最後にコピーします。オプション引数<replaceable>n</replaceable>を用いると、最初の<replaceable>n</replaceable>要素だけコピーされます: <code>\copygroup[n]{グループA}{グループB}</code></para>
</listitem>
</itemizedlist>
<para>これらのコマンドを用いれば、例えば次のコードにより、GAグループからランダムに4個、GBグループからランダムに5個、GOグループから全設問を取り出して、それらをシャフルするということができます(<command>onecopy</command>コマンドの引数内部で使用します。また、<code>GA</code>, <code>GB</code>, <code>all</code>のグループモードは<code>withoutreplacement</code>または<code>withreplacement</code>とします):</para>
<programlisting>\cleargroup{all}
\copygroup[4]{GA}{all}
\copygroup[5]{GB}{all}
\copygroup{GO}{all}
\insertgroup{all}</programlisting>
<itemizedlist>
<listitem>
<para><code>\copygroupfrom[n]{groupA}{groupB}{i}</code>は<code>\copygroup[n]{groupA}{groupB}</code>と同じですが、<replaceable>i</replaceable>番目(先頭は0番目)の要素から開始します。</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="latex.page">
<title>用紙サイズと余白</title>
<para>LaTeXの<command>automultiplechoice</command>パッケージは<command>geometry</command>を用いて余白とページレイアウトを設定しています。その設定を上書きするには、<code>\begin{document}</code>の直前で<command>\geometry</command>コマンドを用いてください。詳細はgeometryパッケージのドキュメントを参照してください。AMCが設定する初期値は次のとおりです:</para>
<programlisting>\geometry{hmargin=3cm,headheight=2cm,headsep=.3cm,footskip=1cm,top=3.5cm,bottom=2.5cm}</programlisting>
<para>スペースを広げるために余白を縮めるときは、以下に注意してください:</para>
<itemizedlist>
<listitem>
<para>四隅のマーカーは完全に印刷されていなければなりません(プリンタの印刷可能範囲により欠けてしまう可能性があります)。</para>
</listitem>
<listitem>
<para>四隅のマーカーはスキャン画像上で完全に見えなければなりません(マーカーが用紙の端ぎりぎりのとき、用紙がずれたり傾いたりすると、画像からはみ出してしまいます)。</para>
</listitem>
</itemizedlist>
<para><command>\geometry</command>コマンドの引数リストの一つのオプションとして用紙サイズを設定することもできます。可能な値は、<code>a4paper</code>、<code>a5paper</code>、<code>a6paper</code>、<code>b4paper</code>、<code>b5paper</code>、<code>ansibpaper</code>、<code>ansicpaper</code>、<code>ansidpaper</code>、<code>letterpaper</code>、<code>executivepaper</code>、<code>legalpaper</code>などです。</para>
<para>用紙サイズが小さいときは、(<code>+1/1/53+</code>のような)目視用の用紙IDの位置を変更したい場合があるかもしれません。これは次のような形式で、<command>\AMCidsPosition</command>コマンドを用いることでできます:</para>
<programlisting>\AMCidsPosition{pos=<replaceable>p</replaceable>,width=<replaceable>w</replaceable>,height=<replaceable>h</replaceable>}</programlisting>
<para>ここで、<replaceable>p</replaceable>は<code>none</code>、<code>top</code>、<code>side</code>のいずれかで、<replaceable>w</replaceable>、<replaceable>h</replaceable>はIDを含む(見えない)ボックスの寸法です。デフォルト値は次の値です:</para>
<programlisting>\AMCidsPosition{pos=side,width=4cm,height=3ex}</programlisting>
<para>最後に、A5用紙のための設定例を示します:</para>
<programlisting>\geometry{a5paper,hmargin=1.6cm,top=2.5cm}
\AMCidsPosition{pos=top}</programlisting>
<warning>
<para><command>pgfpages</command>パッケージや、他のレイアウト用パッケージをロードしないでください。</para>
</warning>
</sect3>
<sect3 id="box.style">
<title id="box.style.title">マーク用ボックスの外見スタイル</title>
<para><command>\AMCboxStyle</command>コマンド(旧称の<command>\AMCboxDimensions</command>も使用可能です)により、マーク用ボックスの寸法を変えることができます。</para>
<para>デフォルト値:</para>
<programlisting>\AMCboxStyle{shape=square,size=2.5ex,down=.4ex,rule=.5pt,outsidesep=.1em,color=black}</programlisting>
<itemizedlist>
<listitem>
<para><option>shape</option>はボックスの形状です。<replaceable>square</replaceable>とすれば四角形になり、<replaceable>oval</replaceable>とすれば円または長円になります。<replaceable>oval</replaceable>を使用するにはLaTeXのtikzパッケージをロードする必要があることに注意してください。</para>
</listitem>
<listitem>
<para><option>width</option>はボックスの幅です。</para>
</listitem>
<listitem>
<para><option>height</option>はボックスの高さです。</para>
</listitem>
<listitem>
<para><option>size</option>はボックスのサイズ(<option>width</option>と<option>height</option>)です。</para>
</listitem>
<listitem>
<para><option>rule</option>はボックスの枠の太さです。</para>
</listitem>
<listitem>
<para><option>down</option>はボックスをどれだけ下に下げるかを制御します。</para>
</listitem>
<listitem>
<para><option>outsidesep</option>は、<option>outsidebox</option>オプションを選択したときに、ボックスとその外に印刷する文字との間隔です(<xref endterm="sec.package.options.title" linkend="sec.package.options"/>参照)。</para>
</listitem>
<listitem>
<para><option>cross=true</option>正答を表すボックス(模範解答用紙で表示されます)を、黒の塗りつぶしではなくクロス記号で示します。</para>
</listitem>
<listitem>
<para><option>crossrule=1.5pt</option>クロス記号の太さです。</para>
</listitem>
<listitem>
<para><option>color=<replaceable>col</replaceable></option>はボックスを描画する色を指定します。<replaceable>col</replaceable>は<command>xcolor</command>パッケージで認識できる表記でなければなりません。例えば<replaceable>red</replaceable>のような名前も使用できます。また次のように好みの色を定義することもできます。</para>
<programlisting>\definecolor{mylightgreen}{rgb}{0.67,0.88,0.5}
\AMCboxStyle{color=mylightgreen}</programlisting>
</listitem>
</itemizedlist>
<para>小さめのボックスを作るには、例えば次のようなコマンドを使ってください:</para>
<programlisting>\AMCboxStyle{size=1.7ex,down=.2ex}</programlisting>
<para>パッケージの<option>separateanswersheet</option>オプションを使用しているときは、ボックスのラベルをカスタマイズすることもできます。デフォルトの動作は大文字アルファベットによるラベルですが、<option>digits</option>オプションを用いると数字になります。独自のラベルを用いるには、<command>\AMCchoiceLabel</command>コマンドを再定義する必要があります。このコマンドは、選択肢を数えるカウンタ名を引数にとります。例えば以下のコードにより、ボックスのラベルにアルファベットの小文字を用いるようになります:</para>
<programlisting>\def\AMCchoiceLabel#1{\alph{#1}}</programlisting>
<para>別の例として、<package>arabxetex</package>パッケージを使用している場合、以下のコードが便利かもしれません:</para>
<programlisting>\def\AMCchoiceLabel#1{\textLR{\Alph{#1}}}</programlisting>
<para>ボックス内ラベルのスタイルも、次の例のように<command>\AMCchoiceLabelFormat</command>コマンドを再定義して変更することができます(ラベルを太字にしたいとします):</para>
<programlisting>\def\AMCchoiceLabelFormat#1{\textbf{#1}}</programlisting>
<para>ボックス外ラベルのスタイルも、次の例のように<command>\AMCoutsideLabelFormat</command>コマンドを再定義して変更することができます(ラベルを太字にしたいとします):</para>
<programlisting>\def\AMCoutsideLabelFormat#1{\textbf{#1}}</programlisting>
<note>
<para>正答のボックスにマークを表示するかどうかのスイッチは<command>\AMC@correc</command>です。\begin{document}の後に、これをtrueに設定するコマンドを定義できます。</para>
<programlisting>\makeatletter
\def\AMCforcecorrect{\AMC@correctrue}
\makeatother</programlisting>
<para>そして、特定の設問で使用します(効果がその設問のみに限定されるよう、波括弧で囲みます):</para>
<programlisting>{\AMCforcecorrect\begin{questionmult}{test}\QuestionIndicative
.....
\end{questionmult}
}</programlisting>
<para>AMCがこの設問の得点を計算しないよう(採点基準を0点とするか<command>\QuestionIndicative</command>を用いて)設定するべきです。</para>
</note>
</sect3>
<sect3 id="latex.style">
<title>設問の外見スタイル</title>
<para>LaTeXの<command>AMCbeginQuestion</command>コマンドを再定義することにより、各設問の外見を変更することができます。デフォルトの定義は次のとおりです:</para>
<para><programlisting>\def\AMCbeginQuestion#1#2{\par\noindent{\bf Question #1} #2\hspace*{1em}}</programlisting></para>
<para>このコマンドに与えられる最初のパラメータは表示する設問の番号です。2番目は複数選択問題の場合に<code>\multiSymbole</code>を含み、それ以外の場合は空です。<code>\multiSymbole</code>コマンドは複数選択問題を他と区別できるようにするためのものであり、これも変更することができます。デフォルトではトランプのクラブ記号です。</para>
<para><programlisting>\def\multiSymbole{$\clubsuit$}</programlisting></para>
<warning>
<para>指名試験問題用紙(<xref endterm="Nominative.sheets.title" linkend="Nominative.sheets"/>参照)を使用する場合は、プリアンブルで次のように新しいコマンドを設定し、</para>
<informalexample>
<programlisting>\def\Iswitch{\def\AMCbeginQuestion##1##2{}\AMCquestionNumberfalse}</programlisting>
</informalexample>
<para>必要な箇所で使用します(効果の範囲を限定するため、波括弧内に記述することを忘れないでください):</para>
<programlisting>{\Iswitch
\begin{question}{Number}
大きいものを選びなさい。
\begin{choiceshoriz}[o]
\wrongchoice{200}\wrongchoice{2}\wrongchoice{20}\wrongchoice{200}\correctchoice{600}
\end{choiceshoriz}
\end{question}
}</programlisting>
</warning>
<para>選択肢の外見も、<option>choices</option>や<option>choiceshoriz</option>のかわりに<option>choicescustom</option>を用いれば、次の三つのLaTeXマクロを再定義して同様に変更できます:</para>
<programlisting>\def\AMCbeginAnswer{}
\def\AMCendAnswer{}
\def\AMCanswer#1#2{#1 #2}</programlisting>
<important>
<para><command>\onecopy</command>コマンド内では、<code>#</code>は2重にしてください。</para>
<programlisting>\def\AMCanswer##1##2{##1 ##2}
\def\AMCbeginQuestion##1##2{}</programlisting>
</important>
<para>以下の寸法を再定義すれば間隔を変更することもできます(これはデフォルト値です):</para>
<programlisting>\AMCinterIrep=0pt
\AMCinterBrep=.5ex
\AMCinterIquest=0pt
\AMCinterBquest=3ex
\AMCpostOquest=7mm
\setlength{\AMChorizAnswerSep}{3em plus 4em}
\setlength{\AMChorizBoxSep}{1em}
</programlisting>
<para>これらの寸法は、標準モード用(<code>I</code>)とボックスモード用(<code>B</code>)(<command>\AMCBoxedAnswers</command>の使用時や<option>box</option>パッケージオプション使用時)での設問間(<code>quest</code>)と選択肢間(<code>rep</code>)の垂直スペース、および記述式設問後のスペースです。最後の二つの長さは <option>choicescustom</option> 環境内で使用されます。</para>
</sect3>
<sect3 id="latex.layout">
<title>レイアウト</title>
<sect4 id="latex.layout.margins">
<title>マージン</title>
<para>マージンはほとんどのプリンタで正しく印刷できるように選んであります。変更するには、LaTeXの<package>geometry</package>パッケージにある<command>geometry</command>コマンドを使用することができます。例えば、トップマージンを減らすには、デフォルトの3.5cmの代わりに、<code>\begin{document}</code>の直前で<code>\geometry{top=3cm}</code>とします。</para>
</sect4>
<sect4 id="latex.layout.npages">
<title>ページ番号</title>
<para>AMCは各試験問題のページ番号を自動的に取り扱います。各試験問題の末尾や問題用紙と答案用紙の区切りなどに<command>\AMCaddpagesto{integer}</command>コマンドを置くと、いくつか空ページが挿入され、その次のページ番号が各試験問題で同一になります。</para>
</sect4>
</sect3>
<sect3 id="latex.style.separate">
<title>別紙答案用紙方式</title>
<para><option>separateanswersheet</option>オプション(<xref linkend="secensemble"/>参照)で生成される別紙答案用紙のレイアウトを変更することも可能です。</para>
<orderedlist>
<listitem>
<para>マーク用ボックスの水平間隔を変更したり、設問間の垂直間隔を変更したりするだけならば、以下の寸法を再定義するだけです:</para>
<programlisting>\AMCformHSpace=.3em
\AMCformVSpace=1.2ex
</programlisting>
</listitem>
<listitem>
<para>表示設定をもっと細かく変更したい場合は、各設問と選択肢の開始に使われるコマンドを再定義することができます:</para>
<programlisting>\def\AMCformBeforeQuestion{\vspace{\AMCformVSpace}\par}
\def\AMCformQuestion#1{{\bf 問 #1:} }
\def\AMCformAnswer#1{\hspace{\AMCformHSpace} #1}
</programlisting>
</listitem>
</orderedlist>
<para>これらの定義は、LaTeXファイルの<code>\begin{document}</code>の直後に挿入しなければなりません。</para>
</sect3>
<sect3 id="latex.codes">
<title>受験番号取得</title>
<para>受験番号の取得はLaTeXの<command>\AMCcodeGridInt[<replaceable>options</replaceable>]{<replaceable>key</replaceable>}{<replaceable>n</replaceable>}</command>コマンドを使用して、受験者に答案用紙上に自分の受験番号を記入してもらうことで、容易に行うことができます。このコマンドの二つの引数は、設問キー(識別名)と、受験番号に用いる桁数<replaceable>n</replaceable>です。例えば次のようなヘッダーを用いることができます:</para>
<para><programlisting>{\setlength{\parindent}{0pt}\hspace*{\fill}\AMCcodeGridInt{受験番号}{8}\hspace*{\fill}
\begin{minipage}[b]{6.5cm}
$\longleftarrow{}$\hspace{0pt plus 1cm} 受験番号を以下にマークし、その下に氏名を記入してください。
\vspace{3ex}
\hfill\namefield{\fbox{
\begin{minipage}{.9\linewidth}
氏名:
\vspace*{.5cm}\dotfill
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}
}}\hfill\vspace{5ex}\end{minipage}\hspace*{\fill}
}
</programlisting></para>
<para><option>separateanswersheet</option>オプションを用いている場合は、
<command>\AMCcodeGridInt</command>コマンドは<command>\AMCformBegin</command>コマンドの後に置く必要があります。</para>
<para>記入欄は、長さ <command>\AMCcodeHspace</command>、<command>\AMCcodeVspace</command> を変更することにより調整することができます。それぞれ、ボックス間の水平および垂直の間隔です。デフォルト値は次のように設定されています:</para>
<programlisting>\AMCcodeHspace=.5em
\AMCcodeVspace=.5em
</programlisting>
<para><command>\AMCcodeGrid[<replaceable>options</replaceable>]{<replaceable>key</replaceable>}{<replaceable>description</replaceable>}</command> コマンドは、より複雑な構造の受験番号を扱いたいときに使用できます。<replaceable>description</replaceable> はカンマ区切りの候補文字集合のリストです。一例として、AからEの英字1文字の後に3桁の数字で構成されるような受験番号は、<command>\AMCcodeGrid{client}{ABCDE,0123456789,0123456789,0123456789}</command> により扱うことができます。</para>
<para><command>\AMCcodeGrid</command> と <command>\AMCcodeGridInt</command> の二つのコマンドは、以下のオプション(<replaceable>options</replaceable> 引数にカンマ区切りで指定)を認識します:</para>
<variablelist>
<varlistentry>
<term>vertical=<replaceable>bool</replaceable></term>
<listitem>
<para>で <replaceable>bool</replaceable> を <code>true</code> か <code>false</code> にすると、指定した方向を使用します(デフォルトは <code>true</code> です)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>v</term>
<listitem>
<para>は <code>vertical=true</code> の別名です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>h</term>
<listitem>
<para>は <code>vertical=false</code> の別名です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>top</term>
<listitem>
<para>は、各カラムの上端を垂直方向に揃えます。</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 id="openquestions">
<title>記述式設問</title>
<para>試験問題に記述式設問を加えたい場合があるかもしれません。一つの方法は、そういった設問のマーク用ボックスを採点者用に予約しておくことです。試験実施後、記入された答案を読んで、採点者が評価に該当するボックスにマークをつけます。そして答案をスキャンしてAMCで採点すれば、その点数を得点に組み入れることができます。<programlisting>\begin{question}{記述}
\emph{インフレーション}の定義を述べよ。
\AMCOpen{lines=5}{\wrongchoice[W]{誤}\scoring{0}\wrongchoice[P]{部}\scoring{1}\correctchoice[C]{正}\scoring{2}}
\end{question}
</programlisting></para>
<para>この例では、採点用にボックスが3個作成されます。最初の(誤りの「誤」のラベルのついた)ボックスをマークすると、受験者は0点を獲得します。2番目の(部分点の「部」のラベルのついた)ボックスをマークすると、受験者は1点を獲得します。3番目の(正解の「正」のラベルのついた)ボックスをマークすると、受験者は2点を獲得します。</para>
<para><command>\AMCOpen</command>の最初の引数はカンマで区切ったオプションです。使用できるオプションは次のとおりです:</para>
<variablelist>
<varlistentry>
<term>lineup=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、解答欄と採点用ボックスを同じ行に並べます。<code>false</code>(デフォルト)なら、解答欄を枠で囲み、採点用ボックスの下に配置します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lineuptext=<replaceable>text</replaceable></term>
<listitem>
<para><code>lineup=true</code>のとき、このテキストと解答欄を同じ行に並べます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lines=<replaceable>num</replaceable></term>
<listitem>
<para>解答の行数を設定します。デフォルト値は<code>1</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lineheight=<replaceable>dim</replaceable></term>
<listitem>
<para>各行の高さを設定します。デフォルト値は<code>1cm</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>dots=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>(デフォルト)なら、各行に点線を引きます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>contentcommand=<replaceable>cmdname</replaceable></term>
<listitem>
<para>解答領域の内容をカスタマイズするにはこのオプションを使用してください。内容を生成するための<command>\<replaceable>cmdname</replaceable></command>コマンドを定義する必要があります。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>hspace=<replaceable>dim</replaceable></term>
<listitem>
<para>採点用ボックスの間隔を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>backgroundcol=<replaceable>color</replaceable></term>
<listitem>
<para>採点領域の背景色を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>foregroundcol=<replaceable>color</replaceable></term>
<listitem>
<para>採点用ボックスの枠の色を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>scan=<replaceable>bool</replaceable></term>
<listitem>
<para><code>false</code>なら、採点用ボックスをスキャンしません(これは、この設問に限り手動でマーク認識することにして、受験者がボックスに何を記入しても無視したい場合に便利です)。デフォルトは<code>true</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>annotate=<replaceable>bool</replaceable></term>
<listitem>
<para><code>false</code>(デフォルト)なら、答案に採点記入する際、ボックスに記号をつけません(素点のみ記入されます)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>question=<replaceable>text</replaceable></term>
<listitem>
<para>採点者が設問を識別しやすくするための短いテキストを設定します。このテキストは、別紙答案用紙を用いる場合のみ、採点用ボックスの前に記載されます。</para>
<para>questionのみ指定すると、デフォルトで設問の識別名が表示されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>answer=<replaceable>text</replaceable></term>
<listitem>
<para>模範解答用紙の解答欄に記入される短いテキストを設定します。</para>
</listitem>
</varlistentry>
</variablelist>
<tip>
<para><emphasis>onecopyコマンドの外</emphasis>で<command>\savebox</command>コマンドを使用すると、改行を含む長いテキストを表示できます。</para>
<programlisting>
\newsavebox{\correcbox}
\savebox{\correcbox}{\parbox{5cm}{\color{red}{ここで改行\\あるいは\\ここで...}}}
</programlisting>
<para>ボックスの中身を呼び出すには次のようにします:</para>
<programlisting>
\AMCOpen{lines=4,lineheight=0.15cm, answer= \usebox{\correcbox}}{問題}
</programlisting>
</tip>
<variablelist>
<varlistentry>
<term>width=<replaceable>dim</replaceable></term>
<listitem>
<para><code>lineup=false</code>のときの、解答欄を囲む枠の幅を設定します。デフォルト値は<code>.95\linewidth</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>framerule=<replaceable>dim</replaceable></term>
<listitem>
<para>解答欄を囲む枠の線幅を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>framerulecol=<replaceable>color</replaceable></term>
<listitem>
<para>解答欄を囲む枠の色を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>boxmargin=<replaceable>dim</replaceable></term>
<listitem>
<para>採点用ボックスの周囲の余白を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>boxframerule=<replaceable>dim</replaceable></term>
<listitem>
<para>採点用ボックスの周囲枠の線幅を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>boxframerulecol=<replaceable>color</replaceable></term>
<listitem>
<para>採点用ボックスの周囲枠の色を設定します。</para>
</listitem>
</varlistentry>
</variablelist>
<para>これらのパラメータの(試験全体での)デフォルト値は、次のようにして<command>\AMCopenOpts</command>コマンドで設定できます</para>
<programlisting>\AMCopenOpts{boxframerule=2pt,boxframerulecol=red}</programlisting>
<para>さらに、<command>\AMCotextReserved</command>コマンドを次のように再定義すると、受験者にマークしないように指示するテキストを採点領域に書くことができます:</para>
<programlisting>\def\AMCotextReserved{\emph{この欄には記入しないこと}}</programlisting>
<para>別紙答案用紙を用いている場合は、各設問に付け加えるテキストを次のように定義できます:</para>
<programlisting>\def\AMCotextGoto{\par{\bf\emph{解答は別紙答案用紙に記入してください。}}}</programlisting>
<tip>
<para>ボックス数が多く一定幅で改行させたい場合は、次のヒント(<command>\parbox</command>)が使えます。</para>
<programlisting>\AMCOpen{lines=6}{
\hbox{\parbox{8.5cm}{
\correctchoice[1]{1}\scoring{b=1}
\correctchoice[2]{2}\scoring{b=2}
\correctchoice[3]{3}\scoring{b=3}
\correctchoice[4]{4}\scoring{b=4}
\correctchoice[5]{5}\scoring{b=5}
\correctchoice[6]{6}\scoring{b=6}
\correctchoice[7]{7}\scoring{b=7}
\correctchoice[8]{8}\scoring{b=8}
\correctchoice[9]{9}\scoring{b=9}
\correctchoice[10]{10}\scoring{b=10}
\wrongchoice[F]{F}\scoring{b=0}
}}
}
</programlisting>
</tip>
</sect3>
<sect3 id="latex.oneletter">
<title>1文字選択肢</title>
<para>選択肢の記述に長い文章は必要でなく1文字で十分の場合があります。別紙答案用紙を用いる場合、問題用紙と答案用紙の両方にボックスを表示するのはとても面倒です。そのような場合、<code>choices</code>環境のかわりに<command>\AMCBoxOnly</command>コマンドを使用してください:</para>
<programlisting>\begin{question}{arm}
図中の\textbf{腕}を示す文字はどれですか?
\AMCBoxOnly{ordered=true}{\wrongchoice[A]{}\correctchoice[B]{}%
\wrongchoice[C]{}\wrongchoice[D]{}}
\end{question}</programlisting>
<para><command>\AMCBoxOnly</command>の最初の引数はカンマで区切ったオプションです。使用できるオプションは次のとおりです:</para>
<variablelist>
<varlistentry>
<term>help=<replaceable>text</replaceable></term>
<listitem>
<para>別紙答案用紙のボックスの前にリマインダーのテキストを表示します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ordered=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>(デフォルト値は<code>false</code>)なら、選択肢はシャフルされません。</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
<sect3 id="latex.seed">
<title>シャフルパラメータの選択</title>
<para>シャフルの生成に用いる乱数生成器のシードは、以下のコマンドで変更することができます(documentの最初の方で、少なくとも<command>onecopy</command>コマンドの外で使わなければなりません):</para>
<para><programlisting>\AMCrandomseed{1527384}</programlisting></para>
<para>割り当てた値(1から4194303までの中から選びます)が変更されると、シャフルが変わります。もちろん、試験問題用紙を印刷した後は、この値を変更してはいけません。</para>
<note>
<para>値はxyファイルに(<code>\rngstate{1}{1515}</code>のように)記録されます。デフォルト値は1515です。</para>
</note>
</sect3>
<sect3 id="latex.separate.sect">
<title>セクション分けと別紙答案用紙</title>
<para>別紙答案用紙上にもセクション分けが見えるようにするには、<command>\section</command>と<command>\subsection</command>の代わりに、<command>\AMCsection</command>と<command>\AMCsubsection</command>を使用してください。(番号なしセクション用に<command>\AMCsection*</command>と<command>\AMCsubsection*</command>も定義されています)</para>
</sect3>
<sect3 id="latex.refs">
<title>試験問題内での参照</title>
<para>LaTeXのコマンド<command>\label</command>、<command>\ref</command>、<command>\pageref</command>コマンドを設問や選択肢で用いると、試験問題の実体化ごとに同じ引数で呼び出され、毎回参照する番号が変わるので、問題が発生します。これを解決するには、それぞれ<command>\AMClabel</command>、<command>\AMCref</command>、<command>\AMCpageref</command>を用いてください。これらは、<command>\label</command>、<command>\ref</command>、<command>\pageref</command>を呼び出す前に、引数に実体の番号を付加します。</para>
<note>
<para>バージョン1.2.2015.102901以降では<command>\AMCqlabel</command>ではなく<command>\AMClabel</command>を使ってください。旧コマンドは以前のtexファイルとの互換性のために残しています。</para>
</note>
<para>また、各実体化の最初に、カウンタを0にリセットする必要があります。一例として、別の用紙にまとめて配置された図への参照を行いたいとき、次のように書けます:</para>
<programlisting>\element{動物}{
\begin{figure}[p]
\centering
\includegraphics[width=.6\linewidth]{tiger}
\caption{とある動物}
\AMClabel{虎}
\end{figure}
\begin{question}{tiger}
図\AMCref{虎}(\AMCpageref{tiger}ページ)の動物は何ですか?
\begin{choices}
\correctchoice{トラ}
\wrongchoice{キリン}
\wrongchoice{ゾウ}
\wrongchoice{ネコ}
\end{choices}
\end{question}
}</programlisting>
<para>そして重要なのは、<command>\onecopy</command>コマンドの直後に</para>
<programlisting>\setcounter{figure}{0}</programlisting>
<para>を挿入して、図の番号がどの実体でも1から始まるようにすることです。これを行わないと、実体ごとに番号が増加してしまい、意図した動作ではなくなってしまいます。</para>
<sect4 id="cleveref">
<title>cleverefパッケージの使用</title>
<para>このパッケージは、設問番号、設問ページ番号、ラベルのページ番号を昇順にソートします(ドキュメント<ulink url="http://mirrors.ctan.org/macros/latex/contrib/cleveref/cleveref.pdf">http://mirrors.ctan.org/macros/latex/contrib/cleveref/cleveref.pdf</ulink>)。</para>
<warning>
<para>このパッケージは、<package>automuliplechoice</package>パッケージの<emphasis>後</emphasis>にロードしなければなりません。</para>
</warning>
<para>このパッケージを使用するために新しいコマンド<command>\AMCstudentlabel</command>を導入しました。<programlisting>\cref{\AMCstudentlabel{led},\AMCstudentlabel{lamp},\AMCstudentlabel{moter}}</programlisting><emphasis>led</emphasis>, <emphasis>lamp</emphasis>, <emphasis>moter</emphasis>は、設問を参照するために \AMClabel{led}, \AMClabel{lamp}, \AMClabel{moter} で作成されたラベルです。これらの設問の番号はコンパイル時に自動的にソートされます。</para>
</sect4>
</sect3>
<sect3 id="AMCtext">
<title>AMCが挿入するテキストのカスタマイズ</title>
<para>以下のカスタマイズには<command>\AMCtext</command>を使用してください:</para>
<itemizedlist>
<listitem>
<para><code>\AMCtext{none}{<replaceable>sentence</replaceable>}</code>は、<option>completemulti</option>オプションを使用する場合の「該当なし。」(日本語でのデフォルトテキスト)を、指定した<replaceable>sentence</replaceable>に置換します。</para>
</listitem>
<listitem>
<para><code>\AMCtext{corrected}{<replaceable>title</replaceable>}</code>は、模範解答用紙に表示される「模範解答」(日本語でのデフォルトテキスト)を、指定した<replaceable>title</replaceable>に置換します。</para>
</listitem>
<listitem>
<para><code>\AMCtext{catalog}{<replaceable>title</replaceable>}</code>は、<option>catalog</option>オプションで生成される設問カタログに表示される「設問カタログ」(日本語でのデフォルトテキスト)を、指定した<replaceable>title</replaceable>に置換します。</para>
</listitem>
<listitem>
<para><code>\AMCtext{explain}{<replaceable>title</replaceable>}</code>は、<command>explain</command>コマンドのために生成される解説の前に表示する「<emphasis>解説</emphasis>」(日本語でのデフォルトテキスト)を、指定した<replaceable>title</replaceable>に置換します。</para>
<para>このコマンドのデフォルトオプションは次のとおりです:</para>
<programlisting>\AMCtext{explain}{\textit{\textbf{解説: }}}</programlisting>
</listitem>
<listitem>
<para>同様に、以下のようなコマンドも検討できます(2番目の引数は日本語でのデフォルトテキストです):</para>
<programlisting>\AMCtext{draft}{ドラフト}
\AMCtext{message}{試験の実施には、auto-multiple-choiceでコンパイルされた文書を印刷してください。}</programlisting>
</listitem>
<listitem>
<para><code>\AMCsetFoot{<replaceable>text</replaceable>}</code>はフッタに表示するテキストを設定します。例えば、ページ番号を表示するには、<code>\AMCsetFoot{\thepage}</code>のように使用します。</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="binary.code">
<title id="binary.code.title">バイナリコード</title>
<para>AMCは各試験問題とページの番号をバイナリコードを使って識別します。</para>
<itemizedlist>
<listitem>
<para>1行目 : (デフォルトで)12桁 : 試験問題番号の最大値 = 2^12-1 = 4,095</para>
</listitem>
<listitem>
<para>2行目 : (デフォルトで)最初の6桁 : 1試験問題あたりの最大ページ数 = 2^6-1 = 63</para>
</listitem>
<listitem>
<para>2行目 : (デフォルトで)次の6桁 : チェックコード</para>
</listitem>
</itemizedlist>
<para>試験問題やページの数を増やすには、<command>\AMC@NCBetud</command>, <command>\AMC@NCBpage</command>, <command>\AMC@NCBcheck</command>のデフォルト値を変更してください。</para>
<para>プリアンブルに以下のコマンドを記述します(これらはデフォルト値)。</para>
<programlisting>\makeatletter
\def\AMC@NCBetud{12}
\def\AMC@NCBpage{6}
\def\AMC@NCBcheck{6}
\makeatother</programlisting>
</sect3>
</sect2>
<sect2 id="latex.amcopts">
<title>AMC用のオプション</title>
<para>ソースファイルのヘッダ(<quote><code>%</code></quote>で始まる先頭行)に、AMCに渡すオプションをいくつか付加することができます:</para>
<variablelist>
<varlistentry>
<term><code>%%AMC:preprocess_command=<replaceable>commandname</replaceable></code></term>
<listitem>
<para>ソースファイルを処理するLaTeXを呼ぶ前に、<replaceable>commandname</replaceable>コマンドを実行させます。このコマンドはプロジェクトディレクトリ内で実行され、ソースファイルのコピーの名前が引数として渡されます。これは単なるコピーなので、<replaceable>commandname</replaceable>がファイルの内容を変更しても問題ありません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><code>%%AMC:latex_engine=<replaceable>engine</replaceable></code></term>
<listitem>
<para>ユーザ設定されたLaTeXエンジンにかかわらず、このファイルのコンパイルに用いるエンジンを指定します。</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="latex.numerical">
<title>乱数を用いた数学設問</title>
<sect3 id="latex.numerical.fp">
<title>fpパッケージの使用</title>
<para><package>automultiplechoice</package>の前に<programlisting>\usepackage{fp}</programlisting>として<package>fp</package>パッケージを使用すると、乱数データを用いた練習問題を作ることができます。<package>fp</package>パッケージのドキュメントは<ulink url="http://mirrors.ctan.org/macros/latex/contrib/fp/README">http://mirrors.ctan.org/macros/latex/contrib/fp/README</ulink>にあります。以下では単純な例から見てみます。</para>
<para><programlisting>\begin{question}{加算}
\FPeval\VQa{trunc(1+random*8,0)} <co id="alea.random"
linkends="alea.random.exp"/>
\FPeval\VQb{trunc(4+random*5,0)}
\FPeval\VQsomme{clip(VQa+VQb)} <co id="alea.result"
linkends="alea.result.exp"/>
\FPeval\VQnonA{clip(VQa+VQb-1)} <co id="alea.fausse"
linkends="alea.fausse.exp"/>
\FPeval\VQnonB{clip(VQa*VQb)}
\FPeval\VQnonC{clip(VQa-VQb)}
\VQa{} と \VQb{} の和はいくつですか?
\begin{choiceshoriz}
\correctchoice{\VQsomme}
\wrongchoice{\VQnonA}
\wrongchoice{\VQnonB}
\wrongchoice{\VQnonC}
\end{choiceshoriz}
\end{question}</programlisting></para>
<para><command>\FPeval</command>コマンドは計算を実行するのに使います:</para>
<para><calloutlist>
<callout arearefs="alea.random" id="alea.random.exp">
<para><command>random</command>は[0,1]の実数を返すので、このコマンドによりVQaには1から8までの乱数の整数値が設定されます。次の行では、VQbに4から8までの乱数の整数値が設定されます。</para>
</callout>
<callout arearefs="alea.result" id="alea.result.exp">
<para>正しい値をVQsomme変数に入れています。</para>
</callout>
<callout arearefs="alea.fausse" id="alea.fausse.exp">
<para>誤った値をVQnonA、VQnonB、VQnonCに入れています。</para>
</callout>
</calloutlist>変数名のVQは他のLaTeXコマンドと干渉しないように選んであります。</para>
<note>
<para>乱数シードは次のように設定できます:</para>
<para><programlisting>\FPseed=<replaceable>integer</replaceable></programlisting></para>
<para><replaceable>integer</replaceable>は固定値でなければなりません。日付や時刻から計算してはいけません。</para>
</note>
<sect4 id="latex.intervals">
<title>区間の選択</title>
<para><command>automultiplechoice</command>パッケージは、さらに、この種の設問の作成が容易になるように<command>\AMCIntervals</command>コマンドを定義しています。以下に例を示します:<programlisting>\begin{question}{inf-expo-indep}
\FPeval\VQa{trunc(2 + random * 4,0)}
\FPeval\VQb{trunc(6 + random * 5,0)}
\FPeval\VQr{VQa/(VQa+VQb)}
$X$と$Y$を互いに独立な指数分布に従う乱数変数とし、それぞれのパラメータを\VQa{}と\VQb{}とします。確率 $\mathbb{P}[X<Y]$ は、次のどの区間に属しますか?
\begin{multicols}{5}
\begin{choices}[o]
\AMCIntervals{\VQr}{0}{1}{0.1} <co id="choix.intervalles"
linkends="choix.intervalles.exp"/>
\end{choices}
\end{multicols}
\end{question}</programlisting>(訳注: \mathbbを使用するにはamsfontsパッケージが必要です。)</para>
<calloutlist>
<callout arearefs="choix.intervalles" id="choix.intervalles.exp">
<para>この行は、各区間 [0,0.1[ [0.1,0.2[ ... [0.9,1[ に対応した10個の選択肢を挿入し、正解の選択肢は VQr を含んだ区間であることを指示します。<command>\AMCIntervals</command>の引数は次のとおりです:</para>
<orderedlist>
<listitem>
<para>正解の値</para>
</listitem>
<listitem>
<para>最初の区間の左端の値</para>
</listitem>
<listitem>
<para>最後の区間の右端の値</para>
</listitem>
<listitem>
<para>各区間の長さ</para>
</listitem>
</orderedlist>
</callout>
</calloutlist>
<para>区間の書式は、ローカルな(例えば、よくあるのは [a,b[ ではなく [a,b) と書くなどの)慣行に合わせて、<command>\AMCIntervalFormat</command>コマンドを再定義して変更できます。オリジナルは</para>
<programlisting>\def\AMCIntervalFormat#1#2{[#1,\,#2[}</programlisting>
<para>と定義されています。</para>
</sect4>
<sect4 id="latex.numeric">
<title>数値での解答</title>
<para><command>\AMCnumericChoices</command>コマンドを用いれば、次の例のように、受験者に数値での解答をマークで記入させることもできます:</para>
<programlisting>\begin{questionmultx}{sqrt}
\FPeval\VQa{trunc(5+random*15,0)}
\FPeval\VQs{VQa^0.5}
$\sqrt{\VQa}$ を計算して、小数点以下2桁で丸めよ。
\AMCnumericChoices{\VQs}{digits=3,decimals=2,sign=true,
borderwidth=0pt,backgroundcol=lightgray,approx=5}
\end{questionmultx}</programlisting>
<para><code>questionmultx</code>環境に注意してください。この設問は複数のボックスをマークする必要があるので複数選択問題にしなければなりませんが、複数の正解があると言うことはできません。なので複数選択問題の記号を表示しません。</para>
<para><command>\AMCnumericChoices</command>コマンドの2番目の引数で用いられるオプションは次のとおりです(<replaceable>bool</replaceable>は<code>true</code>か<code>false</code>で、<replaceable>color</replaceable>は<command>xcolor</command>で認識できる色でなければなりません):</para>
<variablelist>
<varlistentry>
<term>digits=<replaceable>num</replaceable></term>
<listitem>
<para>は、必要な桁数(デフォルトは3)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>decimals=<replaceable>num</replaceable></term>
<listitem>
<para>は、小数点以下の桁数(デフォルトは0)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>base=<replaceable>num</replaceable></term>
<listitem>
<para>は、数字の基数(進法)(デフォルトは10)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>significant=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、<command>\AMCnumericChoices</command>の最初の引数のうち上位桁のみ解答させます。例えば、<code>\AMCnumericChoices{56945.23}{digits=2,significant=true}</code>の正解は 57 となります。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>exponent=<replaceable>num</replaceable></term>
<listitem>
<para>指数を<replaceable>num</replaceable>桁とした、科学的記数法モードにします。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nozero=<replaceable>bool</replaceable></term>
<listitem>
<para>全桁から選択肢0を除去します。<command>\AMCnumericChoices</command>を用いて小さい正の値(<10)を記入するのに便利かもしれません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>sign=<replaceable>bool</replaceable></term>
<listitem>
<para>は、符号の有無(デフォルトはtrue)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>exposign=<replaceable>bool</replaceable></term>
<listitem>
<para>指数の符号を同様に指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>strict=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、符号とすべての桁のボックスがマークされなければなりません。<code>false</code>なら、マークしていない桁は0として扱います。デフォルトは<code>false</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vertical=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、1桁分のボックスを縦に配置します。<code>false</code>(デフォルト)なら、1桁分のボックスを横に配置します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>expovertical=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、仮数を指数の<emphasis>上</emphasis>に配置します。<code>false</code>なら、仮数を指数の<emphasis>横</emphasis>に配置します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>reverse=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、<code>vertical</code>モードにおいて、大きい数字を上に配置します(デフォルトは<code>true</code>)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vhead=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、<code>vertical</code>モードにおいて、各桁の上部に<command>\AMCntextVHead</command>コマンドを使用して作成されるヘッダーを置きます。<command>\AMCntextVHead</command>はデフォルトで次のように定義されています。</para>
<programlisting>\def\AMCntextVHead#1{\emph{b#1}}</programlisting>
<para>このデフォルト値は、2進数の桁に番号をつけるのに便利です。</para>
<para>デフォルト値は<code>false</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>hspace=<replaceable>space</replaceable></term>
<listitem>
<para>は、ボックス間の水平間隔(デフォルトは<code>.5em</code>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vspace=<replaceable>space</replaceable></term>
<listitem>
<para>は、ボックス間の垂直間隔(デフォルトは<code>1ex</code>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>borderwidth=<replaceable>space</replaceable></term>
<listitem>
<para>は、全ボックスを囲む枠線の太さ(デフォルトは<code>1mm</code>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>bordercol=<replaceable>color</replaceable></term>
<listitem>
<para>は、枠線の色(デフォルトは<code>lightgray</code>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>backgroundcol=<replaceable>color</replaceable></term>
<listitem>
<para>は、背景色(デフォルトは<code>white</code>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Tsign=<replaceable>text</replaceable></term>
<listitem>
<para>は、符号をマークするボックスの上に表示するテキスト(デフォルトは空で、<code>\def\AMCntextSign{<replaceable>text</replaceable>}</code>で再定義も可能)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Tpoint=<replaceable>text</replaceable></term>
<listitem>
<para>は、小数点のテキストを設定します。デフォルトは<code>\raisebox{1ex}{\bf .}</code>で、<code>\def\AMCdecimalPoint{<replaceable>text</replaceable>}</code>で再定義も可能です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Texponent=<replaceable>text</replaceable></term>
<listitem>
<para>は、仮数と指数を分けるテキストを設定します。デフォルトは<code>$\times10$\textasciicircum</code>で、<code>\def\AMCexponent{<replaceable>text</replaceable>}</code>でも再定義できます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>scoring=<replaceable>bool</replaceable></term>
<listitem>
<para><code>true</code>なら、AMCにこの設問の採点基準を指定します。デフォルトは<code>true</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>scoreexact=<replaceable>num</replaceable></term>
<listitem>
<para>は、正解に対する素点(デフォルトは2)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>exact=<replaceable>num</replaceable></term>
<listitem>
<para>は、<emphasis>正解</emphasis>として認めて<code>scoreexact</code>の得点を与える誤差(正解の整数値(小数点を除いた値)との差)(デフォルトは0)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>scoreapprox=<replaceable>num</replaceable></term>
<listitem>
<para>は、<emphasis>近似解</emphasis>に対する素点(デフォルトは1)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>approx=<replaceable>num</replaceable></term>
<listitem>
<para>は、<emphasis>近似解</emphasis>として認めて<code>scoreapprox</code>の得点を与える誤差(正解の整数値(小数点を取り除いた値)との差)(デフォルトは0)を設定します。</para>
<warning>
<para>AMCは<code>approx</code>との差分をとり比較する前に、すべての数字を(単純に小数点を取り除いて)整数に変換します。一例として、<code>decimals=2</code>のとき、正答が3.14で答案が3.2の場合、整数の差分は 320-314=6 となるので、<code>approx</code>が6以上のときに限って、受験者は<code>scoreapprox</code>を得ます。</para>
</warning>
</listitem>
</varlistentry>
<varlistentry>
<term>scorewrong=<replaceable>num</replaceable></term>
<listitem>
<para>は、誤答に対する素点(デフォルトは0)を指定します。</para>
</listitem>
</varlistentry>
</variablelist>
<para><command>\AMCnumericOpts</command>コマンドを使えば、これらのパラメータに対して、(試験全体用の)デフォルト値を別の値に設定することができます:</para>
<programlisting>\AMCnumericOpts{scoreexact=3,borderwidth=2pt}</programlisting>
<para>さらに、<code>separateanswersheet</code>オプションにより別紙答案用紙を使用する場合、<command>\AMCntextGoto</command>コマンドを再定義することにより、問題用紙側の<command>\AMCnumericChoices</command>を使用する各設問の最後に付加するテキストを設定することができます:</para>
<programlisting>\def\AMCntextGoto{\par{\bf\emph{解答は別紙答案用紙に記入してください。}}}</programlisting>
</sect4>
</sect3>
<sect3 id="latex.numerical.pgf">
<title>pgf/tikzパッケージの使用</title>
<para>このパッケージは、<package>automuliplechoice</package>パッケージの<emphasis>後</emphasis>にロードしなければなりません。</para>
<para>LaTeXの<package>pgf/tikz</package>パッケージ(<ulink
url="http://www.ctan.org/tex-archive/graphics/pgf/base">http://www.ctan.org/tex-archive/graphics/pgf/base</ulink>を参照)は数学用関数などを提供するもので、<programlisting>\usepackage{tikz}</programlisting>でロードされます。</para>
<para>latexを走らせて試験問題をコンパイルするたびに常に同じ結果が得られるよう、最初に乱数シードを設定しなければなりません:</para>
<para><programlisting>\pgfmathsetseed{2056}</programlisting></para>
<sect4 id="latex.numerical.pgf.simple">
<title>単純な計算</title>
<para>これは単純な計算を用いた例です</para>
<para><programlisting>\begin{question}{inverse}
\pgfmathrandominteger{\x}{1}{50}
$x=\x$ の逆数はいくつですか?
\begin{choices}
\correctchoice{\pgfmathparse{1/\x}\pgfmathresult }
\wrongchoice{\pgfmathparse{1/(\x +1))}\pgfmathresult}
\wrongchoice{\pgfmathparse{cos(\x)} \pgfmathresult}
\wrongchoice{\pgfmathparse{\x^(-0.5)}\pgfmathresult}
\end{choices}
\end{question}
</programlisting></para>
<para><command>\pgfmathparse</command>コマンドが計算を行い、<command>\pgfmathresult</command>が結果を出力します。</para>
<para>出力の書式は、次の例(小数点以下3桁、小数点としてカンマを使用)に示すように、<command>\pgfmathprintnumber</command>を用いて調整することができます。</para>
<para><programlisting>\begin{question}{inverse3}
\pgfmathrandominteger{\x}{1}{50}
\pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=3,use comma}
$x=\pgfmathprintnumber{\x}$ の逆数はいくつですか?
\begin{choices}
\correctchoice{\pgfmathparse{1/\x}\pgfmathprintnumber{\pgfmathresult}}
\wrongchoice{\pgfmathparse{1/(\x +1))} \pgfmathprintnumber{\pgfmathresult}}
\wrongchoice{\pgfmathparse{cos(\x)} \pgfmathprintnumber{\pgfmathresult}}
\wrongchoice{\pgfmathparse{\x^(-0.5)} \pgfmathprintnumber{\pgfmathresult}}
\end{choices}
\end{question}
</programlisting><note>
<para><command>\AMCIntervals</command>コマンドと<command>\AMCnumericChoices</command>コマンドを使用することもできます(<xref linkend="latex.intervals"/>および<xref linkend="latex.numeric"/>参照)。</para>
</note></para>
</sect4>
<sect4 id="latex.numerical.pgf.graphs">
<title>グラフ</title>
<para>tikzパッケージはグラフを(ランダムなものもそうでないものも)作成することもできます。</para>
<para><programlisting>\begin{questionmult}{graph}
以下にグラフが示された三つの関数を考えます:
\pgfmathrandominteger{\a}{2}{4}
\begin{center}
\begin{tikzpicture}[domain=0:4]
\draw[very thin,color=gray] (-0.1,-4.1) grid (3.9,3.9);
\draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,-4.2) -- (0,4.2) node[above] {$f(x)$};
\draw[color=red] plot (\x,{(1+\a/4)*\x-\a}) node[right] {$f_{1} (x)$};
\draw[color=blue] plot (\x,{\a*sin(\x r)}) node[right] {$f_{2}(x)$};
\draw[color=orange] plot (\x,{\a*cos(\x r)}) node[right] {$f_{3}(x)$};
\end{tikzpicture}
\end{center}
以下のうち正しいものはどれですか?
\begin{choices}
\pgfmathrandominteger{\x0}{2}{4}
\correctchoice{$f_{2}(\x0)$=\pgfmathparse{\a*sin(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.}
\correctchoice{$f_{3}(\x0)$=\pgfmathparse{\a*cos(\x0 r)} \pgfmathprintnumber{\pgfmathresult}.}
\wrongchoice{関数 $f_{1}(x)$ は線形関数である。}
\end{choices}
\end{questionmult}
</programlisting></para>
<para>きれいなグラフを作成するには、<package>pgfplots</package>も有用です。</para>
<para>pgfmathでは精度が有限なので、<quote>算術オーバーフロー</quote>を考慮に入れる必要があるかもしれません。<package>tikz</package>と<package>pgfplots</package>は、バックエンドに<command>gnuplot</command>を用いることで、この問題を克服しています。これには、<command>gnuplot</command>をシステムにインストールし、LaTeXの<option>--shell-escape</option>オプションを用いる必要があります。このためには、AMCの設定ウィンドウで、プロジェクト用のLaTeXエンジンとして<quote><option>pdflatex --shell-escape</option></quote>を設定してください。</para>
</sect4>
</sect3>
<sect3 id="latex.numerical.lualatex">
<title>LuaLaTeXの使用</title>
<para><command>lualatex</command>コマンドを用いれば、LaTeX文書内でLUA言語を使用できます。これを用いる場合は、文書はUTF-8でエンコードされている必要があり、<package>inputenc</package>パッケージはロードできません。これに関する情報は<ulink url="http://www.luatex.org/documentation.html">http://www.luatex.org/documentation.html</ulink>を参照してください。</para>
<para>LUAのコマンドは、<command>\directlua</command>の引数として与えます。最も便利なLUA関数は<command>tex.print</command>で、結果をLaTeXに戻して出力します。</para>
<para>これも同じように、乱数を用いる場合は、コンパイルごとに同じ結果が得られるように常に乱数シードを固定してください:</para>
<programlisting>\directlua{math.randomseed (2048)}</programlisting>
<para>これはとても単純なソースファイルです:</para>
<programlisting>\documentclass[a4paper]{article}
%\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[box,completemulti,lang=JA]{automultiplechoice}
\begin{document}
\onecopy{10}{
%%% head
\noindent{\bf QCM \hfill TEST}
\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
\centering\large\bf LuaLaTeXサンプル試験
\end{minipage}
\namefield{\fbox{\begin{minipage}{.5\linewidth}
Name :
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}}}
%%%
\directlua{math.randomseed (2048)}
\directlua{a=math.random()}
\begin{question}{平方根}
\directlua{tex.print(a)}の平方根はいくつですか?
\begin{choices}
\correctchoice{\directlua{tex.print(math.sqrt(a))}}
\wrongchoice{\directlua{tex.print(math.sqrt(2*a))}}
\wrongchoice{\directlua{tex.print(math.sqrt(a*1.001))}}
\end{choices}
\end{question}
}
\end{document}</programlisting>
<para>出力の書式調整はluaの関数で行うか、<package>siunitx</package>で行うことができます。</para>
<note>
<para><command>\AMCIntervals</command>コマンドと<command>\AMCnumericChoices</command>コマンドを使用することもできます(<xref linkend="latex.intervals"/>および<xref linkend="latex.numeric"/>参照)。</para>
</note>
</sect3>
<sect3 id="latex.pstricks">
<title>PSTricksの使用</title>
<para>このパッケージは<package>automultiplechoice</package>の<emphasis>after</emphasis>にロードしてください。</para>
<para><command>PSTricks</command>を使用するには、AMCを次のように設定する必要があります:<menuchoice>
<guimenu>編集</guimenu>
<guimenuitem>設定</guimenuitem>
<guimenuitem>メイン</guimenuitem>
<guimenuitem>デフォルトLaTeXエンジン</guimenuitem>
<guimenuitem>latex+dvipdf</guimenuitem>
</menuchoice></para>
</sect3>
</sect2>
</sect1>
<sect1 id="graphical-interface">
<title>GUIの使用方法</title>
<para>ここでは、選択式試験問題の作成から受験者の得点の編集まで、GUIによる使用例を解説します。</para>
<sect2 id="gui.new">
<title>プロジェクトの新規作成</title>
<para>GUIを開きましょう。通常は、Gnomeの一般メニュー(あるいは、KDEなどの対応するメニュー)から<menuchoice><guimenu>アプリケーション</guimenu><guisubmenu>教育</guisubmenu><guimenuitem>Auto Multiple Choice</guimenuitem></menuchoice>を選んで開きます。<userinput>auto-multiple-choice</userinput>コマンドを直接使うこともできます。</para>
<para><menuchoice>
<guimenu>プロジェクト</guimenu>
<guimenuitem>新規</guimenuitem>
</menuchoice>を選んで、プロジェクトを作成しましょう。ウィンドウが開いて、既存のプロジェクトがあればその一覧が表示され、これから作成するプロジェクトの名前(単純な文字で。今回のテスト用に「test」でもOKです)を<guilabel>プロジェクト名</guilabel>欄に記入することができます。そして、<guibutton>新規プロジェクト</guibutton>ボタンを押します。</para>
<para>ここで、選択式試験問題用のAMC-TXTファイルあるいはLaTeXソースファイルを選ばなければなりません。オプションがいくつか示されます:</para>
<itemizedlist>
<listitem>
<para><guilabel>テンプレート</guilabel>: これを選択すると、AMCに付属するいくつかのテンプレートの中から一つを選び、後から試験問題をカスタマイズしていくことができます。</para>
</listitem>
<listitem>
<para><guilabel>ファイル</guilabel>: これを選択すると、この試験用に既に準備されたLaTeXファイルを選ぶことができます。誰か他の人が既に準備してくれたか、AMCの外で好みのエディタを使ってあなたが準備したものかもしれません。</para>
</listitem>
<listitem>
<para><guilabel>空</guilabel>: これを選択すると、空のLaTeXファイルが作成されます。ゼロから試験問題を作成しなければいけません。</para>
</listitem>
<listitem>
<para><guilabel>アーカイブ</guilabel>: 試験問題の記述(LaTeXソースファイル、画像ファイル、パラメータファイルなど)を含んだzipあるいはtgzのアーカイブがある場合は、これを選択してください。このアーカイブは外部のソフトウェアによって作成することができます。既存のAMCプロジェクトのバックアップかもしれません。</para>
</listitem>
</itemizedlist>
<para>ここでは、<guilabel>テンプレート</guilabel>を選択します。次のウィンドウがテンプレートを示します。例えば、<guilabel>[JA] ドキュメント</guilabel>グループから、<guilabel>単純な例</guilabel>を選びます。これで、<guibutton>ソースファイル編集</guibutton>ボタンによりデフォルトのエディタが起動し、編集してレイアウトや設問を変更できるようになります。</para>
</sect2>
<sect2 id="gui.prepare">
<title>試験問題の作成</title>
<para>試験問題の作成は二つのステップからなります。最初にLaTeXソースファイルから、参照用の文書を作成しなければなりません。これは<guibutton>文書更新</guibutton>をクリックすることにより行われ、以下の文書が生成されます</para>
<itemizedlist>
<listitem>
<para><emphasis>試験問題</emphasis>: このファイルはそのまま印刷して受験者に配布することができます(下記参照)。</para>
</listitem>
<listitem>
<para><emphasis>模範解答</emphasis>: 試験問題に間違いがないかどうかチェックすることができます。受験者に配布することもできます。</para>
</listitem>
</itemizedlist>
<para>これらの文書が作成されると、対応するボタンをクリックして表示(そして必要なら印刷)することができます。</para>
<para>以上で、試験問題作成の最後のステップを始められます。レイアウトの解析です。これは、<guibutton>レイアウト検出</guibutton>ボタンをクリックすることにより起動されます。この解析処理は、試験問題の各ページにおいて、受験者の答案用紙で解析しなければならない全要素の正確な位置を検出します。</para>
<para>レイアウトが正しく検出されているか検証するには、<guibutton>レイアウト確認</guibutton>ボタンを使います。結果をさっと見て、試験問題の各ボックス上に赤いチェックボックスが正しく乗っているかを調べます。</para>
</sect2>
<sect2 id="printing">
<title id="printing.title">印刷と試験実施</title>
<para>2種類のワークフローが検討可能です:</para>
<itemizedlist>
<listitem>
<para>最も堅牢なモードでは、受験者全員分の試験問題用紙を別々の試験問題番号で作成し、全部印刷します。各ページはその番号と上部にあるボックスで完全に識別でき、同じ答案用紙を特に注意せず何度もマーク認識させてかまいません。</para>
</listitem>
<listitem>
<para>2番目のモードでは、少数の試験問題だけ(あるいは希望なら1部のみ)を印刷し、受験者全員分はコピーで作成することができます。設問のシャフル効果は若干低下します。誤って、同じページを何度かマーク認識させてしまうと、AMCはそれを検知できないので望まない重複を作成してしまいます。</para>
</listitem>
</itemizedlist>
<warning>
<para>2番目のコピーを用いたワークフローを使うには、受験者が記入するページは1枚だけでなければなりません(場合によっては別紙答案方式が役に立ちます)。でなければ、AMCでこの先を続けることはできません!AMCは、同じ受験者が記入した二つのページを結びつけることができないのです。</para>
</warning>
<para>試験問題の作成が完了すれば、試験問題を印刷して受験者に配布することができます... 単純な場合には、(作業文書の<guilabel>問題</guilabel>ボタンをクリックしたあと)ビューアから直接印刷できます。用紙を別々に(それぞれ複数ページからなり、それらをステープルできるようなプリンタを使う場合など)印刷する場合、レイアウト検出後に<guibutton>試験問題印刷</guibutton>ボタンを使うといいでしょう。</para>
<important>
<para>試験問題を印刷し配布したら、それらと完全に同一にしておく必要があるので<emphasis>作業文書</emphasis>を修正してはいけません。</para>
</important>
</sect2>
<sect2 id="gui.test">
<title>試験</title>
<para>受験者に合格してもらいましょう。</para>
<important>
<para>試験問題を印刷して配布したら、<emphasis>作業文書</emphasis>を変更してはいけません。配布物と同一でなければならないためです。</para>
</important>
<para>受験者には、黒または青のペンか、BまたはHBの鉛筆を使用させるべきです。</para>
<para>ボックスをチェックするか塗りつぶすかは、状況に合わせて受験者に指示することができます。</para>
<sect3 id="gui.advice">
<title>ボックスにチェック</title>
<para>選択したボックスにチェックをつけるよう指示する場合、チェックを修正するときに消しゴムや修正液を使用することができます。しかし、(例えば修正範囲が広すぎたりしても)<emphasis>ボックスそのものを書き直そうとしてはいけません</emphasis>。これをしようとすると、ボックスの内側に線がはみ出してしまい、チェックされていると認識されてしまうことがあります。</para>
<para>チェックしたボックスを訂正するために、ボックスを完全に塗りつぶさせることもできます。この方式を選択する場合、<guilabel>マーク判定上限閾値</guilabel>(<guimenu>設定</guimenu>メニュー, <guilabel>プロジェクト</guilabel>タブ)を1より小さい(小さすぎない)値に設定する必要があります。黒ピクセル比率が<guilabel>マーク判定閾値</guilabel>と<guilabel>マーク判定上限閾値</guilabel>の間にあれば、ボックスはチェックされていると認識されます。黒ピクセル比率が<guilabel>マーク判定上限閾値</guilabel>より大きければ、ボックスはチェックされていないと認識されます。</para>
</sect3>
<sect3 id="gui.correct">
<title>ボックスを塗りつぶし</title>
<para>文字や数字をボックス内に印字してある場合、AMCには文字のあるボックスとチックされているボックスの区別がつかないため、受験者にボックスを塗りつぶすよう指示する必要があります。</para>
<para>塗りつぶしを修正するには消しゴムや修正液を使用することができますが、それ以外の方法はありません。<guilabel>マーク判定上限閾値</guilabel>は1に設定しなければなりません。</para>
</sect3>
</sect2>
<sect2 id="gui.capture">
<title>答案のスキャン</title>
<para>ここでは、受験者の答案の入力方法を説明します。これは、自動あるいは手動で行うことができます。</para>
<para>GUIの<guilabel>マーク認識</guilabel>タブに行きます。</para>
<sect3 id="gui.capture.auto">
<title>自動入力</title>
<para>受験者が記入したマークを自動認識するには、事前に答案をデジタル化しておかなければなりません。私の場合は、その作業を(私の操作なしに束にした全ページに対して)自動でやってくれるコピー機/スキャナを使い、300dpi、OCRモード(文字認識向き、グレースケールでないモノクロモードのことで、文字認識をしてくれるわけではありません)の設定で行って、各ページが一つのTIFFファイルとしてスキャン画像が得られます。(訳注: 訳者の場合、300dpi、グレースケールを使用しています。)</para>
<note>
<para>スキャン画像を解析するには、それらを一つあるいは複数の画像ファイル(TIFF、JPG、PNG等)として持つ必要があります。ベクターグラフィックス形式(PDF、PS、EPS)でもかまいません。この場合はスキャン画像は解析前にPNGに変換されます(訳注: 多数のページを含むファイルを変換すると、ImageMagickが /var/tmp を多量に消費するので、ファイルを適度に分けた方がいいでしょう)。</para>
</note>
<note>
<para>スキャン画像を使って最初に自動マーク認識を行う際は、個別答案用紙かコピー答案用紙のどちらの方法を使うかAMCに通知します(<xref endterm="printing.title" linkend="printing"/>参照)。</para>
</note>
<para>そして、「<guilabel>試験実施後のマーク認識</guilabel>」セクションの<guilabel>自動</guilabel>ボタンで開いたダイアログから、スキャン画像ファイルをすべて選択したのち、このダイアログの<guibutton>OK</guibutton>ボタンで開始します。AMCは光学マーク認識を開始して、四隅のマーカー位置を検出し、ボックスの位置を決定して、各ボックスの黒ピクセルの量を検出します。</para>
<para>各ページの解析結果は<guilabel>診断</guilabel>セクションのリストに表示されます:</para>
<itemizedlist>
<listitem>
<para><option>最終更新</option>の値はページが最後に更新された日付を表します。デフォルトでは表示されません。<guimenuitem>カラム</guimenuitem>ボタンを押して表示してください。</para>
</listitem>
<listitem>
<para><emphasis>用紙ゆがみ</emphasis>の値はマーカー(各用紙の四隅の黒い点)位置の認識の妥当性を表します。これが大きすぎるときは、認識結果をチェックする必要があります(ページリストの行の上で右クリックして、<guimenuitem>四隅マーカー確認</guimenuitem>を選ぶと、スキャンしたページと検出したボックスが表示されます)。</para>
</listitem>
<listitem>
<para><emphasis>白黒閾値近接度</emphasis>の値は、ボックスの黒ピクセル比率と閾値との近さを表します。これが大きすぎる(8から最大値10まで)場合、ボックスのマーク有無判定が正しいかどうかチェックする必要があります(ページリストの行の上で右クリックして<guimenuitem>ボックス拡大</guimenuitem>を選ぶと、用紙上の全ボックスが表示され、判定結果が正しいか確認し、必要ならボックス画像のドラッグアンドドロップで修正できます)。</para>
</listitem>
<listitem>
<para>The value <emphasis>スキャン画像ファイル</emphasis>の値はページ画像のファイル名を表します。デフォルトでは表示されません。<guimenuitem>カラム</guimenuitem>ボタンを押して表示してください。</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="gui.capture.manual">
<title>手動入力</title>
<para>スキャナの使用が困難な場合や、いくつかの用紙で自動入力が期待どおりに動作しなかった場合に、手動で入力を行うことができます。このためには、<guilabel>試験実施後のマーク認識</guilabel>のセクションにある<guibutton>手動</guibutton>ボタンによりウィンドウを開きます。このウィンドウでは、目的のページのマークされたボックスを自分で(クリックして)入力することができます。</para>
<note>
<para>手動入力を行うと、そのページの自動入力の結果は、以前のものだけでなく以降も含めて上書きされます。</para>
</note>
</sect3>
</sect2>
<sect2 id="gui.marks">
<title>採点</title>
<para>GUIの<guilabel>採点</guilabel>タブでは、<guilabel>採点</guilabel>セクションでスキャン画像から受験者の得点を計算するとともに、受験者が記入したコードを読み取ります(<xref linkend="latex.codes"/>参照)。</para>
<sect3 id="gui.marks.proc">
<title>採点処理</title>
<para>得点の計算は<guibutton>採点</guibutton>ボタンで起動しますが、以下の選択をしておく必要があります:</para>
<itemizedlist>
<listitem>
<para><guilabel>採点基準を更新</guilabel>のボックスにチェックすると、採点基準は最初にLaTeXソースファイルから取り出されます。これにより、採点処理において、いろいろな採点基準を試してみることができます。また同時に、どの解答が正解でどれが誤りかも更新されます。したがって、試験実施後でも、問題作成時の正解の誤りを修正することができます。LaTeXファイルで採点基準を設定する方法は<xref endterm="bareme.title" linkend="bareme"/>の節で説明されます(何も指示しなければデフォルトの採点基準が使用されます)。</para>
</listitem>
</itemizedlist>
<para><guibutton>採点</guibutton>ボタンをクリックすると、採点が実行されます(採点基準の更新もする場合は少し時間がかかります)。</para>
</sect3>
<sect3 id="bareme">
<title id="bareme.title">採点基準</title>
<para>採点基準はLaTeXソースファイル内で<command>scoring</command>コマンドによって指定します。これは<command>question</command>環境か<command>questionmult</command>環境で全選択肢の採点基準を設定するのに用いますが、<command>choices</command>環境においても、各選択肢個別の増減を指定するのに用いることができます。LaTeXのscoringコマンドの引数は、カンマで区切られた<code><replaceable>parameter</replaceable>=<replaceable>value</replaceable></code>のような形式から成っています。使用できるパラメータは次のとおりです(各パラメータがどんな文脈で使用できるかも示しています):</para>
<informaltable>
<tgroup cols="6">
<colspec align="center" colname="param" colwidth="3pc"/>
<colspec align="center" colname="q" colwidth="1pc"/>
<colspec align="center" colname="r" colwidth="1pc"/>
<colspec align="center" colname="qm" colwidth="1pc"/>
<colspec align="center" colname="rm" colwidth="1pc"/>
<colspec align="left" colname="valeur"/>
<spanspec nameend="r" namest="q" spanname="simple"/>
<spanspec nameend="rm" namest="qm" spanname="multiple"/>
<tbody>
<row>
<entry morerows="1">parameter</entry>
<entry spanname="simple">simple</entry>
<entry spanname="multiple">multiple</entry>
<entry morerows="1">value</entry>
</row>
<row>
<entry>Q</entry>
<entry>A</entry>
<entry>Q</entry>
<entry>A</entry>
</row>
<row>
<entry>e</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry>解答に矛盾があるときに与える素点。単一選択問題で複数のボックスにマークされていたり、複数選択問題で「該当なし」と他のボックスに同時にマークされている場合です。</entry>
</row>
<row>
<entry>v</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry>解答されていない(どのボックスもマークされていない)ときに与える素点。</entry>
</row>
<row>
<entry>d</entry>
<entry/>
<entry/>
<entry>●</entry>
<entry/>
<entry>オフセット。eやvのパラメータにかかわらず、素点に加算される値。</entry>
</row>
<row>
<entry>p</entry>
<entry/>
<entry/>
<entry>●</entry>
<entry/>
<entry>素点の下限。この設問の素点を計算してこの下限を下回ってしまった場合、素点をこの下限値に設定します。</entry>
</row>
<row>
<entry>b</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry>●</entry>
<entry>正解に与える素点。</entry>
</row>
<row>
<entry>m</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry>●</entry>
<entry>誤りに与える素点。</entry>
</row>
<row>
<entry/>
<entry/>
<entry>●</entry>
<entry/>
<entry/>
<entry>パラメータはなく(構文: <code>\scoring{2}</code>)、この選択肢にマークした場合に与える素点を示します。</entry>
</row>
<row>
<entry>auto</entry>
<entry>●</entry>
<entry/>
<entry/>
<entry/>
<entry>このパラメータを用いると、<replaceable>i</replaceable>番目の選択肢の値が<replaceable>auto</replaceable>+<replaceable>i</replaceable>-1になります。このオプションは主に<code>\QuestionIndicative</code>で用います(<xref endterm="latex.qr.title" linkend="latex.qr"/>参照)。</entry>
</row>
<row>
<entry>mz</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry>このパラメータは<quote>満点かゼロか</quote>方式の採点基準に用いられます。選択がすべて正しければ素点は<replaceable>mz</replaceable>になり、そうでなければ0点です。</entry>
</row>
<row>
<entry>haut</entry>
<entry/>
<entry/>
<entry>●</entry>
<entry/>
<entry>このパラメータに<replaceable>n</replaceable>という値を指定すると、満点が<replaceable>n</replaceable>になり、誤り一つにつき1点減点されます。</entry>
</row>
<row>
<entry>MAX</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry>この設問の満点を指定します(5点の設問には、MAX=5と書きます)。完答した場合の点数が目的の満点と異なる場合にのみ用います。</entry>
</row>
<row>
<entry>formula</entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry><code>b</code>や<code>m</code>の値を考慮せず、変数を用いた式(<xref linkend="scoring.global"/>参照)などによって、設問に与えられた素点を指定します。</entry>
</row>
<row>
<entry>set.<replaceable>XXX</replaceable></entry>
<entry>●</entry>
<entry>●</entry>
<entry>●</entry>
<entry>●</entry>
<entry><replaceable>XXX</replaceable>という変数に特定の値を指定し、<code>formula</code>で使用できるようにします。選択肢に指定すると、そのボックスがマークされたときだけ値が設定されます。特殊な場合として、<varname>INVALID</varname>という変数にnullでない値を設定すると、解答に矛盾があることを示すことができ、<code>e</code>変数で指定した値が素点になります。</entry>
</row>
<row>
<entry>setglobal.<replaceable>XXX</replaceable></entry>
<entry>●</entry>
<entry>●</entry>
<entry>●</entry>
<entry>●</entry>
<entry>(設問IDの辞書順で)以降のすべての設問に対して、<replaceable>XXX</replaceable>という変数の値を指定します。</entry>
</row>
<row>
<entry>default.<replaceable>XXX</replaceable></entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry>選択肢によって<replaceable>XXX</replaceable>という変数に値が設定されなかった場合の<replaceable>XXX</replaceable>の値を指定します。</entry>
</row>
<row>
<entry>requires.<replaceable>XXX</replaceable></entry>
<entry>●</entry>
<entry/>
<entry>●</entry>
<entry/>
<entry>解答に矛盾があって設問の得点が<code>e</code>の値に設定される場合を除いて、<replaceable>XXX</replaceable>変数が定義されなければならないことを通知します。</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<note>
<para>haut=x は d=x-N, p=0 と書けます。</para>
</note>
<important>
<para>変数のデフォルト値は、<code>default</code>パラメータを使用して設問の採点基準として設定する必要があります。<!-- 訳注: 仏版はましだが英版はおかしい --></para>
</important>
<programlisting>\begin{questionmult}{03}\scoring{default.COMP=10,default.PROP=11,formula=(COMP==PROP ? 1 : 0),MAX=1}
空気中の主要な気体を一つ選び、その割合を示しなさい。
\begin{multicols}{4}
\begin{choices}
\wrongchoice{水蒸気}
\wrongchoice{ガス}
\correctchoice{窒素}\scoring{set.COMP=1}
\correctchoice{酸素}\scoring{set.COMP=2}
\wrongchoice{二酸化炭素}
\correctchoice{20\%}\scoring{set.PROP=2}
\wrongchoice{40\%}
\wrongchoice{60\%}
\correctchoice{80\%}\scoring{set.PROP=1}
\end{choices}
\end{multicols}
\end{questionmult}</programlisting>
<note>
<para>4点まで得られる設問に<code>MAX = 3</code>と設定すると、満点の受験者の得点が3点に切り捨てられます。<!-- 訳注: 仏・英ともめちゃくちゃでは? --></para>
</note>
<para>単一選択問題でのデフォルトの採点基準は<code>e=0,v=0,b=1,m=0</code>で、正解には1点、そうでなければ0点を与えます。複数選択問題でのデフォルトの採点基準は<code>e=0,v=0,b=1,m=0,p=-100,d=0</code>で、マーク有無の正しい(マークすべきボックスをマークして、マークすべきでないボックスをマークしなかった)選択肢ごとに1点を与えます。</para>
<note>
<para><code>set.XXX</code>で宣言された変数の値をbやmに設定することができます。<!-- 訳注: 英訳ちょっと変 --></para>
</note>
<para>LaTeXの<command>\scoring</command>コマンドは、設問定義の外側で用いて、試験全体のパラメータを変更することもできます。</para>
<itemizedlist>
<listitem>
<para><code>SUF=</code><replaceable>x</replaceable>は、満点を得るのに十分な素点を定めます。例えば満点を10点とし、<code>SUF=8</code>と設定すると、完答での素点合計にかかわらず、素点合計が6点の受験者は得点として6/8*10=7.5点を得ます。</para>
</listitem>
<listitem>
<para><code>allowempty=<replaceable>x</replaceable></code>は、
<replaceable>x</replaceable>個の設問に解答する必要がないことを示します。素点を加算する際、解答のない設問<replaceable>x</replaceable>個分はキャンセルされます。</para>
</listitem>
</itemizedlist>
<para>これらのパラメータを組み合わせれば、以下の例のように、様々な種類の採点基準を定義することができます:</para>
<para><!--NAME: 採点基準
DESC: 様々な採点基準の例(ドキュメントより抜粋)。--><programlisting
id="modeles-scoring.tex" linenumbering="numbered">\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[box,completemulti,lang=JA]{automultiplechoice}
\begin{document}
\element{qqs}{
\begin{question}{good choice}
この設問に何点欲しいですか?
\begin{choices}
\correctchoice{満点: 10}\scoring{10}
\wrongchoice{5点だけ欲しい}\scoring{5}
\wrongchoice{2点でよい}\scoring{2}
\wrongchoice{いらない}\scoring{0}
\end{choices}
\end{question}
}
\element{qqs}{
\begin{questionmult}{added}
次のボックスをマークしてポイントをゲット:
\begin{choices}
\correctchoice{2点}\scoring{b=2}
\wrongchoice{マイナス1点!}\scoring{b=0,m=-1}
\correctchoice{3点}\scoring{b=3}
\correctchoice{1点}
\correctchoice{0.5点}\scoring{b=0.5}
\end{choices}
\end{questionmult}
}
\element{qqs}{
\begin{questionmult}{3 or zero}\scoring{mz=3}
完答なら3点、そうでなければ0点。
\begin{choices}
\wrongchoice{誤り}
\wrongchoice{誤り}
\correctchoice{正しい}
\correctchoice{正しい}
\end{choices}
\end{questionmult}
}
\element{qqs}{
\begin{questionmult}{all for 2}\scoring{haut=2}
完答なら2点、ミス1件ごとに-1点...
\begin{choices}
\correctchoice{正解}
\correctchoice{これも可}
\correctchoice{そのとおり!}
\wrongchoice{ダメ!}
\wrongchoice{マークするな!}
\end{choices}
\end{questionmult}
}
\element{qqs}{
\begin{question}{attention}\scoring{b=2}
ひどい誤りにはマイナス点(-2点)がつきますが、正解なら2点が得られます。
\begin{choices}
\correctchoice{正しい!}
\wrongchoice{正しくない}
\wrongchoice{正しくない}
\wrongchoice{正しくない}
\wrongchoice{ひどい誤り!}\scoring{-2}
\end{choices}
\end{question}
}
\element{qqs}{
\begin{questionmult}{as you like}
必要な点数を選んでください:
\begin{choices}
\correctchoice{ここなら2点得られます}\scoring{b=2}
\wrongchoice{マークすると3点あげます}\scoring{b=0,m=3}
\correctchoice{マークすると1点得ますが、マークしないと1点失います}\scoring{m=-1}
\end{choices}
\end{questionmult}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\onecopy{20}{
\noindent{\bf QCM \hfill 採点基準テスト}
\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
\centering\large\bf Test\\ Jan. 2008\end{minipage}
\namefield{\fbox{\begin{minipage}{.5\linewidth}
Name:
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\shufflegroup{qqs}
\insertgroup{qqs}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
\end{document}</programlisting></para>
</sect3>
<sect3 id="scoring.global">
<title>全体採点基準</title>
<para>一つの採点基準をいくつかの設問にまとめて適用したい場合、次の例のようにそれをLaTeXのコマンドに定義することができます:</para>
<programlisting>\def\barQmult{haut=3,p=-1}
\begin{questionmult}\scoring{\barQmult}
[...]
\end{questionmult}</programlisting>
<para>もう一つの方法はLaTeXの<command>\scoringDefaultS</command>コマンドと<command>\scoringDefaultM</command>コマンドを使うことです。これは文書の先頭で(<command>\onecopy</command>の外側で)用い、それぞれ単一選択問題と複数選択問題のデフォルトの採点基準を指定することができます:</para>
<programlisting>\scoringDefaultM{haut=3,p=-1}</programlisting>
<para><command>\scoringDefautM</command>あるいは<command>\scoringDefautS</command>で<command>formula</command>を用いる場合は、独自の採点基準を設定する設問では<command>formula</command>をキャンセルしなければなりません。</para>
<programlisting>\begin{questionmult}\scoring{b=1,m=-0.5,formula=}
[...]
\end{questionmult}</programlisting>
<para>場合によっては、<emphasis>用意した選択肢の個数に依存して</emphasis>全体採点基準が定義できれば、より便利かもしれません。これを行うには、<varname>N</varname>という値を用いるだけでできます。例えば、満点を4点とし、ランダムにマークした場合の平均点を1点としたい場合、<code>d=4,b=0,m=-(4-1)*2/N</code>という基準が使えます(すべての選択肢を誤った場合は-2点となります)。これらの式に使用できる演算は、通常の四則演算(<code>+</code> <code>-</code> <code>*</code> <code>/</code>)、条件付演算( ? : )、括弧と、任意のperlの演算子です。</para>
<note>
<para>条件演算子は次のように書きます:<programlisting>( test ? if true: if false)</programlisting></para>
<para>条件式には次のような演算子が使用できます: <code>></code>(より大きい), <code>>=</code>(より大きいまたは等しい), <code><</code>(より小さい), <code><=</code>(より小さいまたは等しい), <code>==</code>(等しい), <code>!=</code>(等しくない), <code>||</code>(または), <code>&&</code>(かつ)。</para>
</note>
<para>他にも次の変数が使用できます:</para>
<itemizedlist>
<listitem>
<para><varname>N</varname>は選択肢の個数です。<option>completemulti</option>オプションによる追加分は数えません。</para>
</listitem>
<listitem>
<para><varname>NB</varname>はマークすべき選択肢の個数です。</para>
</listitem>
<listitem>
<para><varname>NBC</varname>は正しくマークした選択肢の個数です。</para>
</listitem>
<listitem>
<para><varname>NM</varname>はマークすべきでない選択肢の個数です。</para>
</listitem>
<listitem>
<para><varname>NMC</varname>は誤ってマークした選択肢の個数です。</para>
</listitem>
<listitem>
<para><varname>IS</varname>は、単一選択問題なら1でそうでなければ0です。</para>
</listitem>
<listitem>
<para><varname>IMULT</varname>は、複数選択問題なら1でそうでなければ0です。</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="scoring-result">
<title>採点基準を用いた得点計算</title>
<para>ここでは受験者の得点の計算方法を説明します。各受験者について:</para>
<orderedlist>
<listitem>
<para>各設問に順番に採点基準を適用し、<emphasis>設問別素点</emphasis>を求めます。</para>
</listitem>
<listitem>
<para>(採点対象外設問を除いて)すべての設問の素点を足し、その受験者の<emphasis>素点合計</emphasis>を求めます。</para>
</listitem>
<listitem>
<para>(<menuchoice><guimenu>編集</guimenu><guimenuitem>設定</guimenuitem></menuchoice>ウィンドウの<guilabel>プロジェクト</guilabel>タブで)正の<emphasis>満点</emphasis>がパラメータとして設定されている場合、受験者の素点合計を<emphasis>素点合計の満点</emphasis>(完答での素点合計)で割り、<emphasis>満点</emphasis> - <emphasis>下駄</emphasis>の差を掛けて<emphasis>下駄</emphasis>を加えることにより、受験者の<emphasis>得点</emphasis>を求めます。これにより、受験者が全問正解していれば満点を、まったく正解できなければ<emphasis>下駄</emphasis>の得点を得ることになります。<emphasis>満点</emphasis>を100点、<emphasis>下駄</emphasis>を0点に設定した場合、受験者の得点は正解のパーセンテージとみなすことができます。</para>
</listitem>
<listitem>
<para>得点は、
<menuchoice>
<guimenu>編集</guimenu>
<guisubmenu>設定</guisubmenu>
<guimenuitem>プロジェクト</guimenuitem>
</menuchoice>にある以下の設定を用いて丸められます:</para>
<itemizedlist>
<listitem>
<para>最小単位: 整数値が必要なら1に設定します。1/4単位で丸めるときは0.25に設定するなどできます。丸めを行わないときは0に設定してください。</para>
</listitem>
<listitem>
<para>丸めタイプ: 切捨て, 丸め, 切上げ</para>
</listitem>
</itemizedlist>
</listitem>
</orderedlist>
</sect3>
<sect3 id="correc.test">
<title>採点誤りの修正</title>
<para>試験の後でも、採点基準を変更することができます。しかし、文書を<emphasis>けして</emphasis>更新してはいけません。テキストエディタでソースファイルを開き、変更して保存する方がよいでしょう。</para>
<para>しても構わないこと:</para>
<itemizedlist>
<listitem>
<para>正答を誤答に変更する。</para>
</listitem>
<listitem>
<para>誤答を正答に変更する。</para>
</listitem>
<listitem>
<para>設問ごとのあるいはデフォルトの採点基準を修正する。</para>
</listitem>
</itemizedlist>
<para>してはいけないこと:</para>
<itemizedlist>
<listitem>
<para>単一選択問題を複数選択問題に変更する。</para>
</listitem>
<listitem>
<para>複数選択問題を単一選択問題に変更する。</para>
</listitem>
<listitem>
<para>設問や選択肢を追加する。</para>
</listitem>
<listitem>
<para>設問や選択肢を削除する。</para>
</listitem>
<listitem>
<para>設問や選択肢の順序を変更する。</para>
</listitem>
</itemizedlist>
<note>
<para>設問を取り消したいときは、<command>\scoring{b=0,m=0,e=0,v=0}</command>という採点基準を使うか、<command>\QuestionIndicative</command>を使ってください。</para>
</note>
</sect3>
</sect2>
<sect2 id="sec.students.id">
<title>受験者の識別</title>
<para>このステージは必須ではありません。ここでは、各答案の受験者を識別します。受験者の氏名は自動的には読み込まれませんが、現実的な策が2通りあります:</para>
<orderedlist>
<listitem>
<para>受験番号を一桁ごとにボックスにマークする方式で、受験者自身に答案用紙に記入してもらうことが可能です。答案用紙にこの方式を用いるためのLaTeXのコマンドが用意されています(<xref linkend="latex.codes"/>参照)。試験の実施後、受験番号と受験者名を対応づけるリストを用いて、自動的に答案の識別が行われます。</para>
</listitem>
<listitem>
<para>受験番号を記入させない場合や、自動識別が(記入ミスなどで)完全にはうまくいかなかった場合には、GUIの補助により手動で答案の受験者を識別することができます。</para>
</listitem>
</orderedlist>
<para>まず、GUIの<guilabel>採点</guilabel>タブに行きます。</para>
<sect3 id="liste.etudiants">
<title id="liste.etudiants.title">受験者名簿</title>
<para>事前に受験者名簿を準備しておかなければなりません。この名簿は、いくつもの試験で再利用することができます。このリストは<quote><code>#</code></quote>で始まるコメント行をオプションとしてもつ、次の例のようなCSVファイルです:<programlisting># STUDENTS / 1ST YEAR
surname:name:id:email
Bienvenue:Alexis:001:paamc@passoire.fr
Boulix:Jojo:002:jojo.boulix@rien.xx
Noël:Père:003:pere.noel@pole-nord.xx</programlisting></para>
<para>ファイルの冒頭にある<quote><code>#</code></quote>で始まる行はコメントです。コメントでない最初の行は(<quote><code>:</code></quote>で区切った)カラム名を格納します。その行以降は、受験者1名につき1行で、対応する情報を記入します。必ず<code>name</code>あるいは<code>surname</code>という名前のカラムに受験者名を格納しないと、下で説明する手動識別でボタン表示ができなくなります。<!--英文・仏文にない表現で必要性の理由を説明--></para>
<note>
<para>セパレータの<quote><code>:</code></quote>は、カンマ、セミコロン、タブのいずれかに置き換えることができます。しかし、名簿ファイルのすべての箇所で同じセパレータを使わなければなりません。どの文字をセパレータとして(この4種から)選ぶかは、コメントでない最初の行の中でどの文字が最も多く出現するかで決定されます。</para>
<para>CSVファイルであれば適合するはずです。</para>
</note>
<warning>
<para>同一の採点結果を複数の宛先に送付する場合はCSVを注意して作成してください。</para>
<itemizedlist>
<listitem>
<para>セミコロン、コロン、タブでフィールドを区切り、カンマでメールアドレスを区切る。</para>
</listitem>
<listitem>
<para>カンマでフィールドを区切り、引用符内のカンマでメールアドレスを区切る。</para>
</listitem>
</itemizedlist>
<programlisting>name,forenama,email
Boulix,Jojo,"jojo@boulix.fr,parents@boulix.com"</programlisting>
</warning>
<para>準備した受験者名簿は<guilabel>受験者識別</guilabel>セクションの<guibutton>ファイル登録</guibutton>ボタンにより選択します。そして受験者名簿の中でユニークなカラム(一般には、受験番号を格納するカラム)を一つ選ばなければなりません。最後に、自動識別の準備として、(使用した場合には)LaTeXの<command>\AMCcode</command>コマンドで使用した関連するコード名を選びます。</para>
</sect3>
<sect3 id="gui.assoc">
<title>受験者識別</title>
<sect4 id="gui.assoc.auto">
<title>自動識別</title>
<para><guilabel>受験者識別</guilabel>セクションの<guibutton>自動</guibutton>ボタンを押すと、受験者が記入したコードの対応づけが開始します。その結果は、後から(半)手動識別により確認したり改善したりできます。</para>
<warning>
<para>自動識別を行うためには、LaTeXソースファイル中に<command>AMCcode</command>コマンド(<xref linkend="latex.codes"/>参照)が少なくとも一つ必要です。また、受験者名簿には、<command>AMCcode</command>が生成したボックスに記入されるはずの参照(一般には受験番号)を格納したカラムが必要です。</para>
</warning>
</sect4>
<sect4 id="gui.assoc.manual">
<title>手動識別</title>
<para>受験者の氏名を読み取るためのウィンドウを開くには、<guilabel>受験者識別</guilabel>セクションの<guibutton>手動</guibutton>ボタンをクリックします。このウィンドウは、上部に受験者が記入した氏名の画像が順番に表示され、下部に名簿にある受験者ごとにボタンが並び、さらに右側には答案用紙の一覧で区別できるようになっています。各ページについて、上部に提示された氏名に対応したボタンをクリックします(デフォルトでは識別できなかった答案だけが表示されますが、「<guilabel>識別済も表示</guilabel>」ボックスにチェックすれば変更できます)。すべてのページを読み取れたら、氏名の画像のかわりに青い背景が表示されるので、最後に<guibutton>保存</guibutton>ボタンをクリックして受験者識別を終了するだけです。</para>
</sect4>
</sect3>
</sect2>
<sect2 id="sec.export.notes">
<title id="sec.export.notes.title">採点表のエクスポート</title>
<para>このステージでは、<guibutton>エクスポート</guibutton>ボタンを使って、採点表をさまざまな形式(現在のところ、CSVとOpenOffice)で取り出せます。エクスポートすると、それに引き続いて、(可能なら)エクスポートされたファイルが適切なソフトウェアで開かれます。</para>
<sect3 id="gui.export.ods">
<title>ODS(OpenOffice、LibreOffice)へのエクスポート</title>
<para>エクスポートされたファイルでは、以下の色が使われています:</para>
<variablelist>
<varlistentry>
<term>灰色</term>
<listitem>
<para>は、<emphasis>適用外</emphasis>に使われます。これは例えば、欠席者の得点や、その受験者には表示されなかった設問の素点です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>黄色</term>
<listitem>
<para>は、受験者が無記入のままにした設問に使われます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>赤色</term>
<listitem>
<para>は、選択が<emphasis>矛盾</emphasis>だった設問に使われます。単一選択問題に複数のマークをした場合や、<emphasis>該当なし</emphasis>ボックス<emphasis>と</emphasis>それ以外のボックスをマークした場合です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>紫色</term>
<listitem>
<para>は、採点対象外の設問に使われます。</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
<sect2 id="gui.annotate">
<title>採点記入</title>
<para><guibutton>採点記入</guibutton>ボタンを押すと、答案への採点記入が始まります。各スキャン画像に、次のように記入されます(これらはデフォルトの記入書式で、設定で変更できます):</para>
<itemizedlist>
<listitem>
<para>受験者が誤ってマークしたボックスには、赤い円が記入されます。</para>
</listitem>
<listitem>
<para>マークすべきボックスにマークされていない場合は、赤いチェック印が記入されます。</para>
</listitem>
<listitem>
<para>マークすべきボックスにマークされている場合は、青いチェック印が記入されます。</para>
</listitem>
<listitem>
<para>各設問について、取得した素点と満点が記入されます。</para>
</listitem>
<listitem>
<para>答案全体の得点が答案の最初のページに記入されます。</para>
</listitem>
</itemizedlist>
<para>答案の最初のページに記入されるテキストは設定で変更可能です(<menuchoice>
<guimenu>編集</guimenu>
<guimenuitem>設定</guimenuitem>
<guimenuitem>採点記入</guimenuitem>
<guimenuitem>ヘッダー</guimenuitem>
</menuchoice>、または、<menuchoice>
<guimenu>編集</guimenu>
<guimenuitem>設定</guimenuitem>
<guimenuitem>プロジェクト</guimenuitem>
<guimenuitem>答案の採点記入</guimenuitem>
<guimenuitem>ヘッダーテキスト</guimenuitem>
</menuchoice>)。設定されたテキストに対して、次のように置換が行われます(これらの値の意味については<xref linkend="scoring-result"/>をご覧ください):</para>
<variablelist>
<varlistentry>
<term><literal>%S</literal></term>
<listitem>
<para>は受験者の<emphasis>素点合計</emphasis>に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%M</literal></term>
<listitem>
<para>は<emphasis>素点合計の満点</emphasis>に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%s</literal></term>
<listitem>
<para>は受験者の<emphasis>得点</emphasis>に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%m</literal></term>
<listitem>
<para>は<emphasis>満点</emphasis>に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%(ID)</literal></term>
<listitem>
<para>は受験者名に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%(<replaceable>COL</replaceable>)</literal></term>
<listitem>
<para>は受験者名簿内の<replaceable>COL</replaceable>の値に置換されます。</para>
</listitem>
</varlistentry>
</variablelist>
<para>この処理は各ページに行われ、PDF形式の採点記入済の答案用紙が得られます。受験者の答案を格納するPDFファイル名は、<guilabel>ファイル名テンプレート</guilabel>フィールドで指示したテンプレートによって決められます。テンプレートでは、「(<replaceable>col</replaceable>)」は受験者名簿内の<replaceable>COL</replaceable>の値に置換されます(<xref endterm="liste.etudiants.title" linkend="liste.etudiants"/>参照)。このフィールドを空にすると、試験問題番号と受験者名<!-- 訳注: 英文は student's name and student number -->からなるデフォルト値が使用されます。</para>
<sect3 id="Options.annotation.separateanswersheet">
<title id="Options.annotation.separateanswersheet.title"><option>separateanswersheet</option>(別紙答案用紙)使用時のオプション</title>
<itemizedlist>
<listitem>
<para><command>答案ページのみ</command>: 答案用紙に採点が記入されます。</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para><command>設問ページを問題用紙からコピー</command>: 答案用紙に採点が記入され、試験問題用紙の設問ページがPDFに含まれます。</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para><command>設問ページを採点済用紙からコピー</command>: 答案用紙に採点が記入され、スキャンした採点済用紙の設問ページがPDFに含まれます。</para>
</listitem>
</itemizedlist>
</sect3>
<sect3 id="marks.position">
<title id="marks.position.title">得点表記位置</title>
<para>得点表記位置をメニューで選ぶことができます<menuchoice>
<guimenu>編集</guimenu>
<guimenuitem>設定</guimenuitem>
<guimenuitem>プロジェクト</guimenuitem>
<guimenuitem>得点表記位置</guimenuitem>
</menuchoice></para>
<para>選択肢</para>
<itemizedlist>
<listitem>
<para>(なし)</para>
</listitem>
<listitem>
<para>片方のマージン</para>
</listitem>
<listitem>
<para>いずれかのマージン</para>
</listitem>
<listitem>
<para>ボックス付近</para>
</listitem>
<listitem>
<para>ソースファイルで指定(<xref endterm="marks.display.area.title" linkend="marks.display.area"/>参照)</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2 id="preferences.default">
<title id="preferences.default.title">デフォルト値の設定</title>
<para><menuchoice>
<guimenuitem>編集</guimenuitem>
<guimenuitem>設定</guimenuitem>
<guimenuitem>スキャン</guimenuitem>
</menuchoice></para>
<para><command>スキャン画像の変換</command></para>
<itemizedlist>
<listitem>
<para>ベクトル形式解像度(DPI): 250</para>
</listitem>
<listitem>
<para>黒&白ピクセル判別閾値: 0.60</para>
</listitem>
<listitem>
<para>スキャン画像から赤色を除去: オフ</para>
</listitem>
<listitem>
<para>変換を強制: オフ</para>
</listitem>
</itemizedlist>
<para><command>検出パラメータ</command></para>
<itemizedlist>
<listitem>
<para>四隅マーカーの最大拡大率: 0.20</para>
</listitem>
<listitem>
<para>四隅マーカーの最大縮小率: 0.20</para>
</listitem>
<listitem>
<para>デフォルトのマーク判定閾値: 0.15</para>
</listitem>
<listitem>
<para>デフォルトのマーク判定上限閾値: 1</para>
</listitem>
<listitem>
<para>判定領域比率: 0.80</para>
</listitem>
<listitem>
<para>認識できた四隅マーカーが3個でも処理: オフ</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="alt">
<title>標準外の使用方法</title>
<sect2 id="alt.photocopy">
<title>問題用紙コピー方式</title>
<para><xref endterm="printing.title" linkend="printing"/>で説明したように、複数の受験者に同一の答案用紙をコピーして配るのは常に可能とは限りません。しかし、別紙答案用紙方式で、設問と選択肢がシャフルされていなければ、問題用紙はコピーで用意して、答案用紙だけ全員分個別に印刷することができます。ここではその方法を詳しく説明します。</para>
<itemizedlist>
<listitem>
<para><option>separateanswersheet</option>オプションを使用します(<xref endterm="sec.package.options.title" linkend="sec.package.options"/>参照)。</para>
</listitem>
<listitem>
<para><command>onecopy</command>コマンドを呼ぶ前か、<command>examcopy</command>環境の外側に試験問題を記述します。</para>
</listitem>
<listitem>
<para><command>onecopy</command>/<command>examcopy</command>の内側で<command>\AMCformS</command>コマンドを用いて、マーク用のボックスを各答案用紙に出力します。</para>
</listitem>
</itemizedlist>
<para>最小限の例を示します:</para>
<programlisting>\documentclass[a4paper]{article}
\usepackage[separateanswersheet,lang=JA]{automultiplechoice}
\begin{document}
\noindent{\bf 試験問題}
\begin{question}{和}
1足す1はいくつですか?
\begin{choices}
\wrongchoice{1}
\correctchoice{2}
\wrongchoice{3}
\end{choices}
\end{question}
\begin{question}{k2}
K2の標高はいくらですか?
\begin{choices}
\wrongchoice{約8000m}
\correctchoice{約8600m}
\wrongchoice{約9000m}
\end{choices}
\end{question}
\AMCcleardoublepage
\onecopy{5}{
\AMCformBegin
{\large\bf 答案用紙:}
\hfill \namefield{\fbox{
\begin{minipage}{.5\linewidth}
氏名:
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}
}}
\AMCformS
}
\end{document}
</programlisting>
<para>このLaTeXファイルから、印刷してから受験者全員分をコピーする(試験問題番号0の)試験問題用紙1部と、(各受験者に1部の)複数の答案用紙が得られます。</para>
</sect2>
<sect2 id="postcorrect">
<title>採点時正解提示</title>
<para>単一の汎用答案用紙を毎回の試験で使いたい場合を想定します。答案用紙には単純にマーク用ボックスだけを(例えば40問、各設問に5個)印刷し、問題は別のどこかに書いて受験者に提示します。ここでのポイントは、正しい選択肢はLaTeXファイルに明示されておらず、そのためAMCはそれがどれかわかりません。この解決方法は、出題者に答案用紙を渡して正しい選択肢をマークしてもらうことです。そうすれば、スキャンをしてAMCでマーク認識をしたあと、AMCにどれが出題者の記入した答案用紙かを教えるだけです。</para>
<para>このアイデアを実施するには、次のルールに従ってください:</para>
<itemizedlist>
<listitem>
<para><option>postcorrect</option>、<option>insidebox</option>、<option>noshuffle</option>オプションを使用します(<xref endterm="sec.package.options.title" linkend="sec.package.options"/>参照)。</para>
</listitem>
<listitem>
<para>選択肢には<command>\wrongchoice</command>のみを使ってください(<command>\correctchoice</command>は一切使わないでください)。</para>
</listitem>
</itemizedlist>
<para>最小限の例を示します:</para>
<programlisting>\documentclass[a4paper]{article}
\usepackage{multicol}
\usepackage[insidebox,noshuffle,postcorrect,lang=JA]{automultiplechoice}
\begin{document}
\onecopy{5}{
\noindent
\begin{tabular}{|l|l|l|}
\hline
受験番号 & クラス & 科目\\
\hline
\vspace{-0.25cm}
& &\\
\AMCcode{StudentNum}{10}&
\AMCcode{class}{2}&
\AMCcode{subject}{3}
\\
\hline
\end{tabular}
\hfill\namefield{\fbox{
\begin{minipage}{.25\linewidth}
氏名:
\vspace*{.5cm}\dotfill
\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}
}}\hfill
\vspace{.5cm}
\noindent\hrulefill
\begin{multicols}{2}\columnseprule=.4pt
\begin{question}{01}
\begin{choicescustom}
\wrongchoice{}%
\wrongchoice{}%
\wrongchoice{}%
\wrongchoice{}%
\wrongchoice{}%
\end{choicescustom}
\end{question}
\begin{question}{02}
\begin{choicescustom}
\wrongchoice{}%
\wrongchoice{}%
\wrongchoice{}%
\wrongchoice{}%
\wrongchoice{}%
\end{choicescustom}
\end{question}
% これを必要な設問数の分だけ続ける...
\end{multicols}
}
\end{document}
</programlisting>
<para>そしてこのLaTeXファイルをAMCで処理し、用紙を印刷し、試験実施後に(模範解答の用紙も含めて)スキャンして、AMCの自動マーク認識を開始させます。<guilabel>採点</guilabel>タブで<guilabel>採点基準を更新</guilabel>にチェックを入れて<guilabel>採点</guilabel>ボタンをクリックすると、出題者が記入した模範解答用紙の番号を入力するよう求められます。そのあとは通常どおりに続けることができます。</para>
<note>
<para>アルファベット(あるいは数字)をボックスの外に印刷することもできます。<option>insidebox</option>オプションを<option>outsidebox</option>に置き換え、次のように設問を記述してください:</para>
<programlisting>\begin{question}{01}
\begin{choicescustom}
\wrongchoice{A }%
\wrongchoice{B }%
\wrongchoice{C }%
\wrongchoice{D }%
\wrongchoice{E }%
\end{choicescustom}
\end{question}</programlisting>
</note>
<note>
<para>この方式を(受験番号以外の)設問の選択肢のみに使用するには、<code>\begin{document}</code>の後に次のように記述します。<programlisting>\makeatletter
\def\setoutsidebox{\AMC@outside@boxtrue}
\makeatother</programlisting></para>
<para>そして用紙内でローカルに(波括弧の内側で)このコマンドを使用します:</para>
<programlisting>{\setoutsidebox\AMCform}</programlisting>
</note>
</sect2>
<sect2 id="Nominative.sheets">
<title id="Nominative.sheets.title">指名試験問題用紙</title>
<para>状況によっては、受験者名簿をもとに各受験者を個別に指名した試験問題用紙を準備すると有用かもしれません。これをどのように行うか見てみます。</para>
<itemizedlist>
<listitem>
<para>受験者名簿はCSVリストでなければなりません。以下では、students.csvファイルが、プロジェクトディレクトリにあり、UTF8でエンコードされ、中身が次のようになっているものとします:</para>
<programlisting>surname,name,id
Boulix,Jojo,001
Golin,André,002
Moniuszko,Stanisław,003</programlisting>
<warning>
<para>受験者の氏名に<quote><code>_</code></quote>(アンダースコア)を使用しないでください。コンパイル時にエラーが発生します。</para>
</warning>
</listitem>
<listitem>
<para>LaTeXソースファイルで、次のようにcsvsimpleパッケージをロードします:</para>
<programlisting>\usepackage{csvsimple}</programlisting>
</listitem>
<listitem>
<para>LaTeXソースファイルで、試験問題を生成するコマンドを定義します。このコマンドは、各受験者ごとに一回、<command>\csvreader</command>が呼び出します(ここでは、設問が<code>general</code>というグループに入っているものとします):</para>
<programlisting>\newcommand{\subject}{
\onecopy{1}{
\noindent{\bf AutoMultipleChoice \hfill TEST}
\vspace*{.5cm}
\begin{center}\em
Pre-filled test.
\end{center}
\hfill \namefield{\fbox{
\begin{minipage}{.5\linewidth}
Name:
\Large\bf \name{} \surname{}
\vspace*{1mm}
\end{minipage}
}}
\noindent\hrulefill
\vspace{1ex}
\shufflegroup{general}
\insertgroup{general}
\AMCassociation{\id}
}
}
\csvreader[head to column names]{students.csv}{}{\subject}<co
id="separator.comma" linkends="separator.comma.exp"/>
%\csvreader[head to column names,separator=semicolon]{liste.csv}{}{\subject}<co
id="separator.semicolon" linkends="separator.semicolon.exp"/>
</programlisting>
<para><command>\csvreader</command>の<option>head to column names</option>オプションは、<command>\subject</command>内で使えるように(CSVのヘッダーから)<command>\surname</command>、<command>\name</command>、<command>\id</command>コマンドを定義します。<command>\AMCassociation</command>の呼出しにより、AMCは現在の試験問題用紙を<command>\id</command>というidをもつ受験者のものとして識別します。</para>
<para><calloutlist>
<callout arearefs="separator.comma" id="separator.comma.exp">
<para>受験者ごとにメールアドレスが一つだけあるCSVファイルの場合にこのコマンドを使用してください。</para>
</callout>
<callout arearefs="separator.semicolon"
id="separator.semicolon.exp">
<para>受験者ごとにメールアドレスが複数あるCSVファイルの場合にこのコマンドを使用してください。</para>
</callout>
</calloutlist></para>
</listitem>
<listitem>
<para>印刷、スキャン、マーク認識、採点が終わった後、答案用紙の受験者を識別する際、「答案内の受験者識別用コード名」フィールドに「<emphasis>印刷時識別済</emphasis>」、「名簿内の受験者識別用カラム名」フィールドに「<emphasis>id</emphasis>」を選択してください。</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="commands">
<title>コマンドマニュアル</title>
<para>GUIのみを使用する場合は(たいていはそうですが)、この節はスキップしてかまいません。しかし、GUIで実行される各動作は、以下に解説する構文に従って様々なコマンドを用いることによっても実行することができます。</para>
<refentry id="auto-multiple-choice">
<refmeta>
<refentrytitle>auto-multiple-choice</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice</refname>
<refpurpose>選択式試験問題の自動処理</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain"><replaceable>action</replaceable></arg>
<arg rep="repeat">arguments</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg>project</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice</command>コマンドは、引数を<command>AMC-<replaceable>action</replaceable>.pl</command>コマンドに渡して起動します。</para>
<para>動作を指定しない2番目の形式では、GUIである<command>auto-multiple-choice gui</command>が(プロジェクト名が指定されていればそれとともに)呼び出されます。</para>
</refsect1>
<refsect1>
<title>関連項目</title>
<para>AMCの各動作: <citerefentry>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-imprime</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-analyse</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-note</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-association-auto</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-export</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-annotate</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>auto-multiple-choice-regroupe</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry></para>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-prepare">
<refmeta>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-prepare</refname>
<refpurpose>LaTeXソースファイルから作業文書を作成する</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">prepare
</arg>
<arg choice="plain">--mode s
</arg>
<arg choice="plain">--prefix <replaceable>project-dir</replaceable>
</arg>
<arg choice="plain"><replaceable>mcq-source-file</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">prepare
</arg>
<arg choice="plain">--mode b
</arg>
<arg choice="plain">--data <replaceable>project-data-dir</replaceable>
</arg>
<arg choice="plain"><replaceable>mcq-source-file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice prepare</command>コマンドは、選択式試験問題を記述したソースファイルから作業文書を生成します。抽出される情報は<option>--mode</option>引数の値によります。どちらのモードでもソースファイル名は引数として指定しなければなりません。</para>
<itemizedlist>
<listitem>
<para><quote><option>--mode s</option></quote>を用いると、<command>auto-multiple-choice prepare</command>は、試験問題ファイル(印刷して受験者に配布する試験問題用紙)、模範解答ファイル(正解をマークした答案用紙1部)、位置情報ファイル(ページ上のボックスの位置に関する情報を含んだファイル)を作成します。以下の引数が使用可能です:</para>
<variablelist>
<varlistentry>
<term><option>--out-sujet
<replaceable>subject.pdf</replaceable></option></term>
<listitem>
<para>作成する試験問題ファイル名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--out-corrige
<replaceable>corrected.pdf</replaceable></option></term>
<listitem>
<para>作成する模範解答ファイル名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--out-calage
<replaceable>calage.xy</replaceable></option></term>
<listitem>
<para>作成する位置情報ファイル名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--prefix
<replaceable>directory</replaceable></option></term>
<listitem>
<para>上の三つのオプションで使用されていないものがあるときは、このディレクトリが必要になります。そしてそれらのデフォルト値は<filename><replaceable>directory</replaceable>/sujet.pdf</filename>、<filename><replaceable>directory</replaceable>/corrige.pdf</filename>、<filename><replaceable>directory</replaceable>/calage.xy</filename>となります。</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
<listitem>
<para><quote><option>--mode b</option></quote>を用いると、<command>auto-multiple-choice prepare</command>は、ソースファイルから採点基準を抽出します。このモードでは、<option>--data</option>オプション(下記参照)を使用しなければなりません。</para>
</listitem>
</itemizedlist>
<para>以下のオプション引数はどのモードでも使用できます:</para>
<variablelist>
<varlistentry>
<term><option>--with
<replaceable>latex-engine</replaceable></option></term>
<listitem>
<para>使用するLaTeXエンジン(コマンド)を指定します。<replaceable>latex-engine</replaceable>は例えば<command>pdflatex</command>や<command>xelatex</command>となります。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--filter
<replaceable>filter</replaceable></option></term>
<listitem>
<para>選択式試験問題のソースファイルをLaTeXファイルに変換するフィルター名を設定します。組込みのフィルターは<code>latex</code>(何も変換しない)と<code>plain</code>(AMC-TXTソース)です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--filtered-source
<replaceable>mcq-latex-file</replaceable></option></term>
<listitem>
<para>指定したフィルターを用いてソースファイルから作成するLaTeXファイル名を指定します。省略した場合、<replaceable>mcq-source-file</replaceable>に<filename>_filtered.tex</filename>を付け足して得られたファイル名が使用されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--n-copies
<replaceable>n</replaceable></option></term>
<listitem>
<para>生成する試験問題の部数を設定し、LaTeXソースファイル(<command>\onecopy</command>の最初の引数)で指定した部数を上書きします。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug
<replaceable>file.log</replaceable></option></term>
<listitem>
<para>デバッグ情報を記録するファイルを指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--epoch
<replaceable>EPOCH</replaceable></option></term>
<listitem>
<para>日付(1970年1月1日以降の秒数)を指定して、PDFを何度生成しても同一結果になるようにします。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--data
<replaceable>project-data-dir</replaceable></option></term>
<listitem>
<para>SQLiteデータファイルを格納するディレクトリを設定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<refentry>
<refmeta>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo>Auto Multiple Choice</refmiscinfo>
<refmiscinfo>@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-meptex</refname>
<refpurpose>作業文書からレイアウト情報を取得しレイアウトデータベースに格納する</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">meptex</arg>
<arg choice="plain">--src <replaceable>calage.xy</replaceable></arg>
<arg choice="plain">--data <replaceable>directory</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice meptex</command>コマンドは作業文書<replaceable>calage.xy</replaceable>からレイアウト情報(全ページのボックス、マーカー、氏名領域の正確な位置)を取り出し、データディレクトリ<replaceable>directory</replaceable>のレイアウトデータベース(SQLiteファイル)に格納します。</para>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-imprime">
<refmeta>
<refentrytitle>auto-multiple-choice-imprime</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-imprime</refname>
<refpurpose>AMC試験問題用紙を受験者に配布できるように印刷する</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">imprime
</arg>
<arg choice="plain">--sujet <replaceable>subject.pdf</replaceable>
</arg>
<arg choice="plain">--fich-nums <replaceable>numbers-file.txt</replaceable>
</arg>
<arg choice="plain">--data <replaceable>data-dir</replaceable>
</arg>
<arg choice="plain">--methode <replaceable>method</replaceable>
</arg>
<arg rep="repeat">where-to-print-arguments</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><command>auto-multiple-choice imprime</command>コマンドは選択した試験問題用紙を印刷します。</para>
<refsect2>
<title>印刷内容の指定</title>
<para>以下の引数により、印刷対象を指定します:</para>
<variablelist>
<varlistentry>
<term><option>--sujet
<replaceable>subject.pdf</replaceable></option></term>
<listitem>
<para>(<citerefentry>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>で作成された)試験問題ファイルを設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--fich-nums
<replaceable>numbers-file.txt</replaceable></option></term>
<listitem>
<para>印刷する試験問題番号が(各行に一つ)書かれたファイルを指定します。この引数が指定されなければ、すべての試験問題が印刷されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--data
<replaceable>data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリを指定します(<citerefentry>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>などを参照してください)。データディレクトリのレイアウトデータベースは一つの試験問題が何ページ目から何ページ目まであるかを知るのに使われます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--split</option></term>
<listitem>
<para>別紙答案用紙を別に印刷します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--answer-first</option></term>
<listitem>
<para>別紙答案用紙が最初に来るようにソートします。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>印刷方法の指定</title>
<para>いくつかの印刷方法が定義されています:</para>
<itemizedlist>
<listitem>
<para><quote><option>--methode CUPS</option></quote>を用いると、
<command>auto-multiple-choice imprime</command>はCUPSプリンタに印刷します。試験問題ごとに自動ステープルなどができるように1部につきプリントジョブを1件送ります。この方法では、以下のオプションを使用してください:</para>
<variablelist>
<varlistentry>
<term><option>--imprimante
<replaceable>printer</replaceable></option></term>
<listitem>
<para>印刷するCUPSプリンタ名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--options
<replaceable>cups-options</replaceable></option></term>
<listitem>
<para>CUPSオプションを<option>opt1=value1,opt2=value2,...</option>の形式で指定します。</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
<listitem>
<para><quote><option>--methode file</option></quote>を用いると、<command>auto-multiple-choice imprime</command>は試験問題用紙をファイルに(1部につき1個)出力します。</para>
<variablelist>
<varlistentry>
<term><option>--output
<replaceable>filename</replaceable></option></term>
<listitem>
<para>出力するファイル名を設定します。<quote><literal>%e</literal></quote>というシーケンスがあれば4桁の試験問題番号に置換されます。<replaceable>filename</replaceable>が<quote><literal>%e</literal></quote>を含んでいない場合、<quote><literal>-%e.pdf</literal></quote>という文字列が付け足されます。</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
<listitem>
<para><quote><option>--methode command</option></quote>を用いると、<command>auto-multiple-choice imprime</command>は試験問題1部ごとに指定したコマンドを使用します。</para>
<variablelist>
<varlistentry>
<term><option>--print-command
<replaceable>command</replaceable></option></term>
<listitem>
<para>印刷に使用するコマンドを指定します。<replaceable>command</replaceable>の文字列は(引用符を使用していても)空白文字の場所で区切られます。<quote><literal>%f</literal></quote>というシーケンスは(印刷する試験問題を含んだ)PDFファイル名に置換され、<quote><literal>%e</literal></quote>は試験問題番号に置換されます。</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</itemizedlist>
</refsect2>
<refsect2>
<title>その他のオプション</title>
<para>他に次のオプションが使用可能です:</para>
<variablelist>
<varlistentry>
<term>--extract-with <replaceable>command</replaceable></term>
<listitem>
<para>試験問題PDFからページを抽出するためのコマンドを指定します。現在、<command>pdftk</command>、<command>gs</command>または<command>qpdf</command>が指定可能です。デフォルトは<command>pdftk</command>ですが、インストールされていなければ<command>qpdf</command>、<command>gs</command>の順に使用されます。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
</refentry>
<refentry>
<refmeta>
<refentrytitle>auto-multiple-choice-getimages</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-getimages</refname>
<refpurpose>自動マーク認識用に<citerefentry>
<refentrytitle>auto-multiple-choice-analyse</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>に送るためのスキャン画像を用意する。</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">getimages
</arg>
<arg choice="opt">--copy-to <replaceable>project-scans-dir</replaceable></arg>
<arg>--vector-density <replaceable>density</replaceable></arg>
<arg choice="plain">--list <replaceable>list-file</replaceable>
</arg>
<group>
<arg choice="plain"
rep="repeat"><replaceable>scan-files</replaceable></arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice getimages</command>コマンドは<citerefentry>
<refentrytitle>auto-multiple-choice-analyse</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>に送る前にスキャン画像を用意します:</para>
<itemizedlist>
<listitem>
<para>複数画像からなるファイルはページごとのファイルに分割されます。</para>
</listitem>
<listitem>
<para>ベクター画像(PDF、EPSなど)はビットマップ画像に変換されます。</para>
</listitem>
</itemizedlist>
<para>入力画像は、auto-multiple-choice getimagesへの引数としても、スキャンファイルのパスをすべて含むファイル名としても指定することができます。</para>
<variablelist>
<varlistentry>
<term><option>--list
<replaceable>list-file</replaceable></option></term>
<listitem>
<para>スキャンファイルのパスを(1行に一つ)含むファイルの名前を指定します。処理後にこのファイル内容は消去され、同じパスを<command>auto-multiple-choice analyse</command>の<option>--list-fichiers</option>オプションに渡せるように、スキャンファイルのパスが書き込まれます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--copy-to
<replaceable>project-scans-dir</replaceable></option></term>
<listitem>
<para>スキャンファイルを指定したディレクトリにすべてコピーします。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--vector-density
<replaceable>density</replaceable></option></term>
<listitem>
<para>ベクター画像をビットマップ画像に変換する際の解像度を設定します。デフォルトは300です。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-analyse">
<refmeta>
<refentrytitle>auto-multiple-choice-analyse</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-analyse</refname>
<refpurpose>AMC選択式試験問題のスキャン画像から自動マーク認識する</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">analyse
</arg>
<arg choice="plain">--projet <replaceable>project-dir</replaceable>
</arg>
<arg>--seuil-coche <replaceable>threshold</replaceable></arg>
<arg>--tol-marque <replaceable>tol</replaceable></arg>
<group>
<arg choice="plain">--list-fichiers <replaceable>files-list.txt</replaceable></arg>
<arg choice="plain"
rep="repeat"><replaceable>scan-files</replaceable></arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice analyse</command>コマンドは、AMC選択式試験問題の答案用紙のスキャン画像から自動マーク認識を実行します。<command>auto-multiple-choice analyse</command>を呼び出す前に、<citerefentry>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>を呼び出して、作業文書(<option>--mode s</option>)とMEPファイル(<option>--mode m</option>)を作成し、<citerefentry>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>を用いてレイアウトを処理しておかなければなりません。</para>
<variablelist>
<varlistentry>
<term><option>--data
<replaceable>data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリを指定します(<citerefentry>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>などを参照してください)。デフォルトは<filename><replaceable>project-dir</replaceable>/data</filename>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--cr
<replaceable>project-cr-dir</replaceable></option></term>
<listitem>
<para>マーク認識に使用する画像を作成するディレクトリを指定します(ボックスの拡大画像は<filename>zooms</filename>サブディレクトリに、氏名記入欄の画像は<filename>name-*.jpg</filename>ファイルに、レイアウト結果の画像は<filename>page-*.jpg</filename>ファイルに格納されます)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--projet
<replaceable>project-dir</replaceable></option></term>
<listitem>
<para><option>--cr</option>が使用されていない場合、このオプションを使用すると、<replaceable>project-cr-dir</replaceable>が<filename><replaceable>project-dir</replaceable>/cr</filename>に設定されます。</para>
</listitem>
</varlistentry>
</variablelist>
<para>処理するスキャンファイルの名前の指定方法には2通りあります:</para>
<itemizedlist>
<listitem>
<para>ファイル名を引数により指定する。</para>
</listitem>
<listitem>
<para>ファイル名をプレーンファイルに(各行に1ファイル名の形式で)列挙して、<option>--list-fichiers <replaceable>files-list.txt</replaceable></option>でこのファイルを指定する。</para>
</listitem>
</itemizedlist>
<para>マーク認識用のパラメータは以下のオプションを用いて設定できます:</para>
<variablelist>
<varlistentry>
<term><option>--prop
<replaceable>proportion</replaceable></option></term>
<listitem>
<para>各ボックスのマーク有無を判定する領域の比率を設定します。デフォルト値は0.8です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--bw-threshold
<replaceable>threshold</replaceable></option></term>
<listitem>
<para>このパラメータはグレースケールのスキャン画像を白黒に変換する際に使用されます。値を大きくするとより多くのピクセルが黒とみなされ、値を小さくするとより多くのピクセルが白とみなされます。閾値は0と1の間でなければなりません。デフォルト値は0.6です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--ignore-red</option></term>
<listitem>
<para>このオプションを用いると、カラースキャン画像の赤チャネルのみ使用されます。これにより、スキャン画像上の赤色で記入されたものはすべて無視されます。ボックスが赤で印刷されている場合に有用です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--tol-marque
<replaceable>tol</replaceable></option></term>
<listitem>
<para>スキャン画像の四隅にあるマーカーを検出する際の許容度を定義します。マーカーの検出には、目標サイズ<replaceable>target</replaceable>(印刷とスキャンが完璧であった場合のマーカーの正確なサイズ)に<emphasis>近い</emphasis>サイズの、黒い連結領域を探します。<replaceable>tol</replaceable>が単純な実数の場合、サイズが近いと判断されるのは(1-<replaceable>tol</replaceable>)*<replaceable>target</replaceable>から(1+<replaceable>tol</replaceable>)*<replaceable>target</replaceable>までの範囲です。<replaceable>tol</replaceable>が<quote><replaceable>tinf</replaceable>,<replaceable>tsup</replaceable></quote>の形式(<replaceable>tinf</replaceable>と<replaceable>tsup</replaceable>は実数)の場合は(1-<replaceable>tinf</replaceable>)*<replaceable>target</replaceable>から(1+<replaceable>tsup</replaceable>)*<replaceable>target</replaceable>までの範囲です。標準値は0.2です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--multiple</option></term>
<listitem>
<para>このオプションは、試験問題をコピーした(つまり複数の受験者が同じ試験問題に解答しうる)場合に使用します。この場合、同じ試験問題番号をもつ答案用紙が区別できるように、答案用紙に<emphasis>複製</emphasis>番号が割り当てられます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--pre-allocate
<replaceable>copy_id</replaceable></option></term>
<listitem>
<para>このオプションは<option>--multiple</option>と共に使用されます。スキャンごとの複製番号が<replaceable>copy_id</replaceable>から開始し、引数で指定したスキャン画像と同じ順序で割り当てられます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--try-three | --no-try-three</term>
<listitem>
<para>四隅のマーカーのうち三つしか認識できない場合も処理をするかどうかを示します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug
<replaceable>file.log</replaceable></option></term>
<listitem>
<para>デバッグ情報を記録するファイルを指定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-note">
<refmeta>
<refentrytitle>auto-multiple-choice-note</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-note</refname>
<refpurpose>AMC選択式試験問題の採点をする</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">note
</arg>
<arg choice="plain">--data <replaceable>project-data-dir</replaceable>
</arg>
<arg>--seuil <replaceable>threshold</replaceable></arg>
<arg>--grain <replaceable>granularity</replaceable></arg>
<arg>--arrondi <replaceable>rounding</replaceable></arg>
<arg>--notemin <replaceable>min</replaceable></arg>
<arg>--notemax <replaceable>max</replaceable></arg>
<group>
<arg choice="plain">--no-plafond</arg>
<arg choice="plain">--plafond</arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice note</command>コマンドは<citerefentry>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>によってLaTeXソースファイルから取り出した採点基準と<citerefentry>
<refentrytitle>auto-multiple-choice-analyse</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>によって作成されたマーク認識データとから、各答案の得点を計算します。</para>
<variablelist>
<varlistentry>
<term><option>--data
<replaceable>project-data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリを指定します(<citerefentry>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>などを参照してください)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--seuil
<replaceable>threshold</replaceable></option></term>
<listitem>
<para>ボックスがマークされているかどうかを判定するための黒ピクセル比率の閾値を指定します。ボックスがマークされているかどうか判定する際、<command>auto-multiple-choice note</command>は黒ピクセル比率(全ピクセル数に対する黒ピクセル数の割合)を<replaceable>threshold</replaceable>(閾値)と比較します。黒ピクセル比率が<replaceable>threshold</replaceable>よりも大きい場合、このボックスはマークされていると宣言されます。標準的な値は通常レイアウトで0.15、別紙答案用紙レイアウト(ボックス内に文字が記入されており、受験者にはボックスを完全に塗りつぶすよう指示する)で0.5程度です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--seuil-up
<replaceable>upper_threshold</replaceable></option></term>
<listitem>
<para>これ以上黒ピクセル比率が上がるとボックスがマークされていないと判定する上限の閾値を指定します。この値を(例えば)0.6に設定すると、受験者はボックスを完全に塗りつぶすことで、マークをキャンセルすることができます。つまり、黒ピクセル比率が<replaceable>threshold</replaceable>と<replaceable>upper_threshold</replaceable>の間にあればボックスはマークされているとみなされ、(完全に塗りつぶして)<replaceable>upper_threshold</replaceable>を越えればマークされていないとみなされます。デフォルト値は1.0で、したがってこの機能は無効になっています。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--grain <replaceable>granularity</replaceable>
--arrondi <replaceable>rounding</replaceable></option></term>
<listitem>
<para>得点が<replaceable>granularity</replaceable>の倍数になるように丸めます。<replaceable>rounding</replaceable>が<quote><literal>i</literal></quote>なら、(<citerefentry>
<refentrytitle>floor</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry>がするように)切り捨てます。<replaceable>rounding</replaceable>が<quote><literal>n</literal></quote>なら、近い方に丸めます。<replaceable>rounding</replaceable>が<quote><literal>s</literal></quote>なら、(<citerefentry>
<refentrytitle>ceil</refentrytitle>
<manvolnum>3</manvolnum>
</citerefentry>がするように)切り上げます。例えば、<quote><option>--grain 0.25 --arrondi s</option></quote>というオプションを指定したとき、6.285という得点は6.5に丸められます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--notemin
<replaceable>min</replaceable></option></term>
<listitem>
<para>このオプションを用いると、<replaceable>min</replaceable>未満の得点はすべて<replaceable>min</replaceable>に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--notemax
<replaceable>max</replaceable></option></term>
<listitem>
<para>全問正解の答案に与える満点を指定します。これを用いなければ、得点は素点のままです。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--plafond</option></term>
<listitem>
<para>このオプションを用いると、<replaceable>max</replaceable>を越える得点はすべて<replaceable>max</replaceable>に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug
<replaceable>file.log</replaceable></option></term>
<listitem>
<para>デバッグ情報を記録するファイルを指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--postcorrect-student <replaceable>s</replaceable>
--postcorrect-copy <replaceable>c</replaceable></option></term>
<listitem>
<para>受験番号と試験問題番号で指定された答案を用いて採点時正解提示を指示します。採点時正解提示モードでは、LaTeXソースファイルからではなく、この答案で指定された解答から正解を取り出します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-association-auto">
<refmeta>
<refentrytitle>auto-multiple-choice-association-auto</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-association-auto</refname>
<refpurpose>AMC選択式試験問題の受験者と答案を自動識別する</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">association-auto
</arg>
<arg choice="plain">--data <replaceable>project-data-dir</replaceable>
</arg>
<arg choice="plain">--notes-id <replaceable>id</replaceable>
</arg>
<arg choice="plain">--liste <replaceable>students-list.csv</replaceable>
</arg>
<arg>--encodage-liste <replaceable>list-encoding</replaceable></arg>
<arg choice="plain">--liste-key <replaceable>key</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice association-auto</command>コマンドは、答案用紙の受験者を識別します(受験者が受験番号を正しく記入し、マーク認識に誤りがない場合)。詳細はユーザードキュメントの<xref linkend="sec.students.id"/>を参照してください。</para>
<variablelist>
<varlistentry>
<term><option>--data
<replaceable>project-data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリを指定します(<citerefentry>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>などを参照してください)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--notes-id
<replaceable>id</replaceable></option></term>
<listitem>
<para>受験番号マーク欄の(LaTeXソースファイルで<command>\AMCcode</command>に指定された)識別名を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--pre-association</option></term>
<listitem>
<para>使用された場合、<option>--notes-id</option>オプションを無視し、印刷時識別データ(LaTeXソースファイルの<command>\AMCassociation</command>コマンド)から自動識別を行います。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--liste
<replaceable>students-list.csv</replaceable></option></term>
<listitem>
<para>受験者名簿ファイル名を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--encodage-liste
<replaceable>list-encoding</replaceable></option></term>
<listitem>
<para>受験者名簿ファイルのエンコーディング(デフォルトはutf-8)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--liste-key
<replaceable>key</replaceable></option></term>
<listitem>
<para>受験者名簿内の受験番号のカラム名を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug
<replaceable>file.log</replaceable></option></term>
<listitem>
<para>デバッグ情報を記録するファイルを指定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-association">
<refmeta>
<refentrytitle>auto-multiple-choice-association</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-association</refname>
<refpurpose>AMC選択式試験問題の受験者と答案用紙を手動識別する。</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">association
</arg>
<arg choice="plain">--data <replaceable>project-data-dir</replaceable>
</arg>
<arg choice="plain">--list</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">association
</arg>
<arg choice="plain">--data <replaceable>project-data-dir</replaceable>
</arg>
<arg choice="plain">--set
</arg>
<arg choice="plain">--student <replaceable>student-sheet-number</replaceable>
</arg>
<arg>--copy <replaceable>copy-number</replaceable></arg>
<arg choice="plain">--id <replaceable>student-id</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice association</command>コマンドは、答案用紙の受験者識別データを扱います。</para>
<variablelist>
<varlistentry>
<term><option>--data
<replaceable>project-data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリを指定します(<citerefentry>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>などを参照してください)。</para>
</listitem>
</varlistentry>
</variablelist>
<para><option>--list</option>オプションは、受験者識別データをすべて出力します。</para>
<para><option>--set</option>オプションは、手動識別を更新します。</para>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-export">
<refmeta>
<refentrytitle>auto-multiple-choice-export</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-export</refname>
<refpurpose>AMC選択式試験問題の採点結果をエクスポートする</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">export
</arg>
<arg choice="plain">--data <replaceable>project-data-dir</replaceable>
</arg>
<arg choice="plain">--module <replaceable>module</replaceable>
</arg>
<arg choice="plain">--fich-noms <replaceable>students-list.csv</replaceable>
</arg>
<arg>--noms-encodage <replaceable>list-encoding</replaceable></arg>
<arg choice="plain">--o <replaceable>output-file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice export</command>コマンドは、AMC選択式試験から採点結果をエクスポートします。</para>
<variablelist>
<varlistentry>
<term><option>--data
<replaceable>project-data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリを指定します(<citerefentry>
<refentrytitle>auto-multiple-choice-meptex</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>などを参照してください)。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--module
<replaceable>module</replaceable></option></term>
<listitem>
<para>エクスポート用のモジュールを選択します。AMCの標準ディストリビューションに付属しているモジュールは下記を参照してください。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--fich-noms
<replaceable>students-list.csv</replaceable></option></term>
<listitem>
<para>受験者名簿ファイル名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--noms-encodage
<replaceable>list-encoding</replaceable></option></term>
<listitem>
<para><replaceable>students-list.csv</replaceable>のエンコーディング(デフォルトはutf-8)を選択します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--o
<replaceable>output-file</replaceable></option></term>
<listitem>
<para>出力ファイル名を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--option-out
<replaceable>options</replaceable></option></term>
<listitem>
<para>選択したモジュールのオプションを<literal>key=value</literal>の形式で指定します(各モジュールで使用できるオプションは下記を参照してください)。複数のオプションを指定する場合は、<option>--option</option>を複数回使用してください。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--sort
<replaceable>sort-type</replaceable></option></term>
<listitem>
<para>受験者名を<replaceable>sort-type</replaceable>に従って並べ替えます。<replaceable>sort-type</replaceable>が<literal>l</literal>なら、並べ替えに受験者名簿の行番号を用います。<replaceable>sort-type</replaceable>が<literal>m</literal>なら、並べ替えに得点(得点が等しければ受験者名)を用います。<replaceable>sort-type</replaceable>が<literal>i</literal>なら、並べ替えに受験番号を用います。<replaceable>sort-type</replaceable>が<literal>n</literal>なら、並べ替えに受験者名(等しければ名簿の行番号)を用います。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--useall
<replaceable>all</replaceable></option></term>
<listitem>
<para><replaceable>all</replaceable>が<literal>0</literal>か空なら、スキャンした答案のある受験者のみが出力されます。<replaceable>all</replaceable>が<literal>1</literal>なら、受験者名簿にある全受験者が出力されます。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>モジュール</title>
<refsect2>
<title>OpenDocument</title>
<para><quote><option>--module ods</option></quote>とすると、OpenDocument(OpenOfficeやLibreOfficeなどで用いられる形式)が生成されます。以下のオプションが認識されます:</para>
<variablelist>
<varlistentry>
<term>nom</term>
<listitem>
<para>シートの先頭に表示される試験の名称を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>code</term>
<listitem>
<para>タブ名に使用される試験の略称を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>columns</term>
<listitem>
<para>受験者ごとに追加するカラムのリストを設定します。デフォルト値は<code>student.key,student.name</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>stats</term>
<listitem>
<para>trueなら、設問の統計表が追加されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>statsindic</term>
<listitem>
<para>trueなら、採点対象外設問の統計表が追加されます。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>CSV</title>
<para><quote><option>--module CSV</option></quote>とすると、CSVファイルが生成されます。以下のオプションが認識されます:</para>
<variablelist>
<varlistentry>
<term>columns</term>
<listitem>
<para>受験者ごとに追加するカラムのリストを設定します。デフォルト値は<code>student.copy,student.key,student.name</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>decimal</term>
<listitem>
<para>小数点(デフォルトはピリオド)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>encodage</term>
<listitem>
<para>出力に用いるエンコーディング(デフォルトはutf-8)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>separateur</term>
<listitem>
<para>カラム間の区切文字(デフォルトはカンマ)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>entoure</term>
<listitem>
<para>文字列を囲む文字(デフォルトは二重引用符)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ticked</term>
<listitem>
<para>空でなければ、<quote><literal>CHECKED:</literal></quote>で始まる名前のカラムが追加され、各答案でどのボックスがマークされているか表示されます。これは、採点をもっと柔軟に行いたい場合に、外部プログラムがマークされたボックスの情報を得るのに使うことができます。ボックス3と4がマークされている場合、<literal>01</literal>という値を指定すれば0;0;1;1;0となり、<literal>AB</literal>という値を指定すればCDとなります。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>List</title>
<para><quote><option>--module List</option></quote>とすると、受験者ごとの得点の一覧がPDFファイルで生成されます。以下のオプションが認識されます:</para>
<variablelist>
<varlistentry>
<term>pagesize</term>
<listitem>
<para>ページサイズです。デフォルト値は<code>a4</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>nom</term>
<listitem>
<para>ページの先頭に表示する試験の名称を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ncols</term>
<listitem>
<para>カラム数です。デフォルト値は2です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>decimal</term>
<listitem>
<para>小数点(デフォルトはピリオド)を設定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
</refentry>
<refentry id="auto-multiple-choice-annote">
<refmeta>
<refentrytitle>auto-multiple-choice-annotate</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-annotate</refname>
<refpurpose>AMC選択式試験問題の答案に採点結果を記入する</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">annotate</arg>
<arg choice="plain">--project <replaceable>project-dir</replaceable></arg>
<arg choice="plain">--names-file <replaceable>students.csv</replaceable></arg>
<arg rep="repeat">annotation options</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice annotate</command>コマンドは、答案に各設問の採点と全体の採点を記入し、PDFファイル(受験者別の複数ファイルか全体の単一ファイル)を出力します。</para>
<refsect2>
<title>全般オプション</title>
<variablelist>
<varlistentry>
<term><option>--project
<replaceable>project-dir</replaceable></option></term>
<listitem>
<para>プロジェクト名かディレクトリを設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--data
<replaceable>project-data-dir</replaceable></option></term>
<listitem>
<para>データファイルがあるディレクトリ(デフォルト値は<filename><replaceable>project-dir</replaceable>/data</filename>)を指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--pdf-dir
<replaceable>pdf-dir</replaceable></option></term>
<listitem>
<para>プロジェクトのpdfディレクトリ(デフォルト値は<filename><replaceable>project-dir</replaceable>/cr/corrections/pdf</filename>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--names-file
<replaceable>students-list.csv</replaceable></option></term>
<listitem>
<para>受験者名簿ファイル名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--names-encoding
<replaceable>encoding</replaceable></option></term>
<listitem>
<para><replaceable>students-list.csv</replaceable>のエンコーディング(デフォルトはutf-8)を選択します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--association-key
<replaceable>key</replaceable></option></term>
<listitem>
<para>受験者識別に使用するカラム(受験者名簿ファイル内のカラム名)を設定します。識別時に実際に使用した値がデータベースに格納され、これがデフォルト値となるので、このオプションは使用すべきでありません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--subject
<replaceable>subject.pdf</replaceable></option></term>
<listitem>
<para>試験問題ファイル(デフォルト値は<filename><replaceable>project-dir</replaceable>/DOC-sujet.pdf</filename>)のパスを設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--compose
<replaceable>mode</replaceable></option></term>
<listitem>
<para>マークするボックスのないページ(例えば答案用紙より前にある問題のみのページなど)を問題用紙からもってくる場合にこのオプションを使用します。<replaceable>mode</replaceable>が1のときは、問題用紙からページを取得し、受験者の答案と同じようにマークを記入し、同じ採点記号を答案用紙に記入します。<replaceable>mode</replaceable>が2のときは、採点済の答案用紙からページを取得し、(重複するので)採点記号は記入しません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--corrected
<replaceable>corrected.pdf</replaceable></option></term>
<listitem>
<para>PDFの模範解答のパス(デフォルトは<filename><replaceable>project-dir</replaceable>/DOC-corrected.pdf</filename>。ファイルが存在しなければ、<option>--n-copies</option>, <option>--with</option>, <option>--filter</option>, <option>--filtered-source</option>の各オプションの値を用いて作成されます)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--darkness-threshold
<replaceable>t</replaceable></option></term>
<listitem>
<para>黒ピクセル比率の閾値を設定します。採点時に実際に使用した値がデータベースに格納され、これがデフォルト値となるので、このオプションは使用すべきでありません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--darkness-threshold-up
<replaceable>upper_t</replaceable></option></term>
<listitem>
<para>黒ピクセル比率の上限の閾値を設定します。採点時に実際に使用した値がデータベースに格納され、これがデフォルト値となるので、このオプションは使用すべきでありません。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--csv-build-name
<replaceable>name-model</replaceable></option></term>
<listitem>
<para>受験者名簿ファイルから受験者名を構成するためのモデルを設定します。デフォルト値は<quote><code>(nom|surname) (prenom|name)</code></quote>で、この場合、氏名は<code>nom</code>カラム(なければ<code>surname</code>カラム)の内容の後に<code>prenom</code>カラム(なければ<code>name</code>カラム)の内容を続けたものになり、したがって、フランス語か英語の単純なCSVファイルでたいていうまくいきます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--id-file
<replaceable>ids.txt</replaceable></option></term>
<listitem>
<para>採点を記入する答案用紙のID一覧ファイル(個別答案用紙モードなら受験番号、コピー答案用紙モードなら<code><replaceable>student</replaceable>:<replaceable>copy</replaceable></code>を各行に一つ)を指定します。ファイルが指定されない場合は、すべての答案用紙に採点が記入されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug
<replaceable>file.log</replaceable></option></term>
<listitem>
<para>デバッグ情報を記録するファイルを指定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>PDF出力オプション</title>
<variablelist>
<varlistentry>
<term><option>--single-output</option></term>
<listitem>
<para>採点済答案を単一のPDFファイルにまとめるにはこのオプションを使用してください。デフォルトの動作は受験者一人につき一つのPDFファイルを作成します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--sort
<replaceable>s</replaceable></option></term>
<listitem>
<para>以下のソートキーを設定します(<option>--single-output</option>を使用する場合のみ有効):</para>
<variablelist>
<varlistentry>
<term>l</term>
<listitem>
<para>受験者名簿ファイル順。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>m</term>
<listitem>
<para>成績順。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>i</term>
<listitem>
<para>試験問題ID順。</para>
</listitem>
</varlistentry>
<varlistentry>
<term>n</term>
<listitem>
<para>氏名順。</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--filename-model
<replaceable>model</replaceable></option></term>
<listitem>
<para>採点記入済PDF用のファイル名モデルを設定します。このモデルでは特定のシーケンスが以下のように置換されます:</para>
<variablelist>
<varlistentry>
<term><literal>(N)</literal></term>
<listitem>
<para>は受験者名(<option>--csv-build-name</option>参照)に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>(ID)</literal></term>
<listitem>
<para>は受験番号に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>(<replaceable>COL</replaceable>)</literal></term>
<listitem>
<para>は受験者名簿内の<replaceable>COL</replaceable>カラムの値に置換されます。</para>
</listitem>
</varlistentry>
</variablelist>
<para>デフォルト値は<quote><literal>(N)-(ID).pdf</literal></quote>です。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>ソースファイルオプション</title>
<para>以下のオプションは<option>--corrected</option>で指定したファイルが存在せず、そのファイルを再構築するときに使用されます。</para>
<variablelist>
<varlistentry>
<term><option>--src <replaceable>mcq-source-file</replaceable>
--n-copies <replaceable>n</replaceable> --with
<replaceable>latex-engine</replaceable> --filter
<replaceable>filter-name</replaceable> --filtered-source
<replaceable>fs.tex</replaceable></option></term>
<listitem>
<para><citerefentry>
<refentrytitle>auto-multiple-choice-prepare</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>を参照してください。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>スキャン画像埋込み用オプション</title>
<para>スキャン画像が存在する場合、採点記入済PDFファイルに埋め込まれます。以下のオプションは埋め込むスキャン画像の品質を制御し、ファイルサイズを縮小できるようにします。</para>
<variablelist>
<varlistentry>
<term><option>--embedded-max-size
<replaceable>maxsize</replaceable></option></term>
<listitem>
<para>スキャン画像の最大サイズをピクセル単位で(<literal><replaceable>width</replaceable>x<replaceable>height</replaceable></literal>の形式で)設定します。デフォルト値は空で、この場合は上限はありません。指定したサイズより大きいスキャン画像は採点記入済ファイルに埋め込む前に縮小されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--embedded-format
<replaceable>format</replaceable></option></term>
<listitem>
<para>埋込み形式を<replaceable>jpeg</replaceable>か<replaceable>png</replaceable>で設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--embedded-jpeg-quality
<replaceable>quality</replaceable></option></term>
<listitem>
<para>JPEGで埋め込む場合のJPEG品質を(1から100で)設定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>採点記入オプション</title>
<para>以下のオプションはどのような採点が記入されるかを制御します。</para>
<variablelist>
<varlistentry>
<term><option>--font-size
<replaceable>fs</replaceable></option></term>
<listitem>
<para>フォントサイズをポイント値で設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--text-color
<replaceable>color</replaceable></option></term>
<listitem>
<para>文字の色を設定します。デフォルト値は<replaceable>red</replaceable>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--verdict
<replaceable>header</replaceable></option></term>
<listitem>
<para>各受験者の答案用紙の先頭ページに表示するテキストヘッダを設定します。このテキストは複数行のヘッダ用に改行文字を含むことができます。以下の特定のシーケンスが置換されます:</para>
<variablelist>
<varlistentry>
<term><literal>%S</literal></term>
<listitem>
<para>は受験者の素点合計に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%M</literal></term>
<listitem>
<para>は素点合計の満点に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%s</literal></term>
<listitem>
<para>は受験者の得点に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%m</literal></term>
<listitem>
<para>は満点に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%(ID)</literal></term>
<listitem>
<para>は受験者名に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%(<replaceable>COL</replaceable>)</literal></term>
<listitem>
<para>は受験者名簿内の<replaceable>COL</replaceable>カラムの値に置換されます。</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--position
<replaceable>pos</replaceable></option></term>
<listitem>
<para>各設問の採点記入位置を設定します:</para>
<variablelist>
<varlistentry>
<term>marge</term>
<listitem>
<para>左マージンに記入</para>
</listitem>
</varlistentry>
<varlistentry>
<term>marges</term>
<listitem>
<para>(左右いずれかの)近い方のマージンに記入</para>
</listitem>
</varlistentry>
<varlistentry>
<term>case</term>
<listitem>
<para>マーク用ボックスの近くに記入</para>
</listitem>
</varlistentry>
<varlistentry>
<term>none</term>
<listitem>
<para>採点を記入しない</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>--verdict-question
<replaceable>perl-expression</replaceable></term>
<listitem>
<para>各設問の隣に印刷されるテキストをperlで評価される式として設定します(単純なテキストが必要なら<code>"</code>で囲んでください)。いくつかのシーケンスは評価の前に置換されます:</para>
<variablelist>
<varlistentry>
<term><literal>%S</literal></term>
<listitem>
<para>はこの設問の素点に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%M</literal></term>
<listitem>
<para>はこの設問の満点に置換されます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%s</literal></term>
<listitem>
<para>は<code>%S</code>と同じですが、<replaceable>nc</replaceable>桁(<option>--ch-sign</option>オプション参照)に丸められます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>%m</literal></term>
<listitem>
<para>は<code>%M</code>と同じですが、<replaceable>nc</replaceable>桁(<option>--ch-sign</option>オプション参照)に丸められます。</para>
</listitem>
</varlistentry>
</variablelist>
<para>このオプションのデフォルト値は<quote><code>"%s/%m"</code></quote>です。条件式を(<code>( TEST ? IF-YES : IF-NO )</code>というperlの構文を用いて)書くこともできます。満点なら<emphasis>合格</emphasis>、そうでなければ<emphasis>不合格</emphasis>と書くには、次のようにします。</para>
<programlisting>--verdict-question "(%S==%M ? \"合格\" : \"不合格\")"</programlisting>
</listitem>
</varlistentry>
<varlistentry>
<term>--verdict-question-cancelled
<replaceable>perl-expression</replaceable></term>
<listitem>
<para><option>--verdict-question</option>と同じですが、キャンセルした設問(<code>allowempty</code>採点基準を参照)に適用されます。デフォルト値は<quote><code>"X"</code></quote>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--indicatives</option></term>
<listitem>
<para>採点対象外の設問にも採点を記入するにはこのオプションを使用します。(これらの設問の素点は全体の素点を計算する際にはカウントされません。正誤の状態はこれらの設問にたいてい無関係なので、対応するボックスへの正誤マークは記入しません)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--line-width
<replaceable>width</replaceable></option></term>
<listitem>
<para>採点時に記入する記号の線幅(ピクセル数)を設定します。デフォルト値は2です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--symbols
<replaceable>symbols-definition</replaceable></option></term>
<listitem>
<para>はボックスにどのように記号をつけるかを定義します。<replaceable>symbols-definition</replaceable>は、<literal><replaceable>H</replaceable>-<replaceable>A</replaceable>:<replaceable>shape</replaceable>:<replaceable>color</replaceable></literal>の形式をカンマで区切ったリストで
、<replaceable>H</replaceable>は<literal>0</literal>か<literal>1</literal>でボックスがマークすべきでないかすべきかを表し、<replaceable>A</replaceable>は<literal>0</literal>か<literal>1</literal>でボックスがマークされていないかされているかを表し、<replaceable>shape</replaceable>は<literal>none</literal>、<literal>circle</literal>、<literal>mark</literal>、<literal>box</literal>のどれか一つであり
、<replaceable>color</replaceable>は色(名前または#RGBで、詳細はImageMagickかGraphicsMagickのドキュメントを参照)を表します。デフォルト値は<quote><code>0-0:none,0-1:circle:red,1-0:mark:red,1-1:mark:blue</code></quote>です。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>長さ</title>
<para>以下の長さには単位を指定することができます(<code>in</code>, <code>ft</code>, <code>pt</code>, <code>cm</code>, <code>mm</code>)。</para>
<variablelist>
<varlistentry>
<term><option>--dist-to-box
<replaceable>d</replaceable></option></term>
<listitem>
<para><option>--position case</option>を使用する場合に、記入位置のボックスからの距離を設定します。デフォルトは<code>1cm</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--dist-margin
<replaceable>d</replaceable></option></term>
<listitem>
<para>マージンのサイズを設定します。デフォルトは<code>5mm</code>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--dist-margin-global
<replaceable>d</replaceable></option></term>
<listitem>
<para>ヘッダーのマージンサイズを設定します。デフォルトは<code>3mm</code>です。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
</refentry>
<refentry>
<refmeta>
<refentrytitle>auto-multiple-choice-mailing</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Auto Multiple Choice</refmiscinfo>
<refmiscinfo class="version">@/PACKAGE_V_DEB/@</refmiscinfo>
</refmeta>
<refnamediv>
<refname>auto-multiple-choice-mailing</refname>
<refpurpose>採点記入済答案のPDFを受験者にメールする</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>auto-multiple-choice</command>
<arg choice="plain">mailing
</arg>
<arg>--xmlargs <replaceable>args.xml</replaceable></arg>
<arg choice="plain">--project <replaceable>project-dir</replaceable>
</arg>
<arg choice="plain">--students-list <replaceable>students-list.csv</replaceable>
</arg>
<arg>--list-encoding <replaceable>encoding</replaceable></arg>
<arg choice="plain">--email-column <replaceable>col</replaceable>
</arg>
<arg choice="plain">--sender <replaceable>sender-email</replaceable>
</arg>
<arg choice="plain">--subject <replaceable>subject</replaceable>
</arg>
<arg choice="plain">--text <replaceable>email-body</replaceable>
</arg>
<arg>--text-content-type
<replaceable>content-type</replaceable></arg>
<arg>--debug <replaceable>file.log</replaceable></arg>
<arg rep="repeat"><replaceable>transport arguments</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>解説</title>
<para><command>auto-multiple-choice mailing</command>コマンドは、採点記入済答案のPDFを受験者にメールで送付します。メールアドレスは受験者名簿ファイルから取り出されます。</para>
<variablelist>
<varlistentry>
<term><option>--project
<replaceable>project-dir</replaceable></option></term>
<listitem>
<para>プロジェクトディレクトリを指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--students-list
<replaceable>students-list.csv</replaceable></option></term>
<listitem>
<para>受験者名簿ファイル名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--list-encoding
<replaceable>encoding</replaceable></option></term>
<listitem>
<para><replaceable>students-list.csv</replaceable>のエンコーディング(デフォルトはutf-8)を選択します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--email-column
<replaceable>col</replaceable></option></term>
<listitem>
<para>受験者名簿ファイル内で、受験者のメールアドレスに該当するカラム名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--sender
<replaceable>sender-email</replaceable></option></term>
<listitem>
<para>差出人アドレスを設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--cc
<replaceable>cc-email-address</replaceable></option></term>
<listitem>
<para>Ccアドレスを設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--bcc
<replaceable>bcc-email-address</replaceable></option></term>
<listitem>
<para>Bccアドレスを設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--subject
<replaceable>subject</replaceable></option></term>
<listitem>
<para>送付するメールの件名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--text
<replaceable>email-body</replaceable></option></term>
<listitem>
<para>送付するメールの本文を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--text-content-type
<replaceable>content-type</replaceable></option></term>
<listitem>
<para>メール本文のcontent-typeを設定します。<replaceable>content-type</replaceable>は、<constant>text/plain</constant>か<constant>text/html</constant>です。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--attach
<replaceable>filename</replaceable></option></term>
<listitem>
<para>送付する各メールにファイル<replaceable>filename</replaceable>を添付します。このオプションを複数回使用すれば、複数のファイルを添付できます。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--transport
<replaceable>transport</replaceable></option></term>
<listitem>
<para>転送方法を設定します。有効な<replaceable>transport</replaceable>は、<constant>sendmail</constant>か<constant>SMTP</constant>のいずれかです。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug
<replaceable>file.log</replaceable></option></term>
<listitem>
<para>デバッグ情報を記録するファイルを指定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--delay
<replaceable>time</replaceable></option></term>
<listitem>
<para>各送信間に<replaceable>time</replaceable>秒の遅延を設定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>転送方法別の引数</title>
<para><replaceable>transport</replaceable>引数の値により、以下の引数が追加されます:</para>
<refsect2>
<title>sendmail転送</title>
<variablelist>
<varlistentry>
<term><option>--sendmail-path
<replaceable>path</replaceable></option></term>
<listitem>
<para><command>sendmail</command>コマンドのパス(デフォルトは<filename>/usr/sbin/sendmail</filename>)を設定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title>SMTP転送</title>
<variablelist>
<varlistentry>
<term><option>--smtp-host
<replaceable>host</replaceable></option></term>
<listitem>
<para>SMTPホスト名(デフォルトは<constant>smtp</constant>)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--smtp-port
<replaceable>port</replaceable></option></term>
<listitem>
<para>使用するポート(デフォルト値は25)を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--smtp-ssl
<replaceable>mode</replaceable></option></term>
<listitem>
<para>SMTP接続のセキュリティモードを設定します。<replaceable>mode</replaceable>オプションは<code>ssl</code>、<code>starttls</code>、<code>0</code>(暗号なし)のいずれかです。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--smtp-user
<replaceable>user</replaceable></option></term>
<listitem>
<para>SMTP認証のためのユーザ名を設定します。</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--smtp-passwd-file
<replaceable>file</replaceable></option></term>
<listitem>
<para>SMTP認証のためのパスワードを(1行目に)含んだファイルのパスを指定します。</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1>
<title>XMLファイルによる引数</title>
<para>エンコーディング問題を避けるため、XMLファイルに引数を置いて、<option>--xmlargs <replaceable>file.xml</replaceable></option>をコマンドの最初の引数とすることができます。そのようなファイルの例を示します:</para>
<programlisting><?xml version="1.0" encoding="UTF-8"?>
<arguments>
<arg>--sender</arg><arg>Bienvenue &lt;paamc@passoire.fr&gt;</arg>
<arg>--text</arg><arg>Voilà votre copie corrigée</arg>
<arg>--subject</arg><arg>QCM</arg>
</arguments></programlisting>
</refsect1>
</refentry>
</sect1>
<sect1>
<title>その他</title>
<sect2 id="divers.gmail">
<title>AMCでGMAILを使用するための設定</title>
<para>Gmailアカウントにログインし、「安全性の低いアプリの許可」を有効にします。(訳注: Googleの「アカウント情報」から「ログインとセキュリティ」を開くと、最下部にあります。)</para>
<sect3>
<title>Linuxユーザ(Ubuntu、Xubuntu、Lubuntu等)</title>
<para>端末で以下を入力します:</para>
<programlisting>sudo apt-get install msmtp</programlisting>
<programlisting>sudo gedit /etc/msmtprc</programlisting>
<para>msmtprcファイルに以下の内容を追加して保存します。</para>
<programlisting>
account gmail
host smtp.gmail.com
tls on
tls_certcheck off
port 587
auth login
from <emphasis>your_user_name@gmail.com</emphasis>
user <emphasis>your_user_name@gmail.com</emphasis>
password <emphasis>your_password</emphasis>
</programlisting>
<para>
AMCを設定します:<menuchoice>
<guimenu>編集</guimenu>
<guisubmenu>設定</guisubmenu>
<guisubmenu>メール</guisubmenu>
<guimenuitem>メール配信方法</guimenuitem>
</menuchoice>で<guibutton>sendmail</guibutton>を選択し、sendmailのパスを<programlisting>/usr/bin/msmtp</programlisting>に設定します。
</para>
</sect3>
<sect3>
<title>Macintoshユーザ</title>
<para>端末で以下を入力します:</para>
<programlisting>sudo port install msmtp</programlisting>
<programlisting>sudo pico ~/.msmtprc</programlisting>
<para>msmtprcファイルに以下の内容を追加して保存します。</para>
<programlisting>
account gmail
host smtp.gmail.com
tls on
tls_certcheck off
port 587
auth login
from <emphasis>your_user_name@gmail.com</emphasis>
user <emphasis>your_user_name@gmail.com</emphasis>
password <emphasis>your_password</emphasis>
</programlisting>
<para>
AMCを設定します:<menuchoice>
<guimenu>編集</guimenu>
<guisubmenu>設定</guisubmenu>
<guisubmenu>メール</guisubmenu>
<guimenuitem>メール配信方法</guimenuitem>
</menuchoice>で<guibutton>sendmail</guibutton>を選択し、sendmailのパスを<programlisting>/opt/local/bin/msmtp</programlisting>に設定します。
</para>
</sect3>
</sect2>
</sect1>
<index/>
</article>
|