I'm typing exercises using the
\subsubsection
command, e.g.,Code: Select all
\subsubsection{Exercise~1}
\label{exc:1}
This is exercise~\label{exc:1}.
How do I get the latter of the two?
Thanks in advance!
\subsubsection
command, e.g.,Code: Select all
\subsubsection{Exercise~1}
\label{exc:1}
This is exercise~\label{exc:1}.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Code: Select all
\documentclass{article}
\begin{document}
\newcounter{exer}
\subsubsection{Exercise~1}\label{ex:1}
\stepcounter{exer}
This is subsubsection~\ref{ex:1} but exercise~\arabic{exer} within
\subsubsection{Exercise~2}\label{ex:2}
\stepcounter{exer}
This is subsubsection~\ref{ex:2} but exercise~\arabic{exer} within
\end{document}
Code: Select all
{\renewcommand{\thesubsubsection}{\arabic{subsubsection}.}\thesubsubsection}
\thesubsubsection
Code: Select all
\documentclass[a4paper,12pt]{article}
\usepackage[danish]{polyglossia}
\usepackage{mathtools}
\begin{document}
\tableofcontents
\section{Du får oplyst at cirklens omkreds kan beregnes ved formlen}
\begin{equation}
\label{omkreds1}
O = \pi \cdot d = 3{,}14 \cdot d,
\end{equation}
hvor $\pi$ \emph{altid} har værdien $3{,}14$. Din opgave er nu at
udregne cirlens omkreds $O$, når det oplyses at diametren er $d = 3$.
\label{opg:1}
\section{En anden formel for cirklen omkreds er}
\begin{equation}
\label{omkreds2}
O = 2 \cdot \pi \cdot r.
\end{equation}
Nu skal du måle $r$ på figuren [som ikke er indtegnet i opgaveformuleringen
endnu] og så bruge formel~\eqref{omkreds2} til at beregne omkredsen
$O$.\label{opg:2}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p