Feature Suggestions ⇒ Make an option for the character between words in a label
-
- Posts: 25
- Joined: Tue Sep 16, 2008 6:05 am
Make an option for the character between words in a label
I would like to have an option for the character which is placed in labels of tables and figures. So I can choose for example to use '-' or '_'. I think this should be a global option.
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Make an option for the character between words in a label
What do you exactly mean? Please give an example. Caption of floats are normally customize with the caption package. That's not an issue of TeXnicCenter.
Best regards
Thorsten¹
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
-
- Posts: 25
- Joined: Tue Sep 16, 2008 6:05 am
Re: Make an option for the character between words in a label
Open the 'Insert Table' dialog.
Fill in for the caption: "This is the caption of the table".
The dialog will automatically generate "tab:ThisIsTheCaptionOfTheTable" for the 'label'. Personally it's easier for me to read "tab:This_Is_The_Caption_Of_The_Table" or "tab:This Is The Caption Of The Table" then "tab:ThisIsTheCaptionOfTheTable". But it's a lot of work to add underscores or spaces by hand...
Fill in for the caption: "This is the caption of the table".
The dialog will automatically generate "tab:ThisIsTheCaptionOfTheTable" for the 'label'. Personally it's easier for me to read "tab:This_Is_The_Caption_Of_The_Table" or "tab:This Is The Caption Of The Table" then "tab:ThisIsTheCaptionOfTheTable". But it's a lot of work to add underscores or spaces by hand...
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Make an option for the character between words in a label
Underscores should be avoided in such cases. They are reserved for superscripts in math mode and could cause problems. Choosing shorter labels manually in my opinion is better than the actual caption without blank spaces or any other additional characters.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
-
- Posts: 25
- Joined: Tue Sep 16, 2008 6:05 am
Re: Make an option for the character between words in a label
hmm....I didn't know that underscores in labels could confuse Latex...then I won't use them anymore there. Luckily it didn't seem to confuse Latex up until now.
But I know I can't use spaces in file names of pictures, so there I use underscores. But in the 'Insert Figure' dialog the file name of the picture is automatically used as the label. So that one automatically also includes underscores. I also didn't have problems yet with those labels, but you suggest me not to use underscores in labels, right?
That means that I will have to rename my pictures: no underscores between words....maybe a dash....or nothing at all....I don't have problems reading method names and variable names without underscores in programming languages, but somehow I'm not used to that in file names....
But I know I can't use spaces in file names of pictures, so there I use underscores. But in the 'Insert Figure' dialog the file name of the picture is automatically used as the label. So that one automatically also includes underscores. I also didn't have problems yet with those labels, but you suggest me not to use underscores in labels, right?
That means that I will have to rename my pictures: no underscores between words....maybe a dash....or nothing at all....I don't have problems reading method names and variable names without underscores in programming languages, but somehow I'm not used to that in file names....
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Make an option for the character between words in a label
I don't really know because I never use special characters in such cases. This was only an assumption.Hans Nieuwenhuis wrote:hmm....I didn't know that underscores in labels could confuse Latex...then I won't use them anymore there. Luckily it didn't seem to confuse Latex up until now. [...]
If it works, keep it. I prefer abbreviations that let me see clearly the contents of the file.Hans Nieuwenhuis wrote:[...] But I know I can't use spaces in file names of pictures, so there I use underscores. But in the 'Insert Figure' dialog the file name of the picture is automatically used as the label. So that one automatically also includes underscores. I also didn't have problems yet with those labels, but you suggest me not to use underscores in labels, right? [...]
Before renaming your files, try out if there occur any errors. If not, do what fits best for you.Hans Nieuwenhuis wrote:[...] That means that I will have to rename my pictures: no underscores between words....maybe a dash....or nothing at all....I don't have problems reading method names and variable names without underscores in programming languages, but somehow I'm not used to that in file names....
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
-
- Posts: 25
- Joined: Tue Sep 16, 2008 6:05 am
Re: Make an option for the character between words in a label
Okay, thanks for your answers, Thorsten!