This is the setup I have been using, but I'm unsure if the problem could be 
related to the other problem I had. (Not scaled to a MWE, but short enough.) I 
figured the issue by removing some of the lines.

\usemodule[vim]

\definetextbackground[codebkg]
        [
        frame=on, 
        framecolor=black,
        background=,
        location=paragraph,
        ]

\definevimtyping[vimR]
        [
        syntax=r,
        space=off,
        lines=split,
        numbering=yes,
        numberstep=5,
        alternative=pscolor,
        margin=.5em,
        style={\switchtobodyfont[type,small]\setupinterlinespace},
        before={\blank[white,small]\startcodebkg},  % a bit of extra space 
        after={\stopcodebkg},
        directory=vimout/,  % note: you must create this folder yourself!
        ]

\starttext

\startvimR
#!/usr/bin/env R
included_aa <- list(
  `6d1t` = 2:81,
  `6cnq` = 146:225,
  `6ccg` = 2:81,
  `4lg7` = 76:167,
  `3c2i` = 90:181) %>% enframe() %>% unnest(cols = "value") %>% 
  rename(protein = "name", aa_pos = "value") %>%
  mutate(chain = "A") %>% mutate(include_aa = TRUE)
\stopvimR

\stoptext

So, the first "i", "n" etc. come from "include_aa" after I remove the shebang 
statement. 

The lines with "#" and "$" (in other pieces not shown) cause the complaints.

I also realized that I get output for each vim block, but instead of a 
"vimout", I get a "pdf" (error) and a "log" (some attached) now.

Also, the blocks get recompiled with each run even if their content doesn't 
change which was the previous behavior.


Attachment: xxx-temp-vimR-0-error.log
Description: Binary data

Attachment: xxx-temp-vimR-0.log
Description: Binary data

Attachment: xxx-temp-vimR-1.log
Description: Binary data


> On Aug 23, 2021, at 08:19, Hans Hagen <j.ha...@xs4all.nl> wrote:
> 
> On 8/23/2021 12:10 AM, Benjamin Buchmuller via ntg-context wrote:
>> Hi,
>> Thanks for having had a look into the t-vim.
>> At least the document compiles fine (I get a PDF), although multiple 
>> complaints from the lua end when I use "$" or "#" in my source, for example
>> #!/usr/bin/bash
>> etc. culminating in
>> Sorry, but I'm not programmed to handle this case;
>> I'll just pretend that you didn''t ask for it.
>> If you're in the wrong mode, you might be able to
>> return to the right one by typing 'I}' or 'I$' or 'I\par'.
>> Seems as if LMTX tried to interpret something literally here …
>> Further, I get a lot of
>> fonts           > beware: no fonts are loaded yet, using 'lm mono' in box
>> fonts           > checking > char i (U+00069) in font '' with id 0: missing
>> fonts           > checking > char n (U+0006E) in font '' with id 0: missing
>> warnings. Maybe some things need to be adjusted?
> THis normally means that you have someting before the \starttext that gets 
> typeset (here the word "in")
> 
> Hans
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to