Howdy,
we have that wonderful toggle command for environments (* or not *). Would it be possible to add this toggling behavior to headings?
like \subsection{} to \subsection*{} ?
Thanx,
Daniel
Hi Daniel, On Oct 2, 2006, at 6:42 AM, Daniel Käsmayr wrote:
Howdy,
we have that wonderful toggle command for environments (* or not *).
yeah it doesn't work very well for nested environments at the moment, and I haven't had time to see if I can fix it.
Would it be possible to add this toggling behavior to headings?
like \subsection{} to \subsection*{} ?
That should be doable, someone asked for it already. I'll try to get it done some time in the next couple of days. Essentially what needs to be done is this:
1. The command accepts as input the selection or document, and has output to replace selected text. 2. The command then reads its stdin, and looks for the last appearance of a section/subsection/chapter/part/paragraph... 3. It then makes the change and sends the text back out.
I think this could be done in about 10 lines at most, with a ruby script. I'll see if I can hack it some time soon, unless someone beats me to it.
Thanx,
Daniel
Haris
On Oct 2, 2006, at 10:11 AM, Charilaos Skiadas wrote:
we have that wonderful toggle command for environments (* or not *).
yeah it doesn't work very well for nested environments at the moment, and I haven't had time to see if I can fix it.
Would it be possible to add this toggling behavior to headings?
like \subsection{} to \subsection*{} ?
I recently updated this command, and it should now toggle either the innermost environment, or the closest section before the caret, whatever is closest. For instance:
\section{A section} (1) \begin{env} \begin{env3} (2) \end{env3} (3) \subsection{a subsevction} (4) \begin{env2} (5) \end{env2} (6) \end{env}
Then the changes that take place should be, depending on caret location: (1): the section (2): The env3 (3): the env (4,6): the subsection (5): the env2
Let me know if there are problems with it. It is currently a bit sensitive about the line it is at. If you are in the \end{} line, it will count as if you were outside the environment. If you are int he \begin{} line, it will count as if you were inside the environment.
Haris