Obeylines and gappto from etoolbox Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraHow can I undo an etoolbox patch?etoolbox: trouble with boolean expressionsmultiple lists in etoolboxPhantom and etoolbox iftoggleDifference between newbool and newtoggle from etoolbox packageRemove indentation from abstract environment with etoolboxetoolbox conflict with bm packagehelp with using etoolbox with docsvlist and listaddrenewcommand or patchcmd (from etoolbox)?question of ifstrequal in etoolbox

All ASCII characters with a given bit count

A strange hotel

What makes accurate emulation of old systems a difficult task?

How can I wire a 9-position switch so that each position turns on one more LED than the one before?

Can a level 2 Warlock take one level in rogue, then continue advancing as a warlock?

Israeli soda type drink

Negative Resistance

Why do distances seem to matter in the Foundation world?

Raising a bilingual kid. When should we introduce the majority language?

First instead of 1 when referencing

Multiple options vs single option UI

How to have a sharp product image?

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

Putting Ant-Man on house arrest

How to find the stem of any word?

The weakest link

Why doesn't the standard consider a template constructor as a copy constructor?

How to not starve gigantic beasts

Will I lose my paid in full property

How much of a wave function must reside inside event horizon for it to be consumed by the black hole?

Unable to completely uninstall Zoom meeting app

Should the Product Owner dictate what info the UI needs to display?

Multiple fireplaces in an apartment building?

Is Electric Central Heating worth it if using Solar Panels?



Obeylines and gappto from etoolbox



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow can I undo an etoolbox patch?etoolbox: trouble with boolean expressionsmultiple lists in etoolboxPhantom and etoolbox iftoggleDifference between newbool and newtoggle from etoolbox packageRemove indentation from abstract environment with etoolboxetoolbox conflict with bm packagehelp with using etoolbox with docsvlist and listaddrenewcommand or patchcmd (from etoolbox)?question of ifstrequal in etoolbox










5















In order to simplify data entry with as little markup of the data as possible, I am attempting the following:



documentclassarticle

usepackageetoolbox

begingroup
obeylines
gdefing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2
if.#1
&&#3\
else
#1&&#3\
fi
else
if.#1
&#2&#3\
else
#1&#2&#3\
fi
fi
%

endgroup

%%%%%% This, without the if's works, though it does not do what I need:

begingroup
obeylines
gdefiing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
#1&#2&#3\
%

endgroup

begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

begintabularccc
tabbody
endtabular

enddocument


I'm getting an unexpected error:



ERROR: Incomplete if; all text was ignored after line 39.

--- TeX said ---
<inserted text>
fi
l.39 ^^I^^Itabbody


I have looked at past queries, but have not thus far found an answer. If I remove all of the if statements from the definition of ing (=iing) the problem goes a way. Quite sure I'm missing something really basic -- something to do with the timing of the expansion of the ifs, but I'm stuck for the moment.










share|improve this question

















  • 1





    Why do you need obeylines so many places? Dropping obeylines before the definition of ing allows the file to compile and produces reasonable output.

    – Andrew Swann
    2 hours ago












  • Good point! Confirmed.

    – sgmoye
    2 hours ago















5















In order to simplify data entry with as little markup of the data as possible, I am attempting the following:



documentclassarticle

usepackageetoolbox

begingroup
obeylines
gdefing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2
if.#1
&&#3\
else
#1&&#3\
fi
else
if.#1
&#2&#3\
else
#1&#2&#3\
fi
fi
%

endgroup

%%%%%% This, without the if's works, though it does not do what I need:

begingroup
obeylines
gdefiing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
#1&#2&#3\
%

endgroup

begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

begintabularccc
tabbody
endtabular

enddocument


I'm getting an unexpected error:



ERROR: Incomplete if; all text was ignored after line 39.

--- TeX said ---
<inserted text>
fi
l.39 ^^I^^Itabbody


I have looked at past queries, but have not thus far found an answer. If I remove all of the if statements from the definition of ing (=iing) the problem goes a way. Quite sure I'm missing something really basic -- something to do with the timing of the expansion of the ifs, but I'm stuck for the moment.










share|improve this question

















  • 1





    Why do you need obeylines so many places? Dropping obeylines before the definition of ing allows the file to compile and produces reasonable output.

    – Andrew Swann
    2 hours ago












  • Good point! Confirmed.

    – sgmoye
    2 hours ago













5












5








5








In order to simplify data entry with as little markup of the data as possible, I am attempting the following:



documentclassarticle

usepackageetoolbox

begingroup
obeylines
gdefing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2
if.#1
&&#3\
else
#1&&#3\
fi
else
if.#1
&#2&#3\
else
#1&#2&#3\
fi
fi
%

endgroup

%%%%%% This, without the if's works, though it does not do what I need:

begingroup
obeylines
gdefiing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
#1&#2&#3\
%

endgroup

begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

begintabularccc
tabbody
endtabular

enddocument


I'm getting an unexpected error:



ERROR: Incomplete if; all text was ignored after line 39.

--- TeX said ---
<inserted text>
fi
l.39 ^^I^^Itabbody


I have looked at past queries, but have not thus far found an answer. If I remove all of the if statements from the definition of ing (=iing) the problem goes a way. Quite sure I'm missing something really basic -- something to do with the timing of the expansion of the ifs, but I'm stuck for the moment.










share|improve this question














In order to simplify data entry with as little markup of the data as possible, I am attempting the following:



documentclassarticle

usepackageetoolbox

begingroup
obeylines
gdefing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2
if.#1
&&#3\
else
#1&&#3\
fi
else
if.#1
&#2&#3\
else
#1&#2&#3\
fi
fi
%

endgroup

%%%%%% This, without the if's works, though it does not do what I need:

begingroup
obeylines
gdefiing#1 #2 #3gapptotabbody% Collect rows of tabular[x] in tabbody
#1&#2&#3\
%

endgroup

begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

begintabularccc
tabbody
endtabular

enddocument


I'm getting an unexpected error:



ERROR: Incomplete if; all text was ignored after line 39.

--- TeX said ---
<inserted text>
fi
l.39 ^^I^^Itabbody


I have looked at past queries, but have not thus far found an answer. If I remove all of the if statements from the definition of ing (=iing) the problem goes a way. Quite sure I'm missing something really basic -- something to do with the timing of the expansion of the ifs, but I'm stuck for the moment.







etoolbox






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









sgmoyesgmoye

4,11511328




4,11511328







  • 1





    Why do you need obeylines so many places? Dropping obeylines before the definition of ing allows the file to compile and produces reasonable output.

    – Andrew Swann
    2 hours ago












  • Good point! Confirmed.

    – sgmoye
    2 hours ago












  • 1





    Why do you need obeylines so many places? Dropping obeylines before the definition of ing allows the file to compile and produces reasonable output.

    – Andrew Swann
    2 hours ago












  • Good point! Confirmed.

    – sgmoye
    2 hours ago







1




1





Why do you need obeylines so many places? Dropping obeylines before the definition of ing allows the file to compile and produces reasonable output.

– Andrew Swann
2 hours ago






Why do you need obeylines so many places? Dropping obeylines before the definition of ing allows the file to compile and produces reasonable output.

– Andrew Swann
2 hours ago














Good point! Confirmed.

– sgmoye
2 hours ago





Good point! Confirmed.

– sgmoye
2 hours ago










1 Answer
1






active

oldest

votes


















6














You don't want to define ing under the scope of obeylines, but just use the active ^^M as delimiter (reinserting it at the end so a par will be issued.



You also want to expand the conditionals before appending the result to tabbody.



documentclassarticle
usepackageetoolbox

begingrouplccode`~=`^^Mlowercaseendgroupdefing#1 #2 #3~%
xapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2%
if.#1%
unexpanded&&#3\%
else
unexpanded#1&&#3\%
fi
else
if.#1%
unexpanded&#2&#3\%
else
unexpanded#1&#2&#3\%
fi
fi
~% we want a `par`


begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

%showtabbody % for debugging

begintabularccc
tabbody
endtabular

enddocument


enter image description here






share|improve this answer























  • However, an input such as a 1 u\ would be much easier to manage and less fragile.

    – egreg
    2 hours ago












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%2f487572%2fobeylines-and-gappto-from-etoolbox%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














You don't want to define ing under the scope of obeylines, but just use the active ^^M as delimiter (reinserting it at the end so a par will be issued.



You also want to expand the conditionals before appending the result to tabbody.



documentclassarticle
usepackageetoolbox

begingrouplccode`~=`^^Mlowercaseendgroupdefing#1 #2 #3~%
xapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2%
if.#1%
unexpanded&&#3\%
else
unexpanded#1&&#3\%
fi
else
if.#1%
unexpanded&#2&#3\%
else
unexpanded#1&#2&#3\%
fi
fi
~% we want a `par`


begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

%showtabbody % for debugging

begintabularccc
tabbody
endtabular

enddocument


enter image description here






share|improve this answer























  • However, an input such as a 1 u\ would be much easier to manage and less fragile.

    – egreg
    2 hours ago
















6














You don't want to define ing under the scope of obeylines, but just use the active ^^M as delimiter (reinserting it at the end so a par will be issued.



You also want to expand the conditionals before appending the result to tabbody.



documentclassarticle
usepackageetoolbox

begingrouplccode`~=`^^Mlowercaseendgroupdefing#1 #2 #3~%
xapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2%
if.#1%
unexpanded&&#3\%
else
unexpanded#1&&#3\%
fi
else
if.#1%
unexpanded&#2&#3\%
else
unexpanded#1&#2&#3\%
fi
fi
~% we want a `par`


begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

%showtabbody % for debugging

begintabularccc
tabbody
endtabular

enddocument


enter image description here






share|improve this answer























  • However, an input such as a 1 u\ would be much easier to manage and less fragile.

    – egreg
    2 hours ago














6












6








6







You don't want to define ing under the scope of obeylines, but just use the active ^^M as delimiter (reinserting it at the end so a par will be issued.



You also want to expand the conditionals before appending the result to tabbody.



documentclassarticle
usepackageetoolbox

begingrouplccode`~=`^^Mlowercaseendgroupdefing#1 #2 #3~%
xapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2%
if.#1%
unexpanded&&#3\%
else
unexpanded#1&&#3\%
fi
else
if.#1%
unexpanded&#2&#3\%
else
unexpanded#1&#2&#3\%
fi
fi
~% we want a `par`


begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

%showtabbody % for debugging

begintabularccc
tabbody
endtabular

enddocument


enter image description here






share|improve this answer













You don't want to define ing under the scope of obeylines, but just use the active ^^M as delimiter (reinserting it at the end so a par will be issued.



You also want to expand the conditionals before appending the result to tabbody.



documentclassarticle
usepackageetoolbox

begingrouplccode`~=`^^Mlowercaseendgroupdefing#1 #2 #3~%
xapptotabbody% Collect rows of tabular[x] in tabbody
%% Ignore #1 and/or #2 if empty (= . )
if.#2%
if.#1%
unexpanded&&#3\%
else
unexpanded#1&&#3\%
fi
else
if.#1%
unexpanded&#2&#3\%
else
unexpanded#1&#2&#3\%
fi
fi
~% we want a `par`


begindocument

begingroup
obeylines
everypar=ing %<<<--- change to iing and there is no error
a 1 u
b 2 v
. 3 w
d 4 x
e 5 y
f 6 z
endgroup

%showtabbody % for debugging

begintabularccc
tabbody
endtabular

enddocument


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









egregegreg

737k8919353263




737k8919353263












  • However, an input such as a 1 u\ would be much easier to manage and less fragile.

    – egreg
    2 hours ago


















  • However, an input such as a 1 u\ would be much easier to manage and less fragile.

    – egreg
    2 hours ago

















However, an input such as a 1 u\ would be much easier to manage and less fragile.

– egreg
2 hours ago






However, an input such as a 1 u\ would be much easier to manage and less fragile.

– egreg
2 hours ago


















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%2f487572%2fobeylines-and-gappto-from-etoolbox%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

Log på Navigationsmenu

Creating second map without labels using QGIS?How to lock map labels for inset map in Print Composer?How to Force the Showing of Labels of a Vector File in QGISQGIS Valmiera, Labels only show for part of polygonsRemoving duplicate point labels in QGISLabeling every feature using QGIS?Show labels for point features outside map canvasAbbreviate Road Labels in QGIS only when requiredExporting map from composer in QGIS - text labels have moved in output?How to make sure labels in qgis turn up in layout map?Writing label expression with ArcMap and If then Statement?

Nuuk Indholdsfortegnelse Etyomologi | Historie | Geografi | Transport og infrastruktur | Politik og administration | Uddannelsesinstitutioner | Kultur | Venskabsbyer | Noter | Eksterne henvisninger | Se også | Navigationsmenuwww.sermersooq.gl64°10′N 51°45′V / 64.167°N 51.750°V / 64.167; -51.75064°10′N 51°45′V / 64.167°N 51.750°V / 64.167; -51.750DMI - KlimanormalerSalmonsen, s. 850Grønlands Naturinstitut undersøger rensdyr i Akia og Maniitsoq foråret 2008Grønlands NaturinstitutNy vej til Qinngorput indviet i dagAntallet af biler i Nuuk må begrænsesNy taxacentral mødt med demonstrationKøreplan. Rute 1, 2 og 3SnescootersporNuukNord er for storSkoler i Kommuneqarfik SermersooqAtuarfik Samuel KleinschmidtKangillinguit AtuarfiatNuussuup AtuarfiaNuuk Internationale FriskoleIlinniarfissuaq, Grønlands SeminariumLedelseÅrsberetning for 2008Kunst og arkitekturÅrsberetning for 2008Julie om naturenNuuk KunstmuseumSilamiutGrønlands Nationalmuseum og ArkivStatistisk ÅrbogGrønlands LandsbibliotekStore koncerter på stribeVandhund nummer 1.000.000Kommuneqarfik Sermersooq – MalikForsidenVenskabsbyerLyngby-Taarbæk i GrønlandArctic Business NetworkWinter Cities 2008 i NuukDagligt opdaterede satellitbilleder fra NuukområdetKommuneqarfik Sermersooqs hjemmesideTurist i NuukGrønlands Statistiks databankGrønlands Hjemmestyres valgresultaterrrWorldCat124325457671310-5