HI,
I want to create a new user macro that inserts the following code
% \begin{macrocode} CODE % \end{macrocode} %END
Where CODE and END are accessible with ctrl+left/right. This is what I’ve got so far
CODE
END
\begin{macrocode} %<CODE%> % \end{macrocode} % %<END%>
But how can I add the % in the first line – if I do it the macro becomes the environment type – and how can I remove the space before END?
%
Thanks, Tobi
You can use %% to escape a %
But it won't work for the first character.
You could only put a space before it, or write a script calling some write functins
Hi (sorry for the delays reply), but with a script I can’t write those active %<x%> areas, can I?
%<x%>
With a normal macro (i.e. just inserting text) you can do:
\foo{%<x%>}
Within a script you can do the following:
%SCRIPT editorView.insertMacro('\\foo{%<bar%>}')
Log in to post a comment.
HI,
I want to create a new user macro that inserts the following code
Where
CODE
andEND
are accessible with ctrl+left/right. This is what I’ve got so farBut how can I add the
%
in the first line – if I do it the macro becomes the environment type – and how can I remove the space beforeEND
?Thanks,
Tobi
You can use %% to escape a %
But it won't work for the first character.
You could only put a space before it, or write a script calling some write functins
Hi (sorry for the delays reply), but with a script I can’t write those active
%<x%>
areas, can I?With a normal macro (i.e. just inserting text) you can do:
Within a script you can do the following: