title: Supertabular with output overlapping

text: I am using supertabular but it is showing error like this: > Misplaced \noalign > > \ST@next....& \tsbp $i$ \ \hline \tbsp \noalign > > {\global \let \=\@savcr} With the output in dvi/pdf with the second page overlapping on the first. Can anyone suggest me how to overcome this? Here is my code:               \documentclass{article}     %\documentstyle[10pt,epsfig]{aa}     \include{bk_macros}     \usepackage[varg]{txfonts}     \usepackage{graphicx}     \usepackage{supertabular}          \newcommand{\tbsp}{\rule{0pt}{18pt}}          \begin{document}          \begin{center}     \tablefirsthead{\hline\hline \tbsp Serial No. & \tbsp Name & \tbsp Type & \tbsp $q=\frac{m_2}{m_1}$  & \tbsp $\Omega_{inner}$ & \tbsp $\Omega_{outer}$ & \tbsp $T_{eff,1}$ & \tbsp $T_{eff,2}$ & \tbsp $i$ \\ \hline\tbsp}     \tablehead{\hline  \hline \tbsp Serial No. & \tbsp Name & \tbsp Type & \tbsp $q=\frac{m_2}{m_1}$  & \tbsp $\Omega_{inner}$ & \tbsp $\Omega_{outer}$ & \tbsp $T_{eff,1}$ & \tbsp $T_{eff,2}$ & \tbsp $i$ \\ \hline\tbsp}     \tabletail{\hline  \multicolumn{8}{c}{\small\sl continued on next page}\\}     \tablelasttail{\hline\hline}     \topcaption{List of Binary stars considered for the present study along with input parameters and type}              % title of Table     \label{table:1}      \par     \begin{supertabular}{rrrrrrrrr}     1 & ABAnd\_Hrivnak 1988V & OC & 2.0367 & 5.303534 & 4.705244 & 5450 & 5821 & 86.800 \\     2 & ANAnd\_Giuricin 1982V & D & 0.6 & 3.063442 & 2.712371 & 7800 & 5960 & 78.6 \\     3 & BXAnd\_Samec 1989V & C & 0.497 & 2.870075 & 2.573097 & 6600 & 4800 & 75.5 \\     4 & CNAnd\_vanHamme 2001V & NC & 0.3885 & 2.654548 & 2.416987 & 6500 & 5922 & 68.510 \\     5 & RTAnd\_Kjurkchieva 2001V & OC & 0.74 & 3.31343 & 2.892087 & 6150 & 4920 & 82 \\     6 & AdBoo\_Lacy 1997V & D & 0.86 & 2.654548 & 2.416987 & 6500 & 5922 & 68.510 \\     7 & RSCha\_Clausen 1980V & D & 0.98 & 3.717427 & 3.183237 & 7950 & 7537 & 83.7 \\     8 & RZCha\_Giuricin 1980V & D & 1.006 & 7.82 & 5.903 & 6360 & 6410 & 84.4 \\     9 & KPAql\_Ibanoglu 1974V & D & 0.988 & 3.730474 & 8.755561 & 7400 & 7400 & 90 \\     10 & V1182Aql\_Bell 1987V & D & 0.36 & 2.595349 & 2.373841 & 35600 & 27470 & 61.3 \\     11 & V417Aql\_Samec 1997V & OC & 2.714 & 6.234823 & 6.118133 & 6030 & 6256 & 84.470 \\     12 & BWAqr\_Clausen 1991V & D & 1.07 & 13.934064 & 11.634127 & 6450 & 6350 & 88.40 \\     13 & CXAqr\_McFarlanc 1986V & NC & 0.59 & 3.294 & 3.045062 & 6400 & 4900 & 86.2 \\     14 & DVAqr\_Okazaki 1985V & D & 0.6 & 3.538634 & 3.7 & 7600 & 5200 & 70 \\     15 & EEAqr\_Hilditch 1988V & NC & 0.32 & 2.510013 & 2.535297 & 7060 & 4395 & 80.5 \\     16 & RYAqr\_Helt 1987bV & SD & 0.201 & 6.051 & 2.256 & 7600 & 4550 & 82.6 \\     17 & V535Ara\_Schoffel 1979V & OC & 0.311 & 2.465 & 2.465 & 8200 & 8125 & 81 \\     18 & V539Ara\_Clausen 1996bV & D & 0.85 & 3.709914 & 2.935106 & 17900 & 17056 & 85.2 \\     19 & SSAri\_Kim 2003V & OC & 3.255 & 6.951823 & 6.329282 & 5860 & 6144 & 74.620 \\     20 & AHAur\_Vanko 2001V & OC & 0.169 & 2.153701 & 2.045107 & 6215 & 6141 & 75.460 \\     21 & ARAur\_Nordstrom 1994V & D & 0.925 & 3.627072 & 3.117964 & 11125 & 10600 & 88.520 \\     22 & ARAur\_Popper 1986V & D & 0.977 & 3.712529 & 3.179695 & 5346 & 5200 & 89.7 \\     23 & IMAur\_Gulmen 1985V & D & 0.353 & 2.580614 & 2.363079 & 10350 & 5095 & 78 \\     24 & SXAur\_Chambliss 1979V & NC & 0.5986 & 3.060873 & 2.710523 & 19200 & 14804 & 82 \\     25 & AWCam\_Russo 1983V & NC & 0.22 & 2.281758 & 2.142056 & 9900 & 6422 & 75.36 \\     26 & AYCam\_Williamon 2004V & D & 0.8972 & 3.580942 & 3.084681 & 7250 & 7395 & 88.465 \\     27 & DNCam\_Vanko 2001V & OC & 2.3753 & 5.774655 & 5.167444 & 6700 & 6840 & 71.2 \\     28 & FNCam\_Pribulla 2002V & OC & 0.222 & 2.86586 & 2.145680 & 6848 & 6700 & 71.2 \\     29 & EMCar\_Andersen 1989V & D & 1.016 & 3.824992 & 3.206900 & 34000 & 34000 & 81.5 \\     30 & QXCar\_Andersen 1983cv & D & 0.914 & 5.091186 & 2.718311 & 23500 & 22240 & 85.7 \\     31 & AOCas\_Schneider 1978V & OC & 1.185 & 4.034 & 4.034 & 34700 & 35033 & 51.2 \\     32 & MUCas\_Lacy 2004V & D & 1.019 & 4.747435 & 2.923388 & 15100 & 14750 & 87.02 \\     33 & TWCas\_Narita 2001V & SD & 0.432 & 2.742677 & 2.480979 & 10500 & 5400 & 74.7 \\     34 & V459Cas\_Lacy 2004V & D & 0.974 & 3.806169 & 3.128686 & 9141 & 9099 & 89.465 \\     35 & V523Cas\_Samec 2005V & OC & 0.52 & 2.983 & 2.604839 & 4762 & 5104 & 85.39 \\     36 & LZCen\_Vaz 1995bv & D & 1.09 & 3.950986 & 3.343726 & 26430 & 26500 & 72.22 \\     37 & SZCen\_Gronbech 1977V & D & 1.016 & 3.77775954 & 3.231265 & 8000 & 8280 & 88.08 \\     38 & V346Cen\_Gimenez 1986bv & D & 0.71 & 4.677327 & 2.511337 & 26500 & 24000 & 83.9 \\     39 & V753Cen\_Barone 1993V & OC & 3.15 & 6.814164 & 6.193046 & 5955 & 6221 & 81.660 \\     40 & V752Cen\_Leung 1976V & OC & 3.344 & 7.067997 & 6.444314 & 6210 & 6300 & 83.18 \\     41 & V757Cen\_Maceroni 1984V & OC & 1.49 & 4.511196 & 3.934232 & 5927 & 6000 & 69.31 \\     42 & AHCep\_Holmgren 1990V & D & 0.877 & 3.547218 & 3.060365 & 29900 & 28570 & 29.21 \\     43 & CWCep\_Clausen 1991bv & D & 0.94 & 3.769554 & 3.080072 & 28300 & 27700 & 82.5 \\     44 & EKCep\_Hill 1984V & D & 0.55 & 3.363822 & 2.504025 & 8995 & 5689 & 89.16 \\     45 & GKCep\_Niarchos 1991V & NC & 0.92 & 3.618779 & 3.111993 & 9500 & 9000 & 73.5 \\     46 & NYCep\_Ahn 1992V & D & 0.72 & 6.524666 & 2.389262 & 28800 & 23000 & 77.39 \\     47 & V497Cep\_Yakut 2003V & D & 0.782 & 3.386104 & 2.944357 & 19500 & 17756 & 57.9 \\     48 & TWCet\_Russo 1982V & OC & 1.664 & 4.758601 & 4.183495 & 5400 & 5600 & 85 \\     49 & CWCMa\_Terrell 1992V & D & 0.944 & 3.658419 & 3.140597 & 10800 & 10300 & 83.3 \\     50 & FZCMa\_Moffat 1983V & D & 1.00 & 3.75 & 3.206796 & 22000 & 20596 & 87.63 \\     51 & GZCMa\_Popper 1985V & D & 0.909 & 3.600561 & 3.098834 & 8810 & 8531 & 86.6 \\     52 & SWCMa\_Lacy 1997V & D & 0.914 & 5.4043 & 2.680445 & 8500 & 8500 & 88.72 \\     53 & TYCrA\_Casey 1998V & D & 0.521 & 2.915985 & 2.60621 & 12000 & 4900 & 83 \\     54 & RTCrB\_Sabby 2003V & D & 1.011 & 3.757853 & 3.223625 & 5075 & 5781 & 84.9 \\     55 & AlCru\_Bell 1987V & NC & 0.61 & 3.081744 & 2.725534 & 24200 & 17660 & 81 \\     56 & DKCyg\_Mochnacki 1972V & OC & 0.325 & 2.520836 & 2.319312 & 7200 & 7200 & 82 \\     57 & MRCyg\_Linnell 1998V & SD & 0.399 & 2.676056 & 2.432628 & 20900 & 13900 & 84.4 \\     58 & SWCyg\_Wilson 1988V & DC & 0.3664 & 8.938885 & 2.383622 & 9070 & 3813 & 82.7 \\     59 & V1073Cyg\_Ahn 1992V & OC & 0.32 & 2.510013 & 2.311367 & 6856 & 6740 & 69.4 \\     60 & V1143Cyg\_VanHamme 1984V & D & 0.9792 & 8.379136 & 2.565819 & 6550 & 6496 & 87.035 \\     61 & V1425Cyg\_Hill 1993V & NC & 0.641 & 3.138012 & 3.134766 & 15230 & 11733 & 71.15 \\     62 & V380Cyg\_Guinan 2000V & D & 0.626 & 4.034862 & 2.469972 & 21350 & 20500 & 82.4 \\     63 & V382Cyg\_Harries 1997V & OC & 0.7418 & 3.316565 & 2.894341 & 36000 & 35000 & 84.5 \\     64 & V442Cyg\_Lacy 1987V & D & 0.902 & 3.58893 & 3.090443 & 6900 & 6725 & 86 \\     65 & V470Cyg\_Russo 1982V & D & 0.877 & 3.547218 & 3.060365 & 21100 & 1961 & 50 \\     66 & V477Cyg\_Degirmenci 2003V & D & 0.677 & 3.202518 & 2.812357 & 36100 & 34758 & 85.7 \\     67 & V478Cyg\_Sezer 1983V & D & 0.9717 & 3.824019 & 3.116297 & 30900 & 30308 & 78.07 \\     68 & V541Cyg\_Lacy 1998V & D & 1.00 & 7.421249 & 2.624289 & 9885 & 9954 & 89.88 \\     69 & V729Cyg\_Leung 1978V & OC & 0.23 & 2.305774 & 2.160058 & 34300 & 22735 & 68.18 \\     70 & V836Cyg\_Breinhorst 1989V & NC & 0.33 & 2.531613 & 2.327215 & 10333 & 6000 & 8.08 \\     71 & V885Cyg\_Lacy 2004V & D & 1.1142 & 3.933351 & 3.38026 & 7950 & 8375 & 7.064 \\     72 & V909Cyg\_Lacy 1997V & D & 0.886 & 3.562265 & 3.071213 & 9705 & 8790 & 89.2 \\     73 & BSDra\_Russo 1981V & D & 0.999 & 3.748375 & 3.20562 & 6750 & 6740 & 89.4 \\     74 & EFDra\_Pribulla 2001V & OC & 0.16 & 2.129956 & 2.026929 & 6000 & 6054 & 78.13 \\     75 & FUDra\_Vanco 2001V & OC & 3.9841 & 7.891422 & 7.260916 & 5800 & 6133 & 78.64 \\     76 & RZDra\_Kreiner 1994V & C & 0.396 & 2.669927 & 2.428173 & 8150 & 4898 & 87 \\     77 & UZDra\_Lacy 1989V & D & 0.92 & 3.618799 & 3.111993 & 6100 & 5844 & 89.32 \\     78 & ASEri\_VanHamme 1984V & SD & 0.1144 & 2.002505 & 1.928049 & 8500 & 5000 & 80.018 \\     79 & TZFor\_Andersen 1991V & D & 0.951 & 3.669932 & 3.148912 & 6470 & 4960 & 85.67 \\     80 & AFGem\_Maxted 1995V & SD & 0.342 & 2.557294 & 2.346025 & 10000 & 5400 & 87.4 \\     81 & ADHer\_Mardirossian 1980V & SD & 0.33 & 2.531613 & 2.327215 & 8610 & 3900 & 84.1 \\     82 & DIHer\_Popper 1982V & D & 0.88 & 7.181783 & 2.519301 & 17000 & 15100 & 89.3 \\     83 & V624Her\_Popper 1984V & D & 0.825 & 3.459566 & 2.997222 & 8150 & 7940 & 79.4 \\     84 & V728Her\_Nelson 1995V & OC & 5.5991 & 9.8987 & 9.257568 & 6622 & 6787 & 69.2 \\     85 & V899Her\_Ozdermir 2002V & OC & 0.566 & 3.000627 & 2.667176 & 5700 & 5500 & 65.772 \\     86 & AlHya\_Popper 1988V & D & 0.923 & 4.780037 & 2.776981 & 7096 & 6699 & 90 \\     87 & Chi2Hya\_Clausen\&Nordstrom 1978V & D & 0.73 & 3.295982 & 2.879543 & 11550 & 11100 & 77.9 \\     88 & HSHya\_Torres 1997V & D & 0.971 & 3.702721 & 3.172606 & 6500 & 6400 & 85.56 \\     89 & KWHya\_Andersen 1984bv & D & 0.753 & 3.709655 & 2.761849 & 8000 & 6881 & 87.65 \\     90 & RSInd\_Hilditch 1988V & NC & 0.322 & 2.514348 & 2.31455 & 7200 & 4659 & 90 \\     91 & V364Lac\_Torres 1999V & D & 1.016 & 5.399183 & 2.811273 & 8251 & 8500 & 89.19 \\     92 & EXLeo\_Pribulla 1988V & OC & 0.199 & 2.230239 & 2.103257 & 6330 & 6167 & 61.1 \\     93 & TXLeo\_Srivastava 1968V & D & 0.375 & 2.810022 & 2.325959 & 8810 & 6476 & 66.8 \\     94 & UVLeo\_Frederik 1996V & D & 0.965 & 3.6929 & 3.165508 & 5920 & 5821 & 82.63 \\     95 & UZLeo\_Bradatreet 2004V & OC & 0.303 & 2.472848 & 2.28404 & 7250 & 7250 & 83 \\     96 & TLMi\_Cester 1979V & SD & 0.1 & 1.959104 & 1.8938 & 9860 & 5055 & 86.3 \\     97 & GGLup\_Andersen 1993V & D & 0.61 & 3.669024 & 2.53152 & 14000 & 11200 & 86.75 \\     98 & SWLyn\_Broadstreet 2004V & NC & 0.524 & 2.921685 & 2.610318 & 6700 & 4220 & 82 \\     99 & UULyn\_Yamasaki 1983V & NC & 0.41 & 2.698423 & 2.448877 & 6700 & 3500 & 83 \\     100 & UVLyn\_Vanko 2001V & OC & 2.7248 & 6.249339 & 5.634983 & 6045 & 6262 & 66.8 \\     101 & FLLyn\_Popper 1986V & D & 0.786 & 3.392981 & 2.949301 & 6152 & 5297 & 86.3 \\     102 & TZMen\_Andersen 1987V & D & 0.604 & 3.190981 & 2.664619 & 10400 & 7200 & 88.73 \\     103 & UXMen\_Andersen 1989V & D & 0.968 & 3.708102 & 3.163838 & 6194 & 6152 & 89.6 \\     104 & ARMon\_Popper 1976V & D & 1.062 & 3.850078 & 3.301308 & 4200 & 5800 & 86 \\     105 & DDMon\_Qian 1997V & SD & 0.45 & 2.778437 & 2.506876 & 6600 & 5118 & 76.5 \\     106 & DDMon\_Yamasaki 1990V & SD & 0.697 & 3.237989 & 2.837854 & 6600 & 5514 & 79.26 \\     107 & FSMon\_Lacy 2000V & D & 0.8959 & 3.578777 & 3.08312 & 6715 & 6550 & 87.7 \\     108 & VVMon\_Popper 1988V & D & 1.062 & 3.850078 & 3.301308 & 4200 & 5800 & 86 \\     109 & TUMus\_Wilson 1981V & OC & 0.7207 & 3.279704 & 2.86784 & 33600 & 29194 & 75.87 \\     110 & TVMus\_Hilditch 1989V & OC & 0.135 & 2.061727 & 1.974287 & 5980 & 6088 & 78.9 \\     111 & V1010Oph\_Leung 1974V & NC & 0.487 & 2.850776 & 2.559166 & 7500 & 5100 & 86.05 \\     112 & V2388Oph\_Rodriguez 1998V & OC & 0.186 & 2.197533& 2.078487 & 6450 & 6130 & 83.9 \\     113 & V451Oph\_Clausen 1986V & OC & 0.85 & 3.549319 & 3.004555 & 10800 & 10000 & 85.9 \\     114 & V502Oph\_Maceroni 1982V & D & 2.985 & 6.596452 & 5.977753 & 5954 & 6200 & 71.67 \\     115 & V508Oph\_Lapasset 1990V & OC & 0.53 & 2.933059 & 2.618516 & 6000 & 5830 & 86.13 \\     116 & EWOri\_Popper 1986V & D & 0.97 & 3.989242 & 3.046496 & 5970 & 5781 & 89.65 \\     117 & GCOri\_Torres 2000V & D & 0.9982 & 4.885313 & 2.859927 & 9950 & 9950 & 89.24 \\     118 & V1031Ori\_Andersen 1990V & D & 1.034 & 4.755166 & 2.94946 & 6310 & 5010 & 88.45 \\     119 & IQPer\_Lacy 1985V & D & 0.493 & 3.411177 & 2.470213 & 12300 & 8100 & 89.3 \\     120 & ALPhe\_Andersen 1988V & D & 1.034 & 4.755166 & 2.94946 & 6310 & 5010 & 88.45 \\     121 & ZetaPhe\_Clausen 1976V & D & 0.649 & 3.191342 & 2.757983 & 14000 & 11700 & 87.7 \\     122 & VZPsc\_Hrivnak 1995V & NC & 0.8 & 3.416971 & 2.966562 & 4500 & 4110 & 48 \\     123 & PVPup\_Vaz 1984V & D & 0.993 & 3.949822 & 3.102736 & 6920 & 6931 & 83.09 \\     124 & UZPup\_Malasan 1989V & OC & 0.85 & 3.501861 & 3.027682 & 8150 & 7300 & 84.0 \\     125 & VPup\_Andersen 1983V & SD & 0.53 & 2.933059 & 2.618516 & 27000 & 24354 & 79 \\     126 & RZPyx\_Bell 1987V & NC & 0.82 & 3.451072 & 2.991107 & 17000 & 16760 & 87.4 \\     127 & TyPyx\_Andersen 1981bV & D & 0.98 & 3.717427 & 3.183237 & 5400 & 5340 & 87.88 \\     128 & VVPyx\_Andersen 1984V & D & 1.00 & 4.172674 & 3.034401 & 9506 & 9506 & 88.075 \\     129 & RTScl\_Broadstreet 2004V & C & 0.433 & 2.744674 & 2.482426 & 7000 & 5200 & 79 \\     130 & V701Sco\_Bell 1987V & OC & 0.99 & 3.733732 & 3.195028 & 23500 & 23500 & 65 \\     131 & V760Sco\_Andersen 1985bV & D & 0.928 & 3.737653 & 3.071251 & 16900 & 16300 & 82.17 \\     132 & V7906Sco\_Alencar 1997V & D & 1.0395 & 3.820337 & 3.255917 & 10700 & 10550 & 76 \\     133 & RZSct\_Wilson 1985V & OC & 0.277 & 6.062884 & 2.241216 & 22700 & 7500 & 83.1 \\     134 & OUSer\_Pribulla 2002V & OC & 0.173 & 2.16413 & 2.053069 & 6380 & 5960 & 54.23 \\     135 & V1647Sgr\_Clausen 1977V & D & 0.901 & 6.271572 & 2.590086 & 10000 & 9500 & 90 \\     136 & V1647Sgr\_Vaz 1997V & D & 0.6993 & 3.242052 & 2.840774 & 38000 & 34117 & 65.2 \\     137 & V526Sgr\_Lacy 1997V & D & 0.74 & 5.451516 & 2.603541 & 10100 & 8450 & 87.3 \\     138 & CDTau\_Ribas 1999V & D & 0.948 & 3.665 & 3.14535 & 6200 & 6200 & 87.7 \\     139 & V471Tau\_Bradstreet 2004V & D & 1.107 & 3.921916 & 3.369402 & 5040 & 34500 & 80 \\     140 & AWUMa\_Pribulla 1999V & OC & 0.0803 & 1.896344 & 1.843663 & 7175 & 7022 & 78.3 \\     141 & TXUMa\_Maxted 1995V & SD & 0.247 & 2.345911 & 2.190033 & 12900 & 5500 & 83.5 \\     142 & CVVel\_Clausen 1977V & D & 0.983 & 3.722322 & 3.186777 & 18200 & 18060 & 86.59 \\     143 & DmVir\_Andersen 1984V & D & 1.004 & 3.756497 & 3.212919 & 6400 & 6400 & 89.66 \\     144 & BPVul\_Lacy 2003V & D & 0.8105 & 3.570372 & 2.917453 & 7709 & 6775 & 87.67 \\     145 & ERVul\_Guinan 1991V & D & 0.9615 & 3.687165 & 3.161363 & 6050 & 6016 & 88.3 \\     \end{supertabular}     \end{center}          \end{document}


title: Linux Libertine Italic Spacing

text: I believe this is related, but my issue is not math-specific. The problem is: ![Output of MWE](http://i.stack.imgur.com/ckl8a.png)               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[12pt]{article}          % PACKAGES          \usepackage{geometry}     \usepackage{fontspec}     \usepackage{xltxtra}     \defaultfontfeatures{Mapping=tex-text,Numbers=OldStyle}     \setromanfont[Mapping=tex-text]{Linux Libertine O}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Linux Biolinum O}     \setmonofont[Scale=MatchLowercase]{Linux Libertine Mono O}          \begin{document} % ==============================================================          \newfontfamily{\HT}{Hoefler Text}     \newfontfamily{\BV}{Baskerville}          When using  and transitioning from roman to \textit{italics} and back, \LaTeX\ appears to preserve character spacing at the baseline.          {\Huge It is more \textit{noticeable} in larger font sizes.}          {\Large\bfseries The problem persists at \textit{other} weights.}          \textsf{...also with Linux Biolinum, the {\itshape associated} sans-serif font.} {\tiny ← That one is \textit{really} noticeable!}          {\HT This does not appear to be a \textit{problem} in other typefaces.}          {\BV Where \LaTeX\ evidently \textit{preserves} character spacing at mid-ex-height or so.}          Some graphic (if contrived) examples:          Linux Libertine: l\textit{l}l          {\HT Hoefler Text: l\textit{l}l}          {\BV Baskerville: l\textit{l}l}          \end{document}


title: Determine required number of pdflatex runs to generate complete document

text: # Background Looking to generate a PDF using `latexmk`. The LaTeX document, which is automatically generated from a web-based application, will include many large images, Tikz graphics, table of contents, multiple indices, etc. The default call to `latexmk` will include the images in each run of `pdflatex`. To increase performance, it was advised to use `-draftmode`. # Problem The `latexmk` program cannot determine whether the next run of `pdflatex` will be the last run required to produce a finished document. The difference, with a simple test, was 10 seconds without `-draftmode` and 0.9 seconds with using `-draftmode`: an order of magnitude, which is quite significant. # Question How can you determine the exact number of `pdflatex` runs that are required to produce a PDF document so that calls to `pdflatex`, except the final call, can use `-draftmode`? Thank you! # Ideas   * It might be possible to pass in a number that equals the number of runs required. I'd rather not use this approach as dynamic determination is ideal.   * Perform an extra run of `pdflatex` at the end, which is not in `-draftmode`.


title: Fitting tables into beamer

text: I have some tables in my presentations that are rather big. I found out how to use `\resizebox` to fit them into my page. Unfortunately this only works for tables that are wide. For long tables, my method doesn't work. Here is my minimal example:               \documentclass{beamer}          \begin{document}          \begin{frame}{Well formulated title}        \include{table}     \end{frame}          \end{document}      and the file `table.tex` is               \resizebox{\textwidth}{!}{     \begin{tabular}{rrrrrrrr}     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888 \\     111111 & 222222 & 3333333 & 44444444 & 55555555 & 66666666 & 77777777 & 88888888     \end{tabular}     }      As one can see this table is now too long for the page. So I thought that I could try `\resizebox{!}{\textheight}` instead of `\resizebox{\textwidth}{!}` but unfortunately this does not come out as expected. Is there a possibility to determine the maximal height of the hbox so that my table is as high as possible without producing an overfull hbox? I know that I could just set some values myself that kinda fit but I want to have a possibility to do it automatically.


title: How can I add a section reference to equation labels in an unnumbered section?

text: I have an unnumered section in a document, defining notation for the further contents. Since it's unnumbered, the equations within are labelled: '(1)', etc. For example:               \documentclass[12pt]{book}     \begin{document}     \chapter*{Notation}     \label{sec:notation}     A dot over any object denotes the time derivative of that object. Hence,\\     \begin{equation}         \frac{\partial}{\partial x^0}\alpha(x) = \frac{1}{c}\frac{\partial}{\partial t}\alpha(x) = \frac{1}{c}\dot{\alpha}(x).     \end{equation}     \end{document}      generates: ![MWE](http://i.stack.imgur.com/GAAAs.png) Is there a way I can tell latex to automatically label these as '(N.1)' similar to an appendix?


title: Spurious dot with xeCJK, TikZ

text: I have a very strange problem when using TikZ and xeCJK. I managed to extract this MWE from my original sources:               \documentclass{article}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \usepackage{tikz}     \usepackage{xeCJK}     \newCJKfontfamily\hiraganaFont[AutoFakeBold=1]{NanumMyeongjo}     \begin{document}          {\hiraganaFont \textbfる}\tikz{}          \end{document}      (the `polyglossia`/`defaultlanguage` is only there to keep xeCJK (I believe) quiet.) Symptoms:   * Output is `る.` (hiragana, period; the period is set in whatever is the document default font, not the CJK font; when a `Scale` is present in the CJK font definition, the period is unaffected). Expected output is `る`, without the period.   * **The dot stays** when lines are drawn inside the `\tikz{}` command. It would appear to be positioned to the right of the picture origin (i.e., 'inside' the picture).   * **The dot stays** when the `\tikz{}` command is put between `る` and `}`.   * **The dot stays** when the `\tikz{}` command is changed into a `tikzpicture` environment.   * **The dot stays** when exchanging the CJK font.   * **The dot vanishes** when AutoFakeBold is set to `0`.   * **The dot vanishes** when `\textbf` is deleted (or `\bf` for that matter, whatever their difference is).   * **The dot vanishes** as soon as a non-whitespace, non-CJK glyph is put behind the hiragana, be it inside or outside the pair of braces that surrounds the kana.   * I haven't managed to make the dot appear using a custom-defined environment.  Judging from the diagnostics, it would appear that somehow xeCJK's fake boldening feature and TikZ interact in freaking ways. Any ideas?


title: TeX-FAQ: Non-letters in macro names - special-command generator

text: I had a look at TeX-FAQ on Non-letters in macro names and tried to implement the approach #2. It looks like I'm missing something. When trying to refer later to the new commands the result is not what I expected.               \documentclass{standalone}     \usepackage{tikz}     \begin{document}          \newcommand{\DefineNode}[2]     {       \expandafter\newcommand\csname node-#1\endcsname{#2}     }     \newcommand{\GetNode}[1]{\csname node-#1\endcsname}          \begin{tikzpicture}       \def \intra {1}       \def \inter {3}            % Calculate values       \foreach \x [count=\xi from 0] in {a,...,c}       {         \pgfmathsetmacro\tmpi{\xi * \inter}         \DefineNode{n\x.0}{\tmpi}              \pgfmathsetmacro\tmpii{\xi * \inter + \intra}         \DefineNode{n\x.1}{\tmpii}              \message{\GetNode{n\x.0} ^^J}         \message{\GetNode{n\x.1} ^^J}       }            % Doing something with them later       \foreach \x in {a,...,c}       {         \message{\GetNode{n\x.0} ^^J}         \message{\GetNode{n\x.1} ^^J}       }     \end{tikzpicture}          \end{document}      The result is:               0.0     1.0     3.0     4.0     6.0     7.0     \node-na.0     \node-na.1     \node-nb.0     \node-nb.1     \node-nc.0     \node-nc.1      Instead of repeating numbers twice. EDIT: Solved the group issue by forcing names to be globals.               \newcommand{\DefineNode}[2]     {       \globaldefs=1\relax       \expandafter\newcommand\csname node-#1\endcsname{#2}     }      Result currently:               0.0     1.0     3.0     4.0     6.0     7.0     6.0     7.0     6.0     7.0     6.0     7.0      Instead of repeating first 6 lines, now 6.0 and 7.0 are repeated. This is due to using only two macros \tmpi and \tmpii. How to solve this?


title: Empty page with pdflatex generated documents while printing

text: I am having a HP Color Laserjet 2550Ln. Every time when I am printing a PDF file generated by pdflatex, the printer throws out an additional empty page at the end. I don't think it's a printer problem, because other PDF files from OpenOffice or the Cups PDF printer don't have that behavior. What can it be?


title: Removing bullets in headline with own template doesn't work

text: I'm using Ilmenau in a beamer presentation (first image) ![outer theme miniframes /Ilmenau ](http://i.stack.imgur.com/Dc3x1.png) I want to hide the bullets, so I use my own headline template (I get the idea from Is it possible to get rid of the bullets in the miniframes outer theme ). I remove the bullets but I get a white box on top of the slide instead (second image). I want to remove the bullets and the rest of the header elements move to the top. I'm using this code:               \usetheme{Ilmenau}          \setbeamertemplate{headline}     {%       \begin{beamercolorbox}{section in head/foot}       \vskip2pt\insertsectionnavigationhorizontal{\textwidth}{}{}\vskip2pt       \end{beamercolorbox}     }      ![own header](http://i.stack.imgur.com/LB3mD.png) **UPDATE:** Complete snippet: The empty template output white space on top, but if you uncomment the headline template body, is more strange even.               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{lmodern}     \usepackage{listings}     \usepackage{graphicx}          \title{Active Galactic Nuclei}     \author{John Doe}     \usetheme{Ilmenau}     \usecolortheme[rgb={0,0.4,0}]{structure}          \setbeamertemplate{navigation symbols}{}     \setbeamercovered{transparent=20}     \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%       \oldmacro\hfill%       \insertframenumber}          \begin{document}          \setbeamertemplate{headline}[default]      {%     %%   \begin{beamercolorbox}{section in head/foot}     %%   \insertsectionnavigationhorizontal{\textwidth}{}{}     %%   \end{beamercolorbox}%     }          \section{Introduction}     \subsection{Active Galactic Nuclei}          \frame{     \frametitle{Active Galactic Nuclei}     In some galaxies, the nucleus produces more radiation than the entire rest of the galaxy. Gas spirals towards a supermassive black hole (SMBH) assuming a disk shaped structure, generating massive amounts of radiation before falling onto the black hole.      }          \section{Other}     \subsection{Other}          \frame{     \frametitle{Active Galactic Nuclei}     In some galaxies, the nucleus produces more radiation than the entire rest of the galaxy. Gas spirals towards a supermassive black hole (SMBH) assuming a disk shaped structure, generating massive amounts of radiation before falling onto the black hole.      }          \end{document}


title: \def issue (with NumericPlots?)

text: So I've decided to clean my code for the many plots. I've basically taken out all the plot data into separate files using               \def\plotname{     x1    y1     }      Then I use `\input{data.txt}` to load all the plotting data at once and then               \begin{NumericDataPlot}{\textwidth}{6cm}     \newpsstyle{MyLineB}{linecolor=blue, linestyle=none,showpoints=true,dotsize=1pt}     \listplot[style=MyLineB]{\plotname}     \end{NumericDataPlot}      So far, so good. Most plots work as expected. However it turns out there is some issue with some `\def` names. For instance, using `\muIPS` leads to the following error               ! Use of \muIPS doesn't match its definition.\addto@pscode ...ef \pst@code {\pst@code #1\space} \listplot[style=MyLineB]{\muIPS}      But when I change the name to `\muips` it compiles just fine. So to sum up, LaTeX seems to be very idiosyncratic about the def name it allows. Please note that the names were working fine before I used nested input files... EDITED FOR EXPLANATION : One of the other names was `\def\muIPS-U` and it wasn't used. So when I changed to `\muips`, it had no confusion about the definition to use. Turns out, you can't use - character in the `defname`? What other characters are forbidden?


title: Re-instating indenting and line spacing in LaTeX template

text: I'm using the template http://www.latextemplates.com/template/masters- doctoral-thesis, which I think is great. However, this template has somehow been set up to make bigger line spacing instead of indenting paragraphs, and I can't figure out how. I would like to go back to indenting and not line spacing. Does someone know how to change this? Note: There are some \parskip and \parindent commands in the .cls file, but they seem to be for special sections of the paper.


title: incompatibilities between babel[french] and KOMA-Script classes

text: The compilation of               \documentclass{scrreprt} %or with any other KOMA-Script classes, like scrartcl     %\usepackage[T1]{fontenc}     \usepackage[french]{babel}     \begin{document}     test     \end{document}      leads to a warning in the console:               Package frenchb.ldf Warning: The definition of \@makecaption has been changed,     (frenchb.ldf)                frenchb will NOT customise it;      After test, the problem doesn't occur with `ngerman`, `english`, and some other languages that I have tested. The question is: is this warning important? And if yes, what can we do to avoid this problem?


title: LaTeX - Standalone - figure reference in nested subfile error

text: for a few days I've been stacked with a problem which no manual or documentation resolved, please help: I have my ' **main.tex** ' report document file, where I use the ' **standalone** ' package to load the chapter contents, something like this:               \documentclass[12pt,a4paper,oneside]{report}     \usepackage{standalone}     \begin{document}       \input{chapter-about-this}       \input{chapter-about-that}     \end{document}      Inside the ' **chapter-about-this.tex** ' sub-file, I use the ' **standalone** ' package too, this one is to load the charts with plots or another pictures taking hundreds of source code rows:               \documentclass{standalone}     \usepackage{standalone}     \usepackage{pgfplots}     \begin{document}       \chapter{Very important chapter}       Blah blah, look at \ref{fig:super-plot}.       \input{superplot-source-code}     \end{document}      And this nested ' **superplot-source-code.tex** ' sub-file brings the plot:               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}       \begin{figure}         \label{fig:super-plot}         \caption{Very strange plot}         ...plot...       \end{figure}     \end{document}      When I compile the **chapter** itself, figure reference is built with no problem. The problem comes, when I try to compile the **main** report file. Figure's **caption** has its ordered number, but the referencing text inside the chapter looks like ' **Blah blah, look at ??.** ' - with two question mark instead of **1.2** or something like that. For example, with the bibliography reference input with **\cite** command, there is no problem, it gives the number, although the source code with bibliography is also sub-filed with this package (but in 1st level include). I found out, that compilation with ' **latex** ' has to be done for two or three times to reach all the references. But I'm developing with TeXworks editor and compiling with **pdfLaTeX+MakeIndex+BibTex** with **synctex** enabled, which - I hope - should run **latex** for as many times as needed. So where is the point?


title: Trouble with unicode-math/fontspec in XeTeX

text: The following MWE yields a wrong output:               \documentclass{article}          \RequirePackage{xltxtra}     \RequirePackage{unicode-math}          %\setmainfont{Linux Libertine}     \setmathfont{Asana Math}          \begin{document}     \(\sigma \gets 1\)     \end{document}      The expected output should be obvious. Unfortunately though, the “gets” arrow is dropped from the output when rendered with XeTeX (0.9997.4, Unicode-Math v0.5b): > 1 But even weirder, when I comment in the `\setmainfont` line and comment out the `\setmathfont` line, then the result looks as follows: > ← 1 i.e. the sigma is swallowed. Summary: when trying to use either Asana Math or Linux Libertine or both I cannot get the above text to display correctly. **Is this a bug? How can I get this to display correctly?** * * * Furthermore, when I have “Asana Math” loaded, additionally load `microype` (2.5 beta 0.4) _and_ display a very huge math text (e.g. `fontsize{50}{50}`), the `xelatex` compiler creates an error and doesn’t produce any output. This is the error log: > thesis.tex:13: [Font] Font shape `OT1/cmr/m/n' in size <50> not available > size <24.88> substituted. (page 1)   >  thesis.tex:13: [Font] Font shape `OT1/cmr/m/n' in size <34.99985> not > available size <24.88> substituted. (page 1)   >  thesis.tex:13: [Font] Font shape `OML/cmm/m/it' in size <50> not available > size <24.88> substituted. (page 1)   >  thesis.tex:13: [Font] Font shape `OML/cmm/m/it' in size <34.99985> not > available size <24.88> substituted. (page 1) – I understand this error, but why does `xelatex` fail so badly and doesn’t produce any output?


title: Big forward slash in math

text: I have a equation in from of a=VERYBIGSTUFF / VERYBIGSTUFF And I would like to have a "verybig" forward slash in the middle of them. I dont like `\frac` mode, as I would like to have them left-to-right, not one above the other. I tried also changing the size of the "/" like `\text{\LARGE $/$}` but this gives a non centred slash, it goes upwards (as a different typography size would do, of course). How can I insert that big forward slash?


title: Indenting description lists

text: Is there a way to chenge how the description lists are indented? I have something like:               Normal text          List item     List Item      I would like something like:               Normal text              List item         List Item


title: Lettrine doesn't care of lower size

text: I'm currently using `lettrine` package and when I set a lower size bigger than zero it seems doesn't work. This is my tex source:               \documentclass[a4paper,oneside,italian,a4]{book}     \usepackage[T1]{fontenc}     \usepackage[utf8]{luainputenc}     \setlength{\parindent}{0bp}     \usepackage{type1cm}     \usepackage{lettrine}     \usepackage{babel}     \begin{document}     \chapter{Chapter 1}     \lettrine[lines=4,loversize=0.9]{L}{orem} ipsum dolor sit amet, consectetur adipiscing elit. Ut ullamcorper, magna sed commodo suscipit, massa eros ultrices nisl, quis iaculis metus tortor quis est. In eu pulvinar erat. Nullam scelerisque scelerisque mi eget lobortis. In malesuada gravida magna, non ultrices orci luctus ac. Aenean ornare tempus ligula. Sed pharetra tempus leo quis aliquam. Aliquam luctus sollicitudin mi, quis auctor quam accumsan quis. Sed at nisl quis est commodo auctor. Suspendisse eget odio vitae justo gravida bibendum et eget turpis. Suspendisse porttitor commodo blandit. Vivamus quis mi turpis. Vivamus iaculis tincidunt dignissim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.     \end{document}      These are the warnings:               LaTeX Font Warning: Font shape `T1/cmr/m/n' in size <78.02933> not available     (Font)              size <35.83> substituted on input line 12.               LaTeX Font Warning: Font shape `T1/cmr/m/n' in size <94.90416> not available     (Font)              size <35.83> substituted on input line 12.          LaTeX Font Warning: Size substitutions with differences     (Font)              up to 59.07416pt have occurred.      And this is the output PDF in which the L is not scaled correctly: ![enter image description here](http://i.stack.imgur.com/CYkrG.png)


title: What's a good package for typesetting quantum circuits?

text: I want to typeset things that look like ![enter image description here](http://i.stack.imgur.com/CSS9S.png) I'm already aware of   * Q-circuit, which has nice custom macros for this purpose, but is based on the relatively slow and clunky XyPic   * TikZ, which I can use to manually set things up (that's how the picture I've hotlinked was drawn) Are there any other alternatives I should know about?


title: Bordered table: weird last row?

text: I am trying to make a simple table in LaTeX following some tutorials but I am getting an extra column/row after the last row? Why is this? Any help would be highly appreciated :)               \documentclass[]{article}          \begin{document}          \title{Title}     \author{Author}     \date{\today}     \maketitle               \begin{center}     \begin{tabular}{| c | c | c | c |} \hline     Date & Reasons for review & Changes & Version \\ \hline     yy/xx/2012 & First edition & - & 1.0 \\ \hline     yy/xx/2012 & Something added & Section 5 & 1.01 \\ \hline     ￼￼￼￼yy/xx/2012 & More things & Section n & 1.02 \\ \hline     ￼￼\end{tabular}     \end{center}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Ic9kd.png)


title: Multibib reverse label or sort order

text: I'm using `multibib`. I manually set the order of the bibliography. I would like the order of the numbered items to be reversed. For example, my document has:               \nociteX{Foo}     \nociteX{Bar}      And the document then shows:               [1] Foo     [2] Bar      I would like the document to show:               [2] Foo     [1] Bar      Can anyone explain what to change in my `.bst` file, or a flag to `multibib` that I am missing that will achieve this?


title: Using BibTeX keys containing parentheses with Biber

text: I am trying to move to using `biblatex` with Biber rather than BibTeX. unfortunately, nearly all of my BibTeX entries have keys that include colons and parentheses. like,               @BOOK{Chambers+Hastie:(92),       editor               = {Chambers, John M. and Hastie, Trevor J.},       year                 = 1992,       title                = {Statistical Models in S},       publisher            = {Wadsworth and Brooks/Cole Advanced Books and Software},       address              = {Pacific Grove, CA},       annote               = {tree,glm,splus},     }      this is something Biber apparently doesn't care for. Is there a workaround that doesn't involve changing all my `.bib` files?


title: How to put a star (or other symbol) in sections that are "special" (difficult, optional, etc)?

text: I'm currently writing a book, and I'd like some of the sections to be clearly marked as "difficult" or "optional". Not only sections, but also exercises (I'm using the `exercise` package) and theorems (that I am defining with `newtheorem` from `amsthm`)). Something that would work for arbitrary sectioning levels, environments, etc would be great... _edit:_ I think I should have also said -- I'd like something like a star at the margin, close to the section/theorem/etc, and, if it's a section or chapter, then there should be a star before it in the text _and_ at the table of contents:               1 Introduction         1.1 blah         2.3 blah     2 Some Chapter         2.1 blah       * 2.2 this is an optional section          2.3 blah blah      **edit:** it would be nice if the star (or a configurable symbol of course) was placed _before_ the section number.


title: Checking if two conditionals are met

text: I am using the `etoolbox` package to check some variables. I can use `\ifnumless{a}{b}{True}{False}` to check if "a" is less than "b" and output "True" if true and "False" if false". How can I check if two conditionals are met though? E.g.:               IF a < b AND x > 100     DO "True"     ELSE "False"


title: Use multiple \multicolumn commands in a LaTeX table to achieve column headers

text: I'm trying to code column headers in LaTeX so that each header spans two columns; however, the following code isn't working:               \usepackage{booktabs}     \begin{tabular}{cccc}     \toprule     \multicolumn{2}{c}{Assets} \multicolumn{2}{c}{Liabilities and Equities} \\     \cmidrule(r){1-2} \cmidrule(r){3-4}     Cash & \$13,152 & Short position (200 shares owed) & \$13,152 \\     \bottomrule     \end{tabular}      `Assets` should span the first two columns, and `Liabilities and Equities` should span the second pair. When I compile this, I get this error:               Misplaced \omit.     \multispan ->\omit                         \@multispan      l.221 ...lticolumn{2}{c}{Liabilities and Equities}


title: Mark portions of text without affecting spacing

text: I would like to mark portions of my text that requires special attention during the review process. This marking won't be in the final document, so would like to be able to add these marks without affecting the spacing or alignment of the text. I don't want to change the color of the text, or add highlighting as that would be too distracting. The MWE below results in additional spacing which I want to avoid. I attempted to use `\kern-\widthof{}` but could not get that to work. I am not stuck on this approach so if someone has an alternative way to do this that is fine.               \documentclass{article}     \usepackage{amsmath}     \usepackage{mathabx}     \usepackage{xcolor}     \usepackage{calc}          \DeclareRobustCommand{\MarkStart}{\textcolor{green}{\raisebox{5pt}[0pt][0pt]{$\Rsh$}}}%     \DeclareRobustCommand{\MarkEnd}{\textcolor{green}{\raisebox{5pt}[0pt][0pt]{$\Lsh$}}}%          \newcommand*{\KernMarkStart}{\kern-\widthof{\MarkStart}}%     \newcommand*{\KernMarkEnd}{\kern-\widthof{\MarkEnd}}%          \newcommand*{\MarkStartWithKern}{\MarkStart\KernMarkStart}%     \newcommand*{\MarkEndWithKern}{\MarkEnd\KernMarkEnd}%          \newcommand*{\Mark}[1]{\MarkStart#1\MarkEnd}%     %\newcommand*{\Mark}[1]{\MarkStartWithKern#1\MarkEndWithKern}%     \begin{document}          Without changing the spacing, I want to mark     this word.          Without changing the spacing, I want to mark     \Mark{this} word.          \bigskip     Similary with inline math, I want to mark the $y^2$ term:          $x^2 + y^2 = z^2$.          $x^2 + \Mark{y^2} = z^2$.          \bigskip     With display mode math things should also be marked similarily:     \begin{align*}     a &= b\\     x^2 + y^2 &= z^2\\     x^2 + \Mark{y^2} &= z^2\\     c &= d     \end{align*}          and should be able to mark entire equation as:     \begin{align*}     a &= b\\     \Mark{x^2 + y^2 &= z^2}\\     c &= d     \end{align*}          The above should align with:     \begin{align*}     a &= b\\     x^2 + y^2 &= z^2\\     c &= d     \end{align*}     \end{document}      I am using the solution from Changbars to indicate location of conditional text so that the location of these markings is easy to locate so the fact that these markings don't stand out is ok.


title: References for learning how to check for typesetting problems

text: The following thread discusses a number of tasks one must accomplish to finish up a document: What are the finishing touches you put to a document?   * Did the original author of TeX make such small adjustments to specific words within his books?   * How critical is the order in which one completes these tasks? E.g.: if I modify something at the end of my document, then modify something at the beginning, is my first modification now irrelevant? Are there times when it is better to fix a problem near the end of a document first? If order is important, in what order is most efficient?    * What are ideal ways to solve each kind of problem when they are encountered?   * Are there any books or articles which provide such information (e.g. a checklist outlining the above)?


title: Multibib, do NOT reset reference counter

text: Using the `multibib` package, I have two bibliographic sections. I do not want the reference counter to be reset, which I had thought should be the default case. At least this is what the package documentation says, and reading the package code, the option `resetlabels` is off by default. But each bibliography starts counting from one. Here comes a MWE (file mwe.tex):               \documentclass[12pt]{article}          \usepackage[numbers]{natbib}     \usepackage{multibib}     \newcites{wwwbib}{Links to Webpages}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \section*{Test multibib}     Reference to Buzz Lightyear \cite{ref01}.     The reference to Pixar I would expect to be number 2, but it is not \citewwwbib{ref02}.     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \bibliographystyle{plainnat}     \bibliography{mwe}{}     \bibliographystylewwwbib{plainnat}     \bibliographywwwbib{mwe}{}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \end{document}      To compile, I use               pdflatex mwe     bibtex mwe     bibtex wwwbib     pdflatex mwe     pdflatex mwe      The content of file `mwe.bib` is as follows:               @article{ref01,        author = {Lightyear, Buzz},        title = {To Infinity and Beyound Part 1},        journal = {Unknown},        volume = {54},        number = {4},        pages = {331-390},        year = {2001}     }          @misc{ref02,        author = {Pixar},        title = {Pixar Website},        howpublished = {\url{www.pixar.com}},        year = {2001}     }      The pdf output is ![enter image description here](http://i.stack.imgur.com/IO7nx.jpg) How can I get continuous numbering?


title: Generating On-Shell Diagrams

text: There is a paper called "Scattering Amplitudes and the Positive Grassmannian", and they have diagrams that they call "On-Shell Diagrams". (See pg. 10 of http://arxiv.org/pdf/1212.5605v2.pdf). I am aware that tikz is capable of producing diagrams like this, however it is not clear to me how to do this in tikz. ![example](http://i.stack.imgur.com/SiAw4.png)


title: Graphicspath for MikTeX

text: Is there a way to specify a `\graphicspath` that includes all sub-directories? I know I could put all my graphics in a texmf tree, but I'd like to have them in another directory tree. As far as I can tell, `\graphicspath` won't include sub-directories. I'm using MikTeX 2.8.


title: Multirow in multirow

text: I am trying to get this to work. It is supposed to have a cell (that was already created with multirow) with three rows but I do not know how to get it to work. I am using shortstack to get it, but it is not optimal. In particular, W2=3 should be aligned with the first set of three values in the snippet below. My guess is that I have to use multirow within multirow, but I am lost.               \begin{figure*}       \centering       \begin{tabular}{|c|c|c c c c|c|}     \hline     \multicolumn{2}{|c|}{\multirow{2}{*}{$V_{\rm rot}/{\sigma}$}}&\multicolumn{4}{c|}{W1}\\     \cline{3-6}     \multicolumn{2}{|c|}{}&3&6&9&12\\     \hline     \multirow{4}{*}{W2}& 3   & \shortstack{0.090475$\pm$ 0.011115\\0.14861$\pm$ 0.03562\\0.1861 $\pm$ 0.01728} & 21&6&3\\                        & 6   &8&14&5&2\\                        & 9   &8&14&5&2\\                        &12   &8&14&5&2\\     \hline     \end{tabular}     \caption{Multirow in multirow}        \label{ta.Multirow}                                  \end{figure*}


title: Table column spacing: right most column has too much space, should be shared

text: I made a table. It has 5 columns, the last 4 centered. Right now, they are not evenly spaced. Namely, the last column is way too far from the others. How do I go about fixing this? Here is the code (`apa6` class):               \begin{table}\footnotesize     \caption{Differences in valuation between different types of third parties}     \begin{tabular}{l c c c c}     \hline     Measure & 1 & 2 & 3 & 4 \\     \hline     1. Low Comp Low Pun & -.131 & -.016 & -.053 & .039 \\     2. Low Comp High Pun & -.077 & -.062 & -.070 & .031 \\     3. High Comp Low Pun & -.077 & -.062 & -.070 & .031 \\     4. High Comp High Pun & -.077 & -.062 & -.070 & .031 \\     \hline     \multicolumn{5}{l}{Note. Bottom left within conditions, top right and diagonal between conditions}\\     \end{tabular}     \end{table}


title: How to vertically center the \vdots in this node?

text: I'd like the `\vdots` in this chain to have the same distance to both of the arrows. I know that I could manually shift the node so that it looks right, but there must be a better solution. How?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{chains}     \begin{document}     \begin{tikzpicture}[start chain=going below,every join/.style={->}]         \node [on chain, join] {A};         \node [on chain, join] {$\vdots$};         \node [on chain, join] {B};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/gtzhQ.png)


title: handling href when importing separate standalone latex documents and assembling them into one document

text: This is a follow up on the question How to import separate standalone latex documents and assemble into one document I am using the package `standalone` to assemble many child latex files from different folders in the tree into one parent file at the top level while keeping each child in its own folder and be able to build each child document as separate latex document. Using the above package, with the package `import` is working well. But there is one big problem when using links. When using `href` in a child document to link to a file relative to it (say in the same folder), then when building the parent document, the links do not work since the path in the link is now not valid. i.e. hyperlinks do not get adjusted for the level the parent document is in. Here is a picture of the set up with 2 small files as a complete example               main.tex   (now the link below is wrong when main document is build)       |       |       A/----+ child.tex  (this contains href to foo.pdf)               foo.pdf      main.tex is               \documentclass[titlepage]{article}%     \usepackage{standalone}     \usepackage{import}     \usepackage{hyperref}     \begin{document}     \subimport*{A/}{child}%     \end{document}      and child.tex is               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \href{foo.pdf}{my pdf file}     \end{document}      One solution is to use absolute path in the links. But this is a problem since I can move the tree itself to different location and the absolute path can change. Another option is to use a path in the child file that is already adjusted taking into account the parent level. So in this example I would write in the child.tex this                \href{A/foo.pdf}{my pdf file}      instead of                \href{foo.pdf}{my pdf file}      But now the links when I build the child document only will be wrong. Also this means if I change the internals of the tree layout, (say move the folder A one level down) the links will all have to be fixed manually. **I'd like to find if there is a better and automated way to handle this?** The import package handles the relative path for the import fine, but I need something to handle the `href` links as well used in the document. Or may be I should just give up on the idea of importing separate standalone latex documents and assembling then into one document because if the href links are broken, then this whole thing will not work. I have many links that I use that are relative to the document level. May be Latex is not right for such a task. **Update 1** I found a big problem with the `currfile` package but I have not yet looked to see if there is an option to handle this case. Given this tree, same as above, except I just renamed the files:               index.tex          |       |       A/----+ index.tex  (this contains href to foo.pdf)               foo.pdf      Notice that I used the same file name (index.tex) which is very common for the above level and the lower level. Now `currfiledir` does not work. It gets confused by the same name and does not handle the link correctly. When I change the name to `index2.tex` for the child, then it worked. i.e. the same exact files as I have shown above, just renamed them to `index.tex` _in both fodlers_ caused this problem ! I used `index.tex` all over the place. In each folder, I have `index.tex`. I suppose I can rename each file to be unique. But I hope there is an option in this package to handle this. Here are the files for completion based on the above tree: index.tex (in the top level)               \documentclass[titlepage]{article}%     \usepackage{standalone}     \usepackage{import}     \usepackage{hyperref}     \usepackage{currfile}          \begin{document}             \subimport*{A/}{index}  %renaming this from index1 will make it work!     \end{document}      index.tex (in the lower level, the child) %rename to index1.tex to make it work!               \documentclass{article}     \usepackage{hyperref}     \usepackage{currfile}     \begin{document}     \href{\currfiledir foo.pdf}{my pdf file}     \end{document}


title: How to shift in tikz scope relatively to an object + offset?

text: How do you shift `(0,0)` to something like: `(MYBOX.west)++(0.1,0)`? Here is a MnWE:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning, calc}          \begin{document}         \begin{tikzpicture}             \node[rectangle, draw] at (0,0) (MYBOX) {Something};             \begin{scope}[shift={$(MYBOX.east) + (0.1,0)$}]                 \draw[black] (0,0) -- ++(0, -1);             \end{scope}         \end{tikzpicture}     \end{document}


title: Centering cell content in multirow

text: According to the table code below, Could anyone please help me to:   1. center vertically and horizontally `TextB1`, `TextAB`, `TextC0`, `TextC1`, `TextC2`, `TextC17` and `TextC18`   2. Draw vertical line along the right side of the cell containg `TextC0`. i.e. drawing a line along the left side of the cells containing `TextC1` ...until... `TextC6`. The `|` can't do this with the `\multirow` command. I'll really be grateful if you help me on that.                   \begin{table}[h]         \footnotesize         \centering         \renewcommand{\arraystretch}{1.5}         \setlength{\arrayrulewidth}{1.5pt}         \def\tabularxcolumn#1{m{#1}}         \begin{tabularx}{\linewidth}{|>{\centering\arraybackslash}m{1.8cm} >    {\centering\arraybackslash}m{1.8cm} m{1.8cm} X >{\centering\arraybackslash}m{2.5cm}|}         \hline         \multicolumn{2}{|m{3.6cm}}{\centering{\textbf{Vertically and horizontally centered  Text (width = 2cm (colum1) + 2cm (column2) = 4cm)}}} & \centering{\textbf{Vertically and horizontally centered Text (width = 1.8cm)}} & \textbf{Justified and vertically centered Text (width= X)} & \textbf{Vertically and horizontally centered Text (width=2.5cm)}   \tabularnewline \hline         \multicolumn{2}{|c}{TextA1} & TextA2 & LongText1 LongText1 LongText1 LongText1 LongText1 LongText1 & \multirow{5}{*}{TextAB}  \\ \cline{1-4}         \multicolumn{2}{|c}{\multirow{4}{*}{TextB1}} & TextB2 & LongText2 LongText2 LongText2 LongText2 LongText2 LongText2 & \\ \cline{3-4}         & & TextB3 & LongText3 LongText3 LongText3 LongText3 LongText3 LongText3 & \\ \cline{3-4}         & & TextB4 & LongText4 LongText4 LongText4 LongText4 LongText4 LongText4 & \\ \cline{3-4}         & & TextB5 & LongText5 LongText5 LongText5 LongText5 LongText5 LongText5 & \\ \hline         \multirow{10}{*}{TextC0} & \multirow{2}{*}{TextC1} & TextC7 & LongText6 LongText6 LongText6 LongText6 LongText6 LongText6 & \multirow{2}{*}{TextC17} \\ \cline{3-4}         & & TextC8 &  LongText7 LongText7 LongText7 LongText7 LongText7 LongText7 & \\ \cline{2-5}         & \multirow{4}{*}{TextC2} & TextC9 & LongText8 LongText8 LongText8 LongText8 LongText8 LongText8 & \multirow{4}{*}{TextC18} \\ \cline{3-4}         & & TextC10 & LongText9 LongText9 LongText9 LongText9 LongText9 LongText9 & \\ \cline{3-4}         & & TextC11 & LongText10 LongText10 LongText10 LongText10 LongText10 LongText10 & \\ \cline{3-4}         & & TextC12 & LongText11 LongText11 LongText11 LongText11 LongText11 LongText11 & \\  \cline{2-5}         & TextC3 & TextC13 & LongText11 LongText11 LongText11 LongText11 LongText11 LongText11 & TextC19 \\ \cline{2-5}         & TextC4 & TextC14 & LongText12 LongText12 LongText12 LongText12 LongText12 LongText12 & TextC20 \\ \cline{2-5}         & TextC5 & TextC15 & LongText13 LongText13 LongText13 LongText13 LongText13 LongText13 & TextC21 \\ \cline{2-5}         & TextC6 & TextC16 & LongText14 LongText14 LongText14 LongText14 LongText14 LongText14 & TextC22 \\ \hline         \end{tabularx}         \end{table}


title: Weird output in tabular environment

text: I created a table and I didn't use `\\\` in the last line before the final `\hline` (which I know is wrong) and in the last cell with its contents was also a word "height". Where did that word come from? And why? ![enter image description here](http://i.stack.imgur.com/wBBLV.png)               \documentclass[12pt]{article}          \begin{document}          \begin{tabular}{|l|l|}     \hline     1 & 2\\     \hline     3 & 4\\     \hline     5 & 6     \hline     \end{tabular}          \end{document}


title: Define a macro based on parameter

text: I am trying to create a macro that creates two macros. The first sets a default value and the second creates a macro to redefine the first. I am trying to generalize a common pattern I am using quite a bit.               \newcommand{\mkMac}[1]{%     \newcommand{\the#1}{The macro ##1}     \newcommand{\#1}[1]{\renewcommand{\the#1}{##1}}     }      Usage:               \mkMac{affilation}     \affilation{University}     Welcome to \theaffilation


title: Unable to find TFM file "upjisg-h" error

text: I have a tex project as below. It's ok if compiles by uplatex+dvipdfm in Winshell editor. Now, I need to speed up the compile process, then I use the TexWorks. In Edit\Preferences\Typesetting, I add a new typesetting which uses latexmk.exe command with agurment $fullname. The compile process goes well until dvi->pdf. It shows error:               ** ERROR ** Unable to find TFM file "upjisg-h"      The console log as below:               ....     Running 'dvipdfmx  -o "danits2014v1_stackex.pdf" "danits2014v1_stackex.dvi"'     ------------     Latexmk: applying rule 'dvipdf'...     For rule 'dvipdf', running '&do_viewfile(  )' ...     danits2014v1_stackex.dvi -> danits2014v1_stackex.pdf     [1     ** ERROR ** Unable to find TFM file "upjisg-h".          Output file removed.     Latexmk: Failure to make the files correctly         ==> You will need to change a source file before I do another run <==     Collected error summary (may duplicate other messages):       dvipdf: Command for 'dvipdf' gave return code 256      Tex source:               \documentclass[uplatex]{ujarticle}     \usepackage{its2014}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage[cmex10]{amsmath}     \usepackage{multirow}     \usepackage{url}                      \usepackage{subfigure}          \begin{document}         \subsection{IMACモデルと更新方法}     \end{document}      Please consult me a solution to overcome this problem. Thank you.


title: Headline-ignoring, pagewise line numbers

text: Despite the easy-sounding task, it appears to be hard to find a suitable package to print line numbers that ignore the automatically generated `section`/`subsection` etc. headlines in their counter. The currently preferred, non-deprecated choice of line-numbering package seems to be `lineno`, which sadly doesn't have the desired option. My current way of implementing it is calling it using               \usepackage[pagewise, modulo]{lineno}      before the beginning of the document and then calling               \linenumbers      after the table of contents so it doesn't interfere with these. However, using               \section{Heading}     text longer than 5 lines      results in `lineno` printing the number 5 next to **text line** number 4, because it also counts the section heading as a line. Please note that I'd like to refrain from using the `linenumbers`-environment to manually number every paragraph since my document is quite long.


title: How to Draw xsd in Tikz

text: How can I draw with xsd in TikZ? ![enter image description here](http://i.stack.imgur.com/r5SBm.jpg)


title: Measuring line length, using \hfill to justify text, wrapping and right justifying if space too small

text: I am a lecturer and have an issue when compiling test and exam questions. The questions will be in an enumerate environment and look something like this, where the marks shown in brackets are right justified on the last line of the problem:   1. Determine the reactions and draw the shear force and bending moment diagrams. Hence determine the maximum bending stress experienced by the component. `\hfill(10 marks)` Using `\hfill` works fine when there is sufficient space on the line. In the case where there is insufficient space on the line to accommodate the marks bracket, the text wraps to the start of the next line. In order to right justify it on the next line I use the rather crude code `\\\ \hfill\makebox{\hspace{13.3cm}(10 marks)}` to get the mark bracket right justified on the succeeding line, but have to play with the `hspace` length to get it to look right. Is there a way to measure the remaining space on a line and simultaneously measure the length of the marks bracket, then, in the case where the marks bracket length is larger than the remaining space get the marks bracket to right justify on the succeeding line? Note that the exact length of the marks bracket varies (consider the lengths of "(1 mark)" and "(20 marks)" and the exact text of the last line is not known until the text is compiled. Thanks in anticipation!


title: BibLaTeX and babel - strange errors

text: I' m writing my MA thesis using LaTeX + BibLaTeX for bibliography. Sadly it seems that BibLaTeX paired with babel results in a number of strange errors:               \extraspolutonikogreek ...unct \abx@extras@polish     \abx@strings@polish     l.11 \select@language{polutonikogreek}          ?     ! Undefined control sequence.     \extraspolutonikogreek ...ish \abx@strings@polish          l.11 \select@language{polutonikogreek}          ?     ! Undefined control sequence.     \noextraspolutonikogreek ... \abx@noextras@polish          l.15 \select@language{polish}      The "strange" part comes from the fact that commenting BibLaTeX out removes them altogether. But BibLaTeX is precisely the reason why I started using LaTeX in the first place - I need Ancient Greek, French, Hebrew and Polish titles in my bibliography. Neither can I turn babel off - I use the same languages inside the text of my thesis. There's however an upside to this problem: the errors don't do a thing. The text still turns out just as I wanted it. So, in theory, I could stop bothering - but:   1. They obscure my ability to perceive other errors (the text I'm working on has 997 lines of code as of now).   2. They are there for some reason and I'm quite sure that they should not be there. My MWE:               \documentclass{report}     \usepackage{polski}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[polutonikogreek,polish]{babel}     \usepackage{biblatex}     \usepackage{filecontents}          \begin{document}     ąśćłź          \begin{otherlanguage}{polutonikogreek}     >ws m`h e>id'oj' >'htis m' >'eteken, >ex <'otou t' >'efun,     \end{otherlanguage}          \end{document}


title: How to make different font size for each row in tabularx?

text: \begin{landscape}     \begin{table}[!h]\renewcommand{\arraystretch}{1}\addtolength{\tabcolsep}{0 pt}     \centering     \caption{Diagnostic test statistics for all models \& Emerging markets.}     \label{T.55}           \begin{tabularx}{0.95\linewidth}{lccccc||lccccc}     \hline     \rule{0pt}{12pt}&\multicolumn{5}{c||}{$H(6)$}&\multicolumn{5}{c}{$H(6)$}\\     \hline     \rule{0pt}{12pt} Model &Linear  &Quadratic  &Cubic  &GAM  &KFMR & Model&Linear  &Quadratic  &Cubic  &GAM &KFMR\\     \hline     \rule{0pt}{12pt}\it{Developed}&&&&&&\it {Emerging} &&&&&\\       France          &4383.99&2005.36&1821.74&1948.91&95.81 & Brazil  &54.97 &37.75  &37.52  &25.39  &11.07\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.000  &0.000  &0.000  &0.013  &0.086\\     Germany         &817.98 &124.25 &62.88  &59.35  &83.53 &Chile  &17.20   &13.45  &11.08  &12.52  &9.56\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.142  &0.337  &0.522  &0.405  &0.144\\     Italy           &132.74 &134.65 &131.79 &115.64 &110.47&India&25.72 &26.33  &28.56  &27.08  &15.79\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.012  &0.010  &0.005  &0.008  &0.015\\     Japan           &1900.93&2163.24&2192.52&2337.99&451.05&Korea   &94.92  &103.49 &102.98 &105.92 &13.39\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &       &0.000   &0.000  &0.000  &0.000  &0.037\\     Norway          &229.48 &230.47 &293.06 &268.82 &312.29&Malaysia &11.91 &12.57  &9.31   &10.54  &13.07\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.453  &0.401  &0.676  &0.569  &0.042\\     Sweden          &1054.32&75.38  &52.96  &44.84  &55.49 &Mexico &43.77   &30.22  &27.89  &23.55  &19.18\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.000  &0.003  &0.006  &0.023  &0.004\\     Switzerland     &513.14 &498.66 &413.96 &455.74 &88.40 &Poland &44.50   &45.00  &41.61  &40.49  &25.94\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.000  &0.000  &0.000  &0.000  &0.000\\     UK              &403.55 &297.95 &274.03 &169.71 &379.99&Russia  &25.77  &25.76  &23.37  &19.01  &19.93\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.012  &0.012  &0.025  &0.088  &0.003\\     USA             &616.13 &598.02 &535.16 &612.09 &23.49 &SouthAfrica     &28.46  &24.02  &24.58  &22.39&17.34\\                     &0.000  &0.000  &0.000  &0.000  &0.000 &        &0.005  &0.020  &0.017  &0.033  &0.008\\     \hline     \end{tabularx}     \end{table}     \end{landscape}


title: Adding a period after section

text: I have               \usepackage{titlesec}     \titleformat{\section}[runin]     {\normalfont\Large\bfseries}{\thesection}{1em}{}     \titleformat{\subsection}[runin]     {\normalfont\large\bfseries}{\thesubsection}{1em}{}      which moves the text up after the section (and subsection). How can I add a period after the section title so that I get: 2.3 Section title. Text of paragraph...


title: Is it possible to derive a new style from an existing style?

text: Is there a convention in TikZ for defining a new style as an extension of an existing style? As it stands, I can do:               a/.style    = { black, very thin }      Then I could extend this style locally within, e.g., a scope:               \begin{scope}[a/.append style = { thick }]       …     \end{scope}      or I could define an entire new style:               b/.style    = { black, thick }      but this requires replicating the shared style information across both `a` and `b`. It seems there could be some way of specifying `b` as an extension of `a` (everywhere equivalent to "appending" `b`'s definitions to `a`'s definitions), akin to:               b/.style    = { extends = a, thick }      or:               b/.inherits = a,     b/.style    = { thick }      Is there a canonical answer in TikZ beyond just "use a TeX macro to define the shared contents"?


title: Variable persist outside environment

text: I am using the `ifthen` package for some conditional formatting. I am storing state in some `booleans`, but it seems that there is an issue with lexical scope. In particular, when a boolean is set within an environment, the value does not persist outside the environment. Here is an example:               \documentclass{article}     \usepackage{ifthen}  % or xifthen     \newboolean{bool}     \setboolean{bool}{true}          \begin{document}     Start: \ifthenelse{\boolean{bool}}{T}{F}          \begin{itemize}     \item{item} \ifthenelse{\boolean{bool}}{T}{F}     \setboolean{bool}{false}     \item{item 2} \ifthenelse{\boolean{bool}}{T}{F}     \end{itemize}          End: \ifthenelse{\boolean{bool}}{T}{F}  \textit{(should be false)}     \end{document}      The output of this is:                  Start: T        * item T        * item F        End: T (should be false)      How might one preserve the value of the boolean set inside an environment so that it is accessible outside?


title: Splitting file into lines and lines into parts

text: I'm working on a song book using LaTeX. It's early in the project, and the songs aren't all picked out yet, but I thought I'd fix the inner workings of it in the meantime.   Since many people will (hopefully) be involved, and many songs included, I want to save all songs separately and \input them.   The dream would be to have a text file where the songs are listed like > Thrift shop-macLemore   >  Two worlds, one family-from Tarzan   >  Gagnam Style-Psy and for me to be able to loop through the list and say (Sorry for mixing languages):               for(line l : index.txt) {         String[] k = l.split('-');         \includesong{k[0]}{k[1]}     }      Is there any good way to do this? EDIT: I found a package called parselines that does the job fairly well. Especially combined with a little regex-fu (Why is there so little information on the internet about \def\foo#1, #2?).


title: Two-sided bar chart

text: I strive to make a bar chart displaying opinions for and against different topics. ![fictive example poll](http://i.stack.imgur.com/uXHx0.png) I tried to do this with pgfplots starting from bar and interval bar charts. Bars to both sides can be archived using negative values and the option `forget plot`. The major remaining problem is splitting the x axis so that the labels are in between the negative and positive bars. Automatic line breaking of long labels would be a nice extra feature. The image mockup above I made using TikZ. Here is the code, perhaps this inspires anyone.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{positioning, fit, snakes, scopes}          \begin{document}     \begin{tikzpicture}       { [align=center]  % labels         \node (a) at (0, 0) {short l.};         \node (b) at (0, 1) {medium labels};         \node (c) at (0, 2) {very enormously \\ excessively long labels};       }            % invisible node surrounding all labels       \node [fit={(a) (b) (c)}] (center) {};            % axis labels       \node (title) at (0, -1.5) {Opinions};       \node at (3, -1) {likes};       \node at (-3, -1) {dislikes};            { [yshift=-.25cm]  % named coordinates below as anchors         \coordinate (east) at (center.south east) {};         \coordinate (west) at (center.south west) {};       }            { [minimum height=5ex]  % bars         { [every node/.style={fill=teal, anchor=west}]  % positives           \node [minimum width=2cm] at (a-|east) {};           \node [minimum width=6cm] at (b-|east) {};           \node [minimum width=4cm] at (c-|east) {};         }         { [every node/.style={fill=purple, anchor=east}]   % negatives           \node [minimum width=4cm] at (a-|west) {};           \node [minimum width=3cm] at (b-|west) {};           \node [minimum width=1cm] at (c-|west) {};         }       }            % axes       \draw[->] (east) -- ++(6.25, 0);       \draw[snake=ticks,segment length=1cm, segment amplitude=1.75] (east) -- ++(6, 0);       \draw[->] (west) -- ++(-4.25, 0);       \draw[snake=ticks,segment length=1cm, segment amplitude=1.75] (west) -- ++(-4, 0);            { [every node/.style={yshift=-2ex}] % axis labels         \node at (east) {0};         \node[xshift=2cm] at (east) {2};         \node[xshift=4cm] at (east) {4};         \node[xshift=6cm] at (east) {6};         \node at (west) {0};         \node[xshift=-2cm] at (west) {2};         \node[xshift=-4cm] at (west) {4};       }     \end{tikzpicture}     \end{document}      Can such a chart be made with pgfplots? Or is there another package that can do it?


title: How to add a gradient fade-out effect to an image?

text: I am working on a presentation in beamer and would like to put a logo in the background of the title page with a gradient fade-out effect, similar to the image below. The logo is in PDF format and is in full-shape. ![enter image description here](http://i.stack.imgur.com/JEPGz.png)


title: Emergency stop in large document output by `latexdiff`. Can I debug any cleverer than commenting out entire document?

text: I'm running my PhD thesis through `latexdiff` (between two iterations for my supervisors), which is unfortunately producing malformed output (thesis has lots of tikz-graphics, including externalised graphics in `standalone`-files, absolute positioning, and other fun that likely stretches `latexdiff` beyond its limits). I've identified one specific problem so far, but for the next one, I don't know where to start. I'm compiling with `pdflatex -shell-escape` and `tikzexternalize`, and when it sets out to compile `thesis_diff- figure0.pdf`, it fails with the unhelpful (to me) message:               A tikzpicture has been optimized away. Use '/tikz/external/optimize=false' to disable this.     )     ! Emergency stop.      <*> ...rnalrealjob{thesis_diff}\input{thesis_diff}      My usual way of identifying an error is to comment out almost the entire document, then comment it in bit by bit (thus obtaining a MWE). Considering the message above, can I debug this any smarter?


title: No space above first \item inside mdframed

text: ## Problem This is what happens: ![Screenshot](http://i.stack.imgur.com/poBCy.png) But I want the same vertical spacing before the first list item _inside_ the `mdframed` environment as _outside_ of it. How can I do this? ## Code               \documentclass{article}     \usepackage{mdframed}     \begin{document}          \paragraph{inside mdframed:}     \begin{mdframed}         Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.         \begin{enumerate}             \item Lorem             \item Ipsum             \item Dolor         \end{enumerate}     \end{mdframed}          \paragraph{outside mdframed:}~\\     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.     \begin{enumerate}         \item Lorem         \item Ipsum         \item Dolor     \end{enumerate}          \end{document}      ## First thoughts I already read about this issue in combination with the `minipage` environment, but does `mdframed` use `minipages` internally? If it would do so, there would be no pagebreaking possible, would it?


title: how to make all line of subsection in order and with space

text: \subsection{CLOSED :}     If the operator results in the same set that it operates upon , then the algebraic system is               called ' CLOSED ' .          Example :          1. Set of an integer is closed under + , - , $\times$ operator.          2. Set of an integer is not closed under / operator.          Let A = \{ $\alpha$,$\beta$,$\psi$ \}      I want these spaces which I'm not getting and in same order.


title: How to keep the alignment of equation array on a new page?

text: I have a very long equations inside               \begin{eqnarray}        long equation go over 2 pages...     \end{eqnarray}      I can't break into two by                \begin{eqnarray}               1/n of long         \end{eqnarray}         \begin{eqnarray}               b/n of long         \end{eqnarray}      Unfortunately, the alignment is gone since the alignment of the second page is based on the first equation on the second page. I wonder is there a way to keep the same alignment for a really long equations?


title: Two boxplots per plot entry - shifting boxplots in pgfplots

text: I'm trying to compare the results of a control group and an experimental group under different conditions. To simplify, let's assume there is only one condition (ie. only one mark along the x axis using `boxplot/draw direction=y`) and I'd like there to be two boxplots on top of this, one on each side of the mark. Here's an example of a similar plot to the one I'm trying to make now made in the past (this one has five conditions, but the added complexity I guess illustrates the benefits of such a layout): ![Comparing boxplots per condition](http://i.stack.imgur.com/Oi9XL.png) In the past (ie. pre `pgfplots <1.8`) I used to accomplish this by using a pair of custom styles: `rshift` and `lshift`, which would shift each plot a given amount to either the `r`ight or the `l`eft:               \pgfplotsset{       rshift/.style={         xshift=\pgfkeysvalueof{/pgfplots/rshift scale},         legend image post style={xshift=-\pgfkeysvalueof{/pgfplots/rshift scale}}       },       lshift/.style={         xshift=-\pgfkeysvalueof{/pgfplots/lshift scale},         legend image post style={xshift=\pgfkeysvalueof{/pgfplots/lshift scale}}       },       rshift scale/.initial=0.2em,       lshift scale/.initial=0.2em,     }      However, the new boxplots code overrides these shifts, breaking my hack. So, now that we have a (greatly and undeniably) improved interface for boxplots, what would be the way to do a plot like the one shown (of course, ignoring the syling), without having to revert to the old way of doing things? # The boxplot style The answer by Christian Feuersänger implemented his own version of the style in the picture, so I thought I might provide the one I'm using now. This is only the style for the boxplots, though, not margins and ticks.               \pgfplotsset{       % Fixed box width       boxplot/box width/.initial=1em,       % Solid boxes with fixed box width       solid boxes/.style={         mark=x,         boxplot/draw direction=y,         boxplot/whisker extend=0,         boxplot/draw/median/.code={%           \draw[mark size=2pt,/pgfplots/boxplot/every median/.try]             \pgfextra             \pgftransformshift{               \pgfplotsboxplotpointabbox                 {\pgfplotsboxplotvalue{median}}                 {0.5}             }             \pgfsetfillcolor{white}             \pgfuseplotmark{*}             \endpgfextra           ;         },         boxplot/draw/box/.code={           \draw[fill,/pgfplots/boxplot/every box/.try]             ($(boxplot box cs:\pgfplotsboxplotvalue{lower quartile},0.5)!0.5\pgfkeysvalueof{/pgfplots/boxplot/box width}!(boxplot box cs:\pgfplotsboxplotvalue{lower quartile},0)$)             rectangle             ($(boxplot box cs:\pgfplotsboxplotvalue{upper quartile},0.5)!0.5\pgfkeysvalueof{/pgfplots/boxplot/box width}!(boxplot box cs:\pgfplotsboxplotvalue{upper quartile},1)$)           ;         }       },     }


title: pgfplots label with 2 parts causes parse error

text: I would like to draw a scatterplot like create scatter plot from dat file of a table containing data (actually in an external file) structured `label`, `x=x`, and `y=y`, but keep getting errors with the label names. LaTex reads _Direct Care_ as two separate columns, how would I correct this? Can be using Tikz, pgfplot or other at your discretion. No need for data labels however.               \documentclass{article}     \usepackage{pgfplots,filecontents}     \pgfplotsset{compat=1.7}     \begin{filecontents*}{mydata.dat}     label x y     Direct Care 3   1     Housekeeping    2.366666667 5     Mealtimes   1   1     Medication Round    2.7 7     Miscellaneous   0.883333333 1     Personal Care   8   5     \end{filecontents*}     \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}         \begin{axis}[xlabel=Time(mins),ylabel=Surface contacts]             \addplot[                     visualization depends on={\thisrow{nodes}\as\myvalue},                 scatter/classes={                     Direct Care={mark=*,blue},                     Housekeeping={mark=*,red},                     Mealtimes={mark=*,blue},                     Medication Round={mark=*,red},                     Miscellaneous={mark=*,blue},                     Personal Care={mark=*,red},                     },                     scatter, only marks,                     scatter src=explicit symbolic,                     ]              table[meta=label,x=x,y=y]                 {mydata.dat};         \end{axis}     \end{tikzpicture}          \end{figure}          \end{document}


title: Can anyone help me create the table below?

text: I try to use \multirow to create the table below, but it failed. Making the "unit" below the item causes table creation difficult for me. Anyone can help me out? ![enter image description here](http://i.stack.imgur.com/MZLq4.jpg)


title: Using TikZ library `external` with images that require multiple compilations

text: I have a fairly large LaTeX document that requires compiling a number of times (because of a lot of (cross)references, appendices, etc.). Part of this document are a number of TikZ images that require a different number of compilations to come out right (here's an example); Some require 2, and some require 3, or 4. Since my overall compilation process requires 4 executions of (`pdf`)`latex`, it would be nice to speed things up a little bit, just by skipping unnecessary TikZ compilations. But if I use tikzlibrary "external", only the first run of (`pdf`)`latex` will work on the TikZ images, and those that need multiple runs will never reach maturity. Can I somehow tell TikZ how often to compile a given image during each run? That way the first run of (`pdf`)`latex` would take care of maturing all TikZ images, and in the next run, the image would simply be pasted from it's ready- made pdf rendering.


title: How to number each equation of simultaneous equations grouped by a left curly brace?

text: Consider the following MWE.               \documentclass[preview,border=12pt,varwidth]{standalone}     \usepackage{amsmath}          \begin{document}     \abovedisplayskip=0pt\relax     \begin{equation}     \begin{cases}     ax + by =c \\     px + qy = r     \end{cases}     \end{equation}     \end{document}      produces an output as follows. ![enter image description here](http://i.stack.imgur.com/LfDof.png) What I want to achieve is as follows. ![enter image description here](http://i.stack.imgur.com/baucu.png) Is there any idea? My attempt is as follows, but it does not compile.               \documentclass[preview,border=12pt,varwidth]{standalone}     \usepackage{amsmath}          \begin{document}     \abovedisplayskip=0pt\relax     \begin{equation}     \begin{cases}     ax + by =c \tag{OK}\\     px + qy = r \tag{Yes}     \end{cases}     \end{equation}     \end{document}


title: Control breaking of overlong section titles

text: I have following code:               \section{This is some long text and probably it will be broken}      I would like to prevent word division like:               This is some long text and pro-     bably it will be broken      And the second issue is to break it in a nice way, for example:               This is some long text and probably it will be     broken      looks bad, because only word 'broken' will be placed in second line. It would be nicer to do it in this way:               This is some long text and probably     it will be broken


title: pgfplots: setlength inside foreach

text: I have the following code, where the size of the cube marks is set to `\x` inside a `foreach` loop:               \begin{tikzpicture}      \begin{axis}[axis lines=none]       \newlength{\mylen}       \foreach \x in {1,2,...,10} {       \setlength{\mylen}{\x pt}         \addplot3[only marks,scatter,mark=cube*,mark size=\mylen] coordinates {(\x*5,10*\x,3*\x)};         };     \end{axis}     \end{tikzpicture}      This results in an empty plot - i.e. it doesn't work. However, if we set the length for `mylen` (to a constant) _before_ the foreach-loop, it works just fine. That might be a clue. Any ideas? Also, how can can I manipulate the length inside the `\setlength` command to for instance `\setlength{\mylen}{2*\x+10 pt}` ?


title: How to change the position of the caption in a “narrow” and “minipage” environment?

text: I have some huge figures to include in Latex. Therefore I use the "minipage" and "narrow" environment to place it right at the desired position and to move it to the left until it looks centered. Then, however, the caption moves to the left, too. The result: The figure is centered and the caption is not. The longer the caption, the worse it looks because it moves more and more to the left. Now I want to move the caption to the right until its "centered" again. Here an example:               \documentclass[a4paper,11pt,ngerman]{scrreprt}          \usepackage[komastyle,automark]{scrpage2}     \usepackage[latin1]{inputenc}     \usepackage{booktabs}     \usepackage{graphicx}     \usepackage[a4paper,left=2.5cm,top=2.5cm,bottom=2.5cm,includeheadfoot,width=16cm]{geometry}     \usepackage{nonfloat}          \renewcommand{\captionformat}{~---~}     \setcapindent{0mm}     \addtokomafont{caption}{\small}     \setkomafont{captionlabel}{\sffamily \bfseries}          \begin{document}          \begin{narrow}{-1.0in}{0in}     \begin{minipage}{\linewidth}     \centering%     \includegraphics[width=600pt, height=273pt]{figureName}%     \figcaption{Here is a long caption, the longer it is, the worse it looks}%     \label{fig:label}%     \end{minipage}     \end{narrow}          \end{document}      Heres an example: ![enter image description here](http://i.stack.imgur.com/di7Le.jpg) Above picture illustrates the situation: The caption needs to move to the right until its centered again. Any ideas? Thanks in advance!


title: How to put Japanese Kanji characters into an English document?

text: Japanese, please help: I need to put the following into LaTeX and print it out with pdfLaTeX. The document itself is in English, so I only need a way to put these Kanji characters (Jin, aza, BUN, MOJI, or so, at least I was told so, I have no clue) into the text. Something like \jin, \aza ... would be great.               : (char "a")     -> 97     : (char "字")     -> 23383     : (char 23383)     -> "字"     : (chop "文字")     -> ("文" "字")     : (mapcar char @)     -> (25991 23383)


title: Tabu: factors of cell width

text: When I use factors of a variable in `tabu`'s cell description, the result is not what I intended. For example in the following code, the middle cell is not half the width of the others.               \documentclass{article}     \usepackage[english]{babel}     \usepackage{tabu}          \newcommand \myWidth {60mm}          \begin{document}         \begin{tabu}         {|p{\myWidth}| p{.5\myWidth}|p{\myWidth}|}a & b & c         \end{tabu}       \end{document}      results in ![Result](http://i.stack.imgur.com/ApppX.png)


title: Why tabular doesn't work with ModernCV

text: When I try to insert a tabular in my CV using modernCV document like this                \begin{tabular}{|c|c|c|}      \hline aa & bb & cc \\      \hline dd & ee & ff \\      \hline      \end{tabular}      I don't get any border. It appears that it's not possible to make a tabular in a moderncv. How can I solve this?


title: latex in org mode of emacs and regular latex

text: What is the difference, advantage or disadvantage of using org mode in emacs? If there are advantages, would you like to explain how it is used and what codes goes into using it. I am new (3 days) to emacs and has just basic knowledge of LaTex! Regards


title: siunitx tables and commands between columns

text: I'd like to add parenthesis around some columns in a table, using the `siunitx` package. I'm using the `>` and `<` column specifiers, and they seem to work... except in the last column, where some additional space is inserted. This is sample code:               \documentclass{article}     \usepackage{siunitx}     \begin{document}          \sisetup{table-format = 1.2,table-auto-round = true}          \begin{tabular}       {l*{4}{S@{~}              >{{(}}              S[table-format=1.1,                table-figures-exponent=1,table-sign-exponent=true,                scientific-notation=true,                table-space-text-pre=(,table-space-text-post=)]              <{{)}}             }       }     A & 1.234&0.987e-4  & 4.567&0.654e-5  \\     B & 2.345&0.876e-3  & 5.678&0.543e-3  \\     C & 3.456&0.765     & 6.789&0.432     \\     \end{tabular}          \end{document}      And the result: ![enter image description here](http://i.stack.imgur.com/wjy6s.png) As you can see, there's an unwanted space before the closing parenthesis in the second column. Am I doing something wrong? Is there a better way of inserting the parentheses (or anything else)?


title: Adding borders to an entire row in a table

text: I have a table with multiple rows (a regression table). I would like to add a coloured border highlighting one particular variable. I have found a way to border one cell at a time but is there a way to add a border around an entire row? EDIT: Here is some detail on my table:               \begin{tabular}{rcccccccc|cccccccc}                 &                                                       \multicolumn{ 8}{c}{section 1} &                                                           \multicolumn{ 8}{c}{section 2} \\                 &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            \\                 &        (1) &        (2) &        (3) &        (4) &        (5) &        (6) &        (7) &        (8) &        (9) &       (10) &       (11) &       (12) &       (13) &       (14) &       (15) &       (16) \\                 &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            \\          regression coef 1 &         no &         no &         no &         no &         no &             no &         no &         no &         no &         no &         no &         no &         no &         no &         no &         no \\                 &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            \\          regression coef 2 & {\bf 1234} & {\bf 1234} & {\bf 1234} & {\bf 1234} & {\bf 1234} & {\bf 1234} & {\bf 1234} & {\bf 1234} &            &            &            &            &            &            &            &            \\                 & {\bf [2]} & {\bf [2]} & {\bf [2]} & {\bf [2]} & {\bf [2]} & {\bf [2]} & {\bf [2]} & {\bf [2]} &            &            &            &            &            &            &            &            \\          \end{tabular}


title: LaTeX API for C# to generate LaTeX based pdf

text: C# has APIs which can generate pdf from the html content. But, knowing the LaTeX features, I would like to incorporate them too. Say, the person fills a registration form. On clicking the submit button, the details get stored in the Database. So, now If I want to display a page with with details, I would get the content from the database, place it in the proper position, get the html page and generate the pdf. Now, I would to incorporate LaTeX in this. That is, the structure and the location of the textboxes and the text font must be decided by LaTeX. The program html content must be passed to LaTeX and LaTeX should generate the pdf. How do I do that in C#. Definitely, there must be APIs to execute external programs. So I would execute `pdflatex main.tex`. This `main.tex` will contain only the structure no data. My question is, how to combine these too?


title: Is there a package in either PSTricks or Tikz to draw the following diagram?

text: I took the following figure from JSON official site. ![enter image description here](http://i.stack.imgur.com/AKiUe.gif) Is there a package to do it easily? Anyway, what is the name of this diagram?


title: Customization of the header of an article

text: How to reproduce this header's organisation not the font style: ![enter image description here](http://i.stack.imgur.com/29gaX.png) I'm currently using this code :               \documentclass[11pt,a4paper,french]{moderncv}          \usepackage{babel}          \firstname{XXXX}     \familyname{XXXX}     \title{SDFPOIJD SDOFIJSDOI}                   \address{19 xxxxxx xx xxxx}{204545454 xxxx}         \email{xxx@yahoo.fr}                           \homepage{github.com/xxxx}     \mobile{xxxx xxxx xxx}      \extrainfo{21 ans}     \begin{document}     \end{document}      How to deal with this please?


title: Indent further paragraphs in the caption of a table

text: I have a little problem how to create a caption to my table. It looks ok as of now, but I would like to indent the heading of a new paragraph. Also right now, I cannot even create a new paragraph because an error pops up. I read that I have to give an optional argument to the caption to prevent the error (is there another method? I don't want to have additional names in my LOT) But my main question is if it is possible to start new intendet paragraphs within a caption, BUT WITHOUT having the very first paragraph below the numbering indented. There is no such example in the documentation of the package `caption`, also `\DeclareCaptionFormat`does not work in this case because we don't wanna change `#3` in general but rather the following paragraphs. If you compile my example you will see a nice little table. Again, the only change I would like to make is indentation of further paragraphs in case of rather long captions. Thanks for any hints.               \documentclass[a4paper, headsepline, smallheadings]{scrreprt}     \usepackage{mathptmx}     \usepackage{booktabs}     \usepackage[labelfont=bf, labelsep=newline,singlelinecheck=false,format=plain,indention=2cm]{caption}     \usepackage{floatrow}          \KOMAoption{captions}{tableheading}     \setcapindent{0em}          \begin{document}     \begin{table}[htpb]     \begin{floatrow}     \ttabbox{%     \begin{tabular}{lcccc}     & \multicolumn{4}{c}{xax} \\     \cmidrule(rl){2-5}     & 3543 & 34535 & 1233 & 32525 \\     \midrule     AA  & 543235sdgf35 & sdf35sf & sf35 & sdfsf543s \\     BB  & gsfg35sf & dfgdfg &     235sf & 235f \\     CC & sdfdsf & sffsf & sdfsdf & 353w5fs \\     \bottomrule     \end{tabular}}     {\caption{Here is the table caption. It should be indented from the following paragraph: \\ 'indented new paragraph'.}}     \end{floatrow}     \end{table}     \end{document}      edit: I am using the floatrow-package because it allows you to start the caption in the next line below the numbering of the table. ttabbox has 2 arguments, the 1st is the table and the 2nd is the caption, that's really all there is to know about that, looks more complicated than it is.