As I understand I can define new commands using  \newcommand{name}[num]{definition}   An example is   \newcommand{\E}[1]{\mathbf{E}_{#1}}   Now I can use this in my text as follows  \E{\theta}   to print \mathbf{E}_\theta  Is it possible to pass the argument as a subscript instead of coding it between braces?   I would like to code it as  \E_\theta   which is more natural for me. I would also like to add a second argument so that I get  \mathbf{E}_\theta[X]   by coding it with  \E_\theta{X}
Accoring to Joseph Wright's answer at   The k-type argument has recently been adjusted: you now want e-type  Questions:  What is the functionality of the new e-type argument and how does it differ from the previous k-type argument?  The 2016-11-21 version of the xparse documentation does not mention the k-type argument at all. Is the plan to leave the earlier k functionality intact (but deprecated so no documentation) or will it eventually be removed and any usage of that should eliminated? If the plan is for it to be removed, how long will the older k-type argument functionality be kept in xparse.   Code: Example of the k-type argument from . Would be useful to see how this would be modified to use the new e-type argument. \documentclass{article}  \usepackage{amsmath} \usepackage{xparse} \usepackage{xcolor}  \NewDocumentCommand\MyMacro{k_}{%     \IfNoValueTF{#1}{%         \mathbf{A}     }{%         A_{\textcolor{red}{#1}}     }% }  \begin{document}  With a subscript: $\MyMacro_{\pi}$   Without any subscript: $\MyMacro$   \end{document}
Punctuation of a Direct Quote Is any particular punctuation necessary when a quotation is the subject of a sentence? For example, in the sentence below, should there be a comma after export? Or anything else?     "Laughter is America's most important export" is a well-known quote of Walt Disney's. How come  with  set to dragons didn't stop 's effect from being activated? If $a_{ij}=\max(i,j)$, calculate the determinant of $A$ If $A$ is an $n \times n$ real matrix and       $$a_{ij}=\max(i,j)$$       for $i,j = 1,2,\dots,n$, calculate the determinant of $A$.   So, we know that   $$A=\begin{pmatrix} 1 &amp; 2 &amp; 3 &amp; \dots &amp; n\\  2 &amp; 2 &amp; 3 &amp; \dots &amp; n\\  3 &amp; 3 &amp; 3 &amp; \dots &amp; n\\  \vdots &amp; \vdots &amp; \vdots &amp; \ddots  &amp; \vdots\\   n&amp; n &amp; n &amp; \dots &amp; n \end{pmatrix}$$  but what do I do after? Sum of two squares modulo p I have heard somewhere that for all primes $p$, for all $k$, there exist $x, y$ s.t. $x^2 + y^2\equiv k \pmod{p}$? I recall that the proof is very elementary, but I can't remember such a proof. How would one prove this? One way is to use Cauchy-Davenport, but I don't think that this is the simplest solution. Clicking community promotion ad renders an instance of SO within the frame of that ad Today I came across an ad on this question on SO:  (I don't expect it to stay very long).   There was a community promotion ad on the right hand side of the site, I think for one of our English sites. It had a sentence that I only partially remember:     Idiom ... poor or even poorer   I found it interesting, so I clicked that ad. Which caused a new instance of SO to open within the ad space. Unfortunately I failed to take a screenshot. I've been refreshing the page like crazy, but can't get the ad to appear again.  Edit: I managed to get a new community add, for the photography site, and captured a screenshot:   Edit2: This bug still persists, I saw it today with an OOP add from CodeReview, and an area 51 add. When conducting multiple regression, when should you center your predictor variables & when should you standardize them? I have been given a Bode plot of a low pass filter, and tasked with essentially reversing the effects by using a high pass filter. I have solved for the transfer function which is the first equation, and I am assuming the inverse transfer function will give me the information I need to construct the high pass filter. I know the values for \$z\$ and \$p\$. Is there a method given any transfer function to realise the circuit elements required? $$H(s) = 0.17\frac{s-z}{s-p}$$ $$H(s)^{-1} = 5.88\frac{s-p}{s-z}$$ Suppose that $f$ is holomorphic on $\mathbb C$ and that $\Re(f(z))\ge 0$ for all $z$. Show that $f$ is constant. [Hint: consider $e^{−f(z)}$.]   My thoughts: If $\Re(f(z))\ge 0 $ holds, then $e^{−f(z)}$ is a bounded holomorphic function (do I need to prove this or is it obvious?) So then by Liouville's Theorem $e^{−f(z)}$ is constant.   But then I'm not sure how to rigorously go from this $\exp(−f(z))$ back to $f(z)$.   Could anyone help me piece this together please?  Thanks XML DML for 2008 R2..How to modify nested Elements Compare two objects in Java with possible null values I am flying from Orange County, California to San Francisco, California and then on to Seoul, South Korea. If I check a bag will I have to pick it up in San Francisco and re-check it and go through security or customs for the international flight?  Everything I am reading leads me to believe that it's only necessary to re-check baggage and go through security and/or customs when you are first arriving into a country. However, since my first leg is staying within the United States I assume the airline will transfer my bag to the next flight and I can just go straight to the gate for my international flight?  Both legs of the flight are through the same airline (United Airlines) and there are only the two legs: OC -> SF, then SF -> Seoul. Resolve the error "An illegal choice has been detected..." If $x_1=5$, $x_{n+1}=x_n^2-2$, find $\lim x_{n+1}/(x_1\cdots x_n)$ Configuring auto-completion with TeXstudio TeXstudio does a pretty good job with autocompletion. For example, when I type \eqref{, it already comes with suggestions, see the example below.    However, suppose that I don't want to use \eqref but a customized command using newcommand (I do this so that I can quickly switch to different styles, e.g., some for journals/conferences "Eq. (1)" is needed, whereas sometimes "(1)" suffices). In this case, TeXstudio does not do the auto-completion, see the example below.    Is it possible to configure TeXstudio such that it does the auto-completion for custom commands that require a reference?  Note that one option is to redefine \eqref using \renewcommand, but I'm looking for another way so that I can use if for many more commands, not just for \eqref.   Here is my MWE:  \documentclass{article} \usepackage{amsmath}  \newcommand{\alternative}[1]{Eq.~(\ref{#1})}  \begin{document}     \begin{equation}         \label{eq:emc2}         E = mc^2     \end{equation}     I can refer to the equation using \eqref{eq:emc2} and using \alternative{eq:emc2}. \end{document} Use a vector as an index to a matrix Finding all group homomorphisms of $S_n\to\mathbb{C}^*$ and $A_n\to\mathbb{C}^*$ I need to find all group homomorphisms of $S_n\to\mathbb{C}^*$ (for $n\ge2$), and also all group homomorphisms of $A_n\to\mathbb{C}^*$ (for $n\ge2$).  Someone on this site, two years ago, seems to have already asked the same question (). I understand what the questioner says there, but I don't understand it when he says:     Therefore there is exactly one $g:\mathbb{Z}/2\mathbb{Z}\to\mathbb{C}^*$, so all elements of $a\in\mathbb{C}^*$ give us $\operatorname{ord}(a)\mid g[\mathbb{Z}/2\mathbb{Z}]$, so $a$ can only be $-1$ or $1$. Now we know that $f:S_n\to\{-1,1\}$ &hellip;   What is he saying there? And how to go on from there? (I do not understand the answer given either &hellip;)  I hope that someone here can help me further. (And if I'm not allowed to ask this question because is has already been asked two years ago, please tell me what to do instead).  Thank you in advance! When in Demon Form, are demons vulnerable to mortal frailties? When a Demon is in Demonic Form, does he gain any intrinsic protection against mundane concerns like breathing or falling unconscious? In particular, when in Demonic Form do/are demons:  need to breath? immune to poisons? fall unconscious? (ie do they stay conscious on full lethal?) suffer from wound penalties for having damage in last 3 boxes? need to consume food/water? need to sleep?  The last two are only really a concern to demons who have burnt their last cover. However this can happen in play, and is pretty significant for any burnt NPCs. Is seems odd that a swarm of glass beetles clinging together into the shape of a man might have any issues with being poisoned. But I can't find it clearly stated, whereas it is clearly stated in Werewolf (the Forsaken). Is there any value in full 'beginner's kit bundles'? Insert Login IP Ranges using apex in salesforce Is it possible to insert to Login IP ranges via apex? How Can I Expand A Tilde ~ As Part Of A Variable? When I open up a bash prompt and type:  $ set -o xtrace $ x='~/someDirectory' + x='~/someDirectory' $ echo $x + echo '~/someDirectory' ~/someDirectory   I was hoping that the 5th line above would have went + echo /home/myUsername/someDirectory.  Is there a way to do this?  In my original Bash script, the variable x is actually being populated from data from an input file, via a loop like this:  while IFS= read line do     params=($line)     echo ${params[0]} done &lt;"./someInputFile.txt"   Still, I'm getting a similar result, with the echo '~/someDirectory' instead of echo /home/myUsername/someDirectory.