Closed nomeata closed 11 months ago
Not in a nice way. You can, however, put all the formatting directives in two files, and use grouping.
%{
%include haskell.fmt
> instance Eq Bool where ...
%}
%{
%include coq.fmt
> Global Instance Eq_Bool : Eq Bool := ...
%}
(Of course, you can also use \begin{code}
/\end{code}
rather than >
...)
Also note that grouping for a strange historical reason does only apply to %format
, but not to %subst
directives.
Not too bad, thanks for the hint! (Feel free to close this issue if you don’t plan to provide this feature properly any time soon.)
Assume I have a bunch of
%format …
directive that describe the layout I want for Haskell. And then I have a similar bunch of%format …
directive that describe the layout I want for a different language (Agda, or Gallina).How can I switch between these sets on a per-listing basis?
Example (with some invented commands):
Is that at all possible with lhs2Tex?