title: Table column spacing / headings

text: I don't seem to be able to reduce the space between columns with `\setlength\tabcolsep`; it looks like `siunitx` package does not go along with `tabcolsep`. Further, I'd like to centre the subheadings of the `S` columns which neither seemed to be working with `\multicolumn{1}{c}{Sample No.}`, etc. Column headings 2 to 13 are left aligned and 14 to 22 right aligned. What am I doing wrong?               \documentclass[11pt,letter paper,oneside]{scrartcl}     \usepackage[nochapters,linedheaders]{classicthesis}          \usepackage[english]{babel}          \usepackage{fontspec}     \usepackage{xunicode}     \setmainfont{Minion Pro}          \usepackage[nooneline]{caption}     \usepackage{float}     \usepackage{floatflt}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{floatflt}     \usepackage{threeparttable}     \usepackage{longtable}     \usepackage{lscape}     \usepackage{rotating}     \usepackage{multirow}%     \usepackage{booktabs}     \usepackage{amsmath}%     \usepackage{latexsym}     \usepackage{amssymb}     \usepackage{siunitx}     \usepackage{isotope}     \usepackage[version=3]{mhchem}                    \begin{document}               \begin{landscape}     \begin{center}     \setlength\tabcolsep{1pt}     \footnotesize     \begin{longtable}{l*{21}S[table-format=4.5]}         \caption{Table caption}\\         \toprule           &  & & &            \multicolumn{8}{c}{CAPTION} & &%            \multicolumn{6}{c}{CAPTION (Ma)} &%            \multicolumn{1}{c}{CAPTION} & &\\     \cmidrule(r){5-12}     \cmidrule(r){14-19}          {Sampel no.} &%     {X (ppm)} &%     {Y (ppm)} &%     {Y/X} &%     {$\frac{^{207}{F}}{^{206}{G}}$} &%     {$1\sigma$} &%      {$\frac{^{207}{G}}{^{235}{G}}$} &%         {$1\sigma$} &%      {$\frac{^{206}{R}}{^{238}{U}}$}  &%     {$1\sigma$} &%     {$\frac{^{208}{E}}{^{232}{Th}}$} &%     {$1\sigma$} &%     {$\rho$} &%     {$\frac{^{206}{P}}{^{238}{z}}$} &%     {$1\sigma$} &%     {$\frac{^{207}{V}}{^{235}{U}}$}  &%     {1$\sigma$} &%     {$\frac{^{207}{P}}{^{206}{U}}$}  &%     {$1\sigma$} &%     {(Unit)} &%     {$1\sigma$} &%     {$\delta$ (\%)} \\     %     \midrule         \endfirsthead     %     %        \multicolumn{22}{l}%         {\tablename\ \thetable\  \textit{(Continued)}} \\     %     \toprule     {Sampel no.} &%     {X (ppm)} &%     {Y (ppm)} &%     {Y/X} &%     {$\frac{^{207}{F}}{^{206}{G}}$} &%     {$1\sigma$} &%      {$\frac{^{207}{G}}{^{235}{G}}$} &%         {$1\sigma$} &%      {$\frac{^{206}{R}}{^{238}{U}}$}  &%     {$1\sigma$} &%     {$\frac{^{208}{E}}{^{232}{Th}}$} &%     {$1\sigma$} &%     {$\rho$} &%     {$\frac{^{206}{P}}{^{238}{z}}$} &%     {$1\sigma$} &%     {$\frac{^{207}{V}}{^{235}{U}}$}  &%     {1$\sigma$} &%     {$\frac{^{207}{P}}{^{206}{U}}$}  &%     {$1\sigma$} &%     {(Unit)} &%     {$1\sigma$} &%     {$\delta$ (\%)} \\     \midrule         \endhead     \bottomrule     \multicolumn{22}{r}{\textit{(Continued)}} \\         \endfoot     \bottomrule         \endlastfoot     Sample 1 &        597 &        552 &       0.87 &    0.06641 &    0.00166 &    0.31038 &    0.01076 &    0.03474 &    0.00083 &    0.01092 &    0.00038 &       0.69 &        220 &          5 &        274 &          8 &        819 &         53 &        220 &          5 &       19.7 \\          Sample &        664 &        424 &       0.60 &    0.05545 &    0.00078 &    0.30183 &    0.00577 &    0.03947 &    0.00051 &    0.01292 &    0.00028 &       0.68 &        250 &          3 &        268 &          5 &        430 &         30 &        250 &          3 &        6.7 \\          Sample15\_024 &        634 &        604 &       0.89 &    0.05967 &    0.00449 &    0.33649 &    0.02815 &    0.04090 &    0.00059 &    0.01264 &    0.00016 &       0.45 &        258 &          4 &        295 &         21 &        592 &        158 &        258 &          4 &       12.5 \\     %     Sample2\_009 &         64 &         25 &       0.37 &    0.05609 &    0.00164 &    0.32120 &    0.01034 &    0.04153 &    0.00038 &    0.01293 &    0.00012 &       0.35 &        262 &          2 &        283 &          8 &        456 &         65 &        262 &          2 &        7.4 \\     %     Sample10\_018 &       1124 &        998 &       0.83 &    0.07956 &    0.00103 &    0.45438 &    0.00835 &    0.04195 &    0.00055 &    0.01947 &    0.00091 &       0.71 &        265 &          3 &        380 &          6 &       1186 &         26 &        265 &          3 &       30.3 \\          Sample62\_081 &        113 &         61 &       0.51 &    0.07375 &    0.01142 &    0.43177 &    0.06874 &    0.04246 &    0.00060 &    0.01281 &    0.00031 &       0.15 &        268 &          4 &        364 &         49 &       1035 &        315 &        268 &          4 &       26.4 \\          Sample14\_023 &        536 &         85 &       0.15 &    0.05294 &    0.00069 &    0.33703 &    0.00596 &    0.04608 &    0.00055 &    0.01396 &    0.00024 &       0.68 &        290 &          3 &        295 &          5 &        326 &         30 &        290 &          3 &        1.7 \\          Sample41\_056 &        237 &        106 &       0.42 &    0.05411 &    0.00076 &    0.35000 &    0.00553 &    0.04696 &    0.00034 &    0.01409 &    0.00021 &       0.46 &        296 &          2 &        305 &          4 &        376 &         32 &        296 &          2 &        3.0 \\          Sample72\_092 &        267 &        104 &       0.36 &    0.05328 &    0.00069 &    0.37697 &    0.00560 &    0.05126 &    0.00037 &    0.01616 &    0.00024 &       0.49 &        322 &          2 &        325 &          4 &        341 &         28 &        322 &          2 &        0.9 \\          Sample6\_014 &        720 &        439 &       0.57 &    0.05795 &    0.00064 &    0.47043 &    0.00684 &    0.05899 &    0.00056 &    0.01808 &    0.00029 &       0.65 &        369 &          3 &        391 &          5 &        528 &         23 &        369 &          3 &        5.6 \\          Sample20\_030 &        966 &        180 &       0.18 &    0.06941 &    0.00078 &    0.85861 &    0.01444 &    0.08972 &    0.00086 &    0.02725 &    0.00026 &       0.70 &        554 &          5 &        629 &          8 &        911 &         22 &        554 &          5 &       11.9 \\          Sample68\_088 &         63 &         33 &       0.49 &    0.06329 &    0.00101 &    0.83480 &    0.01490 &    0.09581 &    0.00076 &    0.02805 &    0.00048 &       0.45 &        590 &          4 &        616 &          8 &        718 &         32 &        590 &          4 &        4.2 \\          Sample69\_089 &        503 &        210 &       0.39 &    0.06085 &    0.00061 &    0.80353 &    0.00990 &    0.09579 &    0.00069 &    0.03122 &    0.00044 &       0.58 &        590 &          4 &        599 &          6 &        634 &         21 &        590 &          4 &        1.5 \\          Sample3\_010 &        800 &         71 &       0.08 &    0.06060 &    0.00061 &    0.82852 &    0.01011 &    0.09924 &    0.00069 &    0.03362 &    0.00040 &       0.57 &        610 &          4 &        613 &          6 &        625 &         22 &        610 &          4 &        0.5 \\          Sample34\_047 &        696 &        119 &       0.16 &    0.06577 &    0.00071 &    0.93592 &    0.01397 &    0.10320 &    0.00084 &    0.03154 &    0.00026 &       0.66 &        633 &          5 &        671 &          7 &        799 &         23 &        633 &          5 &        5.7 \\          Sample42\_057 &         73 &         46 &       0.59 &    0.06303 &    0.00113 &    0.90923 &    0.01753 &    0.10475 &    0.00072 &    0.03049 &    0.00043 &       0.37 &        642 &          4 &        657 &          9 &        709 &         38 &        642 &          4 &        2.3 \\          Sample22\_033 &        891 &        283 &       0.30 &    0.07147 &    0.00150 &    1.13515 &    0.02693 &    0.11519 &    0.00093 &    0.03487 &    0.00029 &       0.46 &        703 &          5 &        770 &         13 &        971 &         43 &        703 &          5 &        8.7 \\          Sample11\_020 &        615 &        162 &       0.25 &    0.07379 &    0.00075 &    1.53838 &    0.02019 &    0.15121 &    0.00105 &    0.04561 &    0.00031 &       0.60 &        908 &          6 &        946 &          8 &       1036 &         20 &        908 &          6 &        4.0 \\          Sample45\_060 &        343 &         86 &       0.24 &    0.07127 &    0.00066 &    1.59320 &    0.01913 &    0.16205 &    0.00123 &    0.04709 &    0.00057 &       0.64 &        968 &          7 &        968 &          7 &        965 &         19 &        968 &          7 &        0.0 \\          Sample67\_087 &        178 &         37 &       0.19 &    0.07137 &    0.00090 &    1.60246 &    0.02717 &    0.16284 &    0.00138 &    0.04931 &    0.00041 &       0.60 &        973 &          8 &        971 &         11 &        968 &         24 &        973 &          8 &       -0.2 \\          Sample76\_097 &        184 &         58 &       0.30 &    0.07231 &    0.00072 &    1.72390 &    0.02155 &    0.17290 &    0.00130 &    0.05341 &    0.00069 &       0.60 &       1028 &          7 &       1017 &          8 &        995 &         19 &        995 &         19 &       -1.1 \\          Sample79\_100 &        138 &         55 &       0.37 &    0.07230 &    0.00087 &    1.66670 &    0.02324 &    0.16727 &    0.00119 &    0.04896 &    0.00059 &       0.51 &        997 &          7 &        996 &          9 &        994 &         23 &        997 &          7 &       -0.1 \\          Sample16\_026 &         74 &         32 &       0.41 &    0.07245 &    0.00247 &    1.68496 &    0.06421 &    0.16868 &    0.00153 &    0.05099 &    0.00047 &       0.38 &       1005 &          8 &       1003 &         24 &        999 &         66 &        999 &         66 &       -0.2 \\          Sample80\_101 &        215 &         70 &       0.30 &    0.07302 &    0.00080 &    1.67310 &    0.02173 &    0.16642 &    0.00115 &    0.05004 &    0.00060 &       0.54 &        992 &          6 &        998 &          8 &       1015 &         21 &       1015 &         21 &        0.6 \\          Sample54\_071 &        380 &        111 &       0.28 &    0.07329 &    0.00071 &    1.88310 &    0.02479 &    0.18646 &    0.00166 &    0.05640 &    0.00068 &       0.68 &       1102 &          9 &       1075 &          9 &       1022 &         20 &       1022 &         20 &       -2.5 \\          SampleMH28\_1\_008 &        148 &         57 &       0.36 &    0.07348 &    0.00081 &    1.76520 &    0.02302 &    0.17438 &    0.00122 &    0.05089 &    0.00061 &       0.53 &       1036 &          7 &       1033 &          8 &       1027 &         21 &       1027 &         21 &       -0.3 \\          Sample50\_066 &        518 &         59 &       0.11 &    0.07356 &    0.00066 &    1.70400 &    0.02063 &    0.16811 &    0.00136 &    0.05052 &    0.00066 &       0.67 &       1002 &          8 &       1010 &          8 &       1029 &         18 &       1029 &         18 &        0.8 \\          Sample39\_053 &        161 &         49 &       0.28 &    0.07360 &    0.00088 &    1.68360 &    0.02365 &    0.16586 &    0.00121 &    0.04927 &    0.00059 &       0.52 &        989 &          7 &       1002 &          9 &       1031 &         24 &       1031 &         24 &        1.3 \\          Sample7\_015 &        191 &         22 &       0.11 &    0.07386 &    0.00081 &    2.05020 &    0.04325 &    0.20148 &    0.00363 &    0.05729 &    0.00086 &       0.85 &       1183 &         19 &       1132 &         14 &       1038 &         21 &       1038 &         21 &       -4.5 \\          Sample75\_095 &        115 &         63 &       0.52 &    0.07436 &    0.00097 &    1.76760 &    0.03250 &    0.17284 &    0.00225 &    0.05443 &    0.00147 &       0.70 &       1028 &         12 &       1034 &         12 &       1051 &         25 &       1051 &         25 &        0.6 \\          Sample4\_011 &        313 &        112 &       0.34 &    0.07471 &    0.00102 &    1.64778 &    0.02973 &    0.15997 &    0.00130 &    0.04819 &    0.00038 &       0.59 &        957 &          7 &        989 &         11 &       1061 &         28 &       1061 &         28 &        3.2 \\          Sample46\_062 &         92 &         61 &       0.63 &    0.07483 &    0.00157 &    1.70980 &    0.03796 &    0.16559 &    0.00119 &    0.04824 &    0.00058 &       0.33 &        988 &          7 &       1012 &         14 &       1064 &         43 &       1064 &         43 &        2.4 \\          Sample55\_072 &         46 &         22 &       0.45 &    0.07486 &    0.00112 &    1.68860 &    0.02810 &    0.16368 &    0.00118 &    0.04840 &    0.00063 &       0.44 &        977 &          7 &       1004 &         11 &       1065 &         30 &       1065 &         30 &        2.7 \\          Sample35\_048 &         90 &         24 &       0.25 &    0.07514 &    0.00098 &    1.82660 &    0.02723 &    0.17614 &    0.00129 &    0.05759 &    0.00098 &       0.48 &       1046 &          7 &       1055 &         10 &       1072 &         26 &       1072 &         26 &        0.9 \\          Sample18\_028 &        561 &         85 &       0.14 &    0.07559 &    0.00070 &    1.92580 &    0.02219 &    0.18479 &    0.00126 &    0.05404 &    0.00065 &       0.60 &       1093 &          7 &       1090 &          8 &       1084 &         19 &       1084 &         19 &       -0.3 \\          Sample29\_041 &        175 &         49 &       0.26 &    0.07570 &    0.00091 &    1.85930 &    0.02789 &    0.17804 &    0.00160 &    0.05271 &    0.00074 &       0.60 &       1056 &          9 &       1067 &         10 &       1087 &         24 &       1087 &         24 &        1.0 \\          Sample51\_068 &        261 &         55 &       0.20 &    0.07587 &    0.00074 &    1.89430 &    0.02238 &    0.18110 &    0.00120 &    0.05556 &    0.00067 &       0.56 &       1073 &          7 &       1079 &          8 &       1092 &         20 &       1092 &         20 &        0.6 \\          Sample12\_021 &         76 &         28 &       0.35 &    0.07675 &    0.00137 &    2.00527 &    0.04224 &    0.18950 &    0.00139 &    0.05692 &    0.00041 &       0.41 &       1119 &          8 &       1117 &         14 &       1115 &         34 &       1115 &         34 &       -0.2 \\          Sample57\_075 &        401 &         78 &       0.18 &    0.07679 &    0.00071 &    2.04520 &    0.02418 &    0.19312 &    0.00141 &    0.05962 &    0.00078 &       0.62 &       1138 &          8 &       1131 &          8 &       1116 &         19 &       1116 &         19 &       -0.6 \\          Sample65\_084 &        266 &         74 &       0.26 &    0.07710 &    0.00073 &    1.93020 &    0.02255 &    0.18157 &    0.00123 &    0.05217 &    0.00063 &       0.59 &       1076 &          7 &       1092 &          8 &       1124 &         18 &       1124 &         18 &        1.5 \\          Sample58\_076 &        601 &        159 &       0.25 &    0.07752 &    0.00091 &    1.90717 &    0.02972 &    0.17844 &    0.00146 &    0.05354 &    0.00043 &       0.59 &       1058 &          8 &       1084 &         10 &       1135 &         23 &       1135 &         23 &        2.4 \\          Sample48\_064 &        187 &         55 &       0.28 &    0.07758 &    0.00078 &    1.95780 &    0.02532 &    0.18325 &    0.00150 &    0.05632 &    0.00073 &       0.63 &       1085 &          8 &       1101 &          9 &       1136 &         20 &       1136 &         20 &        1.5 \\          Sample70\_090 &       1088 &        142 &       0.12 &    0.07760 &    0.00065 &    1.94820 &    0.02081 &    0.18211 &    0.00120 &    0.05477 &    0.00071 &       0.62 &       1078 &          7 &       1098 &          7 &       1137 &         16 &       1137 &         16 &        1.8 \\          Sample9\_017 &        707 &         67 &       0.09 &    0.07766 &    0.00072 &    1.98460 &    0.02546 &    0.18535 &    0.00142 &    0.05560 &    0.00042 &       0.62 &       1096 &          8 &       1110 &          9 &       1138 &         17 &       1138 &         17 &        1.3 \\          Sample28\_040 &        236 &         93 &       0.37 &    0.07769 &    0.00071 &    2.10680 &    0.02344 &    0.19631 &    0.00126 &    0.05795 &    0.00070 &       0.57 &       1155 &          7 &       1151 &          8 &       1139 &         18 &       1139 &         18 &       -0.3 \\          Sample32\_045 &        615 &         15 &       0.02 &    0.07771 &    0.00071 &    2.05090 &    0.02447 &    0.19152 &    0.00146 &    0.06149 &    0.00086 &       0.64 &       1130 &          8 &       1133 &          8 &       1139 &         18 &       1139 &         18 &        0.3 \\          Sample66\_086 &        603 &        111 &       0.17 &    0.07769 &    0.00068 &    2.14310 &    0.02462 &    0.20000 &    0.00150 &    0.05516 &    0.00061 &       0.65 &       1175 &          8 &       1163 &          8 &       1139 &         17 &       1139 &         17 &       -1.0 \\          Sample77\_098 &         67 &         39 &       0.55 &    0.07788 &    0.00093 &    2.25830 &    0.03244 &    0.21035 &    0.00166 &    0.06047 &    0.00079 &       0.56 &       1231 &          9 &       1199 &         10 &       1144 &         23 &       1144 &         23 &       -2.7 \\          Sample49\_065 &        259 &         77 &       0.28 &    0.07812 &    0.00078 &    2.08720 &    0.02524 &    0.19377 &    0.00132 &    0.05760 &    0.00069 &       0.56 &       1142 &          7 &       1145 &          8 &       1150 &         20 &       1150 &         20 &        0.3 \\          Sample53\_070 &        241 &         78 &       0.30 &    0.07811 &    0.00105 &    2.04369 &    0.03374 &    0.18976 &    0.00134 &    0.05689 &    0.00039 &       0.50 &       1120 &          7 &       1130 &         11 &       1150 &         27 &       1150 &         27 &        0.9 \\          Sample59\_077 &        566 &         97 &       0.16 &    0.07831 &    0.00071 &    2.18410 &    0.02590 &    0.20262 &    0.00154 &    0.06194 &    0.00081 &       0.64 &       1189 &          8 &       1176 &          8 &       1155 &         18 &       1155 &         18 &       -1.1 \\          Sample63\_082 &        938 &        154 &       0.15 &    0.07832 &    0.00068 &    2.04960 &    0.02315 &    0.18987 &    0.00137 &    0.05157 &    0.00067 &       0.64 &       1121 &          7 &       1132 &          8 &       1155 &         16 &       1155 &         16 &        1.0 \\          Sample44\_059 &       1129 &        233 &       0.19 &    0.07847 &    0.00077 &    1.87500 &    0.03053 &    0.17344 &    0.00225 &    0.04472 &    0.00192 &       0.80 &       1031 &         12 &       1072 &         11 &       1159 &         20 &       1159 &         20 &        3.8 \\          Sample64\_083 &        215 &         68 &       0.30 &    0.07846 &    0.00078 &    2.13130 &    0.02589 &    0.19701 &    0.00136 &    0.05750 &    0.00069 &       0.57 &       1159 &          7 &       1159 &          8 &       1159 &         19 &       1159 &         19 &        0.0 \\          Sample43\_058 &         45 &         32 &       0.67 &    0.07873 &    0.00134 &    2.16880 &    0.04132 &    0.20015 &    0.00172 &    0.05757 &    0.00081 &       0.45 &       1176 &          9 &       1171 &         13 &       1165 &         34 &       1165 &         34 &       -0.4 \\          Sample19\_029 &        206 &         58 &       0.27 &    0.07890 &    0.00077 &    2.25440 &    0.03000 &    0.20735 &    0.00187 &    0.05934 &    0.00077 &       0.68 &       1215 &         10 &       1198 &          9 &       1170 &         19 &       1170 &         19 &       -1.4 \\          Sample17\_027 &       1052 &         39 &       0.03 &    0.07894 &    0.00065 &    2.01476 &    0.02263 &    0.18510 &    0.00154 &    0.05543 &    0.00046 &       0.72 &       1095 &          8 &       1120 &          8 &       1171 &         16 &       1171 &         16 &        2.2 \\          Sample26\_038 &        488 &        140 &       0.27 &    0.07907 &    0.00070 &    2.14030 &    0.02450 &    0.19639 &    0.00141 &    0.05700 &    0.00074 &       0.63 &       1156 &          8 &       1162 &          8 &       1174 &         18 &       1174 &         18 &        0.5 \\          Sample13\_022 &        175 &         41 &       0.22 &    0.07910 &    0.00079 &    2.32380 &    0.03095 &    0.21300 &    0.00187 &    0.06711 &    0.00114 &       0.66 &       1245 &         10 &       1220 &          9 &       1175 &         20 &       1175 &         20 &       -2.0 \\          Sample37\_051 &         31 &         14 &       0.44 &    0.07957 &    0.00127 &    2.11760 &    0.03973 &    0.19307 &    0.00189 &    0.06030 &    0.00096 &       0.53 &       1138 &         10 &       1155 &         13 &       1186 &         32 &       1186 &         32 &        1.5 \\          Sample74\_094 &         66 &         37 &       0.52 &    0.07966 &    0.00112 &    2.20670 &    0.03526 &    0.20105 &    0.00155 &    0.05839 &    0.00076 &       0.48 &       1181 &          8 &       1183 &         11 &       1189 &         26 &       1189 &         26 &        0.2 \\          Sample73\_093 &        370 &         86 &       0.22 &    0.07978 &    0.00076 &    2.12390 &    0.02481 &    0.19272 &    0.00131 &    0.05831 &    0.00082 &       0.58 &       1136 &          7 &       1157 &          8 &       1192 &         18 &       1192 &         18 &        1.8 \\          Sample27\_039 &        925 &        231 &       0.23 &    0.07983 &    0.00069 &    2.00430 &    0.02130 &    0.18210 &    0.00111 &    0.05542 &    0.00061 &       0.58 &       1078 &          6 &       1117 &          7 &       1193 &         17 &       1193 &         17 &        3.5 \\          Sample56\_074 &        935 &        270 &       0.27 &    0.07986 &    0.00079 &    1.64890 &    0.04587 &    0.14818 &    0.00385 &    0.04640 &    0.00097 &       0.93 &        891 &         22 &        989 &         18 &       1194 &         20 &       1194 &         20 &        9.9 \\          Sample52\_069 &        339 &         92 &       0.26 &    0.08018 &    0.00078 &    2.20630 &    0.02614 &    0.19963 &    0.00136 &    0.05742 &    0.00069 &       0.57 &       1173 &          7 &       1183 &          8 &       1201 &         19 &       1201 &         19 &        0.8 \\          Sample60\_078 &        153 &         54 &       0.33 &    0.08037 &    0.00080 &    2.40630 &    0.02937 &    0.21715 &    0.00152 &    0.05705 &    0.00068 &       0.58 &       1267 &          8 &       1244 &          9 &       1206 &         19 &       1206 &         19 &       -1.8 \\          Sample40\_054 &        776 &         59 &       0.07 &    0.08042 &    0.00075 &    2.31440 &    0.02736 &    0.20887 &    0.00152 &    0.06238 &    0.00081 &       0.61 &       1223 &          8 &       1217 &          8 &       1207 &         19 &       1207 &         19 &       -0.5 \\          Sample78\_099 &        889 &        122 &       0.13 &    0.08091 &    0.00074 &    2.27562 &    0.03090 &    0.20399 &    0.00168 &    0.06092 &    0.00051 &       0.67 &       1197 &          9 &       1205 &         10 &       1219 &         17 &       1219 &         17 &        0.7 \\          Sample31\_044 &        975 &         67 &       0.06 &    0.08101 &    0.00072 &    1.72390 &    0.01931 &    0.15423 &    0.00105 &    0.03562 &    0.00057 &       0.61 &        925 &          6 &       1017 &          7 &       1222 &         18 &       1222 &         18 &        9.0 \\          Sample36\_050 &        656 &         76 &       0.11 &    0.08140 &    0.00072 &    2.21600 &    0.02496 &    0.19758 &    0.00136 &    0.06002 &    0.00066 &       0.62 &       1162 &          7 &       1186 &          8 &       1231 &         17 &       1231 &         17 &        2.0 \\          Sample23\_034 &        317 &         95 &       0.28 &    0.08145 &    0.00075 &    2.45010 &    0.02862 &    0.21820 &    0.00157 &    0.06418 &    0.00071 &       0.62 &       1272 &          8 &       1257 &          8 &       1232 &         18 &       1232 &         18 &       -1.2 \\          Sample25\_036 &        165 &         52 &       0.29 &    0.08160 &    0.00082 &    2.30110 &    0.03254 &    0.20452 &    0.00205 &    0.06704 &    0.00080 &       0.70 &       1200 &         11 &       1213 &         10 &       1236 &         20 &       1236 &         20 &        1.1 \\          Sample61\_080 &        406 &        279 &       0.65 &    0.08182 &    0.00074 &    2.26150 &    0.02592 &    0.20045 &    0.00142 &    0.05558 &    0.00067 &       0.61 &       1178 &          8 &       1200 &          8 &       1241 &         17 &       1241 &         17 &        1.8 \\          Sample33\_046 &        252 &         88 &       0.33 &    0.08227 &    0.00082 &    2.39580 &    0.02938 &    0.21130 &    0.00150 &    0.06177 &    0.00074 &       0.58 &       1236 &          8 &       1241 &          9 &       1252 &         20 &       1252 &         20 &        0.4 \\          Sample21\_032 &        465 &        311 &       0.63 &    0.08380 &    0.00071 &    2.41950 &    0.02619 &    0.20946 &    0.00140 &    0.06111 &    0.00067 &       0.62 &       1226 &          7 &       1248 &          8 &       1288 &         16 &       1288 &         16 &        1.8 \\          Sample38\_052 &        258 &         88 &       0.32 &    0.08480 &    0.00078 &    2.53110 &    0.03053 &    0.21619 &    0.00169 &    0.06193 &    0.00074 &       0.65 &       1262 &          9 &       1281 &          9 &       1311 &         18 &       1311 &         18 &        1.5 \\          Sample81\_103 &        165 &         70 &       0.40 &    0.08491 &    0.00085 &    2.48350 &    0.03308 &    0.21223 &    0.00187 &    0.06244 &    0.00069 &       0.66 &       1241 &         10 &       1267 &         10 &       1313 &         18 &       1313 &         18 &        2.1 \\          Sample47\_063 &        643 &        195 &       0.28 &    0.09016 &    0.00144 &    1.56680 &    0.06750 &    0.12936 &    0.00517 &    0.07140 &    0.00193 &       0.93 &        784 &         30 &        957 &         27 &       1429 &         29 &       1429 &         29 &       18.1 \\          Sample24\_035 &        357 &         63 &       0.16 &    0.09045 &    0.00089 &    2.29137 &    0.04104 &    0.18373 &    0.00234 &    0.05422 &    0.00068 &       0.82 &       1087 &         13 &       1210 &         13 &       1435 &         19 &       1435 &         19 &       10.2 \\          Sample30\_042 &         87 &         27 &       0.29 &    0.10088 &    0.00111 &    4.01770 &    0.05946 &    0.28855 &    0.00286 &    0.08544 &    0.00120 &       0.67 &       1634 &         14 &       1638 &         12 &       1640 &         19 &       1640 &         19 &        0.2 \\     \end{longtable}     \end{center}     \end{landscape}     \end{document}


title: Can I make an arrow of length x in latex?

text: I was making a quick graph in TexStudio, but I founnd I can not make an arrow of a length X. The only way I found to do what I want is this: Minimum length for \xrightarrow In my opinion this is a workaround and it probably can be done neater/faster with a package of sort. EDIT: The reason the quoted answer does not work for me is because I also need a diagonal arrow with length x.


title: evaluate a string like `sin(x)+3` with `x` given

text: I defined a macro that gets as input a string like `sin(x)+3`, a starting `x` and an ending `x`, which is plotted using `\addplot` from PGFplots. Now I want to evaluate this function for `x` equal to the ending `x` provided to the macro as an argument, to find out at what height the function ends. The problem is: **how to evaluate a string like`sin(x)+3` with `x` given**? I tried to use `pgfmathparse` but failed, and I know there are solutions with `\x` instead, but I want to use only the string `sin(x)+3`. EDIT: Ok this is my code so far:               \renewcommand\line[2]{\addplot[domain=#1]{#2};}     \newcommand\dotted[2]{\addplot[dotted] plot[] coordinates{(#1)(#2)};\addplot[holdot] coordinates{(#1)};\addplot[holdot] coordinates{(#2)};}          \newcommand\pwpreviousset{0}     \newcommand\pwpreviousx{0}     \newcommand\pwpreviousy{0}     \newcommand\pwstart[1]{\renewcommand\pwpreviousset{0}\renewcommand{\pwpreviousx}{#1}}     \newcommand\pw[4]     {     \ifnum\pwpreviousset=1         \dotted{{\pwpreviousx,\pwpreviousy}}{{\pwpreviousx,#1}}     \fi     \line{\pwpreviousx:#4}{#2}     \renewcommand{\pwpreviousx}{#4}     \renewcommand{\pwpreviousy}{#3}     \renewcommand\pwpreviousset{1}     }      The code above works perfectly, only i want arguments 1 and 3 of macro `pw` to be automaticly determined. These arguments represent the starting and ending y value of the function that is argument 2. I use them like this:               \pwstart{0}     \pw{1}{1+x}{4}{3}     \pw{-1}{2-x}{-2}{4}      But I want to determine the starting `y` and ending `y` programmaticly.


title: Table of content margin

text: According to the below the figure, how can i adjust the margin of table of content according to the red line ![enter image description here](http://i.stack.imgur.com/DuwOv.png)               \usepackage[titles]{tocloft}     \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}     \renewcommand{\cftchapfont}{\mdseries}     \renewcommand{\cftchappagefont}{\mdseries}     \renewcommand\cftsecdotsep{\cftdot}     \renewcommand\cftsubsecdotsep{\cftdot}     \renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}


title: How to cut the space of the closing in moderncv cover letter?

text: I am writing a cover letter using `moderncv`. The problem is when executing the latex file I get two pages with only my name in the second page. I would like to cut the space between `sincerely` and `my name`. How to do this ?               \makeletterclosing      will produce for example               Sincerely        |         |        |---------------------> How to cut the space or make it small        |                       so that my name can be in the first page?                  |     My name


title: How to keep my TeX Live installation up to date?

text: What is the recommended way to keep my TeX Live installation up to date? Is there any package manager (like MiKTeX on Windows) that could help me with this? If it helps I'm running on Mac OS X and my installation comes from MacTeX, but I guess solutions for other *nix systems might also be useful.


title: Using math-rm and parse-numbers option in math environment for siunitx

text: I would like to achieve the following for the number part using the `math-rm` and `parse-number` option in `siunitx`:               $[(12+2)\times n]$      However, I observe that when I turn the `math-rm` option to `\mathnormal`, the font of number is changed:               \begin{align*}     \SI[math-rm=\mathnormal, parse-numbers=false]{[(12+2)\times n]}{g.mol^{-1}}&=\SI{420}{g.mol^{-1}} \\     \SI[parse-numbers=false]{[(12+2)\times n]}{g.mol^{-1}}&=\SI{420}{g.mol^{-1}}      \end{align*}      How can I format the number in the number range as in `$[(12+2)\times n]$` but doesn't change the number font in math environment?


title: 3d sphere style changes coordinates?

text: i took this one http://www.texample.net/tikz/examples/map-projections and rebuild or changed it for my use. This is a crosspost to: http://latex- community.org/forum/viewtopic.php?f=45&t=25078&p=85229#p85229 I got the problem that the code I modified is kinda old so... well I show you: I want this: ![what i want](http://i.stack.imgur.com/nWK2R.jpg) which works in writeLatex, the problem is it uses estyle which leads to removed latitude and longitude circles using texniccenter and miktex: ![what i don't want](http://i.stack.imgur.com/x4NVO.jpg) Replacing estyle by style, makes the lines appear again, but confused all the nodes: ![what i get](http://i.stack.imgur.com/eIX82.jpg) As far as I now this is a problem of the old code I am using, I would really appreciate some suggestions or somebody who knows the changes of tikz from i guess 1.5 to 3.0+ Maybe somebody knows simply how to place my points right again, I guess the rest would drop in then. Thanks and kind regards sty               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc,fadings,decorations.pathreplacing}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{5pt}     \pagestyle{empty}          %% helper macros     \newcommand\pgfmathsinandcos[3]{%       \pgfmathsetmacro#1{sin(#3)}%       \pgfmathsetmacro#2{cos(#3)}%     }     \newcommand\LongitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % azimuth       \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}     }     \newcommand\LatitudePlane[3][current plane]{%       \pgfmathsinandcos\sinEl\cosEl{#2} % elevation       \pgfmathsinandcos\sint\cost{#3} % latitude       \pgfmathsetmacro\yshift{\cosEl*\sint}       \tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %     }     \newcommand\DrawLongitudeCircle[2][4]{       \LongitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}        % angle of "visibility"       \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %       \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);       \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);     }     \newcommand\DrawLatitudeCircle[2][5]{       \LatitudePlane{\angEl}{#2}       \tikzset{current plane/.prefix style={scale=#1}}       \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}       % angle of "visibility"       \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}         \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);       \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);     }          %% document-wide tikz options and styles     \tikzset{%       >=latex, % option for nice arrows       inner sep=0pt,%       outer sep=2pt,%       mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,fill=black,circle}%     }          \begin{document}          \begin{tikzpicture} % CENT          %% some definitions     \def\R{4} % sphere radius     \def\angEl{35} % elevation angle     \def\angAz{-105} % azimuth angle     \def\angPhi{-40} % longitude of point P     \def\angBeta{25} % latitude of point P          %% working planes     \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole     \tikzset{xyplane/.estyle={cm={cos(\angAz),sin(\angAz)*sin(\angEl),-sin(\angAz),cos(\angAz)*sin(\angEl),(0,-\H)}}}     \LongitudePlane[xzplane]{\angEl}{\angAz}     \LongitudePlane[pzplane]{\angEl}{\angPhi}     \LongitudePlane[yzplane]{\angEl}{\angAz+90}     \LatitudePlane[equator]{\angEl}{0}          %% draw xyplane and sphere     \fill[ball color=white] (0,0) circle (\R); % 3D lighting effect     \draw (0,0) circle (\R);          \coordinate (O) at (0,0);     \coordinate[mark coordinate] (N) at (0,\H);     \coordinate[mark coordinate] (S) at (0,-\H);     %\path[pzplane] (\angBeta:\R) coordinate[mark coordinate] (P);     \path[pzplane] (\angBeta:\R) coordinate[mark coordinate] (P1);     \path[pzplane] (-\angBeta:\R) coordinate[mark coordinate] (P2);     \path[pzplane] (\angBeta:2.2*\R) coordinate (P11);     \path[pzplane] (-\angBeta:1.8*\R) coordinate (P22);     \path[pzplane] (\angBeta:0.5*\R) coordinate (P15);     \path[pzplane] (-\angBeta:0.5*\R) coordinate (P25);          %% draw meridians and latitude circles     \DrawLatitudeCircle[\R]{0} % equator     \DrawLongitudeCircle[\R]{\angAz} % xzplane     \DrawLongitudeCircle[\R]{\angAz+90} % yzplane     \DrawLongitudeCircle[\R]{\angPhi} % pzplane          %% draw xyz coordinate system          \draw[xzplane,->] (0,0) -- (1.9*\R,0) node[below] {$x$};     \draw[yzplane,->] (0,0) -- (1.4*\R,0) node[below] {$y$};     \draw[->]                 (0,0) -- (0,1.3*\R) node[above] {$z$};     \draw[pzplane,->] (0,0) -- (1.5*\R,0) node[below] {$x_{2}$};          %% draw lines and put labels     \draw[dashed] (S) -- (N) +(0.3ex,0.6ex) node[above left] {$\mathbf{N}$};     \path (S) +(0.4ex,-0.4ex) node[below] {$\mathbf{S}$};     \draw[dashed] (P11) -- (P1) -- (O) -- (P2) -- (P22);     \draw[->,thin] (P22) to[bend right=25] node[pos=0.5,right] {$\beta$} (P11);     \draw[equator,->,thin] (\angAz:0.5*\R) to[bend right=30] node[pos=0.44,below]   {$\theta$} (\angPhi:0.5*\R);          \end{tikzpicture}     \end{document}       This is a bloody workaround, by setting the points manually.               %######################################################################     % alternative to good style method     \coordinate[mark coordinate] (P1) at (2.775,0.05); %good     \coordinate (P11) at (6.1,0.115); %good     \coordinate (pt15) at (1.39,0.02); %good     \coordinate[mark coordinate] (P2) at (2.78,-2.725); %good     \coordinate (P22) at (5,-4.9); %good     \coordinate (P25) at (1.39,-1.36); %good     %######################################################################          %######################################################################     % more alternative or workaround     %\coordinate[mark coordinate,red] (x1) at (-1.95,-4.2);     \coordinate (x1) at (-1.95,-4.2);     \draw[->] (O)--(x1) node[below] {$x_{CIO}$};     \coordinate (y1) at (5.45,-0.81);     \draw[->] (O) -- (y1) node[below] {$y_{CIO}$};     \coordinate (x2) at (4.6,-2.2);     \draw[->] (O) -- (x2) node[below] {$x_{TIO}$};     \coordinate (z1) at (0,5);     \draw[->]           (O) -- (z1) node[above] {$z_{CIP}$};     %######################################################################


title: beamer cambridgeus theme - title color

text: How to make the title color in the beamer cambrigeus theme as red. Here is the MWE:               \documentclass[12pt]{beamer}     \usetheme{CambridgeUS}     \usecolortheme{beaver}     \title[Semantic Web ranking]{Ranking of Web Documents using Semantic Similarity}     \author{Subham Soni}     \date{19.8.2014}     \begin{document}     \maketitle     \end{document}


title: Beamer automatic overlay and quote play oddly together

text: Consider the following MWE:               \documentclass{beamer}          \begin{document}     \begin{frame}       \begin{itemize}[<+-|alert@+>]       \item Foo       \item Bar         \begin{quote}           God doesn't play dice with the world         \end{quote}       \item Hello       \item World       \end{itemize}     \end{frame}     \end{document}      that yields: ![enter image description here](http://i.stack.imgur.com/IBqQy.gif) As you can notice, the quoted text is treated as an item. For me it seems more natural to expect that when the second item `bar` is uncovered then the quoted text will be uncovered as well (and alerted). After all, `bar` and the text constitute a single item. Are my expectations wrong? How can I obtain the expected behavior? **BTW:** If you replace `quote` with `center` then the expected behavior is in place...


title: Include image by pointing to alias

text: For my document I have an image folder that holds my images. For this example I will assume the following situation: Original image path: `~/Matlab/filename.pdf`   Image folder path: `~/Latex/images`   Alias to image: `~/Latex/images/filename.pdf` I want to include the image by pointing to the alias of the image. In this way the image will be updated when Matlab updates `filename.pdf` in the `~/Matlab` folder. I've tried it as follows:               \begin{figure}[!htpb]      \centering      \includegraphics[clip=true, trim=0 170 0 170, width=0.33\linewidth, angle=0]{images/filename.pdf}      \caption{CAPTION}      \label{fig:}      \end{figure}      However, TexShop (I'm on a Mac) does not like this and produces the following error:               !pdfTeX error: /usr/texbin/pdflatex (file ./images/mountdiff.pdf): xpdf: reading PDF image failed      ==> Fatal error occurred, no output PDF file produced!      How can I link to the file in the Matlab folder, without typing the whole path in the `\includegraphics` line. Typing the whole path is undesirable as it is much longer than the example suggests.


title: Change ieetr bibliography style to last name first

text: I'm using the `ieeetr` bibliography style for my references and I'm getting initials then last name, how would I change this to last name first? Here is what it looks like at the moment: > `[1]` X. Chen, H. Niu, D. Li, and Y. Li, “Intrinsic correlation between > hardness and elasticity in polycrystalline materials and bulk metallic > glasses,” arXiv preprint arXiv:1102.4063, (2011). and this is what I'd like to have: > `[1]` Chen X., Niu H., Li D., and Li Y., “Intrinsic correlation between > hardness and elasticity in polycrystalline materials and bulk metallic > glasses,” arXiv preprint arXiv:1102.4063, (2011). How would I do that? I'm currently using the `\bibliographystyle{ieeetr}` with a slight modification according to this.


title: Refsegment wrong numbering

text: The following MWE prints a cumulative bibliography, subdivided by chapter, using `biblatex`. However there seems to be a problem with the `\therefsegment` counter because I'm getting "References Chapter 2" instead of "References Chapter 1".               \documentclass{book}     \usepackage[refsegment=chapter, backend=bibtex]{biblatex}     \defbibheading{bibbook}[\bibname]{\chapter{#1}}     \defbibheading{subbib}[\refname\space\chaptername\space\therefsegment]{\section{#1}}     \addbibresource{biblatex-examples.bib}          \begin{document}          \frontmatter     \tableofcontents     \chapter{Preface}          \mainmatter     \chapter{First}     \nocite{*}          \backmatter     \setcounter{secnumdepth}{0}      \printbibheading[heading=bibbook]     \bibbysegment[heading=subbib]          \end{document}


title: Link to the bibliography chapter

text: How to make a reference to the bibiography chapter in the document? What I need is something like:               For information about source please refer to the Bibliography.      I want the word "Bibliography" to be a link. A use the simple               \bibliographystyle{plain}     \bibliography{bib/bibtexfolder}


title: Can't use animations with \input?

text: I have two different animations, made with TikZ and the `animate` package, that I want to include in a `beamer` presentation. When I had the code inside of my presentation's `.tex` file everything worked fine, then I tried to move the animation code into separate files and include them with `\input`, and it stops working. Here's the especially weird thing: If I include only one of the animations and comment out the other, the code works. When I include both animations I get an error about               Missing \endgroup inserted      or               Something's wrong: perhaps a missing \item?      depending on whether I comment out the first or second `\input`. Any advice would be most appreciated. Below is a piece of the code just to give you an idea of what I'm doing (my complete preamble is included, just in case one of the other packages is what's causing issues).               \documentclass[xcolor=dvipsnames]{beamer}     \usepackage{mathrsfs}     \usepackage[absolute,overlay]{textpos}     \mode<presentation>     {        \usetheme{Singapore}        \usecolortheme{seahorse}        \setbeamercovered{transparent}     }     \usepackage{tikz}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage[T1]{fontenc}     \usepackage{color}     \usepackage{animate}  % Animations     \usepackage{fp}       % Fixed point calculations     \usepackage{ifthen}     \usepgflibrary{arrows}     \usetikzlibrary{decorations.markings, arrows, decorations.pathmorphing,       backgrounds, positioning, fit, shapes.geometric}          \newcounter{frame}     \setcounter{frame}{0}          \begin{document}     \begin{frame}[fragile]{Animation 1}       \begin{center}         \input{animations/anim1.tex}       \end{center}     \end{frame}          \begin{frame}[fragile]{Animation 2}       \begin{center}         \input{animations/anim2.tex}       \end{center}     \end{frame}     \end{document}      anim1.tex and anim2.tex are identical:               \begin{animateinline}[autoplay, loop, controls, poster=first]{15}       \whiledo{\theframe < 179}{         \begin{tikzpicture}           \draw (-3, -3) rectangle (3, 3);           \filldraw (\theframe : 2cm) circle (0.05cm);         \end{tikzpicture}              \stepcounter{frame}         \ifthenelse{\theframe < 179}{           \newframe         }{         \end{animateinline}        }     }      I'm very much a newbie with the `animate` package, so perhaps someone who's more knowledgeable will easily recognize what's wrong, but this is very frustrating right now. Any help would be most appreciated.


title: Using a lot of marginpars

text: I need to use a lot of `marginpar`s and hit "Too many unprocessed floats" as a result. I'm already using the `morefloats` package with `maxfloats` set to `100`, but it's not enough sometimes. I'm thinking a solution might be to force `marginpar`s to appear where they are declared (like the `H` option for floats). Is there a way to do this? Note: I _do need floats_ for my solution, I cannot use fixed notes, as they have to float in the margin, even if inserted in the middle of a paragraph. Another note: `\FlatBarrier` from the `placeins` package (combined with `morefloats`) helps, but I need to find how to place it so that it doesn't impact my layout. Typically, I would have to call it only when `\marginpar` is called at the beginning of a line, and it would probably solve the issue.


title: Particular bar plot with pgfplots: bar color = category

text: I want to create a bar plot using `pgfplots`. In this plot the bars should be represent categorys. So that one color suggest the category. The categorys are:   * 0-8 None   * 9-13 Minimal   * 14-19 Slightly   * 20-28 Medium heavy   * 29-63 Heavy Subsequent an example, but there are all bar in the same color:               \documentclass[11pt]{standalone}     \usepackage[T1]{fontenc}     \usepackage{fixltx2e}     \usepackage{pgfplots}          \pgfplotsset{compat=1.8}          \begin{document}     \begin{tikzpicture}       \begin{axis}[         xbar,         width=12cm,         height=8cm,         xmajorgrids=true,         yticklabel={\#\ifnum\ticknum<9 0\fi\pgfmathprintnumber\tick},         ytick={1,2,...,10},         xmin=0,         xmax=36,         xtick={5,10,...,30},         xlabel={Sum},         ylabel={Participants},         %nodes near coords,         ymin=0.25,         ymax=10.75,       ]         \addplot coordinates           {(4,1) (16,2) (16,3) (33,4) (5,5) (10,6) (20,7) (8,8) (15,9) (5,10)};       \end{axis}     \end{tikzpicture}     \end{document}      Afterwards it should looks like the attached picture. I'm not sure if it is possible. The order of participants (#01 - #10) should be remain continuously. ![enter image description here](http://i.stack.imgur.com/c9B8K.jpg)


title: Page prefix missing for some entries

text: I am using `biblatex` with `authoryear` and for some of my entries, the page prefix (“S.” in my case) is missing, where I would actually like to have it.               \usepackage[backend=biber,style=authoryear,language=ngerman]{biblatex}      This entry               @ARTICLE{Umemura1990,       author = {Umemura, Takashi},       title = {Ippyôsei ni yatô hanpatsu},       journaltitle = {Asahi Shinbun},       date = {1990-11-11},       titleaddon = {Oppositionsparteien lehnen Ein-Stimmen-System ab},       issuetitle = {Morgenausgabe},       issue = {Tôkyô},       pages = {2-3}     }      gives me this: ![Bibliography entry with pages](http://i.stack.imgur.com/5cbQG.png) But this entry               @ARTICLE{McMaster1963,       author = {John McMaster},       title = {The Takashima Mine: British Capital and Japanese Industrialization},       journaltitle = {Business History Review},       year = {1963},       volume = {38},       number = {3},       pages = {215–239}     }      only yields the following: ![Bibliography entry without pages](http://i.stack.imgur.com/1ylYa.png) Is there any reason why the “S.” is omitted in the second case? I have looked around in `authoryear.bbx`, `biblatex.def` and `standard.bbx` and could not find anything that would clue me in. To me this seems particularly strange because both entries use the `article` driver. I have even found a question where someone wants to _get rid_ of the page prefix (biblatex: no pages for article) so I suppose it should be there by default. `\DeclareFieldFormat[article]{pages}{\mkpageprefix[bookpagination]{#1}}` also lead to no result.


title: Search specific entries in database

text: I have written a command, which takes five arguments to interpolate between two points. Now I tried to get the two points from an `csv` file.               \documentclass{article}     \usepackage{expl3}     \usepackage[ansinew]{inputenc}     \usepackage{datatool}     \usepackage{filecontents}     \begin{filecontents}{tempdatabb.dat}     10 & 100     20 & 130     30 & 150     40 & 170     50 & 190     60 & 210     70 & 250     80 & 290     90 & 350     100 & 410     120 & 550     140 & 690     \end{filecontents}          \makeatletter     \ExplSyntaxOn     \cs_set_eq:NN \ifinstr \tl_if_in:nnTF     \DeclareRobustCommand*\assignvalues[2]{\@assignvalues{#1}{#2}}     \long \def\@assignvalues#1#2{       \seq_set_split:Nnn \l_tmpa_seq { | } {#1}       \seq_set_split:Nnn \l_tmpb_seq { | } {#2}       \seq_mapthread_function:NNN \l_tmpa_seq \l_tmpb_seq \assignvalues@ii     }     \long \def \assignvalues@ii #1#2 { \protected@csedef{#1}{#2} }     \ExplSyntaxOff     \makeatother          \begin{document}     \assignvalues{suchwert}{35}          \DTLsetseparator{&}     \DTLloaddb[keys={temperatur,dichte},noheader]{scoreAA {tempdatabb.dat}     \begin{table}[htbp]     \centering     \begin{tabular}{llr}     \bfseries Temperatur & \bfseries Dichte %     \DTLforeach[\DTLislt{\temperatur}{\suchwert}]{scoreAA}%     {\temperatur=temperatur,\dichte=dichte}{%     \\\temperatur & \dichte      }%     \end{tabular}     \end{table}     \end{document}      I'd like to get the points `(30,150)` and `(40,170)` in four variables as assignment like:               \assignvalues{firstx}{30}     \assignvalues{firsty}{150}     \assignvalues{secondx}{40}     \assignvalues{seconxy}{170}      But the MWE does not work because of               \DTLforeach[\DTLislt{\temperatur}{\suchwert}]{scoreAA}%      If I use               \DTLforeach[\DTLislt{\dichte}{\suchwert}]{scoreAA}%      it works as MWE. Any ideas about this task? This question has been asked @ http://www.mrunix.de/forums/showthread.php?t=74920 (German). Some more Examples about the input/output relation Function (input/output)               %Example 1     %Input:          \assignvalues{suchwert}{35}          %Output:          \assignvalues{firstx}{30}     \assignvalues{firsty}{150}     \assignvalues{secondx}{40}     \assignvalues{seconxy}{170}               %Example 2     %Input:          \assignvalues{suchwert}{85}          %Output:          \assignvalues{firstx}{80}     \assignvalues{firsty}{290}     \assignvalues{secondx}{90}     \assignvalues{seconxy}{350}               %Example 3     %Input:          \assignvalues{suchwert}{105}          %Output:          \assignvalues{firstx}{100}     \assignvalues{firsty}{410}     \assignvalues{secondx}{120}     \assignvalues{seconxy}{550}                    %Example 4     %Input:          \assignvalues{suchwert}{100}          %Output:          \assignvalues{firstx}{100}     \assignvalues{firsty}{410}     \assignvalues{secondx}{120}     \assignvalues{seconxy}{550}      EDITED: More Information @Steven B. Segletes : Here you can see the work which was led to my question. As you can see, I am going to interpolate between to points, as you also can see, I use \assignvalues to make an variable to more values. This assignment code was originally written by Clemens (look @ http://www.mrunix.de/forums/showthread.php?t=73700&page=2&highlight=Goldnas) also as the question was set here. Maybe you can now see, what the goal is?               \documentclass{article}          \usepackage{expl3,xparse}     \usepackage[ansinew]{inputenc}     \usepackage{etoolbox}          \usepackage{array}          \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}          \makeatletter     \ExplSyntaxOn     \cs_set_eq:NN \ifinstr \tl_if_in:nnTF     \DeclareRobustCommand*\assignvalues[2]{\@assignvalues{#1}{#2}}     \long \def\@assignvalues#1#2{       \seq_set_split:Nnn \l_tmpa_seq { | } {#1}       \seq_set_split:Nnn \l_tmpb_seq { | } {#2}       \seq_mapthread_function:NNN \l_tmpa_seq \l_tmpb_seq \assignvalues@ii     }     \long \def \assignvalues@ii #1#2 { \protected@csedef{#1}{#2} }          \DeclareExpandableDocumentCommand{\fpeval}{om}       {         \IfValueTF {#1}           { \fp_to_tl:n { round(#2,#1) } }           { \fp_to_tl:n {#2} }       }          \NewDocumentCommand {\geraden } {r[]r[]}     {     \assignvalues{nachkommastellen}{3}     \assignvalues{#1}{#2}     \fp_set:Nn \kgerade {(\by - \ay) / (\bx - \ax) } % Lineare      \fp_set:Nn \dgerade {\by - (\bx * \kgerade)}  % Lineare      \fp_set:Nn \ygesucht {\dgerade + \kgerade * \gesucht}          \begin{table}[htbp]     \centering     \begin{tabular}{|L{3.55cm}|L{2.55cm}|L{2.55cm}|} \hline     \textbf{Punkt} & \textbf{X-Koordinate} & \textbf{Y-Koordinate} \\ \hline     Punkt\  1 & \fpeval[\nachkommastellen]{\ax } & \fpeval[\nachkommastellen]{\ay } \\ \hline     \textit{Gesuchter\ Punkt} & \textit{ \fpeval[\nachkommastellen]{\gesucht }} &   \textit{\fpeval[\nachkommastellen]{\ygesucht }} \\ \hline     Punkt\  2 & \fpeval[\nachkommastellen]{\bx } & \fpeval[\nachkommastellen]{\by } \\ \hline     \end{tabular}     \end{table}     }     \ExplSyntaxOff     \makeatother               \begin{document}          \geraden[ax|ay|bx|by|gesucht][20|190|30|150|22]          %The Question which has to be solved is, that I can Call first          %fst: \determinevalues{22} => Should give =Pax,Pay,Pbx,Pby.          %secondly I want to call:          \assignvalue{suchwert}{22}     %\geraden[ax|ay|bx|by|gesucht][\pax|\pay|\pbx|\pby|\suchwert]          \end{document}


title: Texmaker: Move "External Viewer" button in the embedded viewer

text: I really like using Texmaker in mac OS but the way I have my work area set up I cannot easily access the button to open the external viewer from the embedded viewer window (I like it squished up to the side). In order to click the button, I have to press the >> button to bring up the option. Is there any way I can change the ordering of the embedded viewer buttons or hide some of them? I like using the embedded viewer as my default, so I don't want to change anything about my setup, other than where that external viewer button is. ![enter image description here](http://i.stack.imgur.com/aUyi2.png)


title: Current section title macro using titlesec

text: I have a macro that contains the title for the current section, however when using the `titlesec` package, it no longer works for `\section` and `\subsection`. I know `titlesec` redefines the functions I'm using, but have not been able to figure out a workaround. MWE:               \documentclass{article}          \usepackage{etoolbox}          \makeatletter     \pretocmd{\@sect}{\gdef\currtitle{#7}}{}{}     \pretocmd{\@ssect}{\gdef\currtitle{#5}}{}{}     \pretocmd{\@part}{\gdef\currtitle{#1}}{}{}     \pretocmd{\@spart}{\gdef\currtitle{#1}}{}{}     \makeatother          \usepackage{titlesec}          \begin{document}     \tableofcontents          \part*{First Starred part}     \currtitle          \part{First Un-starred part}     \currtitle          \section*{First Starred Section}     \currtitle          \section{Second Un-starred Section}     \currtitle          \subsection*{First Starred Subsection}     \currtitle          \subsection{Second Un-starred Subsection}     \currtitle          \end{document}


title: Localize terms in bibtex/biblatex entries

text: Is there a way I could localize terms in my bibtex entries? example: > note = {to appear} I use a bibtex file for articles in english and german and it would be nice to replace the "to appear" in the bibliography with a localized string.


title: How to install a package from an older version of TeXLive?

text: I am using TeXLive 2010. I wanted to try xelatex for better unicode support. But I am unable to install these new packages as the TeXLive mirrors have moved on to 2011.               tlmgr: package repository http://ftp.snt.utwente.nl/pub/software/tex/systems/texlive/tlnet     /opt/texlive/bin/x86_64-linux/tlmgr: The TeX Live versions of the local installation     and the repository being accessed are not compatible:           local: 2010      repository: 2011     (Perhaps you need to use a different CTAN mirror?)  Goodbye.      Can anyone help me resolve this?


title: How can I visualize boxes?

text: > **This question led to a new package:**   >  `lua-visual-debug` Some of you may know the Web Developer Toolbar for Firefox that can outline the block level elements of a page like this:![alt text](http://i.stack.imgur.com/EvA73.png) Is there a way to do something similar with TeX boxes for a complete document?


title: Itemizing elements with a fixed label

text: I saw a very similar question here How to create a custom list and \item element? I want to have               \begin{mylist}{Person}          \myentry {Jack}          \myentry {John}     \end{mylist}      to produce               Person 1 Jack     Person 2 John      it would be better if instead of \myentry I can use item, and if it is possible to get rid of { } around the names.


title: Table rows alternating between column and notes-row

text: I would like to alter my ham-radio logbook so that every other row is a full- length notes row, possibly having the words "notes" in light grey in the background of the full-length row.               +-------+-------+-------+     |header1|header2|header3|     +-------+-------+-------+     |       |       |       |     +-------+-------+-------+     |     notes             |     +-------+-------+-------+     |       |       |       |     +-------+-------+-------+     |     notes             |      +-----------------------+     ...      Here's the code so far: http://pastebin.com/BgHGkhq8               % !TEX encoding = UTF-8 Unicode     \PassOptionsToPackage{table}{xcolor}     \documentclass[12pt,a4paper,oneside,landscape]{article}     \usepackage[utf8]{inputenc}     \usepackage{ngerman}     \usepackage{todonotes}     %\usepackage[cm]{fullpage}     \usepackage{array}     \usepackage[a4paper, left=0.6cm, right=0.5cm,top=3.7cm, bottom=0.5cm]{geometry}          \usepackage[T1]{fontenc}     \newcommand{\changefont}[3]{     \fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}          \usepackage{graphicx,type1cm,eso-pic,color}     \makeatletter     \AddToShipoutPictureBG{         \setlength{\@tempdimb}{.5\paperwidth}         \setlength{\@tempdimc}{0.85\paperheight}         \setlength{\unitlength}{1pt}         \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){         \makebox(0,0){\rotatebox{0}{\textcolor[gray]{.4}         {\fontsize{2cm}{2cm}\selectfont{Amateurfunk-Log DC1TS}}}}}     }          \AddToShipoutPicture*{         \setlength{\@tempdimb}{0.02\paperwidth}         \setlength{\@tempdimc}{0.12\paperheight}         \setlength{\unitlength}{1pt}         \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){         \makebox(0,0){\rotatebox{270}{\textcolor[gray]{0.65}         {\fontsize{1cm}{1cm}\selectfont{Seite 025}}}}}     }          \begin{document}     \changefont{cmss}{m}{n}     \rowcolors{3}{gray!5}{white}     \begin{tabular}{     | >{\centering\arraybackslash}m{2cm} %Datum     | >{\centering\arraybackslash}m{1.3cm}  %Zeit Start     | >{\centering\arraybackslash}m{1.3cm}  %Zeit Ende     | >{\centering\arraybackslash}m{2cm}  %Frequenz     | >{\centering\arraybackslash}m{1.5cm}  %Mode     | >{\centering\arraybackslash}m{3cm}  %Rufzeichen     | >{\centering\arraybackslash}m{3cm}  %Name     | >{\centering\arraybackslash}m{3cm}  %QTH     | >{\centering\arraybackslash}m{1.3cm} %Power     | >{\centering\arraybackslash}m{0.9cm} %Report gegeben     | >{\centering\arraybackslash}m{0.9cm} %Report erhalten     | >{\centering\arraybackslash}m{0.8cm} %QSL gesendet     | >{\centering\arraybackslash}m{0.8cm} %QSL erhalten     |}      \hline      Datum &      \multicolumn{2}{c|}{Zeit UTC} &      Frequenz &      Mode &      Rufzeichen &      Name &      QTH &      Power &      \multicolumn{2}{c|}{Report} &      \multicolumn{2}{c|}{QSL}  \\ [1ex]          & Start & Ende & (MHz) &  &  & & & (W) & geg. & empf. & ges. & erh. \\ [1ex]     \hline      & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline       & : & : & & & & & & & & & & \\ [4ex]     \hline      & : & : & & & & & & & & & & \\ [4ex]     \hline      & : & : & & & & & & & & & & \\ [4ex]     \hline      & : & : & & & & & & & & & & \\ [4ex]     \hline      & : & : & & & & & & & & & & \\ [4ex]     \hline      \end{tabular}     \pagebreak                    \end{document}     \endinput      Edit 1: For clarification: For now I use this to simply print out empty forms to be filled out by hand; later on I am thinking about integrating this into my (very rough, ie. pre alpha) `sqlite` based, text-only (ie. console - think nanonote and ham radio logging :) logbook "application" (just a bunch of scripts, really).


title: How to align the top frame edges of source and formatted text with the same horizontal line?

text: The following code will be referred multiple times in my questions later. Patching is needed to make the frames of both source code and formatted text inside the text width.               \documentclass{article}     \usepackage[showframe=false,a5paper,margin=1cm]{geometry}          \usepackage{showexpl,xcolor,caption}     \captionsetup     {             margin=5mm,             font={color=blue,rm,scriptsize},             labelfont={color=magenta,bf},             justification=justified,             labelsep=quad     }          \usepackage{etoolbox}     \makeatletter     \patchcmd{\SX@codeInput}{xleftmargin=0pt,xrightmargin=0pt}{}       {\typeout{***Successfully patched \protect\SX@codeInput***}}       {\typeout{***ERROR! Failed to patch \protect\SX@codeInput***}}     \makeatother          \lstset     {         language={[LaTeX]TeX},            breaklines=true,         basicstyle=\scriptsize\ttfamily,         keywordstyle=\color{blue}\sffamily\bfseries,                                            backgroundcolor=\color{yellow!10},         frame=single,         rulecolor=\color{red},         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         % the following must be defined to make hacking work.         xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,          xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         vsep=2\fboxsep,         explpreset={}%must be called even if empty     }          \newcommand\dummy     {%         Anger is a condition in which the tongue works faster than the mind \ldots     }          \parindent=0pt          \begin{document}     \dummy     \begin{LTXexample}[caption=\dummy]     \dummy     \[E\not=mc^2\]     \end{LTXexample}     \dummy     \end{document}      ## Question > The other 3 questions have been removed and the following one is left to > support the answer provided by Herbert. Use _edit history_ button to see the > original. In side-by-side mode (either `pos=l` or `pos=r`), how to align the top frames with the same horizontal line? Herbert's answer plus `aboveskip=\dimexpr\fboxsep+\fboxrule\relax` will answer this question.


title: Customizing indentation in section and subsection headings

text: I would like to be able to `\renewcommand\section` and get LaTeX to format the section and subsection headings so that their numbers are left-justified, and the headings are exactly above the paragraph indentation:               1          Section title     1.1        Subsection title                Start of paragraph      I found advice to change the indentation of the Section title like so:               \renewcommand\section{%      \def\@seccntformat##1{\csname the##1\endcsname\hspace{_____}}      \@startsection{your}{parameters}{here}...     }      If I insert `1in` in the `\hspace` command, I get exactly one inch from the end of the section number. I want 1 inch from the left margin, so something like `\hspace{1in \@minus \width\csname}`, or something like that. That command doesn't work, but at least shows my intention.


title: Using non-ASCII characters in packages

text: What is the best way to use non-ASCII (say, Cyrillic) characters in a .sty file? If it's used in a LaTeX file that uses `\inputenc[utf8]{inputenc}`, than one can just use utf8 encoding in the .sty file and everything's fine. Or the other way round: one can add `\RequirePackage[utf8]{inputenc}` to the .sty file. But in any case, the author of .tex file has to use the encoding used in .sty file. Is there a way to specify encoding in the .sty file, so it may be used in a .tex file in any encoding? (Recipe that is also compatible with XeLaTeX would be especially nice.)


title: change the color of the frame

text: I was making slides using WinEdt. I took codes from someone. I want to change the color of the frames appearing in the slides. I tried using different themes but no success. Can anybody help me. Thanks a lot for help. Here is my code. I want to change the color blue to some other color in addition to change of background color.               \documentclass[ucs,10pt]{beamer}          \usepackage{amsthm}          \usepackage{colortbl}          \usepackage{hyperref}          \usepackage{beamerthemesplit}     \usepackage{bibentry}     \usepackage{color}     \date{}     \PassOptionsToClass{t,hyperref={pdfpagelabels=false,plainpages=false}}{beamer}     \providecommand\thispdfpagelabel[1]{}     \mode<presentation>      \usepackage{array}      \setlength{\arrayrulewidth}{0.6pt}     \usecolortheme{Blue}     \usetheme{Antibes}     \useinnertheme{rounded}     \setbeamercolor{itemize item}{fg=orange}     \setbeamercovered{transparent}     \newtheorem{defi}{Definition}     \renewenvironment{definition}{\begin{defi}}{\end{defi}}     \newtheorem{defis}{Definitions}     \renewenvironment{definitions}{\begin{defis}}{\end{defis}}     \newtheorem{facte}{Fait}     \renewenvironment{fact}{\begin{facte}}{\end{facte}}     \newtheorem{coro}{Corollaire}     \renewenvironment{corollary}{\begin{coro}}{\end{coro}}     \newtheorem{theo}{Theorem}     \renewenvironment{theorem}{\begin{theo}}{\end{theo}}     \newtheorem{Remark}{Remark}[section]     \newtheorem{exa}{Example}     \renewenvironment{example}{\begin{exa}}{\end{exa}}     \newcommand{\bea}{\begin{eqnarray}}     \newcommand{\eea}{\end{eqnarray}}     \newcommand{\bee}{\begin{eqnarray*}}     \newcommand{\eee}{\end{eqnarray*}}     \newcommand{\be}{\begin{equation}}     \newcommand{\ee}{\end{equation}}     \newcommand{\ba}{\begin{array}}     \newcommand{\ea}{\end{array}}     \newcommand{\bi}{\begin{itemize}}     \newcommand{\ei}{\end{itemize}}     \newcommand{\bc}{\begin{center}}     \newcommand{\ec}{\end{center}}     \newcommand{\bfr}{\begin{flushright}}     \newcommand{\efr}{\end{flushright}}     \newcommand{\f}{\frac}     \usepackage{rotating}      ![enter image description here](http://i.stack.imgur.com/g1fzS.jpg)


title: How to add a caption to a LyX table (with table numbering) using the menus?

text: I know nothing about TEX/LaTeX so I use LyX. I created a table using the LyX menu: _Insert_ > _Table..._ , changed the Rows and Columns values, hit the OK button, and here it is there. However, I can't find out how to add a table numbering and caption at the bottom of it. I would not like to get into the code. Is it possible to do that using the menu?


title: Customizing unit display position

text: How can I adjust the placement of `y unit` with `pgfplots`? I'm trying to put it near the top-left corner of the graph box. However, there _may_ (but does not have to) be a scientific multiplier. As shown in the professionally type- set picture below, the unit should be displayed just after the multiplier and of course be lined up with it as if written as a whole: `$10^3$[m]`. In case values on `y` axis were smaller and exponential notation wasn't shown, the `[m]` unit should be still rendered above the top-left corner, but preferably closer to the left edge. ![output graph](http://i.stack.imgur.com/72XTS.jpg) I'm aware of the fact that the `[m]` unit in the picture is drawn along with `y` axis label. I don't need to put the whole `y label` near the multiplier, but just the unit. In fact I don't need the axis label at all. Is it possible to control how the scientific multiplier is formatted and append a unit? I'm not sure whether it's important, but for the sake of completeness, let me add that I have incorporated Jake's tick scaling solution from here to have only exponents, which are a multiple of 3. MWE provided:               \documentclass{minimal}     \usepackage{pgfplots}     \usepgfplotslibrary{units}          \makeatletter          \newif\ifpgfplots@scaled@x@ticks@engineering     \pgfplots@scaled@x@ticks@engineeringfalse     \newif\ifpgfplots@scaled@y@ticks@engineering     \pgfplots@scaled@y@ticks@engineeringfalse     \newif\ifpgfplots@scaled@z@ticks@engineering     \pgfplots@scaled@z@ticks@engineeringfalse          \pgfplotsset{         scaled x ticks/engineering/.code=         \pgfplots@scaled@x@ticks@engineeringtrue,         scaled y ticks/engineering/.code=         \pgfplots@scaled@y@ticks@engineeringtrue,         scaled z ticks/engineering/.code=         \pgfplots@scaled@y@ticks@engineeringtrue,         %    scaled ticks=engineering  % Uncomment this line if you want "engineering" to be on by default     }          \def\pgfplots@init@scaled@tick@for#1{%         \global\def\pgfplots@glob@TMPa{0}%         \expandafter\pgfplotslistcheckempty\csname pgfplots@prepared@tick@positions@major@#1\endcsname         \ifpgfplotslistempty         % we have no tick labels. Omit the tick scale label as well!         \else         \begingroup         \ifcase\csname pgfplots@scaled@ticks@#1@choice\endcsname\relax         % CASE 0 : scaled #1 ticks=false: do nothing here.         \or         % CASE 1 : scaled #1 ticks=true:         %--------------------------------         % the \pgfplots@xmin@unscaled@as@float  is set just before the data         % scale transformation is initialised.         %         % The variables are empty if there is no datascale transformation.         \expandafter\let\expandafter\pgfplots@cur@min@unscaled\csname pgfplots@#1min@unscaled@as@float\endcsname         \expandafter\let\expandafter\pgfplots@cur@max@unscaled\csname pgfplots@#1max@unscaled@as@float\endcsname         %         \ifx\pgfplots@cur@min@unscaled\pgfutil@empty         \edef\pgfplots@loc@TMPa{\csname pgfplots@#1min\endcsname}%         \expandafter\pgfmathfloatparsenumber\expandafter{\pgfplots@loc@TMPa}%         \let\pgfplots@cur@min@unscaled=\pgfmathresult         \edef\pgfplots@loc@TMPa{\csname pgfplots@#1max\endcsname}%         \expandafter\pgfmathfloatparsenumber\expandafter{\pgfplots@loc@TMPa}%         \let\pgfplots@cur@max@unscaled=\pgfmathresult         \fi         %         \expandafter\pgfmathfloat@decompose@E\pgfplots@cur@min@unscaled\relax\pgfmathfloat@a@E         \expandafter\pgfmathfloat@decompose@E\pgfplots@cur@max@unscaled\relax\pgfmathfloat@b@E         \pgfplots@init@scaled@tick@normalize@exponents         \ifnum\pgfmathfloat@b@E<\pgfmathfloat@a@E         \pgfmathfloat@b@E=\pgfmathfloat@a@E         \fi         \xdef\pgfplots@glob@TMPa{\pgfplots@scale@ticks@above@exponent}%         \ifnum\pgfplots@glob@TMPa<\pgfmathfloat@b@E         % ok, scale it:         \expandafter\ifx % Check whether we're using engineering notation (restricting exponents to multiples of three)         \csname ifpgfplots@scaled@#1@ticks@engineering\expandafter\endcsname         \csname iftrue\endcsname         \divide\pgfmathfloat@b@E by 3         \multiply\pgfmathfloat@b@E by 3         \fi         \multiply\pgfmathfloat@b@E by-1         \xdef\pgfplots@glob@TMPa{\the\pgfmathfloat@b@E}%         \else         \xdef\pgfplots@glob@TMPa{\pgfplots@scale@ticks@below@exponent}%         \ifnum\pgfplots@glob@TMPa>\pgfmathfloat@b@E         % ok, scale it:         \expandafter\ifx % Check whether we're using engineering notation (restricting exponents to multiples of three)         \csname ifpgfplots@scaled@#1@ticks@engineering\expandafter\endcsname         \csname iftrue\endcsname         \advance\pgfmathfloat@b@E by -2         \divide\pgfmathfloat@b@E by 3         \multiply\pgfmathfloat@b@E by 3         \fi         \multiply\pgfmathfloat@b@E by-1         \xdef\pgfplots@glob@TMPa{\the\pgfmathfloat@b@E}%         \else         % no scaling necessary:         \xdef\pgfplots@glob@TMPa{0}%         \fi         \fi         \or         % CASE 2 : scaled #1 ticks=base 10:         %--------------------------------         \c@pgf@counta=\csname pgfplots@scaled@ticks@#1@arg\endcsname\relax         %\multiply\c@pgf@counta by-1         \xdef\pgfplots@glob@TMPa{\the\c@pgf@counta}%         \or         % CASE 3 : scaled #1 ticks=real:         %--------------------------------         \pgfmathfloatparsenumber{\csname pgfplots@scaled@ticks@#1@arg\endcsname}%         \global\let\pgfplots@glob@TMPa=\pgfmathresult         \or         % CASE 4 : scaled #1 ticks=manual:         \expandafter\global\expandafter\let\expandafter\pgfplots@glob@TMPa\csname pgfplots@scaled@ticks@#1@arg\endcsname         \fi         \endgroup         \fi         \expandafter\let\csname pgfplots@tick@scale@#1\endcsname=\pgfplots@glob@TMPa%     }     \makeatother          \begin{document}         \begin{tikzpicture}             \begin{axis}[scaled ticks=engineering, y unit=m,height=4cm]             \addplot [domain=0:1] {10000*\x};             \end{axis}         \end{tikzpicture}              The multiplier should be printed as $\cdot10^3$[m] instead of merely $\cdot10^3$.     \end{document}


title: centering a \hbox

text: I'm trying to center a collection of nested `\hbox` and `\vbox` without any succes :-( Here is the code I use:               \begin{figure}[h]      \center{       \vbox{\hbox{%         \includegraphics{imageA}~%         \includegraphics{imageB}~%         \includegraphics{imageC}}%         \hbox{%           \includegraphics{imageD}~%          \includegraphics{imageE}~%          \includegraphics{imageF}}}%          \caption{text}      }     \end{figure}      ![Here, you can see the result that I have obtained](http://i.stack.imgur.com/ThSGs.png) The desirable result will be with this image centered in the middle of the page.


title: xtab breaking table even though next row could "apparently" fit

text: Below is the MWE for a table spanning multiple pages. I like how this works generally, but the last row is awkwardly left on a lonely page. In the actual document there are many sections more rows, and the ones without text are always treated like the were huge. What am I missing? Is this just something I have to live with, or is there an alternative markup (still using tables)?               \documentclass[11pt, a4paper]{article}          % DOCUMENT LAYOUT     \usepackage{geometry}     \usepackage{xtab}     \usepackage{lipsum}     \usepackage{layout}     \geometry{a4paper, right=3cm, textheight=22cm, marginparsep=0.5cm, marginparwidth=3.5cm, left=2cm, footskip=3.5cm}          % XTABLE     % --- For paragraph headings     \newcommand{\doom}[1]{%     \footnotesize{#1}}     % --- For "old section" titles     \newcommand{\dope}[1]{%     \LARGE{#1}}          % TABULAR -- MAKE LINES LESS CRAMPED     \renewcommand{\arraystretch}{1.5}     \renewcommand{\tabcolsep}{0.2cm}          \begin{document}          \begin{mpxtabular}{r p{\textwidth}}     &\dope{Hello}\\     \verb|6.5| & \doom{Commitment 4}     \\     &     \lipsum[1]     \\     \\     \verb|6.0| & \doom{Commitment 2}     \\     &     \lipsum[2]     \\     \\     \verb|6.5| & \doom{Commitment 1}     \\     &     \lipsum[1]     \\     \\     \verb|6.0| & \doom{Commitment }     \\     &     \\     \\     \end{mpxtabular}     \end{document}      Regards


title: How to place contact information in the right side of the header in Moderncv?

text: I want to put my contact information and maybe also my photo to the right side of header. Would someone kindly tell me how i can do that? Bellow is the tex code of my document.               \documentclass{moderncv}     \usepackage{moderncvstyleclassic}     \moderncvcolor{red}     \usepackage{eurosym}     \usepackage[scale=1, left=3.5cm, right=2.5cm, top=3.5cm, bottom=2.5cm]{geometry}     \usepackage{csquotes}     \usepackage{pifont}     \MakeOuterQuote{"}     \renewcommand*{\titlefont}{\LARGE\mdseries\upshape}               \firstname{Aa}      \familyname{Bb}      \title{Curriculum Vitae}      \address{<JJJJ>}{<Addres Place>}    % optional, remove the line if not wanted     \mobile{<25454>}                    % optional, remove the line if not wanted     \phone{<456565>}                      % optional, remove the line if not wanted     \fax{<676767>}                          % optional, remove the line if not wanted     \email{<E-mail>}                       \makeatletter     \renewcommand*{\makecvtitle}{%       % recompute lengths (in case we are switching from letter to resume, or vice versa)       \recomputecvlengths%       % ensure footer with personal information       \makecvfooter%       % optional picture       \newbox{\makecvtitlepicturebox}%       \savebox{\makecvtitlepicturebox}{%         \ifthenelse{\isundefined{\@photo}}%           {}%           {%            \setlength\fboxrule{\@photoframewidth}%            \ifdim\@photoframewidth=0pt%              \setlength{\fboxsep}{0pt}\fi%            {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%       \usebox{\makecvtitlepicturebox}%       % name       \@initializelength{\makecvtitlepicturewidth}%       \settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%       \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%         \raggedright\namefont{\@firstname} {\@familyname}}\\[-.35em]%        {\rule{\textwidth}{.25ex}}%       % optional title       \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\titlestyle{\@title}}\\[2.5em]  % optional quote       \ifthenelse{\isundefined{\@quote}}%         {}%         {{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}%       \par}%     \makeatother


title: Install KOMA script in Ubuntu-12.04 LTS

text: I apologize for this question, but I tried to install `KOMA-script` in my machine, the operating system is Ubuntu 12.04 LTS. I tried to install from the Makefile after I got the file koma-script.zip. I also have all the files for the bibliography in the `biblatex` package and I could not compile correctly the thesis style from Universitaet Bonn, it uses the `koma-script` and I think the problem is with the script. I really will appreciate any help from you about. Thanks in advance!


title: How to plot functions like x=f(y) using TikZ?

text: To plot functions in the form of `y=f(x)`, we simply write               \draw [smooth,samples=100,domain=0:2] plot(\x,{(\x)...});      But how about functions like x=f(y)? How to plot them? How to specify their domains in terms of "y"?               \documentclass{article}     \usepackage{tikz}      \begin{document}     \begin{tikzpicture}     \draw [smooth,samples=100,domain=0:2] plot(???);     \end{tikzpicture}     \end{document}


title: longtable continues in header/footer

text: I generate a long table in LaTeX. But the table continues in the header and footer and some of the content of table is hidden/overshadowed by the header and footer. Is there anyway that it can clear the header and footer? I have the following LaTeX command:               \begin{longtable}{|L{4em}|L{9em}|L{16em}|L{17em}|}     \hline          \textbf{SRS no.}  & \textbf{Requirement Title}  & \textbf{CSC}  & \textbf{CSU}  \\\hline\hline%          \endfirsthead          \multicolumn{3}{@{}l}{\ldots continued from previous page} \\ \hline          \textbf{SRS no.} & \textbf{Requirement Title}   & \textbf{CSC}  & \textbf{CSU}  \\\hline\hline%          \endhead     \hline          \multicolumn{3}{r@{}}{ continued on next page  \ldots} \\          \endlastfoot


title: Natbib: How to suppress the same author in case of multiple citations?

text: My problem is simple. In my document, in order to produce references, I use natbib. When I have the same author I prefer to have hers/his name to appear once (in the beginning) and then instead of his full name I want to have a 3-em baseline. Is this possible to happen? Here is a simple code:               \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.00in]{geometry}     \usepackage[sectionbib, sort]{natbib}          \author{My name}     \title{Suppressing same author's name in multiple citations}          \begin{document}     \maketitle          As it is mentioned in \cite{Card2005} and \cite{Card2012} ...                \bibliographystyle{chicagoa}     \bibliography{biblio}     \end{document}      where the bibliography file (biblio.bib) contains:               @ARTICLE{Card2005,       author = {Card, David},       title = {{Is the New Immigration Really so Bad?}},       journal = {Economic Journal},       year = {2005},       volume = {115},       pages = {F300--F323},       number = {507},       month = {November},       timestamp = {2013.06.19}     }          @ARTICLE{Card2012,       author = {Card, David},       title = {{Comment: The Elusive Search for Negative Wage Impacts of Immigration}},       journal = {Journal of the European Economic Association},       year = {2012},       volume = {10},       pages = {211--215},       number = {1},       timestamp = {2013.06.25}     }


title: Two figures with two sub-figures each on same page

text: I need a layout like this on a single page without any other text or floats.               | figure 1a | figure 1b |             Caption for Figure 1               | figure 2a | figure 2b |             Caption for Figure 2      Do anyone know what to do with it?


title: Metafont (or alternative ways to get your own scripts within LaTeX)

text: My main experience with Metafont was Christopher Grandsire's The METAFONTtutorial which I think is a good and concise description of the language and its tricks, but I've missing one important part: how to produce a .PDF or printed document using your newly created font. So. **How can I write a _Hello World_ document using a newly created font with Metafont?** (Or with any other font I would've created by a package such as Fontographer, FontForge, etc.)


title: A hyphen is not displayed in chemfig

text: I have a problem with a hyphen that is not displayed (according to my pdf file) in a chemical structure (after the arrow, {n}-Bu_4N^+)=-=)), although it is present in the code. My sample code is below:               \documentclass[12pt,doublespacing,letterpaper]{report}          \usepackage{chemfig}               \begin{document}               \setatomsep{2em}     setbondoffset{1pt}     \setdoublesep{3pt}     setbondstyle{line width=1pt}               \schemestart[0,2.2,thick]     \scriptsize     \chemfig{[:-30]*6(-=-(-[,1.2]BF{_3^-}K^+)=-=)}     \arrow{     ->[\footnotesize \emph{n}-Bu$_4$N$^+$Br$^-$     \footnotesize][\footnotesize{\centering THF, rt, 3-5 min\footnotesize}]}     \scriptsize     \chemfig{[:-30]*6(-=-(-[,1.2]BF{_3^-}\emph{n}-Bu_4N^+)=-=)}     \schemestop               \end{document}      There is a hyphen in the structure that is above the arrow and it is diplayed without problems. Any help is appreciated.


title: How to prevent \pagenumbering from resetting page number?

text: I want to page number the preliminary sections of my document in roman numerals, then use arabic for the rest, but I don't want the arabic numerals to start from 1. Since I don't know how long the table of contents and other preliminaries will be, I don't want to have to hard code the first page of the main section. Is there a way to prevent \pagenumbering from resetting, or to somehow direct \setcounter to "the page number of the last page + 1"? MWE:               \documentclass{article}     \pagenumbering{roman}     \setcounter{page}{3}          \begin{document}     %preliminary materials     This should be on page ``iii''.     \newpage     Page ``iv''.     \newpage     Page ``v''.          %main section     \newpage     \pagenumbering{arabic}     \setcounter{page}{6} % how can I set this without hard coding the 6?     Page ``6''.     \end{document}


title: Make a second "table of contents" incorporating a short summary for each section

text: Suppose I have a document looking like this:               \documentclass{article}     \begin{document}          \tableofcontents          \section{A}     \subsection{A.A}    \subsection{A.B}     \section{B}     \subsection{B.A}    \subsection{B.B}          \end{document}      I would like to add a short summary for each section, and produce a second table of contents after the first one, that would include this summary. The end result could look like this: > **Contents**   >  _[normal table of contents]_ > > **Summary**   >  **1 A**   >  This section is about stuff. > > **2 B**   >  This section is about whatever. > > _[rest of the document]_ Obviously I can achieve the result by hand, but I'd rather not. For example it would be great if I could put the summary at the beginning of the section (in the code) and have it automatically be put in the "summary toc" at the right place. Bonus question: I'd like to do all of that with a KOMA-script class. So if possible, no memoir-specific magic should be used.


title: Horizontal Probability tree with tikz

text: I'm looking for a way to create a simple horizontal probability tree with tikz similar to this one: ![enter image description here](http://i.stack.imgur.com/MJgSG.jpg) I saw a few examples on texample.net, but no one shows me how to create the each paths horizontally.


title: Multicolumn verbatim

text: Is there someone who could help me with creating a table with some rows merged and verbatim text in it? I actually want to create 3x2 table. Like this               \begin{tabular}{rr}     \hline     \multicolumn{2}{c}{Verbatim text(in merged row)} \\     \hline     some text      & some text \\     \hline     verbatim number & verbatim number \\     \hline     \end{tabular}      I already tried to search here, but what I have found just brought me more errors. Thanks in advance.


title: Internet citation using APA

text: I'm looking for a way to include Internet citations in my bibliography and 'print' them using APA style. Currently I have `natbib` and `apa-good.bst`, but from what I've been able to gleam from Google, there is no support in `natbib` for online citations. There were mentions of BibLaTex, but since I'm new to TeX I have no idea how to use that. Is there a way to get Internet citations correctly in TeX?


title: Parse simple arithmetics and return the result

text: I want a command `\ca` which takes a simple arithmetic calculation as an argument and returns the result with proper decimal places. Additionally I want an boolean argument which decides if only the result is printed or the whole calculation. For example `\ca{8.12 - 2.2 + 1}` should just print 6.92. or `\ca[t]{8.12 - 2.2 + 1}` should print 8.12 - 2.2 + 1 = 6.92 Following the question How can I sum two values and store the result in other variable? I did this:               \documentclass{article}     \usepackage[nomessages]{fp}% http://ctan.org/pkg/fp     \usepackage{ifthen}          \newcommand{\ca}[2][f]{     \FPeval{\result}{clip(#2)}     \ifthenelse{\equal{#1}{t}}{     $#2=  \result$}     {     \result     }     }                    \begin{document}     \ca[t]{3*(2.2 + 2.3)}          \ca{2.5 + 2.78}     \end{document}      Is it possible to to the same such that the german comma notation is used in what is displayed (i.e. 8,2 instead of 8.2) and in the case the calculation is printed that * is printed as `\dcot`.


title: Difficulty with \flalign

text: Consider the following example.               \begin{flalign}     &Max Z=a+b\\     &Min P=c-d\\     &\mbox{subject to}\\     &a \leq 10\\     &c \geq 5     \end{flalign}      When I run it I get the desired output, but the only problem is I do not want "subject to" to get numbered. So if I modify it, and write something like               \begin{flalign}     &Max Z=a+b\\     &Min P=c-d     \end{flalign}     subject to     \begin{flalign}     &a \leq 10\\     &c \geq 5     \end{flalign}      then my alignment between the first set of equations and the second set of equations gets disturbed. How do I proceed?


title: How to write pseudo code in other languages (Spanish)?

text: I'm using this code in LaTeX               \documentclass[12pt,a4paper]{report}     \usepackage[spanish]{babel}     \selectlanguage{spanish}      \usepackage{algorithm2e} %for psuedo code     \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}     \begin{document}          \begin{algorithm}[H] %or another one check      \caption{How to write algorithms}          \SetAlgoLined               \While{not at end of this document}{           read current\;           \eIf{understand}{            go to next section\;            current section becomes this one\;            }{            go back to the beginning of current section\;           }          }          \end{algorithm}          \end{document}      But I need that statements like 'if .. then .. else' to be changed to 'si.. entonces ... de lo contrario'. I tried that but doesn't work, I mean the output is the same as if I didn't select a language.


title: Autoref's inserted text has not the correct case

text: I'm using the `\autoref` tag which comes with the package **hyperref** for referencing my algorithms, figures etc. I read that it automatically adjusts the reference text's case, but it won't work with my setup. When I compile the code, everything (page, text, link) is correctly put, except the case like in the following example: > As it can be seen in Figure 9.7, this [...] Remark: there may be something wrong with my setup - links to text sections (like chapter, section, subsection) and also floating environments like "algorithm" (algorithm2e.sty) do have the correct case. The case is wrong when refering to Figures and Equations.


title: Formatting code into the style used in Stackoverflow

text: I know that there is `minted` and `listings` for displaying nice code in .tex documents. However, I'd like to use the style that is used for Stackoverflow code: example. Are there any packages for this, or do I need to create something customized?


title: pshlabel and log graphs: the 10^ disappear

text: I would like to reduce the label size for all my graphs (using pstricks). I used the following code:               \makeatletter             \def\pst@@@hlabel#1{{\small #1}}     \makeatother      which works fine for my normal graphs. But for my Log graphs, the labels become 1,2,3,etc. instead of 10^1,10^2,10^3, etc. I give a complete minimal example here: * * *               \documentclass{article}     \usepackage{pst-plot}          \makeatletter     \def\pst@@@hlabel#1{{\small #1}}     \makeatother          \begin{document}          \pspicture(-1,-1)(5,5)     \psaxes[subticks=5,xylogBase=10,logLines=all](5,5)     \endpspicture\hspace{1cm}          \end{document}      * * * The vertical labels are \normalsize but correct and the hlabels are \small but incorrect.


title: How to count the number of questions separately for different parts in exam class?

text: I am creating an exam with two parts, the first part is short questions and the second part is essay question, and I would like to automatically count the number of questions for the two parts _separately_. By default, the `\numquestions` displays the total number of questions _in the document_.               \documentclass{exam}          \begin{document}          \begin{questions}     \fullwidth{\Large \textbf{Short questions}}         There are \numquestions\ short questions. %display the number of short questions.          \question     This is the first short question.     \question     This is the second short question.          \setcounter{question}{0}          \fullwidth{\Large \textbf{Essay questions}}     There are \numquestions\ essay questions. %display the number of essay questions.          \question     This is the first essay question.     \question     This is the second essay question.     \question     This is the third essay question.     \question     This is the fourth essay question.     \end{questions}     \end{document}


title: Moving contact information above horizontal line in resume

text: I'm working on a resume, and was playing around with a template I found online. Here is what I had:               \documentclass[margin,line,pifont,palatino,courier]{res}          \begin{document}     \name{First Last \vspace*{.1in}}     \begin{resume}          \section{\sc Contact Information}          \vspace{.05in}     \begin{tabular}{@{}p{2.75in}p{2.1in}}     Address 1 & Phone \\     Address 2 & E-mail\\     \end{tabular}     \end{resume}     \end{document}      But I would prefer to have the contact information above the horizontal line and not have it as a "section" in the resume. I tried removing line, from the document class line and adding in a horizontal line manually, but it's messy and probably not perfect:               \documentclass[margin,pifont,palatino,courier]{res}          \begin{document}     \name{First Last}     \begin{resume}          \vspace{-.1in}     \begin{tabular}{@{}p{2.7in}p{2.1in}}     555 Name Street North & (555) 555-5555 \\     City ST 55555 & myemail@email.com\\     \end{tabular}          \vspace{-0.35cm}     \hspace{-3.3cm}\noindent\rule{16.5cm}{0.4pt}          \end{resume}     \end{document}      Is there a cleaner and "right" way of doing this? Thanks. Edit: I changed the code to a minimal working sample. Sorry if what I had posted before was too long.


title: Is there a way to remove duplicate frame titles from a listofframes?

text: Related to: Is there any way to produce List of frames with beamer? I have a lot of slides where there are successive identically named slides, for example the first one explains the topic and the second one has an example. I'd like that the `\listofframes` only shows the first one. Thanks.


title: pgfplots: lines and markers in different colors

text: With pgfplots, I am creating a simple coordinate plot with error bars like this:               \documentclass[crop,10pt]{standalone}     \usepackage[english]{babel}     \usepackage{pgfplots}              \begin{document}%             \setlength{\linewidth}{246pt}%                      \begin{tikzpicture}                 \begin{axis}[                 width=\linewidth,                 ytick pos = left,                 xtick pos = left,                 clip=false,                 axis on top,                 tick align = outside,                 yticklabel style={%                 /pgf/number format/fixed,                 /pgf/number format/precision=1,                 /pgf/number format/fixed zerofill             },                 ytick scale label code/.code={},                 xlabel={X},                 ylabel={Y},         ]                 \addplot[mark=*]                 plot[                 error bars/.cd,                 y dir=both,                 y fixed=0.0001         ]                 coordinates{(1,0.0005) (1.1,0.0013) (5,0.0015)};                 \end{axis}                 \end{tikzpicture}         \end{document}      In the original plot I have a lot more points. I would now like the line and the markers (including the error bars) to have different colors to better distinguish the line from the error bars. Is that somehow possible? The only way I found so far is to plot the data just as a line in one color and then plot it again just as markers in another color. This works, but I guess there must be some better solution to this.   Thanks for the support,   John