I wish to add some text prior to the number given to a subsection, e.g.:
Task 1.1 Blablabla
...
Task 1.2 Blablabla
How?
|
I wish to add some text prior to the number given to a subsection, e.g.:
How? |
|||
|
To add text before the section, you can use:
or for subsection you can use:
Code:
|
This is great and works. But some other problem appears when I use the \renewcommand{\thesubsection}{Text \arabic{section}}. The numbering of the subsection suddenly doesn't work. @Peter, if you make two subsections in your example, they both have the number 1. Can that be fixed? – Steeven Nov 10 '12 at 22:42 |
|
Clearly LaTeX is not smart enough to know that when I said \arabic{section}, that I obviously meant \arabic{subsection}. :-) Anyway, sorry about that mistake - have updated answer. – Peter Grill Nov 10 '12 at 22:47 |
|
Precisely ;) Thanks alot. (By the way, you must update it in two places in your answer...) – Steeven Nov 10 '12 at 23:50 |
|
@Steeven: Two places? Only the \renewcommand needed updating. I added two subsections to show that it functioned as desired. – Peter Grill Nov 10 '12 at 23:56 |
|
Oh well, I just meant the single line \renewcommand{\thesubsection}{Text \arabic{section}} above your example. – Steeven Nov 11 '12 at 13:37 |
Tasktext for a special environment, like a theorem or for what? BTW: Welcome to TeX.sx! – Kurt Nov 10 '12 at 22:23Taskis just an example text. I would like to have a word like that before the number for a subsection, and that's all. – Steeven Nov 10 '12 at 22:33