I use my own version of subsections for definitions:  \newcommand{\definition}[2]{\addtocounter{subsection}{1} \subsection*{\thesubsection ~ Definition (#1) \text{\normalfont{#2}}}}   I use them as:  \definition{DefinedThing}{\cite{Book}[Page 64]} \label{def:DefinedThing}   This works great, the only problem I have is that the references do no longer work now:  \ref{def:DefinedThing}   This reference does only refer to the section in which the definition is used, not to the actual subsection it represents (for example it refers to "2" instead of to "2.5"). Is there a way to fix this? Maybe by increasing the counter for the \label{}.
I created a custom counter 'rtaskno' and a command '\rtask' as following:  \newcounter{rtaskno} \newcommand{\rtask}{%    \stepcounter{rtaskno}%    \thertaskno}   I like to use them as following:  \section{Task \rtask. Blah Blah..}  \section{Task \rtask. Blah Blah..}  \section{Task \rtask. Blah Blah..}  \section{Task \rtask. Blah Blah..}   Later in the text, if I want to cross-reference 'Task 3', how can I do it? Where to put label?
How does IPv4 Subnetting Work? window.onbeforeunload and window.onunload is not working in Firefox, Safari, Opera? How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &amp;= m(-1)+b \\ 4 = f(2) &amp;= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective. Ever since Everything That Happened with Stack Exchange, it's understandable that many users are hesitant to get re-involved on SE.  It's understandable that  are deleting their own accounts, out of protest, or out of frustration, or for many other reasons.  But I have noticed that, at the very least on , where I spend most of my time, questions are getting fewer views and fewer answers, fewer votes are being cast, and fewer questions themselves are being asked.  I've also noticed that flags are taking a long time to be processed, probably because of the fact that Writing.SE .    Are other sites also experiencing inactivity?  Is this in direct correlation with Everything That Happened?  Is it just this site, or are other sites experiencing the same patterns as well? Can a Rogue (D&D 3.5) use sneak attack on both the first and second attack? I know this seems like a question you can simply Google but the answers vary and my clan is under the impression that I can only use it on my first attack (once per round) and not on my second attack.  From Googling, I've understood that as long as the monster / enemy is flat-footed, flanked or caught off-guard, I can apply sneak attack on both my first and second attack in a round.  Is this correct?  Is it normal if the clan simply decides that that gives me an unfair advantage in combat and gives me only one sneak attack per round? "I", "me" and "myself" Possible Duplicate:           What is correct? We are a family of four: my father, my mother, my brother and me. or We are a family of four: my father, my mother, my brother and I. or We are a family of four: my father, my mother, my brother and myself. Mock vs MagicMock Overleaf does not compile after using Biblatex Why does my procedure run slowly until I update statistics? How to manage and restore a modern iPhone or iDevice on ubuntu with iTunes This question—how to install iTunes on ubuntu—has been asked many times before on this site, but the answers are all outdated and involve Wine or some other tool that no longer works for the most recent version of iTunes. Put simply, I need to regularly back up and occasionally restore the firmware on an iPhone 6.   I cannot:   dual boot Windows—for some reason installing one OS makes the other unbootable &amp; after days of headache &amp; dozens of reinstalls I’ve decided to just leave Ubuntu be &amp; not try to preserve Windows. Plus “just use Windows” is not really a solution on an Ubuntu forum. use libimobiledevice-dev. libimobiledevice-dev doesn’t let you manage iOS updates or sync music anymore. Buy another phone. This one should be obvious but for some reason some asshat always comments “too bad lmao shouldntve bought an iphone ;P”. When you cast invisibility on your turn, and walk away from 2 enemies, do they get an attack of opportunity? When a PC is in melee with a creature, casts the basic invisibility spell, and leaves melee, does an NPC get an attack of opportunity? "E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened." So I keep trying to install things on my laptop and whenever I try to use sudo apt-get I get the same errors every  time,  SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened.   Also whenever I try to open software Center through my desktop Icon it will just freeze leaving me to force quit.  If I try to use the command software-center in my terminal I get the longest list in the world which is,   che.open() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in &lt;lambda&gt;     return (lambda data: callback(*data), user_data)   File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open     self._cache = apt.Cache(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__     self.open(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. 2013-10-13 10:13:52,685 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in &lt;lambda&gt;     return (lambda data: callback(*data), user_data)   File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open     self._cache = apt.Cache(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__     self.open(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. 2013-10-13 10:13:57,365 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open() Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in &lt;lambda&gt;     return (lambda data: callback(*data), user_data)   File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open     self._cache = apt.Cache(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__     self.open(progress)   File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open     self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened.   That's only about one-tenth of the list which is too long to read. I need help, if anyone has an answer please respond Term to describe users' initial dislike of user interface change What is the best term to describe the fact that most users have an initial dislike of any change to a UI even though it may really be net better over time?  Note: Question originally appeared Choosing numbers without consecutive numbers. In how many ways can we choose $r$ numbers from $\{1,2,3,...,n\}$,   In a way where we have no consecutive numbers in the set? (like $1,2$) From an array of objects, extract value of a property as array How to configure lightdm to allow manual logins in Ubuntu 14.04 I used to modify /etc/lightdm/lightdm.conf, adding the line greeter-show-manual-login=true, in order to allow login for hidden users and root.  Now I've just installed the new Ubuntu 14.04 and the file lightdm.conf is no longer located in /etc/lightdm. It's in /etc/init and has been totally modified.  How can I force lightdm login screen to show a field to input a login name? Why does an object with a glossy shader render in black? How to tweet using terminal? Provide a means to reward users and their answers (decoupled from bounties) How do I install python imaging library (PIL)? How do I install the python imaging library (PIL) on Ubuntu?  I tried doing  sudo apt-get install python-imaging   but now when i run     python selftest.py (a script I got from somewhere on the  website) I get (among other warning messages):  ... *** JPEG support not installed *** ZLIB (PNG/ZIP) support not installed ... *** 1 tests of 57 failed.   Have I somehow messed up the PIL -- how do I fix that?  Is maybe the PIL just fine, but that "selftest.py" is not really the right program for checking to see if PIL is installed properly -- how else can I tell if PIL is installed properly or not?  (I'm using Ubuntu 12.04 LTS "Precise Pangolin").  (What I'm ultimately trying to do is to add a 2D barcode generator to some python code, and all the 2D barcode generators I could find that were written in python all seemed to use the PIL).