1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311
|
% \iffalse meta-comment
% --------------------------------------------------------------
% Part of the TeXPower bundle
% Copyright (C) 1999-2004 Stephan Lehmke
% Copyright (C) 2003-2005 Hans Fredrik Nordhaug
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% --------------------------------------------------------------
%
% texpower-doc.dtx,v 1.13 2005/04/09 23:12:36 hansfn Exp
%
% \fi
%
% \iffalse
%
%<*driver>
\documentclass{article}
\begin{document}
\typeout{***********************************************************}
\typeout{*}
\typeout{*\space\space\space\space\space\space\space Do NOT compile this dtx file!}
\typeout{*}
\typeout{***********************************************************}
\end{document}
%</driver>
%
% \fi
%
%<faq-disp>\ProvidesFile{FAQ-display.tex}%
%<faq-print>\ProvidesFile{FAQ-printout.tex}%
%<faq-disp|faq-print> [2005/04/07 TeXPower FAQ]
%
%<manual>\ProvidesFile{manual.tex}%
%<manual> [2005/04/07 TeXPower manual]
%<fulldemo>\ProvidesFile{fulldemo.tex}%
%<fulldemo> [2005/04/07 TeXPower full demo and manual]
%
%<bckwrdexample>\ProvidesFile{bckwrdexample.tex}%
%<bgndexample>\ProvidesFile{bgndexample.tex}%
%<divexample>\ProvidesFile{divexample.tex}%
%<fancyexample>\ProvidesFile{fancyexample.tex}%
%<foilsdemo>\ProvidesFile{foilsdemo.tex}%
%<hilitexample>\ProvidesFile{hilitexample.tex}%
%<ifmslidemo>\ProvidesFile{ifmslidemo.tex}%
%<mathexample>\ProvidesFile{mathexample.tex}%
%<panelexample>\ProvidesFile{panelexample.tex}%
%<parexample>\ProvidesFile{parexample.tex}%
%<pdfscrdemo>\ProvidesFile{pdfscrdemo.tex}%
%<pdfslidemo>\ProvidesFile{pdfslidemo.tex}%
%<picexample>\ProvidesFile{picexample.tex}%
%<pp4sldemo>\ProvidesFile{pp4sldemo.tex}%
%<prosperdemo>\ProvidesFile{prosperdemo.tex}%
%<seminardemo>\ProvidesFile{seminardemo.tex}%
%<simpledemo>\ProvidesFile{simpledemo.tex}%
%<slidesdemo>\ProvidesFile{slidesdemo.tex}%
%<spanelexample>\ProvidesFile{spanelexample.tex}%
%<tabexample>\ProvidesFile{tabexample.tex}%
%<verbexample>\ProvidesFile{verbexample.tex}%
%<bckwrdexample|bgndexample|divexample|fancyexample|foilsdemo|hilitexample|ifmslidemo> [2005/04/07 TeXPower example file]
%<mathexample|panelexample|parexample|pdfscrdemo|pdfslidemo|picexample|pp4sldemo> [2005/04/07 TeXPower example file]
%<prosperdemo|seminardemo|simpledemo|slidesdemo|spanelexample|tabexample|verbexample> [2005/04/07 TeXPower example file]
%
%<*version>
%<<KEEPCOMMENTS
% Version info used in titles
\def\tpversion{v0.2 of April 8, 2005}
%KEEPCOMMENTS
%</version>
%
% \CheckSum{0}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
%<*config>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Code for user-specific configuration of TeXPower documentation files.
%
% This file is input by others. Don't compile it separately.
%
\hypersetup{baseurl={http://texpower.sourceforge.net/doc/}}
\hypersetup{pdfsubject={Documentation and Examples for the texpower package}}
\hypersetup{pdfauthor={Stephan Lehmke}}
%KEEPCOMMENTS
%</config>
%=================================================================================================================
%<*preamble>
%<<KEEPCOMMENTS
%
\documentclass
[%
%-----------------------------------------------------------------------------------------------------------------
% Document class options:
% -----------------------
%
% Landscape slides formatted for letter paper fit most screen resolutions (more or less).
%
letterpaper,%
landscape,%
%
% The KOMA option makes powersem load scrartcl.cls instead of article.cls.
%
KOMA,%
% KOMA document class options are accepted.
smallheadings,%
%
% The calcdimensions option makes powersem calculate the slide dimensions automatically from paper size and margins.
calcdimensions,%
%
% The display option sets everything up for producing slides to be displayed interactively.
% This option is also recognized by the texpower package.
%
display%
%-----------------------------------------------------------------------------------------------------------------
]
%-----------------------------------------------------------------------------------------------------------------
% Document class powersem, based on seminar.cls for simulating ppower via latex+distiller (instead of pdflatex).
%
{powersem}
%-----------------------------------------------------------------------------------------------------------------
% Set slide margins rather small for maximum use of space. This is a demo, remember.
%
\renewcommand{\slidetopmargin}{5mm}
\renewcommand{\slidebottommargin}{5mm}
\renewcommand{\slideleftmargin}{5mm}
\renewcommand{\sliderightmargin}{5mm}
%-----------------------------------------------------------------------------------------------------------------
% Some setup for more reasonable spacing.
%
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-1.5ex\@plus -1ex \@minus -.5ex}%
{.5ex \@plus .2ex}%
{\raggedsection\normalfont\size@section\sectfont}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-1.25ex\@plus -1ex \@minus -.2ex}%
{.5ex \@plus .2ex}%
{\raggedsection\normalfont\size@subsection\sectfont}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-1.25ex\@plus -1ex \@minus -.2ex}%
{.5ex \@plus .2ex}%
{\raggedsection\normalfont\size@subsubsection\sectfont}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{1.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\raggedsection\normalfont\size@paragraph\sectfont}}
\def\slideitemsep{.5ex plus .3ex minus .2ex}
\makeatother
%-----------------------------------------------------------------------------------------------------------------
% We need some more packages...
%
\usepackage{url}
\usepackage[latin1]{inputenc}
% One more Text emphasis command...
\let\name=\textsc
%-----------------------------------------------------------------------------------------------------------------
% We load hyperref and fixseminar which fixes some problems with seminar.
%
\usepackage[ps2pdf,plainpages=false,bookmarksopen,colorlinks,urlcolor=red,pdfpagemode=FullScreen]{hyperref}
\usepackage{fixseminar}
%-----------------------------------------------------------------------------------------------------------------
% Finally, the texpower package is loaded.
%
\usepackage{texpower}
%% The configuration file allows user-specific settings.
\input{__TPcfg}
%-----------------------------------------------------------------------------------------------------------------
% Some more parameters...
%
\slidesmag{5}
\slideframe{none}
\pagestyle{empty}
\setcounter{tocdepth}{2}
\renewcommand{\currentpagevalue}{\value{slide}}
%-----------------------------------------------------------------------------------------------------------------
% The following command produces a title page for every example and documentation file.
\newcommand{\makeslidetitle}[1]
{%
\title{The \TeX Power bundle\\[2ex]{\normalfont #1}}
\author
{%
Stephan Lehmke\\
\mdseries
University of Dortmund\\
\mdseries
Department of Computer Science I\\
\url{mailto:Stephan.Lehmke@udo.edu}%
}
{\centerslidestrue
\maketitle
\newslide}
\setcounter{firststep}{1}% This way, the first step of all examples is displayed.
}
%KEEPCOMMENTS
%</preamble>
%=================================================================================================================
%<*indexing>
%<<KEEPCOMMENTS
%
% Setting up indexing for the TeXPower fulldemo and manual.
%
%-----------------------------------------------------------------------------------------------------------------
\usepackage{makeidx}
\makeindex
\newcommand{\indexcode}[1]{\index{#1@\code{#1}}}
\newcommand{\indexmacro}[1]{\index{#1@\macroname{#1}}}
\newcommand{\indexmacroopt}[2]{%
\index{#1 macro options@\macroname{#1} macro options!#2@\code{#2}}%
\index{#2@\code{#2}|see{\macroname{#1} macro options}}}
\newcommand{\indexfile}[2]{\index{#1@\code{#1} #2}}
\newcommand{\indexpckopt}[2]{%
\index{#1 package options@\code{#1} package options!#2@\code{#2}}%
\index{#2@\code{#2}|see{\code{#1} package options}}}
\newcommand{\indexpckswitch}[2]{%
\index{#1 package switches@\code{#1} package switches!#2@\code{#2}}%
\index{#2@\code{#2}|see{\code{#1} package switches}}}
\newcommand{\indexstepwise}[2]{%
\index{stepwise@\macroname{stepwise}!#1@\code{#1} (#2)}%
\index{#1@\code{#1}|see{\macroname{stepwise}}}}
%KEEPCOMMENTS
%</indexing>
%=================================================================================================================
%<*faq-disp>
%<<KEEPCOMMENTS
% Enable all color emphasis and highlighting options; use a light background and slifonts.
\PassOptionsToPackage{coloremph,colormath,colorhighlight,lightbackground}{texpower}
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={TeXPower Frequently Asked Questions list}}
\slidesmag{4}
% The package soul is needed for \highlighttext to work.
\usepackage{soul}
% The following package makes code look a little nicer, but it may not be present on all systems.
\IfFileExists{cmtt.sty}{\usepackage[override]{cmtt}}{}
\usepackage{fancyvrb}
\usepackage{array}
\usepackage{longtable}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</faq-disp>
%=================================================================================================================
%<*faq-print>
%<<KEEPCOMMENTS
\documentclass[12pt]{scrartcl}
%-----------------------------------------------------------------------------------------------------------------
% We need some more packages...
%
\usepackage{url}
\usepackage[latin1]{inputenc}
% The following package makes code look a little nicer, but it may not be present on all systems.
\IfFileExists{cmtt.sty}{\usepackage[override]{cmtt}}{}
% Loading the soul package enables the \highlighttext command.
\usepackage{soul}
% One more Text emphasis command...
\let\name=\textsc
\usepackage{fancyvrb}
\usepackage{array}
\usepackage{longtable}
%-----------------------------------------------------------------------------------------------------------------
% Load hyperref.
%
\usepackage[bookmarksopen,colorlinks]{hyperref}
%-----------------------------------------------------------------------------------------------------------------
% Finally, the texpower package is loaded.
%
\usepackage{texpower}
%-----------------------------------------------------------------------------------------------------------------
% The configuration file allows user-specific settings.
\input{__TPcfg}
%-----------------------------------------------------------------------------------------------------------------
% The code in the file __TPFAQ is meant for the document class seminar. Thus, it contains some seminar-specific commands
% which are replaced by dummies here.
\let\newslide=\relax
%-----------------------------------------------------------------------------------------------------------------
% The following command produces the title for this document.
\newcommand{\makeslidetitle}[1]
{%
\hypersetup{pdftitle={#1}}
\title{The \TeX Power bundle\\{\normalfont #1}}
\author{Stephan Lehmke\\\url{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
}
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\vfuzz \hfuzz
\relax
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
%KEEPCOMMENTS
%</faq-print>
%=================================================================================================================
%<*faq>
%<<KEEPCOMMENTS
\providecommand{\vanishcolor}{}
\DefineVerbatimEnvironment{LaTeXCode}{Verbatim}
{gobble=2,formatcom=\codeswitch,frame=single,numbers=left,xleftmargin=1em,numbersep=.5em}
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle
{%
Frequently asked questions list%
\thanks{FAQ for \TeX Power \tpversion .}%
}%
\setcounter{firststep}{0}
\tableofcontents
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{General}
\subsection{Where can I get the newest version of the \TeX Power FAQ\,?}
You can download the latest version of the \TeX Power FAQ from the following URLs:
\begin{center}
Screen version:\\
\url{http://texpower.sourceforge.net/doc/FAQ-display.pdf}
Printout version:\\
\url{http://texpower.sourceforge.net/doc/FAQ-printout.pdf}
\end{center}
\newslide
\subsection{What is \TeX Power\,?}
The \TeX Power bundle contains style and class files for creating dynamic online presentations with \LaTeX.
The heart of the bundle is the package \code{texpower.sty} which implements some commands for presentation effects. This
includes setting page transitions, color highlighting and displaying pages incrementally.
The document class \code{powersem.cls} is a wrapper for seminar which sets up everything for dynamic presentations.
\newslide
\subsection{Where can I obtain \TeX Power\,?}
The complete bundle, together with its documentation, can be found under the URL
\begin{center}
\url{http://texpower.sourceforge.net/}
\end{center}
\newslide
\subsection{Where can I discuss \TeX Power or ask for help\,?}
Bug and problem reports should go to
\href{http://sourceforge.net/tracker/?group_id=60743&atid=495145}{the bug tracker}.
Discussions about \TeX Power should take place on
\href{http://lists.sourceforge.net/lists/listinfo/texpower-users/}{the mailing list}
or in
\href{http://sourceforge.net/forum/forum.php?forum_id=204738}{the discussion forum}.
\newslide
\subsection{What alternatives are there to using \TeX Power\,?}
The most prominent alternative to \TeX Power is the \concept{Pdf Presentation Post Processor} PPower4, the homepage of
which is
\begin{quote}
\url{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}
\end{quote}
Another alternative is the \concept{Utopia PDF Presentations Bundle}, which provides a complete presentation design
environment. Its home page is
\begin{quote}
\url{http://www.utopiatype.com.au/products/ubundle.html}
\end{quote}
Comparisons of different presentation packages can be found on the home page of \name{Prof.\,D.\,P.\,Story}:
\begin{quote}
\url{http://www.math.uakron.edu/~dpstory/pdf_demos.html}
\end{quote}
and in the talk held by \name{Ross Moore} at the \name{California Institute of Technology} on 8th May 2000:
\begin{quote}
\url{http://www.cds.caltech.edu/caltex/2000/}
\end{quote}
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{Usage}
\subsection{How do I design a presentation with \TeX Power\,?}
It should be stressed that \TeX Power is \underl{not} (currently) a complete presentation package. It just adds dynamic
presentation effects (and some other gimmicks specifically interesting for dynamic presentations) and should always be
combined with a document class dedicated to designing presentations (or a package like
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfslide.html}{\code{pdfslide}}).
There are demos in the \href{http://texpower.sourceforge.net/doc/}{\code{doc}} directory for most
popular presentation-making document classes and packages.
\newslide
\subsection{I find \TeX Power very complicated. How can I learn how to realize dynamic effects\,?}
As always with \TeX, you should first make up your mind what kind of effect you desire, and what \LaTeX{} structures
will be involved.
Then you should check the examples in the \href{http://texpower.sourceforge.net/doc/}{\code{doc}}
directory for anything similar to what you want. If you find anything suitable, read the corresponding code. There are
some inline comments to explain what's going on. Print out the
\href{http://texpower.sourceforge.net/doc/manual.pdf}{\code{manual}} for documentation of the \TeX
Power commands.
Further `recepies' can be found in section \ref{Sec:HowTo}.
If you don't find anything suitable you can modify to your needs, and can't figure out from the documentation how to
achieve your aims, please ask on
\href{http://lists.sourceforge.net/lists/listinfo/texpower-users/}{the mailing list}. If
you've found an application for \TeX Power not covered by the examples, a new example should be created.
\newslide
\subsection{Can I combine \TeX Power with PPower4\,?}
There is no problem postprocessing documents in which \TeX Power is used. This can be useful, for instance, for
realising structured backgrounds with the \code{background} package from the
\href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4 bundle}.
If there are presentation effects for which you'd like to use PPower4's implementation of the \macroname{pause} command,
then just load PPower4's \code{pause} package. PPower4's definition of \macroname{pause} will override
\code{texpower}'s. Then you can combine PPower4's \macroname{pause} functionality with \TeX Power's \macroname{stepwise}
functionality, for maximum expressive power.
\newslide
\subsection{I'm missing some of the classes and packages used in the demo and example files.}
First of all, it has to be said that \TeX Power makes use of some `modern' features which have been introduced into the
\TeX{} System quite recently and are evolving swiftly. The core of the \code{texpower} package, namely the commands
\macroname{pause} and \macroname{stepwise} is implemented in `pure' \LaTeX{} and should be largely independent of any
fancy extensions, but to get most out of \TeX Power's presentation features and process the more advanced examples, it
is recommended to have a moderately new \TeX{} distribution installed (rule of thumb: not older than one year).
But even if your distribution is quite new, it might not contain some of the classes and packages used by the demos and
examples. Here's a list of (hopefully all of) the packages and classes used (which are not part of core \LaTeX) and
their availability:
\newlength{\twidth}%
{%
\makeatletter
\ifthenelse{\boolean{display}}{\def\@outputpage{\setbox\@cclv\box\@outputbox\slide@output}}{}%
\makeatother
\setlength{\twidth}{\linewidth-\widthof{\code{pdfscreen}}-2cm-6\tabcolsep}%
\begin{longtable}{lp{2cm}>{\raggedright\footnotesize}p{\twidth}}
Package&used in&\normalsize available from\tabularnewline\hline\endhead
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/hyperref.html}{\code{hyperref}}&most
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/hyperref}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/url.html}{\code{url}}&most
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\ \url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/other/misc}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}}&many
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\ \url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/soul}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pstricks.html}{\code{pstricks}}
&\small\code{fulldemo}, \code{picexample}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\ \url{ftp://ftp.dante.de/tex-archive/graphics/pstricks}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/xr.html}{\code{xr-hyper}}
&\small\code{manual}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/hyperref}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/fancyvrb.html}{\code{fancyvrb}}
&\small\code{FAQ}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/fancyvrb}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfscreen.html}{\code{pdfscreen}}
&\small\code{pdfscrdemo}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/pdfscreen}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfslide.html}{\code{pdfslide}}
&\small\code{pdfslidemo}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/pdfslide}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/ppower4.html}{\code{pp4slide}}
&\small\code{pp4sldemo}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/support/ppower4/pp4sty.zip}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/ifmslide.html}{\code{ifmslide}}
&\small\code{ifmslidemo}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/ifmslide}
\tabularnewline
\end{longtable}
}
{%
\makeatletter
\ifthenelse{\boolean{display}}{\def\@outputpage{\setbox\@cclv\box\@outputbox\slide@output}}{}%
\makeatother
\setlength{\twidth}{\linewidth-\widthof{\code{scrartcl}}-2cm-6\tabcolsep}%
\begin{longtable}{lp{2cm}>{\raggedright\footnotesize}p{\twidth}}
Class&used in&\normalsize available from\tabularnewline\hline\endhead
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/seminar.html}{\code{seminar}}&most
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/other/seminar}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/koma-script.html}{\code{scrartcl}}&most
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/koma-script}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/slides.html}{\code{slides}}
&\small\code{slidesdemo}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/macros/latex/base/}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/foiltex.html}{\code{foils}}
&\small\code{foilsdemo}, \code{pp4sldemo}
&\href{http://www.ctan.org/}{CTAN}, e.\,g.\
\url{ftp://ftp.dante.de/tex-archive/nonfree/macros/latex/contrib/supported/foiltex}
\tabularnewline
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/prosper.html}{\code{prosper}}
&\small\code{prosperdemo}
&\url{http://prosper.sourceforge.net/}
\tabularnewline
\end{longtable}
}
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{How do I\dots}\label{Sec:HowTo}
\subsection{How can I incrementally display a paragraph of text\,?}\label{Q:Par}
The easiest solution is to use \macroname{parstepwise}, but if the arguments of \macroname{step} are long, you'll get
problems with line breaks, as \macroname{parstepwise} forces \macroname{step} to put its argument in a box.
You can use \macroname{hidetext} like this:
\begin{LaTeXCode}
\stepwise[\let\hidestepcontents=\hidetext]
{\step{Line breaks} \step{work in here.}}
\end{LaTeXCode}
\stepwise[\let\hidestepcontents=\hidetext]
{%
\ifthenelse{\boolean{display}}
{%
yields
\present
{%
\begin{minipage}{7em}
\step{Line breaks} \step{work in here.}
\end{minipage}%
}
}
{}
But note that \macroname{hidetext}, being implemented using the \code{soul} package, is quite fragile (compare
\ref{Sec:hidetext}).
}
\newslide
If you're not using structured backgrounds, \macroname{hidevanish} is another alternative which can be used exactly like
\macroname{hidetext}, but is much more robust (note that this will fail whenever your text should appear in front of
different background colors, for any reason).
In the argument of \macroname{hidevanish}, which uses \macroname{textcolor}, paragraph breaks are not allowed. Using
\macroname{vstep} is a little less restrictive:
\begin{LaTeXCode}
\stepwise
{%
{\vstep Line and paragraph breaks
\vstep work in here.\par Yeah!}%
}
\end{LaTeXCode}
\stepwise[\renewcommand{\vanishcolor}{presentcolor}]
{%
\ifthenelse{\boolean{display}}
{%
yields
\present
{%
\begin{minipage}{13em}
\vstep Line and paragraph breaks \vstep work in here.\par Yeah!
\end{minipage}%
}
}
{}
}
\newslide
To facilitate the decision, here's a side-by-side comparison of the pros and cons:
\macroname{parstepwise}:
\begin{itemize}
\item[\origmath{+}] robust
\item[\origmath{+}] works with structured backgrounds
\item[\origmath{-}] no automatic line breaks in \macroname{step}'s argument
\item[\origmath{-}] no paragraph breaks in \macroname{step}'s argument
\end{itemize}
\macroname{hidetext}:
\begin{itemize}
\item[\origmath{-}] very fragile
\item[\origmath{+}] works with structured backgrounds
\item[\origmath{+}] allows automatic line breaks in \macroname{step}'s argument
\item[\origmath{-}] no paragraph breaks in \macroname{step}'s argument
\end{itemize}
\newslide
\macroname{hidevanish}:
\begin{itemize}
\item[\origmath{+}] robust
\item[\origmath{-}] fails with structured backgrounds
\item[\origmath{+}] allows automatic line breaks in \macroname{step}'s argument
\item[\origmath{-}] no paragraph breaks in \macroname{step}'s argument
\end{itemize}
\macroname{vstep}:
\begin{itemize}
\item[\origmath{+}] very robust
\item[\origmath{-}] fails with structured backgrounds
\item[\origmath{+}] allows automatic line breaks
\item[\origmath{+}] allows paragraph breaks
\end{itemize}
\newslide
\subsection{Instead of making text appear `out of nowhere', I'd rather just change colors from `dimmed' to normal.}
There are some analogies between this item and \ref{Q:Par}.
If you're using \code{texpower}'s standard colors, probably \macroname{hidedimmed} does what you want:
\begin{LaTeXCode}
\stepwise[\let\hidestepcontents=\hidedimmed]
{%
\step{This works with} \step{\emph{all}}
\step{\highlighttext{highlighting} commands.}%
}
\end{LaTeXCode}
\stepwise[\let\hidestepcontents=\hidedimmed]
{%
\ifthenelse{\boolean{display}}
{%
yields
\present
{%
\begin{minipage}{10em}
\step{This works with} \step{\emph{all}} \step{\highlighttext{highlighting} commands.}
\end{minipage}%
}
}
{}
}
\newslide
In the argument of \macroname{hidedimmed}, which uses \macroname{textcolor}, paragraph breaks are not allowed. Using
\macroname{dstep} is a little less restrictive. The following achieves the same result as above:
\begin{LaTeXCode}
\stepwise
{%
\dstep This works with \dstep \emph{all}
\dstep \highlighttext{highlighting} commands.%
}
\end{LaTeXCode}
\newslide
If the dimmed colors look too fancy to you, you can also use \macroname{vstep} for this purpose, setting
\macroname{vanishcolor} to some `dimmed' color:
\begin{LaTeXCode}
\stepwise[\renewcommand{\vanishcolor}{inactivecolor}]
{%
\vstep This works with \vstep \emph{all}
\vstep \highlighttext{highlighting} commands.%
}
\end{LaTeXCode}
\stepwise[\renewcommand{\vanishcolor}{inactivecolor}]
{%
\ifthenelse{\boolean{display}}
{%
yields
\present
{%
\begin{minipage}{10em}
\vstep This works with \vstep \emph{all} \vstep \highlighttext{highlighting} commands.
\end{minipage}%
}
}
{}
}
Achieving the same with \macroname{hidevanish} is left as an exercise to the reader.
\newslide
\subsection{\macroname{dstep} and \macroname{hidedimmed} work only with \code{texpower}'s standard colors. How can I dim
my own colors\,?}
\code{texpower} maintains a list of colors which will be affected by \macroname{dimcolors} (which is behind
\macroname{dstep} and \macroname{hidedimmed}).
You can add your own colors to this list by issuing \commandapp{addTPcolor}{mycolor}. Then you only have to define
another color \code{dmycolor} which will be replaced for \code{mycolor} automatically when \macroname{dimcolors} is
executed.
\newslide
For instance:
{\small
\begin{LaTeXCode}
\definecolor{mycolor}{rgb}{1,0.5,0}%
\definecolor{dmycolor}{rgb}{0.9,0.8,0.6}%
\addTPcolor{mycolor}
\stepwise
{\dstep My \emph{own} \dstep \textcolor{mycolor}{color}.}
\end{LaTeXCode}
}%
\ifthenelse{\boolean{display}}
{%
\definecolor{mycolor}{rgb}{1,0.5,0}%
\definecolor{dmycolor}{rgb}{0.9,0.8,0.6}%
\addTPcolor{mycolor}%
\liststepwise
{%
yields
\present
{%
\dstep My \emph{own} \dstep \textcolor{mycolor}{color}.
}
}
}
{}
Note that if you ever wish to use \macroname{enhancecolors} or \macroname{highlightenhanced}, you'll also need an
\emph{enhanced} version of your new color named \code{emycolor}.
If you wish to use one of the commands \macroname{whitebackground}, \macroname{lightbackground},
\macroname{darkbackground}, or \macroname{blackbackground}, you'll need even more variants of your new color. In this
case, you'll better define it in the file \code{tpsettings.cfg} (which contains an example).
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{Problems}
\subsection{I'm loading the \code{texpower} package, but dynamic features don't seem to work.}
Remember that you have to turn on dynamic features explicitly by giving the \code{display} option either to
\code{texpower} or as a global option. Otherwise, a printout version of your document is produced.
\newslide
\subsection{When I use the \code{colormath} option, my displayed formulae are not colored.}
Don't use the \TeX{} environment \code{\$\$}\dots\code{\$\$} for displayed formulae if you want to profit from math
coloring.
\code{texpower} supports \LaTeX's environments \macroname{[}\dots\macroname{]}, \code{displaymath}, \code{equation},
\code{eqnarray}, and \code{eqnarray*}. It also works with the diverse displayed math environments from the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/amsmath.html}{\code{amsmath}} package.
Replacing \code{\$\$}\dots\code{\$\$} everywhere by \macroname{[}\dots\macroname{]} should solve this problem.
\newslide
\subsection{It seems I can't use \macroname{vfill} in combination with \macroname{pause}.}
This is a problem indeed, as \LaTeX{} never gets to see anything after \macroname{pause} when the first part of the
sequence is produced. You can use \macroname{vfill} with \macroname{stepwise} if you
\begin{enumerate}
\item use a configuration where \macroname{step} leaves blank space (to ensure proper vertical spacing);
\item put \emph{all} \macroname{vfill}s into the argument of \macroname{stepwise}, \emph{outside} the argument of any
\macroname{step}.
\end{enumerate}
For instance:
\begin{LaTeXCode}
\parstepwise
{\step{One.}\vfill\step{Two.}\vfill\step{Three.}}
\end{LaTeXCode}
\parstepwise
{%
\ifthenelse{\boolean{display}}
{%
yields
\present
{%
\begin{minipage}[c][10ex][s]{10em}
\step{One.}\vfill\step{Two.}\vfill\step{Three.}
\end{minipage}
}
}
{}
}
\newslide
\subsection{When I use \LaTeX+\code{dvips}+\code{distiller}, the result looks strange and `hyper' features don't work.}
Check the \code{log} file of your document. If it contains the line
{\codeswitch%
\begin{verbatim}
*hyperref using default driver hypertex*
\end{verbatim}%
}%
then the default hyperref driver for your system is not suited for processing by \code{dvips}+\code{distiller}.
Either you set another default driver (for instance, in the file \code{hyperref.cfg}), or you use the option
\code{dvips} in your document as a global option or an option to \commandapp{usepackage}{hyperref}. See the
documentation of the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/hyperref.html}{\code{hyperref}} package
for details.
\newslide
\subsection{When using \macroname{highlighttext} or \macroname{hidetext}, I'm getting strange error messages.}
\label{Sec:hidetext}
Note that both these commands are implemented using the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package. \code{soul} has some rather
severe restrictions concerning what is allowed to appear in the argument of commands using it. Consult the documentation
of \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} for a detailed description of
these restrictions.
The most prominent one is that almost no \LaTeX{} command is allowed in the argument of a command implemented using
\code{soul}. For instance, to use an emphasis or highlighting command like \macroname{emph}, you have to use a sequence
of \macroname{highlighttext} commands, putting \macroname{emph} `outside'. Expect glitches in display quality though.
\code{\small\commandapp{highlighttext}{This~}\discretionary{\%}{}{}\commandapp{emph}{\commandapp{highlighttext}{annoying~}}\discretionary{\%}{}{}\commandapp{highlighttext}{behaviour}}
yields \highlighttext{This }\emph{\highlighttext{annoying }}\highlighttext{behaviour}.
\newslide
Another restriction is that accents are separated from the characters they belong to and break. You have to enclose the
complete accented character with braces or use an appropriate input encoding, typing accented characters `as one'.
\begin{center}
\begin{tabular}{l@{ yields }l}
\commandapp{highlighttext}{S\{\macroname{"}u\}\macroname{ss} es}&\highlighttext{S{\"u}\ss es}\\
\commandapp{highlighttext}{Ses}&\highlighttext{Ses}\\
\end{tabular}
\end{center}
\newslide
\subsection{Inside the argument of \macroname{stepwise}, all counters seem to be freezed on all pages of the sequence
generated. How can I use a self-defined counter which does not freeze\,?}
Freezing counters is a desirable behaviour in general, for instance to stop equation numbers from going astray.
But \code{texpower} maintains a list of counters which are \emph{not} freezed, containing for instance the counter
\code{step}.
If you need a counter for special effects while the incremental sequence is generated (for instance: generating a
sequence of MetaPost figures with the \code{emp} and \code{feynmp} packages), use
\begin{LaTeXCode}
\releasecounter{mycounter}
\end{LaTeXCode}
to release the counter \code{mycounter}.
%KEEPCOMMENTS
%</faq>
%=================================================================================================================
%<*manual>
%<<KEEPCOMMENTS
\documentclass[12pt]{scrartcl}
%-----------------------------------------------------------------------------------------------------------------
% We need some more packages...
%
\usepackage[nottoc]{tocbibind}
\usepackage{textcomp}% Just for \textregistered. Comment out if you like.
\usepackage{url}
% The following package makes code look a little nicer, but it may not be present on all systems.
\IfFileExists{cmtt.sty}{\usepackage[override]{cmtt}}{}
% Loading the soul package enables the \highlighttext command.
\IfFileExists{soul.sty}{\usepackage{soul}}
% One more Text emphasis command...
\let\name=\textsc
% We input the xr package for external references.
\usepackage{xr-hyper}
%-----------------------------------------------------------------------------------------------------------------
% Load hyperref.
%
\usepackage[bookmarksopen,colorlinks]{hyperref}
%-----------------------------------------------------------------------------------------------------------------
% Finally, the texpower package is loaded.
%
\usepackage{texpower}
%-----------------------------------------------------------------------------------------------------------------
% The configuration file allows user-specific settings.
\input{__TPcfg}
%-----------------------------------------------------------------------------------------------------------------
% Setting up indexing and custom indexing commands
\input{__TPindexing}
%-----------------------------------------------------------------------------------------------------------------
% We use references from the full demo file.
%\externaldocument{fulldemo}[http://texpower.sourceforge.net/doc/fulldemo.pdf]
\externaldocument{fulldemo}
%-----------------------------------------------------------------------------------------------------------------
% The code in the manual (doc tag) is meant for the document class seminar. Thus, it contains some
% seminar-specific commands which are replaced by dummies here.
\let\newslide=\relax
%-----------------------------------------------------------------------------------------------------------------
% The following command produces the title for this document.
\newcommand{\makeslidetitle}[1]
{%
\hypersetup{pdftitle={#1}}
\title{The \TeX Power bundle\\{\normalfont #1}}
\author
{%
Stephan Lehmke\\\url{mailto:Stephan.Lehmke@udo.edu}
\and
Hans Fr.\ Nordhaug\\\url{mailto:hansfn@users.sourceforge.net}%
}
\maketitle
\tableofcontents
\subsubsection*{}
}
%-----------------------------------------------------------------------------------------------------------------
% As the documentation text contains a lot of stuff in boxes, we use \sloppy to avoid stuff projecting into the margin.
\sloppy
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
%KEEPCOMMENTS
%</manual>
%=================================================================================================================
%<*fulldemo>
%<<KEEPCOMMENTS
% Enable all color emphasis and highlighting options; use a light background and slifonts.
\PassOptionsToPackage{coloremph,colormath,colorhighlight,lightbackground}{texpower}
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower full demo and documentation}}
% To get correct links in the index (and remove annoying warnings)
\pausesafecounter{slide}
% Setting up indexing and custom indexing commands
\input{__TPindexing}
\backgroundstyle{vgradient}
\setlength{\unitlength}{5mm}
\ifthenelse{\boolean{psspecialsallowed}}% Can we use PSTricks?
{% Yes.
% PsTricks is used for creating the picture example.
\usepackage[noxcolor]{pstricks}
\usepackage{pstcol}
\usepackage{pst-node}
\psset{unit=\unitlength}
}
{% No. We'll make do without.
}
% We also include an mps (metapost postscript) image...
\usepackage{graphicx}
% The mps extension isn't supported out-of-the-box for latex+dvips
\ifthenelse{\boolean{psspecialsallowed}}{%
\DeclareGraphicsExtensions{.mps}}{}
% ... and write some aligned equations.
\usepackage{amsmath}
% Make nested braces grow.
\delimitershortfall-1sp
% The package soul is needed for \highlighttext to work.
\usepackage{soul}
% The following package makes code look a little nicer, but it may not be present on all systems.
\IfFileExists{cmtt.sty}{\usepackage[override]{cmtt}}{}
% Hack to override seminar's definition of twocolumn needed by theindex
\makeatletter
\let\slidebox@restore@orig=\slidebox@restore%
\def\slidebox@restore{%
\slidebox@restore@orig%
\long\def\twocolumn[##1]{\section{Index}}%
}
\makeatother
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%
% First, some words of explanation.
%
\title
{%
The \TeX Power bundle\\
{%
\normalfont
Creating dynamic online presentations with \LaTeX\\
Full demo and documentation for \TeX Power \tpversion%
}%
}
\author{Stephan Lehmke\\\url{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\newslide
This document is a demonstration and manual for the \TeX Power bundle which allows to create dynamic
presentations in a very flexible way.
The heart of the bundle is the package \code{texpower} which implements some commands for presentation effects. This
includes setting page transitions, color highlighting and displaying pages incrementally.
All features of \code{texpower} are implemented entirely using \TeX{} and \LaTeX; they are meant for `online'
presentation with \concept{Adobe Acrobat\textsuperscript{\textregistered} Reader} and work with all ways of \code{pdf}
creation. The combination of \LaTeX{} + \code{dvips} + Acrobat Distiller /
\code{ps2pdf} is possible as well as pdf\LaTeX{} and other \code{pdf} creation
methods.
\newslide
\minisec{Disclaimer}
This is still work inprogress.
During the subsequent error correction and extension of the functionality, the syntax and implementation of the macros
described here are liable to change.
Even though we are using dtx-files, these are still not fully documented dtx-files.
\newslide
\minisec{Credits}%
I am indepted to \href{mailto:guntermann@iti.informatik.tu-darmstadt.de}{\name{Klaus Guntermann}}. His package
\href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/pp4sty.zip}{\code{texpause}} from the \concept{Pdf
Presentation Post Processor} \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4} bundle
is the basis for the code of \code{texpower}.
Further thanks go to \href{mailto:dongen@cs.ucc.ie}{\name{Marc van Dongen}} for allowing me to include his code for
page transitions and to \href{mailto:Martin.Schroeder@ACM.org}{\name{Martin Schr\"oder}} for permission to use his
\concept{everyshi} code.
Useful hints for error corrections and improvements of code have been provided by \name{Marc van Dongen},
\name{Friedrich Eisenbrand}, \name{Thomas Emmel}, \name{Ross Moore}, \name{Heiko Oberdiek}, \name{Heiner Richter}, and
\name{Robert J.\ Vanderbei}.
\newslide
\tableofcontents
\end{slide}
\begin{slide}
%-----------------------------------------------------------------------------------------------------------------
%
\section{Examples}\label{Sec:Ex}
First, two simple examples for the \macroname{pause} command.
All other examples are meant to illustrate the expressive power of the \macroname{stepwise} command.
Looking at the code for the examples will probably be the best way of understanding how certain effects can be
achieved.
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\subsection{Some examples for \macroname{pause}}
% It doesn't hurt to put \pause inside a paragraph, but a new paragraph is forced at each occurrence of \pause.
\begin{center}
a\pause b\pause c
\end{center}
\pause
% We set Page Transitions to Dissolve for the rest of this slide.
\pageTransitionDissolve
\begin{itemize}
\item foo\pause
\item bar\pause
\item baz
\end{itemize}
\newslide
% Page Transitions are set back to Replace.
\pageTransitionReplace
%-----------------------------------------------------------------------------------------------------------------
% The `titles' for the examples are simply subsection headings.
\renewcommand{\makeslidetitle}[1]
{%
\subsection{#1}%
}
%KEEPCOMMENTS
%</fulldemo>
%<*fulldemo-middle>
%<<KEEPCOMMENTS
\end{slide}
\begin{slide}\relax
%-----------------------------------------------------------------------------------------------------------------
% The `title' for the documentation is a section heading. As sectioning in the manual (doc-tag) file starts with
% \section, we have to `downgrade' sectioning commands.
\let\origsection=\section
\renewcommand{\makeslidetitle}[1]
{%
\let\section\subsection
\let\subsection\subsubsection
\def\thanks##1{}%
\origsection{#1}
}
\addtocontents{toc}{\protect\clearpage}
%KEEPCOMMENTS
%</fulldemo-middle>
%=================================================================================================================
%<*docu>
%<<KEEPCOMMENTS
\makeslidetitle
{%
Documentation%
\thanks{Documentation for \TeX Power \tpversion .}%
}%
The \TeX Power bundle contains style and class files for creating dynamic online presentations with \LaTeX.
The heart of the bundle is the package \code{texpower.sty} which implements some commands for presentation effects. This
includes setting page transitions, color highlighting and displaying pages incrementally.
For finding out how to achieve special effects (as shown in the \nameref{Sec:Ex}),
please look at the comments inside the files ending with \code{example.tex} and \code{demo.tex}
and read this manual to find out what's going on.
\newslide
For your own first steps with \TeX Power, the simple demo file \code{simpledemo.tex} is the best starting
place. There, some basic applications of the dynamic features provided by the \code{texpower} package are
demonstrated. You can make your own dynamic presentations by modifying that demo to your convenience.
\code{simpledemo.tex} uses the \code{article} document class for maximum
compatibility. There are other simple demos named
\code{slidesdemo.tex}, \code{foilsdemo.tex}, \code{seminardemo.tex},
\code{pp4sldemo.tex}, \code{pdfslidemo.tex}, \code{pdfscrdemo.tex},
\code{prosperdemo.tex}, and \code{ifmslidemo.tex}
which demonstrate how to combine \TeX Power with the
most popular presentation-making document classes and packages.
\newslide
The other, more sophisticated examples demonstrate the expressive power of the
\code{texpower} package. Look at the commented code of these examples to find out how to achieve special effects and
create your own presentation effects with \TeX Power.
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{Usage and general options}
The \code{texpower} package is loaded by putting
\begin{center}
\present{\commandapp{usepackage}{texpower}}
\end{center}
into the preamble of a document.
There are no specific restrictions as to which document classes can be used.
It should be stressed that \TeX Power is \underl{not} (currently) a complete presentation package. It just adds dynamic
presentation effects (and some other gimmicks specifically interesting for dynamic presentations) and should always be
combined with a document class dedicated to designing presentations (or a package like
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfslide.html}{\code{pdfslide}}).
Some of the presentation effects created by \code{texpower} require special capabilities of the viewer which is used for
presenting the resulting document. The target for the development of \code{texpower} has so far been
\href{http://www.adobe.com/products/acrobat/readermain.html}%
{\concept{Adobe Acrobat\textsuperscript{\textregistered} Reader}}, which means the
document should (finally) be produced in \code{pdf} format. The produced
\code{pdf} documents should display well in
\href{http://www.cs.wisc.edu/~ghost/gsview/}{\concept{GSview}} also, but that
viewer doesn't support page transitions and duration.
There are no specific restrictions as to which way the \code{pdf} format is produced. All demos and examples
have been tested with pdf\LaTeX{} and standard \LaTeX, using
\code{dvips} and \href{http://www.adobe.com/products/acrobat/}%
{\concept{Adobe Acrobat\textsuperscript{\textregistered} Distiller}}
or \code{dvips} and \code{ps2pdf} (from the \href{http://www.ghostscript.com/}%
{\concept{Ghostscript suite}}) for generating \code{pdf}.
\newslide
\subsection{General options}\label{Sec:GenOpt}
\begin{description}
\item[\present{option: \code{display}}.]\indexpckopt{texpower}{display} Enable `dynamic' features. If not set, it is assumed that the document is to be
printed, and all commands for dynamic presentations, like \macroname{pause} or \macroname{stepwise} have no effect.
\item[\present{option: \code{printout} (default)}.]\indexpckopt{texpower}{printout} Disable `dynamic' features. As this is the default behaviour,
setting this option explicitly is useful only if the option \code{display} is set by default for instance in the
\code{tpoptions.cfg} file (see section \ref{Sec:Config}).
\item[\present{option: \code{verbose}}.]\indexpckopt{texpower}{verbose} Output some administrative info.
\end{description}
Some font options are listed in section \ref{Sec:BaseFont}.
\newslide
\subsection{Side effects of page contents duplication}\label{Sec:Dupl}
In the implementation of the \macroname{pause} and \macroname{stepwise} commands, it is neccessary to duplicate some
material on the page.
This way, not only `visible' page contents will be duplicated, but also some `invisible' control code stored in
\concept{whatsits} (see the \TeX book for an explanation of this concept). Duplicating whatsits can lead to undesirable
side effects.
For instance, a \macroname{section} command creates a whatsit for writing the table of contents entry. Duplicating this
whatsit will also duplicate the toc entry. So, whatsit items effecting file access are inhibited when duplicating page
material.
\newslide
The current version of \code{texpower} is a little smarter when handling whatsits. Some commands (related to writing to
files and hyperlinks) are made stepwise-aware. This means that links can point to the actual subpage where the
anchor is and not to the last (sub)page of an incremental page. However, if you want the old behaviour just use
\begin{description}
\item[\present{option: \code{oldfiltering}}]\indexpckopt{texpower}{oldfiltering} switches on the old
(pre 0.2) very aggressive/robust filtering of whatsits.
\end{description}
The \code{oldfiltering} can be turned on and off inside the document using \macroname{oldfilteringon/off}. This command is
useful if \code{texpower} isn't smart enough...
\newslide
A second type of whatsits is created by \TeX's \macroname{special} command which is used for instance for color
management. Some drivers, like \code{dvips} and \code{textures}, use a color stack which is controlled by
\macroname{special} items included in the dvi file. When page contents are duplicated, then these \macroname{special}s
are also duplicated, which can seriously mess up the color stack.
\newslide
\code{texpower} implements a `color stack correction' method by maintaining a stack of color corrections, which should
counteract this effect. Owing to potential performance problems, this method is turned off by default.
\begin{description}
\item[\present{option: \code{fixcolorstack}}]\indexpckopt{texpower}{fixcolorstack} switches on color stack correction. Use it if you experience strange color
switches in your document.
\end{description}
\newslide
\subsection{Setting the base font}\label{Sec:BaseFont}
\code{texpower} offers no options for setting the base font of the document.
Use the \code{tpslifonts} package in stead. Read more in section \ref{Sec:TPslifonts}.
Further, there are packages like \code{cmbright} or \code{beton} which change the whole set of fonts to something less
fragile than cmr.
\newslide
\subsection{Switches}
There are some boolean registers provided and set automatically by \code{texpower}.
\begin{description}
\item[\present{boolean: \code{psspecialsallowed}}]\indexpckswitch{texpower}{psspecialsallowed} True if PostScript\textsuperscript{\textregistered} specials may be
used.
\code{texpower} tries to find out whether or not PostScript\textsuperscript{\textregistered} specials may be used in
the current document. For instance, pdf\LaTeX{} can't interpret arbitrary specials. This switch is set automatically
and can be used inside a document to enable/disable parts which need PostScript\textsuperscript{\textregistered}
specials.
\newslide
\item[\present{boolean: \code{display}}]\indexpckswitch{texpower}{display} True if \code{display} option was given.
This switch indicates whether `dynamic' features of \code{texpower} are enabled. Use it inside your document
to distinguish between the `presented' and the printed version of your document.
\item[\present{boolean: \code{TPcolor}}]\indexpckswitch{texpower}{TPcolor} True if any of the color highlighting options (see section
\ref{Sec:ColorEmphasis}) were given.
This switch indicates whether `color' features of \code{texpower} are enabled (compare section
\ref{Sec:ColorEmphasis}). You can use it inside your document to distinguish between a `colored' and a `monochrome'
version of your document.
\end{description}
\newslide
\subsection{Configuration files}\label{Sec:Config}
\code{texpower} loads three configuration files (if present):
\begin{description}
\item[\present{file: \code{tpoptions.cfg}}]\indexcode{tpoptions.cfg}
is loaded before options are processed. Can be used to set default options
in a system-specific way. See the comments inside the file
\code{tpoptions.cfg} which is part of the \TeX Power bundle
for instructions.
\item[\present{file: \code{tpsettings.cfg}}]\indexcode{tpsettings.cfg}
is loaded at the end of \code{texpower}. Here, you can do some
system-specific settings. See the comments inside the
file \code{tpsettings.cfg} which is part of the
\TeX Power bundle for instructions.
\item[\present{file: \code{tpcolors.cfg}}]\indexcode{tpcolors.cfg}
is loaded if \code{TPcolor} is true. The file defines the standard
colors/colorsets (see section \ref{Sec:ColorEmphasis}). See the
comments inside the file \code{tpcolors.cfg} which is part of the
\TeX Power bundle for instructions.
\end{description}
\newslide
\subsection{Miscellaneous commands}\label{Sec:MiscCmd}
Some important commands that don't fit in the latter sections:
\begin{description}
\item[\present{\macroname{oldfilteringon}}]\indexmacro{oldfilteringon}
reverts to the old (pre v0.2) aggressive/robust filtering of whatsits.
\item[\present{\macroname{oldfilteringoff}}]\indexmacro{oldfilteringoff}
turns on the new better treatment of whatsits.
\item[\present{\commandapp{currentpagevalue}{\carg{value}}}]\indexmacro{currentpagevalue}
sets how to find the number of the current page, \commandapp{value}{page} is default.
Used to name the hyper target on the first subpage of every page. Also used in the
TeXPower navigation buttons.
\item[\present{\commandapp{pausesafecounter}{\carg{counter}}}]\indexmacro{pausesafecounter}
is used to add counters that are to be restored to their original value after \macroname{pause}. The \code{page}
counter is always restored. In addition the \code{slide} counter is restored if the \code{seminar} class is used. If
you need more counters to be restored after \macroname{pause}, use \macroname{pausesafecounter}.
\end{description}
\newslide
\subsection{Page Anchors}\label{Sec:PageAnch}
For each physical page \TeX Power (when in display mode) makes a number of subpages - this is
the dynamics. For convenience \TeX Power defines an anchor to the first subpage of physical page n,
\code{firstpage.n}\indexcode{firstpage.n}. The standard page anchor for physical page n,
\code{page.n}\indexcode{page.n}, points to the last subpage of physical page n. If you want to
link to any other subpage just insert a \macroname{hyperlink} in the standard way assuming you haven't
turned on the old filtering (\ref{Sec:Dupl}).
\newslide
\subsection{Dependencies on other packages}
\code{textpower} always loads the packages \code{ifthen} and \code{calc}, as the extended command syntax provided by
these is indispensable for the macros to work. They are in the \code{base} and \code{tools} area of the \LaTeX{}
distribution, respectively, so I hope they are available on all systems.
Furthermore, \code{texpower} loads the package \code{color} if any color-specific options are set (see section
\ref{Sec:ColorEmphasis}).
Further packages are \emph{not} loaded automatically by \code{texpower} to avoid incompatibilities, although some
features of \code{texpower} are enabled \emph{only} if a certain package is loaded. If you wish to use these features,
you are responsible for loading the respective package yourself.
If some necessary package is \emph{not} loaded, \code{texpower} will issue a warning and disable the respective
features.
The following packages are neccessary for certain features of \code{texpower}:
\begin{description}
\item[\present{package: \code{hyperref}}]\indexfile{hyperref}{package}
is neccessary for page transition effects to work (see section
\ref{Sec:PageTrans}).
In particular, the \macroname{pageDuration} (see section \ref{Sec:PageDuration}) command only works if the version of
hyperref loaded is at least v6.70a (where the \code{pdfpageduration} key was introduced).
Commands which work only when \code{hyperref} is loaded are marked with \textbf{\textsf{h}} in the description.
\newslide
\item[\present{package: \code{soul}}]\indexfile{soul}{package}
is neccessary for the implementation of the commands \macroname{hidetext} and
\macroname{highlighttext} (see section \ref{Sec:displaycustom}).
Commands which work only when \code{soul} is loaded are marked with \textbf{\textsf{s}} in the description.
\end{description}
\newslide
\subsection{What else is part of the \TeX Power bundle?}
Besides the package \code{texpower} (which is described here), there are four
more packages, \code{tpslifonts}, \code{fixseminar}, \code{automata} and
\code{tplists}, and one document class, \code{powersem}, in the \TeX Power bundle.
Except for \code{tpslifonts} and \code{tplists} these files have no documentation
of their own. They will be described in this section until they are turned
into \code{dtx} files producing their own documentation.
See the file \code{00readme.txt} which is part of the \TeX Power bundle for a short description of all files.
\newslide
\minisec{The document class \code{powersem}}\indexfile{powersem}{class}
This is planned to provide a more `modern' version of \code{seminar} which can be used for creating dynamic
presentations.
Currently, this document class doesn't do much more than load \code{seminar} and apply some fixes, but it is planned to
add some presentation-specific features (like navigation panels).
\newslide
There are three new options which are specific for \code{powersem}, all other options are passed to \code{seminar}:
\begin{description}
\item[\present{option: \code{display}}]\indexpckopt{powersem}{display}
Turns off all features of \code{seminar} (notes, vertical centering of slides)
which can disturb dynamic presentations.
\item[\present{option: \code{calcdimensions}}]\indexpckopt{powersem}{calcdimensions}
\code{seminar} automatically calculates the slide dimensions
\macroname{slidewidth} and \macroname{slideheight} only for the default \code{letter} and for its own option
\code{a4}. For all the other paper sizes which are possible with the \code{KOMA} option, the slide dimensions are not
calculated automatically.
The \code{calcdimensions} option makes \code{powersem} calculate the slide dimensions automatically from paper size
and margins.
\newslide
\item[\present{option: \code{truepagenumbers}}]\indexpckopt{powersem}{truepagenumbers}
The truepagenumbers option makes powersem count pages with the counter page, independently of the counter slide. This
enables proper working of TeXPowers navigation buttons (some of which calculate relative page numbers) even when the
counter slide is reset frequently (for slide numberings of the type \verb|<l>.<n>.<m>|).
\item[\present{option: \code{KOMA}}]\indexpckopt{powersem}{KOMA} Makes
\code{seminar} load \code{scrartcl} (from the KOMA-Script bundle) instead of
\code{article} as its base class. All new features of \code{scrartcl} are then available also for slides.
\item[\present{option: \code{UseBaseClass}}]\indexpckopt{powersem}{UseBaseClass}
Makes \code{seminar} load the class \macroname{baseclass} (initially \code{article}) instead of
\code{article} as its base class.
\item[\present{option: \code{reportclass}}]\indexpckopt{powersem}{reportclass}
Makes \code{seminar} load the class \macroname{baseclass} (initially \code{report}) instead of
\code{article}.
\item[\present{option: \code{bookclass}}]\indexpckopt{powersem}{bookclass}
Makes \code{seminar} load the class \macroname{baseclass} (initially \code{book}) instead of
\code{article}.
\end{description}
There is one change in \code{powersem} which will lead to incompatibilities with \code{seminar}. \code{seminar} has the
unfortunate custom of \emph{not} exchanging \macroname{paperwidth} and \macroname{paperheight} when making landscape
slides, as for instance \code{typearea} and \code{geometry} do.
This leads to problems with setting the paper size for \code{pdf} files, as done for instance by the \code{hyperref}
package.
\code{powersem} effectively turns off \code{seminar}'s papersize management and leaves this to the base class (with the
pleasant side effect that you can use e.\,g.\ \commandapp[KOMA,a0paper]{documentclass}{powersem} for making posters).
In consequence, the \code{portrait} option of \code{seminar} is turned on by \code{powersem} to avoid confusing
\code{seminar}. You have to explicitly use the \code{landscape} option (and a base class or package which understands
this option) to get landscape slides with powersem.
\newslide
\minisec{The package \code{fixseminar}}\indexfile{fixseminar}{package}
Unfortunately, there are some fixes to seminar which can \emph{not} be applied in \code{powersem} because they have to
be applied after \code{hyperref} is loaded (if this package should be loaded).
The package \code{fixseminar} applies these fixes, so this package should be loaded after \code{hyperref} (if
\code{hyperref} is loaded at all, otherwise \code{fixseminar} can be loaded anywhere in the preamble).
\newslide
It applies two fixes:
\begin{itemize}
\item In case \code{pdflatex} is being run, the lengths \macroname{pdfpageheight} and \macroname{pdfpagewidth} have to
be set in a `magnification-sensitive' way.
\item \code{hyperref} introduces some code at the beginning of every page which can produce spurious vertical space,
which in turn disturbs building dynamic pages. This code is `fixed' so it cannot produce vertical space.
\end{itemize}
\newslide
\minisec{The package \code{tpslifonts}}
\indexfile{tpslifonts}{package}\label{Sec:TPslifonts}
Presentations to be displayed `online' with a video beamer have special needs concerning font configuration owing to low
`screen' resolution and bad contrast caused by possibly bad light conditions combined with color highlighting.
This package tries to cater to these needs by offering a holistic configuration of all document fonts, including text,
typewriter, and math fonts. Special features are `smooth scaling' of Type1 fonts and careful design size selection for
optimal readability.
\newslide
For more information on package options and used fonts (and on implementation) read the documentation coming with the
package - check the \code{tpslifonts} directory.
\minisec{The package \code{automata}}\indexfile{automata}{package}
Experimental package for drawing automata in the sense of theoretical computer
science (using PSTricks) and animating them with TeXPower. Only DFA and Mealy
automata are supported so far.
\newslide
\minisec{The package \code{tplists}}\indexfile{tplists}{package}
Experimental package providing easy dynamic lists. Currently there are stepped, flipped and dimmed versions of itemize
and enumerate (and corresponding lists from the \code{eqlist} and \code{paralist} package). For more information
and an example, compile (and then read) the file \code{tplists.dtx}.
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{The \macroname{pause} command}\label{Sec:pause}
\present{\macroname{pause}}\indexmacro{pause} is derived from the \macroname{pause} command from the package
\href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/pp4sty.zip}{\code{texpause}} which is part of the
\href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4 suite} by
\href{mailto:guntermann@iti.informatik.tu-darmstadt.de}{Klaus Guntermann}.
It will ship out the current page, start a new page and copy whatever was on the current page onto the new page, where
typesetting is resumed.
\ifthenelse{\boolean{display}}{Here, let's do a little demo\pause}{}
This will create the effect of a \concept{pause} in the presentation, i.\,e.\ the presentation stops because the
current page ends at the point where the \macroname{pause} command occurred and is resumed at this point when the
presenter switches to the next page.
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item \macroname{pause} should appear in \concept{vertical mode} only, i.\,e.\ between paragraphs or at places where
ending the current paragraph doesn't hurt.
\item This means \macroname{pause} is forbidden in all \concept{boxed} material (including \code{tabular}),
\concept{headers/footers}, and \concept{floats}.
\item \macroname{pause} shouldn't appear either in environments which have to be \emph{closed} to work properly, like
\code{picture}, \code{tabbing}, and (unfortunately) environments for \concept{aligned math formulas}.
\item \macroname{pause} does work in all environments which mainly influence paragraph formatting, like \code{center},
\code{quote} or all \concept{list} environments.
\newslide
\item \macroname{pause} doesn't really have problems with automatic page breaking, but beware of \emph{overfull}
pages/slides. In this case, it may occur that only the last page(s)/slide(s) of a sequence are overfull, which
changes vertical spacing, making lines `wobble' when switching to the last page/slide of a sequence.
\newslide
\item The duplication of page material done by \macroname{pause} can lead to unwanted side effects. See section
\ref{Sec:Dupl} for further explanations. In particular, if you should experience strange color switches when using
\macroname{pause} (and you are \underl{not} using \code{pdftex}), turn on color stack correction with the option
\code{fixcolorstack}. In addition you should be aware of \macroname{pausesafecounter}, see section
\ref{Sec:MiscCmd}.
\end{enumerate}
A lot of the restrictions for the use of pause can be avoided by using \macroname{stepwise} (see next section).
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{The \macroname{stepwise} command}
\present{\commandapp{stepwise}{\carg{contents}}}\indexmacro{stepwise} is a command for displaying some part of a \LaTeX{} document (which
is contained in \carg{contents}) `step by step'. As of itself, \macroname{stepwise} doesn't do very much. If
\carg{contents} contains one or more constructs of the form \present{\commandapp{step}{\carg{stepcontents}}}\indexmacro{step}, the
following happens:
\begin{enumerate}
\item The current contents of the page are saved (as with \macroname{pause}).
\item As many pages as there are \macroname{step} commands in \carg{contents} are produced.
Every page starts with what was on the current page when \macroname{stepwise} started.
\newslide
The first page also contains everything in \carg{contents} which is \emph{not} in \carg{stepcontents} for any
\macroname{step} command.
The second page additionally contains the \carg{stepcontents} for the \emph{first} \macroname{step} command, and so
on, until all \carg{stepcontents} are displayed.
\item When all \carg{stepcontents} are displayed, \macroname{stepwise} ends and typesetting is resumed (still on the
current page).
\end{enumerate}
\parstepwise{This will create the effect that the \macroname{step} commands are executed `\step{step} \step{by}
\step{step}'.}
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item \macroname{stepwise} should appear in \concept{vertical mode} only, i.\,e.\ between paragraphs, just like
\macroname{pause}.
\item Don't put \macroname{pause} or nested occurrences of \macroname{stepwise} into \carg{contents}.
\item Structures where \macroname{pause} does not work (like \code{tabular} or aligned equations) can go
\emph{completely} into \carg{contents}, where \macroname{step} can be used freely (see \nameref{Sec:Ex}).
\item As \carg{contents} is read as a macro argument, constructs involving \concept{catcode} changes (like
\macroname{verb} or language switches) won't work in \carg{contents} \textbf{unless} you use the
\code{fragilesteps} environment (\ref{Sec:fragilesteps}).
\newslide
\item Several instances of \macroname{stepwise} may occur on one page, also combined with \macroname{pause} (outside
of \carg{contents}).
But beware of page breaks in \carg{contents}. This will really mess things up.
Overfull pages/slides are also a problem, just like with \macroname{pause}. See the description of \macroname{pause}
(section \ref{Sec:pause}) concerning this and also concerning side effects of duplicating page material.
\item \macroname{step} can go in \carg{stepcontents}. The order of execution of \macroname{step} commands is just the
order in which they appear in \carg{contents}, independent of nesting within each other.
\newslide
\item As \carg{contents} is executed several times, \LaTeX{} constructs changing \concept{global counters}, accessing
\concept{files} etc.\ are problematic. This concerns sections, numbered equations, labels, hyperlinks and the like.
Counters are taken care of explicitly by \macroname{stepwise}, so equation numbers are no problem.
Commands accessing toc files and such (like \macroname{section}) are taken care of by the whatsit suppression
mechanism (compare section \ref{Sec:Dupl}).
\end{enumerate}
\newslide
\subsection{\code{fragilesteps} environment}\label{Sec:fragilesteps}%
The \code{fragilesteps}\indexcode{fragilesteps} environment is a wrapper around \macroname{stepwise}
that makes it possible to use verbatim. The code for this environment is based on similar code from beamer - an
excellent presentation class written by Till Tantau - thanks! Using the \code{fragilesteps} environment
enables the use of the \code{listings} package to display code line by line. There are some examples in
\code{verbexample.tex}.
\newslide
\subsection{\macroname{boxedsteps} and \macroname{nonboxedsteps}}\label{Sec:boxedsteps}%
By default, \carg{stepcontents} belonging to a \macroname{step} which is not yet `active' are ignored altogether. This
makes it possible to include e.\,g.\ tabulators \code{\&} or line breaks into \carg{stepcontents} without breaking
anything.
Sometimes, however, this behaviour is undesirable, for instance when stepping through an equation `from outer to
inner', or when filling in blanks in a paragraph. Then, the desired behaviour of a \macroname{step} which is not yet
`active' is to create an appropriate amount of \emph{blank space} where \carg{stepcontents} can go as soon as it is
activated.
\newslide
The simplest and most robust way of doing this is to create an empty box (aka \macroname{phantom}) with the same
dimensions as the text to be hidden.
This behaviour is toggled by the following commands. See section \ref{Sec:displaycustom} for more sophisticated
(albeit more fragile) variants.
\begin{description}
\item[\present{\macroname{boxedsteps}}]\indexmacro{boxedsteps} makes \macroname{step} create a blank box the size of \carg{stepcontents} when
inactive and put \carg{stepcontents} into a box when active.
\item[\present{\macroname{nonboxedsteps}}]\indexmacro{nonboxedsteps} makes \macroname{step} ignore \carg{stepcontents} when inactive and leave
\carg{stepcontents} alone when active (default).
\end{description}
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item The settings effected by \macroname{boxedsteps} and \macroname{nonboxedsteps} are \emph{local}, i.\,e.\ whenever
a group closes, the setting is restored to its previous value.
\item Putting stuff into boxes can break things like tabulators (\code{\&}). It can also mess up math spacing, which
then has to be corrected manually. Compare the following examples:
\parstepwise{%
\begin{displaymath}
\left(\frac{a+b}{c}\right)\qquad\left(\frac{a\step{+b}}{c}\right)\qquad\left(\frac{a\restep{{}+b}}{c}\right)
\end{displaymath}%
}%
\end{enumerate}
\newslide
\subsection{Custom versions of \macroname{stepwise}}%
Sometimes, it might happen that vertical spacing is different on every page of a sequence generated by
\macroname{stepwise}, making lines `wobble'. This is usually fixed if you use \macroname{liststepwise} or
\macroname{parstepwise} (described below) in stead of \macroname{stepwise}.
\newslide
There are two custom versions of \macroname{stepwise} which should produce better vertical spacing.
\begin{description}
\item[\present{\commandapp{liststepwise}{\carg{contents}}}]
\indexmacro{liststepwise} works exactly like \macroname{stepwise}, but adds
an `invisible rule' before \carg{contents}. Use for list environments and
aligned equations.
\item[\present{\commandapp{parstepwise}{\carg{contents}}}]
\indexmacro{parstepwise} works like \macroname{liststepwise}, but
\macroname{boxedsteps} is turned on by default. Use for texts where
\macroname{step}s are to be filled into blank spaces.
\end{description}
\newslide
\subsection{Starred versions of \macroname{stepwise} commands}\label{Sec:StarredStepwise}%
Usually, the first page of a sequence produced contains \emph{only} material which is \emph{not} part of any
\carg{stepcontents}. The first \carg{stepcontents} are displayed on the second page of the sequence.
For special effects (see example \ref{Sec:Exhl}), it might be desirable to have the first \carg{stepcontents} active
even on the first page of the sequence.
All variants of \macroname{stepwise} have a starred version (e.\,g.\ \macroname{stepwise*}) which does exactly that.
\newslide
\subsection{The optional argument of \macroname{stepwise}}%
Every variant of \macroname{stepwise} takes an optional argument, like this
\begin{center}
\present{\commandapp[\carg{settings}]{stepwise}{\carg{contents}}}.
\end{center}
\carg{settings} will be placed right before the internal loop which produces the sequence of pages. It can
contain settings of parameters which modify the behaviour of \macroname{stepwise} or \macroname{step}. \carg{settings}
is placed inside a group so all changes are local to this call of \macroname{stepwise}.
Some internal macros and counters which can be adjusted are explained in the following.
\newslide
\subsection{Customizing the way \carg{stepcontents} is diplayed}\label{Sec:displaycustom}%
Internally, there are three macros (taking one argument each) which control how \carg{stepcontents} is displayed:
\macroname{displaystepcontents}\indexmacro{displaystepcontents},
\macroname{hidestepcontents}\indexmacro{hidestepcontents}, and
\macroname{activatestep}\indexmacro{activatestep}. Virtually, every
\commandapp{step}{\carg{stepcontents}} is replaced by
\begin{description}
\item[\present{\commandapp{hidestepcontents}{\carg{stepcontents}}}]\mbox{}\\ when this step is not yet active.
\item[\present{\commandapp{displaystepcontents}{\commandapp{activatestep}{\carg{stepcontents}}}}] when this step is
activated \emph{for the first time}.
\item[\present{\commandapp{displaystepcontents}{\carg{stepcontents}}}]\mbox{}\\
when this step has been activated before.
\end{description}
By redefining these macros, the behaviour of \macroname{step} is changed accordingly. You can redefine them inside
\carg{contents} to provide a change affecting one \macroname{step} only, or in the optional argument of
\macroname{stepwise} to provide a change for all \macroname{step}s inside \carg{contents}.
In the \nameref{Sec:Ex}, it is demonstrated how special effects can be achieved by redefining these macros.
\macroname{activatestep} is set to \macroname{displayidentical} by default, the default settings of
\macroname{hidestepcontents} and \macroname{displaystepcontents} depend on whether \macroname{boxedsteps} or
\macroname{nonboxedsteps} (default) is used.
\newslide
\code{texpower} offers nine standard definitions.
For interpreting \macroname{displaystepcontents}:
\begin{description}
\item[\present{\macroname{displayidentical}}]\indexmacro{displayidentical}
Simply expands to its argument. The same as \LaTeX s
\macroname{@ident}. Used by \macroname{nonboxedsteps} (default).
\item[\present{\macroname{displayboxed}}]\indexmacro{displayboxed}
Expands to an \macroname{mbox} containing its argument. Used by
\macroname{boxedsteps}.
\end{description}
\newslide
For interpreting \macroname{hidestepcontents}:
\begin{description}
\item[\present{\macroname{hideignore}}]\indexmacro{hideignore}
Expands to nothing. The same as \LaTeX s \macroname{@gobble}. Used by
\macroname{nonboxedsteps} (default).
\item[\present{\macroname{hidephantom}}]\indexmacro{hidephantom}
Expands to a \macroname{phantom} containing its argument. Used by
\macroname{boxedsteps}.
\item[\present{\macroname{hidevanish}}]\indexmacro{hidevanish}
In a colored document, makes its argument `vanish' by setting all colors to
\macroname{vanishcolor} (defaults to \code{pagecolor}; compare section
\ref{Sec:Colorcommands}). Note that this will give weird results with
structures backgrounds.
For monochrome documents, there is no useful interpretation for this command, so it is disabled.
\newslide
\item[{\present[s]{\macroname{hidetext}}}]\indexmacro{hidetext}
Produces blank space of the same dimensions as the space that would be
occupied if its argument would be typeset in the current paragraph. Respects automatic hyphenation and line breaks.
This command needs the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package
to work, which is not loaded by \code{texpower} itself. Consult the documentation of
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} concerning restrictions on
commands implemented using \code{soul}. If you don't load the \code{soul} package yourself, there is no useful
definition for this command, so it defaults to \macroname{hidephantom}.
\newslide
\item[\present{\macroname{hidedimmed}}]\indexmacro{hidedimmed}
In a colored document, displays its argument with dimmed colors (compare
section \ref{Sec:Colors}). Note that this doesn't make the argument completely invisible.
For monochrome documents, there is no useful interpretation for this command, so it is disabled.
\end{description}
\newslide
For interpreting \macroname{activatestep}:
\begin{description}
\item[\present{\macroname{highlightboxed}}]\indexmacro{highlightboxed}
If the \code{colorhighlight} option (see section \ref{Sec:ColorEmphasis})
is set, expands to a \highlightboxed{box with colored background} containing its argument. Otherwise, expands to an
\macroname{fbox} containing its argument. It is made sure that the resulting box has the same dimensions as the
argument (the outer frame may overlap surrounding text).
There is a new length register \present{\macroname{highlightboxsep}}
\indexmacro{highlightboxsep} which acts like \macroname{fboxsep} for the
resulting box and defaults to \code{0.5\macroname{fboxsep}}.
\newslide
\item[{\present[s]{\macroname{highlighttext}}}]\indexmacro{highlighttext}
If the \code{colorhighlight} option (see section \ref{Sec:ColorEmphasis})
is set, puts its argument \highlighttext{on colored background}. Otherwise, underlines its
argument. It is made sure that the resulting text has the same dimensions as the argument (the outer frame may
overlap surrounding text).
\present{\macroname{highlightboxsep}} is used to determine the extent of the coloured box(es) used as background.
This command needs the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package
to work (compare the description of \macroname{hidetext}). If you don't load the \code{soul} package yourself, there
is no useful definition for this command, so it is disabled.
\newslide
\item[\present{\macroname{highlightenhanced}}]\indexmacro{highlightenhanced}
In a colored document, displays its argument \highlightenhanced{with
enhanced colors} (compare section \ref{Sec:Colors}).
For monochrome documents, there is no useful interpretation for this command, so it is disabled.
\end{description}
\newslide
\subsection{Variants of \macroname{step}}
There are a couple of custom versions of \macroname{step} which make it easier to achieve special effects needed
frequently.
\begin{description}
\item[\present{\macroname{bstep}}]\indexmacro{bstep}
Like \macroname{step}, but is \emph{always} boxed (see section
\ref{Sec:boxedsteps}). \commandapp{bstep}{\carg{stepcontents}} is
implemented in principle as
\code{\{\macroname{boxedsteps}\commandapp{step}{\carg{stepcontents}}\}}.
In aligned equations where \macroname{stepwise} is used for being able to put tabulators into \carg{stepcontents},
but where nested occurrences of \macroname{step} should be boxed to assure correct sizes of growing braces or such,
this variant of \macroname{step} is more convenient than using \macroname{boxedsteps} for every nested occurrence
of \macroname{step}.
\item[\present{\commandapp{switch}{\carg{ifinactive}\}\{\carg{ifactive}}}]
\indexmacro{switch} is a variant of \macroname{step} which,
instead of making its argument appear, switches between \carg{ifinactive}
and \carg{ifactive} when activated.
In fact, \commandapp{step}{\carg{stepcontents}} is in principle implemented by
\begin{tabbing}
\macroname{switch}\=\code{\{\commandapp{hidestepcontents}{\carg{stepcontents}}\}}\\
\>\code{\{\commandapp{displaystepcontents}{\carg{stepcontents}}\}}
\end{tabbing}
This command can be used, for instance, to add an \macroname{underbrace} to a formula, which is difficult using
\macroname{step}.
Beware of problems when \carg{ifinactive} and \carg{ifactive} have different dimensions.
\newslide
\item[\present{\macroname{dstep}}]\indexmacro{dstep}
A variant of \macroname{step} which takes \underl{no} argument, but simply
switches colors to `dimmed' (compare section \ref{Sec:Colors}) if not
active. Not that the scope of this color change will
last until the next outer group closes. This command does nothing in a monochrome document.
\item[\present{\macroname{vstep}}]\indexmacro{vstep}
A variant of \macroname{step} which takes \underl{no} argument, but simply
switches all colors to \macroname{vanishcolor} (defaults to
\code{pagecolor}; compare section \ref{Sec:Colorcommands}) if not
active. Not that the scope of this color change will last until the next outer group closes. This command does
nothing in a monochrome document.
\item[\present{\macroname{steponce}}]\indexmacro{steponce}
% \steponce[<activatefirst>]{<stepcontents>}
Like \macroname{step}, but goes inactive again in the subsequent step.
\item[\present{\macroname{multistep}}]\indexmacro{multistep}
is a shorthand macro for executing several steps successively. In
fact, it would better be called \macroname{multiswitch}, because it's
functionality is based on \macroname{switch}, it only acts like a
(simplified) \macroname{step} command which is executed `several times'.
The syntax is
\begin{center}
\commandapp[\carg{activatefirst}]{multistep}{\carg{n}\}\{\carg{stepcontents}}
\end{center}
where \carg{n} is the number of steps. Only one instance of
\carg{stepcontents} is displayed at a time. Inside \carg{stepcontents}, a
counter \code{substep} can be evaluated which tells the number of the
current instance. In the starred form the last instance of
\carg{stepcontents} stays visible.
\item[\present{\macroname{movie}}]\indexmacro{movie}
works like \macroname{multistep}, but between \macroname{steps}, pages are
advanced automatically every \carg{dur} seconds. The syntax is
\begin{center}
\commandapp{movie}{\carg{n}\}\{\carg{dur}\}[\carg{stop}]\{\carg{stepcontents}}
\end{center}
where \carg{n} is the number of steps. The additional optional argument
\carg{stop} gives the code (default: \macroname{stopAdvancing})
\indexmacro{stopAdvancing} which stops the animation.
(\macroname{movie} accepts the same first optional argument as
\macroname{multistep} but it was left out above.)
\item[\present{\macroname{overlays}}]\indexmacro{overlays}
is another shorthand macro for executing several steps successively. In
contrast to \macroname{multistep}, it doesn't print things \emph{after}
each other, but \emph{over} each other. The syntax is
\begin{center}
\commandapp[\carg{activatefirst}]{overlays}{\carg{n}\}\{\carg{stepcontents}}
\end{center}
where \carg{n} is the number of steps. Inside \carg{stepcontents}, a
counter \code{substep} can be evaluated which tells the number of the
current instance.
\newslide
\item[\small%
\present{\macroname{restep}}\indexmacro{restep},
\present{\macroname{rebstep}}\indexmacro{rebstep},
\present{\macroname{reswitch}}\indexmacro{reswitch},
\present{\macroname{redstep}}\indexmacro{redstep},
\present{\macroname{revstep}}\indexmacro{revstep}.]\mbox{}\\
Frequently, it is desirable for two or more steps to appear at the same
time, for instance to fill in arguments at
several places in a formula at once (see example \ref{Sec:ExEq}).
\present{\commandapp{restep}{\carg{stepcontents}}} is identical with \commandapp{step}{\carg{stepcontents}}, but is
activated at the same time as the previous occurrence of \macroname{step}.
\present{\macroname{rebstep}}, \present{\macroname{reswitch}}, \present{\macroname{redstep}}, and
\present{\macroname{revstep}} do the same for \macroname{bstep}, \macroname{switch}, \macroname{dstep}, and
\macroname{vstep}.
\end{description}
\newslide
\subsection{Optional arguments of \macroname{step}}%
Sometimes, letting two \macroname{step}s appear at the same time (with \macroname{restep}) is not the only desirable
modification of the order in which \macroname{step}s appear. \macroname{step}, \macroname{bstep} and
\macroname{switch} take two optional arguments for influencing the mode of activation, like this:
\begin{center}
\present{\commandapp[{\carg{activatefirst}][\carg{whenactive}}]{step}{\carg{stepcontents}}}.
\end{center}
Both \carg{activatefirst} and \carg{whenactive} should be conditions in the syntax of the \macroname{ifthenelse}
command (see the documentation of the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/ifthen.html}{\code{ifthen}} package for details).
\newslide
\present{\carg{activatefirst}} checks whether this \macroname{step} is to be activated \emph{for the first time}. The
default value is \present{\commandapp{value}{step}=\commandapp{value}{stepcommand}} (see section \ref{Sec:Internals}
for a list of internal values). By using \commandapp{value}{step}=\carg{$n$}, this \macroname{step} can be forced to
appear as the $n$th one. See example \ref{Sec:ExPar} for a demonstration of how this can be used to make
\macroname{step}s appear in arbitrary order.
\present{\carg{whenactive}} checks whether this \macroname{step} is to be considered active \emph{at all}. The default
behaviour is to check whether this \macroname{step} has been activated before (this is saved internally for every
step). See example \ref{Sec:ExFooling} for a demonstration of how this can be used to make \macroname{step}s appear
and disappear after a defined fashion.
\minisec{If you know what you're doing\dots}
Both optional arguments allow two syntctical forms:
\begin{enumerate}
\item enclosed in square brackets \code{[]} like explained above.
\item enclosed in braces \code{()}. In this case, \carg{activatefirst} and \carg{whenactive} are \emph{not} treated as
conditions in the sense of \macroname{ifthenelse}, but as conditionals like those used internally by \LaTeX. That
means, \carg{activatefirst} (when enclosed in braces) can contain arbitrary \TeX{} code which then takes two
arguments and expands to one of them, depending on whether the condition is fulfilled or not fulfilled. For
instance, \commandapp[{\carg{activatefirst}}]{step}{\carg{stepcontents}} could be replaced by
\macroname{step}\code{(\commandapp{ifthenelse}{\carg{activatefirst}})\{\carg{stepcontents}\}}.
See example \ref{Sec:ExBackwards} for a simple application of this syntax.
\end{enumerate}
Internally, the default for the treatment of \carg{whenactive} is \code{(\macroname{if@first@TP@true})}, where
\macroname{if@first@TP@true} is an internal condition checking whether this \macroname{step} has been activated before.
\newslide
\subsection{Finding out what's going on}\label{Sec:Internals}%
Inside \carg{settings} and \carg{contents}, you can refer to the following internal state variables which provide
information about the current state of the process executed by \macroname{stepwise}:
\begin{description}
\item[\present{counter: \code{firststep}}]
\indexstepwise{firststep}{counter}
The number from which to start counting steps (see counter \code{step}
below). Is $0$ by default and $1$ for starred versions (section \ref{Sec:StarredStepwise}) of \macroname{stepwise}.
You can set this in \carg{settings} for special effects (see example \ref{Sec:ExBackwards}).
\item[\present{counter: \code{totalsteps}}]
\indexstepwise{totalsteps}{counter}
The total number of \macroname{step} commands occurring in \carg{contents}.
\newslide
\item[\present{counter: \code{step}}]
\indexstepwise{step}{counter}
The number of the current iteration, i.\,e.\ the number of the current page in
the sequence of pages produced by \macroname{stepwise}. Runs from \commandapp{value}{firststep} to
\commandapp{value}{totalsteps}.
\item[\present{counter: \code{stepcommand}}]
\indexstepwise{stepcommand}{counter}
The number of the \macroname{step} command currently being executed.
\item[\present{boolean: \code{firstactivation}}]
\indexstepwise{firstactivation}{boolean}
\code{true} if this \macroname{step} is active for the first time,
\code{false} otherwise.
\item[\present{boolean: \code{active}}]\indexstepwise{active}{boolean}
\code{true} if this \macroname{step} is currently active, \code{false}
otherwise.
\end{description}
\code{stepcommand}, \code{firstactivation}, and \code{active} are useful only inside \carg{stepcontents}.
\newslide
\subsection{\macroname{afterstep}}\indexmacro{afterstep}%
It might be neccessary to set some parameters which affect the appearance of the \emph{page} (like page transitions)
inside \carg{stepcontents}. However, the \macroname{step} commands are usually placed deeply inside some structure, so
that all \emph{local} settings are likely to be undone by groups closing before the page is completed.
\present{\commandapp{afterstep}{\carg{settings}}} puts \carg{settings} right before the end of the page, after the
current step is performed.
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item There can be only one effective value for \carg{settings}. Every occurrence of \macroname{afterstep} overwrites
this value globally.
\item \macroname{afterstep} will \emph{not} be executed in \carg{stepcontents} if the corresponding \macroname{step}
is not active, even if \carg{stepcontents} is displayed owing to a redefinition of \macroname{hidestepcontents},
like in example \ref{Sec:Exhl}.
\item As \carg{settings} is put immediately before the page break, there is no means of restoring the original value
of whatever has been set. So if you set something via \macroname{afterstep} and want it to be reset in some later
step, you have to reset it explicitly with another call of \macroname{afterstep}.
\end{enumerate}
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{Page transitions and automatic advancing}\label{Sec:PageTrans}
\subsection{Page transitions}
I am indepted to \href{mailto:dongen@cs.ucc.ie}{\name{Marc van Dongen}} for allowing me to include a suite of commands
written by him and posted to the \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4}
mailing list which set page transitions (using
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/hyperref.html}{\code{hyperref}s} \macroname{hypersetup}).
These commands work only if the \code{hyperref} package is loaded.
\newslide
The following page transition commands are defined:\pause
\begin{description}
\item[{\present[h]{\macroname{pageTransitionSplitHO}}}]
\indexmacro{pageTransitionSplitHO}
Split Horizontally to the outside. \pageTransitionSplitHO\pause
\item[{\present[h]{\macroname{pageTransitionSplitHI}}}]
\indexmacro{pageTransitionSplitHI}
Split Horizontally to the inside. \pageTransitionSplitHI\pause
\item[{\present[h]{\macroname{pageTransitionSplitVO}}}]
\indexmacro{pageTransitionSplitVO}
Split Vertically to the outside. \pageTransitionSplitVO\pause
\item[{\present[h]{\macroname{pageTransitionSplitVI}}}]
\indexmacro{pageTransitionSplitVI}
Split Vertically to the inside. \pageTransitionSplitVI\pause
\item[{\present[h]{\macroname{pageTransitionBlindsH}}}]
\indexmacro{pageTransitionBlindsH}
Horizontal Blinds. \pageTransitionBlindsH\pause
\item[{\present[h]{\macroname{pageTransitionBlindsV}}}]
\indexmacro{pageTransitionBlindsV}
Vertical Blinds. \pageTransitionBlindsV
\newslide
\item[{\present[h]{\macroname{pageTransitionBoxO}}}]
\indexmacro{pageTransitionBoxO}
Growing Box. \pageTransitionBoxO\pause
\item[{\present[h]{\macroname{pageTransitionBoxI}}}]
\indexmacro{pageTransitionBoxI}
Shrinking Box. \pageTransitionBoxI\pause
\item[{\present[h]{\commandapp{pageTransitionWipe}{\carg{angle}}}}]
\indexmacro{pageTransitionWipe}\mbox{}\\
Wipe from one edge of the page to the facing edge.
\stepwise
{%
\carg{angle} is a number between $0$ and $360$ which specifies the direction (in degrees) in which to wipe.
Apparently, only the values \afterstep{\pageTransitionWipe{0}}$0$, \step{\afterstep{\pageTransitionWipe{90}}$90$,}
\step{\afterstep{\pageTransitionWipe{180}}$180$,} \step{$270$ are supported.}%
}%
\pageTransitionWipe{270}\pause
\item[{\present[h]{\macroname{pageTransitionDissolve}}}]
\indexmacro{pageTransitionDissolve}
Dissolve. \pageTransitionDissolve
\newslide
\item[{\present[h]{\commandapp{pageTransitionGlitter}{\carg{angle}}}}]
\indexmacro{pageTransitionGlitter}\mbox{}\\
Glitter from one edge of the page to the facing edge.
\stepwise
{%
\carg{angle} is a number between $0$ and $360$ which specifies the direction (in degrees) in which to glitter.
Apparently, only the values \afterstep{\pageTransitionGlitter{0}}$0$,
\step{\afterstep{\pageTransitionGlitter{270}}$270$,} \step{$315$ are supported.}%
}%
\pageTransitionGlitter{315}\pause
\item[{\present[h]{\macroname{pageTransitionReplace}}}]
\indexmacro{pageTransitionReplace}
Simple Replace (the default).
\end{description}
\pageTransitionReplace
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item The setting of the page transition is a property of the \emph{page}, i.~e.\ whatever page transition is in
effect when a page break occurs, will be assigned to the corresponding pdf page.
\item The setting of the page transition is undone when a group ends.
Make sure no \LaTeX{} environment is ended between a \macroname{pageTransition} setting and the next page break. In
particular, in \carg{stepcontents}, \macroname{afterstep} should be used (see example \ref{Sec:ExPic}).
\newslide
\item Setting page transitions works well with \macroname{pause}. Here, \macroname{pause} acts as a page break,
i.\,e.\ a different page transition can be set before every occurrence of \macroname{pause}.
\end{enumerate}
\newslide
\subsection{Automatic advancing of pages}\label{Sec:PageDuration}
If you have loaded a sufficiently new version of the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/hyperref.html}{\code{hyperref}} package (which allows to
set \code{pdfpageduration}), then the following command is defined which enables automatic advancing of \code{pdf}
pages.
\present[h]{\commandapp{pageDuration}{\carg{dur}}}\indexmacro{pageDuration}
causes pages to be advanced automatically every \carg{dur}
seconds. \carg{dur} should be a non-negative fixed-point number.
\pageDuration{2}\pause
Depending on the \code{pdf} viewer, this will happen only in full-screen mode.
See example \ref{Sec:ExFooling} for a demonstration of this effect.
\stopAdvancing
\newslide
The same restrictions as for \concept{page transitions} apply. In particular, the page duration setting is undone by
the end of a group, i.\,e.\ it is useless to set the page duration if a \LaTeX{} environment ends before the next page
break.
There is no `neutral' value for \carg{dur} ($0$ means advance as fast as possible). You can make automatic advancing
stop by calling \commandapp{pageDuration}{}. \code{texpower} offers the custom command
\begin{center}
\present[h]{\macroname{stopAdvancing}}\indexmacro{stopAdvancing}
\end{center}
to do this.
\newslide
%-----------------------------------------------------------------------------------------------------------------
%
\section{Color management, color emphasis and highlighting}\label{Sec:ColorEmphasis}
\TeX Power tries to find out whether you are making a colored document. This is assumed if
\begin{itemize}
\item the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package has been
loaded before the \code{texpower} package or
\item a color-related option (see sections \ref{Sec:ColBgdOpt} and \ref{Sec:ColorOptions}) is given to the
\code{texpower} package (in this case, the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package is loaded
automatically).
\end{itemize}
If this is the case, \TeX Power installs an extensive color management scheme on top of the kernel of the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package.
In the following, some new concepts established by this management scheme are explained. Sections \ref{Sec:ColBgdOpt}
and \ref{Sec:ColorOptions} list options for color activation, section \ref{Sec:Colorcommands} lists some new
highlighting commands, and section \ref{Sec:Colors} gives the names and meaning of \TeX Power's predefined colors.
Note that parts of the kernel of the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package are overloaded for
special purposes (getting driver-independent representations of defined colors to be used by \macroname{colorbetween}
(\ref{Sec:MiscColorCommands}), for instance), so it is recommended to execute color definition commands like
\macroname{definecolor} \emph{after} the \code{texpower} package has been loaded (see also the next section on
\macroname{defineTPcolor}).
\newslide
\subsection{Standard colors}\label{Sec:StdCols}
\TeX Power maintains a list of \concept{standard colors} which are recognized and handled by \TeX Power's color
management. Some commands like \macroname{dimcolors} (see section \ref{Sec:ColorVariants}) affect \emph{all} standard
colors. There are some predefined colors which are in this list from the outset (see section \ref{Sec:Colors}).
If colors defined by the user are to be recognized by \TeX Power, they have to be included in this list. The easiest
way is to use the following command for defining them.
\newslide
\present{\commandapp{defineTPcolor}{\carg{name}\}\{\carg{model}\}\{\carg{def}}}
\indexmacro{defineTPcolor} acts like \macroname{definecolor}
\indexmacro{defineTPcolor} from the \code{color} package, but the color
\carg{name} is also added to the list of standard colors.
If you want to make a color a standard color which is defined elsewhere (by a document class, say), you can simply add
it to the list of standard colors with the command
\present{\commandapp{addTPcolor}{\carg{name}}}\indexmacro{addTPcolor}.
\newslide
\subsection{Color sets}
Every standard color may be defined in one or several \concept{color sets}. There are two fundamentally different
types of color set:
\begin{description}
\item[The current color set.] This contains the current definition of every standard color which is actually used at
the moment. Every standard color should be defined at least in the current color set. The current color set is not
distinguished by a special name.
\newslide
\item[Named color sets.] These are `containers' for a full set of color definitions (for the standard colors) which
can be activated by respective commands (see below). The color sets are distinguished by their names. Color
definitions in a named color set are not currently available, they have to be made available by activating the named
color set.
There are four predefined color sets named \code{whitebg}\indexcode{whitebg},
\code{lightbg}\indexcode{lightbg}, \code{darkbg}\indexcode{darkbg},
\code{blackbg}\indexcode{blackbg}, each of which contains a full set of (predefined)
standard colors customized for a white, light, dark, black background
color, respectively.
\end{description}
\newslide
There are the following commands for manipulating color sets:
\begin{description}
\item[\present{\commandapp{usecolorset}{\carg{name}}}]\indexmacro{usecolorset}
Make the color set named \carg{name} the current color set.
\emph{All standard colors in the current color set which are also in color set \carg{name} are overwritten.}
The standard color \code{textcolor} is set automatically after activating color set \carg{name}.
\item[\present{\commandapp{dumpcolorset}{\carg{name}}}]\indexmacro{dumpcolorset}
Copy the definitions of \emph{all} standard colors in the
current color set into color set named \carg{name}. All standard colors in color set \carg{name} will be
overwritten.
\end{description}
\newslide
Using \commandapp{defineTPcolor}{\carg{name}} or \commandapp{definecolor}{\carg{name}} will define the color
\carg{name} in the \emph{current} color set. To define a color in color set \carg{cset}, use
\present{\commandapp[\carg{cset}]{defineTPcolor}{\carg{name}}}.
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item Color sets are not really `\TeX{} objects', but are distinguished by color name suffixes. This means, a color
named \code{foo} is automatically in the current color set. Executing \commandapp[\carg{cset}]{defineTPcolor}{foo}
means executing \macroname{definecolor} for a specific color the name of which is a combination of \code{foo} and
\carg{cset}.
Consequently, \macroname{usecolorset} and \macroname{dumpcolorset} do not copy color sets as composite objects, but
simply all colors the names of which are generated from the list of standard colors.
\newslide
\item The command \commandapp{usecolorset}{\carg{name}} overwrites only those colors which have been defined in color
set \carg{name}. If a standard color is defined in the current color set, but not in color set \carg{name}, it is
preserved (but if \commandapp{dumpcolorset}{\carg{name}} is executed later, then it will also be copied back into
the color set \carg{name}).
\end{enumerate}
\newslide
\subsection{Color Background Options}\label{Sec:ColBgdOpt}
For activating the predefined color sets, there are shorthands
\macroname{whitebackground}\indexmacro{whitebackground},
\macroname{lightbackground}\indexmacro{lightbackground},
\macroname{darkbackground}\indexmacro{darkbackground},
\macroname{blackbackground}\indexmacro{blackbackground} which execute
\macroname{usecolorset} and additionally set the background color to its current value.
\newslide
When one of the following options is given, the respective command is executed automatically at the beginning of the
document.
\begin{description}
\item[\present{option: \code{whitebackground} (default)}]
\indexpckopt{texpower}{whitebackground}
Set standard colors to match a white background color.
\item[\present{option: \code{lightbackground}}]
\indexpckopt{texpower}{lightbackground}
Set standard colors to match a light (but not white) background color.
\item[\present{option: \code{darkbackground}}]
\indexpckopt{texpower}{darkbackground}
Set standard colors to match a dark (but not black) background color.
\item[\present{option: \code{blackbackground}}]
\indexpckopt{texpower}{blackbackground}
Set standard colors to match a black background color.
\end{description}
\newslide
\subsection{Color variants}\label{Sec:ColorVariants}
In addition to color sets, \TeX Power implements a concept of \concept{color variant}. Currently, every color has three
variants: \concept{normal}, \concept{dimmed}, and \concept{enhanced}. The normal variant is what is usually seen, text
written in the dimmed variant appears ``faded into the background'' and text written in the enhanced variant appears
to ``stick out''.
\newslide
When switching variants, for every color one of two cases can occur:
\begin{enumerate}
\item A \concept{designated color} for this variant has been defined.
For color \carg{color} the designated name of the \concept{dimmed}
\indexcode{dimmed color variant} variant is \code{d\carg{color}}, the designated
name of the \concept{enhanced}\indexcode{enhanced color variant} variant is
\code{e\carg{color}}.
If a color by that name exists at the time the variant is switched to, then variant switching is executed by
replacing color \carg{color} with the designated color.
\newslide
\item A \concept{designated color} for this variant has not been defined.
If a color by the designated name does not exist at the time a color variant is switched to, then variant switching
is executed by \concept{automatically} calculating the color variant from the original color.
The method for calculation depends on the variant:
\newslide
\begin{description}
\item[dimmed.] The dimmed variant is calculated by \concept{interpolating} between \code{pagecolor} and the color to
be dimmed, using the \macroname{colorbetween} command (see \ref{Sec:MiscColorCommands}).
There is a command \present{\macroname{dimlevel}}\indexmacro{dimlevel}
which contains the parameter \carg{weight} given to \macroname{colorbetween}
(default: \code{0.7}). This default can be overridden by either redefining
\macroname{dimlevel} or giving an alternative \carg{weight} as an optional
argument to the color dimming command (see below).
\newslide
\item[enhanced.] The enhanced variant is calculated by \concept{extrapolating} the color to be enhanced (relative to
\code{pagecolor}).
There is a command \present{\macroname{enhancelevel}}\indexmacro{enhancelevel}
which gives the \concept{extent} of the extrapolation (default: \code{0.5}).
The same holds for overriding this default as for \macroname{dimlevel}.
\end{description}
\end{enumerate}
\newslide
The following commands switch color variants:
\begin{description}
\item[\present{\commandapp[\carg{level}]{dimcolor}{\carg{color}}}]
\indexmacro{dimcolor} switches color \carg{color} to the \concept{dimmed}
variant. If given, \carg{level} replaces the value of \macroname{dimlevel} in automatic calculation of the dimmed
variant (see above).
\item[\present{\code{\macroname{dimcolors}[\carg{level}]}}]
\indexmacro{dimcolors} switches \emph{all} standard colors to the \concept{dimmed}
variant. The optional argument \carg{level} acts as for \macroname{dimcolor}.
\newslide
\item[\present{\commandapp[\carg{level}]{enhancecolor}{\carg{color}}}]
\indexmacro{enhancecolor} switches color \carg{color} to the
\concept{enhanced} variant. If given, \carg{level} replaces the value of \macroname{enhancelevel} in automatic
calculation of the enhanced variant (see above).
\item[\present{\code{\macroname{enhancecolors}[\carg{level}]}}]
\indexmacro{enhancecolors} switches \emph{all} standard colors to the
\concept{enhanceed} variant. The optional argument \carg{level} acts as for \macroname{enhancecolor}.
\end{description}
\newslide
\minisec{Things to pay attention to}
\begin{enumerate}
\item While automatic calculation of a \concept{dimmed} color will almost always yield the desired result
(interpolating between colors by calculating a weighted average is trivial), automatic calculation of an
\concept{enhanced} color by `extrapolating' is tricky at best and will often lead to unsatisfactory results. This is
because the idea of making a color `stronger' is very hard to formulate numerically.
\newslide
The following effects of the current algorithm should be kept in mind:
\begin{itemize}
\item if the background color is light, enhancing a color will make it darker;
\item if the background color is dark, enhancing a color will make it lighter;
\item sometimes, the numerical values describing an enhanced color have to be \concept{bounded} to avoid exceeding
the allowed range, diminishing the enhancing effect. For instance, if the background color is black and the color
to be enhanced is a `full-powered' yellow, there is no way of enhancing it by simple numeric calculation.
\end{itemize}
\newslide
As a conclusion, for best results it is recommended to provide custom \code{e} variants of colors to be enhanced. By
default, \TeX Power does not provide dedicated enhanced colors, but the file \code{tpsettings.cfg} contains complete
sets of enhanced variants for the standard colors in the different color sets, which you can uncomment and
experiment with as convenient.
\newslide
\item Currently, switching to a different color variant is done by simply overwriting the current definitions of all
standard colors. This means
\begin{itemize}
\item there is no way of `undimming' a color once it has been dimmed,
\item a dimmed color can not be enhanced and vice versa.
\end{itemize}
Maybe this will be solved in a slightly more clever way in subsequent releases of \TeX Power.
\newslide
Hence, it is recommended to
\begin{itemize}
\item restrict the \concept{scope} of a global variant switching command like \macroname{dimcolors},
\macroname{enhancecolors} or \macroname{dstep} by enlcosing it into a \LaTeX{} group (like \code{\{\dots\}}) or
\item use \macroname{dumpcolorset} before the command to save the current definitions of all colors, to be restored
with \macroname{usecolorset}.
At the very beginning of a \macroname{stepwise} command, \TeX Power executes \commandapp{dumpcolorset}{stwcolors},
so you can restore the colors anywhere in the argument of \macroname{stepwise} by saying
\commandapp{usecolorset}{stwcolors}.
\end{itemize}
\newslide
\item Some rudimentary attempts are made to keep track of which color is in what variant, to the effect that
\begin{itemize}
\item a color which is not in the normal variant will neither be dimmed nor enhanced;
\item when \macroname{usecolorset} overwrites a color with its normal variant, this is registered.
\end{itemize}
Still, it is easy to get in trouble by mixing variant changes with color set changes (say, if not all standard
colors are defined in a color set, or if a color set is dumped when not all colors are in normal variant), so it is
recommended not to use or dump color sets when outside the normal variant (unless for special applications like
undoing a variant change by \commandapp{usecolorset}{stwcolors}).
\end{enumerate}
\newslide
\subsection{Miscellaneous color management commands}\label{Sec:MiscColorCommands}
\begin{description}
\item[\present{\commandapp[\carg{tset}]{replacecolor}{\carg{tcolor}\}[\carg{sset}]\{\carg{scolor}}}]
\indexmacro{} makes
\carg{tcolor} have the same definition as \carg{scolor} (if \carg{scolor} is defined at all), where \carg{tcolor}
and \carg{scolor} are color names as given in the first argument of \macroname{definecolor}. If (one of)
\carg{tset} and \carg{sset} are given, the respective color is taken from the respective color set, otherwise from
the current color set.
If \carg{scolor} is not defined (in color set \carg{sset}), \carg{tcolor} is left alone.
\newslide
\item[\present{\commandapp[\carg{weight}]{colorbetween}{\carg{src1}\}\{\carg{src2}\}\{\carg{target}}}]
\indexmacro{colorbetween} calculates a
`weighted average' between two colors. \carg{src1} and \carg{src2} are the names of the two colors. \carg{weight}
(default: $0.5$) is a fixed-point number between $0$ and $1$ giving the `weight' for the interpolation between
\carg{src1} and \carg{src2}. \carg{target} is the name to be given to the resulting mixed color.
If \carg{weight} is $1$, then \carg{target} will be identical to \carg{src1} (up to color model conversions, see
below), if \carg{weight} is $0$, then \carg{target} will be identical to \carg{src2}, if \carg{weight} is $0.5$
(default), then \carg{target} will be exactly in the middle between \carg{src1} and \carg{src2}.
\macroname{colorbetween} supports the following color models: \code{rgb}, \code{RGB}, \code{gray}, \code{cmyk},
\code{hsb}. If both colors are of the same model, the resulting color is also of the respective model. If
\carg{src1} and \carg{src2} are from \emph{different} models, then \carg{target} will \emph{always} be an \code{rgb}
color. The only exception is the \code{hsb} color model: As I don't know how to convert \code{hsb} to \code{rgb},
mixing \code{hsb} with another color model will always raise an error.
\newslide
\item[\present{\commandapp{mkfactor}{\carg{expr}\}\{\carg{macroname}}}]
\indexmacro{mkfactor} is a helper command for automatically
generating the fixed point numbers between $0$ and $1$ which are employed by the color calculation commands.
\carg{expr} can be any expression which can stand behind \code{*} in expressions allowed by the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/calc.html}{\code{calc}} package (for instance:
\code{\commandapp{value}{counter}/\commandapp{value}{maxcounter}} or \macroname{ratio} or whatever).
\carg{macroname} should be a valid macro name. \carg{expr} is converted into a fixed-point representation which is
then assigned to \carg{macroname}.
\newslide
\item[\present{\code{\macroname{vanishcolors}[\carg{color}]}}]
\indexmacro{vanishcolors} is similar to the color variant command
\macroname{dimcolors}, but instead of dimming colors, all standard colors are replaced by a single color given by
the new command \present{\macroname{vanishcolor}} (default: \code{pagecolor}). Hence, the result of calling
\macroname{vanishcolors} should be that all text vanishes, as it is written in the background color (this doesn't
work with structured backgrounds, of course).
For getting a color different from the default \code{pagecolor}, you can either redefinine \macroname{vanishcolor}
or give an alternative \carg{color} as an optional argument to \macroname{vanishcolors}.
There is no dedicated command for making a single color vanish. To achieve this, use
\commandapp{replacecolor}{\carg{color}\}\{\macroname{vanishcolor}}.
\end{description}
\subsection{Color Emphasis and Highlighting}\label{Sec:ColorOptions}
\code{texpower} offers some support for text emphasis and highlighting with colors (instead of, say, font
changes). These features are enabled by the following options:
\begin{description}
\item[\present{option: \code{coloremph}}]\indexpckopt{texpower}{coloremph}
Make \macroname{em} and \macroname{emph} switch colors instead of fonts.
\item[\present{option: \code{colormath}}]\indexpckopt{texpower}{colormath}
Color all mathematical formulae.
\item[\present{option: \code{colorhighlight}}]\indexpckopt{texpower}{colorhighlight}
Make new highlighting and emphasis commands defined by \code{texpower}
use colors.
\end{description}
\minisec{Things to pay attention to}
\begin{enumerate}
\item You need the \code{color} package to use any of the color features.
\item To implement the options \code{coloremph} and \code{colormath}, it is neccessary to redefine some \LaTeX{}
internals. This can lead to problems and incompatibilities with other packages. Use with caution.
\item If the \code{colorhighlight} option is \emph{not} given, new highlighting and emphasis commands defined by
\code{texpower} are realized otherwise. Sometimes, however, there is no good alternative to colors, so different
emphasis commands can become disabled or indistinguishable.
\newslide
\item Because of font changes, emphasized or highlighted text can have different dimensions whether or not the options
\code{coloremph}, \code{colormath}, and \code{colorhighlight} are set. Prepare for different line and page breaks
when changing one of these options.
\item Color emphasis and highlighting makes use of the predefined standard colors described in section
\ref{Sec:Colors}. See sections \ref{Sec:StdCols} to \ref{Sec:ColBgdOpt} for further information on standard colors,
color sets, and customization.
\end{enumerate}
\newslide
\subsection{New commands for emphasis and highlighting elements}\label{Sec:Colorcommands}
Some things like setting the page or text color, making emphasised text or math colored are done automatically when
the respective options are set. There are some additional new commands for creating emphasis and highlighting
elements.
\minisec{Concerning math:}
\begin{description}
\item[\present{\macroname{origmath}}]\indexmacro{origmath}
When the \code{colormath} option is given, \emph{everything} which appears in
math mode is colored accordingly. Sometimes, however, math mode is used for something besides mathematical formulae.
Some \LaTeX{} commands which internally use math mode (like \code{tabular} or \macroname{textsuperscript}) are
redefined accordingly when the \code{colormath} option is given (this is a potential source of trouble; beware of
problems\dots).
If you need to use math mode for something which is not to be colored (like a symbol for \code{itemize}), you can
use the \macroname{origmath} command which works exactly like \macroname{ensuremath} but doesn't color its argument.
If a nested use of math mode should occur in the argument of \macroname{origmath}, it will again be colored.
\end{description}
\newslide
\minisec{Documenting \TeX{} code:}
\begin{description}
\item[\present{\macroname{code}}]\indexmacro{code}
Simple command for typesetting \code{code} (like shell commands).
\item[\present{\macroname{macroname}}]\indexmacro{macroname}
For \macroname{macro names}. Like \macroname{code}, but with a \macroname{} in
front.
\item[\present{\commandapp[\carg{opt arg}]{commandapp}{\carg{command}\}\{\carg{arg}}}]
\indexmacro{commandapp} For \TeX{} commands. \carg{arg}
stands for the command argument, \carg{opt arg} for an optional argument.
\item[\present{\macroname{carg}}]\indexmacro{carg}
For \carg{macro arguments}.
\end{description}
\newslide
\minisec{Additional emphasis commands:}
\begin{description}
\item[\present{\macroname{underl}}]\indexmacro{underl}
Additional \underl{emphasis} command. Can be used like \macroname{emph}. Defaults
to \textbf{bold face} if the \code{colorhighlight} option is not given.
\item[\present{\macroname{concept}}]\indexmacro{concept}
Additional \concept{emphasis} command, especially for new concepts. Can be
augmented by things like automatic index entry creation. Also defaults to \textbf{bold face} if the
\code{colorhighlight} option is not given.
\item[\present{\macroname{inactive}}]\indexmacro{inactive}
Additional \inactive{emphasis} command, this time for `de-emphasising'. There is
no sensible default if the \code{colorhighlight} option is not given, as base \LaTeX{} doesn't offer an appropriate
font. In this case, \macroname{inactive} defaults to \macroname{monochromeinactive}, which does nothing.
You can (re-)define \macroname{monochromeinactive} to provide some sensible behaviour in the absence of colors, for
instance striking out if you're using the
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package.
\end{description}
\minisec{Color Highlighting:}
\begin{description}
\item[\present{\macroname{present}}]\indexmacro{present}
Highlighting command which puts its argument into a \present{box with colored
background}. Defaults to an \fbox{\macroname{fbox}} if the \code{colorhighlight} option is not given.
See section \ref{Sec:displaycustom} for some further highlighting commands.
\end{description}
\newslide
\subsection{Predefined standard colors}\label{Sec:Colors}
In previous subsections, it has been mentioned that \TeX Power predefines some standard colors which have appropriate
values in the predefined color sets \code{whitebg}, \code{lightbg}, \code{darkbg}, and \code{blackbg} (see sections
\ref{Sec:StdCols} to \ref{Sec:ColBgdOpt} for further information on standard colors, color sets, and customization).
\begin{description}
\item[\present{color: \code{pagecolor}}]\indexcode{pagecolor}
Background color of the page. Is set automatically at the beginning of the
document if color management is active.
\item[\present{color: \code{textcolor}}]\indexcode{textcolor}
Color of normal text. Is set automatically at the beginning of the
document if color management is active.
\item[\present{color: \code{emcolor}}]\indexcode{emcolor}
Color used for \emph{emphasis} if the \code{coloremph} option is set.
\item[\present{color: \code{altemcolor}}]\indexcode{altemcolor}
Color used \emph{for \emph{double} emphasis} if the \code{coloremph} option
is set.
\item[\present{color: \code{mathcolor}}]\indexcode{mathcolor}
Color used for math $a^2+b^2=c^2$ if the \code{colormath} option is set.
\item[\present{color: \code{codecolor}}]\indexcode{codecolor}
Color used by the \macroname{code} command if the \code{colorhighlight}
option is set.
\item[\present{color: \code{underlcolor}}]\indexcode{underlcolor}
Color used by the \underl{\macroname{underl} command} if the
\code{colorhighlight} option is set.
\item[\present{color: \code{conceptcolor}}]\indexcode{conceptcolor}
Color used by the \concept{\macroname{concept} command} if the
\code{colorhighlight} option is set.
\newslide
\item[\present{color: \code{inactivecolor}}]\indexcode{inactivecolor}
Color used by the \inactive{\macroname{inactive} command} if the
\code{colorhighlight} option is set.
\item[\present{color: \code{presentcolor}}]\indexcode{presentcolor}
Color used as background color by the \present{\macroname{present}}
command if the \code{colorhighlight} option is set.
\item[\present{color: \code{highlightcolor}}]\indexcode{highlightcolor}
Color used as background color by the
\highlightboxed{\macroname{highlightboxed}} and \macroname{highlighttext} commands (see section
\ref{Sec:displaycustom}) if the \code{colorhighlight} option is set.
\end{description}
\ifthenelse{\boolean{TPcolor}}
{%
\newslide
\whitebackground
\minisec{Color tables}
\newlength{\widthfirstcol}
\settowidth{\widthfirstcol}{\textbf{\footnotesize white background}}
\vspace*{\fill}
\begin{center}
\begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
\cline{2-4}
\multicolumn{1}{l|}{\textbf{\footnotesize white background}}&standard&dimmed&enhanced\\\hline
\code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\end{tabular}
\end{center}
\newslide
\lightbackground
\vspace*{\fill}
\begin{center}
\begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
\cline{2-4}
\multicolumn{1}{l|}{\textbf{\footnotesize light background}}&standard&dimmed&enhanced\\\hline
\code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\end{tabular}
\end{center}
\newslide
\darkbackground
\vspace*{\fill}
\begin{center}
\begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
\cline{2-4}
\multicolumn{1}{l|}{\textbf{\footnotesize dark background}}&standard&dimmed&enhanced\\\hline
\code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\end{tabular}
\end{center}
\newslide
\blackbackground
\vspace*{\fill}
\begin{center}
\begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
\cline{2-4}
\multicolumn{1}{l|}{\textbf{\footnotesize black background}}&standard&dimmed&enhanced\\\hline
\code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
\end{tabular}
\end{center}
}{}
\newslide
\ifthenelse{\boolean{TPcolor}}{\lightbackground}{}
%-----------------------------------------------------------------------------
%
\section{Structured page backgrounds and panels}\label{Sec:PageBackPanel}
\subsection{Structured page backgrounds}
\present{\commandapp[\carg{options}]{backgroundstyle}{\carg{style}}}
\indexmacro{backgroundstyle}
is the central command for structured page backgrounds. It works like
\macroname{pagestyle} and other commands of this type. This means
\carg{style} is a symbolic name specifying the general method by which the
page background is constructed.
The detailed construction is influenced by parameters which can be set in
\carg{options}. If given, the optional parameter \carg{options} should
contain a list of settings in ``keyval'' manner. The keyval method
% (which is used by the \includegraphics command from the graphicx package,
%for instance)
is based on associating a symbolic name with every parameter. \carg{options}
is then a comma-separated list of parameter settings of the form
\carg{name}=\carg{value}, where \carg{name} is the symbolic name of the
parameter to be set and \carg{value} is the value it is to be set to.
Not every \carg{style} evaluates every parameter. In the following, a
description of all styles, together with lists of the parameters employed, is
given. It is followed by a list of all parameters. Note that some parameter
names internally access the same parameter. For instance, parameters
\code{startcolor} and \code{startcolordef} both set the start color of a color
gradient. In case of conflict, the last setting in the list \carg{options}
will prevail. It is noted in the list of parameters which other parameters
are overwritten.
\newslide
\carg{style} may have one of the following values:
\begin{description}
\item[\present{Style: \code{none}}]
\indexmacroopt{backgroundstyle}{none}%
No background. This means the page background is whatever it would be if
\macroname{backgroundstyle} wasn't used at all (for instance, a plain area
of color pagecolor if one of the color options has been given).
Parameters used: none.
\item[\present{Style: \code{plain}}]
\indexmacroopt{backgroundstyle}{plain}%
Plain background. This means the page background is whatever it would be if
\macroname{backgroundstyle} wasn't used at all (as for no background). In
addition to background style \code{none}, the background style \code{plain}
does produce panel backgrounds. The colors and dimensions of a \code{top
panel}, \code{bottom panel}, \code{left panel}, and \code{right panel} can
be specified.
\begin{flushleft}
Parameters used: \code{hpanels}, \code{autopanels}, \code{toppanelcolor},
\code{bottompanelcolor}, \code{leftpanelcolor}, \code{rightpanelcolor},
\code{toppanelcolordef}, \code{bottompanelcolordef}, \code{leftpanelcolordef},
\code{rightpanelcolordef}, \code{toppanelheight}, \code{bottompanelheight},
\code{leftpanelwidth}, \code{rightpanelwidth}.
\end{flushleft}
\item[\present{Style: \code{vgradient}}]
\indexmacroopt{backgroundstyle}{vgradient}%
Vertical gradient. The page background is constructed using the
\macroname{vgradrule}\indexmacro{vgradrule} command. In addition to the
usual parameters of gradient rules, the vgradient background style allows
to leave space for headers, footers, or panels. The colors and dimensions
of a \code{top panel}, \code{bottom panel}, \code{left panel}, and
\code{right panel} can be specified. The gradient rule fills the
rectangular space left between the specified panels.
\begin{flushleft}
Parameters used: \code{stripes}, \code{firstgradprogression},
\code{startcolor}, \code{startcolordef}, \code{endcolor}, \code{endcolordef}
in addition to the parameters used for style \code{plain}.
\end{flushleft}
\item[\present{Style: \code{hgradient}}]
\indexmacroopt{backgroundstyle}{hgradient}%
Horizontal gradient. The page background is constructed using the
\macroname{hgradrule}\indexmacro{hgradrule} command. See the description of
\macroname{vgradient} concerning panels.
Parameters used: See list for style \code{vgradient}.
\item[\present{Style: \code{doublevgradient}}]
\indexmacroopt{backgroundstyle}{doublevgradient}%
Double vertical gradient. The page background is constructed using the
\macroname{dblvgradrule}\indexmacro{dblvgradrule} command. See the
description of \macroname{vgradient} concerning panels.
\begin{flushleft}
Parameters used: \code{gradmidpoint}, \code{secondgradprogression},
\code{midcolor}, \code{midcolordef} in addition to the parameters used for
style \code{vgradient} (and \code{plain}).
\end{flushleft}
\item[\present{Style: \code{doublehgradient}}]
\indexmacroopt{backgroundstyle}{doublehgradient}%
Double horizontal gradient. The page background is constructed using the
\macroname{dblhgradrule}\indexmacro{dblhgradrule} command. See the description of
\macroname{vgradient} concerning panels.
Parameters used: See list for \code{doublevgradient}.
\end{description}
Now, a list of all parameters and their meaning. In the following,
\begin{itemize}\setlength{\itemsep}{0cm}
\item[\carg{n}] denotes a (calc expression for a) nonnegative integer
\item[\carg{i}] denotes a (calc expression for an) integer
\item[\carg{r}] denotes a fixed-point number
\item[\carg{l}] denotes a (calc expression for a) length
\item[\carg{c}] denotes the name of a defined color
\item[\carg{cm}] denotes a valid color model name (in the sense of the color
package)
\item[\carg{cd}] denotes a valid color definition (in the sense of the color
package) wrt a given \carg{cm} parameter
\item[\carg{t}] denotes a `truth value' in the sense of the ifthen package:
either true or false. As usual for keyval, if =\carg{t} is omitted, the
default true is assumed.
\end{itemize}
\begin{description}
\item[\present{Option: \code{stripes=}\carg{n}}] Set the \carg{stripes}
parameter of gradient rules to \carg{n}.\\
Default: \macroname{bgndstripes}. \\
Used by: \code{vgradient}, \code{hgradient}, \code{doublevgradient},
\code{doublehgradient}.
\item[\present{Option: \code{gradmidpoint=}\carg{r}}] Set the \carg{midpoint}
parameter of double gradient rules to \carg{r}.\\
Default: \macroname{bgndgradmidpoint}\\
Used by: doublevgradient, doublehgradient
\item[\present{Option: \code{firstgradprogression=}\carg{i}}]
Set the first gradient progression of gradient rules to \carg{i}.\\
Default: \macroname{bgndfirstgradprogression}\\
Used by: vgradient, hgradient, doublevgradient, doublehgradient
\item[\present{Option: \code{secondgradprogression=}\carg{i}}]
Set the second gradient progression of double gradient rules to \carg{i}.\\
Default: \macroname{bgndsecondgradprogression}\\
Used by: doublevgradient, doublehgradient
\item[\present{Option: \code{startcolor=}\carg{c}}]
Set the \carg{startcolor} parameter of gradient rules to \carg{c}.\\
Default: If neither startcolor nor startcolordef is given, the color
bgndstartcolor is used as startcolor.\\
Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
Overwrites: startcolordef
\item[\present{Option: \code{startcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
Set the \carg{startcolor} parameter of gradient rules to color foo, which
is obtained by \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
Note that the two pairs of curly braces are mandatory.\\
Default: If neither startcolor nor startcolordef is given, the color
bgndstartcolor is used as startcolor.\\
Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
Overwrites: startcolor
\item[\present{Option: \code{endcolor=}\carg{c}}]
Set the \carg{endcolor} parameter of gradient rules to \carg{c}.\\
Default: If neither endcolor nor endcolordef is given, the color
bgndendcolor is used as endcolor.\\
Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
Overwrites: endcolordef
\item[\present{Option: \code{endcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
Set the \carg{endcolor} parameter of gradient rules to color foo, which
is obtained by \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
Note that the two pairs of curly braces are mandatory.\\
Default: If neither endcolor nor endcolordef is given, the color
bgndendcolor is used as endcolor.\\
Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
Overwrites: endcolor
\item[\present{Option: \code{midcolor=}\carg{c}}]
Set the \carg{midcolor} parameter of double gradient rules to \carg{c}.\\
Default: If neither midcolor nor midcolordef is given, the color
bgndmidcolor is used as midcolor.\\
Used by: doublevgradient, doublehgradient\\
Overwrites: midcolordef
\item[\present{Option: \code{midcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
Set the \carg{midcolor} parameter of double gradient rules to color foo,
which is obtained by \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
Note that the two pairs of curly braces are mandatory.\\
Default: If neither midcolor nor midcolordef is given, the color
bgndmidcolor is used as midcolor.\\
Used by: doublevgradient, doublehgradient\\
Overwrites: midcolor
\item[\present{Option: \code{hpanels=}\carg{t}}]
Specifies the `direction' of panels produced. hpanels=true means the top
and bottom panel span the full width of the screen. In the space left in
the middle, the left panel, the background itself, and the right panel are
displayed. hpanels=false means the left and right panel span the full
height of the screen. In the space left in the middle, the top panel,
the background itself, and the bottom panel are
displayed.\\
Default: hpanels=true is the default for plain, hgradient and
doublehgradient. hpanels=false is the default for vgradient and
doublevgradient.\\
Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient
\item[\present{Option: \code{autopanels=}\carg{t}}]
Specifies whether the default values of the parameters toppanelheight,
bottompanelheight, leftpanelwidth, rightpanelwidth should be calculated
automatically from the contents of declared panels. The automatism used
is analogous to that of \macroname{DeclarePanel*}. Note that for panel
arrangement, both the width and the height of all declared panels are
overwritten. If you don't want this, calculate the panel parameters
yourself and set autopanels=false. In this case, the current panel
dimensions of declared panels are used as defaults for toppanelheight,
bottompanelheight, leftpanelwidth, rightpanelwidth.\\
Default: true.\\
Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient
\item[\present{Option: \code{\carg{pos}panelheight=}\carg{l}}]
Set the height/width of the space left for the top / bottom / left / right
panel to \carg{l}. Note that the remaining dimensions of panels, for
instance the width of the top panel, are always calculated automatically,
depending on the setting of the hpanels parameter.\\
Default: If a respective panel has been defined using
\macroname{DeclarePanel}, the default used depends on the setting of the
autopanels parameter. If autopanels=true, the correct dimension is
calculated from the contents of the panel. The respective one of
\macroname{toppanelheight}, \macroname{bottompanelheight},
\macroname{leftpanelwidth}, \macroname{rightpanelwidth} is overwritten
with the result. If autopanels=false, then the respective setting of
\macroname{toppanelheight}, \macroname{bottompanelheight},
\macroname{leftpanelwidth}, \macroname{rightpanelwidth} is taken as the
default. If a panel has not been declared, the appropriate one of
\macroname{bgndtoppanelheight}, \macroname{bgndbottompanelheight},
\macroname{bgndleftpanelwidth}, \macroname{bgndrightpanelwidth} is used
as default. \\
Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient
\item[\present{Option: \code{\carg{pos}panelcolor=}\carg{c}}]
Set the color of the space left for the top / bottom / left / right panel
to \carg{c}.\\
Default: The standard colors toppanelcolor, bottompanelcolor, leftpanelcolor,
rightpanelcolor are used as defaults.\\
Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient\\
Overwrites: toppanelcolordef bottompanelcolordef leftpanelcolordef
rightpanelcolordef
\item[\present{Option: \code{\carg{pos}panelcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
Set the color of the space left for the top / bottom / left / right panel
to color foo, which is obtained by
\macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
Note that the two pairs of curly braces are mandatory. \\
Default: See the description of top/bottom/left/rightpanelcolor.\\
Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient\\
Overwrites: toppanelcolor bottompanelcolor leftpanelcolor rightpanelcolor
\end{description}
\newslide
\subsection{Panel-specific user level commands}
If you're using a package that has it own panel (as
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfscreen.html}%
{\code{pdfscreen}}) don't even consider using the following.
\present{\commandapp[\carg{name}]{DeclarePanel}{\carg{pos}\}\{\carg{contents}}}
\indexmacro{DeclarePanel}
declares the contents \carg{contents} of the panel at position \carg{pos}.
Afterwards, on every page the panel contents are set in a parbox of
dimensions and position specified by \carg{pos}panelwidth,
\carg{pos}panelheight, \macroname{panelmargin} and \carg{pos}panelshift for
top and bottom panels and \carg{pos}panelraise for left and right panels. The
parbox is constructed anew on every page, so all changes influencing panel
contents or parameters (like a \macroname{thepage} in the panel contents) are
respected.
The panel contents are set in color \carg{pos}paneltextcolor. There is
another standard color \carg{pos}panelcolor, which is however not activated by
\macroname{DeclarePanel} but by selecting an appropriate background style.
Note that \macroname{backgroundstyle} must be called after the panel
declaration.
\newslide
Pages are constructed as follows: first the page background, then
the panels, and then the page contents. \emph{Hence, panels overwrite the background
and the page contents overwrite the panels.} The user is supposed to make sure
themselves that there is enough space left on the page for the panels
(document class specific settings). The panel declaration is global. A panel
can be `undeclared' by using \macroname{DeclarePanel\{\carg{pos}\}\{\}}.
If the optional argument \carg{name} is given, the panel contents and
(calculated) size will also be stored under the given name, to be restored
later with \macroname{restorepanels}. This is nice for switching between
different sets of panels.
\newslide
For an example look at the files \code{simplepanel.tex} and \code{panelexample.tex}.
A very simple example follows:
\begin{verbatim}
\DeclarePanel{left}{%
\textsf{Your Name}
\vfill
\button{\Acrobatmenu{PrevPage}}{Back}
\button{\Acrobatmenu{NextPage}}{Next} }
\end{verbatim}
\newslide
There is a starred version which will (try to) automatically calculate the
\indexmacro{DeclarePanel*} `flexible' dimension of each panel. For top and
bottom panels this is the height, for left and right panels this is the width.
Make sure the panel contents are `valid' at the time \macroname{DeclarePanel*}
is called so the calculation can be carried out in a meaningful way.
While the automatic calculation of the height of top and bottom panels is
trivial (using \macroname{settoheight}), there is a sophisticated procedure
for calculating a `good' width for the parbox containing the panel. Owing to
limitations set by TeX, there are certain limits to the sophistication of the
procedure.
\newslide
For instance, any `whatsits' (specials (like color changes), file
accesses (like \macroname{label}), or hyper anchors)
or rules which are inserted directly in the vertical list of the parbox
`block' the analysis, so the procedure can't `see' past them (starting at the
bottom of the box) when analysing the contents of the parbox.
The user should make sure such items are set in horizontal mode (by using
\macroname{leavevmode} or enclosing stuff in boxes). Furthermore, only
overfull and underfull hboxes which occur while setting the parbox are
considered when judging which width is `best'. This will reliably make the
width large enough to contain `wide' objects like tabulars, logos and buttons,
but might not give optimal results for justified text. vboxes occurring
directly in the vbox are ignored.
\newslide
Note further that hboxes with fixed width
(made by \macroname{hbox} to...) which occur directly in the vbox may disturb
the procedure, because the fixed width cannot be recovered. These hboxes will
be reformatted with the width of the vbox, generating an extremely large
badness, unsettling the calculation of maximum badness. To avoid this such
hboxes should be either contained in a vbox or set in horizontal mode with
appropriate glue at the end.
\newslide
\subsection{Navigation buttons}
The following provides only the very basics for navigation buttons. If you're
using a package that has it's own naviagtion buttons (as
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfscreen.html}%
{\code{pdfscreen}}) don't even consider using the following.
\present{\macroname{button\{\carg{navcommand}\}\{\carg{text}\}}}
\indexmacro{button}
creates a button labelled \carg{text} which executes \carg{navcommand} when
pressed. The command takes four optional arguments (left out above):
\carg{width}, \carg{height}, \carg{depth} and \carg{alignment} in that order.
\carg{navcommand} can be for instance \commandapp{Acrobatmenu}{\carg{command}} or
\commandapp{hyperlink}{\carg{target}} (note that \carg{navcommand} should take
one (more) argument specifying the sensitive area which is provided by
\macroname{button}). If given, the optional parameters \carg{width}, \carg{height}, and
\carg{depth} give the width, height and depth, respectively, of the framed
area comprising the button (excluding the shadow, but including the
frame). Default are the `real' width, height and depth, respectively, of
\carg{text}, plus allowance for the frame. If given, the optional parameter
\carg{alignment} (one of l,c,r) gives the alignment of \carg{text} inside the
button box (makes sense only if \carg{width} is given).
The button appearence is defined by some configurable button parameters:
\begin{description}
\item[\present{\macroname{buttonsep}}]
\indexmacro{buttonsep}
Space between button label and border. (Default: \macroname{fboxsep})
\item[\present{\macroname{buttonrule}}]
\indexmacro{buttonrule}
Width of button frame. (Default: \code{0pt})
\item[\present{\macroname{buttonshadowhshift}}]
\indexmacro{buttonshadowhshift}
Horizontal displacement of button shadow. (Default: 0.3\macroname{fboxsep})
\item[\present{\macroname{buttonshadowvshift}}]
\indexmacro{buttonshadowvshift}
Vertical displacement of button shadow. (Default: 0.3\macroname{fboxsep})
\end{description}
A list of predefined buttons follows:
\begin{description}
\item[\present{\macroname{backpagebutton[\carg{width}]}}]
\indexmacro{backpagebutton}
Last subpage of previous page.
\item[\present{\macroname{backstepbutton[\carg{width}]}}]
\indexmacro{backstepbutton}
Previous step.
\item[\present{\macroname{gobackbutton[\carg{width}]}}]
\indexmacro{gobackbutton}
`Undo action' (go back to whatever was before last action).
\item[\present{\macroname{nextstepbutton[\carg{width}]}}]
\indexmacro{nextstepbutton}
Next step.
\item[\present{\macroname{nextpagebutton[\carg{width}]}}]
\indexmacro{nextpagebutton}
First subpage of next page.
\item[\present{\macroname{nextfullpagebutton[\carg{width}]}}]
\indexmacro{nextfullpagebutton}
Last subpage of next page.
\item[\present{\macroname{fullscreenbutton[\carg{width}]}}]
\indexmacro{fullscreenbutton}
Toggle fullscreen mode.
\end{description}
\clearpage
\printindex
%KEEPCOMMENTS
%</docu>
%=================================================================================================================
%<*bckwrdexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Backwards writing example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Set background color to black and use slifonts.
\PassOptionsToPackage{blackbackground}{texpower}
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower backwards writing example}}
% Define \includegraphics for including an mps (metapost postscript) image.
\usepackage{graphicx}
% The mps extension isn't supported out-of-the-box for latex+dvips
\ifthenelse{\boolean{psspecialsallowed}}{%
\DeclareGraphicsExtensions{.mps}}{}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</bckwrdexample>
%<*bckwrdexample-src>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: Writing Backwards}\label{Sec:ExBackwards}
%
% The following example doesn't really demonstrate a useful application. Its purpose is twofold:
% a) Show how the functionality of \stepwise can be extended by the user by referring to the macros provided by the
% package.
% b) Show that \steps can appear in any order, and can be made to appear simultaneously in several places (and mention
% the problems this raises).
% We define a new macro \backstep which will call \step, but the steps will be executed in _reverse_ order.
% This is achieved as follows:
% * We refer to the counter totalsteps, which gives the total number of steps occurring in this argument of
% \stepwise.
% * From this, we subtract the value of the counter stepcommand, which gives the number of this \step command (in the
% order of appearance).
% * The result is compared with the counter step, which gives the number of the current step.
% (the default for `triggering' a \step is the condition \value{step}=\value{stepcommand})
%
% Note that if the ifthen Package would support this syntax, we could use the bracketed optional argument of \step (as
% in the previous example), defining \backstep like this:
%
% \newcommand{\backstep}{\step[\value{totalsteps}-\value{stepcommand}+1=\value{step}]}
%
% As \ifthenelse doesn't offer this syntax, we have to calculate \value{totalsteps}-\value{stepcommand}+1 in a separate
% counter. This doesn't fit the intended use of \step's optional argument. But hey, there is another syntax ;-)
% If the optional argument is specified with braces (...), then it can contain an arbitrary test which takes two
% arguments and selects the first if it succeeds and the second if it fails. We use this variant here.
%
\newcounter{reversestepno}%
\newcommand{\backstep}{\step(\setcounter{reversestepno}{\value{totalsteps}-\value{stepcommand}+1}\ifthenelse{\value{step}=\value{reversestepno}})}%
%
% We use the custom command \parstepwise which not only wraps the whole argument of \stepwise into a minipage (because
% otherwise vertical spacing goes haywire, don't ask me why), but also gives substance to steps.
%
% If the following \stepwise command would only contain the calls to \backstep, everything would be fine.
% But we _had_ to add something else....
% In the second part of this application of \stepwise, several steps are executed simultaneously with those executed
% backwards in the first part. This means the value of the counter totalsteps is 14, i.e. the calls to \backstep
% correspond to steps 8...14. To remedy this, we decree that the first step performed shall be number 7, by setting
% the counter firststep accordingly in the optional argument of \stepwise.
%
\parstepwise[\setcounter{firststep}{\value{totalsteps}/2+\value{firststep}}]
{%
\begin{quote}
\Huge
\backstep{Is} \backstep{now} \backstep{it}
\backstep{backwards} \backstep{write} \backstep{to}
\backstep{possible\,!}
\bigskip
% By determining explicitly the times at which the following steps are executed, we make them appear
% simultaneously with the preceding flock of \backsteps. As we have set the counter firststep to 7, we start
% counting with 8.
%
\step[\value{step}=8]{\includegraphics[width=2cm]{fig-1}}
\step[\value{step}=9]{\includegraphics[width=2cm]{fig-1}}
\step[\value{step}=10]{\includegraphics[width=2cm]{fig-1}}
\step[\value{step}=11]{\includegraphics[width=2cm]{fig-1}}
\step[\value{step}=12]{\includegraphics[width=2cm]{fig-1}}
\step[\value{step}=13]{\includegraphics[width=2cm]{fig-1}}
\step[\value{step}=14]{\includegraphics[width=2cm]{fig-1}}%
\end{quote}
}%
\newslide
%KEEPCOMMENTS
%</bckwrdexample-src>
%=================================================================================================================
%<*bgndexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Background style example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Use slifonts and a dark background.
\PassOptionsToPackage{darkbackground,colorhighlight,verbose}{texpower}
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower background style example}}
\newcommand{\skipTo}[1]{\hyperlink{#1}{\present{\textsf{\textbf{Skip animation}}}}}
\makeatletter
\newcommand{\histogram}[1]
{{%
\renewcommand{\vstripe@TP}[4]
{\rule{##2-2pt}{(##3)*\real{##1}}\hspace*{2pt}##4}%
#1%
}}
\makeatother
\newcommand{\totalbarwidth}{2cm}
\newcommand{\mkbar}[2][100]
{%
\ifthenelse{#1<#2}{\def\percentval{#1}}{\def\percentval{#2}}%
\mkfactor{\intensity}{\percentval/100}%
\colorbetween[\intensity]{ecolor}{green}{red}%
\hgradrule[\percentval]{red}{ecolor}{\totalbarwidth*\real{\intensity}}{1ex}
\textbf{\boldmath$\mathsf{\ifthenelse{\percentval<10}{\phantom{0}}{}\percentval\%}$}%
}
\renewcommand{\bgndstripes}{100}
\setlength{\fboxrule}{1pt}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</bgndexample>
%<*bgndexample-src>
%<<KEEPCOMMENTS
\centerslidestrue
\title{The \TeX Power bundle\\[2ex]{\normalfont Structured
rules, box and page backgrounds}}
\author{Stephan Lehmke\\\url{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\begin{small}
This example demonstrates \TeX Power's support for structured rules,
box and page backgrounds. The usage and parameterization of the
corresponding commands is documented in the manual. Here, we only
demonstrate the effects achievable with the parameters.
\end{small}
\pageDuration{0.01}
\parstepwise*%
{%
\multistep
{50}
{%
\mkfactor{\intensity}{(\value{substep}-1)/49}%
\colorbetween[\intensity]{stcolor}{pagecolor}{white}%
\backgroundstyle[startcolor=stcolor,endcolor=white]{vgradient}%
}%
\multistep
{3}
{%
\afterstep{\pageDuration{1}}%
\backgroundstyle[startcolor=pagecolor,endcolor=white,firstgradprogression=\value{substep}]{vgradient}%
}%
\multistep
{10}
{%
\afterstep{\pageDuration{0.01}}%
\mkfactor{\intensity}{(\value{substep}-1)/40}%
\colorbetween[\intensity]{ecolor}{pagecolor}{white}%
\backgroundstyle[startcolor=pagecolor,endcolor=ecolor,firstgradprogression=3]{vgradient}%
}%
\skipTo{eotitle}
}
\hypertarget{eotitle}{}
\stopAdvancing
\newslide
\renewcommand{\rulestripes}{100}
\newcounter{mstep}
\section{Color Gradients}
\liststepwise[\let\hidestepcontents=\hidesmartignore]
{%
\concept{Horizontal} \step{or \concept{vertical}; \concept{single}} \step{or \concept{double}.}
\step
{%
Parameters:
\begin{itemize}
\item Gradient \concept{start} {\bstep[\value{step}=13]{(and
\concept{middle})}} and \concept{end} color.
\step[\value{step}=23]{\item Number of \concept{stripes}.}
\step[\value{step}=33]{\item \concept{Midpoint} of a double
gradient.}
\step[\value{step}=43]{\item Gradient \concept{Progression}}
\step[\value{step}=56]{\par(independent for double gradients).}
\end{itemize}
}
\vfill
\steponce[\value{step}=0]{\hgradrule{red}{green}{\linewidth}{5ex}}%
\steponce[\value{step}=1]{\vgradrule{red}{green}{\linewidth}{5ex}}%
\steponce[\value{step}=2]{\dblvgradrule{red}{yellow}{green}{\linewidth}{5ex}}%
\steponce[\value{step}>2\and\value{step}<13]
{%
\skipTo{eostartend}\\
\multistep(\setcounter{mstep}{\value{substep}+2}\ifthenelse{\value{step}=\value{mstep}}){10}
{%
\mkfactor{\intensity}{(\value{substep}-1)/9}%
\colorbetween[\intensity]{scolor}{blue}{red}%
\colorbetween[\intensity]{ecolor}{yellow}{green}%
\hgradrule{scolor}{ecolor}{\linewidth}{5ex}%
\ifthenelse{\value{substep}=10}
{\hypertarget{eostartend}{}\afterstep{\stopAdvancing}}
{\afterstep{\pageDuration{0.01}}}%
}%
}%
\steponce[\value{step}>12\and\value{step}<23]
{%
\skipTo{eomidcolor}\\
\multistep(\setcounter{mstep}{\value{substep}+12}\ifthenelse{\value{step}=\value{mstep}}){10}
{%
\colorbetween{scolor}{blue}{yellow}%
\mkfactor{\intensity}{(\value{substep}-1)/9}%
\colorbetween[\intensity]{ecolor}{red}{scolor}%
\dblhgradrule{blue}{ecolor}{yellow}{\linewidth}{5ex}%
\ifthenelse{\value{substep}=10}
{\hypertarget{eomidcolor}{}\afterstep{\stopAdvancing}}
{\afterstep{\pageDuration{0.01}}}%
}%
}%
\steponce[\value{step}>22\and\value{step}<33]
{%
\skipTo{eostripes}\\
\multistep(\setcounter{mstep}{\value{substep}+22}\ifthenelse{\value{step}=\value{mstep}}){10}
{%
\histogram{\dblhgradrule[][10*\value{substep}]{red}{yellow}{green}{\linewidth}{2.5ex}}\\%
\dblhgradrule[][10*\value{substep}]{red}{yellow}{green}{\linewidth}{2.5ex}%
\ifthenelse{\value{substep}=10}
{\hypertarget{eostripes}{}\afterstep{\stopAdvancing}}
{\afterstep{\pageDuration{0.5}}}%
}%
}%
\steponce[\value{step}>32\and\value{step}<43]
{%
\skipTo{eomidpoint}\\
\multistep(\setcounter{mstep}{\value{substep}+32}\ifthenelse{\value{step}=\value{mstep}}){10}
{%
\mkfactor{\midpoint}{(\value{substep}-1)/9}%
\histogram{\dblhgradrule[\midpoint]{blue}{red}{yellow}{\linewidth}{2.5ex}}\\%
\dblhgradrule[\midpoint]{red}{yellow}{green}{\linewidth}{2.5ex}%
\ifthenelse{\value{substep}=10}
{\hypertarget{eomidpoint}{}\afterstep{\stopAdvancing}}
{\afterstep{\pageDuration{0.5}}}%
}%
}%
\steponce[\value{step}>42\and\value{step}<56]
{%
\skipTo{eofirstprog}\\
\multistep(\setcounter{mstep}{\value{substep}+42}\ifthenelse{\value{step}=\value{mstep}}){13}
{%
\renewcommand{\rulefirstgradprogression}{\value{substep}-7}%
\histogram{\hgradrule{red}{green}{\linewidth}{2.5ex}}\\%
\hgradrule{red}{green}{\linewidth}{2.5ex}%
\ifthenelse{\value{substep}=13}
{\hypertarget{eofirstprog}{}\afterstep{\stopAdvancing}}
{\afterstep{\pageDuration{0.5}}}%
}%
}%
\steponce[\value{step}>55\and\value{step}<69]
{%
\skipTo{eosecondprog}\\
\multistep(\setcounter{mstep}{\value{substep}+55}\ifthenelse{\value{step}=\value{mstep}}){13}
{%
\renewcommand{\rulefirstgradprogression}{\value{substep}-7}%
\renewcommand{\rulesecondgradprogression}{7-\value{substep}}%
\histogram{\dblhgradrule{red}{green}{red}{\linewidth}{2.5ex}}\\%
\dblhgradrule{red}{green}{red}{\linewidth}{2.5ex}%
\ifthenelse{\value{substep}=13}
{\hypertarget{eosecondprog}{}\afterstep{\stopAdvancing}}
{\afterstep{\pageDuration{0.5}}}%
}%
}%
}
\newslide
Applications of gradients:
\centerslidesfalse
\liststepwise*
{%
\begin{itemize}
\item
\begin{tabular}[t]{@{}l@{}}
As rules:\\
\skipTo{eoruledemo}
\end{tabular}
\multistep{72}
{%
\present
{%
\small\renewcommand{\arraystretch}{.9}%
\begin{tabular}{rp{\totalbarwidth+2em}}
\multicolumn{2}{c}{\textbf{Compression rates}}\\[2ex]
\code{compress} & \mkbar[\thesubstep]{51}\\
\code{gzip -1} & \mkbar[\thesubstep]{62}\\
\code{gzip -9} & \mkbar[\thesubstep]{66}\\
\code{bzip2 -1} & \mkbar[\thesubstep]{65}\\
\code{bzip2 -9} & \mkbar[\thesubstep]{73}
\end{tabular}%
}%
\afterstep{\pageDuration{0.01}}%
}%
\step
{%
\present
{%
\small\renewcommand{\arraystretch}{.9}%
\begin{tabular}{rp{\totalbarwidth+2em}}
\multicolumn{2}{c}{\textbf{Compression rates}}\\[2ex]
\code{compress} & \mkbar{51}\\
\code{gzip -1} & \mkbar{62}\\
\code{gzip -9} & \mkbar{66}\\
\code{bzip2 -1} & \mkbar{65}\\
\code{bzip2 -9} & \mkbar{73}
\end{tabular}%
}%
\ifthenelse{\boolean{firstactivation}}{\AtShipout{\hypertarget{eoruledemo}{}}\afterstep{\stopAdvancing}}{}%
}%
\step
{%
\item
\begin{tabular}[t]{@{}l@{}}
As box backgrounds:\\
\skipTo{eoboxdemo}
\end{tabular}
\afterstep{\pageDuration{0.01}}%
\multistep{10}
{%
\mkfactor{\intensity}{(\value{substep}-1)/9}%
\colorbetween[\intensity]{ecolor}{green}{blue}%
\colorbetween[\intensity]{scolor}{yellow}{green}%
\colorbetween{mcolor}{scolor}{ecolor}%
\complementcolor{tcolor}{mcolor}%
\raisebox{-.5\height}{\hgradbox{scolor}{ecolor}{\Huge\textsf{\textbf{\mbox{{\textcolor{tcolor}{Groovy!}}}}}}}%
}%
\multistep{10}
{%
\mkfactor{\intensity}{(\value{substep}-1)/9}%
\colorbetween[\intensity]{ecolor}{yellow}{green}%
\colorbetween[\intensity]{scolor}{red}{yellow}%
\colorbetween{mcolor}{scolor}{ecolor}%
\complementcolor{tcolor}{mcolor}%
\raisebox{-.5\height}{\hgradbox{scolor}{ecolor}{\Huge\textsf{\textbf{\textcolor{tcolor}{Groovy!}}}}}%
}%
\multistep{10}
{%
\mkfactor{\intensity}{(\value{substep}-1)/9}%
\colorbetween[\intensity]{ecolor}{red}{yellow}%
\colorbetween[\intensity]{scolor}{blue}{red}%
\colorbetween{mcolor}{scolor}{ecolor}%
\complementcolor{tcolor}{mcolor}%
\raisebox{-.5\height}{\hgradbox{scolor}{ecolor}{\Huge\textsf{\textbf{\textcolor{tcolor}{Groovy!}}}}}%
}%
\multistep{10}
{%
\mkfactor{\intensity}{(\value{substep}-1)/9}%
\colorbetween[\intensity]{ecolor}{blue}{red}%
\colorbetween[\intensity]{scolor}{green}{blue}%
\colorbetween{mcolor}{scolor}{ecolor}%
\complementcolor{tcolor}{mcolor}%
\raisebox{-.5\height}{\hgradbox{scolor}{ecolor}{\Huge\textsf{\textbf{\textcolor{tcolor}{Groovy!}}}}}%
}%
\step
{%
\colorbetween{mcolor}{green}{blue}%
\complementcolor{tcolor}{mcolor}%
\raisebox{-.5\height}{\hgradbox{green}{blue}{\Huge\textsf{\textbf{\textcolor{tcolor}{Groovy!}}}}}%
\ifthenelse{\boolean{firstactivation}}{\AtShipout{\hypertarget{eoboxdemo}{}}\afterstep{\stopAdvancing}}{}%
}%
}
\step
{%
\item As page backgrounds. \skipTo{eobgnddemo}
\colorbetween[.22]{ecolor}{pagecolor}{white}%
\afterstep{\pageDuration{0.01}}%
\multistep{20}
{%
\backgroundstyle
[%
startcolor=pagecolor,endcolor=ecolor,firstgradprogression=3,
rightpanelwidth=\TPpagewidth*\real{.025}*\value{substep},rightpanelcolor=pagecolor,
leftpanelwidth=\TPpagewidth*\real{.025}*\value{substep},leftpanelcolor=pagecolor,
toppanelheight=\TPpageheight*\real{.025}*\value{substep},toppanelcolor=pagecolor,
bottompanelheight=\TPpageheight*\real{.025}*\value{substep},bottompanelcolor=pagecolor%
]{vgradient}%
}%
\multistep{20}
{%
\backgroundstyle
[%
startcolordef={rgb}{0.4,0,0},endcolordef={rgb}{0,0.4,0},firstgradprogression=3,
rightpanelwidth=\TPpagewidth*\real{.025}*(20-\value{substep}),rightpanelcolor=pagecolor,
leftpanelwidth=\TPpagewidth*\real{.025}*(20-\value{substep}),leftpanelcolor=pagecolor,
toppanelheight=\TPpageheight*\real{.025}*(20-\value{substep}),toppanelcolor=pagecolor,
bottompanelheight=\TPpageheight*\real{.025}*(20-\value{substep}),bottompanelcolor=pagecolor%
]{vgradient}%
}%
}
\end{itemize}
}
\hypertarget{eobgnddemo}{}
\end{slide}
\begin{slide}[\slidewidth-40mm,\slideheight-40mm]
\renewcommand{\sliderightmargin}{45mm}%
\renewcommand{\slidetopmargin}{25mm}%
\renewcommand{\slidebottommargin}{25mm}%
\colorbetween[.22]{ecolor}{pagecolor}{white}%
\backgroundstyle[startcolor=pagecolor,endcolor=ecolor,firstgradprogression=3]{vgradient}%
\liststepwise
{%
Special parameters for page backgrounds:
\begin{itemize}
\item Leave space for panels, headers and footers.\\
\skipTo{eopaneldemo}
\afterstep{\pageDuration{0.01}}%
\multistep{20}
{%
\backgroundstyle
[%
startcolor=pagecolor,endcolor=ecolor,firstgradprogression=3,
toppanelheight=.1\semcm*\value{substep},toppanelcolor=black,
bottompanelheight=.1\semcm*\value{substep}%
]{vgradient}%
}%
\multistep{20}
{%
\backgroundstyle
[%
startcolor=pagecolor,endcolor=ecolor,firstgradprogression=3,
rightpanelwidth=.2\semcm*\value{substep},rightpanelcolordef={rgb}{0,0.4,0.6},
toppanelheight=2\semcm,toppanelcolor=black,
bottompanelheight=2\semcm%
]{vgradient}%
}%
\end{itemize}
}
\hypertarget{eopaneldemo}{}
%KEEPCOMMENTS
%</bgndexample-src>
%=================================================================================================================
%<*divexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Divisibility example (demonstrating \step's optional arguments) for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% We input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower divisibility example}}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
% As the sectioning in the example files starts with \subsection, we `grade down' the sectioning commands.
\let\subsubsection\subsection
\let\subsection\section
%KEEPCOMMENTS
%</divexample>
%<*divexample-src>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: Fooling Around}\label{Sec:ExFooling}
% The following example is just to show that a lot of fancy things are possible by appropriately defining the diverse
% `hooks' offererd by \stepwise.
`Tweaking' the hooks a little allows some truly bizarre applications\dots
% In the following \stepwise command, \activatestep will be set to \textbf. This means the `first' occurrence of a number
% is wider (because bf is an extended font) than all other occurrences of it. To avoid glitches in line breaks, all
% other occurrences of numbers (visible and invisible) need to be of the same width. Hence we define new versions of
% \displaystepcontents and \hidestepcontents.
\def\mydisplay#1{\makebox[\widthof{\textbf{#1}}]{#1}}
\def\myhide#1{\phantom{\makebox[\widthof{\textbf{#1}}]{#1}}}
\newcounter{modulo}
\newcounter{i}
% Finally, we define a custom \step command which sets the optional arguments of \step.
% We already have introduced the first optional argument, which determines when a \step is activated for the first
% time. Here, this one is left at its default value (\value{step}=\value{stepcommand}).
% Here, we also use the second optional argument, which has the same syntax as the first one (i.e. it can be surrounded
% either by square brackets or braces), but determines when a \step is active _at all_ (i.e. whether
% \displaystepcontents or \hidestepcontents is used). The default is the internal check \if@first@TP@true, which determines
% whether step number \value{stepcommand} has already been activated for the first time (this is saved internally for
% every step). Now, we redefine this condition to be fulfilled whenever the value of the counter step is divisible by
% the value of the counter stepcommand.
\def\mystep{\step[](\setcounter{modulo}{\value{step}/\value{stepcommand}*\value{stepcommand}}\ifthenelse{\value{step}=\value{modulo}})}%
% By setting the page duration to 0.5 seconds, we make the following sequence of slides appear automatically one by one,
% one every half second.
\pageDuration{0.5}
%
% We use the custom command \parstepwise which not only wraps the whole argument of \stepwise into a minipage (because
% otherwise vertical spacing goes haywire, don't ask me why), but also gives substance to steps. We use the starred
% version of this command so that the number 1 appears on the first slide generated by \parstepwise.
%
% \activatestep is set to \textbf to emphasize the number the divisors of which are displayed.
\parstepwise*[\let\activatestep=\textbf\let\displaystepcontents=\mydisplay\let\hidestepcontents=\myhide]
{%
\huge
\setcounter{i}{0}%
Divisibility demo:
% We just have to generate the appropriate number of \mystep commands which display `their' numbers.
\whiledo{\value{i}<40}{\stepcounter{i}\mystep{\arabic{i}} }%
}
% Stop automatic advancing of pages.
\stopAdvancing
%KEEPCOMMENTS
%</divexample-src>
%=================================================================================================================
%<*fancyexample>
%<<KEEPCOMMENTS
\documentclass[KOMA,letterpaper,landscape,display,calcdimensions]{powersem}
\usepackage{graphicx}
\usepackage{soul}
\usepackage{palatino}
\usepackage[ps2pdf,pdfpagemode={FullScreen}]{hyperref}
\usepackage{fixseminar}
\usepackage[whitebackground]{texpower}
\slidesmag{5}
\slideframe{none}
\pagestyle{empty}
\renewcommand{\slideleftmargin}{2cm}
\renewcommand{\sliderightmargin}{2cm}
\renewcommand{\slidetopmargin}{2cm}
\renewcommand{\slidebottommargin}{2cm}
\newcounter{nosteps}
\setcounter{nosteps}{10} % Controls the "resolution" - a value of 100 gives a *very* long compilation time.
\newcounter{mycount}
\makeatletter
\DeclareRobustCommand*\appearI[1]
{%
\SOUL@setup
\def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token\SOUL@setkern\SOUL@charkern}]{\scalebox{#1}{\the\SOUL@token\SOUL@setkern\SOUL@charkern}}}%
\SOUL@%
}%
\DeclareRobustCommand*\appearII[1]
{%
\SOUL@setup
\def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token\SOUL@setkern\SOUL@charkern}*\real{#1}]{\the\SOUL@token\SOUL@setkern\SOUL@charkern}}%
\SOUL@%
}%
\DeclareRobustCommand*\appearIII[1]
{%
\SOUL@setup
\def\SOUL@everyspace{\rule{.3em}{\fboxrule}}%
\def\SOUL@everysyllable{\the\SOUL@syllable\SOUL@setkern\SOUL@charkern\rule{#1}{\fboxrule}}%
\SOUL@%
}%
\DeclareRobustCommand*\appearIV[1]
{%
\SOUL@setup
\def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token\SOUL@setkern\SOUL@charkern}+2em-2em*\real{#1}]{\scalebox{#1}{\setcounter{mycount}{\value{nosteps}*4-\value{nosteps}*4*\real{#1}}\rotatebox[origin=c]{\themycount}{\the\SOUL@token\SOUL@setkern\SOUL@charkern}}}}%
\SOUL@%
}%
\makeatother
\begin{document}
\begin{slide}
\pageDuration{1}%
\stepwise
{%
\begin{center}
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\makebox[0pt]
{\rule{2\textwidth-2\textwidth/\value{nosteps}*\value{substep}}{0pt}`Twas brillig, and the slithy toves}%
}
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{\value{substep}/\value{nosteps}}%
\scalebox{\mag}{Did gyre and gimble in the wabe:}%
}
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{5*(\value{nosteps}-\value{substep})/\value{nosteps}+1pt}%
\makebox[0pt]{\scalebox{\mag}[1]{All mimsy were the borogoves,}}%
}
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{\value{substep}/\value{nosteps}}%
\colorbetween[\mag]{mycolor}{textcolor}{pagecolor}
\textcolor{mycolor}{And the mome raths outgrabe.}%
}
\medskip
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{\value{substep}/\value{nosteps}}%
\appearI{\mag}{"Beware the Jabberwock, my son!}%
}
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{\value{substep}/\value{nosteps}}%
\appearII{\mag}{The jaws that bite, the claws that catch!}%
}
\movie{\value{nosteps}}{0.01}[\pageDuration{0.01}]
{%
\makebox[0pt]{\appearIII{(\thenosteps pt-\thesubstep pt)*\real{1.5}}{Beware the Jubjub bird, and shun}}%
}%
%
\step{\afterstep{\pageDuration{1}}Beware the Jubjub bird, and shun}
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{\value{substep}/\value{nosteps}}%
\setcounter{mycount}{2*(\value{nosteps}-\value{substep})}%
\strut\rotatebox[origin=c]{\themycount}{\makebox[0pt]{\smash{\scalebox{\mag}{The frumious Bandersnatch!"}}}}%
}
\medskip
\movie*{\value{nosteps}}{0.01}[\pageDuration{1}]
{%
\mkfactor{\mag}{\value{substep}/\value{nosteps}}%
\hspace*{\fill}%
\emph
{%
\rlap
{%
\makebox[\widthof{Lewis Carroll}]
{\rule{5cm-5cm/\value{nosteps}*\value{substep}}{0pt}\strut\raisebox{1cm-1cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}}%
}%
\rlap
{%
\makebox[\widthof{Lewis Carroll}]
{\strut\raisebox{1.5cm-1.5cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}\rule{4cm-4cm/\value{nosteps}*\value{substep}}{0pt}}%
}%
\rlap
{%
\makebox[\widthof{Lewis Carroll}]
{\rule{3cm-3cm/\value{nosteps}*\value{substep}}{0pt}\strut\raisebox{-.5cm+.5cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}}%
}%
\makebox[\widthof{Lewis Carroll}]
{\strut\raisebox{-1cm+1cm/\value{nosteps}*\value{substep}}[0pt][0pt]{\appearIV{\mag}{Lewis Carroll}}\rule{6cm-6cm/\value{nosteps}*\value{substep}}{0pt}}%
}%
}
\end{center}
}
\end{slide}
\end{document}
%KEEPCOMMENTS
%</fancyexample>
%=================================================================================================================
%<*foilsdemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the foils class with the dynamic features provided by the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[landscape]{foils}
% foils understands the landscape option, but to get it through to pdflatex, we need to set \pdfpageheight etc. The
% package fixseminar does this.
\usepackage{fixseminar}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
%
\usepackage[display]{texpower}
\begin{document}
\title{The \code{texpower} Package\\{\normalfont \texttt{foils} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\foilhead{A list environment}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\foilhead{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\foilhead{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\foilhead{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.6cm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{document}
%KEEPCOMMENTS
%</foilsdemo>
%=================================================================================================================
%<*hilitexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Highlighting example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Use slifonts.
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower highlighting example}}
% The package soul is needed for \highlighttext to work.
\usepackage{soul}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</hilitexample>
%<*hilitexample-src>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: Highlighting Text}\label{Sec:Exhl}
% The default for \step's which are not yet `active' is to be `invisible'. In preceding examples, we have redefined
% internal macros like \hidestepcontents or \activatestep to achieve special `highlighting' effects.
% Here, we demonstrate how make text `stand out' from the background incrementally without having it appear from thin
% air.
% The first example demonstrates how to make \step its argument `stand out' instead of making it appear `out of
% nowhere'.
\makeatletter
\ifthenelse{\boolean{TPcolor}}% Can we use colors?
{% Yes. In this case \step should change colors from `dimmed' to `active'.
% The command \hidedimmed switches colors to `dimmed', the command \highlightenhanced switches colors to `enhanced'.
\liststepwise[\let\hidestepcontents=\hidedimmed\let\activatestep=\highlightenhanced]
{%
\vspace*{\fill}
\begin{quote}
\Large%
\step{Instead of making things appear out of `thin air',} \step{we can also make them appear `out of the
background'} \step{by incrementally changing color from \concept{inactive}} \step{to \concept{active}.}
\step{This also works with \emph{color emphasis}} \step{and \concept{math coloring}: $a=b^2$.}
\end{quote}
\vspace*{\fill}\vspace*{\fill}
}%
}
{% No. In this case we have to `handwave' using the soul package.
% Instead of hiding its argument, the new command \myhide just changes the font size (maintaining the overall text
% length though).
\def\myhide
{%
\leavevmode%
\SOUL@setup
\def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token}][s]{\rule[\depthof{\the\SOUL@token}*-1]{0pt}{\depthof{\the\SOUL@token}+\heightof{\the\SOUL@token}}\hrulefill\tiny\the\SOUL@token\hrulefill}\SOUL@setkern\SOUL@charkern}%
\SOUL@%
}
\liststepwise[\let\hidestepcontents=\myhide\setcounter{firststep}{0}]
{%
\vspace*{\fill}
\begin{quote}
\LARGE%
\step{Instead of making things appear out of `thin air',} \step{we can also make them appear `out of the
background'} \step{incrementally.}
\end{quote}
\vspace*{\fill}\vspace*{\fill}
}%
}
\makeatother
\newslide
% Next, it is demonstrated how we can `flip through' an itemize environment by just highlighting the items in turn
% instead of making them appear one by one.
%
% Define a macro \mystep which implements the highlighting effect.
\ifthenelse{\boolean{TPcolor}}% Can we use colors?
{% Yes. In this case highlighting is implemented by switching color.
\def\mystep% Note that \mystep takes no argument. It just changes the way the next item is displayed.
{%
\usecolorset{stwcolors}% Restore the undimmed colors valid at the beginning of \stepwise.
\dstep[][\boolean{firstactivation}]% \dstep switches colors. The optional argument makes it appear only once.
}%
}
{% No. In this case highlighting is implemented by redefining \labelitemi.
\def\mystep
{%
\switch[][\boolean{firstactivation}]% The optional arguments make \switch act only once.
{\def\labelitemi{\origmath{\gg}}}{\def\labelitemi{\origmath{\cdot}}}%
}%
}
% We define a custom itemize environment which automatically adds calls to \mystep:
\newenvironment{stepitemize}
{%
\huge
\begin{itemize}
\let\origitem=\item
% Here, the \mystep command is hidden inside \item
\renewcommand{\item}{\mystep\origitem}%
}
{%
\end{itemize}
}
Instead of displaying incrementally, we can just `flip through' some items by highlighting them:
% Note that we use the starred version of \liststepwise so that the first item is highlighted on the first slide
% produced by \liststepwise.
%
\liststepwise*
{%
\begin{stepitemize}
\item Item 1
\item Item 2
\item Item 3
\end{stepitemize}
}
\pause
% The following example demonstrates highlighting inside a paragraph using \highlighttext. By redefining \activatestep
% to \highlighttext, the argument of every \step will be highlighted when the \step is activated for the first
% time. Note that highlighting doesn't influence line breaks because \highlighttext is implemented using the soul
% package.
%
% Again, we define \hidestepcontents to display its argument, so that the complete text is visible from the outset.
\stepwise[\let\activatestep=\highlighttext\let\hidestepcontents=\displayidentical]
{%
\vspace*{\fill}
\begin{minipage}{\linewidth}
\LARGE
\step{Inside} a paragraph, we can \step{highlight} text \step{without influencing} \step{line breaks}.
\end{minipage}
\vspace*{\fill}
}
\newslide
%KEEPCOMMENTS
%</hilitexample-src>
%=================================================================================================================
%<*ifmslidemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the ifmslide package with the dynamic features provided by the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[KOMA,landscape,display]{powersem}
\usepackage[stmo,button]{ifmslide}
\slidepagestyle{sidebar}
\centerslidesfalse
\hypersetup{linkcolor=red}
\pagestyle{plain}
\panellogo{fig-2}
\renewcommand{\currentpagevalue}{\value{slide}}
\begin{document}
\begin{slide}
\title{The \code{texpower} Package\\{\normalfont \texttt{ifmslide} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\tableofcontents
\end{slide}
\begin{slide}
\section{A list environment}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\section{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\section{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\section{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.5\semcm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{slide}
\end{document}
%KEEPCOMMENTS
%</ifmslidemo>
%=================================================================================================================
%<*mathexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Math example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Enable all color emphasis and highlighting options. Use white background and slifonts.
\PassOptionsToPackage{coloremph,colormath,colorhighlight,whitebackground}{texpower}
% Input the generic preamble.
\input{__TPpreamble}
\usepackage{tpslifonts}
\hypersetup{pdftitle={texpower math example}}
%-----------------------------------------------------------------------------------------------------------------
% Packages and Preamble settings individual for this example.
% We write some aligned equations.
\usepackage{amsmath}
% Make nested braces grow.
\delimitershortfall-1sp
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</mathexample>
%<*mathexample-src>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: An Aligned Equation}\label{Sec:ExEq}
% In the following, an aligned system of equations is built incrementally. We use the custom command \liststepwise to
% avoid glitches in vertical spacing.
%
\liststepwise%
{%
%
% This is just for compressing the equations so they can be squeezed on one slide.
%
\fontsize{7.8pt}{9pt}\selectfont
\renewcommand{\arraystretch}{0}%
\setlength{\arraycolsep}{0pt}%
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
%
% \highlightboxed will be used for underlaying some formulas with color. To minimize overlap, the width of the outer
% frame is reduced.
\setlength{\highlightboxsep}{1pt}%
%
\begin{align*}
\lefteqn
{%
\min
\left(
% The nested braces are filled `from outer to inner'. This means nesting a lot of steps inside each other...
% The outermost brace is displayed from the outset.
% The first step (which follows right here) displays the next inner brace (the first argument of \min), filled
% with an almost `empty' array (apart from one comma and some dots).
% \bstep is used to get appropriate white space when the step is not yet active.
\bstep
{\max
\left(
\begin{array}{l}
% The next two steps fill in the lines of the array.
\bstep{\min\left(F'(x),\min\left(F_1(x),G_1(y)\right)\right)},\\[-2ex]
\vdots\\
\bstep{\min\left(F'(x),\min\left(F_n(x),G_n(y)\right)\right)}
\end{array}
\right)
},
% After the first brace is filled, the next step provides the second argument of \min.
\bstep{\min\left(G_i(y),H_i(z)\right)}
\right)
}
&
% The next couple of steps will create the remaining lines of the aligned equations. These need to be
% insubstantial (as is the default for \liststepwise), because & can't go in a box.
% As a consequence, the horizontal alignment cannot kick in until the last step is performed. This would make the
% alignment `flicker' sidewise.
% So we have to bite the bullet and duplicate the widest entry here (invisibly), so that the horizontal alignment
% is constant during all steps. *sigh*
\phantom
{%
{}=
\min
\left(
F'(x),
\min
\left(
\max
\left(
\begin{array}{l}
\min\left(F_1(x),\min\left(G_1(y),G_i(y)\right)\right),\\[-1.5ex]
\vdots\\[-.5ex]
\min\left(F_n(x),\min\left(G_n(y),G_i(y)\right)\right)
\end{array}
\right),
H_i(z)
\right)
\right)
}
% The next step displays two lines at a time, but incompletely, i.e. some parts are missing (which are inside
% nested calls of \bstep).
% This way, it is demonstrated how the arguments of the nested \min's are reordered.
\step
{%
\\
&=
\max
\left(
% The macro \activatestep is used by \stepwise to `wrap' the argument of a \bstep command at the _first_ time
% it appears.
% Usually, it does nothing. Now, we redefine it to highlight its background, so it is easier to spot the
% places where the additional arguments were inserted.
\let\activatestep\highlightboxed
\begin{array}{l}
\min
\left(
% The inner \bstep's display the missing arguments, which are completely identical in both lines.
% It is intended that all the missing arguments appear at the same time, so \rebstep is used for the
% remaining arguments which have been left out.
\min\left(\bstep{F'(x)},\min\left(\rebstep{F_1(x),G_1(y)}\right)\right),\min\left(G_i(y),H_i(z)\right)
\right),\\[-2ex]
\vdots\\[-1ex]
\min
\left(
\min\left(\rebstep{F'(x)},\min\left(\rebstep{F_n(x),G_n(y)}\right)\right),\min\left(G_i(y),H_i(z)\right)
\right)
\end{array}
\right)
\\
&=
\max
\left(
\let\activatestep\highlightboxed
\begin{array}{l}
\min
\left(
\min\left(
% Here are the remaining arguments of \min which are all to be displayed in one step (together with
% those from the previous line).
\rebstep{F'(x)},\min\left(\rebstep{F_1(x)},\min\left(\rebstep{G_1(y)},G_i(y)\right)\right)
\right),
H_i(z)
\right),\\[-2.5ex]
\vdots\\[-1.5ex]
\min
\left(
\min\left(
\rebstep{F'(x)},\min\left(\rebstep{F_n(x)},\min\left(\rebstep{G_n(y)},G_i(y)\right)\right)
\right),
H_i(z)
\right)
\end{array}
\right)
}
\step
{%
\\
&=
\min
\left(
F'(x),
\min
\left(
\max
\left(
\begin{array}{l}
\min\left(F_1(x),\min\left(G_1(y),G_i(y)\right)\right),\\[-1.5ex]
\vdots\\[-.5ex]
\min\left(F_n(x),\min\left(G_n(y),G_i(y)\right)\right)
\end{array}
\right),
H_i(z)
\right)
\right)
}
\end{align*}
}%
\newslide
%KEEPCOMMENTS
%</mathexample-src>
%=================================================================================================================
%<*panelexample>
%<<KEEPCOMMENTS
%------------------------------------------------------------------------------
%
% Example for the panel facilities of TeXPower.
%
%------------------------------------------------------------------------------
% Enable all color emphasis and highlighting options. Use white
% background and slifonts.
\PassOptionsToPackage{coloremph,colormath,colorhighlight,whitebackground}
{texpower}
% Input the generic preamble.
\input{__TPpreamble}
\usepackage{tpslifonts}
\hypersetup{pdftitle={texpower panel example}}
%------------------------------------------------------------------------------
% Settings individual for this example.
\renewcommand{\buttonsep}{2pt}
\renewcommand{\buttonshadowhshift}{1pt}
\renewcommand{\buttonshadowvshift}{-1pt}
\usepackage{graphicx}
% The mps extension isn't supported out-of-the-box for latex+dvips
\ifthenelse{\boolean{psspecialsallowed}}{%
\DeclareGraphicsExtensions{.mps}}{}
\newcounter{typed}
\makeatletter
\newcommand{\storehead}[3]
{%
\global\let\@typed=\empty
\setcounter{typed}{0}%
\def\@typeto{#2}%
\let\type@next=\@typeit
\type@next#3\@nil
\global\let#1=\@typed
}
\newcommand{\@typeit}[1]
{%
\ifx\@nil#1
\else
\stepcounter{typed}%
\ifthenelse{\value{typed}>\@typeto}
{\let\type@next=\@gobbletail}
{\g@addto@macro\@typed{#1}}%
\expandafter\type@next
\fi
}
\long\def\@gobbletail#1\@nil{}
\newcounter{i}
\newsavebox\logobox
\newsavebox\hookbox
\makeatother
\mklength{\slidetopmargin}{\ht\logobox*\ratio{1cm}{\semcm}}
\newlength{\buttonwidth}
\newcommand{\mybutton}[2]
{\raisebox{\depth}{\makebox[\buttonwidth][l]{\button[\buttonwidth]{#1}{#2}}}}
\slidesonlyfalse\notestrue\noxcomment
\begin{document}
% Because the Context Support Macros are loaded at BeginDocument
\savebox\hookbox{\includegraphics[width=1cm]{fig-2}}
\makeatletter
\savebox\logobox{\includegraphics[width=\strip@pt\paperwidth truept]{fig-3}}
\makeatother
\savebox\logobox{\raisebox{0cm}[\height-2ex][0pt]{\rlap{\usebox{\logobox}}}}
\pageDuration{0.01}
\begingroup
\loop
\ifnum\value{i}<76
\stepcounter{i}%
\storehead{\partialtext}{\value{i}}
{%
Panels\space automatically\space adapt\space to\space the\space
size\space of\space their\space contents.\par
They\space can\space be\space placed
}%
\DeclarePanel{left}
{%
\leavevmode\scriptsize
\mbox{\usebox{\logobox}}
{\bfseries Stephan Lehmke
Lehr\-stuhl Informatik~I}
\vfill
\nointerlineskip
\rule{\linewidth}{\fboxrule}
\nointerlineskip\kern1ex
\partialtext
\nointerlineskip\kern1ex
\rule{\linewidth}{\fboxrule}
\vfill
\ifthenelse{\lengthtest{\linewidth>2cm}}
{\setlength{\buttonwidth}{.5\linewidth-.5ex}}
{\setlength{\buttonwidth}{\linewidth}}%
%
\lineskip1ex\relax
%
\mybutton{\Acrobatmenu{FirstPage}}{Start}\hfill
\mybutton{\Acrobatmenu{LastPage}}{End}\hfill
\mybutton{\Acrobatmenu{PrevPage}}{Prev}\hfill
\mybutton{\Acrobatmenu{NextPage}}{Next}
\mbox{\usebox{\hookbox}}
}%
\backgroundstyle{plain}
\mklength{\slideleftmargin}{\leftpanelwidth*\ratio{1cm}{\semcm}+.5cm}
\setlength{\slidewidth}{\paperwidth-\slideleftmargin-\sliderightmargin}
\begin{slide}
\makeslidetitle{\TeX Power Example: panels}
\end{slide}
\repeat
\endgroup
\DeclarePanel*{left}{}
\setcounter{i}{0}
\setlength{\buttonwidth}{1.5cm}
\DeclarePanel*{bottom}
{%
\leavevmode\scriptsize\smash{\usebox{\hookbox}}\hfill%
\mybutton{\Acrobatmenu{FirstPage}}{Start}~%
\mybutton{\Acrobatmenu{LastPage}}{End}~%
\mybutton{\Acrobatmenu{PrevPage}}{Prev}~%
\mybutton{\Acrobatmenu{NextPage}}{Next}%
}
\mklength{\slidebottommargin}{\bottompanelheight*\ratio{1cm}{\semcm}+.5cm}
\begingroup
\loop
\ifnum\value{i}<24
\stepcounter{i}%
\storehead{\partialtext}{\value{i}}
{%
on\space any\space side\space of\space the\space page.
}%
\DeclarePanel{top}
{%
\leavevmode\scriptsize\parskip0pt\relax
\mbox{\usebox{\logobox}}
\medskip
\parbox[t]{\widthof{\bfseries Lehrstuhl Informatik~I}}
{\bfseries Stephan Lehmke\\ Lehrstuhl Informatik~I}\quad
\parbox[t]{\linewidth-\widthof{\bfseries Lehrstuhl Informatik~I}-3cm}
{%
Panels\space automatically\space adapt\space to\space the\space
size\space of\space their\space contents.\par
They\space can\space be\space placed
\partialtext
}
}%
\backgroundstyle{plain}
\mklength{\slidetopmargin}{\toppanelheight*\ratio{1cm}{\semcm}+.5cm}
\setlength{\slideheight}{\paperheight-\slidetopmargin-\slidebottommargin}
\begin{slide}
\small\makeslidetitle{\TeX Power Example: panels}
\end{slide}
\repeat
\endgroup
\DeclarePanel*{top}{}
\setlength{\slideheight}{\paperheight-\slidetopmargin-\slidebottommargin}
\setcounter{i}{0}
\makeatletter
\savebox\logobox
{%
\raisebox{0cm}[\height-1.5ex][0pt]
{\llap{\includegraphics[width=\strip@pt\paperwidth truept-1cm]{fig-3}}}%
}
\makeatother
\mklength{\slidetopmargin}{\ht\logobox*\ratio{1cm}{\semcm}}
\begingroup
\loop
\ifnum\value{i}<146
\stepcounter{i}%
\storehead{\partialtext}{\value{i}}
{%
Normally,\space automatic\space line\space breaks\space are\space
not\space needed\space inside\space panels,\space but\space
it\space is\space nice\space that\space the\space size\space
automatically\space adapts\space to\space the\space size\space
of\space logos,\space buttons\space etc.
}%
\DeclarePanel{right}
{%
\leavevmode\scriptsize
\hspace*{\fill}\mbox{\usebox{\logobox}}\hspace*{-1.5ex}
\medskip
{\bfseries Stephan Lehmke
Lehr\-stuhl Informatik~I}
\vfill
\nointerlineskip
\rule{\linewidth}{\fboxrule}
\nointerlineskip\kern1ex
Panels\space automatically\space adapt\space to\space the\space
size\space of\space their\space contents.\par
They\space can\space be\space placed on\space any\space side\space
of\space the\space page.
\partialtext
}%
\backgroundstyle[hpanels=false]{plain}
\mklength{\sliderightmargin}{\rightpanelwidth*\ratio{1cm}{\semcm}+.5cm}
\setlength{\slidewidth}{\paperwidth-\slideleftmargin-\sliderightmargin}
\begin{slide}
\makeslidetitle{\TeX Power Example: panels}
\end{slide}
\repeat
\endgroup
\hypersetup{pdfpageduration={}}
\end{document}
%KEEPCOMMENTS
%</panelexample>
%=================================================================================================================
%<*parexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Paragraph example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Use slifonts.
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower paragraph example}}
\usepackage{soul}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</parexample>
%<*parexample-src>
%<<KEEPCOMMENTS
%
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: Inside A Paragraph}\label{Sec:ExPar}
%
% We show that \stepwise can be used for highlighting words within a paragraph.
% Furthermore, it is demonstrated how the order in which \step's are executed can be changed.
%
% We define a `placeholder' which will mark the place of missing words (instead of \displayphantom).
%
\newcommand{\placeholder}[1]{\leavevmode\phantom{#1}\llap{\rule{\widthof{\phantom{#1}}}{\fboxrule}}}%
%
% We use the custom command \parstepwise which not only wraps the whole argument of \stepwise into a minipage (because
% otherwise vertical spacing goes haywire, don't ask me why), but also gives substance to steps.
%
% All variants of \stepwise take an optional argument the contents of which are executed inside a group before the
% inner loop of starts. It can be used to set parameters locally.
% Here, we redefine \activatestep (which has been explained in the equation example) to highlight the first
% appearance of any word.
% \hidestepcontents is used as a `wrapper' for those arguments of \step which should not appear yet. It either
% displays nothing (this is the default for \stepwise and \liststepwise) or puts its argument into a \phantom
% (the default for \parstepwise); this behaviour is also toggled by \boxedsteps and \nonboxedsteps.
% Here, we redefine it to use our selfdefined \placeholder to mark `missing' words.
%
\parstepwise[\let\hidestepcontents=\placeholder\let\activatestep=\highlightboxed]%
{%
\begin{quote}
\Huge We can \step{create} a \step{fill-in-the-blanks}
%
% \step takes an optional argument with which it can be specified _when_ its argument is to appear. This is
% expressed in \ifthenelse syntax (see the documentation of the ifthen package).
% Here, we refer to the counter step which is advanced by \stepwise and contains the number of the current step.
% This way, steps can be made to appear in any order.
\step[\value{step}=5]{text} which is then
\step[\value{step}=4]{filled} in in
\step[\value{step}=3]{\textbf{any}} order!
\end{quote}
}%
\newslide
% The \hidetext command hides its argument while respecting automatic line breaks and such. The command needs the soul
% package to work. Read the documentation of soul for restrictions as to what can go in the argument of \hidetext.
\stepwise[\let\hidestepcontents=\hidetext\let\activatestep=\highlighttext]
{%
\vspace*{\fill}
\begin{minipage}{\linewidth}
\begin{quote}
\Huge We can step through a \step{paragraph} of \step{free text}
\step{without disturbing} line breaks!
\end{quote}
\end{minipage}
\vspace*{\fill}\vspace*{\fill}
}
\newslide
%KEEPCOMMENTS
%</parexample-src>
%=================================================================================================================
%<*pdfscrdemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the pdfscreen package with the dynamic features provided by the package
% texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[12pt]{article}
\usepackage[screen,panelright,sectionbreak]{pdfscreen}
\margins{2ex}{2ex}{2ex}{2ex}
\screensize{6.25in}{8in}
\emblema{fig-2}
\urlid{http://texpower.sourceforge.net/}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
% We use the tpslifonts package for better readability.
%
\usepackage[display]{texpower}
\usepackage{tpslifonts}
\begin{document}
\title{The \code{texpower} Package\\{\normalfont \texttt{pdfscreen} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\tableofcontents
\section{A list environment}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\section{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\section{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\section{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.1cm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{document}
%KEEPCOMMENTS
%</pdfscrdemo>
%=================================================================================================================
%<*pdfslidemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the pdfslide package with the dynamic features provided by the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass{article}
\usepackage{pdfslide}
\hypersetup{linkcolor=red}
\overlay{bg.jpg}
\setcounter{secnumdepth}{2}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
% The overlay forces a black background, so we select the blackbackground option of texpower.
%
\usepackage[display,blackbackground]{texpower}
\begin{document}
\title{The \code{texpower} Package\\{\normalfont \texttt{pdfslide} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\tableofcontents
\section{A list environment}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\section{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\section{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\section{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.2cm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{document}
%KEEPCOMMENTS
%</pdfslidemo>
%=================================================================================================================
%<*picexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Picture example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Use slifonts and a dark background.
\PassOptionsToPackage{colormath,colorhighlight,darkbackground}{texpower}
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower picture example}}
\ifthenelse{\boolean{psspecialsallowed}}% Can we use PSTricks?
{% Yes.
% PsTricks (sic) is used for creating the picture example.
\usepackage[noxcolor]{pstricks}
\usepackage{pstcol}
\usepackage{pst-node}
\psset{unit=\unitlength}
}
{% No. We'll make do without.
}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</picexample>
%<*picexample-src>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: A Picture}\label{Sec:ExPic}
\ifthenelse{\boolean{psspecialsallowed}}% Can we use PSTricks?
{\input{picpsexample}}{\input{picltxexample}}
\newslide
\pageTransitionReplace
%KEEPCOMMENTS
%</picexample-src>
%=================================================================================================================
%<*picltxexample>
%<<KEEPCOMMENTS
%
% Code for the LaTeX picture example for the package texpower.sty.
%
% This file is input by others. Don't compile it separately.
%
%-----------------------------------------------------------------------------------------------------------------
%
% This has nothing to do with \stepwise, just setting up the picture...
%
\newcommand{\leftm}{\left\{\!\!\left\{}
\newcommand{\rightm}{\right\}\!\!\right\}}
\newcommand{\cls}[3]{\left[#1,#2,#3\right]}
\newcommand{\WT}[2]{\fbox{${#1}#2$}}
\newcommand{\GEQ}[1]{\WT{\geq}{#1}}
%
% In the following picture, picture items are built incrementally.
%
% \parstepwise generates a sequence of slides, all alike. The only difference ist that on every slide, one more of the
% \step commands occurring in the argument of \stepwise are `activated'. This way the stuff inside the argument of
% \parstepwise is gone through `step by step'. (\parstepwise is a special case of \stepwise.)
%
{%
\setlength{\unitlength}{1.35\semcm}%
\footnotesize%
\setlength{\fboxsep}{1.5pt}%
\parstepwise
{%
\begin{center}
\begin{picture}(12,13)(-7,-16)
\put(-3,-3.5){\makebox(0,0){$\cls{\leftm p_1, p_2\rightm}{1}{\GEQ{0.2}}$}}
\put(3,-3.5){\makebox(0,0){$\cls{\leftm \neg p_2,p_1\rightm}{1}{\GEQ{0.1}}$}}
%
% In the following, we see the very first occurrence of the \step command. Its effect is to `hide' its
% argument on the first slide of the sequence generated by \stepwise and display it on all other slides of
% this sequence. The second \step command starts displaying on the third slide and so on...
%
\step{%
% We use \afterstep{\pageTransitionDissolve} to make this first step of the diagram appear with a fancy page
% transition. We have to use \afterstep because the page transition setting would be undone by the group
% closing contained in \end{picture}.
\afterstep{\pageTransitionDissolve}%
\put(-3,-4){\line(3,-1){3}}
\put(3,-4){\line(-3,-1){3}}
\put(0,-4.5){\makebox(0,0){(ass.)}}
\put(0,-5.5){%
\makebox(0,0){%
%
% Here, one use of \step is nested inside the other.
%
% Usually `hiding' means ignoring altogehter. For the following application however, the `hidden' objects
% are nested inside a brace. This means that instead of ignoring its argument, it's better if
% \step displays an appropriate amount of blank space. This behaviour (create blank space) is exhibited by
% the custom command \bstep (for `boxed' step).
%
% The command \rebstep allows both boxes to appear simultaneously.
%
% \afterstep is used again to reset the page transition to Replace for the building of the formula.
%
% Setting \activatestep to \highlightboxed makes the additional formulae `stick out' when they are filled
% in.
%
\let\activatestep=\highlightboxed
$
\cls
{\leftm p_1, \bstep{\afterstep{\pageTransitionReplace}p_1}, p_2,\rebstep{\neg p_2}\rightm}
{2.2}
{\rebstep{\GEQ{0.1}}}%
$%
}%
}
}
\step{%
\afterstep{\pageTransitionDissolve}%
\put(0,-6){\line(0,-1){1}}
\put(0.2,-6.5){\makebox(0,0)[l]{(removing)}}
\put(0,-7.5){\makebox(0,0){$\cls{\leftm p_1, p_1\rightm}{1.2}{\GEQ{0.1}}$}}
}
\step{%
\put(-8,-7.5){\makebox(0,0){$\left[\neg p_1,\GEQ{0.4}\right]$}}
\put(-8,-8){\line(5,-1){5}}
\put(0,-8){\line(-3,-1){3}}
\put(-3,-8.5){\makebox(0,0){(ass.)}}
\put(-3,-9.5){\makebox(0,0){$\cls{\leftm p_1, p_1,\neg p_1\rightm}{1.6}{\GEQ{0.1}}$}}
\put(-3,-10){\line(0,-1){1}}
\put(-2.8,-10.5){\makebox(0,0)[l]{(removing)}}
\put(-3,-11.5){\makebox(0,0){$\cls{\leftm p_1\rightm}{0.6}{\GEQ{0.1}}$}}
}
\step{%
\put(-8,-8){\line(0,-1){4}}
\put(-8,-12){\line(5,-1){5}}
\put(-3,-12){\line(0,-1){1}}
\put(-2.8,-12.5){\makebox(0,0)[l]{(assembling)}}
\put(-3,-13.5){\makebox(0,0){$\cls{\leftm p_1,\neg p_1\rightm}{1.0}{\GEQ{0.1}}$}}
\put(-3,-14){\line(0,-1){1}}
\put(-2.8,-14.5){\makebox(0,0)[l]{(removing)}}
\put(-3,-15.5){\makebox(0,0){$\left[\fbox{\phantom{x}},\GEQ{0.1}\right]$}}
}
\end{picture}%
\end{center}
}%
}
% The whole execution of \stepwise is encapsuled in a group to make all changes local. This affects also the setting
% of the page transition to dissolve in the last but one step. We set it again explicitly to make the last step appear
% with this page transition as well.
\pageTransitionDissolve
%KEEPCOMMENTS
%</picltxexample>
%=================================================================================================================
%<*picpsexample>
%<<KEEPCOMMENTS
%
% Code for the PSTricks picture example for the package texpower.sty.
%
% This file is input by others. Don't compile it separately.
%
%-----------------------------------------------------------------------------------------------------------------
%
% This has nothing to do with \stepwise, just setting up the picture...
%
\newcommand{\Block}[1]
{%
\begin{pspicture}(-4,-2)(4,2)
\pspolygon(-4,0)(-2,2)(2,2)(4,0)(2,-2)(-2,-2)
\rput(0,0){#1}
\end{pspicture}%
}%
\ifthenelse{\boolean{TPcolor}}
{\psset{unit=3mm,fillstyle=solid,fillcolor=highlightcolor,linecolor=textcolor}}%
{\psset{unit=3mm}}%
%
% In the following picture, picture items are built incrementally.
%
% \parstepwise generates a sequence of slides, all alike. The only difference ist that on every slide, one more of the
% \step commands occurring in the argument of \stepwise are `activated'. This way the stuff inside the argument of
% \parstepwise is gone through `step by step'. (\parstepwise is a special case of \stepwise.)
%
\parstepwise
{%
\begin{center}
\large
\begin{pspicture}(-1,-13)(33,9)
\rput(0,0){\rnode{x}{\fboxrule0pt\fbox{$x[t]$}}}
\rput(32,0){\rnode{y}{\fboxrule0pt\fbox{$y(t)$}}}
{%
% The effect of the \step command is to `hide' its argument on the first slide of the sequence generated by
% \stepwise and display it on all other slides of this sequence. The second \step command starts displaying on
% the third slide and so on...
%
% Usually `hiding' means ignoring altogehter. For the following application however, the box displayed by
% \step is used as an node in the picture. This means that instead of ignoring its argument, it's better if
% \step displays an appropriate amount of blank space.
% This behaviour (create blank space) is exhibited by the command \bstep.
\rput(4,0){\rnode{V}{\bstep{\psframebox{\Large$V$}}}}
\ncline{->}{x}{V}
%
% The command \rebstep allows both boxes to appear simultaneously.
%
\rput(28,0){\rnode{plus}{\rebstep{\psframebox{\Large$+$}}}}
}%
\ncline{->}{plus}{y}
% By using \restep again, the two boxes defining the operators appear at the same time as the first block of the
% diagram, which is produced by the following commands.
\restep
{%
% We use \afterstep{\pageTransitionDissolve} to make this first step of the diagram appear with a fancy page
% transition. We have to use \afterstep because the page transition setting would be undone by the group
% closing contained in \end{pspicture}.
\afterstep{\pageTransitionDissolve}%
\rput(16,0){\rnode{IBlk}{\Block{I-Block}}}
\ncline{->}{V}{IBlk}
\Aput{$x[t]$}
\ncline{->}{IBlk}{plus}
\Aput
{%
%
% Here, one use of \step is nested inside the other.
$%
% Note how the math spacing is corrected manually by adding {} after \cdot. Otherwise, \cdot wouldn't be
% aware that something is following and act as a postfix (instead of infix) operator.
% \afterstep is used again to reset the page transition to Replace for the building of the formula.
\bstep{\afterstep{\pageTransitionReplace}{}b\cdot{}}%
\bstep{\int\limits^t_0 x(\tau)\,d\tau}%
$%
}%
}%
\step
{%
\afterstep{\pageTransitionDissolve}%
\rput(16,6){\rnode{PBlk}{\Block{P-Block}}}
\ncangle[angleA=90,angleB=180,fillstyle=none]{->}{V}{PBlk}
\Aput{$x(t)$}
\ncangle[angleB=90,fillstyle=none]{->}{PBlk}{plus}
\aput(.5){$a\cdot x(t)$}
}%
\step
{%
\rput(16,-6){\rnode{DBlk}{\Block{D-Block}}}
\ncangle[angleA=-90,angleB=180,fillstyle=none]{->}{V}{DBlk}
\Aput{$x(t)$}
\ncangle[angleB=-90,fillstyle=none]{->}{DBlk}{plus}
\aput(.5){$\displaystyle c\cdot \left(\frac{dx}{d\tau}\right)(t)$}
}
\end{pspicture}%
\end{center}
}%
% The whole execution of \stepwise is encapsuled in a group to make all changes local. This affects also the setting
% of the page transition to dissolve in the last but one step. We set it again explicitly to make the last step appear
% with this page transition as well.
\pageTransitionDissolve
%KEEPCOMMENTS
%</picpsexample>
%<*pp4sldemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the foils class with the pp4slide package and the dynamic features provided by the
% package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[landscape]{foils}
\usepackage{pp4slide}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
% As pp4slide sets some colors designed for dark backgrounds, we give the darkbackground option, and colormath to make
% formulae colored.
%
\usepackage[display,darkbackground,colormath]{texpower}
\begin{document}
\title{The \code{texpower} Package\\{\normalfont \texttt{pp4slide} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\foilhead{A list environment}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\foilhead{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\foilhead{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\foilhead{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.6cm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{document}
%KEEPCOMMENTS
%</pp4sldemo>
%=================================================================================================================
%<*prosperdemo>
%<<KEEPCOMMENTS
%
\documentclass[pdf,colorBG,slideColor,whitecross]{prosper}
\usepackage[display,oldfiltering]{texpower}
\begin{document}
\ifpdf
No way to compile a prosper document with pdftex!
\else
\stepwise[\boxedsteps]
{%
\begin{slide}{An aligned equation}
\begin{eqnarray}
\step{\sum_{i=1}^{n} i} & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{%
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
\end{slide}
}
\fi
\end{document}
%KEEPCOMMENTS
%</prosperdemo>
%=================================================================================================================
%<*seminardemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the seminar class with the dynamic features provided by the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[portrait,semrot]{seminar}
% We need fixseminar for setting the page size correctly.
\usepackage{fixseminar}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
%
\usepackage[display]{texpower}
\rotateheaderstrue
\begin{document}
\begin{slide}
\title{The \code{texpower} Package\\{\normalfont \texttt{seminar} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\newslide
\tableofcontents
\end{slide}
\begin{slide}
\centerslidesfalse
\section{A list environment}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\end{slide}
\begin{slide}
\centerslidesfalse
\section{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\end{slide}
\begin{slide}
\centerslidesfalse
\section{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\end{slide}
\begin{slide}
\centerslidesfalse
\section{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.5\semcm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\footnotesize $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{slide}
\end{document}
%KEEPCOMMENTS
%</seminardemo>
%=================================================================================================================
%<*simpledemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for the dynamic features provided by the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[12pt]{article}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
%
\usepackage[display]{texpower}
\begin{document}
\title{The \code{texpower} Package\\{\normalfont Simple Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
\tableofcontents
\pause
\section{A list environment}
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\newpage
\section{An aligned equation}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is displayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\pause
\section{An array}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step{ n & \log n & n\log n & n^2 & 2^n \\\hline}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\pause
\section{A picture}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{.95cm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{document}
%KEEPCOMMENTS
%</simpledemo>
%=================================================================================================================
%<*slidesdemo>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Simple examples the for combining the slides class with the dynamic features provided by the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[landscape]{slides}
% slides understands the landscape option, but to get it through to pdflatex, we need to set \pdfpageheight etc. The
% package fixseminar does this.
\usepackage{fixseminar}
% We need to set this page style globally so all dynamically built slides have the right headers.
\pagestyle{slide}
%-----------------------------------------------------------------------------------------------------------------
% The texpower package is loaded.
% We give the display option so dynamic features are enabled.
%
\usepackage[display]{texpower}
\begin{document}
\begin{slide}
\title{The \code{texpower} Package\\{\normalfont \texttt{slides} Demo}}
\author{Stephan Lehmke\\\code{mailto:Stephan.Lehmke@cs.uni-dortmund.de}}
\maketitle
\end{slide}
\begin{slide}
\begin{center}
\textbf{A list environment}
\end{center}
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to
% the next page.
\pause
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the
% \step commands appear ``one by one''.
\stepwise
{%
\begin{description}
\item[foo.] \step{bar.}
\step{\item[baz.]} \step{qux.}
\end{description}
}
\end{slide}
\begin{slide}
\begin{center}
\textbf{An aligned equation}
\end{center}
\pause
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb
% alignments, because the width changes with every new activated \step.
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the
% proper amount of white space.
\parstepwise
{%
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation
% numbers `appear'.
\begin{eqnarray}
%
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the
% latter. \restep is like \step, but it appears at the same time as the previous \step command.
%
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\
%
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\
%
& \step{=} & \restep
{% We can nest \step commands inside each other. The order of execution is just the
% order of appearance, independent of nesting.
% \switch is a variant of \step which takes two arguments and toggles between them on
% activation. This way, we can make the \underbrace `appear'.
% We insert a \vphantom in the first argument so that the equation numbers will be
% placed correctly whether or not the underbrace is didplayed.
\switch
{%
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
(1 + n) + \cdots + (1 + n)%
}
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}%
}
\\
%
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by
% inserting {} left of it, because otherwise it would behave like a prefix operator.
%
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}}
\end{eqnarray}
}
\end{slide}
\begin{slide}
\begin{center}
\textbf{An array}
\end{center}
\stepwise
{% With arrays, beware of problems with automatic calculation of cell widths.
%
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that
% a) tabulators or newlines can not go into the argument of \step,
% b) the array `structure' (rules) will be completely visible right from the beginning.
%
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the
% array will expand horizontally, destroying the dynamic effect. This can be assured by
% a) using only p cells,
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into
% the first cell. Otherwise, you can use \settowidth.
%
\begin{displaymath}
\begin{array}{rrrrr}
\step
{%
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\
\hline%
}%
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}%
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}%
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}%
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}%
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}%
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }%
\end{array}
\end{displaymath}
}
\end{slide}
\begin{slide}
\begin{center}
\textbf{A picture}
\end{center}
\pause
\begin{center}%
\stepwise
{%
\setlength{\unitlength}{1.6cm}%
\delimitershortfall-1sp% Just for the nested braces
\begin{picture}(14,2)
\put(0,1){\vector(1,0){1}}
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}}
\put(13,1){\vector(1,0){1}}
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}}
\step
{
\put(1,1){\line(3,2){1.5}}
\put(1,1){\line(3,-2){1.5}}
\put(2.5,0){\line(0,1){2}}
\put(2,1){\makebox(0,0){\large $\varphi$}}
}
\step
{
\put(2.5,1){\vector(1,0){3.5}}
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}}
}
\step
{
\put(6,0){\framebox(2,2){\large $\Phi$}}
}
\step
{
\put(8,1){\vector(1,0){3.5}}
%
% Here, we find another nested use of \step inside \step.
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for
% building the nested formula on the next line would give the wrong size for the nested braces.
%
\put(9.75,0.5){\makebox(0,0){\small $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}}
}
\step
{
\put(13,1){\line(-3,2){1.5}}
\put(13,1){\line(-3,-2){1.5}}
\put(11.5,0){\line(0,1){2}}
\put(12,1){\makebox(0,0){\large $\delta$}}
}
\end{picture}%
}%
\end{center}%
\end{slide}
\end{document}
%KEEPCOMMENTS
%</slidesdemo>
%=================================================================================================================
%<*spanelexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Very simple panel example - compare with panelexample.tex
\documentclass[calcdimensions,landscape,letterpaper,KOMA]{powersem}
\usepackage[ps2pdf,colorlinks,pdfpagemode=FullScreen,plainpages=false]{hyperref}
\usepackage[lightbackground,display]{texpower}
\renewcommand{\currentpagevalue}{\value{slide}}
\usepackage{fixseminar}
\usepackage{tpslifonts}
\newlength{\buttonwidth}
\renewcommand{\buttonsep}{0.2\fboxsep}
\renewcommand{\buttonshadowhshift}{0.1\fboxsep}
\renewcommand{\buttonshadowvshift}{-0.1\fboxsep}
\DeclarePanel{left}
{%
\textsf{\textbf{\footnotesize
\begin{tabular}[b]{@{}l@{}}
Your Logo\\
Your Name\\
Your Company\\
\end{tabular}%
}}%
\vfill
\setlength{\buttonwidth}{.5\linewidth-.5ex}
\button[\buttonwidth]{\Acrobatmenu{FirstPage}}{Start}
\button[\buttonwidth]{\Acrobatmenu{LastPage}}{End}
\button[\buttonwidth]{\Acrobatmenu{PrevPage}}{Back}
\button[\buttonwidth]{\Acrobatmenu{NextPage}}{Next}
}%
\newcommand{\MyHeader}{}
\newcommand{\myheader}[1]{\renewcommand{\MyHeader}{#1}}
\DeclarePanel{top}{\Large\strut\MyHeader}
\backgroundstyle{vgradient}
\slideframe{none}
\centerslidesfalse
\pagestyle{empty}
\mklength{\slideleftmargin}{\leftpanelwidth*\ratio{1cm}{\semcm}+.5cm}
\renewcommand{\sliderightmargin}{.5cm}
\mklength{\slidetopmargin}{\toppanelheight*\ratio{1cm}{\semcm}+.5cm}
\renewcommand{\slidebottommargin}{.5cm}
\begin{document}
\begin{slide}
\myheader{Just some info about panels}
If you're using a package that has it's own panel and/or naviagtion buttons (as
\href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfscreen.html}%
{\code{pdfscreen}}) don't even consider using the preliminary support for this
in \concept{\TeX Power}.
Using it for \code{seminar} / \code{powersem} as we are doing here is OK \dots
Things to remember:
\begin{itemize}
\item If you want to declare your own panels, you have to call
\macroname{backgroundstyle} after the panel declaration.
\item The font color used in the panels are controlled by \code{\carg{pos}paneltextcolor}.
\end{itemize}
\newslide
\myheader{Some examples for \macroname{pause}}
\pageTransitionDissolve
With dissolve page transition
\begin{itemize}
\item foo\pause
\item bar\pause
\end{itemize}
\pageTransitionReplace
and with plain replace page transition
\begin{itemize}
\item foo\pause
\item bar\pause
\end{itemize}
\end{slide}
\end{document}
%KEEPCOMMENTS
%</spanelexample>
%=================================================================================================================
%<*tabexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Tabular example for the package texpower.sty.
%
%-----------------------------------------------------------------------------------------------------------------
% Use slifonts.
\RequirePackage{tpslifonts}
% Input the generic preamble.
\input{__TPpreamble}
\hypersetup{pdftitle={texpower tabular example}}
%-----------------------------------------------------------------------------------------------------------------
% Finally, everything is set up. Here we go...
%
\begin{document}
\begin{slide}
%KEEPCOMMENTS
%</tabexample>
%<*tabexample-src>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
\makeslidetitle{\macroname{stepwise} Example: A Tabular}
% In the following, a tabular object is built incrementally.
% Observe how & and \\ are placed inside the following step to avoid `opening' empty cells.
% The macro \tabend is redefined to `replace' the final \hline by \cline's when a line is not yet complete.
%
\newcommand{\tabend}{\\\hline}%
\liststepwise{%
\begin{center}
\step{%
\begin{tabular}{|l|l|l|}
\hline
They can & be built & line by line%
\step{\\\hline or cell\renewcommand{\tabend}{\\\cline{1-1}}}%
\step{& by\renewcommand{\tabend}{\\\cline{1-2}}}%
\step{& cell\renewcommand{\tabend}{\\\hline}}%
\step
{%
\\\hline
%
% Again, \step's are nested inside each other...
%
\step{or}&\step{like}&\step{this.}%
}%
\step{\\\hline But\renewcommand{\tabend}{\\\cline{1-1}}}%
\step{& beware\renewcommand{\tabend}{\\\cline{1-2}}}%
\step{& of cells growing horizontally!\renewcommand{\tabend}{\\\hline}}%
\tabend
\end{tabular}%
}%
\end{center}%
}%
\newslide
%KEEPCOMMENTS
%</tabexample-src>
%=================================================================================================================
%<*verbexample>
%<<KEEPCOMMENTS
%-----------------------------------------------------------------------------------------------------------------
%
% Example showing the use of verbatim/fragile steps (using the fragilesteps environment).
%
%-----------------------------------------------------------------------------------------------------------------
\documentclass[12pt,a4paper]{article}
\usepackage[display]{texpower}
\usepackage{ fancyvrb,listings,alltt}
% Command to easily include some lines of code from a file
\def\listcodefromfile#1#2#3{%
\lstinputlisting[firstline=#1,lastline=#2,aboveskip=0pt,belowskip=0pt]{#3}}
\begin{document}
\begin{center}
{\textbf{Example showing the use of verbatim/fragile steps with the fragilesteps environment}}
\end{center}
A simple example (with alltt) showing steps with verbatim text.
Multiple lines in one step is only supported by alltt (and only for the
standard step command, not bstep).
\pause
\begin{fragilesteps}
\begin{alltt}
One\step{
Two
Three}
Four
\end{alltt}
\end{fragilesteps}
\pause
An easy example (with listings) for including small parts of code in each step.
If you want to include code line by line look at the next example. Notice that in this
example you really don't need to use the fragilesteps environment, because
there are no verbatim code - the next example however...
\lstset{language=Java}
\begin{fragilesteps}
\step{\listcodefromfile{1}{3}{dummy.java}}
\step{\listcodefromfile{4}{7}{dummy.java}}
\end{fragilesteps}
\pause
A (fancy) example using the fancyvrb interface of the listings package.
The re(b)step command is used to make some lines of code appear at the same time.
(You can not include multiple lines in each (b)step command.)
\pause
\lstset{fancyvrb=true}
\fvset{commandchars=\\\[\]}
\begin{fragilesteps}
\begin{Verbatim}[fontfamily=cmr]
public long recur(int n) {
\bstep[ if (n<1) {]
\rebstep[ return 0;]
\bstep[ } else if (n == 1) {]
\rebstep[ return 1;]
\bstep[ } else {]
\rebstep[ return \bstep[recur(n-1)+recur(n-2);]]
\rebstep[ }]
}
\end{Verbatim}
\end{fragilesteps}
\end{document}
%KEEPCOMMENTS
%</verbexample>
%=================================================================================================================
%<*end>
\end{slide}
\end{document}
%</end>
%<*enddoc>
\end{document}
%</enddoc>
%=================================================================================================================
%<*figure-mpsrc>
prologues:=0;
beginfig(1);
path p;
p = (-1cm,0)..(0,-1cm)..(1cm,0);
fill p{up}..(0,0){-1,-2}..{up}cycle withcolor red;
draw p..(0,1cm)..cycle withcolor red;
currentpicture := currentpicture shifted -llcorner currentpicture;
endfig;
beginfig(2);
color myblue;
myblue = (0,0.1,1);
path p, q, r;
z1 = (10cm,0cm);
z2 = z1 + 1cm * dir -60;
z3 = z2 + 1cm * dir 0;
z4 = z3 + 1cm * dir 120;
z5 = (1.2cm,0);
z6 = -3 * z5 + 1.2cm * dir -60;
p = z1--z2--z3--z4;
fill p--cycle withcolor myblue;
p := p shifted z5;
fill p--cycle withcolor red;
p := p shifted z5;
fill p--cycle withcolor myblue;
p := p shifted z5;
fill p--cycle withcolor myblue;
for j=1 upto 3:
p := p shifted z6;
for i=1 upto 3:
fill p--cycle withcolor myblue;
p := p shifted z5;
endfor
fill p--cycle withcolor myblue;
endfor
z7 = z1 + 4*z5 - (0.2cm,0) + 0.2cm * dir 60;
z8 = z7 + 3.5cm*dir 60;
z9 = z8 + (0.35cm,0cm);
z7 = z10 + whatever*dir 120;
z9 = z10 + whatever*dir 60;
q = z8--z7;
r = z10--z9;
z11 = 1.2cm * dir -60;
z12 = z10-z7;
p := q--r;
fill p--cycle withcolor (0,0.7,1);
q := q shifted z11;
r := r shifted (z11 + 0.5*z12);
z13 = urcorner q + whatever*dir 60;
y13 = y8;
z14 = urcorner r + whatever*dir 60;
y14 = y8;
p := z13--q--r--z14;
fill p--cycle withcolor (0,0.5,1);
q := q shifted z11;
r := r shifted (z11 + 0.5*z12);
z15 = urcorner q + whatever*dir 60;
y15 = y8;
z16 = urcorner r + whatever*dir 60;
y16 = y8;
p := z15--q--r--z16;
fill p--cycle withcolor (0,0.3,1);
q := q shifted z11;
r := r shifted (z11 + 0.5*z12);
z17 = urcorner q + whatever*dir 60;
y17 = y8;
z18 = urcorner r + whatever*dir 60;
y18 = y8;
z19 = llcorner q + 1.0cm * dir -60;
p := z17--q--z19--z18;
fill p--cycle withcolor myblue;
currentpicture := currentpicture shifted -llcorner currentpicture;
endfig;
beginfig(3);
color myblue;
myblue = (0.4,0.7,1);
path p, q, r;
z1 = (0cm,0cm);
z2 = (10cm,0cm);
z3 = z2 + 1cm * dir 65;
z4 = z1 + 1cm * dir 65;
z5 = (1.2cm,0);
z6 = -3 * z5 + 1.2cm * dir -60;
p = z1--z2--z3--z4;
fill p--cycle withcolor myblue;
defaultfont:="rphvr";
label.rt(btex \font\sans=lcmssb8 at 0.3cm \sans UNIVERSIT\"AT DORTMUND etex,0.5*(z1+z4)+(0.5cm,0)) withcolor white;
currentpicture := currentpicture shifted -llcorner currentpicture;
endfig;
end
%</figure-mpsrc>
%<*fig-1>
%<<KEEPCOMMENTS
%!PS
%%BoundingBox: 0 0 58 58
%%Creator: MetaPost
%%CreationDate: 2004.03.23:0921
%%Pages: 1
%%EndProlog
%%Page: 1 1
1 0 0 setrgbcolor
newpath 0.25 28.59645 moveto
0.25 12.94115 12.94115 0.25 28.59645 0.25 curveto
44.25175 0.25 56.9429 12.94115 56.9429 28.59645 curveto
56.9429 40.7281 36.86218 45.12794 28.59645 28.59645 curveto
20.33072 12.06496 0.25 16.4648 0.25 28.59645 curveto closepath fill
0 0.5 dtransform truncate idtransform setlinewidth pop [] 0 setdash
1 setlinejoin 10 setmiterlimit
newpath 0.25 28.59645 moveto
0.25 12.94115 12.94115 0.25 28.59645 0.25 curveto
44.25175 0.25 56.9429 12.94115 56.9429 28.59645 curveto
56.9429 44.25175 44.25175 56.9429 28.59645 56.9429 curveto
12.94115 56.9429 0.25 44.25175 0.25 28.59645 curveto closepath stroke
showpage
%%EOF
%KEEPCOMMENTS
%</fig-1>
%<*fig-2>
%<<KEEPCOMMENTS
%!PS
%%BoundingBox: 0 0 310 204
%%Creator: MetaPost
%%CreationDate: 2004.03.24:1259
%%Pages: 1
%%EndProlog
%%Page: 1 1
0 0.1 1 setrgbcolor
newpath 0 112.92435 moveto
14.17323 88.37553 lineto
42.51968 88.37553 lineto
28.34645 112.92435 lineto
closepath fill
1 0 0 setrgbcolor
newpath 34.01566 112.92435 moveto
48.18889 88.37553 lineto
76.53534 88.37553 lineto
62.3621 112.92435 lineto
closepath fill
0 0.1 1 setrgbcolor
newpath 68.03131 112.92435 moveto
82.20454 88.37553 lineto
110.551 88.37553 lineto
96.37776 112.92435 lineto
closepath fill
newpath 102.04697 112.92435 moveto
116.2202 88.37553 lineto
144.56665 88.37553 lineto
130.39342 112.92435 lineto
closepath fill
newpath 17.00783 83.46584 moveto
31.18106 58.91702 lineto
59.52751 58.91702 lineto
45.35428 83.46584 lineto
closepath fill
newpath 51.02348 83.46584 moveto
65.19672 58.91702 lineto
93.54317 58.91702 lineto
79.36993 83.46584 lineto
closepath fill
newpath 85.03914 83.46584 moveto
99.21237 58.91702 lineto
127.55882 58.91702 lineto
113.38559 83.46584 lineto
closepath fill
newpath 119.0548 83.46584 moveto
133.22803 58.91702 lineto
161.57448 58.91702 lineto
147.40125 83.46584 lineto
closepath fill
newpath 34.01566 54.00732 moveto
48.18889 29.45851 lineto
76.53534 29.45851 lineto
62.3621 54.00732 lineto
closepath fill
newpath 68.03131 54.00732 moveto
82.20454 29.45851 lineto
110.551 29.45851 lineto
96.37776 54.00732 lineto
closepath fill
newpath 102.04697 54.00732 moveto
116.2202 29.45851 lineto
144.56665 29.45851 lineto
130.39342 54.00732 lineto
closepath fill
newpath 136.06262 54.00732 moveto
150.23586 29.45851 lineto
178.5823 29.45851 lineto
164.40907 54.00732 lineto
closepath fill
newpath 51.02348 24.54881 moveto
65.19672 0 lineto
93.54317 0 lineto
79.36993 24.54881 lineto
closepath fill
newpath 85.03914 24.54881 moveto
99.21237 0 lineto
127.55882 0 lineto
113.38559 24.54881 lineto
closepath fill
newpath 119.0548 24.54881 moveto
133.22803 0 lineto
161.57448 0 lineto
147.40125 24.54881 lineto
closepath fill
newpath 153.07045 24.54881 moveto
167.24368 0 lineto
195.59013 0 lineto
181.4169 24.54881 lineto
closepath fill
0 0.7 1 setrgbcolor
newpath 182.83432 203.75488 moveto
133.22803 117.83403 lineto
138.18874 109.24179 lineto
192.75575 203.75488 lineto
closepath fill
0 0.5 1 setrgbcolor
newpath 216.84998 203.75488 moveto
199.84215 174.29637 lineto
150.23586 88.37552 lineto
157.67693 75.48715 lineto
212.24394 170.00024 lineto
231.73213 203.75488 lineto
closepath fill
0 0.3 1 setrgbcolor
newpath 250.86565 203.75488 moveto
216.84998 144.83786 lineto
167.24368 58.917 lineto
177.16512 41.73251 lineto
231.73213 136.2456 lineto
270.70853 203.75488 lineto
closepath fill
0 0.1 1 setrgbcolor
newpath 284.8813 203.75488 moveto
233.8578 115.37935 lineto
184.25151 29.4585 lineto
198.42474 4.90968 lineto
309.6849 203.75488 lineto
closepath fill
showpage
%%EOF
%KEEPCOMMENTS
%</fig-2>
%<*fig-3>
%<<KEEPCOMMENTS
%!PS
%%BoundingBox: 0 0 296 26
%%Creator: MetaPost
%%CreationDate: 2004.03.24:1531
%%Pages: 1
%*Font: lcmssb8 8.504 7.97011 41:988e7c0000000002
%%EndProlog
%%Page: 1 1
0.4 0.7 1 setrgbcolor
newpath 0 0 moveto
283.46451 0 lineto
295.44437 25.6907 lineto
11.97986 25.6907 lineto
closepath fill
1 setgray
23.16316 9.27249 moveto
(UNIVERSIT) lcmssb8 8.504 fshow
82.72096 10.5127 moveto
(\177) lcmssb8 8.504 fshow
81.86467 9.27249 moveto
(AT) lcmssb8 8.504 fshow
101.67796 9.27249 moveto
(DORTMUND) lcmssb8 8.504 fshow
showpage
%%EOF
%KEEPCOMMENTS
%</fig-3>
%<*dummy-java>
%<<KEEPCOMMENTS
public int dummy(int n) {
if (n<1) {
return 0;
} else {
return 1;
}
}
%KEEPCOMMENTS
%</dummy-java>
%=================================================================================================================
%
% Local Variables:
% fill-column: 120
% TeX-master: t
% End:
|