I'm wondering if there's a way to tell (Xe)LaTeX to handle \chapter as \section, \section as \subsection and so on when inputting a document via \input into another document.  The setting is: I have a text with minimal LaTeX Markup. I need to use this text in two different environments / two different root files.  One produces my "standalone" Version of this text where I need big headings and the other one is a thesis referring to this text where I need to level-down the headings, because it's part of a \chapter. Any ideas?    text file "text.tex"  \chapter*{Introduction} Bla Bla \section*{Point 1} ...     root file #1:  \begin{document} \input{text} \end{document}     root file #2:  \begin{document} \chapter{First ideas to my text} ... \chapter{My way to my text} ... \chapter{The final text} \input{text} \end{document}
Consider following structure:  . |_s |_s  |_ss  |_ss+   |_sss  |_ss |_s |_s   How can I demote a subsection to subsubsection without changing markups ?  . |_s |_s  |_ss   |_sss+    |_p  |_ss |_s |_s   How can I promote a subsection to section without changing markups ?  . |_s |_s  |_ss |_s+  |_ss  |_ss |_s |_s   A wrapper command would be excellent  \begin[+1]{level} \section{} \end{level}
Variable parameters in C# Lambda How to get the spaces properly on the x axis, how to place the y values on the corresponding bars? I am using the following commands to draw a barchart.  \begin{tikzpicture}         \pgfplotstableread{ % Read the data into a table macro             Label       Female   Male               2006-2008    3     1              2007-2009    2     0             2008-2010    9     2             2019-2011    3     3             2010-2012    11    1              2011-2013    6     0             2012-2014    12    7             2013-2015    10    7             2014-2016    10    3         }\datatable          \begin{axis}[         compat=newest, %Better label placement %        axis on top,         ybar stacked,   % Stacked horizontal bars         xmin=0,              % Start x axis at 0         ymax=25,         ymin=0, ylabel={Number of students}, xlabel={Batches},bar width=10pt,         y axis line style={opacity=0},         yticklabels={\empty},         ytick style={draw=none},enlarge y limits={upper, value=0.2},         xtick=data,     % Use as many tick labels as x coordinates         enlarge x limits = .2,         xticklabels from table={\datatable}{Label}  % Get the labels from the Label column of the \datatable         ]         \addplot [fill=yellow] table [y=Male, x expr=\coordindex] {\datatable};    % Plot the "First" column against the data index         \addplot [fill=green!70!blue]table [y=Female, x expr=\coordindex] {\datatable}; %        \addplot [fill=red!80!yellow] table [y=Third, x expr=\coordindex] {\datatable}; \legend{Male,Female}         \end{axis}         \end{tikzpicture}   I got the picture as,     How to get the spaces properly on the x axis? How to place the y values on the corresponding bars? How to rotate the label 90 degree? How to take out the ticks on the top? Is there any other way of representing this data(two dim only)? (optional)   I hope all the questions can be answered in a single answer? Here's the information :     There are four different pairs of   opening and closing tags which can be   used in PHP. Two of those, &lt;?php ?&gt;   and &lt;script language="php"&gt; &lt;/script&gt;,   are always available. The other two   are short tags and ASP style tags, and   can be turned on and off from the   php.ini configuration file. As such,   while some people find short tags and   ASP style tags convenient, they are   less portable, and generally not   recommended.   In my experience most servers do have short tags enabled. Typing  &lt;?=   is far more convenient than typing  &lt;?php echo    The programmers convenience is an important factor, so why are they not recommended? I bought a Minecraft account for my little brother for Christmas, and I'd like to play with him on my server every now and then. If I log in while he's on, however, it kicks him off since we have the same username. Is there any way to change my username so that I can play with him, or anything I can do so that we can both play together using this account on my server?  I'm open to anything that could let us play, whether it be username changes, server property changes, etc. Closed-form expression for $\sum_{k=0}^n\binom{n}kk^p$ for integers $n,\,p$ Is there a closed-form expression for the sum $\sum_{k=0}^n\binom{n}kk^p$ given positive integers $n,\,p$? Earlier I thought of this series but failed to figure out a closed-form expression in $n,\,p$ (other than the trivial case $p=0$).  $$p=0\colon\,\sum_{k=0}^n\binom{n}kk^0=2^n$$  I know that $\sum_{k=0}^n\binom{n}k=2^n$ and $\sum_{k=0}^nk^n=\frac{k^{n+1}-1}{k-1}$ but I am unsure of whether these would be of much use now.    Additionally, what about the similar series $\sum_{k=0}^n\binom{n}kk^n$ where $p=n$? Cannot move std::unique_ptr with NULL deleter to std::shared_ptr? How do I find out which process is eating up my bandwidth? I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.   This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.  I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?  The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.  I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue. Explicit vs implicit SQL joins Properties of p-adic valuations Let $n$ be a integer not equal to zero, $p$ a prime and $$|n|_p = p^{-\operatorname{ord}_p(n)}; |0|_p=0$$  Proposition: $|xy|_p=|x|_p|y|_p$  We want to show: $\operatorname{ord}_p(ab)=\operatorname{ord}_{p}(a)+\operatorname{ord}_p(b)$ So if we suppose there is a largest integral $v$ such that $p^{v}|(ab)$, then we can split up v such that $p^{v_1}|a,p^{v_2}|b$. If we suppose that there exist $v_1,v_2$ with them both being the largest integers such that $p^{v_1}|a, p^{v_2}|b$,  with $v_1+v_2= : v $ then $p^v|ab$. (I don't believe this to be a formal proof but rather my best own "idea" I can come up with...)  The script also mentions that the padic valuations' sums are bounded: $|x+y|_p\le \sup\{|x|_p,|y|_p\}$, how to show this?   Edit:   According to Robert Israel and Bill Dubuques answers, the first proposition is proven, if I understood correctly:   Given $ord(a)= v$ and $ord(b) = u$ which is the same as $a:= p^{v}m, b:= p^{u}n$ with $gcd(m,p)=gcd(n,p)=1$, because $ab=p^{u+v}mn$ with $gcd(mn,p)=1$ it follows that $ord(ab)=ord(a)+ord(b)$ and so $|xy|_{p}=p^{-ord(xy)}=p^{-(ord(x)+ord(y))}=|x|_{p}|y|_{p}$  Now to show: $|x+y|_{p}\le sup\{|x|_{p},|y|_{p} \}$  and the second can be tackled like this: set $a:=p^{v}m. b:=p^{u}n$, then checking two cases $1:(u=v)$ and $2:(v&lt;u)$: $(a+b)=p^{v}m+p^{u}n= p^{v}(m+p^{u-v}n)$ so in case of (u=v) it follows that  $ord(a+b)= u = sup\{ord(a),ord(b)\}$  and in case of $(v&lt;u)$ because the biggest v is $v:= u-1$: $ord(a+b)\le p^{u-1}(m+pn) \le p^{u}(m+n)= sup\{ord(a),ord(b)\}$  It seems that I did something wrong in both cases... Given the positive integer numbers $n$,prove that $$\sum_{k=1}^{2^{n-1}}\sigma{(2^n-2k+1)}\sigma{(2k-1)}=8^{n-1}$$  where $\sigma(n)$ is defined as $$\sigma{(N)}=\sum_{d|N}d$$  This problem I think is very interesting, and have nice methods?  Thank you everyone.  and I find some of this     or can see: Simple Math Problem A bat and ball cost \$1.10.  The bat costs a dollar more then the ball.  How much does the ball cost?  If this is not the correct place to ask a question like this please tell me and I will remove it :)     The ball costs \$0.05, not \$0.10 I am working on refactoring some old code and have found few structs containing zero length arrays (below). Warnings depressed by pragma, of course, but I've failed to create by "new" structures containing such structures (error 2233). Array 'byData' used as pointer, but why not to use pointer instead? or array of length 1? And of course, no comments were added to make me enjoy the process...  Any causes to use such thing? Any advice in refactoring those?  struct someData {    int nData;    BYTE byData[0]; }   NB It's C++, Windows XP, VS 2003 Is the uncertainty principle a property of elementary particles or a result of our measurement tools? In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected. How do I craft command blocks? I went to my friends house, and he was playing Minecraft on the PC. He showed me a command block, but when I went home and opened Minecraft pocket edition, I went to the crafting table but I could not find any command blocks to craft.  What are command blocks and how do I craft them? How do I implement a draggable tab using Java Swing? Instead of the static JTabbedPane I would like to drag-and-drop a tab to different position to rearrange the tabs.  EDIT: . Why does this not work with an imaginary exponent? Let $A$ be a $3\times 4$ and $b$ be a $3\times 1$ matrix with integer entries.Suppose that the system $Ax=b$ has a complex solution. Then which of the following are true? (CSIR December 2014)         $Ax=b$ has an integer solution.    $Ax=b$ has a rational solution.   The set of real solutions to $Ax=0$ has a basis consisting of rational solutions.   If $b$ is not equal to zero then $A$ has positive rank.      Is it possible to say that 1 and 2 are true as $Ax=b$ has a complex solution? If not  what we have to understand from the statement "the system $Ax=b$ has a complex solution " ? What about 3 and 4  ? When my receiver that I have hooked up to my pc turns on it causes my monitors to turn black is there a way to stop this? Why is it called a quadratic if it only contains $x^2$, not $x^4$? Should it not be bidratic or didratic etc? "Open in browser" does nothing when Android app is set as default