newcommand with intercalated arguments











up vote
0
down vote

favorite












I want to create a command which works like this:



Writing:




w1o2




Should yield:




W^{1,2}o(I)




I am aware of the parameters use for newcommand, that would work like this:



newcommand{wo}[2]{W^{#1,#2}(I)}


And this would be used by writing wo12
(For example).



But I specifically want to intercalate letters between commands.



Thanks.










share|improve this question
























  • The problem is that wo won't be recognized as w{o} without much ado
    – Christian Hupfer
    Apr 9 '16 at 13:16















up vote
0
down vote

favorite












I want to create a command which works like this:



Writing:




w1o2




Should yield:




W^{1,2}o(I)




I am aware of the parameters use for newcommand, that would work like this:



newcommand{wo}[2]{W^{#1,#2}(I)}


And this would be used by writing wo12
(For example).



But I specifically want to intercalate letters between commands.



Thanks.










share|improve this question
























  • The problem is that wo won't be recognized as w{o} without much ado
    – Christian Hupfer
    Apr 9 '16 at 13:16













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to create a command which works like this:



Writing:




w1o2




Should yield:




W^{1,2}o(I)




I am aware of the parameters use for newcommand, that would work like this:



newcommand{wo}[2]{W^{#1,#2}(I)}


And this would be used by writing wo12
(For example).



But I specifically want to intercalate letters between commands.



Thanks.










share|improve this question















I want to create a command which works like this:



Writing:




w1o2




Should yield:




W^{1,2}o(I)




I am aware of the parameters use for newcommand, that would work like this:



newcommand{wo}[2]{W^{#1,#2}(I)}


And this would be used by writing wo12
(For example).



But I specifically want to intercalate letters between commands.



Thanks.







macros






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 12 mins ago









siracusa

4,68511128




4,68511128










asked Apr 9 '16 at 12:56









D1X

1748




1748












  • The problem is that wo won't be recognized as w{o} without much ado
    – Christian Hupfer
    Apr 9 '16 at 13:16


















  • The problem is that wo won't be recognized as w{o} without much ado
    – Christian Hupfer
    Apr 9 '16 at 13:16
















The problem is that wo won't be recognized as w{o} without much ado
– Christian Hupfer
Apr 9 '16 at 13:16




The problem is that wo won't be recognized as w{o} without much ado
– Christian Hupfer
Apr 9 '16 at 13:16










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Not sure what you want.



newcommand*w[3]{W^{#1,#3}#2(I)}
w1o2





share|improve this answer





















  • That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
    – D1X
    Apr 9 '16 at 14:50








  • 1




    Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
    – Manuel
    Apr 9 '16 at 15:57










  • @D1X: Any news on this?
    – Christian Hupfer
    Apr 16 '16 at 16:08













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f303356%2fnewcommand-with-intercalated-arguments%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













Not sure what you want.



newcommand*w[3]{W^{#1,#3}#2(I)}
w1o2





share|improve this answer





















  • That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
    – D1X
    Apr 9 '16 at 14:50








  • 1




    Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
    – Manuel
    Apr 9 '16 at 15:57










  • @D1X: Any news on this?
    – Christian Hupfer
    Apr 16 '16 at 16:08

















up vote
1
down vote













Not sure what you want.



newcommand*w[3]{W^{#1,#3}#2(I)}
w1o2





share|improve this answer





















  • That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
    – D1X
    Apr 9 '16 at 14:50








  • 1




    Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
    – Manuel
    Apr 9 '16 at 15:57










  • @D1X: Any news on this?
    – Christian Hupfer
    Apr 16 '16 at 16:08















up vote
1
down vote










up vote
1
down vote









Not sure what you want.



newcommand*w[3]{W^{#1,#3}#2(I)}
w1o2





share|improve this answer












Not sure what you want.



newcommand*w[3]{W^{#1,#3}#2(I)}
w1o2






share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 9 '16 at 13:33









Manuel

21.1k845105




21.1k845105












  • That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
    – D1X
    Apr 9 '16 at 14:50








  • 1




    Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
    – Manuel
    Apr 9 '16 at 15:57










  • @D1X: Any news on this?
    – Christian Hupfer
    Apr 16 '16 at 16:08




















  • That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
    – D1X
    Apr 9 '16 at 14:50








  • 1




    Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
    – Manuel
    Apr 9 '16 at 15:57










  • @D1X: Any news on this?
    – Christian Hupfer
    Apr 16 '16 at 16:08


















That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
– D1X
Apr 9 '16 at 14:50






That works for the example provided, but I do not get why it does not when I write, for example, wo12. Also, it does not work if I leave blank one of the parameters, for example if I write w12.
– D1X
Apr 9 '16 at 14:50






1




1




Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
– Manuel
Apr 9 '16 at 15:57




Rewrite and clarify in your question, please. It's not clear what you want. What should wo12 output? And w12? how does the command know when to stop? If you write $(w12)$ how does w know that ) is not its third argument?
– Manuel
Apr 9 '16 at 15:57












@D1X: Any news on this?
– Christian Hupfer
Apr 16 '16 at 16:08






@D1X: Any news on this?
– Christian Hupfer
Apr 16 '16 at 16:08




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f303356%2fnewcommand-with-intercalated-arguments%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)