xstring fails to compare text containing \choose from a list with xstringxstring macros inside foreachxstring substitution with font commands fails in errorincludegraphics and xstring packageUsing xstring with translatorXstring Problem with ŞLaTeX xstring StrCut with macrosCompare etocname with stringspecial charactor handling in xstringProblem with xstring: IfEqCase case falls thru

Can non-English-speaking characters use wordplay specific to English?

Do firearms count as ranged weapons?

How feasible is the Delta-Glider?

Yandex Programming Contest: Alarms

Modern approach to radio buttons

What is the most important source of natural gas? coal, oil or other?

A Mathematical Discussion: Fill in the Blank

What caused the tendency for conservatives to not support climate change reform?

How to capture more stars?

Why do Russians call their women expensive ("дорогая")?

Is there an explanation for Austria's Freedom Party virtually retaining its vote share despite recent scandal?

How were these pictures of spacecraft wind tunnel testing taken?

How do I subvert the tropes of a train heist?

Crossword gone overboard

Smart people send dumb people to a new planet on a space craft that crashes into a body of water

What F1 in name of seeds/varieties means?

How current works

Is this story about US tax office reasonable?

Terminology about G- simplicial complexes

How can I prevent interns from being expendable?

What does it mean when you think without speaking?

What is the best linguistic term for describing the kw > p / gw > b change, and its usual companion s > h

Is it possible to change original filename of an exe?

Leading and Suffering Numbers



xstring fails to compare text containing \


choose from a list with xstringxstring macros inside foreachxstring substitution with font commands fails in errorincludegraphics and xstring packageUsing xstring with translatorXstring Problem with ŞLaTeX xstring StrCut with macrosCompare etocname with stringspecial charactor handling in xstringProblem with xstring: IfEqCase case falls thru













5















Using xstring in order to compare text containing \ produces a compilation error. Here is my MWE:



documentclassreport
usepackagexstring
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Examplenot \ void
AtBeginDocument
begintitlepage
centering
IfStrEqprintExample
void
printExample
endtitlepage

begindocument

enddocument


The first error message is:




! Undefined control sequence.
->let reserved@e
relax let reserved@f relax @ifstar {let reserv...
l.15 begindocument




The Example command defined here should accept \. How can I get this working? The solution should take into account that the (La)TeX distribution version used here is the one included in Linux Mint 18.3, i.e. TeX Live 2017/Debian, which cannot be changed.










share|improve this question
























  • What is the expected output. You could try using noexpandarg, but I am not sure what the code is supposed to do.

    – Peter Grill
    May 22 at 9:23












  • If you are just testing whether a macro is empty or not, then the void tests from etoolbox might be better, that is what I normally use. But as Peter mentions, it is not quite clear what you are trying to do.

    – daleif
    May 22 at 9:52






  • 1





    It works with xifthen using this test: ifthenelseequalprintExamplevoidprintExample

    – frougon
    May 22 at 9:57












  • Various tests from etoolbox (ifdefvoid, ifstrempty or ifblank) do not work with TeX Live 2017/Debian (but they work for current TeX Live). Command ifthenelse from xifthen works well, indeed (even if, from a "logical" perspective, I would expect a command whose argument is directly a string, not a boolean). Can someone explain why \ breaks IfStrEq and if there is a way (or not) to use it?

    – Jérôme Champavère
    May 22 at 19:52












  • I added centering in environment titlepage because it causes an error (! Incomplete iffalse; all text was ignored after line …) when ifthenelse test is used. An other error is raised with center environment (! Use of @item doesn't match its definition.). In both cases, one needs to use protect\ in order to get it working as expected.

    – Jérôme Champavère
    May 22 at 20:32
















5















Using xstring in order to compare text containing \ produces a compilation error. Here is my MWE:



documentclassreport
usepackagexstring
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Examplenot \ void
AtBeginDocument
begintitlepage
centering
IfStrEqprintExample
void
printExample
endtitlepage

begindocument

enddocument


The first error message is:




! Undefined control sequence.
->let reserved@e
relax let reserved@f relax @ifstar {let reserv...
l.15 begindocument




The Example command defined here should accept \. How can I get this working? The solution should take into account that the (La)TeX distribution version used here is the one included in Linux Mint 18.3, i.e. TeX Live 2017/Debian, which cannot be changed.










share|improve this question
























  • What is the expected output. You could try using noexpandarg, but I am not sure what the code is supposed to do.

    – Peter Grill
    May 22 at 9:23












  • If you are just testing whether a macro is empty or not, then the void tests from etoolbox might be better, that is what I normally use. But as Peter mentions, it is not quite clear what you are trying to do.

    – daleif
    May 22 at 9:52






  • 1





    It works with xifthen using this test: ifthenelseequalprintExamplevoidprintExample

    – frougon
    May 22 at 9:57












  • Various tests from etoolbox (ifdefvoid, ifstrempty or ifblank) do not work with TeX Live 2017/Debian (but they work for current TeX Live). Command ifthenelse from xifthen works well, indeed (even if, from a "logical" perspective, I would expect a command whose argument is directly a string, not a boolean). Can someone explain why \ breaks IfStrEq and if there is a way (or not) to use it?

    – Jérôme Champavère
    May 22 at 19:52












  • I added centering in environment titlepage because it causes an error (! Incomplete iffalse; all text was ignored after line …) when ifthenelse test is used. An other error is raised with center environment (! Use of @item doesn't match its definition.). In both cases, one needs to use protect\ in order to get it working as expected.

    – Jérôme Champavère
    May 22 at 20:32














5












5








5








Using xstring in order to compare text containing \ produces a compilation error. Here is my MWE:



documentclassreport
usepackagexstring
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Examplenot \ void
AtBeginDocument
begintitlepage
centering
IfStrEqprintExample
void
printExample
endtitlepage

begindocument

enddocument


The first error message is:




! Undefined control sequence.
->let reserved@e
relax let reserved@f relax @ifstar {let reserv...
l.15 begindocument




The Example command defined here should accept \. How can I get this working? The solution should take into account that the (La)TeX distribution version used here is the one included in Linux Mint 18.3, i.e. TeX Live 2017/Debian, which cannot be changed.










share|improve this question
















Using xstring in order to compare text containing \ produces a compilation error. Here is my MWE:



documentclassreport
usepackagexstring
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Examplenot \ void
AtBeginDocument
begintitlepage
centering
IfStrEqprintExample
void
printExample
endtitlepage

begindocument

enddocument


The first error message is:




! Undefined control sequence.
->let reserved@e
relax let reserved@f relax @ifstar {let reserv...
l.15 begindocument




The Example command defined here should accept \. How can I get this working? The solution should take into account that the (La)TeX distribution version used here is the one included in Linux Mint 18.3, i.e. TeX Live 2017/Debian, which cannot be changed.







xstring






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 22 at 20:22







Jérôme Champavère

















asked May 22 at 9:16









Jérôme ChampavèreJérôme Champavère

535




535












  • What is the expected output. You could try using noexpandarg, but I am not sure what the code is supposed to do.

    – Peter Grill
    May 22 at 9:23












  • If you are just testing whether a macro is empty or not, then the void tests from etoolbox might be better, that is what I normally use. But as Peter mentions, it is not quite clear what you are trying to do.

    – daleif
    May 22 at 9:52






  • 1





    It works with xifthen using this test: ifthenelseequalprintExamplevoidprintExample

    – frougon
    May 22 at 9:57












  • Various tests from etoolbox (ifdefvoid, ifstrempty or ifblank) do not work with TeX Live 2017/Debian (but they work for current TeX Live). Command ifthenelse from xifthen works well, indeed (even if, from a "logical" perspective, I would expect a command whose argument is directly a string, not a boolean). Can someone explain why \ breaks IfStrEq and if there is a way (or not) to use it?

    – Jérôme Champavère
    May 22 at 19:52












  • I added centering in environment titlepage because it causes an error (! Incomplete iffalse; all text was ignored after line …) when ifthenelse test is used. An other error is raised with center environment (! Use of @item doesn't match its definition.). In both cases, one needs to use protect\ in order to get it working as expected.

    – Jérôme Champavère
    May 22 at 20:32


















  • What is the expected output. You could try using noexpandarg, but I am not sure what the code is supposed to do.

    – Peter Grill
    May 22 at 9:23












  • If you are just testing whether a macro is empty or not, then the void tests from etoolbox might be better, that is what I normally use. But as Peter mentions, it is not quite clear what you are trying to do.

    – daleif
    May 22 at 9:52






  • 1





    It works with xifthen using this test: ifthenelseequalprintExamplevoidprintExample

    – frougon
    May 22 at 9:57












  • Various tests from etoolbox (ifdefvoid, ifstrempty or ifblank) do not work with TeX Live 2017/Debian (but they work for current TeX Live). Command ifthenelse from xifthen works well, indeed (even if, from a "logical" perspective, I would expect a command whose argument is directly a string, not a boolean). Can someone explain why \ breaks IfStrEq and if there is a way (or not) to use it?

    – Jérôme Champavère
    May 22 at 19:52












  • I added centering in environment titlepage because it causes an error (! Incomplete iffalse; all text was ignored after line …) when ifthenelse test is used. An other error is raised with center environment (! Use of @item doesn't match its definition.). In both cases, one needs to use protect\ in order to get it working as expected.

    – Jérôme Champavère
    May 22 at 20:32

















What is the expected output. You could try using noexpandarg, but I am not sure what the code is supposed to do.

– Peter Grill
May 22 at 9:23






What is the expected output. You could try using noexpandarg, but I am not sure what the code is supposed to do.

– Peter Grill
May 22 at 9:23














If you are just testing whether a macro is empty or not, then the void tests from etoolbox might be better, that is what I normally use. But as Peter mentions, it is not quite clear what you are trying to do.

– daleif
May 22 at 9:52





If you are just testing whether a macro is empty or not, then the void tests from etoolbox might be better, that is what I normally use. But as Peter mentions, it is not quite clear what you are trying to do.

– daleif
May 22 at 9:52




1




1





It works with xifthen using this test: ifthenelseequalprintExamplevoidprintExample

– frougon
May 22 at 9:57






It works with xifthen using this test: ifthenelseequalprintExamplevoidprintExample

– frougon
May 22 at 9:57














Various tests from etoolbox (ifdefvoid, ifstrempty or ifblank) do not work with TeX Live 2017/Debian (but they work for current TeX Live). Command ifthenelse from xifthen works well, indeed (even if, from a "logical" perspective, I would expect a command whose argument is directly a string, not a boolean). Can someone explain why \ breaks IfStrEq and if there is a way (or not) to use it?

– Jérôme Champavère
May 22 at 19:52






Various tests from etoolbox (ifdefvoid, ifstrempty or ifblank) do not work with TeX Live 2017/Debian (but they work for current TeX Live). Command ifthenelse from xifthen works well, indeed (even if, from a "logical" perspective, I would expect a command whose argument is directly a string, not a boolean). Can someone explain why \ breaks IfStrEq and if there is a way (or not) to use it?

– Jérôme Champavère
May 22 at 19:52














I added centering in environment titlepage because it causes an error (! Incomplete iffalse; all text was ignored after line …) when ifthenelse test is used. An other error is raised with center environment (! Use of @item doesn't match its definition.). In both cases, one needs to use protect\ in order to get it working as expected.

– Jérôme Champavère
May 22 at 20:32






I added centering in environment titlepage because it causes an error (! Incomplete iffalse; all text was ignored after line …) when ifthenelse test is used. An other error is raised with center environment (! Use of @item doesn't match its definition.). In both cases, one needs to use protect\ in order to get it working as expected.

– Jérôme Champavère
May 22 at 20:32











2 Answers
2






active

oldest

votes


















4














If you need only a test for an empty argument you can use ifx:



documentclassreport
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Example
AtBeginDocument%
begintitlepage
expandafterifxprintExampleempty
voidelseprintExamplefi
endtitlepage

begindocument

Examplenot \ void
expandafterifxprintExampleempty
voidelseprintExamplefi

enddocument





share|improve this answer























  • This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

    – Jérôme Champavère
    May 22 at 21:01



















2














I guess you have other macros such as Example and printExample.



You can define a macro that does the work getting as input the desired storage bin.



documentclassreport

makeatletter
newcommandvoid@or@print[1]%
ifrelaxdetokenizeexpandafter#1relax
void%
else
#1%
fi


defprintExamplevoid@or@print@Example
defExample#1def@Example#1
Example % initialize

makeatother

Examplenot \ void

AtBeginDocument
begintitlepage
centering
printExample
endtitlepage


begindocument

enddocument


A more general implementation:



makeatletter
newcommandprint@conditionally[3]%
ifrelaxdetokenizeexpandafter#1relax
expandafter@firstoftwo
else
expandafter@secondoftwo
fi
#2#3%


defprintExampleprint@conditionally@Examplevoid@Example
defExample#1def@Example#1
Example % initialize

makeatother





share|improve this answer

























  • Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

    – Jérôme Champavère
    May 23 at 10:10












  • @JérômeChampavère I added a more general implementation

    – egreg
    May 23 at 10:57











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%2f492069%2fxstring-fails-to-compare-text-containing%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














If you need only a test for an empty argument you can use ifx:



documentclassreport
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Example
AtBeginDocument%
begintitlepage
expandafterifxprintExampleempty
voidelseprintExamplefi
endtitlepage

begindocument

Examplenot \ void
expandafterifxprintExampleempty
voidelseprintExamplefi

enddocument





share|improve this answer























  • This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

    – Jérôme Champavère
    May 22 at 21:01
















4














If you need only a test for an empty argument you can use ifx:



documentclassreport
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Example
AtBeginDocument%
begintitlepage
expandafterifxprintExampleempty
voidelseprintExamplefi
endtitlepage

begindocument

Examplenot \ void
expandafterifxprintExampleempty
voidelseprintExamplefi

enddocument





share|improve this answer























  • This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

    – Jérôme Champavère
    May 22 at 21:01














4












4








4







If you need only a test for an empty argument you can use ifx:



documentclassreport
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Example
AtBeginDocument%
begintitlepage
expandafterifxprintExampleempty
voidelseprintExamplefi
endtitlepage

begindocument

Examplenot \ void
expandafterifxprintExampleempty
voidelseprintExamplefi

enddocument





share|improve this answer













If you need only a test for an empty argument you can use ifx:



documentclassreport
makeatletter
defExample#1def@Example#1
defprintExample@Example
makeatother
Example
AtBeginDocument%
begintitlepage
expandafterifxprintExampleempty
voidelseprintExamplefi
endtitlepage

begindocument

Examplenot \ void
expandafterifxprintExampleempty
voidelseprintExamplefi

enddocument






share|improve this answer












share|improve this answer



share|improve this answer










answered May 22 at 9:58









Red-CloudRed-Cloud

2,973114




2,973114












  • This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

    – Jérôme Champavère
    May 22 at 21:01


















  • This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

    – Jérôme Champavère
    May 22 at 21:01

















This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

– Jérôme Champavère
May 22 at 21:01






This might be an option. Is it possible to write a 3-parameter command, e.g. ifstringempty, from the expandafter to fi code, where #1 would be the tested string command (here printExample), #2 for true (here "void"), and #3 for false (here the second printExample), in order to simplify the code? I tried newcommandifstringempty[3]expandafterifx#1empty #2else#3fi, without success.

– Jérôme Champavère
May 22 at 21:01












2














I guess you have other macros such as Example and printExample.



You can define a macro that does the work getting as input the desired storage bin.



documentclassreport

makeatletter
newcommandvoid@or@print[1]%
ifrelaxdetokenizeexpandafter#1relax
void%
else
#1%
fi


defprintExamplevoid@or@print@Example
defExample#1def@Example#1
Example % initialize

makeatother

Examplenot \ void

AtBeginDocument
begintitlepage
centering
printExample
endtitlepage


begindocument

enddocument


A more general implementation:



makeatletter
newcommandprint@conditionally[3]%
ifrelaxdetokenizeexpandafter#1relax
expandafter@firstoftwo
else
expandafter@secondoftwo
fi
#2#3%


defprintExampleprint@conditionally@Examplevoid@Example
defExample#1def@Example#1
Example % initialize

makeatother





share|improve this answer

























  • Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

    – Jérôme Champavère
    May 23 at 10:10












  • @JérômeChampavère I added a more general implementation

    – egreg
    May 23 at 10:57















2














I guess you have other macros such as Example and printExample.



You can define a macro that does the work getting as input the desired storage bin.



documentclassreport

makeatletter
newcommandvoid@or@print[1]%
ifrelaxdetokenizeexpandafter#1relax
void%
else
#1%
fi


defprintExamplevoid@or@print@Example
defExample#1def@Example#1
Example % initialize

makeatother

Examplenot \ void

AtBeginDocument
begintitlepage
centering
printExample
endtitlepage


begindocument

enddocument


A more general implementation:



makeatletter
newcommandprint@conditionally[3]%
ifrelaxdetokenizeexpandafter#1relax
expandafter@firstoftwo
else
expandafter@secondoftwo
fi
#2#3%


defprintExampleprint@conditionally@Examplevoid@Example
defExample#1def@Example#1
Example % initialize

makeatother





share|improve this answer

























  • Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

    – Jérôme Champavère
    May 23 at 10:10












  • @JérômeChampavère I added a more general implementation

    – egreg
    May 23 at 10:57













2












2








2







I guess you have other macros such as Example and printExample.



You can define a macro that does the work getting as input the desired storage bin.



documentclassreport

makeatletter
newcommandvoid@or@print[1]%
ifrelaxdetokenizeexpandafter#1relax
void%
else
#1%
fi


defprintExamplevoid@or@print@Example
defExample#1def@Example#1
Example % initialize

makeatother

Examplenot \ void

AtBeginDocument
begintitlepage
centering
printExample
endtitlepage


begindocument

enddocument


A more general implementation:



makeatletter
newcommandprint@conditionally[3]%
ifrelaxdetokenizeexpandafter#1relax
expandafter@firstoftwo
else
expandafter@secondoftwo
fi
#2#3%


defprintExampleprint@conditionally@Examplevoid@Example
defExample#1def@Example#1
Example % initialize

makeatother





share|improve this answer















I guess you have other macros such as Example and printExample.



You can define a macro that does the work getting as input the desired storage bin.



documentclassreport

makeatletter
newcommandvoid@or@print[1]%
ifrelaxdetokenizeexpandafter#1relax
void%
else
#1%
fi


defprintExamplevoid@or@print@Example
defExample#1def@Example#1
Example % initialize

makeatother

Examplenot \ void

AtBeginDocument
begintitlepage
centering
printExample
endtitlepage


begindocument

enddocument


A more general implementation:



makeatletter
newcommandprint@conditionally[3]%
ifrelaxdetokenizeexpandafter#1relax
expandafter@firstoftwo
else
expandafter@secondoftwo
fi
#2#3%


defprintExampleprint@conditionally@Examplevoid@Example
defExample#1def@Example#1
Example % initialize

makeatother






share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 at 10:57

























answered May 22 at 21:14









egregegreg

744k8919493287




744k8919493287












  • Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

    – Jérôme Champavère
    May 23 at 10:10












  • @JérômeChampavère I added a more general implementation

    – egreg
    May 23 at 10:57

















  • Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

    – Jérôme Champavère
    May 23 at 10:10












  • @JérômeChampavère I added a more general implementation

    – egreg
    May 23 at 10:57
















Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

– Jérôme Champavère
May 23 at 10:10






Yes, there are few other macros as Example, that should be filled by the template's user (while printExample's are in some way hidden). But the true/false outputs depend on the macro, i.e., some show a "should-be-filled-message" in the PDF documents if empty, other are optional, and when correctly filled their formattings mostly differ. This is why I need a real if-then-else statement.

– Jérôme Champavère
May 23 at 10:10














@JérômeChampavère I added a more general implementation

– egreg
May 23 at 10:57





@JérômeChampavère I added a more general implementation

– egreg
May 23 at 10:57

















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%2f492069%2fxstring-fails-to-compare-text-containing%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

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?