title: LaTeX - Get the name of an unnumbered subsection
body: <p>I'm writing a LaTeX document and I need a way to get the name of the subsection I'm in. I know how to get the name of a subsection as long as it's numbered, the problem is that my subsection isn't.</p>
  
  <p><strong>Numbered Subsection</strong></p>
  
  <pre><code>\let\Subsectionmark\subsectionmark
  \def\subsectionmark#1{\def\Subsectionname{#1}\Subsectionmark{#1}}
  </code></pre>
  
  <p>And then you just have to use the following code to get the name of your subsection:</p>
  
  <pre><code>\subsection{numbered}    
  \Subsectionname %Will be "numbered"
  </code></pre>
  
  <p><strong>Unnumbered section</strong></p>
  
  <p>My problem comes when I try to do the following:</p>
  
  <pre><code>\subsection{numbered}  
  \subsection*{unnumbered}    
  \Subsectionname %Will be "numbered"
  </code></pre>
  
  <p>I was wondering if there is an easy way to get the name of the unnumbered subsection.</p>