On 10/13/2017 04:32 PM, Christian Eriksson wrote:
>
> Hi,
>
>  
>
> I am creating a custom layout and I want to create an inset which does
> not take any input, an example would be the ”new page” inset from
> ’Insert->Formatting->New Page’. The purpose would be not to confuse
> users by making them think that they need to input something. If this
> is not possible can I pre fill the input box and then suppress the
> output in the compiled document?
>

There's no way to make input impossible, but you can suppress output
simply by having the corresponding LaTeX command not do anything. E.g.:
     \newcommand\donothing[1]{}
I believe some of the modules actually use this trick, though with
layouts. E.g., you could create a simple new page "layout" roughly as
follows:

    Style NewPage
        LatexType Command
        LatexName donothing
        LabelType Static
        LabelString "--- New Page --- (input ignored)"
        Preamble
            \newcommand\donothing[1]{}
        EndPreamble
        Font
            Color Red
            Series Bold
        EndFont
        # Essential if we want to allow for no input
        KeepEmpty 1
    End

Note that you could equally well have this "layout" issue some command.
I've been meaning for some time to add such a layout to the Endnotes
module, that would issue \theendnotes.

Something similar could be done with an inset.

Richard

Reply via email to