Newcommand that uncludes a foreach with unknown number of parameters
Calculate the frequency of characters in a string
HP P840 HDD RAID 5 many strange drive failures
If "dar" means "to give", what does "daros" mean?
Using Past-Perfect interchangeably with the Past Continuous
What does "^L" mean in C?
Hausdorff dimension of the boundary of fibres of Lipschitz maps
Synchronized implementation of a bank account in Java
How to get the n-th line after a grepped one?
Comment Box for Substitution Method of Integrals
What does Deadpool mean by "left the house in that shirt"?
Light propagating through a sound wave
Does the attack bonus from a Masterwork weapon stack with the attack bonus from Masterwork ammunition?
Describing a chess game in a novel
Pronounciation of the combination "st" in spanish accents
How do hiring committees for research positions view getting "scooped"?
How to generate binary array whose elements with values 1 are randomly drawn
Worshiping one God at a time?
How could an airship be repaired midflight?
Can other pieces capture a threatening piece and prevent a checkmate?
Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?
Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?
Are dual Irish/British citizens bound by the 90/180 day rule when travelling in the EU after Brexit?
How can my new character avoid being a role-playing handicap to the party?
Why is indicated airspeed rather than ground speed used during the takeoff roll?
Newcommand that uncludes a foreach with unknown number of parameters
Sorry, but part of the code is in French. However, it won't matter because it's only the listed text
I currently have a new command named listerfe
that, combined with listerfenextarg
and listerfegobblenextarg
, succesfully proceeds an unknown number of parameters to separe them with a ,
Now, I have this code:
% !TeX encoding = UTF-8
% !TeX spellcheck = fr_FR
documentclass[utf8]article
usepackagetikz
makeatletter
newcommandforeachlinedo[2]foreach noeud in listerfe#1 - (noeud.west);
newcommandlisterfe[1]#1listerfenextarg
newcommandlisterfenextarg@ifnextcharbgrouplisterfegobblenextarg
newcommandlisterfegobblenextarg[1],#1@ifnextcharbgrouplisterfegobblenextarg
makeatother
begindocument
definecolorcouleurbackintrHTML7F00FF
definecolorcouleurtextintrHTMLFFFFFF
definecolorcouleurbackfoncHTMLC780FF
definecolorcouleurtextHTML000000
definecolorcouleurbackextrHTMLDDB3FF
beginfigure[htp]
centering
tikzset
basic/.style=draw, rounded corners=2pt, thick, text width=8em, align=flush center, text=couleurtext, node distance=2em,
intrant/.style=basic, fill=couleurbackintr, text=couleurtextintr,
fonction/.style=basic, fill=couleurbackfonc,
extrant/.style=basic, fill=couleurbackextr
begintikzpicture[]
fontsize89 selectfont
% intrants
matrix[row sep=2em, column sep=2em]
% 1re ligne
%TODO changer nom
node[intrant](forcutil)Force utilisée; & node[fonction](instcapt)Installer capteur sous l'eau; & & & node[extrant](captinst)Capteur installé; \
% 2me ligne
node[intrant](defailla)Défaillance; & node[fonction](detcdefa)Détecter défaillance; & & node[fonction](genralrm)Générer alarme; & node[extrant](alarme)Alarme; \
node[intrant](poissons)Poissons; & node[fonction](detecteu)Détecteur; & node[fonction](photo)Photo; & node[fonction](accudonn)Accumuler données; & \
node[intrant](elecbatt)Électicité batterie; & node[fonction](alimcapt)Alimenter capteur; & & node[fonction](idenpois)Identifier poisson; & \
node[intrant](tempreau)Température de l'eau; & node[fonction](captteau)Capteur température eau; & & node[fonction](archdonn)Archiver donnéees; & node[extrant](donnarch)Données archivées; \
node[intrant](tempintr)Température interne; & node[fonction](capttcpt)Capteur température interne; & & & \
node[intrant](confvolm)Configuration volume; & node[fonction](confcapt)Configurer capteur; & & & \
node[intrant](entrutil)Entrées utilisateurs; & node[fonction](authutil)Authentifier utilisateur; & node[fonction](accedonn)Accéder aux données; & & \
;
foreachlinedoforcutildefaillapoissonsinstcapt;
endtikzpicture
captionDiagramme fonctionnel
labelf:caf_diag_fonc
endfigure
enddocument
Without the foreachlinedo
, so without arrows, it looks like this:
Now, when I run this code, it tells me this:
Argument of XC@definec@lor has an extra }. ...forcutildefaillapoissonsinstcapt
Paragraph ended before XC@definec@lor was complete. ...forcutildefaillapoissonsinstcapt
Paragraph ended before tikz@@scan@@no@calculator was complete. ...forcutildefaillapoissonsinstcapt
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endfigure
beginfigure on input line 30 ended by enddocument. enddocument
You can't use `end' in internal vertical mode. enddocument
beginfigure on input line 30 ended by enddocument. enddocument
Missing } inserted. enddocument
Emergency stop.
Unused global option(s): [utf8]. % doesn't matter
I created foreachlinedo
because I don't want to create lots of foreach
, because there will be lots and lots of arrows combined inthe diagram.
How can I make it work?
macros foreach parameters
add a comment |
Sorry, but part of the code is in French. However, it won't matter because it's only the listed text
I currently have a new command named listerfe
that, combined with listerfenextarg
and listerfegobblenextarg
, succesfully proceeds an unknown number of parameters to separe them with a ,
Now, I have this code:
% !TeX encoding = UTF-8
% !TeX spellcheck = fr_FR
documentclass[utf8]article
usepackagetikz
makeatletter
newcommandforeachlinedo[2]foreach noeud in listerfe#1 - (noeud.west);
newcommandlisterfe[1]#1listerfenextarg
newcommandlisterfenextarg@ifnextcharbgrouplisterfegobblenextarg
newcommandlisterfegobblenextarg[1],#1@ifnextcharbgrouplisterfegobblenextarg
makeatother
begindocument
definecolorcouleurbackintrHTML7F00FF
definecolorcouleurtextintrHTMLFFFFFF
definecolorcouleurbackfoncHTMLC780FF
definecolorcouleurtextHTML000000
definecolorcouleurbackextrHTMLDDB3FF
beginfigure[htp]
centering
tikzset
basic/.style=draw, rounded corners=2pt, thick, text width=8em, align=flush center, text=couleurtext, node distance=2em,
intrant/.style=basic, fill=couleurbackintr, text=couleurtextintr,
fonction/.style=basic, fill=couleurbackfonc,
extrant/.style=basic, fill=couleurbackextr
begintikzpicture[]
fontsize89 selectfont
% intrants
matrix[row sep=2em, column sep=2em]
% 1re ligne
%TODO changer nom
node[intrant](forcutil)Force utilisée; & node[fonction](instcapt)Installer capteur sous l'eau; & & & node[extrant](captinst)Capteur installé; \
% 2me ligne
node[intrant](defailla)Défaillance; & node[fonction](detcdefa)Détecter défaillance; & & node[fonction](genralrm)Générer alarme; & node[extrant](alarme)Alarme; \
node[intrant](poissons)Poissons; & node[fonction](detecteu)Détecteur; & node[fonction](photo)Photo; & node[fonction](accudonn)Accumuler données; & \
node[intrant](elecbatt)Électicité batterie; & node[fonction](alimcapt)Alimenter capteur; & & node[fonction](idenpois)Identifier poisson; & \
node[intrant](tempreau)Température de l'eau; & node[fonction](captteau)Capteur température eau; & & node[fonction](archdonn)Archiver donnéees; & node[extrant](donnarch)Données archivées; \
node[intrant](tempintr)Température interne; & node[fonction](capttcpt)Capteur température interne; & & & \
node[intrant](confvolm)Configuration volume; & node[fonction](confcapt)Configurer capteur; & & & \
node[intrant](entrutil)Entrées utilisateurs; & node[fonction](authutil)Authentifier utilisateur; & node[fonction](accedonn)Accéder aux données; & & \
;
foreachlinedoforcutildefaillapoissonsinstcapt;
endtikzpicture
captionDiagramme fonctionnel
labelf:caf_diag_fonc
endfigure
enddocument
Without the foreachlinedo
, so without arrows, it looks like this:
Now, when I run this code, it tells me this:
Argument of XC@definec@lor has an extra }. ...forcutildefaillapoissonsinstcapt
Paragraph ended before XC@definec@lor was complete. ...forcutildefaillapoissonsinstcapt
Paragraph ended before tikz@@scan@@no@calculator was complete. ...forcutildefaillapoissonsinstcapt
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endfigure
beginfigure on input line 30 ended by enddocument. enddocument
You can't use `end' in internal vertical mode. enddocument
beginfigure on input line 30 ended by enddocument. enddocument
Missing } inserted. enddocument
Emergency stop.
Unused global option(s): [utf8]. % doesn't matter
I created foreachlinedo
because I don't want to create lots of foreach
, because there will be lots and lots of arrows combined inthe diagram.
How can I make it work?
macros foreach parameters
add a comment |
Sorry, but part of the code is in French. However, it won't matter because it's only the listed text
I currently have a new command named listerfe
that, combined with listerfenextarg
and listerfegobblenextarg
, succesfully proceeds an unknown number of parameters to separe them with a ,
Now, I have this code:
% !TeX encoding = UTF-8
% !TeX spellcheck = fr_FR
documentclass[utf8]article
usepackagetikz
makeatletter
newcommandforeachlinedo[2]foreach noeud in listerfe#1 - (noeud.west);
newcommandlisterfe[1]#1listerfenextarg
newcommandlisterfenextarg@ifnextcharbgrouplisterfegobblenextarg
newcommandlisterfegobblenextarg[1],#1@ifnextcharbgrouplisterfegobblenextarg
makeatother
begindocument
definecolorcouleurbackintrHTML7F00FF
definecolorcouleurtextintrHTMLFFFFFF
definecolorcouleurbackfoncHTMLC780FF
definecolorcouleurtextHTML000000
definecolorcouleurbackextrHTMLDDB3FF
beginfigure[htp]
centering
tikzset
basic/.style=draw, rounded corners=2pt, thick, text width=8em, align=flush center, text=couleurtext, node distance=2em,
intrant/.style=basic, fill=couleurbackintr, text=couleurtextintr,
fonction/.style=basic, fill=couleurbackfonc,
extrant/.style=basic, fill=couleurbackextr
begintikzpicture[]
fontsize89 selectfont
% intrants
matrix[row sep=2em, column sep=2em]
% 1re ligne
%TODO changer nom
node[intrant](forcutil)Force utilisée; & node[fonction](instcapt)Installer capteur sous l'eau; & & & node[extrant](captinst)Capteur installé; \
% 2me ligne
node[intrant](defailla)Défaillance; & node[fonction](detcdefa)Détecter défaillance; & & node[fonction](genralrm)Générer alarme; & node[extrant](alarme)Alarme; \
node[intrant](poissons)Poissons; & node[fonction](detecteu)Détecteur; & node[fonction](photo)Photo; & node[fonction](accudonn)Accumuler données; & \
node[intrant](elecbatt)Électicité batterie; & node[fonction](alimcapt)Alimenter capteur; & & node[fonction](idenpois)Identifier poisson; & \
node[intrant](tempreau)Température de l'eau; & node[fonction](captteau)Capteur température eau; & & node[fonction](archdonn)Archiver donnéees; & node[extrant](donnarch)Données archivées; \
node[intrant](tempintr)Température interne; & node[fonction](capttcpt)Capteur température interne; & & & \
node[intrant](confvolm)Configuration volume; & node[fonction](confcapt)Configurer capteur; & & & \
node[intrant](entrutil)Entrées utilisateurs; & node[fonction](authutil)Authentifier utilisateur; & node[fonction](accedonn)Accéder aux données; & & \
;
foreachlinedoforcutildefaillapoissonsinstcapt;
endtikzpicture
captionDiagramme fonctionnel
labelf:caf_diag_fonc
endfigure
enddocument
Without the foreachlinedo
, so without arrows, it looks like this:
Now, when I run this code, it tells me this:
Argument of XC@definec@lor has an extra }. ...forcutildefaillapoissonsinstcapt
Paragraph ended before XC@definec@lor was complete. ...forcutildefaillapoissonsinstcapt
Paragraph ended before tikz@@scan@@no@calculator was complete. ...forcutildefaillapoissonsinstcapt
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endfigure
beginfigure on input line 30 ended by enddocument. enddocument
You can't use `end' in internal vertical mode. enddocument
beginfigure on input line 30 ended by enddocument. enddocument
Missing } inserted. enddocument
Emergency stop.
Unused global option(s): [utf8]. % doesn't matter
I created foreachlinedo
because I don't want to create lots of foreach
, because there will be lots and lots of arrows combined inthe diagram.
How can I make it work?
macros foreach parameters
Sorry, but part of the code is in French. However, it won't matter because it's only the listed text
I currently have a new command named listerfe
that, combined with listerfenextarg
and listerfegobblenextarg
, succesfully proceeds an unknown number of parameters to separe them with a ,
Now, I have this code:
% !TeX encoding = UTF-8
% !TeX spellcheck = fr_FR
documentclass[utf8]article
usepackagetikz
makeatletter
newcommandforeachlinedo[2]foreach noeud in listerfe#1 - (noeud.west);
newcommandlisterfe[1]#1listerfenextarg
newcommandlisterfenextarg@ifnextcharbgrouplisterfegobblenextarg
newcommandlisterfegobblenextarg[1],#1@ifnextcharbgrouplisterfegobblenextarg
makeatother
begindocument
definecolorcouleurbackintrHTML7F00FF
definecolorcouleurtextintrHTMLFFFFFF
definecolorcouleurbackfoncHTMLC780FF
definecolorcouleurtextHTML000000
definecolorcouleurbackextrHTMLDDB3FF
beginfigure[htp]
centering
tikzset
basic/.style=draw, rounded corners=2pt, thick, text width=8em, align=flush center, text=couleurtext, node distance=2em,
intrant/.style=basic, fill=couleurbackintr, text=couleurtextintr,
fonction/.style=basic, fill=couleurbackfonc,
extrant/.style=basic, fill=couleurbackextr
begintikzpicture[]
fontsize89 selectfont
% intrants
matrix[row sep=2em, column sep=2em]
% 1re ligne
%TODO changer nom
node[intrant](forcutil)Force utilisée; & node[fonction](instcapt)Installer capteur sous l'eau; & & & node[extrant](captinst)Capteur installé; \
% 2me ligne
node[intrant](defailla)Défaillance; & node[fonction](detcdefa)Détecter défaillance; & & node[fonction](genralrm)Générer alarme; & node[extrant](alarme)Alarme; \
node[intrant](poissons)Poissons; & node[fonction](detecteu)Détecteur; & node[fonction](photo)Photo; & node[fonction](accudonn)Accumuler données; & \
node[intrant](elecbatt)Électicité batterie; & node[fonction](alimcapt)Alimenter capteur; & & node[fonction](idenpois)Identifier poisson; & \
node[intrant](tempreau)Température de l'eau; & node[fonction](captteau)Capteur température eau; & & node[fonction](archdonn)Archiver donnéees; & node[extrant](donnarch)Données archivées; \
node[intrant](tempintr)Température interne; & node[fonction](capttcpt)Capteur température interne; & & & \
node[intrant](confvolm)Configuration volume; & node[fonction](confcapt)Configurer capteur; & & & \
node[intrant](entrutil)Entrées utilisateurs; & node[fonction](authutil)Authentifier utilisateur; & node[fonction](accedonn)Accéder aux données; & & \
;
foreachlinedoforcutildefaillapoissonsinstcapt;
endtikzpicture
captionDiagramme fonctionnel
labelf:caf_diag_fonc
endfigure
enddocument
Without the foreachlinedo
, so without arrows, it looks like this:
Now, when I run this code, it tells me this:
Argument of XC@definec@lor has an extra }. ...forcutildefaillapoissonsinstcapt
Paragraph ended before XC@definec@lor was complete. ...forcutildefaillapoissonsinstcapt
Paragraph ended before tikz@@scan@@no@calculator was complete. ...forcutildefaillapoissonsinstcapt
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endtikzpicture
Missing } inserted. endtikzpicture
Extra }, or forgotten endgroup. endfigure
beginfigure on input line 30 ended by enddocument. enddocument
You can't use `end' in internal vertical mode. enddocument
beginfigure on input line 30 ended by enddocument. enddocument
Missing } inserted. enddocument
Emergency stop.
Unused global option(s): [utf8]. % doesn't matter
I created foreachlinedo
because I don't want to create lots of foreach
, because there will be lots and lots of arrows combined inthe diagram.
How can I make it work?
macros foreach parameters
macros foreach parameters
asked 3 mins ago
Vinccool96Vinccool96
1819
1819
add a comment |
add a comment |
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
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480011%2fnewcommand-that-uncludes-a-foreach-with-unknown-number-of-parameters%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
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.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480011%2fnewcommand-that-uncludes-a-foreach-with-unknown-number-of-parameters%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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