I am trying to markup certain words in my text and automatically commit them to the index, with the option to modify the index entry. The \newcommand approach was not satisfying, as I did not manage to set the default value of the first argument to be the second. With \NewDocumentCommand I managed to set the options properly, but it introduced an unwanted space when followed by punctuation. Can anyone explain, why this occurs and how to fix it? Here is a minimal working example: \documentclass{article} \usepackage{xparse}     \newcommand{\neuold}[2][]{{\sffamily\textbf{ #2}}\index{#1 #2}}  \NewDocumentCommand{\neu}{m O{#1}} { \IfNoValueTF{#2} {{\sffamily\textbf{#1}}} {\sffamily\textbf{ #1}\index{ #2}} }  \begin{document} blabla  \neu{test}, blabla \neuold{test}, blabla \end{document}
I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
What is the concept of erasure in generics in Java? Will acceleration rate of expansion of space become faster than speed of light? Motherboard BEEPS Code I am using a Gigabyte motherboard. Today my screen suddenly went black and the beep sound began. I tried to restart my PC, but when it tried to boot into Windows, the same beep sound appear again. I had to totally power off the PC and start it again to get it to run properly.  I am curious about the beep sound and want to know why my PC crashed. The beep code is a repeating, long beep code. Something like "BEEEEEEEEEEEEP ........ BEEEEEEEEEEEEP  ........ BEEEEEEEEEEEEP".  I tried online search, but I can't find my beep code. Do you know what it means?  Thank you. How can I add a new value to a picklist using APEX? I have queries pulling all of the information correctly but what I can't seem to find was a way to add new options to a picklist using APEX.  I currently have   Package__c.Products__c.add(new Schema.PicklistEntry(products[j].Name));   Package__c is my custom object, and Products__c is the picklist. products[j] is pulling a list of products pulled from our products page.  And I've tried adding it as a select option, or even casting the variable type.  And this information has to go to the actual picklist within a custom object, and not within a visual force page or anything like that. Why does centering not work with calligra? I'm trying out the calligra package for a wedding order of service. Just trying to make the titles look a little nicer. When I use the \centering command, however, it doesn't seem to work:  \centering Test1\\ \calligra{Test}   Produces calligraphic text that doesn't seem to be centered. Is this fixable?    Thanks all,  James $(document) vs. $("document") Proving surjectivity of $\cos(z)$ and $\sin(z)$ and find all $z : \cos(z) \in \mathbb R$ and all $z: \sin(z) \in \mathbb R$ Unknown site on Android app When I select the unknown site (i.e. the meta sites) the app crashes.   I have a Samsung Note 5 and version 1.0.89 of the app. Are there any Combinatoric proofs of Bertrand's postulate? I feel like there must exist a combinatoric proof of a theorem like: There is a prime between $n$ and $2n$, or $p$ and $p^2$ or anything similar to this stronger than there is a prime between $p$ and $(\prod_p p) + 1$ (Euclid's theorem).  I was trying to prove one by the Sieve on this grid      1     2     3     4 ... p   p+1   p+2   p+3   p+4 ... 2p  2p+1  2p+2  2p+3  2p+4 ... 3p ........................... ........................... ........................... p^2 p^2+1 p^2+2 p^2+3 p^2+4 ...   but it did not work.  Do any good arguments like this exist? I don't expect anything as strong as Prime Number Theorem or even Bertrand, but surely a direct combination proof can prove that there are lots of primes? Need help identifying the fantasy book about a portal to a fantasy land in the basement of a house I can't remember any names of characters or locations where the story took place but I do remember the basic plot of this early 90's novel; a human man inherits his father's house. In the basement there is a doorway to a fantastic land where adventure ensues. He fights elves and wins their deadly elf swords which he buries under concrete at the end of the novel (because if you don't get rid of them they will come back and get you).  At the end of the novel he must remake the world in his own imagination, turning the tough Elf King into a cobbler and making Jesse Jackson President. I have been looking high and low and have drawn a blank.  Any help would be appreciated. Thanks! I suspect that some bug makes internal linking count towards Publicity badges too. The badges :  These badges are specifically for linking to questions like the description says. The link must be clicked from outside the network in order for it to count for this purpose.  However, 2 days ago I was  for a question that I really feel does not need such linking to start with: . Also, I always try to use full links. And above all:  for the link gives me a single hit, for . Maybe it's thinking that empty REFERER headers (for those that block that, or for Safari users who ) should be counted too? Or maybe some search bot is using lots of IP addresses? Or visitors of Stack Overflow clones are to blame? Where can I find a list of all the Stack Exchange sites?  I need to ask a question about cars (where my total knowledge is about zero) but I can't find a cars Stack Exchange site - tried guessing all the obvious (and pun based) names.  I assume the list of a dozen or so at the bottom of this page is only a subset? There must be a site on a topic as geeky as cars!  A list of future/beta sites would also be useful - I found a few on topics I'm interested in only after they had been up for a while. What "allocation unit size" should I use for a drive with a single NTFS partition? I'm formatting a 1TB external hard drive as a single NTFS partition.  This drive is mainly meant for storing media.  Should I choose something other than the default allocation unit size?  The options range from 512 bytes to 64K.  Are there any guidelines that I should use with partitions storing other data?  Should I stop poking around and just leave it at "default"? How to convert a number to words in MS Excel Android app? Excel Macros are unsupported in Android and there is also no SpellNum Function in Android . I want a function which can convert a number to words. Is there any way we can achieve this ? eg -  40004  , should be converted to Forty Thousand Four The latex file coding is not there but the pdf file is there I wrote all my coding in the .tex file. The next day when I opened it the coding is all gone and the pdf file is opening with it and is displayed as an output. How do I bring back my coding? Why does my wildcard SSL certificate cause a domain mismatch error on a second level subdomain? What are SPF records, and how do I configure them? This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info. What is $\int_{-\pi}^\pi \cos(nx)\cos(mx)\,dx$? Why is my camera limited to a shutter speed of 1/250th when the flash is up? Sometimes in bright backlight and with large aperture (f2.8) I want flash at high shutter speeds.  But when I pop the flash up on D7000 it caps the shutter speed to 1/250th, which overexposes the shots and makes everything look like a nuclear bomb just went off.  What's the logic behind the limiting of the shutter speed when using flash? Is there anything I can do to get flash  + faster shutter speeds? Does $\int_{ - 1}^1 {\frac{1}{x}dx} = 0 \text { or } \infty $?