How to create a DNA like figure
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I would like to create a sequence like the one in slide 5 of this Stanford set of slides on edit distance.
I would like something like this:
I don't know what package I can use to do this hence, I haven't done anything yet. Do you know what package can be used for this?
packages
New contributor
add a comment |Â
up vote
1
down vote
favorite
I would like to create a sequence like the one in slide 5 of this Stanford set of slides on edit distance.
I would like something like this:
I don't know what package I can use to do this hence, I haven't done anything yet. Do you know what package can be used for this?
packages
New contributor
Welcome to TeX.SX! Could you add the image of the sequence to your question and what have you done so far?
â Bobyandbob
5 hours ago
Possibly related (no duplicate, though): tex.stackexchange.com/q/16572/4918
â Tobi
4 hours ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I would like to create a sequence like the one in slide 5 of this Stanford set of slides on edit distance.
I would like something like this:
I don't know what package I can use to do this hence, I haven't done anything yet. Do you know what package can be used for this?
packages
New contributor
I would like to create a sequence like the one in slide 5 of this Stanford set of slides on edit distance.
I would like something like this:
I don't know what package I can use to do this hence, I haven't done anything yet. Do you know what package can be used for this?
packages
packages
New contributor
New contributor
edited 33 mins ago
New contributor
asked 5 hours ago
ryuzakinho
1084
1084
New contributor
New contributor
Welcome to TeX.SX! Could you add the image of the sequence to your question and what have you done so far?
â Bobyandbob
5 hours ago
Possibly related (no duplicate, though): tex.stackexchange.com/q/16572/4918
â Tobi
4 hours ago
add a comment |Â
Welcome to TeX.SX! Could you add the image of the sequence to your question and what have you done so far?
â Bobyandbob
5 hours ago
Possibly related (no duplicate, though): tex.stackexchange.com/q/16572/4918
â Tobi
4 hours ago
Welcome to TeX.SX! Could you add the image of the sequence to your question and what have you done so far?
â Bobyandbob
5 hours ago
Welcome to TeX.SX! Could you add the image of the sequence to your question and what have you done so far?
â Bobyandbob
5 hours ago
Possibly related (no duplicate, though): tex.stackexchange.com/q/16572/4918
â Tobi
4 hours ago
Possibly related (no duplicate, though): tex.stackexchange.com/q/16572/4918
â Tobi
4 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
If you thought of the image on the slide Minimum Edit Distance, here is a code for that:
documentclass[tikz]standalone
begindocument
begintikzpicture
foreach x/y/z in 0/I/*, 1/N/E,2/T/X,3/E/E, 4/*/C, 5/N/U,6/T/T,7/I/I,8/O/O,9/N/N
pgfmathsetmacrocoordx * 0.3
node (xx) at (coord,0) y;
node (yx) at (coord,-1) z;
draw (xx) -- (yx);
foreach x/y in 0/d,1/s,2/s,4/i,5/s
pgfmathsetmacrocoordx * 0.3;
node[anchor=base] at (coord,-1.5) texttty;
endtikzpicture
enddocument
Edit: I have to mention @AndréC's answer for Vertically misaligned node in tikz which partly helped me creating this figure.
add a comment |Â
up vote
0
down vote
Here's a realization with xparse
. It should be clear what's the role of the first optional argument and of the second. The character !
produces nothing and helps for the alignment.
documentclassarticle
usepackageamsmath
usepackagexparse,array,booktabs
ExplSyntaxOn
NewDocumentCommandsedOnormalsizemmo
group_begin:
renewcommandarraystretch0
ttfamily #1
begintabular @ * tl_count:n #2 wc0.6em@ l @
tl_map_function:nN #2 ryuza_cell:n \ addlinespace
tl_map_function:nN #2 ryuza_empty:n \ addlinespace
tl_map_function:nN #3 ryuza_cell:n
IfValueT #4
\ addlinespace tl_map_function:nN #4 ryuza_cell:n
endtabular
group_end:
cs_new_protected:Nn ryuza_cell:n
str_if_eq:nnTF #1 ! #1 &
cs_new_protected:Nn ryuza_empty:n
$Big
ExplSyntaxOff
begindocument
sed
INTE*NTION
*EXECUTION
sed[Large]
INTE*NTION
*EXECUTION
[dss!is!!!!]
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
If you thought of the image on the slide Minimum Edit Distance, here is a code for that:
documentclass[tikz]standalone
begindocument
begintikzpicture
foreach x/y/z in 0/I/*, 1/N/E,2/T/X,3/E/E, 4/*/C, 5/N/U,6/T/T,7/I/I,8/O/O,9/N/N
pgfmathsetmacrocoordx * 0.3
node (xx) at (coord,0) y;
node (yx) at (coord,-1) z;
draw (xx) -- (yx);
foreach x/y in 0/d,1/s,2/s,4/i,5/s
pgfmathsetmacrocoordx * 0.3;
node[anchor=base] at (coord,-1.5) texttty;
endtikzpicture
enddocument
Edit: I have to mention @AndréC's answer for Vertically misaligned node in tikz which partly helped me creating this figure.
add a comment |Â
up vote
3
down vote
accepted
If you thought of the image on the slide Minimum Edit Distance, here is a code for that:
documentclass[tikz]standalone
begindocument
begintikzpicture
foreach x/y/z in 0/I/*, 1/N/E,2/T/X,3/E/E, 4/*/C, 5/N/U,6/T/T,7/I/I,8/O/O,9/N/N
pgfmathsetmacrocoordx * 0.3
node (xx) at (coord,0) y;
node (yx) at (coord,-1) z;
draw (xx) -- (yx);
foreach x/y in 0/d,1/s,2/s,4/i,5/s
pgfmathsetmacrocoordx * 0.3;
node[anchor=base] at (coord,-1.5) texttty;
endtikzpicture
enddocument
Edit: I have to mention @AndréC's answer for Vertically misaligned node in tikz which partly helped me creating this figure.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
If you thought of the image on the slide Minimum Edit Distance, here is a code for that:
documentclass[tikz]standalone
begindocument
begintikzpicture
foreach x/y/z in 0/I/*, 1/N/E,2/T/X,3/E/E, 4/*/C, 5/N/U,6/T/T,7/I/I,8/O/O,9/N/N
pgfmathsetmacrocoordx * 0.3
node (xx) at (coord,0) y;
node (yx) at (coord,-1) z;
draw (xx) -- (yx);
foreach x/y in 0/d,1/s,2/s,4/i,5/s
pgfmathsetmacrocoordx * 0.3;
node[anchor=base] at (coord,-1.5) texttty;
endtikzpicture
enddocument
Edit: I have to mention @AndréC's answer for Vertically misaligned node in tikz which partly helped me creating this figure.
If you thought of the image on the slide Minimum Edit Distance, here is a code for that:
documentclass[tikz]standalone
begindocument
begintikzpicture
foreach x/y/z in 0/I/*, 1/N/E,2/T/X,3/E/E, 4/*/C, 5/N/U,6/T/T,7/I/I,8/O/O,9/N/N
pgfmathsetmacrocoordx * 0.3
node (xx) at (coord,0) y;
node (yx) at (coord,-1) z;
draw (xx) -- (yx);
foreach x/y in 0/d,1/s,2/s,4/i,5/s
pgfmathsetmacrocoordx * 0.3;
node[anchor=base] at (coord,-1.5) texttty;
endtikzpicture
enddocument
Edit: I have to mention @AndréC's answer for Vertically misaligned node in tikz which partly helped me creating this figure.
edited 3 hours ago
answered 4 hours ago
bmv
2,437824
2,437824
add a comment |Â
add a comment |Â
up vote
0
down vote
Here's a realization with xparse
. It should be clear what's the role of the first optional argument and of the second. The character !
produces nothing and helps for the alignment.
documentclassarticle
usepackageamsmath
usepackagexparse,array,booktabs
ExplSyntaxOn
NewDocumentCommandsedOnormalsizemmo
group_begin:
renewcommandarraystretch0
ttfamily #1
begintabular @ * tl_count:n #2 wc0.6em@ l @
tl_map_function:nN #2 ryuza_cell:n \ addlinespace
tl_map_function:nN #2 ryuza_empty:n \ addlinespace
tl_map_function:nN #3 ryuza_cell:n
IfValueT #4
\ addlinespace tl_map_function:nN #4 ryuza_cell:n
endtabular
group_end:
cs_new_protected:Nn ryuza_cell:n
str_if_eq:nnTF #1 ! #1 &
cs_new_protected:Nn ryuza_empty:n
$Big
ExplSyntaxOff
begindocument
sed
INTE*NTION
*EXECUTION
sed[Large]
INTE*NTION
*EXECUTION
[dss!is!!!!]
enddocument
add a comment |Â
up vote
0
down vote
Here's a realization with xparse
. It should be clear what's the role of the first optional argument and of the second. The character !
produces nothing and helps for the alignment.
documentclassarticle
usepackageamsmath
usepackagexparse,array,booktabs
ExplSyntaxOn
NewDocumentCommandsedOnormalsizemmo
group_begin:
renewcommandarraystretch0
ttfamily #1
begintabular @ * tl_count:n #2 wc0.6em@ l @
tl_map_function:nN #2 ryuza_cell:n \ addlinespace
tl_map_function:nN #2 ryuza_empty:n \ addlinespace
tl_map_function:nN #3 ryuza_cell:n
IfValueT #4
\ addlinespace tl_map_function:nN #4 ryuza_cell:n
endtabular
group_end:
cs_new_protected:Nn ryuza_cell:n
str_if_eq:nnTF #1 ! #1 &
cs_new_protected:Nn ryuza_empty:n
$Big
ExplSyntaxOff
begindocument
sed
INTE*NTION
*EXECUTION
sed[Large]
INTE*NTION
*EXECUTION
[dss!is!!!!]
enddocument
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Here's a realization with xparse
. It should be clear what's the role of the first optional argument and of the second. The character !
produces nothing and helps for the alignment.
documentclassarticle
usepackageamsmath
usepackagexparse,array,booktabs
ExplSyntaxOn
NewDocumentCommandsedOnormalsizemmo
group_begin:
renewcommandarraystretch0
ttfamily #1
begintabular @ * tl_count:n #2 wc0.6em@ l @
tl_map_function:nN #2 ryuza_cell:n \ addlinespace
tl_map_function:nN #2 ryuza_empty:n \ addlinespace
tl_map_function:nN #3 ryuza_cell:n
IfValueT #4
\ addlinespace tl_map_function:nN #4 ryuza_cell:n
endtabular
group_end:
cs_new_protected:Nn ryuza_cell:n
str_if_eq:nnTF #1 ! #1 &
cs_new_protected:Nn ryuza_empty:n
$Big
ExplSyntaxOff
begindocument
sed
INTE*NTION
*EXECUTION
sed[Large]
INTE*NTION
*EXECUTION
[dss!is!!!!]
enddocument
Here's a realization with xparse
. It should be clear what's the role of the first optional argument and of the second. The character !
produces nothing and helps for the alignment.
documentclassarticle
usepackageamsmath
usepackagexparse,array,booktabs
ExplSyntaxOn
NewDocumentCommandsedOnormalsizemmo
group_begin:
renewcommandarraystretch0
ttfamily #1
begintabular @ * tl_count:n #2 wc0.6em@ l @
tl_map_function:nN #2 ryuza_cell:n \ addlinespace
tl_map_function:nN #2 ryuza_empty:n \ addlinespace
tl_map_function:nN #3 ryuza_cell:n
IfValueT #4
\ addlinespace tl_map_function:nN #4 ryuza_cell:n
endtabular
group_end:
cs_new_protected:Nn ryuza_cell:n
str_if_eq:nnTF #1 ! #1 &
cs_new_protected:Nn ryuza_empty:n
$Big
ExplSyntaxOff
begindocument
sed
INTE*NTION
*EXECUTION
sed[Large]
INTE*NTION
*EXECUTION
[dss!is!!!!]
enddocument
answered 6 mins ago
egreg
687k8418313079
687k8418313079
add a comment |Â
add a comment |Â
ryuzakinho is a new contributor. Be nice, and check out our Code of Conduct.
ryuzakinho is a new contributor. Be nice, and check out our Code of Conduct.
ryuzakinho is a new contributor. Be nice, and check out our Code of Conduct.
ryuzakinho is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454114%2fhow-to-create-a-dna-like-figure%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Welcome to TeX.SX! Could you add the image of the sequence to your question and what have you done so far?
â Bobyandbob
5 hours ago
Possibly related (no duplicate, though): tex.stackexchange.com/q/16572/4918
â Tobi
4 hours ago