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

Does it makes sense to buy a cycle to learn riding?

Is there a way to make member function NOT callable from constructor?

Where to refill my bottle in India?

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

Why is my log file so massive? 22gb. I am running log backups

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

Some basic questions on halt and move in Turing machines

Doomsday-clock for my fantasy planet

Check if two datetimes are between two others

Finding files for which a command fails

How to make payment on the internet without leaving a money trail?

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

Copycat chess is back

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

Sort in WP_Query(), not filter? Is it possible?

"listening to me about as much as you're listening to this pole here"

Why do we use polarized capacitors?

LM317 - Calculate dissipation due to voltage drop

Wild Shape Centaur Into a Giant Elk: do their Charges stack?

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

What is the command to reset a PC without deleting any files

How would photo IDs work for shapeshifters?

Is it possible to make sharp wind that can cut stuff from afar?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine



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
    51 mins 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
    51 mins 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
    51 mins ago

















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

    – David Carlisle
    51 mins ago
















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

– David Carlisle
51 mins ago





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

– David Carlisle
51 mins 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
    43 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
    24 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
    43 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
    24 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
    43 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
    24 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 47 mins 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
    43 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
    24 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
    43 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
    24 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
43 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
43 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
24 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
24 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

acmart: Multiple authors: all with same affiliation, one author an additional affiliationHow to Write Names of Multiple Authors with Shared Affiliation in ACM 2017 Template?Multiple authors with different primary affiliation, but same additional affiliationSame affiliation for all authors without extra packagesIOS-Book-Article.cls: one author with multiple affiliationacmart: Shared Author AffiliationMultiple authors with different primary affiliation, but same additional affiliationAuthor affiliation with only 1 authorAdding Multiple Authors with Different Affiliation in LaTeX ArticleLaTeX: Multiple authors stays on same lineHow to Label Multiple Authors with Same DescriptionHow to make two authors use the same affiliationTwo authors with same affiliation on finished front page

How to write “ä” and other umlauts and accented letters in bibliography?Accents in BibTeXSorting references with special characters alphabeticallyUse ae ligature in bibliographyEastern European nameInverted circumflex in BibTexBibTex, non-ascii initials and nameptr fproblems with accent in LatexHow to add a Ø to my bibliography from Jabref?References without accentsTroubles when trying to cite St“omer-Verlet in ”title" field of a bib entryComprehensive list of accented charactersHow to type the letter “i” with two dots (diaeresis) in math mode?Problem with glossary text and accented lettersSpecial character in bibliographyAccented letters, Unicode and LaTeX accentsHow to stop natbib from modifying bibliography styleCitation of a paper with non-standard characters by BibtexWrite accented characters to file using writeHow to group the bibliography alphabetically, if some surnames start with “accented” characters?How can I automatically capitalize significant words in my bibliography?

How to remove border form elements in the last row?Targeting flex items on the last rowHow to vertically wrap content with flexbox?Remove border from IFrameCSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to create a collapsed table with rounded corners?Div width 100% minus fixed amount of pixelsBorder around specific rows in a table?How to remove border (outline) around text/input boxes? (Chrome)How do I remove the space between inline-block elements?Flex-box: Align last row to gridRemove blue border from css custom-styled button in ChromeFill remaining vertical space with CSS using display:flexhow style elements in the last row of flexbox row layout with pure css without js