Re: [NTG-context] Re: Converting Latex style files for use in Context
On Fri, 12 Dec 2003, Patrick Gundlach wrote: > Hi, > > > Like all TeX related things you can find it in CTAN, exactly in > > well, not *all* TeX relatet stuff is on CTAN... > > All right, you will agree that you can find *all*most all TeX relatet stuff :-) Zunbeltz ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: Converting Latex style files for use in Context
Hi, > Like all TeX related things you can find it in CTAN, exactly in well, not *all* TeX relatet stuff is on CTAN... > > http://www.ctan.org/tex-archive/macros/latex209/contrib/misc/ebnf.sty > The file is old (1991) and incorrect (the last Cat is missing its backslash). And even with this backslash, the formatting is strange. I'd suggest something like this (warning: ugly(!!) LaTeX code ahead): \begingroup \catcode`\|=13 \catcode`\<=13 \gdef\EBNF {\list{???}% {% \def|{$\mid$}% \def\makelabel##1{<##1> ::=}% \def\Cat##1{$\langle${\it ##1\/}$\rangle$} \def<##1>{\Cat{##1}} \parsep=0pt \itemsep=\smallskipamount \leftmargin=\parindent \advance\leftmargin+2em \labelsep=0.5em \labelwidth=1.5em \raggedright \catcode`\|=13 \catcode`\<=13 }% } \endgroup \let\endEBNF\endlist \documentclass{article} \usepackage{calc} \begin{document} \begin{EBNF} \item[glue][~`plus' ~] [~`minus' ~]. \item[stretch] | . \item[fil dimen] (~`fil' | `fill' | `filll'~). \end{EBNF} \end{document} which looks like this: ::= [ âplusâ ] [ âminusâ ]. ::= | . ::= ( âfilâ | âfillâ | âfilllâ ). Patrick -- mon trainsistor j'adore ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: Converting Latex style files for use in Context
On Thu, 11 Dec 2003, Patrick Gundlach wrote: > > Hi Adam, > > > I have an ebnf grammar which I need to put in a context doc and have a > > specific style file (ebnf.sty). Is there an easy way to convert it > > for use in context. > > How should we know? I don't have ebnf.sty on my system so this is > probably not a well known package. If you provide some more > information (where the sty can be found, how an input looks like or > so) we might be able to help better. > Like all TeX related things you can find it in CTAN, exactly in http://www.ctan.org/tex-archive/macros/latex209/contrib/misc/ebnf.sty The file is old (1991) so i don't know if it would run with latex2e. The code is very sort, mainly it redefineas a description enviromment. I Think it wouldn't be very dificult define a new definition enviroment for ENNF Zunbeltz A> Patrick > -- > mon trainsistor j'adore > ___ > ntg-context mailing list > [EMAIL PROTECTED] > http://www.ntg.nl/mailman/listinfo/ntg-context > ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: Converting Latex style files for use in Context
Hi Adam, > I have an ebnf grammar which I need to put in a context doc and have a > specific style file (ebnf.sty). Is there an easy way to convert it > for use in context. How should we know? I don't have ebnf.sty on my system so this is probably not a well known package. If you provide some more information (where the sty can be found, how an input looks like or so) we might be able to help better. Patrick -- mon trainsistor j'adore ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context