Don't use alternative section title in \tableofcontents My document uses titles like the following all over the place.  \section[short]{longlonglong}   The short title is used in page headers and the table of contents. The longlonglong title is only used at the section title itself.  How can I use the longlonglong title in the table of contents? I'd like to keep the page headers in thier current form.  Thank you!  Update:  \documentclass[12pt,a4paper]{report}  %\usepackage{../sty/reportpage}  \begin{document} \pagestyle{reportpage} \pagenumbering{roman} \setcounter{page}{1}  \cleardoublepage \renewcommand{\baselinestretch}{1.25} \small\normalsize  \tableofcontents  \renewcommand{\baselinestretch}{1} \small\normalsize  \cleardoublepage  \pagenumbering{arabic} \setcounter{page}{1}  \chapter[First Chapter]{The first chapter has a long title that only is shown as the chapters headline} Some irelevant text.  \cleardoublepage  more irelevant text.  \end{document}
How can I display a short chapter name in the header and a long chapter name in the ToC? I am writing a book and one of my chapters has a very long title. As it can't be displayed correctly on the top of even pages, I provide a "short title name" via the   \chapter[short title]{long title}   command. But then, "short title" appears in the table of contents instead of the original/true/long one.  How can I have the "short title" in the header of even pages, and the "long title" in the ToC and in the "Title header"?  For reference, here is the code I use:  \documentclass[11pt,a4paper]{book} \begin{document} \tableofcontents  \chapter[Short title]{Very vey very very very very very very long title     i can't display in the header} Lorem ipsum dolor sit amet, consectetur adipiscing elit. \end{document}
Check if convergent in the end points of the convergence interval I have to find the radius of convergence for $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}x^n$, for x$\in$R. I think it is $r^{-1}=\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=\lim_{n\to\infty}\frac{ \frac{n+1}{n+2} }{ \frac{n}{n+1}}=1$ so r=1. Then I have to find out if $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}x^n$ is convergent in  the end points of the convergence interval. I think I have to check for $|r|$. But we can't use ratio test (L=1) or integral test(not decreasing) for $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}$. How can I then check if it's convergent in the end points of the convergence interval? What is different about the Mac ISO image? How to add video to iphone simulator What is JSON and what is it used for? I've looked on Wikipedia and Googled it and read the official documentation, but I still haven't got to the point where I really understand what JSON is, and why I'd use it. I have been building applications using PHP, MySQL and JavaScript / HTML for a while, and if JSON can do something to make my life easier or my code better or my user interface better, then I'd like to know about it. Can someone give me a succinct explanation? Convergence of $\int\limits_1^{\infty}x^\alpha\sin(x^\beta)dx$ Accessing inherited variable from templated parent class Consider the following code:  template&lt;class T&gt; class Foo { public:   Foo() { a = 1; }  protected:   int a; };  template&lt;class T&gt; class Bar : public Foo&lt;T&gt; { public:   Bar() { b = 4; };    int Perna(int u);  protected:   int b;  };  template&lt;class T&gt; int Bar&lt;T&gt;::Perna(int u)  {    int c = Foo&lt;T&gt;::a * 4; // This works   return (a + b) * u;    // This doesn't }   g++ 3.4.6, 4.3.2 and 4.1.2 give error   test.cpp: In member function `int Bar&lt;T&gt;::Perna(int)': test.cpp:25: error: `a' was not declared in this scope   g++ 2.96 and MSVC 6, 7, 7.1, 8 and 9 accept it, as do (at least) older Intel and SGI c++ compilers.   Do the new Gnu C++ compiler obey the standard or not? If they do, what is the rationale behind that inheriting class is not able to see a protected inherited member variable?  Also, if there's  int A() { return a; }    in Foo, I get error  test.cpp:25: error: there are no arguments to A that depend on a template parameter, so a declaration of A must be available test.cpp:25: error: (if you use -fpermissiveâ, G++ will accept your code, but allowing the use of an undeclared name is deprecated)   when I try to use it in a member function of Bar. I find that curious as well: Bar inherits Foo, so I think it's obvious that A() in scope of Bar is Foo::A(). Is $7$ the only prime followed by a cube? ShellExecuteEx code 31 error any time I try to launch an EXE, how to find problematic driver? Can we clarify to the OP that their question is not yet closed and the duplicates are only suggestions? why is my screen black after rdp connection? After connecting from my home via remote desktop, both my screens are black when I arrive at work. The only thing I can see is a mouse pointer on one of the screens. I then seem to have only two choices: rebooting or working from a remote desktop connection, which works fine.  It did happen every time I tried last week.  However, I did the same from my laptop in a meeting room today, and I didn't have any problem. There's this proposal for a new S.E. site which is about to enter the beta phase. It reads  This proposal is in: Commitment A successful site needs people to commit to use it. This proposal is 100% complete. Committed users will be invited to the private beta soon.  I'd like to participate in the beta but I don't want to commit (due to a full name being required). Will I be unable to participate in the beta if I don't commit? How to export data as CSV format from SQL Server using sqlcmd? How to fix task manager memory column if it shows lies I have a problem in showing memory in task manager with memory and paging columns. Why it shows so small size usage? And maybe anyone knows how to fix it?  Here is a screenshot(working set, memory, page pool) sorted by most consuming: I would like to ask a question not about software architecture, but physical architecture, i.e., the design of buildings and other elements of the "built environment".  I was looking for a Stack Exchange site to ask what the meaning is of the huge stone symbols on the side of the new Scottish Parliament building. I saw a thing called VPN connections under the Internet button at the top of my screen.   So I would like more info on this, and possibly instructions on how to set one up. Thanks! What is the name for these type of images? I love these kind of graphics and it's so flat which totally matches my current product development.      Do we have a name for it? A name will make it easier to search for examples and how to's. How do I prevent yum from updating a particular RPM? For certain reasons I have to keep a slightly older version of a particular RPM installed on my box (Fedora 11). The problem is that every time I do a package update yum (or one of its GUI equivalents) wants to update this RPM to the latest version, which is annoying - especially when I update it by mistake.  Is there a way to 'pin' this version so that yum knows to never try and update it? Making a (simple) directory tree I'm trying to make a simple directory tree representation in LaTeX. Something like:  spam  |  +-- ham  +-- eggs      |      +-- more spam      +-- dead parrots   The tree won't be that long (say, 10--15 entries or so), with three or so levels, and is a one-off thing. So, quick-and-dirty solutions are welcome. When recommending tikz, please note that I have almost no experience with it, so I'd appreciate a clean simple solution, even if it doesn't look quite perfect.   On Tex.SE tikz is almost like the jquery recurring joke on StackOverflow..    Edit: As per Thorsten's suggestion,  is a nice and easy-to-use solution. The example from above could be written as:  \usepackage{dirtree} ... \dirtree{% .1 spam. .2 ham. .2 eggs. .3 more spam. .3 dead parrots. } How to check if a string starts with a specified string? Run bash script at login stored in the home folder? When I try to load a LaunchAgent plist from launchctl I can't find out how to run a script in the home directory.  My code is:  &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt;     &lt;key&gt;ProgramArguments&lt;/key&gt;     &lt;array&gt;         &lt;string&gt;bash&lt;/string&gt;         &lt;string&gt;~/script.sh&lt;/string&gt;     &lt;/array&gt;     &lt;key&gt;RunAtLoad&lt;/key&gt;     &lt;true/&gt;     &lt;key&gt;Label&lt;/key&gt;     &lt;string&gt;com.tyilo.test&lt;/string&gt; &lt;/dict&gt; &lt;/plist&gt;   I have tried both with and without bash and also replacing ~ with $HOME. I have also tried using bash -c without it working.  The error code is:   `com.tyilo.test: bash: ~/script.sh: No such file or directory`