title: Need to adjust in tikz

text: I want to display the following figures simultaneously that is not above or lower. Also need to reduce the size. Please help me.               \begin{figure}[htp]     %\centering     \begin{tikzpicture}     %\draw [color=black, fill=gray!50] (8*0.375,8*0.25) -- (8*0.6666,4*0.33333) -- (8*0.33333,8*0.33333) -- (1,4) -- cycle;     \draw      ( 4.50000000000000 , 1.30900000000000 )-- ( 4.49500000000000 , 1.34650000000000 )-- ( 4.49000000000000 , 1.30600000000000 )-- ( 4.48500000000000 , 1.35450000000000 )-- ( 4.48000000000000 , 1.33050000000000 )-- ( 4.47500000000000 , 1.33400000000000 )-- ( 4.47000000000000 , 1.30950000000000 )-- ( 4.46500000000000 , 1.31950000000000 )-- ( 4.46000000000000 , 1.34900000000000 )-- ( 4.45500000000000 , 1.34600000000000 )-- ( 4.45000000000000 , 1.37250000000000 )-- ( 4.44500000000000 , 1.44600000000000 )-- ( 4.44000000000000 , 1.36500000000000 )-- ( 4.43500000000000 , 1.39750000000000 )-- ( 4.43000000000000 , 1.35600000000000 )-- ( 4.42500000000000 , 1.38950000000000 )-- ( 4.42000000000000 , 1.43700000000000 )-- ( 4.41500000000000 , 1.43600000000000 )-- ( 4.41000000000000 , 1.39100000000000 )-- ( 4.40500000000000 , 1.40400000000000 )-- ( 4.40000000000000 , 1.38550000000000 )-- ( 4.39500000000000 , 1.43450000000000 )-- ( 4.39000000000000 , 1.45250000000000 )-- ( 4.38500000000000 , 1.37100000000000 )-- ( 4.38000000000000 , 1.43150000000000 )-- ( 4.37500000000000 , 1.42500000000000 )-- ( 4.37000000000000 , 1.40900000000000 )-- ( 4.36500000000000 , 1.38450000000000 )-- ( 4.36000000000000 , 1.40250000000000 )-- ( 4.35500000000000 , 1.37450000000000 )-- ( 4.35000000000000 , 1.38400000000000 )-- ( 4.34500000000000 , 1.42250000000000 )-- ( 4.34000000000000 , 1.41350000000000 )-- ( 4.33500000000000 , 1.40600000000000 )-- ( 4.33000000000000 , 1.41200000000000 )-- ( 4.32500000000000 , 1.40300000000000 )-- ( 4.32000000000000 , 1.39450000000000 )-- ( 4.31500000000000 , 1.38450000000000 )-- ( 4.31000000000000 , 1.42600000000000 )-- ( 4.30500000000000 , 1.43350000000000 )-- ( 4.30000000000000 , 1.40450000000000 )-- ( 4.29500500000000 , 1.42550000000000 )-- ( 4.29000500000000 , 1.46250000000000 )-- ( 4.28500500000000 , 1.38850000000000 )-- ( 4.28000500000000 , 1.45400000000000 )-- ( 4.27500500000000 , 1.69450000000000 )-- ( 4.27000500000000 , 1.65300000000000 )-- ( 4.26500500000000 , 1.67200000000000 )-- ( 4.26000500000000 , 1.68850000000000 )-- ( 4.25500500000000 , 1.64200000000000 )-- ( 4.25000500000000 , 1.64650000000000 )-- ( 4.24500500000000 , 1.66300000000000 )-- ( 4.24000500000000 , 1.66100000000000 )-- ( 4.23500500000000 , 1.64850000000000 )-- ( 4.23000500000000 , 1.66350000000000 )-- ( 4.22500500000000 , 1.67950000000000 )-- ( 4.22000500000000 , 1.63100000000000 )-- ( 4.21500500000000 , 1.65650000000000 )-- ( 4.21000500000000 , 1.70250000000000 )-- ( 4.20500500000000 , 1.64300000000000 )-- ( 4.20000500000000 , 1.67700000000000 )-- ( 4.19500500000000 , 1.66050000000000 )-- ( 4.19000500000000 , 1.63650000000000 )-- ( 4.18500500000000 , 1.65650000000000 )-- ( 4.18000500000000 , 1.60400000000000 )-- ( 4.17500500000000 , 1.66300000000000 )-- ( 4.17000500000000 , 1.62750000000000 )-- ( 4.16500500000000 , 1.68550000000000 )-- ( 4.16000500000000 , 1.69100000000000 )-- ( 4.15500500000000 , 1.64150000000000 )-- ( 4.15000500000000 , 1.62100000000000 )-- ( 4.14500500000000 , 1.64500000000000 )-- ( 4.14000500000000 , 1.65300000000000 )-- ( 4.13500500000000 , 1.67150000000000 )-- ( 4.13000500000000 , 1.65000000000000 )-- ( 4.12500500000000 , 1.67650000000000 )-- ( 4.12000500000000 , 1.67600000000000 )-- ( 4.11500500000000 , 1.70050000000000 )-- ( 4.11000500000000 , 1.67100000000000 )-- ( 4.10500500000000 , 1.67750000000000 )-- ( 4.10000500000000 , 1.67250000000000 )-- ( 4.09500500000000 , 1.65800000000000 )-- ( 4.09000500000000 , 1.67450000000000 )-- ( 4.08500500000000 , 1.69700000000000 )-- ( 4.08000500000000 , 1.63050000000000 )-- ( 4.07500500000000 , 1.69550000000000 )-- ( 4.07000500000000 , 1.69950000000000 )-- ( 4.06500500000000 , 1.66900000000000 )-- ( 4.06000500000000 , 1.70350000000000 )-- ( 4.05500500000000 , 1.70950000000000 )-- ( 4.05000500000000 , 1.65400000000000 )-- ( 4.04500500000000 , 1.67650000000000 )-- ( 4.04000500000000 , 1.73500000000000 )-- ( 4.03500500000000 , 1.71350000000000 )-- ( 4.03000500000000 , 1.66450000000000 )-- ( 4.02500500000000 , 1.71600000000000 )-- ( 4.02000500000000 , 1.68100000000000 )-- ( 4.01500500000000 , 1.66450000000000 )-- ( 4.01000500000000 , 1.69900000000000 )-- ( 4.00500500000000 , 1.69000000000000 )-- ( 4.00000500000000 , 1.66600000000000 )-- ( 3.99500500000000 , 1.67500000000000 )-- ( 3.99000500000000 , 1.70400000000000 )-- ( 3.98500500000000 , 1.71100000000000 )-- ( 3.98000500000000 , 1.70500000000000 )-- ( 3.97500500000000 , 1.71700000000000 )-- ( 3.97000500000000 , 1.66900000000000 )-- ( 3.96500500000000 , 1.72300000000000 )-- ( 3.96000500000000 , 1.84250000000000 )-- ( 3.95500500000000 , 1.84350000000000 )-- ( 3.95000500000000 , 1.82900000000000 )-- ( 3.94500500000000 , 1.88750000000000 )-- ( 3.94000500000000 , 1.84250000000000 )-- ( 3.93500500000000 , 1.80050000000000 )-- ( 3.93000500000000 , 1.85050000000000 )-- ( 3.92500500000000 , 1.87100000000000 )-- ( 3.92000500000000 , 1.86450000000000 )-- ( 3.91500500000000 , 1.85950000000000 )-- ( 3.91000500000000 , 1.89000000000000 )-- ( 3.90501000000000 , 1.90750000000000 )-- ( 3.90001000000000 , 1.83050000000000 )-- ( 3.89501000000000 , 1.84150000000000 )-- ( 3.89001000000000 , 1.84900000000000 )-- ( 3.88501000000000 , 1.85250000000000 )-- ( 3.88001000000000 , 1.87300000000000 )-- ( 3.87501000000000 , 1.85350000000000 )-- ( 3.87001000000000 , 1.85600000000000 )-- ( 3.86501000000000 , 1.88900000000000 )-- ( 3.86001000000000 , 1.90650000000000 )-- ( 3.85501000000000 , 1.88250000000000 )-- ( 3.85001000000000 , 1.86750000000000 )-- ( 3.84501000000000 , 1.87650000000000 )-- ( 3.84001000000000 , 1.84050000000000 )-- ( 3.83501000000000 , 1.87700000000000 )-- ( 3.83001000000000 , 1.92550000000000 )-- ( 3.82501000000000 , 1.92900000000000 )-- ( 3.82001000000000 , 1.92500000000000 )-- ( 3.81501000000000 , 1.89550000000000 )-- ( 3.81001000000000 , 1.94600000000000 )-- ( 3.80501000000000 , 1.92600000000000 )-- ( 3.80001000000000 , 1.94050000000000 )-- ( 3.79501000000000 , 1.85650000000000 )-- ( 3.79001000000000 , 1.94700000000000 )-- ( 3.78501000000000 , 1.93800000000000 )-- ( 3.78001000000000 , 1.87300000000000 )-- ( 3.77501000000000 , 1.88250000000000 )-- ( 3.77001000000000 , 1.91150000000000 )-- ( 3.76501000000000 , 1.91950000000000 )-- ( 3.76001000000000 , 1.91550000000000 )-- ( 3.75501000000000 , 1.93800000000000 )-- ( 3.75001000000000 , 1.99000000000000 )-- ( 3.74501000000000 , 1.91850000000000 )-- ( 3.74001000000000 , 1.90500000000000 )-- ( 3.73501000000000 , 1.97700000000000 )-- ( 3.73001000000000 , 1.95400000000000 )-- ( 3.72501000000000 , 1.94250000000000 )-- ( 3.72001000000000 , 1.95600000000000 )-- ( 3.71501000000000 , 1.90550000000000 )-- ( 3.71001000000000 , 1.98200000000000 )-- ( 3.70501000000000 , 1.94800000000000 )-- ( 3.70001000000000 , 1.92700000000000 )-- ( 3.69501000000000 , 1.92100000000000 )-- ( 3.69001000000000 , 2.58800000000000 )-- ( 3.68501000000000 , 2.57300000000000 )-- ( 3.68001000000000 , 2.56450000000000 )-- ( 3.67501000000000 , 2.60250000000000 )-- ( 3.67001000000000 , 2.60200000000000 )-- ( 3.66501000000000 , 2.58350000000000 )-- ( 3.66001000000000 , 2.60150000000000 )-- ( 3.65501000000000 , 2.59150000000000 )-- ( 3.65001000000000 , 2.58700000000000 )-- ( 3.64501000000000 , 2.61050000000000 )-- ( 3.64001000000000 , 2.59750000000000 )-- ( 3.63501000000000 , 2.61850000000000 )-- ( 3.63001000000000 , 2.63050000000000 )-- ( 3.62501000000000 , 2.57250000000000 )-- ( 3.62001000000000 , 2.60950000000000 )-- ( 3.61501000000000 , 2.61750000000000 )-- ( 3.61001000000000 , 2.61400000000000 )-- ( 3.60501000000000 , 2.63800000000000 )-- ( 3.60001000000000 , 2.62300000000000 )-- ( 3.59501000000000 , 2.64900000000000 )-- ( 3.59001000000000 , 2.63550000000000 )-- ( 3.58501000000000 , 2.62050000000000 )-- ( 3.58001000000000 , 2.65850000000000 )-- ( 3.57501000000000 , 2.63450000000000 )-- ( 3.57001000000000 , 2.62850000000000 )-- ( 3.56501000000000 , 2.59550000000000 )-- ( 3.56001000000000 , 2.63850000000000 )-- ( 3.55501000000000 , 2.59550000000000 )-- ( 3.55001000000000 , 2.65650000000000 )-- ( 3.54501000000000 , 2.64850000000000 )-- ( 3.54001000000000 , 2.64100000000000 )-- ( 3.53501000000000 , 2.64300000000000 )-- ( 3.53001000000000 , 2.64950000000000 )-- ( 3.52501000000000 , 2.65150000000000 )-- ( 3.52001000000000 , 2.65050000000000 )-- ( 3.51501500000000 , 2.62000000000000 )-- ( 3.51001500000000 , 2.65750000000000 )-- ( 3.50501500000000 , 2.64050000000000 )-- ( 3.50001500000000 , 2.65350000000000 )-- ( 3.49501500000000 , 2.65850000000000 )-- ( 3.49001500000000 , 2.70600000000000 )-- ( 3.48501500000000 , 2.65000000000000 )-- ( 3.48001500000000 , 2.69800000000000 )-- ( 3.47501500000000 , 2.63750000000000 )-- ( 3.47001500000000 , 2.71250000000000 )-- ( 3.46501500000000 , 2.63800000000000 )-- ( 3.46001500000000 , 2.65050000000000 )-- ( 3.45501500000000 , 2.69800000000000 )-- ( 3.45001500000000 , 2.67400000000000 )-- ( 3.44501500000000 , 2.64800000000000 )-- ( 3.44001500000000 , 2.68250000000000 )-- ( 3.43501500000000 , 2.65700000000000 )-- ( 3.43001500000000 , 2.71550000000000 )-- ( 3.42501500000000 , 2.71350000000000 )-- ( 3.42001500000000 , 2.71200000000000 )-- ( 3.41501500000000 , 2.69900000000000 )-- ( 3.41001500000000 , 2.62850000000000 )-- ( 3.40501500000000 , 2.68950000000000 )-- ( 3.40001500000000 , 2.73600000000000 )-- ( 3.39501500000000 , 2.71150000000000 )-- ( 3.39001500000000 , 2.67800000000000 )-- ( 3.38501500000000 , 2.67550000000000 )-- ( 3.38001500000000 , 2.73300000000000 )-- ( 3.37501500000000 , 2.73300000000000 )-- ( 3.37001500000000 , 2.64500000000000 )-- ( 3.36501500000000 , 2.71200000000000 )-- ( 3.36001500000000 , 2.69400000000000 )-- ( 3.35501500000000 , 2.66750000000000 )-- ( 3.35001500000000 , 2.72250000000000 )-- ( 3.34501500000000 , 2.77150000000000 )-- ( 3.34001500000000 , 2.69350000000000 )-- ( 3.33501500000000 , 2.69500000000000 )-- ( 3.33001500000000 , 2.66400000000000 )-- ( 3.32501500000000 , 2.71450000000000 )-- ( 3.32001500000000 , 2.70250000000000 )-- ( 3.31501500000000 , 2.69500000000000 )-- ( 3.31001500000000 , 2.70000000000000 )-- ( 3.30501500000000 , 2.74200000000000 )-- ( 3.30001500000000 , 2.70850000000000 )-- ( 3.29501500000000 , 2.71950000000000 )-- ( 3.29001500000000 , 2.68150000000000 )-- ( 3.28501500000000 , 2.69850000000000 )-- ( 3.28001500000000 , 2.80800000000000 )-- ( 3.27501500000000 , 2.73500000000000 )-- ( 3.27001500000000 , 2.77800000000000 )-- ( 3.26501500000000 , 2.83050000000000 )-- ( 3.26001500000000 , 2.76200000000000 )-- ( 3.25501500000000 , 2.76300000000000 )-- ( 3.25001500000000 , 2.77650000000000 )-- ( 3.24501500000000 , 2.75200000000000 )-- ( 3.24001500000000 , 2.78950000000000 )-- ( 3.23501500000000 , 2.76350000000000 )-- ( 3.23001500000000 , 2.90050000000000 )-- ( 3.22501500000000 , 2.89700000000000 )-- ( 3.22001500000000 , 2.87850000000000 )-- ( 3.21501500000000 , 2.92250000000000 )-- ( 3.21001500000000 , 2.89950000000000 )-- ( 3.20501500000000 , 2.92250000000000 )-- ( 3.20001500000000 , 2.93000000000000 )-- ( 3.19501500000000 , 2.89850000000000 )-- ( 3.19001500000000 , 2.86950000000000 )-- ( 3.18501500000000 , 2.91700000000000 )-- ( 3.18001500000000 , 2.89850000000000 )-- ( 3.17501500000000 , 2.88500000000000 )-- ( 3.17001500000000 , 2.88050000000000 )-- ( 3.16501500000000 , 2.89100000000000 )-- ( 3.16001500000000 , 2.83700000000000 )-- ( 3.15501500000000 , 2.91900000000000 )-- ( 3.15001500000000 , 2.90050000000000 )-- ( 3.14501500000000 , 2.94500000000000 )-- ( 3.14001500000000 , 2.94100000000000 )-- ( 3.13501500000000 , 2.92500000000000 )-- ( 3.13002000000000 , 2.88400000000000 )-- ( 3.12502000000000 , 2.89200000000000 )-- ( 3.12002000000000 , 2.89750000000000 )-- ( 3.11502000000000 , 2.87100000000000 )-- ( 3.11002000000000 , 2.94400000000000 )-- ( 3.10502000000000 , 2.91750000000000 )-- ( 3.10002000000000 , 2.93650000000000 )-- ( 3.09502000000000 , 2.94900000000000 )-- ( 3.09002000000000 , 2.94300000000000 )-- ( 3.08502000000000 , 2.97150000000000 )-- ( 3.08002000000000 , 2.98500000000000 )-- ( 3.07502000000000 , 2.96500000000000 )-- ( 3.07002000000000 , 2.99950000000000 )-- ( 3.06502000000000 , 2.93050000000000 )-- ( 3.06002000000000 , 2.94500000000000 )-- ( 3.05502000000000 , 2.97300000000000 )-- ( 3.05002000000000 , 2.95400000000000 )-- ( 3.04502000000000 , 2.96800000000000 )-- ( 3.04002000000000 , 2.95450000000000 )-- ( 3.03502000000000 , 3.02650000000000 )-- ( 3.03002000000000 , 3.01850000000000 )-- ( 3.02502000000000 , 2.94400000000000 )-- ( 3.02002000000000 , 2.98100000000000 )-- ( 3.01502000000000 , 2.97750000000000 )-- ( 3.01002000000000 , 3.04550000000000 )-- ( 3.00502000000000 , 3.06850000000000 )-- ( 3.00002000000000 , 3.07300000000000 )-- ( 2.99502000000000 , 3.02200000000000 )-- ( 2.99002000000000 , 2.99400000000000 )-- ( 2.98502000000000 , 3.04350000000000 )-- ( 2.98002000000000 , 3.05000000000000 )-- ( 2.97502000000000 , 3.06000000000000 )-- ( 2.97002000000000 , 3.02350000000000 )-- ( 2.96502000000000 , 3.03400000000000 )-- ( 2.96002000000000 , 3.03050000000000 )-- ( 2.95502000000000 , 3.04550000000000 )-- ( 2.95002000000000 , 3.06900000000000 )-- ( 2.94502000000000 , 3.03700000000000 )-- ( 2.94002000000000 , 3.08800000000000 )-- ( 2.93502000000000 , 3.08500000000000 )-- ( 2.93002000000000 , 3.03950000000000 )-- ( 2.92502000000000 , 3.21850000000000 )-- ( 2.92002000000000 , 3.23050000000000 )-- ( 2.91502000000000 , 3.19100000000000 )-- ( 2.91002000000000 , 3.22650000000000 )-- ( 2.90502000000000 , 3.19700000000000 )-- ( 2.90002000000000 , 3.18550000000000 )-- ( 2.89502000000000 , 3.19750000000000 )-- ( 2.89002000000000 , 3.20300000000000 )-- ( 2.88502000000000 , 3.22050000000000 )-- ( 2.88002000000000 , 3.15850000000000 )-- ( 2.87502000000000 , 3.19850000000000 )-- ( 2.87002000000000 , 3.17400000000000 )-- ( 2.86502000000000 , 3.22050000000000 )-- ( 2.86002000000000 , 3.20650000000000 )-- ( 2.85502000000000 , 3.19900000000000 )-- ( 2.85002000000000 , 3.19600000000000 )-- ( 2.84502000000000 , 3.24550000000000 )-- ( 2.84002000000000 , 3.21300000000000 )-- ( 2.83502000000000 , 3.15600000000000 )-- ( 2.83002000000000 , 3.17600000000000 )-- ( 2.82502000000000 , 3.21000000000000 )-- ( 2.82002000000000 , 3.21050000000000 )-- ( 2.81502000000000 , 3.20650000000000 )-- ( 2.81002000000000 , 3.21800000000000 )-- ( 2.80502000000000 , 3.22050000000000 )-- ( 2.80002000000000 , 3.20650000000000 )-- ( 2.79502000000000 , 3.14900000000000 )-- ( 2.79002000000000 , 3.17950000000000 )-- ( 2.78502000000000 , 3.19600000000000 )-- ( 2.78002000000000 , 3.19300000000000 )-- ( 2.77502000000000 , 3.21600000000000 )-- ( 2.77002000000000 , 3.23900000000000 )-- ( 2.76502000000000 , 3.43500000000000 )-- ( 2.76002000000000 , 3.41150000000000 )-- ( 2.75502000000000 , 3.42800000000000 )-- ( 2.75002000000000 , 3.39400000000000 )-- ( 2.74502000000000 , 3.36500000000000 )-- ( 2.74002500000000 , 3.36950000000000 )-- ( 2.73502500000000 , 3.38800000000000 )-- ( 2.73002500000000 , 3.37400000000000 )-- ( 2.72502500000000 , 3.45500000000000 )-- ( 2.72002500000000 , 3.40200000000000 )-- ( 2.71502500000000 , 3.39100000000000 )-- ( 2.71002500000000 , 3.37450000000000 )-- ( 2.70502500000000 , 3.40550000000000 )-- ( 2.70002500000000 , 3.37800000000000 )-- ( 2.69502500000000 , 3.45750000000000 )-- ( 2.69002500000000 , 3.40200000000000 )-- ( 2.68502500000000 , 3.39800000000000 )-- ( 2.68002500000000 , 3.36100000000000 )-- ( 2.67502500000000 , 3.41950000000000 )-- ( 2.67002500000000 , 3.42700000000000 )-- ( 2.66502500000000 , 3.39150000000000 )-- ( 2.66002500000000 , 3.38550000000000 )-- ( 2.65502500000000 , 3.42550000000000 )-- ( 2.65002500000000 , 3.40750000000000 )-- ( 2.64502500000000 , 3.39100000000000 )-- ( 2.64002500000000 , 3.43750000000000 )-- ( 2.63502500000000 , 3.41300000000000 )-- ( 2.63002500000000 , 3.39100000000000 )-- ( 2.62502500000000 , 3.43900000000000 )-- ( 2.62002500000000 , 3.40400000000000 )-- ( 2.61502500000000 , 3.37150000000000 )-- ( 2.61002500000000 , 3.38700000000000 )-- ( 2.60502500000000 , 3.41700000000000 )-- ( 2.60002500000000 , 3.37400000000000 )-- ( 2.59502500000000 , 3.43250000000000 )-- ( 2.59002500000000 , 3.43100000000000 )-- ( 2.58502500000000 , 3.43650000000000 )-- ( 2.58002500000000 , 3.43450000000000 )-- ( 2.57502500000000 , 3.44900000000000 )-- ( 2.57002500000000 , 3.41150000000000 )-- ( 2.56502500000000 , 3.44900000000000 )-- ( 2.56002500000000 , 3.40100000000000 )-- ( 2.55502500000000 , 3.45500000000000 )-- ( 2.55002500000000 , 3.42600000000000 )-- ( 2.54502500000000 , 3.42700000000000 )-- ( 2.54002500000000 , 3.46750000000000 )-- ( 2.53502500000000 , 3.45850000000000 )-- ( 2.53002500000000 , 3.44300000000000 )-- ( 2.52502500000000 , 3.48050000000000 )-- ( 2.52002500000000 , 3.48150000000000 )-- ( 2.51502500000000 , 3.49750000000000 )-- ( 2.51002500000000 , 3.51150000000000 )-- ( 2.50502500000000 , 3.48200000000000 )-- ( 2.50002500000000 , 3.49900000000000 );     \draw ( 2.9502500000000 , 2.36950000000000 ) node{$p_2=0.3 $};               \draw (0,0) -- (5.0,0);     \draw (0,0)-- (0,5);     \draw (0,-0.5) node{$O$};     \draw (5*0.2,-0.2) node{0.2};     \draw (5*0.2,-0.1)--(5*0.2,0.1);     \draw (5*0.4,-0.2) node{0.4};     \draw (5*0.4,-0.1)--(5*0.4,0.1);     \draw (5*0.6,-0.2) node{0.6};     \draw (5*0.6,-0.1)--(5*0.6,0.1);     \draw (5*0.8,-0.2) node{0.8};     \draw (5*0.8,-0.1)--(5*0.8,0.1);          \draw (-0.4,5*0.2) node{0.2};     \draw (-0.1,5*0.2)--(0.1,5*0.2);     \draw (-0.4,5*0.4) node{0.4};     \draw (-0.1,5*0.4)--(0.1,5*0.4);     \draw (-0.4,5*0.6) node{0.6};     \draw (-0.1,5*0.6)--(0.1,5*0.6);     \draw (-0.4,5*0.8) node{0.8};     \draw (-0.1,5*0.8)--(0.1,5*0.8);     \end{tikzpicture}     \caption{.}     \label{fig1}     \end{figure}          \begin{figure}[htp]     %\centering     \begin{tikzpicture}     %\draw [color=black, fill=gray!50] (8*0.375,8*0.25) -- (8*0.6666,4*0.33333) -- (8*0.33333,8*0.33333) -- (1,4) -- cycle;          \draw ( 4.5 , 1.9405 )-- ( 4.495 , 1.92 )-- ( 4.49 , 1.9235 )-- ( 4.485 , 1.9855 )-- ( 4.48 , 1.9285 )-- ( 4.475 , 1.979 )-- ( 4.47 , 1.933 )-- ( 4.465 , 1.961 )-- ( 4.46 , 1.9645 )-- ( 4.455 , 1.96 )-- ( 4.45 , 1.9535 )-- ( 4.445 , 1.953 )-- ( 4.44 , 1.9215 )-- ( 4.435 , 1.9585 )-- ( 4.43 , 1.9275 )-- ( 4.425 , 1.978 )-- ( 4.42 , 1.959 )-- ( 4.415 , 2.029 )-- ( 4.41 , 1.9925 )-- ( 4.405 , 2.0005 )-- ( 4.4 , 2.0395 )-- ( 4.395 , 2.0265 )-- ( 4.39 , 1.9645 )-- ( 4.385 , 2.026 )-- ( 4.38 , 2.0355 )-- ( 4.375 , 2.023 )-- ( 4.37 , 2.021 )-- ( 4.365 , 1.9905 )-- ( 4.36 , 1.99 )-- ( 4.355 , 1.984 )-- ( 4.35 , 1.9575 )-- ( 4.345 , 1.9865 )-- ( 4.34 , 2.03 )-- ( 4.335 , 2.071 )-- ( 4.33 , 2.0245 )-- ( 4.325 , 2.0265 )-- ( 4.32 , 1.9655 )-- ( 4.315 , 2.105 )-- ( 4.31 , 2.0805 )-- ( 4.305 , 2.1025 )-- ( 4.3 , 2.1135 )-- ( 4.295 , 2.08 )-- ( 4.29 , 2.1045 )-- ( 4.285 , 2.1015 )-- ( 4.28 , 2.088 )-- ( 4.275 , 2.0535 )-- ( 4.27 , 2.093 )-- ( 4.265 , 2.047 )-- ( 4.26 , 2.053 )-- ( 4.255 , 2.0975 )-- ( 4.25 , 2.073 )-- ( 4.245 , 2.123 )-- ( 4.24 , 2.1185 )-- ( 4.235 , 2.07 )-- ( 4.23 , 2.059 )-- ( 4.225 , 2.1055 )-- ( 4.22 , 2.0875 )-- ( 4.215 , 2.1105 )-- ( 4.21 , 2.0805 )-- ( 4.205 , 2.1545 )-- ( 4.2 , 2.125 )-- ( 4.195 , 2.1045 )-- ( 4.19 , 2.101 )-- ( 4.185 , 2.1215 )-- ( 4.18 , 2.151 )-- ( 4.175 , 2.1285 )-- ( 4.17 , 2.1255 )-- ( 4.165 , 2.0715 )-- ( 4.16 , 2.076 )-- ( 4.155 , 2.1225 )-- ( 4.15 , 2.1325 )-- ( 4.145 , 2.104 )-- ( 4.14 , 2.1285 )-- ( 4.135 , 2.082 )-- ( 4.13 , 2.1145 )-- ( 4.125 , 2.0945 )-- ( 4.12 , 2.085 )-- ( 4.115 , 2.099 )-- ( 4.11 , 2.1085 )-- ( 4.105 , 2.14 )-- ( 4.1 , 2.355 )-- ( 4.095 , 2.318 )-- ( 4.09 , 2.3745 )-- ( 4.085 , 2.298 )-- ( 4.08 , 2.3125 )-- ( 4.075 , 2.3675 )-- ( 4.07 , 2.326 )-- ( 4.065 , 2.3515 )-- ( 4.06 , 2.3205 )-- ( 4.055 , 2.336 )-- ( 4.05 , 2.3655 )-- ( 4.045 , 2.3265 )-- ( 4.04 , 2.3075 )-- ( 4.035 , 2.3515 )-- ( 4.03 , 2.297 )-- ( 4.025 , 2.278 )-- ( 4.02 , 2.353 )-- ( 4.015 , 2.351 )-- ( 4.01 , 2.282 )-- ( 4.005 , 2.313 )-- ( 4.0 , 2.3695 )-- ( 3.995 , 2.381 )-- ( 3.99 , 2.3635 )-- ( 3.985 , 2.356 )-- ( 3.98 , 2.374 )-- ( 3.975 , 2.3365 )-- ( 3.97 , 2.326 )-- ( 3.965 , 2.3405 )-- ( 3.96 , 2.3425 )-- ( 3.955 , 2.367 )-- ( 3.95 , 2.341 )-- ( 3.945 , 2.3525 )-- ( 3.94 , 2.3375 )-- ( 3.935 , 2.3775 )-- ( 3.93 , 2.364 )-- ( 3.925 , 2.3915 )-- ( 3.92 , 2.521 )-- ( 3.915 , 2.588 )-- ( 3.91 , 2.5915 )-- ( 3.905 , 2.5695 )-- ( 3.9 , 2.547 )-- ( 3.895 , 2.571 )-- ( 3.89 , 2.59 )-- ( 3.885 , 2.5675 )-- ( 3.88 , 2.577 )-- ( 3.875 , 2.556 )-- ( 3.87 , 2.5645 )-- ( 3.865 , 2.5665 )-- ( 3.86 , 2.6245 )-- ( 3.855 , 2.56 )-- ( 3.85 , 2.5955 )-- ( 3.845 , 2.626 )-- ( 3.84 , 2.601 )-- ( 3.835 , 2.593 )-- ( 3.83 , 2.6225 )-- ( 3.825 , 2.59 )-- ( 3.82 , 2.618 )-- ( 3.815 , 2.6215 )-- ( 3.81 , 2.6495 )-- ( 3.805 , 2.628 )-- ( 3.8 , 2.658 )-- ( 3.795 , 2.6335 )-- ( 3.79 , 2.616 )-- ( 3.785 , 2.646 )-- ( 3.78 , 2.6155 )-- ( 3.775 , 2.6175 )-- ( 3.77 , 2.663 )-- ( 3.765 , 2.609 )-- ( 3.76 , 2.6795 )-- ( 3.755 , 2.6405 )-- ( 3.75 , 2.6185 )-- ( 3.745 , 2.6365 )-- ( 3.74 , 2.6365 )-- ( 3.735 , 2.607 )-- ( 3.73 , 2.6125 )-- ( 3.725 , 2.627 )-- ( 3.72 , 2.645 )-- ( 3.715 , 2.6475 )-- ( 3.71 , 2.6735 )-- ( 3.705 , 2.681 )-- ( 3.7 , 2.6585 )-- ( 3.695 , 2.6715 )-- ( 3.69 , 2.6915 )-- ( 3.685 , 2.643 )-- ( 3.68 , 2.643 )-- ( 3.675 , 2.6695 )-- ( 3.67 , 2.646 )-- ( 3.665 , 2.651 )-- ( 3.66 , 2.665 )-- ( 3.655 , 2.64 )-- ( 3.65 , 2.6605 )-- ( 3.645 , 2.663 )-- ( 3.64 , 2.6205 )-- ( 3.635 , 2.6585 )-- ( 3.63 , 3.2845 )-- ( 3.625 , 3.243 )-- ( 3.62 , 3.269 )-- ( 3.615 , 3.291 )-- ( 3.61 , 3.2675 )-- ( 3.605 , 3.283 )-- ( 3.6 , 3.226 )-- ( 3.595 , 3.2885 )-- ( 3.59 , 3.2805 )-- ( 3.585 , 3.2245 )-- ( 3.58 , 3.203 )-- ( 3.575 , 3.197 )-- ( 3.57 , 3.2615 )-- ( 3.565 , 3.2145 )-- ( 3.56 , 3.28 )-- ( 3.555 , 3.279 )-- ( 3.55 , 3.3245 )-- ( 3.545 , 3.29 )-- ( 3.54 , 3.282 )-- ( 3.535 , 3.277 )-- ( 3.53 , 3.2595 )-- ( 3.525 , 3.2735 )-- ( 3.52 , 3.3035 )-- ( 3.515 , 3.2885 )-- ( 3.51 , 3.291 )-- ( 3.505 , 3.3035 )-- ( 3.5 , 3.2835 )-- ( 3.495 , 3.2795 )-- ( 3.49 , 3.339 )-- ( 3.485 , 3.277 )-- ( 3.48 , 3.3235 )-- ( 3.475 , 3.277 )-- ( 3.47 , 3.368 )-- ( 3.465 , 3.303 )-- ( 3.46 , 3.3415 )-- ( 3.455 , 3.3255 )-- ( 3.45 , 3.3695 )-- ( 3.445 , 3.31 )-- ( 3.44 , 3.3415 )-- ( 3.435 , 3.3555 )-- ( 3.43 , 3.3495 )-- ( 3.425 , 3.356 )-- ( 3.42 , 3.3725 )-- ( 3.415 , 3.3845 )-- ( 3.41 , 3.3775 )-- ( 3.405 , 3.374 )-- ( 3.4 , 3.3415 )-- ( 3.395 , 3.349 )-- ( 3.39 , 3.349 )-- ( 3.385 , 3.3235 )-- ( 3.38 , 3.343 )-- ( 3.375 , 3.3945 )-- ( 3.37 , 3.3595 )-- ( 3.365 , 3.383 )-- ( 3.36 , 3.318 )-- ( 3.355 , 3.3465 )-- ( 3.35 , 3.373 )-- ( 3.345 , 3.3435 )-- ( 3.34 , 3.388 )-- ( 3.335 , 3.331 )-- ( 3.33 , 3.3625 )-- ( 3.325 , 3.3795 )-- ( 3.32 , 3.395 )-- ( 3.315 , 3.3675 )-- ( 3.31 , 3.3485 )-- ( 3.305 , 3.333 )-- ( 3.3 , 3.308 )-- ( 3.295 , 3.3515 )-- ( 3.29 , 3.343 )-- ( 3.285 , 3.358 )-- ( 3.28 , 3.3575 )-- ( 3.275 , 3.354 )-- ( 3.27 , 3.361 )-- ( 3.265 , 3.3585 )-- ( 3.26 , 3.376 )-- ( 3.255 , 3.359 )-- ( 3.25 , 3.3355 )-- ( 3.245 , 3.353 )-- ( 3.24 , 3.3675 )-- ( 3.235 , 3.3745 )-- ( 3.23 , 3.3635 )-- ( 3.225 , 3.358 )-- ( 3.22 , 3.4215 )-- ( 3.215 , 3.3895 )-- ( 3.21 , 3.3995 )-- ( 3.205 , 3.408 )-- ( 3.2 , 3.3655 )-- ( 3.195 , 3.387 )-- ( 3.19 , 3.3775 )-- ( 3.185 , 3.4095 )-- ( 3.18 , 3.3915 )-- ( 3.175 , 3.355 )-- ( 3.17 , 3.385 )-- ( 3.165 , 3.382 )-- ( 3.16 , 3.3945 )-- ( 3.155 , 3.372 )-- ( 3.15 , 3.4195 )-- ( 3.145 , 3.394 )-- ( 3.14 , 3.3915 )-- ( 3.135 , 3.4 )-- ( 3.13 , 3.461 )-- ( 3.125 , 3.463 )-- ( 3.12 , 3.46 )-- ( 3.115 , 3.452 )-- ( 3.11 , 3.5575 )-- ( 3.105 , 3.5495 )-- ( 3.1 , 3.562 )-- ( 3.095 , 3.531 )-- ( 3.09 , 3.5615 )-- ( 3.085 , 3.5105 )-- ( 3.08 , 3.54 )-- ( 3.075 , 3.5245 )-- ( 3.07 , 3.539 )-- ( 3.065 , 3.551 )-- ( 3.06 , 3.572 )-- ( 3.055 , 3.5345 )-- ( 3.05 , 3.6125 )-- ( 3.045 , 3.6425 )-- ( 3.04 , 3.6155 )-- ( 3.035 , 3.623 )-- ( 3.03 , 3.646 )-- ( 3.025 , 3.602 )-- ( 3.02 , 3.621 )-- ( 3.015 , 3.588 )-- ( 3.01 , 3.6005 )-- ( 3.005 , 3.6225 )-- ( 3.0 , 3.6175 )-- ( 2.995 , 3.6265 )-- ( 2.99 , 3.6195 )-- ( 2.985 , 3.6185 )-- ( 2.98 , 3.6105 )-- ( 2.975 , 3.669 )-- ( 2.97 , 3.594 )-- ( 2.965 , 3.633 )-- ( 2.96 , 3.6335 )-- ( 2.955 , 3.658 )-- ( 2.95 , 3.6425 )-- ( 2.945 , 3.6375 )-- ( 2.94 , 3.6005 )-- ( 2.935 , 3.644 )-- ( 2.93 , 3.6315 )-- ( 2.925 , 3.659 )-- ( 2.92 , 3.684 )-- ( 2.915 , 3.6435 )-- ( 2.91 , 3.683 )-- ( 2.905 , 3.679 )-- ( 2.9 , 3.686 )-- ( 2.895 , 3.6665 )-- ( 2.89 , 3.685 )-- ( 2.885 , 3.6335 )-- ( 2.88 , 3.669 )-- ( 2.875 , 3.663 )-- ( 2.87 , 3.6545 )-- ( 2.865 , 3.6415 )-- ( 2.86 , 3.684 )-- ( 2.855 , 3.6495 )-- ( 2.85 , 3.686 )-- ( 2.845 , 3.797 )-- ( 2.84 , 3.78 )-- ( 2.835 , 3.792 )-- ( 2.83 , 3.8145 )-- ( 2.825 , 3.7675 )-- ( 2.82 , 3.7835 )-- ( 2.815 , 3.823 )-- ( 2.81 , 3.7785 )-- ( 2.805 , 3.8055 )-- ( 2.8 , 3.794 )-- ( 2.795 , 3.7985 )-- ( 2.79 , 3.8 )-- ( 2.785 , 3.7795 )-- ( 2.78 , 3.7785 )-- ( 2.775 , 3.8035 )-- ( 2.77 , 3.747 )-- ( 2.765 , 3.824 )-- ( 2.76 , 3.831 )-- ( 2.755 , 3.792 )-- ( 2.75 , 3.8255 )-- ( 2.745 , 3.837 )-- ( 2.74 , 3.81 )-- ( 2.735 , 3.798 )-- ( 2.73 , 3.8225 )-- ( 2.725 , 3.7585 )-- ( 2.72 , 3.769 )-- ( 2.715 , 3.7905 )-- ( 2.71 , 3.8045 )-- ( 2.705 , 3.844 )-- ( 2.7 , 3.829 )-- ( 2.695 , 3.8225 )-- ( 2.69 , 3.834 )-- ( 2.685 , 3.8185 )-- ( 2.68 , 3.8425 )-- ( 2.675 , 3.796 )-- ( 2.67 , 3.8075 )-- ( 2.665 , 3.825 )-- ( 2.66 , 3.7855 )-- ( 2.655 , 3.816 )-- ( 2.65 , 3.8295 )-- ( 2.645 , 3.7945 )-- ( 2.64 , 3.8275 )-- ( 2.635 , 3.8235 )-- ( 2.63 , 3.805 )-- ( 2.625 , 3.8125 )-- ( 2.62 , 3.8035 )-- ( 2.615 , 3.8175 )-- ( 2.61 , 3.877 )-- ( 2.605 , 3.8435 )-- ( 2.6 , 3.8225 )-- ( 2.595 , 3.8395 )-- ( 2.59 , 3.8455 )-- ( 2.585 , 3.8585 )-- ( 2.58 , 3.8355 )-- ( 2.575 , 3.826 )-- ( 2.57 , 3.805 )-- ( 2.565 , 3.8395 )-- ( 2.56 , 3.838 )-- ( 2.555 , 3.945 )-- ( 2.55 , 3.96 )-- ( 2.545 , 3.9585 )-- ( 2.54 , 3.9565 )-- ( 2.535 , 3.9595 )-- ( 2.53 , 3.978 )-- ( 2.525 , 3.9495 )-- ( 2.52 , 3.9815 )-- ( 2.515 , 3.983 )-- ( 2.51 , 3.964 )-- ( 2.505 , 3.968 )-- ( 2.5 , 3.991 ) node{$p_2=0.4$};               \draw (0,0) -- (5.0,0);     \draw (0,0)-- (0,5);     \draw (0,-0.5) node{$O$};     \draw (5*0.2,-0.2) node{0.2};     \draw (5*0.2,-0.1)--(5*0.2,0.1);     \draw (5*0.4,-0.2) node{0.4};     \draw (5*0.4,-0.1)--(5*0.4,0.1);     \draw (5*0.6,-0.2) node{0.6};     \draw (5*0.6,-0.1)--(5*0.6,0.1);     \draw (5*0.8,-0.2) node{0.8};     \draw (5*0.8,-0.1)--(5*0.8,0.1);          \draw (-0.4,5*0.2) node{0.2};     \draw (-0.1,5*0.2)--(0.1,5*0.2);     \draw (-0.4,5*0.4) node{0.4};     \draw (-0.1,5*0.4)--(0.1,5*0.4);     \draw (-0.4,5*0.6) node{0.6};     \draw (-0.1,5*0.6)--(0.1,5*0.6);     \draw (-0.4,5*0.8) node{0.8};     \draw (-0.1,5*0.8)--(0.1,5*0.8);     \end{tikzpicture}     \caption{.}     \label{fig2}     \end{figure}


title: How to pass a string to a class

text: I have a class file where I load `hyperref`. Now I'd like to change the content of `hyperref`'s `\pdftitle` from the main `.tex` file on:               \RequirePackage{filecontents}     \begin{filecontents}{myclass.cls}     \ProvidesClass{myclass}     \RequirePackage{kvoptions}          \DeclareStringOption[default title]{pdftitle}     \ProcessKeyvalOptions*     \PassOptionsToPackage{\myclass@pdftitle}{hyperref}     \RequirePackage{hyperref}          \end{filecontents}     \documentclass[pdftitle={This is my title}]{myclass}     \begin{document}     test     \end{document}      Unfortunately I wasn't successful.


title: Edit Tabular-like Environment using Emacs+AUCTeX

text: I am using Emacs+AUCTeX to write all my LaTeX files. So far so good except every time when I need to edit some tabular-like environment. I need some tricks or key bindings to take advantage of Emacs and AUCTex, so that I could be more efficient. I already know that I can use `C-c C-e` to insert an tabular-like environment, and `M-RET` to quick add `\\\` and start a new line. However, is there some shortcut that I can quickly add `&` and indent as I can do in Excel? Besides, I would be very happy to know other useful tricks to edit tabular- like environments.


title: newcommand with variable number of arguments

text: I have seen several related questions, but none seems to address specifically this. I would like to define a command that accepts a variable number of arguments. Something like               \newcommand{\func}(1){\if{#1}{f(#1)}{f}}      So that if there is a parameter the output will be `f(#1)` and if there is no parameter the output will be `f`, and never `f()`. Is this possible?


title: Highlight equations in a typographically correct manner

text: I am presenting a model composed of a dozens of equations, some of them requiring a somewhat lengthy derivation. The equation that continue the actual model appears progressively along the derivation in a sequence that I hope is logical. I would like to highlight those equations that constitute the actual model so that on coming back to the text the reader could skim the derivation and find the working equations. I have tried several options but I am not really satisfied with them.   1. **Framing the equation:** the `amsmath` package provides the `boxed` command that allows to frame equation. While it indeed serves its purpose, it also degrades the overall look of the document. This have been debated here.   2. **Margin sign** -- using Koma's `\marginline` command could do. Except that my margin are already occupied by some other marks and cluttered margins do not look good either.   3. **Restating** -- restating all the important equation might be awkward to, resulting in a full page of equations (or even a few).   4. **Appendix** -- a variant of the previous that basically hide the awkwardness in the appendices.   5. **Margin bar** -- an idea I derived from this question would be to add a bar on the side of the important equations using an altered version of the `leftbar` environment (see example below).   6. **Coloured background** : as suggested by David Carlisle, a light gray background is not too bad (see example below). Right now I think I am preferring option 3. or 5. but I was wondering if you would have something better to propose? Maybe some highlighting less drastic than framing, like bold equation number (I don't know how to achieve this)? What are accepted practices in publications? **Example to play with and see tested solutions :**                   \documentclass{article}         \usepackage{lipsum}         \usepackage{amsmath}              % Coloured background solution         \usepackage{xcolor}         \usepackage{mdframed}         \newmdenv[backgroundcolor=black!15!white,           linewidth=0pt,           innerleftmargin=0pt,           innerrightmargin=0pt]{graybck}                   % Margin bar solution         \usepackage{framed}         \newlength{\leftbarwidth}         \setlength{\leftbarwidth}{1pt}         \newlength{\leftbarsep}         \setlength{\leftbarsep}{10pt}         \renewenvironment{leftbar}{%           \def\FrameCommand{{\vrule width \leftbarwidth\relax\hspace {\leftbarsep}}}%           \MakeFramed {\advance \hsize -\width \FrameRestore }%         }{%           \endMakeFramed         }                        \newcommand{\highlighteq}[1]{#1}         \newenvironment{highlighteqenv}{}{}              \begin{document}         He said : ` you must defeat Sheng Long to stand a chance' which more or less amounted to         \begin{highlighteqenv}           \begin{equation}             \highlighteq{               \frac{\partial \langle \alpha K \rangle}{\partial t} + \frac{\partial \lambda}{\partial z} =0                         },           \end{equation}         \end{highlighteqenv}              \lipsum[1]         \begin{equation}           k_e =  42 \times \int x \ dt ,         \end{equation}         and         \begin{equation}            k_z =  42 \times \int u \ dt.         \end{equation}                        To this one would object that :         `\lipsum[2]'              \begin{equation}           \frac{\partial \langle \alpha K \rangle}{\partial \lambda} = 42 .         \end{equation}              Xyzzy !              \begin{highlighteqenv}           \begin{equation}             \highlighteq{H_{appens} \rightarrow 0} .           \end{equation}         \end{highlighteqenv}                   \lipsum[3]         \begin{equation}           \sum [ \bar{\alpha} K' \mu ] = 42.1 ,         \end{equation}         and         \begin{highlighteqenv}           \begin{equation}             \highlighteq{y^2 + ax + b = 39.9} .           \end{equation}         \end{highlighteqenv}              \end{document}


title: Creating a standalone glossary

text: As a followup to this question, I would like to ask how can I use the `glossaries` package just for the creation of a glossary. I do not want it to be part of a document rather a standalone document where there's a list of terms and their definitions. Edit (1): I guess that what I want, is often called a lexicon, or a dictionary. Edit (2): In order to clarify what I'm after, let me add few remarks. First, it may well be that `glossaries` is not what I'm looking for. I am looking for a tool which will enable me to edit entries which will include text, figure, diagrams, links between different entries etc. and then to typeset it in an alphabetic order. Maybe something like an encyclopedia is a better description of what I want to obtain. I hope it is cleared now. Edit (3): Finally I found an example of what I want to have at the end. Consider this book. I clearly want something way simpler, but this is the spirit. Namely, each term/entry can contain math, figures etc. in it. The compilation process should take care of the alphabetic order. Is `glossaries` the right package to use?


title: Hiding the column separator in multicols

text: By default, the multicol package produce a line between different columns. Is it possible to disable this line?


title: How to add unnumbered lines in an algorithm?

text: I am typesetting algorithms with the _algorithm_ package, and I would like to add unnumbered lines in them. Is there a way to create a `\State*` command, the same way there is an `equation*` environment? Here is an example of algorithm. I would like the `\State {}` line to be unnumbered, and therefore `\State Step 3.` to be number 3.               \documentclass{article}     \usepackage{algorithm}      \usepackage{algpseudocode}          \begin{document}          \begin{algorithm}     \caption{A title.}      \begin{algorithmic}[1]      \State Step 1.     \State Step 2.      \State {}     \State Step 3.     \end{algorithmic}     \end{algorithm}          \end{document}


title: How to place a table on a new page with landscape orientation without clearing the current page?

text: I'd like to place a table on a new page with landscape orientation. To do so, I use               \usepackage{pdflscape}     ...     \pagestyle{empty}     \begin{landscape}     \begin{table}[htbp]     \begin{center}     \begin{tabular}{llll}     ...     \end{tabular}     \end{center}     \end{table}      \end{landscape}     \pagestyle{plain}      However, this clears the current page, places the table on the next page with landscape orientation, and restarts typesetting in a new page with portrait orientation. **Question** I'd like to place the table on a new page (as it is currently done) but to avoid to clear the current page. Is that possible? Thanks!


title: Beamer templates for presentations

text: I use beamer for preparing presentation slides. I would like to ask where I can find `templates` for beamer. Is there any online repository for templates? Thanks in advance.


title: Is there some typesetting system that uses XML notation?

text: Is there some typesetting system that uses XML for notation? This is no offense, but I don't like to type `\emph{This \emph{text} is important}` despite the fact that there are editors that can do it for you. (Though I think the real hardcore LaTeXers don't use them.) I would rather want to do something like the following, because it's more easy to type in my opinion and my keyboard layout:               This text is important      Although there are a lot of XML-parsers out there and the style of XML is simpler, clearer and common to me. But I don't think that HTML fits my needs as it is a hypertext- and not a document markup language. **Additional question:** Can you please list me some drawbacks when using HTML instead of LaTeX-like typesetting systems when writing huge documentation?


title: Invoking biblatex macro for "(visited on <date>)"

text: Can I invoke some biblatex commands or macros in order to automatically generate a string like this:               (visited on 04/01/2013)      I have this outside of a `\cite` command in a footnote, but would like to automatically get the same text and formatting as biblatex would use when printing this information. So something like               \printurlseen{2013-01-04}  % hypothetical code


title: Are there two different versions of the \mathcal{F} character?

text: I've seen two different versions of the `\mathcal{F}` character: Version 1: ![version 1](http://myyn.org/static/assets/mathbrowser/article/11/images/img6.png) Version 2: ![version 2](http://i.stack.imgur.com/dED0X.gif) Notice that the top horizontal line of the F curves down on the left much more in version 1 than it does in version 2. Which of these is the preferred `\mathcal{F}`? I know that some of the calligraphic capital letters were improved at one point, but I don't know which version is the improved one.


title: Insert Bash code with coloration into my latex report

text: I am writing a long report and I need to include some codes I programed. I would like present my code with coloration, as we can have in some text editor (and not using verbatim). I need the coloration mode for two kind of languages (coloration given can be totally different, no problem with that):   * Bash language   * (Java language)<= Already have it, thanks! Thank you in advance for your help. *concerning the coloration itself, we can consider as simple example linux text editor.


title: Biblatex-chicago showing a line instead of names in bibliography for some entries

text: This is a followup to the post BibLaTex and citing same source several times in same paragraph. When I compile my document, my bibliography sometimes exchange the name of the author with lines. One of the entries that had a line instead of the name in my original document, has name shown here. In my previous problem (linked above) the solution was a simple "switch". I have looked for the solution in the manual, but I probably do not understand where it is mentioned. Sorry about the long MWE, but it felt necessary to add all the bib-entries to show my problem.               \documentclass[a4 paper,12pt]{report}     \usepackage{graphicx}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{times}          \usepackage[english]{babel}          \usepackage[     authordate,     backend=biber,     natbib,     maxbibnames=99,     ibidtracker=false,     ]{biblatex-chicago}          \addbibresource{mybib.bib}          \usepackage{csquotes}          \begin{filecontents}{mybib.bib}     @BOOK{lpd,       title = {Longman Pronunciation Dictionary},       publisher = {Pearson Education Limited. Essex},       year = {2008},       author = {Wells, J.},       edition = {3rd},       date-added = {2014-02-25 15:30:14 +0000},       date-modified = {2014-04-26 18:18:22 +0000},       keywords = {wells}     }          @BOOK{wellint,       title = {English intonation An Introduction},       publisher = {Cambridge University Press Cambridge},       year = {2006},       author = {{Wells, J.}},       date-added = {2014-02-05 12:51:13 +0000},       date-modified = {2014-04-25 15:24:39 +0000},       keywords = {intonasjon}     }               @ARTICLE{wellstrans,       author = {Wells, J.},       title = {Transcribing Estuary English},       journal = {Speech Hearing and Language: UCL Work in Progress},       year = {1994},       volume = {8},       pages = {259-267},       date-added = {2014-01-22 13:35:58 +0000},       date-modified = {2014-04-26 18:18:05 +0000},       keywords = {wells}     }          @MISC{wells1991,       author = {Wells, J.},       title = {The Cockneyfication of RP?},       howpublished = {http://www.phon.ucl.ac.uk/home/estuary/cockneyf.htm},       month = {4},       year = {1991},       date-added = {2014-04-12 17:01:31 +0000},       date-modified = {2014-04-26 18:18:13 +0000},       keywords = {wells}     }     \end{filecontents}          \begin{document}          Now, let's add some quotes from the different publications. Here is publication 1 \citep{lpd}, and number two \citep{wellint}. And then we add number three \citep{wellstrans} and four with a slightly different format, just because \citet{wells1991} probably would like it better, and try to compile it.          \printbibliography     \end{document}


title: Hyphenating words with archaic spellings

text: I often work with texts from the 17- to 1800s that (in addition to now obsolete words) contain familiar words in slightly different spelling. The language of these texts, and of the ones I'm writing, is one in which a lot of hyphenation has to be done, due to the high average length of its words (German). To complicate matters further, it's also a language in which hyphenation is regulated a lot more strictly than in, say, English. [Which doesn't mean that what follows is a problem restricted to German.] In *TeX, this results in a problem: when hyphenating a word that comes in an archaic spelling, *TeX has no choice but to apply the same rules it applies everywhere else, as it has no way of telling if the spelling at hand is archaic or not. Quite often, this results in a hyphenation that is wrong by both archaic and contemporary German standards. A classic example: A lot of German words used to be spelled with a `th` where today there's only a `t`. Such as `Teil` (=part), which was `Theil` until that `th` went out of fashion, and even became eliminated from the official dictionaries around 1900 -- probably because of it's redundancy, as the `h` didn't make a difference in sound, unlike in English. Today, only few German words retain that `Th`, such as `Thron` (=throne), as they didn't want to offend the emperor when they officially changed the spelling rules. The reason this is important to *TeX is that in today's German, with _that kind_ of `th` eliminated, the letters `t` and `h` hardly ever constitute _one sound._ So if we encounter a modern German word with a `th` in it, which happens quite often, it will usually be a word composed of two or more syllables (or words) -- the first of which ending with a `t`, the second starting with an `h`. As in, say, `flathead` in English. But sound is the very basis of German hyphenation practice, and *TeX knows that. So in *TeX, the archaic spelling of `theil` in `beurtheilen` (=to judge), will result in the hyphenation `be-urt-heil-en`, which is unacceptable because, in this case, the `t` and the `h` belong together in terms of both sound and meaning. My questions are: has this ever been addressed somehow? I haven't been able to find anything suggesting that is has. Do we have other options except manual word lists using `\hyphenation{...}`? ...Which is particularly tedious in German because every potentially critical word may come with a dozen of versions for different genders, cases, etc.


title: Add additional info to a preview

text: The following example works in so far as it shows the image in the source latex file and disregards everything else. Is there some way of performing the same task but also list information about each image such as its the dimensions, file size and filename below each image? Only the preview should have that. I am hoping that not only can I accomplish that but that I don't have to manually type in the file size and other info myself -- although if there is no way to grab the info automatically then the next best would be to add the info manually. Either way, I would like to know how to accomplish this.               \documentclass{article}     \usepackage{graphicx}     \usepackage{lipsum}     \usepackage[active,tightpage,pdflatex,graphics,showlabels]{preview}          \begin{document}          \lipsum[1]          \begin{center}     \includegraphics{elephant}     \end{center}          \lipsum[1]          \end{document}      Result (the grey part around the image was not part of the output but is an artifact of my capturing process so that part can be disregarded): ![screenshot](http://i.stack.imgur.com/vsEhu.png) (Creative Commons info on elephant image available here .)


title: Inserting very wide paragraphs or pictures...

text: The questions and answers regarding wide paragraphs are rather popular. What I would like to have is a new kind of "element" in my documents which would allow me to display wide paragraphs which can contain text, picture or tables... The layout is shown on the picture. My own solution is rather trivial - it works but it has two major issues:   * It throws ton of overfull hboxes   * It could "mix" with marginpar text (puts it one above the other) The Look and Feel of new element               -------------     |         | |     |         | |     |         | |     |-----------|     |new element|     |-----------|     |         | |     -------------          %PREAMBLE STUFF     \newlength{\wideparwidth} %The width of our new element     \setlength{\wideparwidth}{\textwidth}        %Initializing to textwidth...     \addtolength{\wideparwidth}{\marginparsep}   %adding marginsep...     \addtolength{\wideparwidth}{\marginparwidth} %adding marginparwidth          \newcommand{\widepar}[1]{\parbox{\wideparwidth}{#1}} %The actual command          %USAGE     \begin{document}     ...     \widepar{The text which appears in the very wide paragraph...}     ...     \end{document}      Is anybody aware of some existing package where such layout is supported? If not, please give me some tip how I could prevent marginpar text to overlap (I assume this is not trivial). And the last but not the least, how could I make "overfull hbox" ignored (for this element only)?


title: Extra space added in table with multi-rows and columns

text: I am working with a table with multi-rows and headers. The problem is when I run it, extra space is added both between rows and at the end of the last column. ![](https://www.evernote.com/shard/s15/sh/99d4835c-1e99-40ff-82ad-6d483960191d/2610b06707ace32bcfa8d124ed60ae59/res/7c15dfae-5c3b-43d4-830f-a4523a759ce9/skitch.png?resizeSmall&width=832)               \documentclass{article}              \usepackage{geometry}                            \geometry{a4paper}                                        \usepackage{array}     \usepackage{ragged2e}     \newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}     \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \newcommand{\head}[1]{\textsf{\textbf{#1}}}          \usepackage{tabulary}          \usepackage{booktabs}     \usepackage{multirow}               % Allows rows in tables to be combined.               \usepackage{tabulary}          \begin{document}     \begin{table*}     \caption{Summary of studies examining MENA or OPEC oil export revenues under climate policies}         \begin{tabular}{@{}C{2.0cm}C{2.0cm}P{2.0cm}P{3.0cm}C{1.0cm}C{1.0cm}@{}}     \toprule     \ \head{Study} & \head{Time horizon} & \multicolumn{1}{c}{\head{Climate policies}} & \head{\centering {Uncertainties tested}} & \multicolumn{2}{c}{\head{Impact on oil export revenue}} \\     \midrule     \ \multirow{4}{2.0cm}{ABC} & \multirow{4}{2.0cm}{Results: 2025, 2050; Model: 2100} & \multirow{4}{2.0cm}{550 ppm \& 650 ppm GHG stabilization} & \multicolumn{3}{c}{\head{Middle East \& Turkey region versus the Baseline}} \\     \ & & & & 2025 & 2050 \\     \ & & & 550 ppm & -10\% & -20\% \\     \ & & & 650 ppm & -25\% & -35\% \\       \midrule     \ \multirow{2}{2.0cm}{CEF} & \multirow{2}{2.0cm}{2030} & \multirow{2}{2.0cm}{Global carbon taxes} & \multicolumn{3}{c}{\head{OPEC wealth versus no carbon tax}} \\     \ & & & Carbon tax (\$50/TC -- \$2500/TC) & -3\% & -63\% \\              \bottomrule     \end{tabular}     \end{table*}          \end{document}


title: Memory settings with MacTeX 2012

text: Until now I had TeXLive 2011 installed and could successfully modify my memory settings using this solution with the TextWrangler approach to the question Memory settings with MacTeX - Which texmf.cnf to modify. After switching to MacTeX 2012 this doesn't work for me anymore. I already tried completely uninstalling all TeX-files and reinstalling only 2012, but that doesn't change anything. Maybe this are some clues:   1. When I try to modify `/usr/local/texlive/2012/texmf.cnf` in TextWrangler I get ![the message below](http://i.stack.imgur.com/v5psB.png), but it lets me change the file anyway after clicking Unlock.   2. `sudo fmtutil-sys --all` runs just fine in the terminal, but I still get `TeX capacity exceeded, sorry [main memory size=3000000]`, when LaTeXing my document, though the `texmf.cnf`-file is definitely changed. * * * EDIT: Well, up to a value `main_memory = 12000000` I am able to increase my memory by using this approach. Higher values don't seem to be possible. This solves my current problem. But as one is supposed to rather change the `/usr/local/texlive/2012/texmf.cnf` than `/usr/local/texlive/2012/texmf/web2c/texmf.cnf` I'm still happy about any clues or even an answer regarding my original question.


title: how can we equalize the fonts of mathtt and texttt

text: I'm trying to use a mono-font in my text, but it seems that mono texts differ in character map in math and text environment. Is there any solution?               \documentclass[fleqn]{article}     \usepackage{fontspec}     \setmonofont[Mapping=tex-text]{Courier New}     \begin{document}          \texttt{Farschad \% + - * \$  ! }          \[     \mathtt{Farschad \% + - * \$ !}     \]          \end{document}      ![enter image description here](http://i.stack.imgur.com/SQVsV.jpg)


title: Halftone shading with TikZ

text: I try to do a cover for a documentation. For this, I need to do a shading between two colors. And to be more elegant I would like to make a halftone shading with TikZ, like shown in the picture. ![halftone example](http://i.stack.imgur.com/YJomp.png)


title: Lyx - Editing the document class

text: I am using LyX Beamer but want to the option `[t]`. Using Document -> Settings -> Document Class if I choose presentation (beamer) and put the `[t]` in custom it does not compile. Is there a way to define the class in the preamble so I can modify this option?


title: Editing LuaLaTeX files in emacs

text: (A follow-up question to Which is the best editor for LuaTeX?) Emacs offers the LaTeX-mode in AUCTeX for editing LaTeX files, while it has the Lua-mode for editing Lua-files. Consider the following code:               \documentclass{article}     \usepackage{luacode}     \begin{document}     \begin{luacode*}     for i=1,2,3 do     for j=1,2,3 do     tex.sprint("Test");     end     end     \end{luacode*}     \end{document}      In Emacs latex-mode I get the following screenshot: ![](http://i.stack.imgur.com/KbNQc.png) But it is not possible to indent the lua-code with the tab-key or highlight Lua-code key words. If I turn on lua-mode in emacs, I get editing features for the Lua-code, but not for the latex-code, e.g.: ![](http://i.stack.imgur.com/XGHR5.png) Is it possible to have both modes work together? (I have looked at this page: http://emacswiki.org/emacs/MultipleModes but I am not sure which mode to use and how to set it up)


title: Macro defining environment

text: How to write an environment such that               \begin{comment}         Bla, bla.     \end{comment}      produces no output, and instead defines a macro `\@comment` whose replacement text is everything that is inside the `comment` environment?


title: Problems with mathtools package

text: The following code produces an error. If the mathtools package is removed, it works. Why? * * *               \documentclass{report}          \usepackage{mathtools}     \usepackage{etoolbox}          \newbool{shorttoc}          \makeatletter     \patchcmd{\@startshorttoc}{\bgroup}{\bgroup\booltrue{shorttoc}}{}{}     \makeatother          \begin{document}          \tableofcontents          \addtocontents{toc}{\protect\ifbool{shorttoc}{\setcounter{tocdepth}{0}}{}}          \chapter{Test Appendix}          \end{document}      * * * This question is related to an earlier question of mine.


title: "Log File not found" error

text: I was coping a file from a friend and when I compiled the tex file under the name she saved it as it worked fine. Then I changed the title of the file and the "Log File not found" error popped up. I'm pretty confused since all I did was change the name and it got messed up. Any ideas of how to fix this?


title: Custom Beamer Block has strange spacing why?

text: I have a custom block defined as the following! this comes from the progressbar theme from http://recherche.noiraudes.net/fr/LaTeX.php               \newdimen\lengthone     \newcommand{\defblock}[1][]{       \defbeamertemplate*{block \ifx#1\@empty\else#1\space\fi begin}{progressbar theme}       {                  %\rule{\textwidth}{2pt}         \lengthone=\textwidth         \advance\lengthone by -4mm         \setbox\progressbar@blockbox=\hbox to 1\textwidth\bgroup\vbox\bgroup             \vskip-0.25\baselineskip             \raggedright             \hspace{-2.4mm}         \begin{minipage}{\lengthone}              \ifx\insertblocktitle\@empty             \else             {\usebeamerfont{block title}\usebeamercolor[fg]{block title\ifx#1\@empty\else\space#1\fi}\insertblocktitle}\\[-0.3cm]% Just to be "babel-safe"              \tikz\draw[fg!20!bg] (0, 0) -- (\lengthone, 0);\par             %\vspace{-2mm}             \fi             \par             \usebeamerfont{block body\ifx#1\@empty\else\space#1\fi}             \ifx\insertblocktitle\@empty\else\global\let\itemize=\progressbar@itemize\fi               %\vphantom{y}             }            \defbeamertemplate*{block \ifx#1\@empty\else#1\space\fi end}{progressbar theme}       {         \vphantom{y}         \global\let\itemize=\progressbar@tempitemize         \end{minipage}         \vskip-0.25\baselineskip\egroup\egroup         \progressbar@boxwidth=\wd\progressbar@blockbox         %\advance\progressbar@boxwidth by 0.5\baselineskip         %\advance\progressbar@boxwidth by 5mm         \progressbar@boxheight=\ht\progressbar@blockbox         \advance\progressbar@boxheight by \dp\progressbar@blockbox         {          \parbox[t]{0cm}{           \usebeamercolor{block body\ifx#1\@empty\else\space#1\fi}           \tikz[baseline=(current bounding box.north)]{\draw[draw=fg!20!bg,fill=bg, rounded corners=2pt] (0, 0) rectangle (\progressbar@boxwidth, \progressbar@boxheight);}          }         }       {         \parbox[t]{0cm}{           \vskip0.5\baselineskip           \hfill{\box\progressbar@blockbox}\hfill         }        }       }     }          \defblock      When I make a frame in beamer with three identical Blocks in a Minipage like this the following comes out, that the first box looks completely wrong and the follwing look right with the right spacing... Does anybody see what can cause this strange effect?               \begin{frame}[t,fragile]     \frametitle{Ball on Curve}     \begin{flushright}     \begin{minipage}[t]{0.7\textwidth}         \begin{block}{Frage und Ziel}         \begin{itemize}             \item<2-> Scheibe als \emph{ungebundenes} System formulieren.             \item<2-> Scheibe als \emph{ungebundenes} System formulieren.         \end{itemize}         \end{block}     \end{minipage}     \end{flushright}     \vspace{-\baselineskip}     \begin{flushright}     \begin{minipage}[t]{0.7\textwidth}         \begin{block}{Frage und Ziel}         \begin{itemize}             \item<2-> Scheibe als \emph{ungebundenes} System formulieren.             \item<2-> Scheibe als \emph{ungebundenes} System formulieren.         \end{itemize}         \end{block}     \end{minipage}     \end{flushright}     \vspace{-\baselineskip}     \begin{flushright}     \begin{minipage}[t]{0.7\textwidth}         \begin{block}{Frage und Ziel}         \begin{itemize}             \item<2-> Scheibe als \emph{ungebundenes} System formulieren.             \item<2-> Scheibe als \emph{ungebundenes} System formulieren.         \end{itemize}         \end{block}     \end{minipage}     \end{flushright}     \end{frame}      ![enter image description here](http://i.stack.imgur.com/R0Iyu.png)


title: Artin's squiggly arrow?

text: Is there a package containing the squiggly arrow that Artin uses in his _Algebra_ text? It looks like:![Artin arrow](http://i.stack.imgur.com/hZoqJ.png) I've seen some of the options using tikz on here, but they aren't quite the same.


title: Symbol for induces

text: I am looking for a symbol to use for "induces" (in the mathematical sense, one object can induce another). The symbol leadsto: $\leadsto$ (latexsym package) is of the perfect shape, but it is just too small. I would particularly like to be able to control the length of this arrow, and ideally it would acquire more humps the longer it gets. Does anyone know of a package that will let me do this?


title: How to add tables to a list?

text: I would like to have these two tables as items of this list. Currently they are appearing outside the list, on the top of the page.               \documentclass[12pt, oneside]{article}          \usepackage[brazil]{babel}     \usepackage[latin1,utf8]{inputenc}     \usepackage{enumerate}          \begin{document}          %%%%%%%%% problem            \begin{itemize}         \item item1         \item item2         \begin{table}         \parbox{.45\linewidth}{         \centering             \begin{tabular}{l|ll}             + & 0 & 1 \\ \hline             0 & 0 & 1 \\             1 & 1 & 0 \\             \end{tabular}         \caption{adicao}         }         \hfill         \parbox{.45\linewidth}{         \centering             \begin{tabular}{l|ll}             . & 0 & 1 \\ \hline             0 & 0 & 1 \\             1 & 0 & 1 \\             \end{tabular}         \caption{mult}         }         \end{table}            \end{itemize}     \end{document}      I have been searching about how to do it, however, until now I've only found how to do the opposite (how to insert lists in tables).


title: How to constrain text using multiple shapes in TikZ?

text: I'm trying to reproduce this graph, using TikZ: ![mockup](http://i.stack.imgur.com/3WCQ4.png) So far, what I got is this: ![tex image](http://i.stack.imgur.com/2tnZ7.png) It's not bad, I don't mind the circles instead of having elipses (not the point of my question anyway)... The problem is: how do I post text inside the three spaces so that LaTeX automatically forces the text inside of those spaces so that if the text is a lot, it might even fit the same shapes? As you can see the preview text, which is _lol_ , goes to the center of the circles which inevitably means being on the circle lines. (You can use any text for the answer, like lipsum, and so on.) My current Tex code is:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}     \usepackage[landscape]{geometry}     \usepackage{tikz}     \usepackage{subfig}          \begin{document}     % Definition of circles     \def\firstcircle{(0,0) circle (5cm)}     \def\secondcircle{(0:5cm) circle (5cm)}          \colorlet{circle edge}{black}     \colorlet{circle area}{white}          \tikzset{filled/.style={fill=circle area, draw=circle edge, thick},     outline/.style={draw=circle edge, thick}}          \begin{figure}     \begin{tikzpicture}          \draw                                 \firstcircle node(1) {$lol$}                                 \secondcircle node(2) {$lol$};          \node[anchor=east] at (current bounding box.west) {\huge{A}};     \node[anchor=west] at (current bounding box.east) {\huge{B}};     \node[anchor=north] at (current bounding box.south) {\huge{C}};          \end{tikzpicture}     \end{figure}          \end{document}


title: making a box in beamer -- pausing within frame to show new content using only

text: I am trying to use the only<1>, only<2>, etc... feature of beamer for a frame. However, when add it to the program, it is not compiling. I would appreciate any help. Also, how can the titles, "prediction outcomes" and "actual outcomes" be centered rather than left-aligned? Where is there a list of beamer color options (instead of blue as is in the code)? How can I make an arrow to point to the cell? This is continued from: Making a table as a box in beamer in whch 2 cells are highlighted               \documentclass[professionalfont, fleqn]{beamer}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,positioning,fit,shapes.misc}          \begin{document}           \begin{frame}[fragile]           \centering      \begin{tikzpicture}[       box/.style = {draw,rectangle,minimum size=1.0cm,text width=1cm,align=center}      ]      \matrix (conmat) [row sep=0cm,column sep=0cm] {      \node (tpos) [box,label=left:\( \mathbf{p'} \),label=above:\( \mathbf{p} \),] {};      & \node (fneg) [box,label=above:\textbf{n},] {$\checkmark$}; \\      \node (fpos) [box,label=left:\( \mathbf{n'} \),] {$\checkmark$};       & \node (tneg) [box] {$\checkmark$}; \\      };          \node [left=.05cm of conmat,text width=1.5cm,align=center] {\textbf{actual \\ value}};     \node [above=.05cm of conmat] {\textbf{prediction outcome}};     \end{tikzpicture}          \end{frame}     \end{document}      I tried putting the only around the begin{tikzpicture} and end{tikzpicture}.


title: How can make a running example in LaTeX

text: I want a `continues example` where the same number is used for the example in different sections. Is it possible for LaTeX not to increase the counters for the examples? Regards minimum working code:               \documentclass{article}          \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{amsmath}          \theoremstyle{definition}     \newtheorem{myexp}{Example}          \begin{document}          \begin{myexp}     This is the first part of our running example     \end{myexp}          .     .     .          \begin{myexp}     This is the second part of our running example     \end{myexp}               \end{document}


title: Is standalone compatible with ignorenonframetext beamer's option?

text: Until now I've been using `standalone` to produce cropped figures which are included with `\includegraphics` command in beamer presentations and articles (`beamerarticle`) compiled from same source file. Today I wanted to use `standalone's` possibility of also creating figures and not only including them but as soon as I include `ignorenonframetext` option for `beamer` class something breaks. I've read about `beamer` option for `standalone.cls` but i don't draw 'animated' figures so I think I don't need it. Next you have a minimal working and not working example: it works with               \documentclass{article}     \usepackage{beamerarticle}       or               \documentclass{beamer}       but not if `\documentclass[ignorenonframetext]{beamer}` combines with `\input{figure}`. If instead of `\input` I place `TiKZ` code inside the frame works again even with `ignorenonframetext`.               %\documentclass{article}     %\usepackage{beamerarticle}     %\documentclass{beamer}     \documentclass[ignorenonframetext]{beamer}     \usepackage{filecontents}     \usepackage{tikz}     \usepackage{standalone}          \begin{filecontents}{figure.tex}     \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}     \draw(0,0) rectangle (3,5);     \end{tikzpicture}     \end{document}     \end{filecontents}          \begin{document}     \begin{frame}[fragile]{Hello}     \input{figure}     \end{frame}     \end{document}      The error message says:               ! LaTeX Error: Can be used only in preamble.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.5 \documentclass                       [tikz]{standalone}     ? e      Some final comments. I've used `filecontents` package to simplify the example, real figure files are independent one's. I don't know if frame option `fragile` is necessary or not. I've also tested with `\mode<all>` before `\input` as is suggested in \input{...} is ignored with beamer option ignorenonframetext but nothing changes. _Update_ Although `egreg` answer is valid for the MWE, this was too minimal because as soon as a second nesting level is introduced, `\sainput` fails. Next you have a new not so minimal working example. In this case, main document `\input` a file which `\input` the `standalone` figure. Everything works with `article+beamerarticle` or `beamer`, but not with `\documentclass[ignorenonframetext]{beamer}`. In this last case, `pdflatex` finishes and `*.log` doesn't show any error except `No pages of output.` and resulting `*.pdf` has 0 size.               %\documentclass{article}     %\usepackage{beamerarticle}     %\documentclass[ignorenonframetext]{beamer}     \documentclass{beamer}     \usepackage{standalone}     \usepackage{tikz}     \usepackage{filecontents}          \makeatletter     \def\sainput{\let\documentclass\sa@documentclass\input}     \makeatother          \begin{filecontents}{figure.tex}     \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}     \draw(0,0) rectangle (3,5);     \end{tikzpicture}     \end{document}     \end{filecontents}          \begin{filecontents}{doc.tex}     \begin{frame}{This is a frame}          Here, there is a TiKZ figure          \input{figure}     \end{frame}     \end{filecontents}          \begin{document}          \input{doc}          \end{document}


title: How to horizontally align headers and decimal centered cells

text: I use this code to produce a table and to align the column with the dot of the numerical values.               \documentclass{article}          \usepackage{dcolumn}          \begin{document}          \begin{tabular}{l D{.}{.}{3} D{.}{.}{3}}     \firsthline      & \multicolumn{1}{c}{Header 1} & \multicolumn{1}{c}{Header 2} \\     \hline     \hline     Length & 1.489 & 2.569 \\     Width & 5 & 2.4\\     \lasthline     \end{tabular}          \end{document}      ![The obtained table.](http://i.stack.imgur.com/t1lSv.png) Two requests for this table: I would like to have the headers properly centered with the numerical values. How can I specify the width of the columns produced with the `D` function?


title: Practical use of lua

text: Although I always use Lualatex to compile my documents, I don't really use lua that often. Sometimes I even forget about it. In my last document I used it to write a random word generator, which picks a word from a pool of words. Which can be really helpful in many different documents and circumstances. I came up with this code in another question, but will repost it here, if someone wants to use it. So today I asked myself, what are some other good uses for Lua in TeX documents. And here we go, now it's your turn to post your ideas. * * * Thanks for all the great answers. There are some great ideas, I certainly can put to good use in my own documents (and other users aswell, I guess :) ) In my opinion every answer deserves the check mark, so I guess I let the community decide and choose the one with the most upvotes. That of course doesn't mean you have to stop posting your awesome ideas ;)


title: How do I add a legend to a gantt chart?

text: I'm using the `pgfgantt` package to draw a gantt chart and I am using different fill patterns for different task types (fill patterns for the task bars, that is). It works nicely! But I would like to add a legend to tell the reader which pattern stands for which kind of task. I do believe that this is not possible from inside `pgfgantt`, but perhaps there are other ways of adding it?


title: Tikz realistic 3D grid

text: I need to draw a 3d isometric grid/lattice using tikz that is not visually confusing. It needs to be at least 6x6x6 but possibly bigger. I sort of would like to have it fade into the background or contracts in size as it goes into the screen. I will put small text nodes at each coordinate. For any example dots will suffice. It is analogous to http://www.texample.net/tikz/examples/lattice-points/ except in 3D. The main issue is somehow figuring out how to make sure it is easily seen in 3D.


title: When should I use \psgraph instead of \pspicture plus \psaxes?

text: I am new to PSTricks and want to plot some functions. The documentation of `pst-plot` explains (but not detailed enough) both `\psgraph` environment and the combination of `\pspicture` and `\psaxes`. The thing I want to know is: _When should I use one rather than the other one?_ Bonus question: I want to change the font of the axis labels from text to math. How can we do that?               \documentclass{minimal}     \usepackage{pst-plot}          \begin{document}     \begin{psgraph}[]{->}(0,0)(-1,-2)(\psPiTwo,2){8cm}{6cm}         % plotting      \end{psgraph}     \end{document}      _Output:_ ![enter image description here](http://i.stack.imgur.com/4pxue.png)


title: \hat and \widehat look terrible: fixing width and better positioning?

text: I want to make the use of quantum mechanical operators explicit in my text using `\hat{A}` or `\widehat{A}`. The problem is that depending on the symbol under the accent it looks either misplaced or too small, but see for yourself: ![enter image description here](http://i.stack.imgur.com/ZMUQO.png) In the first case, using `\hat`, the accent above the B looks just slightly too much left-aligned. The other cases are just obviously bad. I have generated all examples using the code below. I found some related questions: Why does \widehat behave differently if I insert \hspace{0pt}? And in particular: How can I manually choose the size of a wide accent? (math mode) I took some code from the latter, but it doesn't help. Also, the accepted answer in the latter does not compile - I think the `accent` package doesn't work with `xelatex`. So, how can I...   * better center the accents above the characters?   * have the accents have a similar width?   * maybe let them be on the same height (look at the first AB - the hat above the B seems a bit lower)? .               \documentclass{scrartcl}          \usepackage[tbtags]{mathtools}     \usepackage[math-style=ISO,bold-style=ISO]{unicode-math}     \setmainfont[Ligatures={TeX,Common}]{TeX Gyre Pagella}     \setmathfont{TeX Gyre Pagella Math}          \usepackage{calc}     \newcommand{\styletofont}[1]{%       \ifx\displaystyle#1\let\next\textfont\fi       \ifx\textstyle#1\let\next\textfont\fi       \ifx\scriptstyle#1\let\next\scriptfont\fi       \ifx\scriptscriptstyle#1\let\next\scriptscriptfont\fi}          \newcommand{\innfwhat}[2]{%       \styletofont{#1}%       \dimen0 \fontcharic\next1 \skewchar\next1       \advance\dimen0 -\fontcharic\next1`#2%       \makebox[0pt][l]{$#1#2$}%       \makebox[\widthof{$#1#2$}]{$#1\kern.5\dimen0 \widehat{\vphantom{#2}}$}}     \newcommand{\fwhat}{\mathpalette\innfwhat}          \pagestyle{empty}          \begin{document}          \begin{equation*}       \begin{split}         &\hat{A}\hat{B} \\         &\widehat{A}\widehat{B}\\         &\widehat{\hspace{0pt}A}\widehat{\hspace{0pt}B}\\         &\fwhat{A}\fwhat{B}       \end{split}     \end{equation*}          \end{document}


title: Adding labels to a node in a matrix and change the position of single matrix cell to create a flow chart

text: I want to **add two labels next to the diamond shaped node**. One to the right saying "Ja" above the path and the other one below saying "Nein" right next to the path. Currently it seems like that **two new nodes are created**. I think I am using the option list wrong. The other problem is, that I want a **bigger seperation between the first and second column** so that the path doesn't cross the "]" symbol. And the last thing is, that I would like to change the horizontal distance between the nodes so that the whole picture will be slimmer. > ![wrong path creation and labels](http://i.stack.imgur.com/PaIF2.jpg) The > labels are now below the diamond shaped node. **The code** : * * *               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,matrix,shapes.geometric}     \begin{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%            \begin{tikzpicture}               [                     every matrix/.style         ={matrix of nodes,                                                   nodes in empty cells,                                                   font=\tiny,                                                   row sep   =3mm,                                                   column sep=0mm,                                                   inner sep =2mm,                                                   outer sep =0mm},                     every node/.style           ={text centered,                                                   anchor=center},                 kontrollpunkt/.style            ={draw,                                                   rounded corners,                                                   text width=2cm,                        text centered},                 operation/.style                ={draw,                                                                     text width=2cm,                                                                     text centered},                 bemerkung/.style                ={inner sep=0pt},                 datenio/.style                  ={draw,                                                                     trapezium,                                                                     trapezium left angle=120,                                                                     trapezium right angle=60,                                                                     shape aspect=2,                                                                     text width=2cm},                 verzweigung/.style          ={draw,                                                                     diamond,                                                                     shape aspect=2,                                                                     inner sep=0pt,                                                                     text width=2cm},                 verbindungsstelle/.style={draw,                                                                     circle,                                                                     inner sep=0pt,                                                                     minimum width=2mm},                 pfeil/.style                        ={draw,                                                                     ->,                                                                     shorten <=0pt,                                                                     >=stealth',                                                                     -latex',                                                                     shorten >=0pt},                 linie/.style                        ={draw,                                                                     dashed,                                                                     midway}]                      \matrix (pap)                       %   pap = Programmablaufplan                     {                                                                 &                                                                       &   |[kontrollpunkt]|           {Start}                                                                                &                                                                               &                                                       \\                                                                 &                                                                       &   |[operation]|                   {Initialisierungs-schritt}                                                                                &                                                                               &                                                       \\                         |[bemerkung]|   {1]}    &                                                                       &   |[datenio]|                     {Betriebsarten-auswahl}                                                                                &                                                                               &                                                       \\                         |[bemerkung]|   {2]}    &                                                                       &   |[verzweigung]|             {Prozessauswahl}                                                                                &                                                                               &                                                       \\                                                                 &                                                                       &   |[operation]|                   {Produktion}                                                                                &                                                                               &   |[operation]|   {Wartung}       \\                                                                 &                                                                       &   |[verbindungsstelle]|                                                                                &                                                                               &                                                       \\                                                                 &   |[operation]|   {Bauteil einlegen}  &                                                                                &   |[operation]|   {Einfahrt Roboter leer} &                                                       \\                                                                 &                                                                       &   |[verbindungsstelle]|                                                                                &                                                                               &                                                       \\                         |[bemerkung]|   {3]}    &                                                                       &   |[verzweigung,label={[xshift=3mm]below:Nein},label={[yshift=3mm]below:Ja}]| {Produktion ohne Teile}     &                                                                               &                                                       \\                                                                 &                                                                       &   |[operation]|                   {Arbeitsstellung}                                                                                &                                                                               &                                                       \\                                                                 &                                                                       &   |[operation]|                   {Falzen}                                                                                &                                                                               &                                                       \\                                                                 &                                                                       &   |[operation]|                   {Grundstellung}                                                                                &                                                                               &                                                       \\                                                                 &                                                                       &   |[verbindungsstelle]|                                                                                &                                                                               &                                                       \\                                                                 &   |[operation]|   {Bauteil entnehmen} &                                                                                &   |[operation]|   {Ausfahrt Roboter leer} &                                                       \\                                                                 &                                                                       &   |[verbindungsstelle]|                                                                                &                                                                               &                                                       \\                     };                      \begin{scope}   [every path/.style=pfeil]                            \path   (pap-1-3)                   --  (pap-2-3);                         \path   (pap-2-3)                   --  (pap-3-3);                         \path   (pap-3-3)                   --  (pap-4-3);                         \path   (pap-4-3)                   --  (pap-5-3);                         \path   (pap-4-3.east)      -|  (pap-5-5.north);                         \path   (pap-5-5.south)     --  ([yshift=-1.5mm]pap-5-5.south)  --  ([shift={(1.5mm,-1.5mm)}]pap-5-5.south east)    |-  ([yshift=-1.5mm]pap-2-3.south);                         \path   (pap-5-3)                   --  (pap-6-3);                         \path   (pap-6-3.west)      -|  (pap-7-2.north);                         \path   (pap-6-3.east)      -|  (pap-7-4.north);                         \path   (pap-7-2.south)     |-  (pap-8-3.west);                         \path   (pap-7-4.south)     |-  (pap-8-3.east);                         \path   (pap-8-3)                   --  (pap-9-3);                         \path   (pap-9-3.east)      --  ([xshift=1.5mm]pap-9-3.east)    |-  ([yshift=-1.5mm]pap-12-3.south);                         \path   (pap-9-3)                   --  (pap-10-3);                         \path   (pap-10-3)              --  (pap-11-3);                         \path   (pap-11-3)              --  (pap-12-3);                         \path   (pap-12-3)              --  (pap-13-3);                         \path   (pap-13-3.west)     -|  (pap-14-2.north);                         \path   (pap-13-3.east)     -|  (pap-14-4.north);                         \path   (pap-14-2.south)    |-  (pap-15-3.west);                         \path   (pap-14-4.south)    |-  (pap-15-3.east);                         \path   (pap-15-3.south)    --  ([yshift=-1.5mm]pap-15-3.south) -|  ([shift={(-1.5mm,-1.5mm)}]pap-14-2.south west)  |-  ([yshift=-1.5mm]pap-2-3.south);                 \end{scope}                      \begin{scope}   [every path/.style=linie]                     \path   (pap-3-1)   --  (pap-3-3);                     \path   (pap-4-1)   --  (pap-4-3);                     \path   (pap-9-1)   --  (pap-9-3);                 \end{scope}                  \end{tikzpicture}          \end{document}      I'm sorry but when I paste the code it never looks the way how I organized it before. It should work anyway.


title: Scaling Tikz picture without overlapping text

text: I have a simular issue to the question asked in : TikZ picture overlaps with text I have tried the solution provided by Jake. This makes that my picture fails to resize (scale) as i intend. Whether i give `Set scale=0.4` or `Set scale=0.8` The size of the picture remains the same This is the code i use:               \begin{figure}[ht!]     \centering     \begin{tikzpicture}[Set scale=0.4, every node/.append style={transform shape},]     % STYLES     \tikzstyle{every node}=[rectangle,rounded corners, minimum width=100pt,         align=center,node distance=3cm,fill=black!10,inner sep=5pt,text width=3cm,minimum height=1.75cm,>=stealth,text badly centered]     % Draw forces     \node [force, above of=rivalry] (top) {Firm strategy, structure and rivalry};     \node [force, left=1cm of rivalry] (left) {Factor conditions};     \node [force, right=1cm of rivalry] (right) {Demand Conditions};     \node [force, below of=rivalry] (bottom) {Related and Supporting industries};     %%%%%%%%%%%%%%%%     % Draw the links between forces     \path[<->,thick]      (left) edge (right)     (left) edge (top)     (left) edge (bottom)     (top) edge (right)     (bottom) edge (right);     \path[<->,thick]      (bottom) edge (top);     \end{tikzpicture}     \caption{Porter's Diamond source:~\cite{Porter:1980}}%     \label{fig:diamond}      \end{figure}      ![enter image description here](http://i.stack.imgur.com/p8Ocf.png)


title: How to display labels on points of a tikz plot

text: I'm creating a `\begin{tikzpicture}` - unclear if I'm working with tike or pgf or whatever honestly, but I have my data displaying perfectly using `\addplot[my options] coordinates { .. my data here }`. My problem is that for each point of data, I have a label (unique for each data point) that I want to display. How do I do this? So, in this following example, for these 3 points I want them to show the label that is indicated in the comment there.               \addplot[color=black,solid,thick,mark=*, mark options={fill=white}] coordinates {              % /32(h)              (2211, 1110)              % x1              (6164, 4168)              % x1-PPL18              (11610, 36335)             };


title: A problem about code compiler Sublime text

text: I am beginning to use the LaTeX to write my homework, I chose the Sublime to compile the file. However, I found it is difficult to write code because it hasn't the hint fuction. I search the Plug-in `SublimeCodeIntel` and `BracketHighlighter`, but it failed.               Package Control: Error downloading package. Connection refused (errno 12029) during HTTP          write phase of downloading            https://github.com/SublimeCodeIntel/SublimeCodeIntel/archive/v2.0.6+st3.zip.      Can someone help me?


title: Semicolon in set-builder notation

text: What is the best way to type ";" in the set-builder notation? I think `\\{\, x \in X \mid P(x) \,\\}` is a common way to type the set- builder notation. Someone use ":" instead of "|". Anyway, these symbols frequently used in mathematics and I feel uncomfortable when I see the ones similar to the followings (`\mid` and `\lvert` or `\colon` and `:` are overlapping). > SL(V) = { L ∈ GL(V) | |L| = 1 } = { L : V → V : |L| = 1 } A possible typesetting might be `\\{\, x \in X \,;\, P(x) \,\\}`. I'd like to ask, however, if there is a good practice like `\mid` for this. If there is another, what differs from the one that I showed? Thank you. **Edit for clarification** The ones use "|" or ":" are just examples to explain why I dislike it. _What I want to know_ is whether there is a better way to type ";" in this context or not.


title: How to use itemize in Table environment

text: I want to create a table like the picture below, and i wish to itemize the lamba_1 > lamba_2 > 0 using 'item style', which is the cell of each categories. Can someone help me? ![enter image description here](http://i.stack.imgur.com/qkRD2.png)


title: Genogram with LaTeX

text: > **Possible Duplicate:**   >  Genogram or family tree with PGF/TikZ I want to draw a genogram with LaTeX. I tried to do this with tikz, but since you need to model at least 3 different relations between people (Children, Siblings, Couples), a standard tree model doesn't seem to fit. Is there an easy way (maybe a template) to draw a genogram? If not, what would be the approach to build an own sub-package or something? The main problem being the dynamic positioning of elements (depending on the amount of branching) and the previously mentioned three relations. **Edit:** I edited the problem, so it will be more clear of what I'm asking exactly: Given is the following tree in tikz / usetikzlibrary{trees}: ![family tree](http://i.stack.imgur.com/nHJA0.png) which is created with:               \newcommand{\per}[1]{\parbox{2.5cm}{#1}}          \tikzstyle{female} = [rectangle, draw, fill=red!20, rounded corners, minimum height=3em]     \tikzstyle{male} = [rectangle, draw, fill=blue!20, minimum height=3em]     \tikzstyle{neutral} = [rectangle, draw, fill=green!20, minimum height=3em]           \begin{tikzpicture}[level distance=4cm]         \node[neutral] {\per{Child}}         [edge from parent fork right,grow=right]             child {                      node[female] {\per{Mother}}                      child {                     node[female] {\per{Mother's mother}}                 }                 child {                     node[male] {\per{Mother's father}}                 }                        }             child {                 node[male] {\per{Father}}             };     \end{tikzpicture}      **Now I have two problems:**   1. I want to add a Sibling to the Child and the Mother for example.   2. I want to add a Father's mother and Father's father resp. How would I do that?


title: Setting up paragraphing of subsections using code from memman.pdf results in mysterious compilation error

text: I was trying to emulate the style of the long table of contents in the memoir manual. Specifically, the effect I want to achieve is to have all subsections names and page numbers in the same paragraph, eliminating the dots. Refer to the image below, which is a screenshot from the memoir manual. ![An example of the effect I want to achieve, paragraphing of subsections](http://i.stack.imgur.com/E1g4d.png) Page 171 of the memoir manual includes code to achieve this effect. However, when I try to compile myself, there is always a mysterious error message, even though hitting enter every time this error occurs will still produce a correct document:               ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      Here is a minimal example that illustrates this:               \documentclass{memoir}     \usepackage{kantlipsum}     \usepackage[bookmarks]{hyperref}          \makeatletter     \newcommand*{\setupparasubsecs}{%       \let\oldnumberline\numberline       \renewcommand{\l@subsection}[2]{%           \def\numberline####1{\textit{####1}~}%           \leftskip=\cftsubsectionindent           \rightskip=\@tocrmarg           \parfillskip=\fill           \ifhmode ,\ \else\noindent\fi           \ignorespaces           {\cftsubsectionfont ##1}~{\cftsubsectionpagefont##2}%            \let\numberline\oldnumberline\ignorespaces       }     }     \AtEndDocument{\addtocontents{toc}{\par}}     \makeatother          \begin{document}     \maxtocdepth{subsection}     \setupparasubsecs     \tableofcontents     \chapter{Research}     \kant[1-3]     \section{Survey}     \kant[1-3]     \subsection{Methodology}     \kant[1-3]     \subsection{Hypothesis}     \kant[1-3]     \subsection{Results}     \kant[1-3]     \chapter{Discussions}     \section{Survey}     \subsection{Implications \& Consequences}     \kant[1-3]     \subsection{Flaws \& Limitations}     \kant[1-3]     \chapter{Conclusions}     \kant[1-3]     \end{document}      I suspect it could be a problem of not ending a paragraph when typesetting the next chapter heading. Meanwhile, there is also some spacing problems before the comma, which unfortunately isn't replicated in the above example. I am using the latest TeXLive 2012 distribution and compiling with LuaLaTeX, but the problem is also reproducible in pdfLaTeX. **EDIT:** I looked at memsty.sty and found the actual code contains:               \newcommand*{\setupparasubsecs}{%       \let\oldnumberline\numberline       \renewcommand{\l@subsection}[2]{         \ifnum\c@tocdepth > 1\relax           \def\numberline####1{\textit{####1}~}%                [snip]                {\cftsubsectionfont ##1}~{\cftsubsectionpagefont##2}%            \let\numberline\oldnumberline\ignorespaces         \fi}}          \AtEndDocument{\addtocontents{toc}{\par}}%%% OK      It differs from the code in memman.pdf by an additional `\ifnum`. Apparently in a later revision Peter Wilson decides to add this but it is not reflected in the manual itself. However the `\ifnum` does not seem to eliminate the error, or cause some visual changes to the document though. **EDIT 2** : I tried to compile the memoir manual and it didn't have this error. I guess I probably left out something in my code.


title: Periodic word count in margin

text: I need to have a continuous word count for an assignment. This is either in the form of a note in the margin or one parenthesised in-text every 100 words or so. For instance,               ----- TEXT ------|- MARGIN -     blahblahblahblah | 100 [100th word appears on this line]      Any ideas on how to do so?


title: How do I go about typesetting a Genkou Youshi page?

text: I wanted to create a simple sort of template, for printing and then using by hand. The one I want to create is called **Genkō yōshi** (原稿用紙, "manuscript paper"), which is nothing more than those squares in vertical position for both writing and practicing Japanese. This is what I want to do (A4 page): ![enter image description here](http://i.stack.imgur.com/CwRSA.png) **Note: they must be exact squares.** The irregular border on the top-right corner should not be there I think. I've thought about using Tikz, but I have no idea of how to approach this... I've searched this site for hints on how to create notebook templates and from there I would've tweaked but found nothing. I've searched some sort of starting point on Texample.net too, but nothing that I could make use of. I wish I could provide a MWE but here the point is not that I can't make something work, but rather that I have no idea what that something could be.


title: pgfmath expression containing a \newtoks defined via a \def

text: This must be another of those expansion related issues as I don't know why the following               \def\MaxValueOfTok{8}%     \newtoks{\SomeTokDefinedViaDef}     \SomeTokDefinedViaDef={\MaxValueOfTok}          \pgfmathsetmacro{\Difference}{10-\the\SomeTokDefinedViaDef}%      fails with > Package PGF Math Error: Unknown operator `8' or`8@' (in '10-8'). If possible, would prefer a solution that requires only changing the `\pgfmathsetmacro` computation, and not require any changes to how the token is defined. Alternatively, adjusting how the `\def` is set up would work as well. Un-commenting the last two lines in the MWE will reproduce the problem. ## Code:               \documentclass{article}     \usepackage{tikz}% Easy way to get pgfmath          \def\MaxValueOfTok{8}%          \newtoks{\SomeTokDefinedDirectly}     \newtoks{\SomeTokDefinedViaDef}          \SomeTokDefinedDirectly={7}     \SomeTokDefinedViaDef={\MaxValueOfTok}          \begin{document}     \pgfmathsetmacro{\Difference}{10-5}%     Differerence is \Difference (numerical).          \pgfmathsetmacro{\Difference}{10-\MaxValueOfTok}%     Differerence is \Difference (using def).          \pgfmathsetmacro{\Difference}{10-\the\SomeTokDefinedDirectly}%     Differerence is \Difference (using SomeTokDefinedDirectly).          %\pgfmathsetmacro{\Difference}{10-\the\SomeTokDefinedViaDef}%     %Differerence is \Difference (using SomeTokDefinedViaDef).     \end{document}


title: Problems with the header

text: Today I want to set a centered header. My trial               \documentclass[utf8]{ctexart}     \usepackage{fancyhdr}     \begin{document}      \pagestyle{fancy}      \chead{ 常州大学本科论文外文翻译 }      \cfoot{第\thepage 页，共\pages 页}      \section{introduction}       my name is 汤书桃      \newpage      \section{conclusion }      I like \latex very much      \end{document}      However, it doesn't work. Can someone help me?


title: What does "LuaTeX error cannot read stdin: Bad file descriptor." mean?

text: I'm trying to compile with LuaLaTeX for my first time but don't get results. The goal is to get `microtype` to work with the standard font for `scrreprt` (Latin Modern I think). Or maybe to check out Libertine for my future works. When compiling with LuaLaTeX on a Windows XP machine with MiKTeX 2.9 installed and fully updated, I get several errors which I can't understand or get rid of. The fonts for Libertine are installed manually. Computer or Latin Modern should work ootb as I used them before with XeLaTeX. What is happening here? The errors are:               lualatex> ! LuaTeX error cannot read stdin: Bad file descriptor.          lualatex> ! fontspec error: "font-not-found"          lualatex> ! luaotfload | cache : Could not write lookup cache     lualatex> ! luaotfload | cache : Could not write to cache      I thought, that LuaLaTeX is looking for fonts on the internet and not in my c:/windows/fonts folder. Is that wrong? Or still missing? Or how do I enable that?


title: Assign the same color to overlapping parts of the shadows of several objects

text: I am drawing a database icon that is made of two `cylinder` shapes using TikZ. When I add a shadow, the shadows of the two cylinders overlap, and the shadow becomes darker in the overlapping area. The somewhat-MWE below illustrates the problem. I have tried using transparency groups both within the definition of `\dbicon` and around the invocation of `\dbicon`. No luck. What am I doing wrong?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.geometric}     \usetikzlibrary{shadows}          \newcommand{\dbpart}[1]{         \node[drop shadow,draw, cylinder, shape aspect=1.5, inner sep=0.3333em,          rotate=90, minimum width=1cm, minimum height=0.45cm] (cyl) at (0,#1) {};     }     \newcommand{\dbicon}{         \begin{tikzpicture}           \dbpart{0cm}%           \dbpart{0.4cm}%         \end{tikzpicture}     }          \begin{document}     \begin{tikzpicture}       \node[inner sep=0pt] {           \dbicon       };     \end{tikzpicture}          \end{document}      ![result](http://i.stack.imgur.com/eCcof.png)


title: How to change default font to Rockwell?

text: Im using latex to automate some report generation. We use the font Rockwell as a default font. Im not used to latex and I found many different ways of changing the default font but many of them seemed very strange and none of it worked for me! So what is a simple way to change the font and can I include a font like Rockwell without any problems or do I need to import not that standard fonts in a special way?