Bug 88443 - Support user defined section names etc.
Summary: Support user defined section names etc.
Status: REOPENED
Alias: None
Product: kile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Jeroen Wijnhout
URL:
Keywords:
: 58967 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-30 14:12 UTC by vollerthun
Modified: 2023-01-08 20:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vollerthun 2004-08-30 14:12:25 UTC
Version:           1.6.3 (using KDE KDE 3.2.2)
Installed from:    Solaris Packages
OS:                Solaris

Creating labels within a user-defined command like this:

\newcommand{\Label}[1]{\label{#1}}

and using this command like this:

\Label{nextHallo}
We are on page \pageref{nextHallo}.

results in correct output and no complains by latex.
However, while typing to "page" and trying to use LaTeX -> References -> ref/pageref won't show the (existing) label "nextHallo" but something like "#1".
Same with document structure on the left.

Seems as if kile doesn't handle parameters to commands very well.
Comment 1 Jeroen Wijnhout 2004-08-30 17:43:31 UTC
>Seems as if kile doesn't handle parameters to commands very well. 

Make that: Kile doesn't handle user defined commands _at all_.

I admit, this is lacking in Kile. I'm planning to allow users to define which commands define label,section etc. in the Configuration dialog. However this will not be part of kile-1.7 (next release), probably it will be in 1.8.

best,
Jeroen
Comment 2 Thomas Braun 2005-12-21 22:04:31 UTC
Hello,

just to say what we already have.
You can define your own label, cite and ref commands.

Thomas
Comment 3 groot 2008-12-15 17:01:36 UTC
Not solaris specific.
Comment 4 Tobias G. Pfeiffer 2009-05-22 00:42:08 UTC
This is fixed now since quite a while, isn't it?
Comment 5 groot 2009-05-23 09:18:47 UTC
Agree  with Tobias - should have been marked fixed in 2005 w/ Thomas' comment.
Comment 6 Thomas Braun 2009-05-24 13:06:43 UTC
Maybe I missed something but how can one add section names like
\mySection{}
into kile?

Therefore I think this bug does still apply to kile
Comment 7 Thomas Braun 2009-05-27 00:22:41 UTC
*** Bug 58967 has been marked as a duplicate of this bug. ***
Comment 8 Ansa 2015-03-16 17:27:15 UTC
I am also missing the possibility to tell Kile that certain commands should be treated as section commands in the "Structure view" on the left.

An example: I have a file in which I store bits of text that I quote in other files. The complete file could look like this:

    \newcommand{\mycitation}[2]{\newcommand{#1}[1]{#2}}
    \mycitation{\theDefinitionQuote}{DEFINITION: a quote is a piece of text}
    \mycitation{\theTheoremQuote}{THEOREM: A quote may be reused in any file that contains \verb\input{this_file}\verb.}

I want the Structure view to show this:

    * theDefinitionQuote
    * theTheoremQuote

How can I do that?
Comment 9 Ansa 2015-03-16 19:54:25 UTC
Ok, I've found it, it's there.

Open Kile, go to Settings -> Configure Kile -> (in the left half of the window) Latex -> General -> (in the right half of the window, under the heading "Commands" Configure -> Commands -> Labels

there I added a new label called "mycitation" and after clicking OK, it shows as a label in the structured list

Very cool!
Comment 10 Ansa 2015-03-16 20:05:03 UTC
But that still does not solve the issue with user-defined section types. Currently, the user has to treat those as a label, reference, citation, or an include.
Comment 11 groot 2017-06-16 09:02:46 UTC
Not solaris-specific (seems in 2008 I didn't remove all the solaris-labeling)