ConTeXt: Use of t-vim module in table
up vote
6
down vote
favorite
How can use the t-vim module inside a TABLE environment?
I know it propably has something to do with buffers but I'm not sure how to store the output from vim into a buffer.
MWE:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
bTABLE
bTR
bTD
startsomecode
test code
stopsomecode
eTD
eTR
eTABLE
stoptext
context
add a comment |
up vote
6
down vote
favorite
How can use the t-vim module inside a TABLE environment?
I know it propably has something to do with buffers but I'm not sure how to store the output from vim into a buffer.
MWE:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
bTABLE
bTR
bTD
startsomecode
test code
stopsomecode
eTD
eTR
eTABLE
stoptext
context
1
I realized thatprocess<vim>buffer
was not documented, so I added it to the documentation at github
– Aditya
Nov 27 at 16:44
add a comment |
up vote
6
down vote
favorite
up vote
6
down vote
favorite
How can use the t-vim module inside a TABLE environment?
I know it propably has something to do with buffers but I'm not sure how to store the output from vim into a buffer.
MWE:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
bTABLE
bTR
bTD
startsomecode
test code
stopsomecode
eTD
eTR
eTABLE
stoptext
context
How can use the t-vim module inside a TABLE environment?
I know it propably has something to do with buffers but I'm not sure how to store the output from vim into a buffer.
MWE:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
bTABLE
bTR
bTD
startsomecode
test code
stopsomecode
eTD
eTR
eTABLE
stoptext
context
context
asked Nov 27 at 14:10
Christopher Bock
875
875
1
I realized thatprocess<vim>buffer
was not documented, so I added it to the documentation at github
– Aditya
Nov 27 at 16:44
add a comment |
1
I realized thatprocess<vim>buffer
was not documented, so I added it to the documentation at github
– Aditya
Nov 27 at 16:44
1
1
I realized that
process<vim>buffer
was not documented, so I added it to the documentation at github– Aditya
Nov 27 at 16:44
I realized that
process<vim>buffer
was not documented, so I added it to the documentation at github– Aditya
Nov 27 at 16:44
add a comment |
2 Answers
2
active
oldest
votes
up vote
6
down vote
accepted
Since t-vim
is built on top of t-filter
, you can can use the process<filter>buffer
command to load an existing buffer:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
startbuffer[ruby]
# Ruby program listing
print("Hello World")
stopbuffer
startbuffer[somecode]
test code
more lines
stopbuffer
bTABLE
bTR
bTD
processsomecodebuffer[somecode]
eTD
bTD
processRUBYbuffer[ruby]
eTD
eTR
eTABLE
stoptext
You could alternatively use the module ntb-to-xtb
, which lets you use xtables with natural table syntax (in other words: this lets you use TeXnicians solution without changing the code):
usemodule[vim]
usemodule[ntb-to-xtb]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
bTABLE
bTR
bTD
startsomecode
test code
more lines
stopsomecode
eTD
bTD
startRUBY
# Ruby program listing
print("Hello World")
stopRUBY
eTD
eTR
eTABLE
stoptext
The output for both solutions is the same:
add a comment |
up vote
5
down vote
More of a comment than an answer: With xtables you may use verbatim material directly.
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
startxtable
startxrow
startxcell
startsomecode
test code
stopsomecode
stopxcell
stopxrow
stopxtable
stoptext
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
1
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
Since t-vim
is built on top of t-filter
, you can can use the process<filter>buffer
command to load an existing buffer:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
startbuffer[ruby]
# Ruby program listing
print("Hello World")
stopbuffer
startbuffer[somecode]
test code
more lines
stopbuffer
bTABLE
bTR
bTD
processsomecodebuffer[somecode]
eTD
bTD
processRUBYbuffer[ruby]
eTD
eTR
eTABLE
stoptext
You could alternatively use the module ntb-to-xtb
, which lets you use xtables with natural table syntax (in other words: this lets you use TeXnicians solution without changing the code):
usemodule[vim]
usemodule[ntb-to-xtb]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
bTABLE
bTR
bTD
startsomecode
test code
more lines
stopsomecode
eTD
bTD
startRUBY
# Ruby program listing
print("Hello World")
stopRUBY
eTD
eTR
eTABLE
stoptext
The output for both solutions is the same:
add a comment |
up vote
6
down vote
accepted
Since t-vim
is built on top of t-filter
, you can can use the process<filter>buffer
command to load an existing buffer:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
startbuffer[ruby]
# Ruby program listing
print("Hello World")
stopbuffer
startbuffer[somecode]
test code
more lines
stopbuffer
bTABLE
bTR
bTD
processsomecodebuffer[somecode]
eTD
bTD
processRUBYbuffer[ruby]
eTD
eTR
eTABLE
stoptext
You could alternatively use the module ntb-to-xtb
, which lets you use xtables with natural table syntax (in other words: this lets you use TeXnicians solution without changing the code):
usemodule[vim]
usemodule[ntb-to-xtb]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
bTABLE
bTR
bTD
startsomecode
test code
more lines
stopsomecode
eTD
bTD
startRUBY
# Ruby program listing
print("Hello World")
stopRUBY
eTD
eTR
eTABLE
stoptext
The output for both solutions is the same:
add a comment |
up vote
6
down vote
accepted
up vote
6
down vote
accepted
Since t-vim
is built on top of t-filter
, you can can use the process<filter>buffer
command to load an existing buffer:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
startbuffer[ruby]
# Ruby program listing
print("Hello World")
stopbuffer
startbuffer[somecode]
test code
more lines
stopbuffer
bTABLE
bTR
bTD
processsomecodebuffer[somecode]
eTD
bTD
processRUBYbuffer[ruby]
eTD
eTR
eTABLE
stoptext
You could alternatively use the module ntb-to-xtb
, which lets you use xtables with natural table syntax (in other words: this lets you use TeXnicians solution without changing the code):
usemodule[vim]
usemodule[ntb-to-xtb]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
bTABLE
bTR
bTD
startsomecode
test code
more lines
stopsomecode
eTD
bTD
startRUBY
# Ruby program listing
print("Hello World")
stopRUBY
eTD
eTR
eTABLE
stoptext
The output for both solutions is the same:
Since t-vim
is built on top of t-filter
, you can can use the process<filter>buffer
command to load an existing buffer:
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
startbuffer[ruby]
# Ruby program listing
print("Hello World")
stopbuffer
startbuffer[somecode]
test code
more lines
stopbuffer
bTABLE
bTR
bTD
processsomecodebuffer[somecode]
eTD
bTD
processRUBYbuffer[ruby]
eTD
eTR
eTABLE
stoptext
You could alternatively use the module ntb-to-xtb
, which lets you use xtables with natural table syntax (in other words: this lets you use TeXnicians solution without changing the code):
usemodule[vim]
usemodule[ntb-to-xtb]
definevimtyping
[somecode]
[lines=split]
definevimtyping
[RUBY]
[syntax=ruby]
starttext
bTABLE
bTR
bTD
startsomecode
test code
more lines
stopsomecode
eTD
bTD
startRUBY
# Ruby program listing
print("Hello World")
stopRUBY
eTD
eTR
eTABLE
stoptext
The output for both solutions is the same:
edited Nov 28 at 9:52
answered Nov 27 at 16:09
DG'
9,00511740
9,00511740
add a comment |
add a comment |
up vote
5
down vote
More of a comment than an answer: With xtables you may use verbatim material directly.
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
startxtable
startxrow
startxcell
startsomecode
test code
stopsomecode
stopxcell
stopxrow
stopxtable
stoptext
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
1
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
add a comment |
up vote
5
down vote
More of a comment than an answer: With xtables you may use verbatim material directly.
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
startxtable
startxrow
startxcell
startsomecode
test code
stopsomecode
stopxcell
stopxrow
stopxtable
stoptext
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
1
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
add a comment |
up vote
5
down vote
up vote
5
down vote
More of a comment than an answer: With xtables you may use verbatim material directly.
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
startxtable
startxrow
startxcell
startsomecode
test code
stopsomecode
stopxcell
stopxrow
stopxtable
stoptext
More of a comment than an answer: With xtables you may use verbatim material directly.
usemodule[vim]
definevimtyping
[somecode]
[lines=split]
starttext
typebuffer[visit]
startxtable
startxrow
startxcell
startsomecode
test code
stopsomecode
stopxcell
stopxrow
stopxtable
stoptext
answered Nov 27 at 16:09
TeXnician
23.7k62984
23.7k62984
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
1
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
add a comment |
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
1
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
I had to move away from xtables because I encountered problems with them... tex.stackexchange.com/questions/460142/… and mailman.ntg.nl/pipermail/ntg-context/2018/093357.html
– Christopher Bock
Nov 28 at 10:21
1
1
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
@ChristopherBock Ah, okay. Then this answer is just for future readers who might not have problems with xtables.
– TeXnician
Nov 28 at 10:22
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462001%2fcontext-use-of-t-vim-module-in-table%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I realized that
process<vim>buffer
was not documented, so I added it to the documentation at github– Aditya
Nov 27 at 16:44