ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
Subject: Re: pretty typesetting for matlab files
Date: Fri, 17 Mar 2006 00:29:09 -0500 (EST)	[thread overview]
Message-ID: <Pine.WNT.4.63.0603170023220.1560@nqvgln> (raw)
In-Reply-To: <441934D3.50609@elvenkind.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1045 bytes --]

<--- On Mar 16, Taco Hoekwater wrote --->

> Aditya Mahajan wrote:
>>> That may sound like a very daunting task, but it is not as hard as you
>>> may think, just something to be done meticulously. The verb-xxxx
>>> definitions are rather straightforward state engines that use character
>>> codes as command tokens.
>>
>> Is this documented somewhere?
>
> I don't know. If anybody else knows, please tell me. If not, I'll jot
> down some stuff.

Actually the explaination in verb-ini.tex is pretty good. I had 
somehow missed reading it earlier. I vaguely understand how the whole 
mechanism is working and managed to obtain a partial 
solution (attached). I have a deadline for submission and right now 
this will have to do. The only features missing are identifying line 
and block comments and a meachism to add tex markup in comments. I 
need to understand verb-jv/js more clearly to incorporate these 
changes.

Thanks,
Aditya



-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

[-- Attachment #2: Type: TEXT/PLAIN, Size: 5305 bytes --]

\unprotect

\ifx\undefined\setupprettyPLtype \input verb-pl \relax \fi

\gdef\MATLABsetspecials%
  {\PLsetspecials
  \setpretty`\'=41
  \setpretty`\.=41
  \setpretty`\#=21
  \setpretty`\%=0
  \setpretty`\,=21
  \setpretty`\;=21
  \setpretty`\:=21
  }

\gdef\MATLABsethandlers%
  {\PLsethandlers}

\gdef\MATLABsetcontrols%
  {\PLsetcontrols}

\gdef\MATLABsetvariables
  {\PLsetvariables}


\gdef\setupprettyMATLABtype%
  {\def\prettyidentifier{MATLAB}%
   \let\PLidentifiers=\MATLABidentifiers
   \let\PLvariables=\MATLABvariables
   \MATLABsetvariables
   \MATLABsetcontrols
   \MATLABsethandlers
   \MATLABsetspecials}

\useprettyidentifiers \MATLABidentifiers \MATLABsetspecials
  function return case if else elseif do for while end

\useprettyidentifiers \MATLABvariables \MATLABsetspecials
  gt lt gt lt amp abs acos acosh acot acoth acsc acsch 
  all angle ans any asec asech asin asinh atan atan2 atanh auread 
  auwrite axes axis balance bar bessel besselk bessely beta 
  betainc betaln blanks bone break brighten capture cart2pol 
  cart2sph caxis cd cdf2rdf cedit ceil chol cla clabel clc clear 
  clf clock close colmmd Colon colorbar colormap ColorSpec colperm 
  comet comet3 compan compass computer cond condest conj contour 
  contour3 contourc contrast conv conv2 cool copper corrcoef cos 
  cosh cot coth cov cplxpair cputime cross csc csch csvread 
  csvwrite cumprod cumsum cylinder date dbclear dbcont dbdown 
  dbquit dbstack dbstatus dbstep dbstop dbtype dbup ddeadv ddeexec 
  ddeinit ddepoke ddereq ddeterm ddeunadv deblank dec2hex deconv 
  del2 delete demo det diag diary diff diffuse dir disp dlmread 
  dlmwrite dmperm dot drawnow echo eig ellipj ellipke 
  engClose engEvalString engGetFull engGetMatrix engOpen 
  engOutputBuffer engPutFull engPutMatrix engSetEvalCallback 
  engSetEvalTimeout engWinInit eps erf erfc erfcx erfinv error 
  errorbar etime etree eval exist exp expint expm expo eye fclose 
  feather feof ferror feval fft fft2 fftshift fgetl fgets figure 
  fill fill3 filter filter2 find findstr finite fix flag fliplr 
  flipud floor flops fmin fmins fopen format fplot fprintf 
  fread frewind fscanf fseek ftell full funm fwrite fzero 
  gallery gamma gammainc gammaln gca gcd gcf gco get getenv 
  getframe ginput global gplot gradient gray graymon grid griddata 
  gtext hadamard hankel help hess hex2dec hex2num hidden hilb hist 
  hold home hostid hot hsv hsv2rgb ifft ifft2 imag image 
  imagesc Inf info input int2str interp1 interp2 interpft inv 
  invhilb isempty isglobal ishold isieee isinf isletter isnan 
  isreal isspace issparse isstr jet keyboard kron lasterr lcm 
  legend legendre length lin2mu line linspace load log log10 log2 
  loglog logm logspace lookfor lower ls lscov lu magic matClose 
  matDeleteMatrix matGetDir matGetFp matGetFull matGetMatrix 
  matGetNextMatrix matGetString matlabrc matlabroot matOpen 
  matPutFull matPutMatrix matPutString max mean median menu mesh 
  meshc meshgrid meshz mexAtExit mexCallMATLAB mexdebug 
  mexErrMsgTxt mexEvalString mexFunction mexGetFull mexGetMatrix 
  mexGetMatrixPtr mexPrintf mexPutFull mexPutMatrix mexSetTrapFlag 
  min more movie moviein mu2lin mxCalloc mxCopyCharacterToPtr 
  mxCopyComplex16ToPtr mxCopyInteger4ToPtr mxCopyPtrToCharacter 
  mxCopyPtrToComplex16 mxCopyPtrToInteger4 mxCopyPtrToReal8 
  mxCopyReal8ToPtr mxCreateFull mxCreateSparse mxCreateString 
  mxFree mxFreeMatrix mxGetIr mxGetJc mxGetM mxGetN mxGetName 
  mxGetNzmax mxGetPi mxGetPr mxGetScalar mxGetString mxIsComplex 
  mxIsFull mxIsNumeric mxIsSparse mxIsString mxIsTypeDouble 
  mxSetIr mxSetJc mxSetM mxSetN mxSetName mxSetNzmax mxSetPi mxSetPr NaN 
  nargchk nargin nargout nchoosek newplot nextpow2 nnls nnz nonzeros norm 
  normest null num2str nzmax ode23 ode45 orient orth pack pascal patch path 
  pause pcolor pi pink pinv plot plot3 pol2cart polar poly polyder polyeig 
  polyfit polyval polyvalm pow2 print printopt prism prod pwd qr qrdelete 
  qrinsert quad quad8 quit quiver qz rand randn randperm rank rat rats rbbox 
  rcond real realmax realmin refresh rem reset reshape residue rgb2hsv rgbplot 
  rootobject roots rose rosser rot90 rotate round rref rrefmovie rsf2csf save 
  saxis schur sec sech semilogx semilogy set setstr shading sign sin sinh size 
  slice sort sound spalloc sparse spaugment spconvert spdiags specular speye 
  spfun sph2cart sphere spinmap spline spones spparms sprandn sprandsym sprank 
  sprintf spy sqrt sqrtm sscanf stairs startup std stem str2mat str2num strcmp 
  strings strrep strtok subplot subscribe subspace sum surf surface surfc 
  surfl surfnorm svd symbfact symmmd symrcm tan tanh tempdir tempname terminal 
  text tic title toc toeplitz trace trapz tril triu type uicontrol uigetfile 
  uimenu uiputfile unix unwrap upper vander ver version view viewmtx 
  waitforbuttonpress waterfall wavread wavwrite what whatsnew which white 
  whitebg who whos wilkinson wk1read wk1write xlabel xor ylabel zeros zlabel 
  zoom

\installprettytype [MATLAB]     [MATLAB]
\definetyping      [MATLAB]     [\c!option=MATLAB]
\definepalet [MATLABcolorpretty]    [colorpretty]
\definepalet [MATLABgraypretty]     [graypretty]



\protect \endinput


[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-03-17  5:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15  6:50 Aditya Mahajan
2006-03-15  9:20 ` Taco Hoekwater
2006-03-15 21:14   ` Aditya Mahajan
2006-03-16  9:50     ` Taco Hoekwater
2006-03-17  5:29       ` Aditya Mahajan [this message]
2006-03-17  9:16         ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.WNT.4.63.0603170023220.1560@nqvgln \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).