Variables with Input from Separate FileInput file folderRemove trailing space from inputHow to input text from a fileInput command arguments from fileInput a parameter from another fileinput an unspecified file from a directoryCombine siunitx S column with input value from tex fileInput Command and Declaring VariablesInput numbers from fileinput a .tex file from an url

Patience, young "Padovan"

How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Is Social Media Science Fiction?

Symmetry in quantum mechanics

Why is making salt water prohibited on Shabbat?

Calculate Levenshtein distance between two strings in Python

Is this homebrew feat, Beast of Burden, balanced?

What is the meaning of "of trouble" in the following sentence?

New order #4: World

Latin words with no plurals in English

Input two commands to a new terminal?

What is GPS' 19 year rollover and does it present a cybersecurity issue?

Why does this relative pronoun not take the case of the noun it is referring to?

Email Account under attack (really) - anything I can do?

Can I legally use front facing blue light in the UK?

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

How to move the player while also allowing forces to affect it

Why do we use polarized capacitors?

Why airport relocation isn't done gradually?

How many letters suffice to construct words with no repetition?

What are the advantages and disadvantages of running one shots compared to campaigns?

How do you conduct xenoanthropology after first contact?



Variables with Input from Separate File


Input file folderRemove trailing space from inputHow to input text from a fileInput command arguments from fileInput a parameter from another fileinput an unspecified file from a directoryCombine siunitx S column with input value from tex fileInput Command and Declaring VariablesInput numbers from fileinput a .tex file from an url













0















I just started learning Latex for work but I'm having trouble with a code I'm writing. I'm trying to create a file that will take variables from another file and print them out with their assigned values in different settings. I have another file that has all the variables stored and will later input variables from matlab there.



This file is the one with my variables:



documentclassarticle
usepackage[utf8]inputenc
usepackagecalc
input xintexpr.styrelax

titleExample of Variable Input
authorCordelia David
dateApril 2019

newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitxintexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax

begindocument

maketitle

Strawberries = Strawberries

Apples = Apples

Grapes = Grapes

Pears = Pears

Tomatoes = Tomatoes

Total of all Fruit = TotalFruit

enddocument


Which prints out mostly correctly, though I'm unsure why there's an exclamaton mark in front of the number for Total of All Fruits when compiled.



This is the file that calls that file:



documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input authorCordelia David dateApril 2019 inputVariables.tex begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


The problem I'm having is it will only compile the variables file, and anything I write in the main text won't get printed. Why is this? How do I fix this?










share|improve this question







New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • the file that you input should just be a list of newcommand remove the documentclass etc.

    – David Carlisle
    1 hour ago















0















I just started learning Latex for work but I'm having trouble with a code I'm writing. I'm trying to create a file that will take variables from another file and print them out with their assigned values in different settings. I have another file that has all the variables stored and will later input variables from matlab there.



This file is the one with my variables:



documentclassarticle
usepackage[utf8]inputenc
usepackagecalc
input xintexpr.styrelax

titleExample of Variable Input
authorCordelia David
dateApril 2019

newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitxintexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax

begindocument

maketitle

Strawberries = Strawberries

Apples = Apples

Grapes = Grapes

Pears = Pears

Tomatoes = Tomatoes

Total of all Fruit = TotalFruit

enddocument


Which prints out mostly correctly, though I'm unsure why there's an exclamaton mark in front of the number for Total of All Fruits when compiled.



This is the file that calls that file:



documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input authorCordelia David dateApril 2019 inputVariables.tex begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


The problem I'm having is it will only compile the variables file, and anything I write in the main text won't get printed. Why is this? How do I fix this?










share|improve this question







New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • the file that you input should just be a list of newcommand remove the documentclass etc.

    – David Carlisle
    1 hour ago













0












0








0








I just started learning Latex for work but I'm having trouble with a code I'm writing. I'm trying to create a file that will take variables from another file and print them out with their assigned values in different settings. I have another file that has all the variables stored and will later input variables from matlab there.



This file is the one with my variables:



documentclassarticle
usepackage[utf8]inputenc
usepackagecalc
input xintexpr.styrelax

titleExample of Variable Input
authorCordelia David
dateApril 2019

newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitxintexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax

begindocument

maketitle

Strawberries = Strawberries

Apples = Apples

Grapes = Grapes

Pears = Pears

Tomatoes = Tomatoes

Total of all Fruit = TotalFruit

enddocument


Which prints out mostly correctly, though I'm unsure why there's an exclamaton mark in front of the number for Total of All Fruits when compiled.



This is the file that calls that file:



documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input authorCordelia David dateApril 2019 inputVariables.tex begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


The problem I'm having is it will only compile the variables file, and anything I write in the main text won't get printed. Why is this? How do I fix this?










share|improve this question







New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I just started learning Latex for work but I'm having trouble with a code I'm writing. I'm trying to create a file that will take variables from another file and print them out with their assigned values in different settings. I have another file that has all the variables stored and will later input variables from matlab there.



This file is the one with my variables:



documentclassarticle
usepackage[utf8]inputenc
usepackagecalc
input xintexpr.styrelax

titleExample of Variable Input
authorCordelia David
dateApril 2019

newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitxintexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax

begindocument

maketitle

Strawberries = Strawberries

Apples = Apples

Grapes = Grapes

Pears = Pears

Tomatoes = Tomatoes

Total of all Fruit = TotalFruit

enddocument


Which prints out mostly correctly, though I'm unsure why there's an exclamaton mark in front of the number for Total of All Fruits when compiled.



This is the file that calls that file:



documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input authorCordelia David dateApril 2019 inputVariables.tex begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


The problem I'm having is it will only compile the variables file, and anything I write in the main text won't get printed. Why is this? How do I fix this?







input






share|improve this question







New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









Cordelia Marie DavidCordelia Marie David

1




1




New contributor




Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Cordelia Marie David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • the file that you input should just be a list of newcommand remove the documentclass etc.

    – David Carlisle
    1 hour ago

















  • the file that you input should just be a list of newcommand remove the documentclass etc.

    – David Carlisle
    1 hour ago
















the file that you input should just be a list of newcommand remove the documentclass etc.

– David Carlisle
1 hour ago





the file that you input should just be a list of newcommand remove the documentclass etc.

– David Carlisle
1 hour ago










1 Answer
1






active

oldest

votes


















0














documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input
authorCordelia David dateApril 2019
inputvariables.tex

begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


with variables.tex :



newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitthenumexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax





share|improve this answer























  • Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

    – Cordelia Marie David
    57 mins ago












  • @CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

    – David Carlisle
    37 mins 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
);



);






Cordelia Marie David is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483846%2fvariables-with-input-from-separate-file%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









0














documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input
authorCordelia David dateApril 2019
inputvariables.tex

begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


with variables.tex :



newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitthenumexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax





share|improve this answer























  • Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

    – Cordelia Marie David
    57 mins ago












  • @CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

    – David Carlisle
    37 mins ago















0














documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input
authorCordelia David dateApril 2019
inputvariables.tex

begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


with variables.tex :



newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitthenumexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax





share|improve this answer























  • Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

    – Cordelia Marie David
    57 mins ago












  • @CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

    – David Carlisle
    37 mins ago













0












0








0







documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input
authorCordelia David dateApril 2019
inputvariables.tex

begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


with variables.tex :



newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitthenumexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax





share|improve this answer













documentclassarticle usepackage[utf8]inputenc

titleExample of Variable Input
authorCordelia David dateApril 2019
inputvariables.tex

begindocument



maketitle

sectionIntroduction

We had Strawberries Strawberries for this year's harvest. Probably not enough.

enddocument


with variables.tex :



newcommandStrawberries34
newcommandApples14
newcommandGrapes431
newcommandPears56
newcommandTomatoes42
newcommandTotalFruitthenumexpr Strawberries + Apples + Grapes + Pears + Tomatoes relax






share|improve this answer












share|improve this answer



share|improve this answer










answered 1 hour ago









David CarlisleDavid Carlisle

498k4111441893




498k4111441893












  • Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

    – Cordelia Marie David
    57 mins ago












  • @CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

    – David Carlisle
    37 mins ago

















  • Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

    – Cordelia Marie David
    57 mins ago












  • @CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

    – David Carlisle
    37 mins ago
















Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

– Cordelia Marie David
57 mins ago






Thank you that worked perfectly! I didn't know you could have a latex document without the document class, but it seems silly now that I didn't realize this. Would there be any way to create a substructure for one variable? Like adding different years to the harvest of one fruit?

– Cordelia Marie David
57 mins ago














@CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

– David Carlisle
37 mins ago





@CordeliaMarieDavid you should perhaps ask a new question but tex has no structure at all just macros so you can make whatever structure you like eg newcommandStrawberries20173020183420192 then instead of using Strawberries directly define some macro to extract the right information. You could store a list like this, or store it one macro per fruit per year or .... the details of the "extraction" depend of course how you choose to store it but anything is possible.

– David Carlisle
37 mins ago










Cordelia Marie David is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Cordelia Marie David is a new contributor. Be nice, and check out our Code of Conduct.












Cordelia Marie David is a new contributor. Be nice, and check out our Code of Conduct.











Cordelia Marie David is a new contributor. Be nice, and check out our Code of Conduct.














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%2f483846%2fvariables-with-input-from-separate-file%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

Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

Join wedge with single bond in chemfigHow to make only one part of double bond bold with chemfig?Crossing bonds in chemfigjoining atoms in chemfig. Two adjacent molculesHow do I selectively change bond length in chemfig?Ugly bond joints in chemfigchemfig: reaction above arrowUsing the mhchem and chemfig packages in conjunctionBonding to specific element letter using chemfigResonance hybrids in chemfigScale chemfig molecule in beamer with tikzWhy does this chemfig bond with a hook start in the middle of the atom?

Are small insurances worth itIs insurance worth it if you can afford to replace the item? If not, when is it?Is accident insurance worth it for my kids who play sportsIs insuring property for more than it is worth allowed?At what point does it become worth it to file an insurance claim?Are wage loss insurance programs worth the cost compared to having an emergency fund?When is an event worth insuring against?Is insurance worth it if you can afford to replace the item? If not, when is it?FHA loan just commenced : Any way to get any of the up-front mortgage insurance back?Which types of insurances do I need to buy?Should I carry less renter's insurance if I can self-insure?Mortgage Adviser Signed Me Up For Multiple Home and Life Insurances (UK)Why many travel insurances don't cover country of nationality?