Hello,

I'm trying to develop a style file for structured input of algorithms. I got most of it to work, including proper line numbering, indentation, etc.

Constructs that may have several cases, such as "if", "switch" etc. are implemented using <xmacro>, so that the user can add additional cases as required. Everything works, except that the indentation for the <xmacro> constructs is wrong.

I've been trying to get this to work for the last few days, and now I'm out of ideas. So if someone can help, I'd be more than grateful.

I attached the style file and a short example that demonstrates the problem.

Thanks,
  Jan

Attachment: myalg-style.ts
Description: video/vnd.dlna.mpeg-tts

<TeXmacs|1.0.7.10>

<style|<tuple|generic|myalg-style>>

<\body>
  <\algorithm|Writing Texmacs Style Files>
    <\algorithmic>
      <state>Do something

      <WHILE|( <math|\<longleftarrow\>> indentation is correct)|<state>do
      something different|>

      <\IF|( <math|\<longleftarrow\>> why is indentation wrong?)|<state>Use
      \<less\>meta\<gtr\>+left/right to add cases|some condition>
        <state>Equations work:

        <\eqnarray*>
          
<tformat|<table|<row|<cell|\<varepsilon\>>|<cell|\<rightarrow\>>|<cell|0,<eq-number>>>>>
        </eqnarray*>
      </IF|<state><math|\<longleftarrow\>> indentation still wrong>

      <state>Done.
    </algorithmic>
  </algorithm>
</body>

<\initial>
  <\collection>
    <associate|page-type|letter>
  </collection>
</initial>
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to