ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* frame and numbering of code snippets using vim-module
@ 2012-06-07  0:00 Xenia
  2012-06-07  0:54 ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Xenia @ 2012-06-07  0:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

Hi context folks,

using the vim module for including MATLAB-code, I noticed some annoying
behavior:

The frame, that I produced with your help using `\definetextbackground`,
is not wide enough for the text inside, or rather the line wraps are
done too late (see the attached examples!).

Additionally the frame has a bottom line at the end of the page although
the code snippet did not end yet. It looks as if a new box begins.

Besides there should not be a new line number after a line break.

Any ideas what to do?

Thanks,

Xenia

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: code.m --]
[-- Type: text/x-objcsrc; name="code.m", Size: 1632 bytes --]

% random text, random text, blablabla, random text, blablabla, this tests if there is a line wrap… random text, blablabla, random text, blablabla, random text, blablabla, random text, blablabla

random code random code random code random code random code random code random code random code 
random code random code
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 
random code random code 

% Printing:

fprintf('its random text random text random text random text ',variable);
fprintf('random text random text random text random text random text',variable);


fprintf('more random text random text random text random text random text ',variable);
fprintf('random text random text random text random text random text random text random text ', variable);

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: framedcode.log --]
[-- Type: text/x-log; name="framedcode.log", Size: 23533 bytes --]

(framedcode.tex

ConTeXt  ver: 2012.04.19 23:18 MKIV  fmt: 2012.4.22  int: english/english

system          > cont-new.mkiv loaded
(/home/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > framedcode.top loaded

system          > options > start used options

used options    > % runtime options files (command line driven)
used options    > \unprotect
used options    > % feedback and basic job control
used options    > % handy for special styles
used options    > \startluacode
used options    > document = document or { }
used options    > document.arguments={
used options    > }
used options    > document.files={
used options    >  "framedcode.tex",
used options    > }
used options    > \stopluacode
used options    > % process info
used options    > \setupsystem[inputfile=framedcode.tex]
used options    > \setupsystem[\c!n=2,\c!m=2]
used options    > % modes
used options    > % options (not that important)
used options    > \startsetups *runtime:options
used options    > \stopsetups
used options    > % styles and modules
used options    > \startsetups *runtime:modules
used options    > \stopsetups
used options    > % done
used options    > \protect \endinput

system          > options > stop used options

(framedcode.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
resolvers       > modules > loaded: 'vim'
(/home/context/tex/texmf-modules/tex/context/third/vim/t-vim.tex
loading         > Vim syntax highlighting (ver: 2012.04.18)
resolvers       > modules > loaded: 'filter'
(/home/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv
loading         > Filter (ver: 2012.04.18)
resolvers       > modules > loaded: 'module-catcodes'
(/home/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex
loading         > Module Catcodes (ver: 2011.12.17)
))
resolvers       > modules > loaded: 'syntax-highlight'
(/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv
loading         > Code syntax highlighting (ver: 2012.04.18)
resolvers       > modules > loaded: 'syntax-groups'
(/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex
loading         > Syntax highlighting groups (ver: 2012.01.03)
resolvers       > modules > already loaded: 'module-catcodes'
)
resolvers       > modules > already loaded: 'filter'
)){/home/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{/home/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > virtual math > unable to resolve name mapsfromchar
fonts           > fallback modern rm 12pt is loaded
(code.m.vimout
Overfull \hbox (24.35204pt too wide) in paragraph at lines 1--1
[][][]\3>modern-designsize-12pt-tt-tf-0--0 % ran-dom text, ran-dom text, bla-bla-bla, ran-dom text, bla-bla-bla, this tests

\hbox(8.328+1.668)x426.78743, direction TLT
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\hbox(0.0+0.0)x0.0, direction TLT
.\latelua0"_plib_.enhance("p:3")"
.\3>modern-designsize-12pt-tt-tf-0--0 %
.\glue 6.18
.etc.


Overfull \hbox (18.17204pt too wide) in paragraph at lines 1--1
\3>modern-designsize-12pt-tt-tf-0--0 if there is a line wrap… ran-dom text, bla-bla-bla, ran-dom text, bla-bla-bla,

\hbox(7.404+2.664)x426.78743, direction TLT
.\3>modern-designsize-12pt-tt-tf-0--0 i
.\3>modern-designsize-12pt-tt-tf-0--0 f
.\glue 6.18
.\3>modern-designsize-12pt-tt-tf-0--0 t
.\3>modern-designsize-12pt-tt-tf-0--0 h
.etc.


Overfull \hbox (11.99205pt too wide) in paragraph at lines 3--3
[][][]\3>modern-designsize-12pt-tt-tf-0--0 ran-dom code ran-dom code ran-dom code ran-dom code ran-dom code ran-dom code

\hbox(7.332+0.072)x426.78743, direction TLT
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\hbox(0.0+0.0)x0.0, direction TLT
.\latelua0"_plib_.enhance("p:5")"
.\3>modern-designsize-12pt-tt-tf-0--0 r
.\3>modern-designsize-12pt-tt-tf-0--0 a
.etc.

metapost        > initializing instance 'metafun' using format 'metafun'
metapost        > loading 'metafun': /home/context/tex/texmf-context/metapost/context/base/metafun.mpiv
backend         > xmp > using file '/home/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1

Overfull \hbox (24.35204pt too wide) in paragraph at lines 44--44
[][][]\3>modern-designsize-12pt-tt-tf-0--0 fprintf('its ran-dom text ran-dom text ran-dom text ran-dom text ',variable);[] 

\hbox(10.42677+4.05482)x426.78743, direction TLT
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\hbox(0.0+0.0)x0.0, direction TLT
.\latelua0"_plib_.enhance("p:46")"
.\3>modern-designsize-12pt-tt-tf-0--0 f
.\3>modern-designsize-12pt-tt-tf-0--0 p
.etc.


Overfull \hbox (67.61198pt too wide) in paragraph at lines 45--45
[][][]\3>modern-designsize-12pt-tt-tf-0--0 fprintf('ran-dom text ran-dom text ran-dom text ran-dom text ran-dom text',variable);[] 

\hbox(10.42677+4.05482)x426.78743, direction TLT
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\hbox(0.0+0.0)x0.0, direction TLT
.\latelua0"_plib_.enhance("p:47")"
.\3>modern-designsize-12pt-tt-tf-0--0 f
.\3>modern-designsize-12pt-tt-tf-0--0 p
.etc.


Overfull \hbox (24.35204pt too wide) in paragraph at lines 48--48
[][][]\3>modern-designsize-12pt-tt-tf-0--0 fprintf('more ran-dom text ran-dom text ran-dom text ran-dom text ran-dom text

\hbox(8.328+2.664)x426.78743, direction TLT
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\hbox(0.0+0.0)x0.0, direction TLT
.\latelua0"_plib_.enhance("p:50")"
.\3>modern-designsize-12pt-tt-tf-0--0 f
.\3>modern-designsize-12pt-tt-tf-0--0 p
.etc.


Overfull \hbox (24.35204pt too wide) in paragraph at lines 49--49
[][][]\3>modern-designsize-12pt-tt-tf-0--0 fprintf('ran-dom text ran-dom text ran-dom text ran-dom text ran-dom text ran-

\hbox(8.328+2.664)x426.78743, direction TLT
.\whatsit
..\localinterlinepenalty=0
..\localbrokenpenalty=0
..\localleftbox=null
..\localrightbox=null
.\hbox(0.0+0.0)x0.0, direction TLT
.\latelua0"_plib_.enhance("p:51")"
.\3>modern-designsize-12pt-tt-tf-0--0 f
.\3>modern-designsize-12pt-tt-tf-0--0 p
.etc.

)
pages           > flushing realpage 2, userpage 2
 )</home/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf></home/context/tex/texmf/fonts/opentype/public/lm/lmmono10-regular.otf></home/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>

system          > files > start used files

used files      >    1: filename=framedcode.tex | foundname=framedcode.tex | usedmethod=direct
used files      >    2: filename=cont-new.mkiv | filetype=tex | foundname=/home/context/tex/texmf-context/tex/context/base/cont-new.mkiv | usedmethod=database
used files      >    3: filename=framedcode.top | foundname=framedcode.top | usedmethod=direct
used files      >    4: filename=lang-us.lua | filetype=lua | foundname=/home/context/tex/texmf-context/tex/context/patterns/lang-us.lua | usedmethod=database
used files      >    5: filename=lang-de.lua | filetype=lua | foundname=/home/context/tex/texmf-context/tex/context/patterns/lang-de.lua | usedmethod=database
used files      >    6: filename=t-vim.tex | filetype=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-vim.tex | usedmethod=database
used files      >    7: filename=t-vim.tex | filetype=tex | format=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-vim.tex | usedmethod=database
used files      >    8: filename=home/context/tex/texmf-modules/tex/context/third/vim/t-vim.tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-vim.tex | usedmethod=qualified
used files      >    9: filename=t-filter.mkiv | filetype=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv | usedmethod=database
used files      >   10: filename=t-filter.mkiv | filetype=tex | format=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv | usedmethod=database
used files      >   11: filename=home/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv | foundname=/home/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv | usedmethod=qualified
used files      >   12: filename=t-module-catcodes.tex | filetype=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex | usedmethod=database
used files      >   13: filename=t-module-catcodes.tex | filetype=tex | format=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex | usedmethod=database
used files      >   14: filename=home/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex | foundname=/home/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex | usedmethod=qualified
used files      >   15: filename=t-syntax-highlight.mkiv | filetype=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv | usedmethod=database
used files      >   16: filename=t-syntax-highlight.mkiv | filetype=tex | format=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv | usedmethod=database
used files      >   17: filename=home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv | usedmethod=qualified
used files      >   18: filename=t-syntax-groups.tex | filetype=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex | usedmethod=database
used files      >   19: filename=t-syntax-groups.tex | filetype=tex | format=tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex | usedmethod=database
used files      >   20: filename=home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex | foundname=/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex | usedmethod=qualified
used files      >   21: filename=mkiv-base.map | filetype=map | format=map | foundname=/home/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map | usedmethod=database
used files      >   22: filename=lm.lfg | filetype=tex | foundname=/home/context/tex/texmf-context/tex/context/fonts/lm.lfg | usedmethod=database
used files      >   23: filename=lm-math.lfg | filetype=tex | foundname=/home/context/tex/texmf-context/tex/context/fonts/lm-math.lfg | usedmethod=database
used files      >   24: filename=lm-math.map | filetype=map | format=map | foundname=/home/context/tex/texmf/fonts/map/dvips/lm/lm-math.map | usedmethod=database
used files      >   25: filename=lm-rm.map | filetype=map | format=map | foundname=/home/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map | usedmethod=database
used files      >   26: filename=lmroman12-regular | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf | usedmethod=database
used files      >   27: filename=lmroman7-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman7-regular.otf | usedmethod=database
used files      >   28: filename=rm-lmr7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/rm-lmr7.tfm | usedmethod=database
used files      >   29: filename=lmmi7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmmi7.tfm | usedmethod=database
used files      >   30: filename=lmsy7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmsy7.tfm | usedmethod=database
used files      >   31: filename=lmex10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmex10.tfm | usedmethod=database
used files      >   32: filename=msam7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/symbols/msam7.tfm | usedmethod=database
used files      >   33: filename=msbm7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/symbols/msbm7.tfm | usedmethod=database
used files      >   34: filename=stmary10.afm | filetype=afm | format=afm | foundname=/home/context/tex/texmf/fonts/afm/public/stmaryrd/stmary10.afm | usedmethod=database
used files      >   35: filename=stmary10.pfb | filetype=pfb | format=pfb | foundname=/home/context/tex/texmf/fonts/type1/public/stmaryrd/stmary10.pfb | usedmethod=database
used files      >   36: filename=lmroman7-bold.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman7-bold.otf | usedmethod=database
used files      >   37: filename=lmmib7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmmib7.tfm | usedmethod=database
used files      >   38: filename=lmsans8-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmsans8-regular.otf | usedmethod=database
used files      >   39: filename=lmmono8-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmmono8-regular.otf | usedmethod=database
used files      >   40: filename=eufm7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/euler/eufm7.tfm | usedmethod=database
used files      >   41: filename=eufb7.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/euler/eufb7.tfm | usedmethod=database
used files      >   42: filename=lmroman9-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman9-regular.otf | usedmethod=database
used files      >   43: filename=rm-lmr9.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/rm-lmr9.tfm | usedmethod=database
used files      >   44: filename=lmmi9.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmmi9.tfm | usedmethod=database
used files      >   45: filename=lmsy9.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmsy9.tfm | usedmethod=database
used files      >   46: filename=msam10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/symbols/msam10.tfm | usedmethod=database
used files      >   47: filename=msbm10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/symbols/msbm10.tfm | usedmethod=database
used files      >   48: filename=lmroman9-bold.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman9-bold.otf | usedmethod=database
used files      >   49: filename=lmmib10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmmib10.tfm | usedmethod=database
used files      >   50: filename=lmsans9-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmsans9-regular.otf | usedmethod=database
used files      >   51: filename=lmmono9-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmmono9-regular.otf | usedmethod=database
used files      >   52: filename=eufm10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/euler/eufm10.tfm | usedmethod=database
used files      >   53: filename=eufb10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/amsfonts/euler/eufb10.tfm | usedmethod=database
used files      >   54: filename=lmroman12-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf | usedmethod=database
used files      >   55: filename=rm-lmr12.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/rm-lmr12.tfm | usedmethod=database
used files      >   56: filename=lmmi12.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmmi12.tfm | usedmethod=database
used files      >   57: filename=lmsy10.tfm | filetype=tfm | format=tfm | foundname=/home/context/tex/texmf/fonts/tfm/public/lm/lmsy10.tfm | usedmethod=database
used files      >   58: filename=lmroman12-bold.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmroman12-bold.otf | usedmethod=database
used files      >   59: filename=lmsans12-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmsans12-regular.otf | usedmethod=database
used files      >   60: filename=lmmono12-regular.otf | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf | usedmethod=database
used files      >   61: filename=code.m.vimout | foundname=code.m.vimout | usedmethod=direct
used files      >   62: filename=lmmono12-regular | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf | usedmethod=database
used files      >   63: filename=lmmono10-regular | filetype=otf | format=otf | foundname=/home/context/tex/texmf/fonts/opentype/public/lm/lmmono10-regular.otf | usedmethod=database
used files      >   64: filename=metafun.mpiv | filetype=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/metafun.mpiv | usedmethod=database
used files      >   65: filename=mp-base.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-base.mpiv | usedmethod=database
used files      >   66: filename=mp-tool.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-tool.mpiv | usedmethod=database
used files      >   67: filename=mp-mlib.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-mlib.mpiv | usedmethod=database
used files      >   68: filename=mp-page.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-page.mpiv | usedmethod=database
used files      >   69: filename=mp-butt.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-butt.mpiv | usedmethod=database
used files      >   70: filename=mp-shap.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-shap.mpiv | usedmethod=database
used files      >   71: filename=mp-grph.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-grph.mpiv | usedmethod=database
used files      >   72: filename=mp-grid.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-grid.mpiv | usedmethod=database
used files      >   73: filename=mp-form.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-form.mpiv | usedmethod=database
used files      >   74: filename=mp-figs.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-figs.mpiv | usedmethod=database
used files      >   75: filename=mp-func.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-func.mpiv | usedmethod=database
used files      >   76: filename=mp-abck.mpiv | filetype=mp | format=mp | foundname=/home/context/tex/texmf-context/metapost/context/base/mp-abck.mpiv | usedmethod=database
used files      >   77: filename=lpdf-pdx.xml | filetype=tex | foundname=/home/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml | usedmethod=database

system          > files > stop used files


system          > structure > start used structure

used structure  > text: framedcode

system          > structure > stop used structure


mkiv lua stats  > used config file          - selfautoparent:texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - readable: '/home/context/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606' (order 1)
mkiv lua stats  > used cache path           - readable: '/home/maja/luatex-cache/context/2448223e6631addb83df348d74153606' (order 2)
mkiv lua stats  > used cache path           - writable: '/home/maja/luatex-cache/context/2448223e6631addb83df348d74153606'
mkiv lua stats  > resource resolver         - loadtime 0.009 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 77 found files, scanned paths: 
mkiv lua stats  > stored bytecode data      - 303 modules, 65 tables, 368 chunks
mkiv lua stats  > cleaned up reserved nodes - 48 nodes, 10 lists of 436
mkiv lua stats  > node memory usage         - 2 glue, 2 penalty, 9 attribute, 33 glue_spec, 3 attribute_list
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances (re)created, 786 calls
mkiv lua stats  > used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded tex modules        - 5 requested, 5 found (*-filter *-module-catcodes *-syntax-groups *-syntax-highlight *-vim), 0 missing
mkiv lua stats  > loaded patterns           - de::3 en::2
mkiv lua stats  > jobdata time              - 0.003 seconds saving, 0.002 seconds loading
mkiv lua stats  > callbacks                 - 1378 direct, 1973 indirect, 3351 total
mkiv lua stats  > randomizer                - resumed with value 0.11398556368145
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls
mkiv lua stats  > positions                 - 57 collected, 4 regulars, 53 regions, 0 unresolved regions
mkiv lua stats  > result saved in file      - framedcode.pdf
mkiv lua stats  > loaded fonts              - 34 files: stmary10.afm lmmono10-regular.otf lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats  > fonts load time           - 0.305 seconds 
mkiv lua stats  > metapost processing time  - 0.004 seconds, loading: 0.027 seconds, execution: 0.003 seconds, n: 2
mkiv lua stats  > luatex banner             - this is luatex, version beta-0.70.1-2011051918 (rev 4277)
mkiv lua stats  > control sequences         - 34156 of 65536 + 100000
mkiv lua stats  > current memory usage      - 46 MB (ctx: 47 MB)
mkiv lua stats  > runtime                   - 1.157 seconds, 1 processed pages, 2 shipped pages, 1.729 pages/second


[-- Attachment #4: framedcode.pdf --]
[-- Type: application/x-pdf, Size: 15271 bytes --]

[-- Attachment #5: framedcode.tex --]
[-- Type: text/x-tex, Size: 790 bytes --]

\mainlanguage[de]
%Vim Typing
\usemodule[vim]
\definevimtyping[MATLAB][syntax=matlab, lines=split, numbering=yes, tab=4, strip=no, before={\startframedMATLAB}, after={\stopframedMATLAB}]
\definetextbackground[framedMATLAB][frame=on, background=, framecolor=black, location=paragraph]

\starttext
some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text some random text 
\typeMATLABfile{code.m}
\stoptext

[-- Attachment #6: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: frame and numbering of code snippets using vim-module
  2012-06-07  0:00 frame and numbering of code snippets using vim-module Xenia
@ 2012-06-07  0:54 ` Aditya Mahajan
  2012-06-08  0:41   ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2012-06-07  0:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 7 Jun 2012, Xenia wrote:

> Hi context folks,
>
> using the vim module for including MATLAB-code, I noticed some annoying
> behavior:
>
> The frame, that I produced with your help using `\definetextbackground`,
> is not wide enough for the text inside, or rather the line wraps are
> done too late (see the attached examples!).

For the time being, use this version of t-syntax-highlighting.mkiv (add it 
to your project directory)

https://github.com/adityam/filter/blob/75d95dc587f5246d336bd2dc3efe840b0fcb3f3c/t-syntax-highlight.mkiv

I'll check later why the new version is failing.

> Additionally the frame has a bottom line at the end of the page although
> the code snippet did not end yet. It looks as if a new box begins.

That is the default behaviour of backgrounds. You can use the examples 
given in this thread 
http://archive.contextgarden.net/message/20110803.150829.6127cbc9.en.html

> Besides there should not be a new line number after a line break.

I am not sure how to prevent line number from appearing on split lines.

Aditya

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: frame and numbering of code snippets using vim-module
  2012-06-07  0:54 ` Aditya Mahajan
@ 2012-06-08  0:41   ` Aditya Mahajan
  2012-06-08  2:31     ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2012-06-08  0:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 6 Jun 2012, Aditya Mahajan wrote:

> On Thu, 7 Jun 2012, Xenia wrote:
>
>> Hi context folks,
>> 
>> using the vim module for including MATLAB-code, I noticed some annoying
>> behavior:
>> 
>> The frame, that I produced with your help using `\definetextbackground`,
>> is not wide enough for the text inside, or rather the line wraps are
>> done too late (see the attached examples!).
>
> For the time being, use this version of t-syntax-highlighting.mkiv (add it to 
> your project directory)
>
> https://github.com/adityam/filter/blob/75d95dc587f5246d336bd2dc3efe840b0fcb3f3c/t-syntax-highlight.mkiv
>
> I'll check later why the new version is failing.

I uploaded a new version which should behave better with respect to 
linebreaks.

>> Besides there should not be a new line number after a line break.

This is still unresolved.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: frame and numbering of code snippets using vim-module
  2012-06-08  0:41   ` Aditya Mahajan
@ 2012-06-08  2:31     ` Aditya Mahajan
  2012-06-09  8:01       ` Xenia
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2012-06-08  2:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 7 Jun 2012, Aditya Mahajan wrote:
>>> Besides there should not be a new line number after a line break.
>
> This is still unresolved.

The github branch should fix this. (See tests/vim/19-linenumber-break.tex).

Can you test it with your document?

To test the latest version, save t-syntaxhighlight.mkiv and 2context.vim 
from github in the current directory, and compile using

context --mode=vim-dev filename

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: frame and numbering of code snippets using vim-module
  2012-06-08  2:31     ` Aditya Mahajan
@ 2012-06-09  8:01       ` Xenia
  0 siblings, 0 replies; 5+ messages in thread
From: Xenia @ 2012-06-09  8:01 UTC (permalink / raw)
  To: ntg-context

On 08.06.2012 04:31, Aditya Mahajan wrote:
> On Thu, 7 Jun 2012, Aditya Mahajan wrote:
>>>> Besides there should not be a new line number after a line break.
>>
>> This is still unresolved.
> 
> The github branch should fix this. (See tests/vim/19-linenumber-break.tex).
> 
> Can you test it with your document?
> 
> To test the latest version, save t-syntaxhighlight.mkiv and 2context.vim
> from github in the current directory, and compile using
> 
> context --mode=vim-dev filename

It works great now (even without `--mode=vim-dev`). The frame ist wide
enough and the numbering after a line break continues in the next line,
too. Great. Thanks a lot.

Xenia
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-09  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-07  0:00 frame and numbering of code snippets using vim-module Xenia
2012-06-07  0:54 ` Aditya Mahajan
2012-06-08  0:41   ` Aditya Mahajan
2012-06-08  2:31     ` Aditya Mahajan
2012-06-09  8:01       ` Xenia

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).