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

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form