What is the difference between somecmd and csname somecmdendcsname?Switching a string in a token register to...

How should I respond when I lied about my education and the company finds out through background check?

Can I say "fingers" when referring to toes?

How can "mimic phobia" be cured or prevented?

How do you make your own symbol when Detexify fails?

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

Non-trope happy ending?

Calculate sum of polynomial roots

How does a computer interpret real numbers?

Does the Linux kernel need a file system to run?

Can I still be respawned if I die by falling off the map?

Why is the "ls" command showing permissions of files in a FAT32 partition?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?

The IT department bottlenecks progress. How should I handle this?

Do the primes contain an infinite almost arithmetic progression?

What if a revenant (monster) gains fire resistance?

Why is it that I can sometimes guess the next note?

Why is so much work done on numerical verification of the Riemann Hypothesis?

Did arcade monitors have same pixel aspect ratio as TV sets?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

What are the advantages of simplicial model categories over non-simplicial ones?

Why should universal income be universal?



What is the difference between somecmd and csname somecmdendcsname?


Switching a string in a token register to lowercase and processing via the package soulUnderline just words, not the space between them`Undefined control sequence` error when trying to write the value of a csname…endcsname control-sequence to the log fileWhat causes the difference appearance by the useages of two “csname…endcsname”?expandafter and csnameProblem with `expandafter` and `csname`Why can I not use string to prevent the expansion of csname?Expansion rules for csname/endcsname inside edefhow to add vertical space between words and the underline effect?













0















This is a demo



documentclass{article}
usepackage{soul}
makeatletter
newcommand{mydef}[2]{%
expandafterdefcsname my#1endcsname {#2}
}
newcommand{mygetdef}[1]{%
ifcsname my#1endcsname csname my#1endcsname else #1 not defined fi%
}
makeatother

deftest{some text to complete}
mydef{xxx}{some text to complete}

begin{document}
ultest % it works
%%%% if uncomment, the below one does not work, an error is reported
% ulmygetdef{xxx}
end{document}


As the comment says, if ulmygetdef{xxx} takes place, there comes a error:



! Argument of SOUL@@ has an extra }.









share























  • Try edeftmp{mygetdef{xxx}} ultmp

    – Steven B. Segletes
    12 secs ago
















0















This is a demo



documentclass{article}
usepackage{soul}
makeatletter
newcommand{mydef}[2]{%
expandafterdefcsname my#1endcsname {#2}
}
newcommand{mygetdef}[1]{%
ifcsname my#1endcsname csname my#1endcsname else #1 not defined fi%
}
makeatother

deftest{some text to complete}
mydef{xxx}{some text to complete}

begin{document}
ultest % it works
%%%% if uncomment, the below one does not work, an error is reported
% ulmygetdef{xxx}
end{document}


As the comment says, if ulmygetdef{xxx} takes place, there comes a error:



! Argument of SOUL@@ has an extra }.









share























  • Try edeftmp{mygetdef{xxx}} ultmp

    – Steven B. Segletes
    12 secs ago














0












0








0








This is a demo



documentclass{article}
usepackage{soul}
makeatletter
newcommand{mydef}[2]{%
expandafterdefcsname my#1endcsname {#2}
}
newcommand{mygetdef}[1]{%
ifcsname my#1endcsname csname my#1endcsname else #1 not defined fi%
}
makeatother

deftest{some text to complete}
mydef{xxx}{some text to complete}

begin{document}
ultest % it works
%%%% if uncomment, the below one does not work, an error is reported
% ulmygetdef{xxx}
end{document}


As the comment says, if ulmygetdef{xxx} takes place, there comes a error:



! Argument of SOUL@@ has an extra }.









share














This is a demo



documentclass{article}
usepackage{soul}
makeatletter
newcommand{mydef}[2]{%
expandafterdefcsname my#1endcsname {#2}
}
newcommand{mygetdef}[1]{%
ifcsname my#1endcsname csname my#1endcsname else #1 not defined fi%
}
makeatother

deftest{some text to complete}
mydef{xxx}{some text to complete}

begin{document}
ultest % it works
%%%% if uncomment, the below one does not work, an error is reported
% ulmygetdef{xxx}
end{document}


As the comment says, if ulmygetdef{xxx} takes place, there comes a error:



! Argument of SOUL@@ has an extra }.







soul csname





share












share










share



share










asked 9 mins ago









jiewuzajiewuza

626




626













  • Try edeftmp{mygetdef{xxx}} ultmp

    – Steven B. Segletes
    12 secs ago



















  • Try edeftmp{mygetdef{xxx}} ultmp

    – Steven B. Segletes
    12 secs ago

















Try edeftmp{mygetdef{xxx}} ultmp

– Steven B. Segletes
12 secs ago





Try edeftmp{mygetdef{xxx}} ultmp

– Steven B. Segletes
12 secs ago










0






active

oldest

votes











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',
autoActivateHeartbeat: false,
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%2f481003%2fwhat-is-the-difference-between-somecmd-and-csname-somecmd-endcsname%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f481003%2fwhat-is-the-difference-between-somecmd-and-csname-somecmd-endcsname%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

Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...