title: songs package: how to store gtab definitions in an external file?

text: I'm using the Songs latex package. I'm currently defining the guitar fret diagrams of a chord for each song, but I'd like to define them in an external file to include them in each song (in order to not repeat myself). How can I do this? The diagrams and the command \gtab are explained here: http://songs.sourceforge.net/songsdoc/songs.html#sec6 but I couldn't find any useful info.


title: Thumb index in Book class (based on previous question)

text: I'm hoping to get some help from the experts: My question is related to this thread, but I was asked to post it as a new question: How to set a letter to the margin of the page and position it vertically according to alphabetical order? I have used the last example (This answer is summary of all answers ...) to add thumb indexes to my document. I'm using the book class and chapters. It worked except that I cannot get the thumb to appear on the chapter page. Page 2 etc of each chapter has the correct thumbs, but the starting page doesn't. Is there a way to add them to the first page as well? Many thanks, Bjorn               \documentclass[a4paper]{book} %     \usepackage[margin={2.5cm},a4paper]{geometry}           \usepackage{amsmath,amssymb,lineno,graphicx,textcomp,booktabs,url,setspace,color,soul,eurosym}     \usepackage{multirow,listings,setspace,microtype,gnuplottex,latexsym,keyval,ifthen,moreverb}          \usepackage{tikz}     \usetikzlibrary{calc,shapes,arrows,intersections}     \tikzset{>=latex}          \usepackage[indention=0.5cm,labelsep=colon,font={sf},labelfont={bf,sf}]{caption}     \usepackage[indention=0.5cm,font={sf},labelfont={bf,sf}]{subcaption}               \usepackage{fancyhdr}       \pagestyle{fancy}      \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \fancypagestyle{frontmatter}{%             \fancyhf{}           \fancyfoot[RO,LE]{\textsf{Page \thepage}}          \fancypagestyle{plain}{             \renewcommand{\headrulewidth}{0pt}             \fancyhead{}             \fancyfoot[RO,LE]{\textsf{Page \thepage}}         }      }     \fancypagestyle{mainmatter}{%             \fancyhf{}           \fancyhead[RO,LE]{\nouppercase{\small \textsf{\leftmark}}}         \fancyfoot[RO,LE]{\textsf{Page \thepage}}          \fancypagestyle{plain}{             \renewcommand{\headrulewidth}{0pt}             \fancyhead{}             \fancyfoot[RO,LE]{\textsf{Page \thepage}}         }     }     \setlength{\headheight}{15pt}               \newcounter{letternum}     \newcounter{lettersum}     \setcounter{lettersum}{14}     \newlength{\thumbtopmargin}     \setlength{\thumbtopmargin}{1cm}     \newlength{\thumbbottommargin}     \setlength{\thumbbottommargin}{3cm}     \newlength{\thumbheight}     \pgfmathsetlength{\thumbheight}{%     (\paperheight-\thumbtopmargin-\thumbbottommargin)/\value{lettersum}}          \newlength{\thumbwidth}     \setlength{\thumbwidth}{1.5cm}          \tikzset{        thumb/.style={        draw=blue,     %  fill=green,        text=blue,        minimum height=\thumbheight, %\thumbheight,        text width=\thumbwidth,        outer sep=0pt,        font=\sffamily\Huge,     }     }     \newcommand{\oddthumb}[1]{%           \begin{tikzpicture}[remember picture, overlay]             \node [thumb,text centered,anchor=north east,] at ($%                 (current page.north east)-%                 (0,\thumbtopmargin+\value{letternum}*\thumbheight)%             $) {#1};        \end{tikzpicture}     }     \newcommand{\eventhumb}[1]{%           \begin{tikzpicture}[remember picture, overlay]             \node [thumb,text centered,anchor=north west,] at ($%                 (current page.north west)-%                 (0,\thumbtopmargin+\value{letternum}*\thumbheight)%             $) {#1};        \end{tikzpicture}     }     % create a new command to set a new lettergroup     \newcommand{\lettergroup}[1]{%     \fancyhead[LO]{\oddthumb{#1}}%     \fancyhead[RE]{\eventhumb{#1}}%     % step the counter of the letters     \stepcounter{letternum}%     }               \usepackage[Bjarne]{fncychap}               %%%%%%%%%%%%%%%% BEGIN DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%     \begin{document}           \chapter{A title}      \lettergroup{\thechapter}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu vehicula ipsum, a dignissim tellus. Nam ac nisl consectetur, elementum lacus et, viverra erat. Ut eget quam id elit accumsan ullamcorper et et velit. Aliquam bibendum tellus nec libero sagittis, vestibulum blandit odio adipiscing. Morbi arcu massa, commodo in venenatis ut, bibendum non mi. Nam mollis urna eu pharetra porta. Suspendisse a cursus risus. Donec sit amet dignissim ipsum. Fusce egestas, nisi tincidunt vestibulum convallis, mi urna suscipit velit, a placerat dui sapien aliquet nunc. Donec commodo sed turpis viverra interdum. Aenean sed scelerisque orci. Quisque iaculis neque non laoreet facilisis. Donec scelerisque sit amet lacus non laoreet. Integer volutpat nisl quis nisl elementum, vel malesuada dui laoreet. Suspendisse facilisis rutrum fringilla.          Sed quis quam consequat, venenatis felis nec, aliquet justo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse posuere neque quam, et eleifend nulla scelerisque nec. Etiam magna est, eleifend et consequat vitae, ornare at augue. Nulla ullamcorper arcu id mauris scelerisque, eget lacinia felis dictum. Curabitur ullamcorper dolor id tellus tempus mattis. In scelerisque ipsum porta leo fermentum, id tristique leo sollicitudin. Donec suscipit vehicula enim, at dictum nulla rutrum sit amet. Ut pretium metus ac orci semper cursus. Nam in dolor sapien. Sed scelerisque felis augue, non mollis libero fringilla id. Curabitur placerat lorem vel libero blandit, non interdum orci consectetur. Sed sagittis eleifend neque sed mollis. Nulla sem sapien, sodales eu bibendum non, laoreet ut enim. Sed non nunc et ligula tristique volutpat. Proin auctor adipiscing ante.          Vivamus bibendum lobortis purus, sit amet sodales nulla. Suspendisse potenti. Sed laoreet sollicitudin nisl at sodales. Nulla at condimentum augue. Donec sed diam commodo metus aliquet rhoncus in ac sapien. Nullam sapien dolor, aliquet vitae sem et, vulputate gravida turpis. Fusce mollis sapien quis gravida ullamcorper. Ut bibendum fermentum mauris quis consequat. Aenean volutpat, erat eu vulputate rutrum, massa neque semper nibh, ut venenatis est arcu vitae purus.          Aliquam vehicula mollis faucibus. Maecenas sed mi massa. Cras consectetur leo malesuada, egestas erat ut, eleifend mauris. Nulla quis sem eget ipsum tristique fermentum. Vivamus non ante quis eros vulputate condimentum. Aenean congue, purus sit amet auctor suscipit, turpis nibh dapibus lectus, eu vehicula felis nisi in felis. Nunc tempus lectus a felis suscipit tristique. Nulla consectetur auctor magna. Proin in nisi quis elit semper elementum. Phasellus lobortis est vitae sem dictum, sit amet consequat diam imperdiet. Curabitur quis lobortis nisl. Aliquam erat volutpat. Praesent vestibulum scelerisque placerat. Maecenas orci enim, sollicitudin ut arcu quis, dapibus facilisis dui.          Nullam quis nibh vel velit tempus vulputate. Nam tincidunt in dui a elementum. Quisque bibendum sapien id felis porttitor, sed aliquet odio ullamcorper. Nulla dapibus sollicitudin nisi in bibendum. Vestibulum ultrices sed ligula et condimentum. Nunc vitae tristique ante. In hac habitasse platea dictumst. Phasellus ultrices venenatis condimentum. Integer scelerisque aliquam risus. In lacinia nisi in ligula euismod pretium at sit amet enim. Nunc lacinia lorem libero, non tempor quam ultricies quis. Integer magna leo, tincidunt non sapien et, consequat commodo urna. Vivamus vel tortor pulvinar, cursus lacus vel, volutpat diam. Nulla eu enim vitae leo condimentum condimentum.          Etiam gravida purus eget porta bibendum. Vestibulum eget nisi ultricies, consectetur elit ac, varius felis. Vivamus ac enim eget nibh tristique eleifend. Etiam scelerisque justo non erat pellentesque lacinia. Ut sit amet lorem sed metus dapibus imperdiet a vitae purus. Nunc dictum enim nec diam dapibus convallis. Nulla odio lacus, feugiat sed magna et, aliquet porta odio. Phasellus faucibus placerat sagittis. Ut ac pretium justo. Donec a facilisis nibh, ac auctor diam. Praesent congue mi velit, sit amet dapibus felis porta ut. Vestibulum eget est et felis vestibulum convallis et id est. Cras sodales nisi at pellentesque adipiscing. Nulla luctus metus accumsan ipsum consequat ornare. Duis cursus feugiat sollicitudin.          Integer felis sem, imperdiet id dolor et, fermentum fermentum felis. Mauris porttitor lorem vitae nulla varius accumsan sit amet at nibh. Sed nunc risus, ultricies in lacus in, tristique volutpat lorem. Nunc convallis erat nec velit eleifend bibendum. Curabitur a iaculis nunc. Phasellus viverra rutrum sapien ut laoreet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque porta congue sagittis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sodales ullamcorper lacinia. Cras accumsan dapibus feugiat. In laoreet placerat scelerisque. Vivamus vel euismod sapien. Vestibulum dignissim pellentesque est. Vivamus vel congue nisl. Proin vehicula augue ante, in porta libero dapibus sit amet.          Integer quis elit vitae nibh accumsan porta in blandit mi. Suspendisse sapien mi, hendrerit et justo eget, bibendum tristique dui. Aenean in vestibulum sem. Cras ut nibh non est sagittis accumsan a nec diam. Quisque sagittis nisi at auctor porttitor. Morbi suscipit sit amet mi vel auctor. Vivamus ante elit, vestibulum non dui et, congue consectetur dolor. Aliquam laoreet metus eu arcu facilisis, vitae faucibus velit aliquet. In ut nulla sit amet nisl pretium euismod congue sed justo. Vivamus purus sapien, egestas sit amet libero ac, congue auctor metus. Etiam ultrices vel elit in lacinia. Nunc tempor sem ut arcu dignissim, sed tempor lacus condimentum.          Pellentesque blandit mattis ipsum, at hendrerit tortor luctus ac. In ante ligula, commodo sed adipiscing non, accumsan sed ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Quisque pretium nunc quis dui commodo, at congue eros pretium. Quisque at ultricies eros. Morbi sed molestie risus. Morbi molestie aliquet sem, sed convallis ipsum commodo id. Proin ultricies pretium eros et eleifend. Duis sed diam vitae tellus mollis vehicula eu non diam.          Nulla rutrum aliquet ante, sagittis tincidunt arcu. Donec viverra varius porta. Nunc condimentum lorem non molestie commodo. Sed sollicitudin at mauris id cursus. Duis tincidunt, sapien eu laoreet volutpat, urna dui pharetra lacus, at euismod leo sapien a neque. Integer non odio augue. Ut orci eros, faucibus sed pharetra id, consectetur eget sapien. Sed vitae eros mi.               \newpage{\thispagestyle{empty}\cleardoublepage}     \chapter{Another title}      \lettergroup{\thechapter}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu vehicula ipsum, a dignissim tellus. Nam ac nisl consectetur, elementum lacus et, viverra erat. Ut eget quam id elit accumsan ullamcorper et et velit. Aliquam bibendum tellus nec libero sagittis, vestibulum blandit odio adipiscing. Morbi arcu massa, commodo in venenatis ut, bibendum non mi. Nam mollis urna eu pharetra porta. Suspendisse a cursus risus. Donec sit amet dignissim ipsum. Fusce egestas, nisi tincidunt vestibulum convallis, mi urna suscipit velit, a placerat dui sapien aliquet nunc. Donec commodo sed turpis viverra interdum. Aenean sed scelerisque orci. Quisque iaculis neque non laoreet facilisis. Donec scelerisque sit amet lacus non laoreet. Integer volutpat nisl quis nisl elementum, vel malesuada dui laoreet. Suspendisse facilisis rutrum fringilla.          Sed quis quam consequat, venenatis felis nec, aliquet justo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse posuere neque quam, et eleifend nulla scelerisque nec. Etiam magna est, eleifend et consequat vitae, ornare at augue. Nulla ullamcorper arcu id mauris scelerisque, eget lacinia felis dictum. Curabitur ullamcorper dolor id tellus tempus mattis. In scelerisque ipsum porta leo fermentum, id tristique leo sollicitudin. Donec suscipit vehicula enim, at dictum nulla rutrum sit amet. Ut pretium metus ac orci semper cursus. Nam in dolor sapien. Sed scelerisque felis augue, non mollis libero fringilla id. Curabitur placerat lorem vel libero blandit, non interdum orci consectetur. Sed sagittis eleifend neque sed mollis. Nulla sem sapien, sodales eu bibendum non, laoreet ut enim. Sed non nunc et ligula tristique volutpat. Proin auctor adipiscing ante.          Vivamus bibendum lobortis purus, sit amet sodales nulla. Suspendisse potenti. Sed laoreet sollicitudin nisl at sodales. Nulla at condimentum augue. Donec sed diam commodo metus aliquet rhoncus in ac sapien. Nullam sapien dolor, aliquet vitae sem et, vulputate gravida turpis. Fusce mollis sapien quis gravida ullamcorper. Ut bibendum fermentum mauris quis consequat. Aenean volutpat, erat eu vulputate rutrum, massa neque semper nibh, ut venenatis est arcu vitae purus.          Aliquam vehicula mollis faucibus. Maecenas sed mi massa. Cras consectetur leo malesuada, egestas erat ut, eleifend mauris. Nulla quis sem eget ipsum tristique fermentum. Vivamus non ante quis eros vulputate condimentum. Aenean congue, purus sit amet auctor suscipit, turpis nibh dapibus lectus, eu vehicula felis nisi in felis. Nunc tempus lectus a felis suscipit tristique. Nulla consectetur auctor magna. Proin in nisi quis elit semper elementum. Phasellus lobortis est vitae sem dictum, sit amet consequat diam imperdiet. Curabitur quis lobortis nisl. Aliquam erat volutpat. Praesent vestibulum scelerisque placerat. Maecenas orci enim, sollicitudin ut arcu quis, dapibus facilisis dui.          Nullam quis nibh vel velit tempus vulputate. Nam tincidunt in dui a elementum. Quisque bibendum sapien id felis porttitor, sed aliquet odio ullamcorper. Nulla dapibus sollicitudin nisi in bibendum. Vestibulum ultrices sed ligula et condimentum. Nunc vitae tristique ante. In hac habitasse platea dictumst. Phasellus ultrices venenatis condimentum. Integer scelerisque aliquam risus. In lacinia nisi in ligula euismod pretium at sit amet enim. Nunc lacinia lorem libero, non tempor quam ultricies quis. Integer magna leo, tincidunt non sapien et, consequat commodo urna. Vivamus vel tortor pulvinar, cursus lacus vel, volutpat diam. Nulla eu enim vitae leo condimentum condimentum.          Etiam gravida purus eget porta bibendum. Vestibulum eget nisi ultricies, consectetur elit ac, varius felis. Vivamus ac enim eget nibh tristique eleifend. Etiam scelerisque justo non erat pellentesque lacinia. Ut sit amet lorem sed metus dapibus imperdiet a vitae purus. Nunc dictum enim nec diam dapibus convallis. Nulla odio lacus, feugiat sed magna et, aliquet porta odio. Phasellus faucibus placerat sagittis. Ut ac pretium justo. Donec a facilisis nibh, ac auctor diam. Praesent congue mi velit, sit amet dapibus felis porta ut. Vestibulum eget est et felis vestibulum convallis et id est. Cras sodales nisi at pellentesque adipiscing. Nulla luctus metus accumsan ipsum consequat ornare. Duis cursus feugiat sollicitudin.          Integer felis sem, imperdiet id dolor et, fermentum fermentum felis. Mauris porttitor lorem vitae nulla varius accumsan sit amet at nibh. Sed nunc risus, ultricies in lacus in, tristique volutpat lorem. Nunc convallis erat nec velit eleifend bibendum. Curabitur a iaculis nunc. Phasellus viverra rutrum sapien ut laoreet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque porta congue sagittis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sodales ullamcorper lacinia. Cras accumsan dapibus feugiat. In laoreet placerat scelerisque. Vivamus vel euismod sapien. Vestibulum dignissim pellentesque est. Vivamus vel congue nisl. Proin vehicula augue ante, in porta libero dapibus sit amet.          Integer quis elit vitae nibh accumsan porta in blandit mi. Suspendisse sapien mi, hendrerit et justo eget, bibendum tristique dui. Aenean in vestibulum sem. Cras ut nibh non est sagittis accumsan a nec diam. Quisque sagittis nisi at auctor porttitor. Morbi suscipit sit amet mi vel auctor. Vivamus ante elit, vestibulum non dui et, congue consectetur dolor. Aliquam laoreet metus eu arcu facilisis, vitae faucibus velit aliquet. In ut nulla sit amet nisl pretium euismod congue sed justo. Vivamus purus sapien, egestas sit amet libero ac, congue auctor metus. Etiam ultrices vel elit in lacinia. Nunc tempor sem ut arcu dignissim, sed tempor lacus condimentum.          Pellentesque blandit mattis ipsum, at hendrerit tortor luctus ac. In ante ligula, commodo sed adipiscing non, accumsan sed ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Quisque pretium nunc quis dui commodo, at congue eros pretium. Quisque at ultricies eros. Morbi sed molestie risus. Morbi molestie aliquet sem, sed convallis ipsum commodo id. Proin ultricies pretium eros et eleifend. Duis sed diam vitae tellus mollis vehicula eu non diam.          Nulla rutrum aliquet ante, sagittis tincidunt arcu. Donec viverra varius porta. Nunc condimentum lorem non molestie commodo. Sed sollicitudin at mauris id cursus. Duis tincidunt, sapien eu laoreet volutpat, urna dui pharetra lacus, at euismod leo sapien a neque. Integer non odio augue. Ut orci eros, faucibus sed pharetra id, consectetur eget sapien. Sed vitae eros mi.                    \end{document}


title: Fitting text into the table's borders

text: I am trying to have this table done neat and nice, but I cannot manage to make the variable names fit into the lenght of the table itself. Here is the code:               \documentclass[12pt]{article}     \usepackage{booktabs}     \usepackage{rotating}     \usepackage{adjustbox}     \usepackage{graphicx}     \usepackage{tabularx}     \begin{document}          % -------Begin LaTeX code -------%          {     %\begin{adjustbox}          \begin{table}[htbp]\centering      \caption{GMM Estimates of First-Differenced Investment Equations     \label{GMM Estimates of First-Differenced Investment Equations}}               \begin{adjustbox}{width=1\textwidth}          \begin{tabular}{p{2cm} p{1cm} p{1cm}p{2cm}p{2cm}p{1cm}p{1cm}p{1cm}}\hline\hline      \multicolumn{1}{c}     {\textbf{Variable}}      & {\textbf{Full Sample (1)}}  & \textbf{{Rated Sample (2)}} & {\textbf{Unrated Sample (3)}} & {\textbf{Variable}}      & {\textbf{Full Sample (4)}}  & \textbf{{Rated Sample (5)}} & {\textbf{Unrated Sample (6)}}\\ \hline              &   &   &   &   &   &   &\\          \hline     \multicolumn{1}{c}     {\textbf{Variable}}      & {\textbf{Full Sample (7)}}  & \textbf{{Rated Sample (8)}} & {\textbf{Unrated Sample (9)}} & {\textbf{Variable}}      & {\textbf{Full Sample (10)}}  & \textbf{{Rated Sample (11)}} & {\textbf{Unrated Sample(12)}} \\     \hline     &   &   &   &   &   &   &\\          \hline     \end{tabular}     \end{adjustbox}          \end{table}          }               %------- End LaTeX code -------%     %\end{adjustbox}     \end{document}      Could you please help me understand what is it that I am missing that I cannot make the text fit well? Thank you very much in advance for your time and help!


title: How to refer a particular item in enumthm

text: I tried to use LaTeX to write a definition. It looks good but is there another way to avoid hard-coded (d)-item in the last item?               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{euscript}     \usepackage{enumitem}     \usepackage{textcomp}     \newlist{enumthm}{enumerate}{1}     \setlist[enumthm]{label=(\alph*)}     \newcommand\restr[2]{{% we make the whole thing an ordinary symbol       \left.\kern-\nulldelimiterspace % automatically resize the bar with \right       #1 % the function       \vphantom{\big|} % pretend it's a little taller at normal size       \right|_{#2} % this is the delimiter       }}     \linespread{1.6}     \newtheorem{thm}{Theorem}[section]     \newtheorem{defn}[thm]{Definition}     \begin{document}     \begin{defn}     Let $X$ be a topological space. A \emph{presheaf} $\mathcal{F}$ (of Abelian groups) on $X$ consists an Abelian group $\mathcal{F}(U)$ for every open subset $U$ of $X$, and a group homomorphism (\emph{restriction map}) $\rho_{UV}:\mathcal{F}(U)\to\mathcal{F}(V)$ for every pair of open subsets $V\subseteq U$ which has the following properties:     \begin{enumthm}     \item $\mathcal{F}(\emptyset )=0$;     \item $\rho_{UU}=\operatorname{Id}$;     \item If we have three open subsets $W\subseteq V\subseteq U$, then $\rho_{UW}=\rho_{VW}\circ\rho_{UV}$.\\     A presheaf is said to be a \emph{sheaf} if in addition     \item (Uniqueness) Let $U$ be an open subset of $X$, $s\in\mathcal{F}$, $\{U_i\}_i$ a covering of $U$ by open subsets $U_i$. If $\restr{s}{U_i}=0$ for every $i$, then $s=0$.     \item (Glueing local sections) Let us keep the notation of (d). Let $s_i\in\mathcal{F}(U_i),i\in I$, be sections such that $\restr{s_i}{{U_i\cap U_j}}=\restr{s_j}{U_i\cap U_j}$. Then there exists a section $s\in \mathcal{F}(U)$ such that $\restr{s}{U_i}=s_i$ (this section $s$ is unique by condition (d)).     \end{enumthm}     \end{defn}     \end{document}


title: Automatically divide text between two tikz paths

text: I make a custom shape and I need to put a text inside it. But problem is that my text didn't fit the length of decorated path. So, I need a way to automatically divide text between two or three paths. So, this is my shape and lines inside it is a place where I want to put my text: ![enter image description here](http://i.stack.imgur.com/biJbu.jpg) I generate this shape with the following code:               \begin{tikzpicture}          % shape     \draw (0,0) ++ (45:3) arc (45:135:3);     \draw (0,0) ++ (45:5) arc (45:135:5);     \draw (45:3) -- (45:5);     \draw (135:3) -- (135:5);          %lines for text     \draw (0,0) ++ (50:3.5) arc (50:130:3.5);     \draw (0,0) ++ (50:4) arc (50:130:4);     \draw (0,0) ++ (50:4.5) arc (50:130:4.5);          \end{tikzpicture}      I plan to put text to this lines using the path decoration:               \path[       postaction={         decorate,         decoration={           text along path,           reverse path=true,           text={very long long text, which don't fit the shape boundaries}         }       }     ] (0,0) ++ (50:4.5) arc (50:130:4.5);      But if the text is long, it's don't fit the provided space. ![enter image description here](http://i.stack.imgur.com/t4o7j.jpg) So I have to find a way to calculate a provided space and then divide the text between the several paths. Any suggestions?


title: List spacing inside a table

text: Please take a look on the following example:               \documentclass[a4paper]{article}          \begin{document}     \begin{tabular}{ |p{ \textwidth}| }           \hline     \begin{enumerate}         \item Item in a list     \end{enumerate} \\          \hline     Item not in a list \\     \hline     \end{tabular}      \end{document}      The "Item in a list" has an extra spacing at top and bottom inside a table cell in comparison to "Item not in a list". How to reduce this top and bottom spacing?


title: figures not appearing from pdf

text: I've been drawing figures in inkscape, labeling with TeX syntax inside inkscape, saving as pdf, having inkscape build me a pdf_tex file and using TeXShop to write the TeX file which calls the figure as follows.               \documentclass[12pt]{article}     %\pagestyle{empty}     \usepackage{amsmath}          \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{alltt}     \usepackage{amscd}     \usepackage[mathscr]{eucal}     \usepackage{mathrsfs}     \usepackage[all]{xy}     \usepackage{verbatim}     \usepackage{moreverb}     \usepackage{graphicx, transparent, color}     \usepackage{media9}     \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}     \linespread{1}     \theoremstyle{plain}               \newtheorem{theorem}{Theorem}     \newtheorem{thm}{Theorem}[section]     \newtheorem*{rmk}{Remark}     \newenvironment{remark}[1][Remark.]{\begin{trivlist}     \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}     \newtheorem{cor}{Corollary}     \newtheorem{lemma}[thm]{Lemma}     \newtheorem{prop}[thm]{Proposition}     \theoremstyle{definition}     \newtheorem{definition}{Definition}     \newtheorem{eg}{Example}     \newtheorem{egs}{Examples}     \newtheorem{ex}{Exercise}     \newtheorem{prob}{Problem}          \begin{document}          \begin{figure}[h] \centering \def\svgwidth{250pt} \input{figure3o4.pdf_tex}       \caption{The map from $\widetilde {\mathcal P}$ to the suspension of 4 points.          Each labeled edge corresponds to the various heights for the corresponding apex         vertex.}     \label{pgraph}     \end{figure}          \begin{figure}[h] \centering \def\svgwidth{250pt} \input{7o10ii.pdf_tex}        \caption{The map from $\widetilde {\mathcal P}$ to the suspension           of 4 points.  Each labeled edge corresponds to the various heights for the           corresponding apex vertex.}     \label{pgraph}     \end{figure}               \end{document}      This has worked for me many times, but today I'm finding that the figures that I create have pieces missing from the graphics after I compile, but _only when I view the pdf in Preview, Safari, or TeXshop_. When I view in chrome or the viewer in TeXworks, the image appears totally fine. This is strange, I didn't think pdf's were so unstable. Has anyone experienced anything like this or might suggest what the problem is?


title: How would I take imported file and format it to account for spacing?

text: Basically what I'm trying to do is use something like               \input{details.txt}      which contains: > ____Here are some random details with stuff everywhere. This is to see if > latex will use this properly and format it. If not... Problems occur. Here > are some random details with stuff everywhere. This is to see if latex will > use this properly and format it. If not... Problems occur. Here are some > random details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. Here are some random > details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. Here are some random > details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. Here are some random > details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. > > ____Here are some random details with stuff everywhere. This is to see if > latex will use this properly and format it. If not... Problems occur. Here > are some random details with stuff everywhere. This is to see if latex will > use this properly and format it. If not... Problems occur. Here are some > random details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. Here are some random > details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. Here are some random > details with stuff everywhere. This is to see if latex will use this > properly and format it. If not... Problems occur. etc.. *underscores are actual spaces to in included. I'd like it to looking something like: ![Paragraphs](http://i.stack.imgur.com/vOgjt.png) I feel like this is a pretty trivial problem, but I can't seem to come up with an answer. Verbatim was the closest I came in regards to getting the spaces, but then I have a word wrap issue. Currently I'm working on an unrelated section, and the text is just inputted with the code at the top. Which isn't bad, but there's no tabs nor space between the paragraphs.


title: newenvironment with displaymath causes strange extra space/indent on following line

text: > **Possible Duplicate:**   >  Spacing issue for newenvironment wrapper of equation environment I have               \newenvironment{mymath}{\begin{displaymath}\begin{array}{l}}{\end{array}\end{displaymath}}      but when I write               \begin{mymath}      f(x) = 10     \end{mymath}     and some following text      there is an odd piece of horizontal space inserted before `and some following text` that is not there if I just write the begin and end commands for the environments out by hand.


title: How to automatically truncate the length of a line in vim-latex?

text: Is there a way of automatically beginning a new line after reaching a particular length of a line in order to make navigation through a document easier in vim-latex? Example (text from http://en.wikipedia.org/wiki/Giraffe): Instead of having this:               \documentclass[letter,12pt]{article}     \usepackage[pdftex]{graphicx}     \usepackage{sidecap}          \begin{document}     \begin{SCfigure}     \centering     \includegraphics[width=0.55\textwidth]{Giraffa_camelopardalis_angolensis}     \caption{The giraffe (\emph{Giraffa camelopardalis}) is an African even-toed ungulate mammal, the tallest of all land-living animal species. Males can be 4.8 to 5.5~metres tall and weigh up to 1,360~kilograms. The record-sized bull was 5.87~m tall and weighed approximately 2,000~kg. Females are generally slightly shorter and weigh less than the males do.}     \end{SCfigure}     \end{document}      Getting this while typing:               \documentclass[letter,12pt]{article}     \usepackage[pdftex]{graphicx}     \usepackage{sidecap}          \begin{document}     \begin{SCfigure}     \centering     \includegraphics[width=0.55\textwidth]{Giraffa_camelopardalis_angolensis}     \caption{The giraffe (\emph{Giraffa camelopardalis}) is an African even-toed     ungulate mammal, the tallest of all land-living animal species. Males can be     4.8 to 5.5~metres tall and weigh up to 1,360~kilograms. The record-sized bull     was 5.87~m tall and weighed approximately 2,000~kg. Females are generally     slightly shorter and weigh less than the males do.}     \end{SCfigure}     \end{document}


title: Vertically align text inside of a colorbox

text: I am quite new with TeX so I am not sure how to solve the following correctly and it would be more than great to get some hints. So I am trying to get a grey colorbox which spans over the whole page with some centered text inside of it but the colorbox should be bigger in height than text that it is containing, but the text should be vertically aligned in the box. So here's what I've got so far (image with `[showframe]` option): ![enter image description here](http://i.stack.imgur.com/BSLvt.png)               \documentclass[a4paper,11pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage{times}     \usepackage{color}          \definecolor{lightgray}{gray}{0.75}          % greybox command definition     \newcommand\greybox[1]{%       \vskip\baselineskip%       \par\noindent\colorbox{lightgray}{%         \begin{minipage}{\textwidth}\large\centering\textbf{#1}\end{minipage}%       }%       \vskip\baselineskip%     }          \begin{document}       \greybox{Some Text here}     \end{document}


title: How to right-align a title (without creating a complete custom title page)?

text: I suppose this is a simple matter, but I'm still finding my way around where to put things in LaTeX. I would like to right-align (i.e. flush to right) the contents of an article's title page. By default it's centered. My preamble (leaving out other stuff) is basic:               \documentclass[12pt,titlepage]{article}     \title{My Title}     \author{This is me}     \date{Aug 2010}      I read in the LaTeX wikibook (wonderful resource) that one way to do that is to create a custom title within               \begin{titlepage} ...      \begin{flushright}     % title elements here     \end{flushright}     \end{titlepage}.       But this is a heavy-handed solution and I hope there is a simpler way. Thank you.


title: Why does \author respond differently to \hfill than do \date and \title in \maketitle?

text: This question asks how to align titlepage elements to the right. I was trying out a possible an answer to it when to my surprise, my solution _almost_ worked. (I was expecting success or abject failure.) The code               document\documentclass[notitlepage]{article}     \title{\hfill{}Title}     \author{\hfill{}Author}     \date{\hfill{}Date}          \begin{document}         \maketitle     \end{document}      sets the title and date flush right as I'd hoped. However, 'Author' is set centred, as though I'd not put in the `\hfill` at all. This surprised me---I'd have expected my idea to work for all three fields of the title page or none. Why does `\author` behave differently in conjunction with `\hfill` in `\maketitle` than do `\title` and `\date`?


title: Random asterisk when using BibTeX and res.cls

text: I am using `res.cls` and commented out `\nofiles`. However when I use BibTeX for my publication list, I get this random * above the references. How do I remove this *?               \documentclass{res}      \renewcommand{\refname}{}     \begin{document}     \begin{resume}     \section{\centerline{ \underline{SELECTED PUBLICATIONS}}}     \nocite{*}     \bibliography{myPublications}     \bibliographystyle{aiaa}      \end{resume}      \end{document}


title: Draw arrow not to node center but to edge of circle on this node?

text: This example:               \documentclass{article}          \usepackage{tikz}          \begin{document}       \begin{tikzpicture}%         \draw[help lines] (0,0) grid (1,1);              \node [draw, circle] at (0,0) {};         \node [draw, circle] at (1,1) {};              \draw[->] (0,0) -- (1,1);       \end{tikzpicture}     \end{document}      plots two circles. But the arrow starts **in** the one circle and ends **in** the other circle. What I need is: starting and ending **on the radius** of the two circles. How is this possible? Best if it is done automatically/dynmically depending on the size of the circles.


title: Bibliography and headers with titleps and biblatex

text: I am using `titleps` to get custom headers, and `biblatex` for the bibliography. The headers look all right except when it comes to the bibliography, where a "REFERENCES" label appears in the header and footer. Here is a MWE:               \documentclass{article}     \usepackage{lipsum}     \usepackage{titleps}     \newpagestyle{fancy}{      \headrule     \sethead[\normalsize \thepage][][]     {Author}{Document}{\normalsize \thepage}     \setfoot[][][]{}{}{}     }     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{A2013,     author = {Author, A},     title = {A nice paper},     journal = {Journal},     year = {2013},     volume = {1},     pages = {1--2},     }     \end{filecontents}          \usepackage[style=numeric,backend=biber]{biblatex}     \addbibresource{\jobname.bib}          \begin{document}     \pagestyle{fancy}          \lipsum[1]     \cite{A2013}        \clearpage          \printbibliography          \end{document}      And here is the output: ![enter image description here](http://i.stack.imgur.com/JSwo5.png) The left page is ok but not the right page. Where does the "REFERENCES" label come from? Note that this does not happen if I use `bibtex` instead of `biblatex` for the bibliography, or `fancyhdr` instead of `titleps` to customize the headers. For instance, replacing lines 3-9 in the example with               \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{Document}     \fancyhead[L]{Author}     \fancyhead[R]{\normalsize \thepage}     \fancyfoot{}     \fancyfoot[C]{}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}      gives the expected output: ![enter image description here](http://i.stack.imgur.com/oN7El.png) How can I obtain the same result with `titleps` and `biblatex`?


title: Adjust vspace between multiple align environments

text: I am using some independant align environments directly one after the other one and it produces some nasty space between them. Is there any workaround to shrink the size of the space a little bit? **Example:** ![Example](http://i.stack.imgur.com/AsTZa.png) My code looks like this:               \newcounter{eqn}[section]     \newcommand{\eqn}{\refstepcounter{eqn}\tag{\thesection.\arabic{eqn}}}     \newcommand{\xeqn}[1]{\begin{align}\eqn #1\end{align}}     ...     \xeqn{foo}     \xeqn{bar}     \xeqn{random}


title: Multilingual bibliography using XeTeX, biblatex and polyglossia

text: I am trying to write text in Russian language with some citations in Russian, English and German references using XeLaTeX + polyglossia + biblatex + biber. As a biblatex style I use biblatex-gost which processes multilingual bibliographies fine with usual LaTeX + babel + bibtex, but the results in XeLaTeX are not so good - all fields are not localized. My .tex file:               \documentclass[11pt, a4paper]{article}          \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{csquotes}          \setmainfont{Palatino Linotype}     \setsansfont{Arial}     \setmonofont{Courier New}          \sloppy     \hyphenpenalty=10000          \usepackage{polyglossia}     \setdefaultlanguage{russian}     \setotherlanguages{english, german}          \usepackage[%                 backend=biber,                 bibstyle=gost-numeric,                 language=auto,                 babel=other,                 sorting=ntvy,                 doi=false,                 eprint=false,                 isbn=false,                 dashed=false                     ]{biblatex}     \addbibresource{../bib/thesis.bib}          \begin{document}     Some text \cite{Gonzalez2002,Gonzalez2005ru}.          \printbibliography     \end{document}      thesis.bib file:               @BOOK{Gonzalez2002,       title = {Digital Image Processing},       publisher = {Prentice Hall},       year = {2002},       author = {R. C. Gonzalez and R. E. Woods},       pages = {793},       edition = {2},       language = {english},       hyphenation = {english}     }          @BOOK{Gonzalez2005ru,       title = {Цифровая обработка изображений : Пер. с англ},       publisher = {М.: Техносфера},       year = {2005},       author = {Р. Гонсалес and Р. Вудс},       pages = {1072},       language = {russian}     }      The result pdf looks like this: ![](http://i.stack.imgur.com/tTahJ.png) but should: ![](http://i.stack.imgur.com/oiwNT.png) I've read that biblatex cannot work with polyglossia (at least it was so some time ago), but I hope there is a possible solution and would be very grateful if anyone could help me. **UPD:** As a TeX-system I use TeXLive 2012.


title: Improving code to draw several cycles trigonometric

text: How can I improve this code to generate three cycles varying the height of the trigonometric tangent? Note that I managed to correctly draw the red line, but could not improve the green line. What I want is a reduction in their angle and straight. The green line does not have the correct height.               \begin{tikzpicture}[>=latex,scale=2]     \foreach \radius in {1,2,3}{         \pgfmathsetmacro{\YValue}{tan(60/\radius)*\radius}         \pgfmathsetmacro{\sinus}{sin(60/\radius)*\radius}         \pgfmathsetmacro{\cosinus}{cos(60/\radius)*\radius}         \begin{scope}[xshift=3*\radius cm]             \draw circle (1);             %axis             \draw[->] (-1.2,0) -- (1.2,0) coordinate (x);             \draw[->] (0,-1.2) -- (0,1.2);             %angles             \fill[fill=green!25] (0,0) -- (.2,0) arc (0:60/\radius:.2) -- cycle;             %sinus             \coordinate (P) at (60/\radius:1);             \draw[<-,red,line width=1pt] (P) -- (P |- x);             \fill[blue] (P) circle (1pt);             \draw (0,0) -- (P);             %cosinus             \draw[->,orange] (0,0) -- (P |- 0,0);             %tangent             \draw[dashed] (0,0) -- (1,\YValue);             \draw[->,green,line width=1pt] (1,0) -- (1,\YValue);         \end{scope}     };     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/SV4BE.png)


title: hyperref : how to color the whole "Figure 4" and not just the "4"?

text: I have a simple question: how can I make `hyperref` link (and color) the whole "Figure X" or "Table X" instead of just the "X"? I use it as :               \usepackage{hyperref}     \hypersetup{colorlinks=true, linktocpage=true, linkcolor=blue,  citecolor=blue,     urlcolor=blue,,pdfpagemode=UseOutlines,pdftitle={Your title here},         pdfauthor={John Doe},         pdfsubject={News},         pdfkeywords={crazy stuff},         bookmarksnumbered=true,         bookmarksopen=true  ,pdfstartview=Fit      }          \usepackage{hypcap}


title: Creating token blocks to hold environment contents and printing from them later

text: I have the following, works well for one toks block i.e \savedenvtoks but i want to create more toks blocks and i want the \savedenv to take a parameter indicating whichs toks block to add to, and i want the \printallsaved command to take a parameter indicating which tok block to print from.               \documentclass{article}     \usepackage{etex,environ,refcount}          \globtoksblk\savedenvtoks{1000}     \newcounter{savedenvcount}          \NewEnviron{savedenv}[1][]{%      \refstepcounter{savedenvcount}%       \if\relax\detokenize{#1}\relax       \else        \label{#1}%       \fi       \global\toks\numexpr\savedenvtoks+\value{savedenvcount}\relax=\expandafter{\BODY}%     }     \toks\savedenvtoks={??}          \newcommand{\printsaved}[1]{%       \the\toks\numexpr\savedenvtoks+\getrefnumber{#1}\relax      }          \makeatletter      \newcommand{\printallsaved}{%      \@tempcnta=\z@      \loop       \ifnum\@tempcnta<\value{savedenvcount}       \advance\@tempcnta\@ne       \the\toks\numexpr\savedenvtoks+\@tempcnta\relax\par       \repeat      }     \makeatother          \begin{document}          \begin{savedenv}       Something for a     \end{savedenv}          \begin{savedenv}      Something for b     \end{savedenv}          \begin{savedenv}     Something with no label     \end{savedenv}          \textbf{Print all of them}          \printallsaved          \end{document}


title: LaTeX: Greek fonts available?

text: I am using LaTeX and the default font that it is providing. I was wondering if there are any other fonts available I can have. My preamble is:               \documentclass[a4paper,12pt]{book}          %\usepackage{showframe}% just for the example     \usepackage{etoolbox}     \usepackage{changepage}% http://ctan.org/pkg/changepage     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \setcounter{secnumdepth}{-2} %For chapter/section not being visible in text     \let\cleardoublepage\clearpage     \usepackage[utf8x]{inputenc}               \usepackage[english, greek]{babel}     \usepackage{blindtext}     \usepackage[pdftex]{graphicx}          \newcommand{\gr}{\selectlanguage{greek}}     \newcommand{\en}{\selectlanguage{english}}          \usepackage[a4paper, inner=1.5cm, outer=3cm, top=2cm, bottom=3cm, bindingoffset=1cm]{geometry}     \usepackage[onehalfspacing]{setspace}     \pagestyle{fancy}     \fancyhf{}      What can I do to try other fonts too? The default one I'm getting is a little bit weird.


title: Can't get kerkis work properly

text: I am testing a few chapter styles to work with `kerkis` font in greek. The weird thing is that although I load the package, the fontstyle doesn't pass inside the document. My first attempt is the following ![enter image description here](http://i.stack.imgur.com/1uOX7.png) and its code is               %---------------- Square Box on Top Right Corner -----------------------     \documentclass{book}     \usepackage[margin=2.8cm,a4paper]{geometry}     \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}     %\usepackage[utf8]{inputenc}     \usepackage{kerkis}     \usepackage{pifont}     \usepackage[explicit]{titlesec}     \usepackage{titletoc}     \usepackage{tikz}     \usepackage{epigraph}     \usepackage{xpatch}     \usepackage{lmodern}     \usepackage{lipsum}          \newlength\ChapWd     \settowidth\ChapWd{\huge\chaptertitlename}          \definecolor{myblue}{RGB}{0,0,122}          \titleformat{\chapter}[display]       {\normalfont\filcenter\sffamily}       {\tikz[remember picture,overlay]         {         \node[fill=myblue,font=\fontsize{60}{72}\selectfont\color{white},anchor=north east,minimum size=\ChapWd]            at ([xshift=-15pt,yshift=-15pt]current page.north east)            (numb) {\thechapter};         \node[rotate=90,anchor=south,inner sep=0pt,font=\huge] at (numb.west) {\chaptertitlename};         }       }{0pt}{\fontsize{33}{40}\selectfont\color{myblue}#1}[\vskip10pt\Large***]     \titlespacing*{\chapter}       {0pt}{50pt}{10pt}               \makeatletter     \xpatchcmd{\ttl@printlist}{\endgroup}{{\noindent\color{myblue}\rule{\textwidth}{1.5pt}}\vskip30pt\endgroup}{}{}     \makeatother          \newcommand\DoPToC{%     \startcontents[chapters]     \printcontents[chapters]{}{1}{\noindent{\color{myblue}\rule{\textwidth}{1.5pt}}\par\medskip}%     }          \setlength\epigraphrule{0pt}     \renewcommand\textflush{flushright}     \renewcommand\epigraphsize{\normalsize\itshape}          \begin{document}     %\selectfont{kekris}          \chapter{Title of the first chapter}     \epigraph{A brainy quote -- Its Author}{}     \DoPToC     \lipsum[4]     \section{A test section}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \section{Another test section}     \lipsum[4]     \section{Yet another test section}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]          \chapter{Title of the second chapter}     \DoPToC     \lipsum[4]     \section{A test section}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \section{Another test section}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]     \subsection{A test subsection}     \lipsum[4]          \end{document}      You can see that despite loading `kerkis`, the fonts aren't kerkis at all. The same happens with another style, as seen in the next figure ![enter image description here](http://i.stack.imgur.com/l9Iuq.png) There, although `chaptername` is really in kerkis, everything else is in `babel`'s default. The code for that is               %------------------- Round Boxes ------------------------------     \documentclass{book}     \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}     %\usepackage[utf8]{inputenc}     \usepackage{kerkis}     \usepackage{pifont}     \usepackage[explicit]{titlesec}     \usepackage{fourier}     %\usepackage{kerkis}     \usepackage{tikz}     \usepackage{epigraph}     \usepgflibrary{qrr.shapes.openrectangle}          \definecolor{mybluei}{RGB}{0,173,239}     \definecolor{myblueii}{RGB}{63,200,244}     \definecolor{myblueiii}{RGB}{199,234,253}          \tikzset{     mynode/.style={       rounded corners=30pt,       shape=open rectangle,       open rectangle fill=myblueii,       open rectangle sides=#1,       }     }          \titleformat{\chapter}[display]       {\normalfont\huge\sffamily}       {}       {20pt}       {%       \begin{tikzpicture}[remember picture,overlay]       \node[         anchor=west,         rectangle,         minimum height=4cm,         text width=\paperwidth,         xshift=-\the\dimexpr\oddsidemargin+1in\relax,         outer sep=0pt,         fill=myblueiii] (titlerect) {};       \node[         anchor=south west,         xshift=2cm,         text width=\textwidth]          at ([yshift=5pt]titlerect.south west) {\fontsize{30}{36}\selectfont#1};       \node[         mynode=nw,         anchor=south east,         fill=myblueii,         inner xsep=1.5cm,         outer sep=0pt,         font=\color{white},         minimum height=30pt]          at (current page.east|-titlerect.north)          {\bfseries\MakeUppercase{\chaptertitlename}\ \thechapter};       \end{tikzpicture}%       }     \titleformat{name=\chapter,numberless}[display]       {\normalfont\huge\sffamily}       {}       {20pt}       {%       \begin{tikzpicture}[remember picture,overlay]       \node[         anchor=west,         rectangle,         minimum height=4cm,         text width=\paperwidth,         xshift=-\the\dimexpr\oddsidemargin+1in\relax,         outer sep=0pt,         fill=myblueiii] (titlerect) {};       \node[         anchor=south west,         xshift=2cm,         text width=\textwidth]          at (titlerect.south west) {\Huge#1};       \end{tikzpicture}%       }     \titlespacing*{\chapter}       {0pt}{-20pt}{60pt}          % \setlength\beforeepigraphskip{1.5\baselineskip}     % \setlength\afterepigraphskip{2\baselineskip}     % \setlength\epigraphwidth{6.8cm}     % \setlength\epigraphrule{0pt}     % \renewcommand\epigraphsize{\large}     % \renewcommand\textflush{flushright}     %      % \let\oldepigraph\epigraph \renewcommand\epigraph[2]{%     %   \oldepigraph{\color{mybluei}\itshape #1}{#2}}          \usepackage{epigraph}     \usepackage[margin=2.8cm]{geometry}          \setlength\beforeepigraphskip{1.5\baselineskip}     \setlength\afterepigraphskip{2\baselineskip}     \setlength\epigraphwidth{6.8cm}     \setlength\epigraphrule{0.1pt}     \renewcommand\epigraphsize{\large}     \renewcommand\textflush{flushright}          \let\oldepigraph\epigraph \renewcommand\epigraph[2]{%       \oldepigraph{\color{blue}\itshape #1}{#2}}          % \makeatletter     % \xpatchcmd{\ttl@printlist}{\endgroup}{{\noindent\color{blue}\rule{\textwidth}{1.5pt}}\vskip30pt\endgroup}{}{}     % \makeatother          \usepackage{titletoc}     \newcommand\DoPToC{%     \startcontents\printcontents{}{1}{\noindent{\color{blue}\rule{\textwidth}{.5pt}}\par\medskip}}     \usepackage{xpatch}               \begin{document}          \chapter{From the Ground Up!}     \epigraph{In theory there is no difference \\ between theory and practice. \\ In practice there is.}{Lawrence ``Yogui'' Berra,1925 \\ New York Yankees baseball player}     \DoPToC     \chapter*{A test unnumbered chapter}     \DoPToC     \chapter{Another chapter}     \epigraph{In theory there is no difference \\ between theory and practice. \\ In practice there is.}{Lawrence ``Yogui'' Berra,1925 \\ New York Yankees baseball player}     \DoPToC     \section{A simple section}     \section{Another simple section}          \end{document}      Any idea on why is this happening? How can it be fixed?


title: Removing artifact from PDF figure in LaTeX, compiled with pdflatex

text: I am working on a document in LaTeX, and when inserting pdf figures I get a weird black line down the right side. This is not present in the original pdfs (I've checked). I thought it might be some scaling issue, since several of my figures are large and I have to scale them smaller than actual size in LaTeX, but it also appears in this figure, which is actual size.   My code for the figure is:               \begin{figure}[t]     \includegraphics[height = 9.6cm]{"testschema"}     \caption{Database Schema for test case, simulating results from a test suite}     \label{fig:schematest}     \end{figure}      And the output after compiling with pdflatex is: ![enter image description here](http://i.stack.imgur.com/yFtuf.png)


title: Page Layout in plain tex

text: I'm trying to start using plain tex (in fact, the pdftex that comes with texlive2010) to write a document but I'm having some trouble with the page layout. My question is at which point is it decided what the dimensions of the page and the margins will be? As far as I investigated the `\plainoutput` routine in plain.tex only sets the height and width of the `\box255` plus headers, footers, etc, but page dimensions (like A4, letter, portrait, landscape, etc) and margins are never defined. Moreover the TEXBOOK says that by default the page layout has `1in` of margin at each side (page 251) but I don't know when are these margins defined nor why in my final pdf output the document appears with A4 size, `1in` of left margin and approximatley `0.7in` of right margin. So the question again is when are these dimensions decided?


title: Memoir parskip package

text: How do I get the same effect as using the `parskip` package when using the `memoir` class. I want no indents, and spaces between paragraphs. What is the proper way to do this in the `memoir` class?


title: textcomp makes \textbullet smaller when using helvet font

text: I'm writing a document which requires the `helvet` font and, in order to get access to the euro symbol, I am now trying to load the `textcomp` package. However this package has the strange side effect of making the symbol produced by `\textbullet`, e.g. as used by an `itemize` environment, a bit smaller. I could live with that, but I sort of prefer the slightly larger bullet, so I'm wondering if there is an easy way to load `textcomp` but without changing the size of the bullet? A small example showing the problem               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[scaled]{helvet}     \renewcommand{\familydefault}{\sfdefault}     % Uncomment the following line to see the problem      %\usepackage{textcomp}          \begin{document}     \begin{itemize}     \item One     \item Two     \end{itemize}     \end{document}


title: Corollary counter in SVmono

text: When using the predefined Theorem and Corollary commands using the Springer template `svmono`, the theorem and corollary counters are different. How can I make the counters match? The desired effect is to have Theorem 1. Theorem 2. Corollary 3. Theorem 4.


title: How to change paragraph separation to indent within blockquote (csquotes)

text: I am using the package `csquotes` to generate a blockquote. `csquotes` inserts what looks like half a blank line between the paragraphs within the quote. I would prefer to have no vertical space but an indent like new paragraphs in regular text. How can I do this? I have prepared the following example:               \documentclass{article}     \usepackage{csquotes}     \begin{document}     \section{}     Lorem ipsum dolor sit amet, consectetur adipiscing elit.      Integer a purus vel lacus eleifend feugiat sed id eros.      %     \blockquote{Vestibulum ante ipsum primis in faucibus orci      luctus et ultrices posuere cubilia Curae; Nunc congue,     \emph{here ends the first paragraph within the blockquote.}          \emph{This should be indented.} Aenean vulputate dolor id nulla       sollicitudin quis facilisis sem ultrices. Sed congue consequat      viverra. Suspendisse malesuada sodales viverra.}     %     Nullam eget elit vel nunc interdum accumsan. Phasellus posuere      enim eu eros blandit viverra.          Lorem ipsum dolor sit amet, consectetur adipiscing elit.      Integer a purus vel lacus eleifend feugiat sed id eros.     \end{document}


title: In align environment, how can you label some (but not all) of the equations?

text: I know that the align environment labels all the lines, while the align* environment labels none of the lines. Is there a way to have the align environment label only some of the lines? For example, suppose I have something like this:               \begin{align}     x+y      \\     x-y      \\     xy     \end{align}      This labels all three lines. Is there a way to only label, say, the second line (x-y)?


title: Cover Letter with Short Stylish Cover Letter

text: I am using this template for the cover letter: http://www.latextemplates.com/template/short-stylish-cover-letter I would like to understand of to put more space between the title and the line in which there is my name and address. Thanks a lot, Fab.


title: gb4e enumeration format

text: I am using gb4e for glossing examples in my thesis. I want to have the enumeration in such a format that the chapter number precedes the enumeration of samples, such as Example (1.2) which refers to the second example in Chapter 1, and _not_ Example (2). How can this be done?


title: Undefined control sequence \pgfmath@

text: Why does the following code give me this error message? ## Error > ERROR: Undefined control sequence. > > \--- TeX said --- \pgfmath@dimen@ ...men@@ #1=0.0pt\relax \pgfmath@ > > l.28 \draw (\getWickersonLeft{c},0) \-- (\getWickersonRight{c},5); ## Code               \documentclass{article}          \usepackage{tikz}          \pgfkeys{/wickersons/.cd,       execute style/.style={#1},                                  execute macro/.style={execute style/.expand once=#1},        left/.code={\gdef\wickersonsleft{#1}},       right/.code={\gdef\wickersonsright{#1}}     }          \def\getWickersonLeft#1{\csname wickerson#1left\endcsname}     \def\getWickersonRight#1{\csname wickerson#1right\endcsname}          \newcommand*\defWickersonMacros[3]{%       \expandafter\edef\csname wickerson#1left\endcsname{#2}       \expandafter\edef\csname wickerson#1right\endcsname{#3}     }          \begin{document}          \begin{tikzpicture}[x=1mm,y=-1mm]%       \foreach \x/\xvalue in {c/{left=67,right=77}} {          \pgfkeys{/wickersons/.cd, execute macro=\xvalue}          \expandafter\defWickersonMacros{c}{\wickersonsleft}{\wickersonsright}       }       \draw (\getWickersonLeft{c},0) -- (\getWickersonRight{c},5);     \end{tikzpicture}          \end{document}


title: Continuous numbering of figures and tables changes not working

text: I'm aware of the topic: Continuous v. per-chapter/section numbering of figures, tables, and other document elements and I tried use the options given, but none worked for me. I'm using `memoir`class. What I'm doing wrong? I tried:               \documentclass{memoir}          \usepackage{chngcntr}     \counterwithout{figure}{chapter}          \begin{document}     \chapter{A}     \begin{figure}     \centering     \caption{A figure}     \end{figure}          \end{document}      Figure remains 1.1. So, I tried `\counterwithout{figure}{chapter}` since `memoir` supports this command. Figure remains 1.1. So I tried:               \usepackage[figurewithin=none]{caption}      Figure remains 1.1. * * * @jon This is my "style file", named folhadeestilos.txt:               % ---     % Pacotes     % ---     \usepackage[brazilian]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[none]{hyphenat}     \usepackage{tabularx}     \usepackage{graphicx}     \usepackage[authoryear,round]{natbib}          % ---     % Margens     % ---     \setlrmarginsandblock{3cm}{2cm}{*}     \setulmarginsandblock{3cm}{2cm}{*}     \setheaderspaces{*}{1cm}{*}          \checkandfixthelayout          % ---     % Fonte Arial     % ---     \usepackage[scaled]{uarial}     \renewcommand*\familydefault{\sfdefault}     %\usepackage{microtype}          % ---     % Customização da numeração de páginas e das seções     % ---     \renewcommand{\printtoctitle}[1]{%         \centering\large\bfseries\MakeUppercase{#1}}     \renewcommand{\aftertoctitle}{%     \thispagestyle{empty}\afterchaptertitle}          \renewcommand{\printloftitle}[1]{%         \centering\large\bfseries\MakeUppercase{#1}}     \renewcommand{\afterloftitle}{%     \thispagestyle{empty}\afterchaptertitle}          \renewcommand{\printlottitle}[1]{%         \centering\large\bfseries\MakeUppercase{#1}}     \renewcommand{\afterlottitle}{%     \thispagestyle{empty}\afterchaptertitle}          \chapterstyle{tandh}     \aliaspagestyle{chapter}{simple}     \setlength\beforechapskip{-\baselineskip}          \renewcommand{\printchaptertitle}[1]{%         \large\bfseries\MakeUppercase{#1}}     \renewcommand{\printchapternum}{%         \large\bfseries \thechapter\space}          \setsecheadstyle{\large\bfseries}          \renewcommand{\bibname}{Referências Bibliográficas}     \AtBeginDocument{\renewcommand{\bibsection}{\chapter{\bibname}}}          % ---     % Legendas e numeração de figuras e tabelas     % ---     \usepackage[center,small,bf]{caption}          % ---     % Ambiente matemático em sans serif     % ---     \everymath{\mathsf{\xdef\mysf{\mathgroup\the\mathgroup\relax}}\mysf}          % ---     % Hyperref     % ---     \usepackage[hidelinks]{hyperref}      And this is my simplified main file:               \documentclass[a4paper,12pt,oneside]{memoir}     \input{folhadeestilos.tex}          \begin{document}          ...          \pagestyle{simple}     \input{mem.tex}          \end{document}      Where mem.tex contains the `\begin{figure}` enviroment.


title: Vertical math next to vertical arrow in Tikz

text: Let's say I have               \usepackage{tikz}     \begin{tikzpicture}     \node (A) at (0,0){A};     \node (B) at (0,-4){B};     \draw[->] (A)--node[auto]{$v\mapsto w$}(B);     \end{tikzpicture}      How to get that `$v\mapsto w$` vertical (the `$v$` and the `$w$` should still be normally oriented but the arrow should point down and the `$v$` be on top of it and the `$w$` below)? How to do it nicely? I guess I could always put a `tikzpicture` inside that `node[auto]{...}` and in there do all rotations/stacking I want.


title: Why could \usepackage{Sweave} be affecting my graphics scaling?

text: I'm using Sweave to produce a large, multi part academic thesis. I had neglected to specify `\usepackage{Sweave}` in my preamble, but everything was working fine until I added some verbatim output from R. The latex compiler threw some errors that keyed me in to my omission of the `\usepackage{Sweave}` directive. When I added `\usepackage{Sweave}` to my preamble, the verbatim output worked fine, but many images in my document suddenly got scaled strangely. The seem to keep their height, but their width was expanded. Generally I scale my images by specifying height, such as: `\includegraphics[height=1.5in]{graphicName}`. If I instead specify `\includegraphics[height=1.5in, keepaspectratio=true]{graphicName}` I get the expected behavior. I've never needed this additional flag before. Why is Sweave changing the default behavior of `\includegraphics{}`? Apologies for the lack of a minimal reproducible example here, but my document structure is pretty complex at this point.


title: Line break in citation with organization as author

text: I have the following reference:               @MISC{EX2012,       author = {{S}ingle {A}uthor {O}rganization},       year = {2012},       title = {Example}     }      A citation for this is breaking after "Author", but extending beyond the margin, as shown in the following example layout in the PDF:               Demo text demo text demo to margin     Demo text which cites it (Single Author     Organization, 2012) and flows over     the margin.      How can I solve this? I am using `natbib` and citing with `\citep{EX2012}`.


title: Correct representation of an institution as author while citing

text: I am new to using LaTeX and ran into the following problem. I make use of the `apacite` package. I made a `.bib` file with the following entry:               @misc{Ambulancezorkort,            author = {Rijksinstituut voor gezondheid en milieu, Ministerie van Volksgezondheid Welzijn en Sport},       title = {Ambulancezorg kort en bondig.},       month = {March},       year = {2012},       url = {http://www.nationaalkompas.nl/zorg/ambulancezorg/ambulancezorg-samengevat/}      } So this autor (a Dutch ministry) is pretty long and has a comma in it. When using `\citeA{Ambulancezorkort}` I've got the following result: > (Rijksinstituut voor gezondheid en milieu, 2012) Of course I would like to have the whole name, and not only the part before the comma. When I tried the name without the comma, the outcome was only worse. When using the entry:               author = {Rijksinstituut voor gezondheid en milieu Ministerie van Volksgezondheid Welzijn en Sport},      I obtain the result: > (Voor gezondheid en milieu Ministerie van Volksgezondheid Welzijn en Sport, > 2012) So the word 'rijksinstituut' is missing, both in text as in the reference list. I am looking for the way of displaying this long author entry correctly. Thanks in advance.


title: Insert a separate mark inside a pgfplots graph

text: First of all, let me apologize if the title is not enough clear, but I didn't know how to explain myself better. I have a graph consisting in three different curves that are covering almost the same y range, except for one point. Since this point corresponds to a value of y much higher respect to the others, I don't want to report it directly, because it would cause the flattening of all the other points. My solution is therefore to report this only point in a separate position of my graph, with an arrow that indicates that it is out of the range and its coordinates:               \documentclass{scrbook}     \usepackage{classicthesis}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}         \begin{axis}[          xlabel={x},          ylabel={y},          xmin=0, xmax=120,          ymin=0, ymax=5,          width=.8\columnwidth,          cycle list name=black white,          /pgfplots/ytick={1,2,...,5}]          \addplot          coordinates{          (3,    25)          (5,    4)          (10,   2)          (20,   1)          (40,   0.5)          };          \addplot          coordinates{          (6,    4)          (10,   2)          (20,   1)          (40,   0.5)          (80,   0.5)          };          \addplot          coordinates{          (9,    3)          (15,   1.5)          (30,   0.5)          (60,   0.5)          (120,  0.5)          };          \node at (axis cs:25,4.5) {$\uparrow(3,25)$};          \legend{1,2,3}          \end{axis}     \end{tikzpicture}          \end{document}      Here is what I'm asking you:   * As you can notice, I'm using the `\uparrow` symbol to create the arrow, but I would like a thinner and longer arrow.    * I would like not to be obliged to report the coordinates of the point by hand.   * I would like to add a mark between the arrow and the coordinates, which should have the same style of the first curve. Thanks for your help. **EDIT:** Although I'm not completely satisfied about it, I adopted the following solution:               \documentclass{scrbook}     \usepackage{classicthesis}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}         \begin{axis}[          xlabel={x},          ylabel={y},          xmin=0, xmax=120,          ymin=0, ymax=5,          width=.8\columnwidth,          cycle list name=black white,          /pgfplots/ytick={1,2,...,5}]          \addplot          coordinates{          (3,    25)          (5,    4)          (10,   2)          (20,   1)          (40,   0.5)          };          \addplot          coordinates{          (6,    4)          (10,   2)          (20,   1)          (40,   0.5)          (80,   0.5)          };          \addplot          coordinates{          (9,    3)          (15,   1.5)          (30,   0.5)          (60,   0.5)          (120,  0.5)          };          \draw[-latex] (axis cs:12,4.25) -- (axis cs:12,4.75);          \addplot[fill=gray,mark=*]          coordinates{          (15.5, 4.5)          };          \node[right] at (axis cs:16,4.5) {$(3,25)$};          \legend{1,2,3}          \end{axis}     \end{tikzpicture}          \end{document}      Here is the result: ![Result](http://i.stack.imgur.com/xziqP.png)


title: chapter number in citation

text: I am using `chapterbib` and everything seems to be working, but I would like my citations to appear as `[x.1]`, `[x.2]`, etc. where `x` is the chapter number. I cannot find how to do this, but I have a book set it Latex where (I think) it was done. Is is possible? example: instead of               [1] Jones, "Anteaters, journal of diet, 1999.      I would like               [9.1] Jones, "Anteaters, journal of diet, 1999.      I am using documentclass book and bibliographystyle{plain}


title: How to find out why \cite works on one computer while not on another computer when the same local files are present?

text: I am using the IEEE class and `.bst` style templates for `.tex` and `.bib` files. One my laptop the citations come out as question marks. At the university the `\cite{}` get compiled correctly. I have locally the files for the `.cls` and `.bst` files although I expect the packages between my laptop and university to be different (`IEEEtran.bst` / `IEEEtran.cls`).               \documentclass[conference]{IEEEtran}     \usepackage{graphicx}     \usepackage[tight,footnotesize]{subfigure}     \usepackage{cite}     \begin{document}     \title{Simulating...}     \author{\IEEEauthorblockN{yoyo and yoyo}     \IEEEauthorblockA{blah\\     University ...\\     Mars\\     Email: ???}}     \maketitle     \begin{abstract}     blah     \end{abstract}     %\IEEEpeerreviewmaketitle     \section{Introduction}     intro     \cite{WS}     Here we simulate...     \section{Conclusion}     The conclusion goes here.     \section*{Acknowledgment}     The authors would like to thank...     \bibliographystyle{IEEEtran}     \bibliography{IEEEabrv,mrefsAlex}     \end{document}      How should I go about checking what dependencies are missing on my laptop because no errors are given.


title: Footnote numbers in index (e.g., 23n3)

text: I'm currently weighing indexing options for a book-length project. One of the more surprising hurdles is that there doesn't seem to be a way to create an index (in my case, several indices) that disambiguates references in the text from those that appear in the footnotes. For example, there will be several hundred references to Roman and canon law, but usually these will be in the footnotes, where there will be, on average, several footnotes per page. Thus a generic reference to page 100 in the citation index is not nearly as helpful as a reference to '100n34' (which is standard practice for publishers who still bother to include things like an 'index locorum'). For sorting reasons, it seems like `xindy` will be the best option, but a solution that can deal with footnote references will trump that since it will be easier to manually sort the `.idx` file than to manually identify every citation in a footnote versus one in the text. (Note also that the footnotes invariably contain other arbitrary elements, such as text and citations to modern studies, so a 'special' footnote command will probably not work.) Finally, in case this complicates things any further, this project is tied to the `memoir` class (page layout) and `lualatex` (fonts).


title: How can I correct spacing issues?

text: When using the following code I get unsightly spaces (following the opening parentheses, after the `=` and between the `x`' and `y`'):               [$](\quad \overline{x+y})=\quad \overline{x}\quad \overline{y}[/$]      ![Bad spacing](http://i.stack.imgur.com/enq70.png) What am I doing wrong? If it helps, I am using Anki with its default header and footer settings:               \documentclass[12pt]{article}     \special{papersize=3in,5in}     \usepackage[utf8]{inputenc}     \usepackage{amssymb,amsmath}     \pagestyle{empty}     \setlength{\parindent}{0in}     \begin{document}          \end{document}      Also, please forgive me if I am unclear or have duplicated a question; I am new to TeX and unfamiliar with the terminology.


title: Creating my own sectioning command for exercises

text: I'm editing a book. What I want is a sectioning command like `\section`, `\subsection`, and friends, to typeset a exercises section at the end of each section of the book. This exercises are in some list environments, and I don't want any additional features to the exercises itself. I don't want to redefine some of the mentioned commands because I need to use all of them along the edition of the book. So, what I have tried               \documentclass[12pt,letterpaper]{book}     \usepackage[latin1]{inputenc}     \usepackage[spanish]{babel}     \usepackage{amsmath,amsfonts,amssymb,amsthm}     \usepackage{fancyhdr}          \pagestyle{fancy}     \fancyhf{}     \renewcommand\headrulewidth{0pt}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}          \renewcommand{\sectionmark}[1]{\markright{#1}{}}     \fancyhead[LO]{\small\textsl{\leftmark}}                 \fancyhead[RE]{\small\textsl{\rightmark}}                \fancyhead[LE,RO]{\thepage}                                   \newenvironment{ejercicios}{     \newpage          \vspace{0.5cm}          \rule{\textwidth}{0.5pt}     \makebox[\textwidth][r]{\Large Ejercicios \thesection. \rightmark}     \rule{\textwidth}{0.5pt}          \vspace{0.5cm}     }{\newpage}      The problem is that the space between the rules and the text are distinct. I've tried to use `\parbox` and try to adjust the spaces between the rules and the text, but this never work because I need (on request to me) the following:               \makeatletter      \renewcommand\paragraph{\@startsection     {paragraph}{3}{0cm}                  {0cm}                                {3mm}                        {\bf}}       \makeatother       It is to break the line after each paragraph header, I suspect that this affect the use of `\parbox`. Whatever, my attempt to solution this is inelegant. I want something like `\newsectioncommand` that be independent of the behavior of the `\paragraph` command. That I want is something that produce a new page 5mm rule 3mm aligned right Ejercicios "section number". "section name" 3mm rule 5mm


title: Macro behaviour different inside tabular environment

text: I have a lot of problems lately with macros expanding (or not expanding) at unexpected times, so thought I was having a related problem here. But, in this case, things are working as I want outside of the `\tabular` environment. Here is a test case:               \documentclass{article}     \usepackage{xparse}     \usepackage{xcolor}          \newcommand{\MyValue}{0}          \newcommand{\PrintMyValue}{\MyValue}          %\NewDocumentCommand{\ShowMyValue}{}{ % Same results     %\newcommand{\ShowMyValue} {          % Same results     \DeclareExpandableDocumentCommand{\ShowMyValue}{}{         \textcolor{red}{\MyValue}         \renewcommand{\MyValue}{0}     }          \begin{document}     \renewcommand{\MyValue}{5}     \PrintMyValue, \ShowMyValue \par % should be 5     \PrintMyValue, \ShowMyValue \par % should be 0     \renewcommand{\MyValue}{7}     \PrintMyValue, \ShowMyValue \par % should be 7          \hrule     \renewcommand{\MyValue}{5}     \begin{tabular}{r l}     \PrintMyValue, &\ShowMyValue \\ % should be 5     \PrintMyValue, &\ShowMyValue \\ % should be 0     \renewcommand{\MyValue}{7}     \PrintMyValue, &\ShowMyValue    % should be 7     \end{tabular}          \end{document}      Outside of tabular, this produces the desired results: 5, 5   0, 0   7, 7 But inside tabular, this produces 5, 5   5, 5   7, 5 I thought perhaps it had to with grouping, but that does not appear to be the case. And, inside an `align*`, the same code sequence produces: 5, 5   5, 5   7, 7


title: Force title break in apa6e

text: _Apologies in advance: this is not minimal in the example but I am afraid my lack of knowledge about what packages control what could lead me to leave out packages that have an effect on the output._ I want to break the title of a document where I desire, not where LaTeX or packages do. My title is currently broken like this:               Research Analysis Exam: A Critique of ``Evidence in Teacher Education: The Performance As-     sessment for California Teachers (PACT)''      I want to break it like this:               Research Analysis Exam: A Critique of ``Evidence in Teacher Education:      The Performance Assessment for California Teachers (PACT)''      Though centered of course. How can I do this but allow LaTeX to hyphenate the rest of the article in its usual way?               \documentclass[leavefloats]{apa6e}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa]{biblatex}     \addbibresource{RAE}   %SUPPLY YOUR NAME OF BIBLATEX HERE (REMEMEBER NO SPACES IN THIS NAME)     \DeclareLanguageMapping{american}{american-apa}     \usepackage{enumerate}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{ragged2e}     \usepackage{textcomp}     %\usepackage[justification=justified,singlelinecheck=false,font=small,format=plain,labelfont=bf,up,textfont=normal,up]{caption}     \usepackage{etoolbox}     \usepackage{microtype}  %disable ligitures     \DisableLigatures{encoding = *, family = *}     \makeatletter     \renewcommand{\maketitle}{%     \thispagestyle{titlepage}%     \vspace*{1in}%     \Centering\@title\\\@author%     \vfill%     \ifdefined%     \apaSIXe@leavefloats{}     \fi     \RaggedRight%     \mspart{\@title}%     }     \makeatother     \usepackage[section]{placeins}     \usepackage{setspace}     \usepackage{appendix}     \usepackage{float}     \usepackage{subfig}     \usepackage{amsmath}     \setlength{\parindent}{1 em}     \usepackage{color}     \usepackage{ifthen}     \makeatletter     \renewenvironment{figure}[1][]{%     \ifthenelse{\equal{#1}{}}{%     \@float{figure}     }{%     \@float{figure}[#1]%     }%     \centering     }{%     \end@float     }     \renewenvironment{table}[1][]{%     \ifthenelse{\equal{#1}{}}{%     \@float{table}     }{%     \@float{table}[#1]%     }%     \centering     }{%     \end@float     }          \defbibheading{bibliography}{%     \section{\normalfont\refname}}          \title{Research Analysis Exam: A Critique of ``Evidence in Teacher Education: The Performance Assessment for California Teachers (PACT)''}     \shorttitle{Research Analysis Exam}     \author{Tyler Rinker}     \date{\today} % or \date{24Jan11} for example     \begin{document}     \maketitle     \section{Introduction}     \section{Précis}     \printbibliography     \end{document}


title: How does one make a single block of text span two columns using multicols?

text: I have a document that uses the multicols package to create a 3-column layout with three sections inside. For the first column, I have two sections followed by a column break. For the second and third columns, however, I want to have a section span the width of both the columns. Is there an easy way to do this? Here's a diagram of what I want the layout to look like:               Col1 Col2 Col3     --- | --------     --- | --------     --- | --------     --- | --------      **Edit:** Posted answer below.


title: Dynamic radius for rounded corners

text: When using `rounded corners`, I sometimes specify a radius that looks great for most corners in the path, but a couple of points are too close together, so that I get ugly artifacts. I'd like to be able to specify the radius for `rounded corners` as a "target" or "maximum" value, with the radius automatically being reduced if points are too close together. Consider the following example ![](http://i.stack.imgur.com/Pc7Ve.png) In the first path, I manually reduced the radius for the first two corners, while in the second, the radius is identical for all corners, which introduces unwanted spikes. Is there a clever way of getting rounded corners on paths that won't introduce these artifacts? Here's the MWE:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \draw [rounded corners=0.5cm] (0,0) -- (2,0) -- (2,1) [rounded corners=1cm] -- (4,1) -- (4,-1);     \draw [rounded corners=1cm] (0,-2) -- (2,-2) -- (2,-1) -- (4,-1) -- (4,-3);     \end{tikzpicture}     \end{document}


title: MiKTeX+WinEdt How to automatically close the current DVI file before opening a new one?

text: I am using the MiKTeX + WinEdt for my texing, and every time after click 'texify' WinEdt will automatically open the DVI file for me to preview. Then I usually edit the `.tex` file and compile again. The thing is, after I am done editing and want to 'texify' + 'preview' the new file, the old DVI window from Yap is no longer useful to me. Instead of manually close it every time, I'd like to configure WinEdt so it will automatically close the current DVI window before open a new one for me. I think this should be pretty simple for some TeX gurus, any help please?


title: How to change style in biblatex?

text: How can I use change style in `biblatex`? I want to use a specific style, probably ACM or IEEE and I don't know how to change that. Below is the current code:               \documentclass[a4paper,11pt]{article}     \usepackage[sorting=none]{biblatex}     \bibliography{MyCollection}     \begin{document}      \printbibliography     \end{document}


title: Rotating a one-page float for pdf viewing

text: I have a few long tables that should be rotated 90 degrees. These tables pretty much need to take up their own page. Rotating the table itself is not a problem, but I would also like to have an attribute set in the appropriate page that made pdf viewers view the page in landscape mode. I have read this question and this question and there is plenty of information for doing what I want using the `landscape` environment from `pdflscape`. _Except for one problem:_ the table produced in these ways is not really a float. The `landscape` environment is not itself a float, so my tables take up a whole page, and the page that precedes them is full of whitespace. Is there any way to designate the page containing some float as landscape while letting the float continue to float? Can I make a landscape-float environment? I don't mind if such a thing necessarily has to take up a whole page. If I have to, I'll resort to using `sidewaystable` from the `rotating` package and post-processing the pdf on pages that need rotating, but it would be nice to not have to do that every time I need to recompile the final draft.


title: Dividing preamble into smaller files

text: Preamble of my tex file is going to be so long, Can I divide it to some smaller and reusable files? I used `\include` but it seems that it did not include any thing.


title: How can I use \DTLloaddb package to create a table based on csv file?

text: I am new in Latex and I have some issues. I have succeeded in reading the .csv file:               ,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24     ,25,23,13,14,15,39,36,4,37,11,26,13,34,39,40,22,33,32,9,5     ,56,31,45,31,38,41,59,26,,44,52,33,,42,,28,51,41,28,36      and using How to use datatool package to read a CSV files so that they can be used in tables? got this output: ![Image 1](http://i.stack.imgur.com/RPAXY.png) But now I have to format the table like this: ![Image 2](http://i.stack.imgur.com/cWfwN.png) and I don't know how, because first of all I don't know how to set the margins that the table can fit into the paper(I've used the geometry package to make the page landscape, but it is not enough). Then each cell contains time of departure as hour followed by minute, both as two digits, but sometimes I don't have two digits,just one so I have to switch eg. from `12 4 -> 12 04`. Finally each data field means the minute of departure within the particular hour, e.g. number 25 in column w5 means time of departure 5:25, I don't know how to format this way. I was trying like this but I don't think this is the correct way:               \ifthenelse{\equal{\insertbyname{w5}}{}}{\insertbyname{w5}&}{{\bf 05} \insertbyname{w5} &}      If someone can help me I will be more than happy.


title: Subfigure: error "Missing number, treated as zero"

text: \begin{figure} \center         \begin{subfigure}[b]             \includegraphics[width=60mm]{a}             \label{fig:a}         \end{subfigure} %              \begin{subfigure}[b]                 \includegraphics[width=60mm]{b}             \label{fig:b}             \end{subfigure}          \caption{my caption}     \end{figure}      I get an error               ! Missing number, treated as zero.     <to be read again>     \let                \includegraphics                                 [width=60mm]{a}      What's wrong?


title: Installing hebrew (culmus) on Mac using TexLive

text: I am trying to follow the instructions below in order to install hebrew to work with Latex on a mac (Lion) running TexLive. The script seems to be outdated in so many ways... Could someone help me to get the font installation process right? Thank you in advance               #!/bin/bash          mkdir tmp_latex_install     cd tmp_latex_install     # download culmus (fonts) and ivritex (latex support)     wget http://switch.dl.sourceforge.net/sourceforge/culmus/culmus-0.100-iso8859-8.tar.gz     wget http://heanet.dl.sourceforge.net/sourceforge/ivritex/culmus-latex-0.6.tar.gz          # unzip     tar zxvf culmus-0.100-iso8859-8.tar.gz     tar zxvf culmus-latex-0.6.tar.gz          # install culmus fonts     mv ISO-8859-8 ~/Library/culmus-fonts/     #xset +fp $HOME/Library/culmus-fonts     #xset fp rehash          # install ivritex     #mkdir -p $HOME/Library/texmf/     cd culmus-latex-0.6     #make TEXMFDIR=$HOME/Library/texmf/ CULMUSDIR=$HOME/Library/culmus-fonts     #sudo make TEXMFDIR=$HOME/Library/texmf/ CULMUSDIR=$HOME/Library/culmus-fonts install          cd ../..     rm -rf tmp_latex_install


title: Speeding up compilation using precompiled preamble with LuaTeX

text: Compiling my documents with lualatex takes quite long. I have a complex preamble, and noticed it takes long to process this part of the file. Today I came across this website, which proposes a trick I haven't seen on this site before. By pre-compiling the preamble, it claims to speed up compilation approximately three-fold:   http://www.howtotex.com/tips-tricks/faster-latex-part-iv-use-a-precompiled- preamble/ However, I have not been able to follow this tutorial with LuaLaTeX. How can I pre-compile my preamble with it?


title: Entering unicode math symbols into LaTeX, direct from keyboard, on a Mac

text: I would like my LaTeX files to contain Unicode characters. For instance, I want to see > ∃x．x ⟶ β in my text editor, rather than > \exists x\ldotp x\longrightarrow\beta Also, I would like to type these characters directly from my keyboard. For instance, I want   * to get "∃" by typing `alt``E`,   * to get "β" by typing `alt``b`, and    * to get "⟶" by typing `alt``-``-``>`. I'm running Mac OS X, and my keyboard has a British layout.


title: IEEE tran one column, two column elements in the same page possible?

text: I'm using `IEEEtran.cls` for a journal paper and I'm unable to make a one column abstract using the inbuilt commands in IEEEtran: `\onecolumn`, `\twocolumn`. Switching between the two flushes the page and starts a new one. `\nopagebreak` doesn't work. Tried putting `samepage` tags. Didn't help either. I'm compiling using `Xelatex`. Any way to make one column and two column in the same page?


title: How to reduce the margins and spacings in this document

text: I'm using the `res.cls` to create a one-page CV (I know, `res.cls` is old, but I prefer its layout). Since the CV is one-page only, I need to squeeze some more space for its content. This is what I have now:               \documentclass[line, margin]{res}          \usepackage{url}     \oddsidemargin -.5in     \evensidemargin -.5in     \textwidth=6.0in     \itemsep=0in     \parsep=0in     \newcommand{\sbt}{\,\begin{picture}(-1,1)(-1,-3)\circle*{2.6}\end{picture}\ }     % if using pdflatex:     \setlength{\pdfpagewidth}{\paperwidth}     \setlength{\pdfpageheight}{\paperheight}           \newenvironment{list1}{       \begin{list}{\ding{113}}{%           \setlength{\itemsep}{0in}           \setlength{\parsep}{0in} \setlength{\parskip}{0in}           \setlength{\topsep}{0in} \setlength{\partopsep}{0in}            \setlength{\leftmargin}{0.17in}}}{\end{list}}     \newenvironment{list2}{       \begin{list}{$\bullet$}{%           \setlength{\itemsep}{0in}           \setlength{\parsep}{0in} \setlength{\parskip}{0in}           \setlength{\topsep}{0in} \setlength{\partopsep}{0in}            \setlength{\leftmargin}{0.2in}}}{\end{list}}               \begin{document}          \name{SURNAME, Forename \vspace*{.1in}}          \begin{resume}     \section{\sc {\bf Contact}}     \vspace*{.05in}     \begin{tabular}{@{}p{2.6in}p{4in}}     Address line 1 & Phone:  0123456789\\                Address line 2 & E-mail:  someone@somewhere.com\\     Address line 3\\     Address line 4     \end{tabular}          \section{\sc {\bf Education}}     School Name\\      \vspace*{-.1in}     \begin{list1}     \item[] Degree Name     \begin{list2}     \vspace*{.05in}     \item[\sbt] Note 1: blah blah     \item[\sbt] Note 2: blah blah blah     \end{list2}     \vspace*{.05in}     \end{list1}          \end{resume}     \end{document}      I specifically want to change the margins and spacings of the current layout as the following:   1. Reduce the top margin (the space between the top-edge of the page and the name) to roughly 1/2 of what it is now. Correspondingly, reduce the bottom margin to be equal to the top margin, and get rid of the page number.   2. Reduce the right margin (the space between the right-end of the horizontal line and the right-edge of the page) slightly, so that the left and right margins are equal. I've tried using the `geometry` package, but it seems to mess up the layout completely and many of the margin settings do not seem to have any effect too. How should I configure my document to achieve both requirements above?


title: Creating a URL downloading command to be used with e.g. \includegraphics

text: We were just talking about an idea that may be a little further out there. Would it be possible to patch URL support into `graphicx.sty` or is there a package that would support this on a wider scale (I could imagine it would be useful for `pdfpages`, `listings` and similar as well)? It would need `\write18` support obviously, but at least `graphicx.sty` needs it already for some operations so that shouldn't be a problem. I assume for the general case one would need to define a macro. For `graphicx` one could cheat a little by defining a `.url` extension that would have a `curl`/`wget`/? rule. Ideally `\includegraphics{http://domain/file.png}` would work but I don't see how this would fit into `graphicx` current context without patching it massively. Alternatively I could see `\includegraphics{\grab{http://domain/file.png}}` or `\includegraphics{http://domain/file.png.url}`. Has someone done this before and wants to share? Is this sane?


title: Can I define a new shape with predefined filling and shading to be used in decoration?

text: I defined a new shape that draws a flower with predefined filling and coloring:               \makeatletter     \pgfdeclareshape{flower}{       \savedanchor{\center}{%         \pgfpointorigin}       \anchor{center}{\center}     \backgroundpath{%       \begingroup       \tikz@mode         \iftikz@mode@draw           \foreach \a in {60,120,...,360} {             \pgftransformrotate{\a}             \pgfpathellipse{\pgfpointxy{0}{0.7}}{\pgfpointxy{0.25}{0}}{\pgfpointxy{0}{0.5}}           }           \pgfpathcircle{\pgfpoint{0}{0}}{0.4cm}                \let\my@color\tikz@strokecolor!60!\tikz@fillcolor           \foreach \a in {30,60,...,360} {%             \pgftransformrotate{\a+7}%             \pgfpathmoveto{\pgfpointxy{0}{0.1}}             \def\y{0.6+0.05*rand}             \pgfpathlineto{\pgfpointxy{0}{\y}}             \pgfpathcircle{\pgfpointxy{0}{\y}}{0.05cm}           }         \fi         \iftikz@mode@fill           \begin{scope}             \foreach \a in {60,120,...,360} {               \pgftransformrotate{\a}               \pgfpathellipse{\pgfpointxy{0}{0.7}}{\pgfpointxy{0.25}{0}}{\pgfpointxy{0}{0.5}}             }             \pgfusepath{clip}             \pgfpathcircle{\pgfpointxy{0}{0}}{1.2cm}             \pgfutil@colorlet{tikz@radial@outer}{\tikz@fillcolor!70}             \pgfutil@colorlet{tikz@radial@inner}{\tikz@fillcolor!60!\tikz@strokecolor}             \pgfshadepath{radial}{0}             \pgfusepath{}           \end{scope}           % \tikz@mode@clipfalse                \let\my@strokecolor\tikz@strokecolor           \let\my@fillcolor\tikz@fillcolor                \pgfsetfillcolor{\my@strokecolor}           \pgfpathcircle{\pgfpointxy{0}{0}}{0.4cm}           \pgfusepath{fill}                          \foreach \a in {30,60,...,360} {%             \pgftransformrotate{\a+7}%             \pgfpathmoveto{\pgfpointxy{0}{0.1}}             \def\y{0.5+0.05*rand}             \pgfpathlineto{\pgfpointxy{0}{\y}}             \pgfpathcircle{\pgfpointxy{0}{\y}}{0.05cm}           }           \let\my@color\my@fillcolor           \pgfutil@colorlet{\my@color}{\my@strokecolor!60!\my@fillcolor}           \pgfsetstrokecolor{\my@color}           \pgfsetfillcolor{\my@color}           \pgfusepath{stroke,fill}         \fi        \endgroup      }     }     \makeatother      which results in a nicely filled and colored flower when used as:               \node[flower, fill=pink, draw=purple] {};      ![Flower](http://i.stack.imgur.com/kirRv.png) Still, I have several problems and questions, for which I am not able to find an answer myself. 1) if I do not use \begin{scope} and \end{scope}, I do not know how to stop clipping which I do in the filling section. Is there a way to avoid using scopes? Or it is completely fine to have them there? 2) In the drawing of stamens, their height can be slightly changed using random function                   \def\y{0.6+0.05*rand}         \pgfpathlineto{\pgfpointxy{0}{\y}}         \pgfpathcircle{\pgfpointxy{0}{\y}}{0.05cm}      but each time the value of \y is recalculated and I do not know how to fix it here. 3) If I do not specify the colors of stroke and fill               fill=pink, draw=purple      I get compiling errors. I even get errors if I use               \node[flower, fill, color=red] {};      In that case, how can I use the default colors? 4) I would like to define a new decoration that would decorate a path with flowers of random size, moreover I expect these flowers to be exactly the same as on the picture above. Here is the code of my decoration:               \pgfdeclaredecoration{flowers}{initial}{       \state{initial}[width=1cm]     {     \pgfmathparse{round(rnd*90)}     \pgftransformrotate{\pgfmathresult}     \pgfmathparse{0.2+rand*0.1}     \pgftransformscale{\pgfmathresult}     \pgfsetlinewidth{\pgfmathresult*\pgflinewidth}     \pgfsetcolor{pink}     \pgfsetfillcolor{pink}     \pgfsetstrokecolor{purple}     \pgfnode{flower}{center}{}{}{\pgfusepath{stroke,fill}}     }     \state{final}     {       \pgfpathmoveto{\pgfpointdecoratedpathlast}     }     }      My first problem is that I get "plain" flowers by calling               \draw[decorate, decoration={flowers}] (-4,-3) -- (4,-3);      ![Line decorated with flowers](http://i.stack.imgur.com/K6Z6Z.png) instead of a nice filling/coloring. What should I modify in the definition of flower? Then, I would prefer to use random step between the flowers, how it can be done?


title: documentclass: toc= bib _and_ listof

text: I'm having a document with list of figures, list of tabels (both after contents) and, in the end of the document, list of references.               \documentclass[a4paper,oneside,titlepage, toc=bib]{scrbook}      I'd like to include a reference to each of the three lists in the list of contents, therefore I'd need to add multiple parameters to toc=... , which i don't know how to achieve, like:               toc=bib, listof      Is there a possibility to add both parameters (bib and listof) to toc?


title: How do I do hanging indents in Context?

text: How do I do hanging indents in Context? I've been looking at the few examples that I've found, for example at http://wiki.contextgarden.net/MLA_style, but couldn't get anything to work as I want it. Also the `workscited` function in Context is not my way to go. I simply want to do a hanging indent, and can't find a straight forward way to do this. Below is a desperate (minimal not working) example trying to use TeX `hangindent`.               \setupindenting[1em]     \setuppapersize[A5][A5]               \starttext     \indenting[yes, next] % turn on regular indenting of first line of paragraph, excluding the first paragraph          \subject{A normal section}          This paragraph is not indented since it is the first one!          Hello and miau, this is the second paragraph that is indented by exactly one em, isn't it?          \subject{Works cited}          % We want those to be indented hanging: The first line should begin at the margin while following lines of each paragraph is indented by one em.          \hangindent=1em     \hangafter=1          Jaynes, Julian. {\os 1990}. {\em The Origin of Consciousness in the Breakdown of the Bicameral Mind}. New York City: Houghton Mifflin Company.          Pye, David. {\os 1995}. {\em The Nature and Art of Workmanship}. London: The Herbert Press.          Persson, Tomas. {\os 2008}. {\em Pictorial Primates: A Search for Iconic Abilities in Great Apes}. Lund: Lund University Cognitive Studies.          \stoptext      Would be grateful for any help with this! Thank you!