If you redefine \thesubsection
it would carry over to the TOC:
\renewcommand*{\thesubsection}{\thesection~\S~\arabic{subsection}}
Or start by adding it to \thesection
:
\renewcommand*{\thesection}{\arabic{section}~\S}
\renewcommand*{\thesubsection}{\thesection~\arabic{subsection}}
Note, I used ~
instead of \
because a line break between number and ยง is not very desirable.
The option listofformat
controls the way subfloat numbers are typeset in the List of Figures/Tables and the actual format of the string produced by the \subref
command. To change this format, you have to declare a new format using \DeclareCaptionListOfFormat
and then use this new format in \captionsetup
. In the second argument of the \DeclareCaptionListOfFormat
command, #1
represents the float number and #2
represents the subfloat number. So to obtain the space between the float number and the subfloat number in the the LoF/LoT and when using \subref
, you'll have to do something like the following:
\documentclass{book}
\usepackage[demo]{graphicx}
\usepackage[lofdepth]{subfig}
\DeclareCaptionListOfFormat{myparens}{#1~(#2)}
\captionsetup[subfloat]{listofformat=myparens,listofnumwidth=4em}
\begin{document}
\listoffigures
\chapter{Test Chapter}
\section{Test Section}
\subref{fig:sub1}
\begin{figure}
\centering
\subfloat[Text 1 In Toc][Text 1 in document\label{fig:sub1}]{\includegraphics[width=3cm]{name1}}\qquad
\subfloat[Text 2 In Toc][Text 2 in document\label{fig:sub2}]{\includegraphics[width=3cm]{name2}}
\caption{test}
\end{figure}
\end{document}
Here's the List of Figures obtained:
![enter image description here](https://i.stack.imgur.com/LTmms.png)
and a fragment of the document, showing the output produce by \subref
:
![enter image description here](https://i.stack.imgur.com/9sqgz.png)
If you only want to change the way \subref*
(note the star) typesets the string associated to a subfloat, without affecting the entries in the Lof/Lot, you have to declare a new format using \DeclareSubrefFormat
and then use this format in \captionsetup
. In the second argument of \DeclareSubrefFormat
you can use #1
(the string associated to the float), #2
(the string associated to the subfloat), #3
(the value of the float counter) y #4
(the value of the counter associated to the subfloat). A little example producing a space between the float and subfloat numbers:
\documentclass{book}
\usepackage[demo]{graphicx}
\usepackage[lofdepth]{subfig}
\DeclareSubrefFormat{myparens}{#1~(#2)}
\captionsetup[subfloat]{subrefformat=myparens}
\begin{document}
\listoffigures
\chapter{Test Chapter}
\section{Test Section}
\subref*{fig:sub1}
\begin{figure}
\centering
\subfloat[Text 1 In Toc][Text 1 in document\label{fig:sub1}]{\includegraphics[width=3cm]{name1}}\qquad
\subfloat[Text 2 In Toc][Text 2 in document\label{fig:sub2}]{\includegraphics[width=3cm]{name2}}
\caption{test}
\end{figure}
\end{document}
Now the LoF looks like this:
![enter image description here](https://i.stack.imgur.com/rrBBQ.png)
and the fragment showing the output of \subref*
:
![enter image description here](https://i.stack.imgur.com/fiujS.png)
Best Answer
You should be able to modify how the equation numbers are generated with the following:
\theequation
is the command that prints the current equation number. It is automatically called by theequation
environment. Changing it to only print the equation number is what you seem to want.You could change it back to showing the section and equation number with the following:
Note that
section
andequation
are counters that LaTeX automatically keeps updated,\arabic{}
is telling LaTeX to interpret that counter as an arabic number (1, 2, 3, &c.). If you wanted the equations to be lettered instead of numbered (a, b, c, &c.) you could use:You can set this command in your preamble if you want the entire document to have consistent styling, or you can change the command in the middle of the document to change the style temporarily.
There is more useful information to be found about counters at wikibooks.