At 10:33 AM 3/31/2003 +0200, you wrote:
This was originally posted to ntg-context. I'm attaching the C++ pretty typing environment and an example of bugs.
I'm typesetting an algorithms course in C++ and I came around to few bugs and personal wishes :)
1. I've "written" a verb-cpp.tex which knows C++ keywords. However, as you'll see from the attached example, it needs a few fixes: - the missing word if it ends with & (the bar& x argument) - & coloured in green alongside y (it should be grey since it's an operator) - &, +=, -=, *=, /=, %=, >>=, <<=, ->*, .* should be coloured like operators and must be considered as single tokens - I'd like the whole comment in a single color (not red start/end and black text). dark green would be ideal :)
Since I know nothing about verbatim mechanism (I just took java environment and stuffed it with C++ keywords) how hard would it be to make those changes? I put '\input verb-cpp' into verb-ini.tex to make it work in my local installation.
\installprettytype [CPP] [CPP] \definetyping [CPP][option=CPP]
2. As you can see from the example, I want to typeset text next to code. However, the footnotes within are not working. (context ver. 2002.10.23)
3. Multi-column paragraphs are not automatically broken across pages. If the paragraph doesn't fit on the current page, it will be moved to the next page leaving an ugly empty box at the bottom of the previous page. How can I achieve an effect similar to the attached example, but that will automatically break across pages not leaving empty boxes at the bottom?
\appendtoks\optimizeverbatimfalse\to\everytabulate \definetabulate [CodeExample] [|p|p|] \definebuffer[Snippet] \startSnippet \startCPP void f(bar& x, bar &y, struct foo *z) { x += z->y; x.*ptr(); z->*ptr(); /* comment */ y = 3; y += x; } \stopCPP \stopSnippet \startCodeExample \NC This is an example\footnote{of non-working} footnote. \NC \typebuffer[Snippet] \NC \NR \stopCodeExample
4. Some time ago I reported \pseudoencodedDJ macros not working in itemize environment and you posted a fix to the list. Did you integrate the fix in the latest release?
think so, but probably changed a bit; this is what i have now \def\pseudoencodeddj % like in babel, but safer {\leavevmode\hbox\bgroup \setbox\scratchbox\hbox{d}% \scratchdimen\ht\scratchbox \advance\scratchdimen 1ex \scratchdimen.45\scratchdimen \dimen2\expandafter\withoutpt\the\fontdimen1\font\dimen0 \advance\dimen2 .5ex \hbox to \wd\scratchbox {\box\scratchbox\hss \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% \egroup} \def\pseudoencodedDJ % like in babel, but safer {\leavevmode \hbox\bgroup \setbox\scratchbox\hbox{D}% \scratchdimen.55\ht\scratchbox \dimen2\expandafter\withoutpt\the\fontdimen1\font\scratchdimen \advance\dimen2 .15ex \advance\dimen2 -.15\fontdimen7\font \hbox to \wd\scratchbox {\box\scratchbox\hss \raise\scratchdimen\hbox{\kern\dimen2\vbox{\hrule\!!height0.1ex\!!width0.3em}}}% \egroup} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (1)
-
Hans Hagen