Include filename in a nested document Unicorn Meta Zoo #1: Why another podcast? ...

Are all CP/M-80 implementations binary compatible?

What is this word supposed to be?

Multiple fireplaces in an apartment building?

Retract an already submitted recommendation letter (written for an undergrad student)

What's parked in Mil Moscow helicopter plant?

Can I criticise the more senior developers around me for not writing clean code?

Did the Roman Empire have Penal Colonies?

PIC mathematical operations weird problem

"Rubric" as meaning "signature" or "personal mark" -- is this accepted usage?

Dynamic Return Type

What is the ongoing value of the Kanban board to the developers as opposed to management

Are these square matrices always diagonalisable?

Do I need to protect SFP ports and optics from dust/contaminants? If so, how?

Where did Arya get these scars?

What is it called when you ride around on your front wheel?

A strange hotel

Does Mathematica have an implementation of the Poisson Binomial Distribution?

Married in secret, can marital status in passport be changed at a later date?

All ASCII characters with a given bit count

Seek and ye shall find

How to count in linear time worst-case?

Will I lose my paid in full property

Co-worker works way more than he should

How to get even lighting when using flash for group photos near wall?



Include filename in a nested document



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHave input{} print the filenameHow can I include subfiles in to a subfiles?How to get rid of unwanted spaces with input?Adding a document to another with a different document classTexmaker - nested document structureHave input{} print the filenameget part of the filename in the file contentRemove underscores from filenameExtract one of multiple tikzpictures from a tex fileLatexpand not finding include and input files“Run section” in LaTeX?












0















I have a large project split in multiple files. I'd like to get each subfile name in the pdf to monitor my document.



From different posts on this forum i understand Currfile package could help by using currfilename.
From this post, I get an answer that would be far too manual to implement since I have probably 100 subfiles, it would be far too long to add currfilename to every one of them.



Is there a clever way to input the file name of the subfile that in being input in Main.tex without having to type it for each subfile ? In other words, ws there a way to include currfilename right after input calls the subfile ?



begin{filecontents}{File1.tex}
currfilename
begin{itemize}
item first
end{itemize}
end{filecontents}

begin{filecontents}{File2.tex}
currfilename
begin{itemize}
item first
item second
end{itemize}
end{filecontents}

begin{filecontents}{File3.tex}
currfilename
begin{itemize}
item first
item second
item third
end{itemize}
end{filecontents}

begin{filecontents}{File4.tex}
currfilename
begin{itemize}
item first
item second
item third
item fourth
end{itemize}
end{filecontents}


documentclass[10pt]{article}
usepackage{currfile}

begin{document}

input{File1.tex}
input{File2.tex}
input{File3.tex}
input{File4.tex}

end{document}









share|improve this question

























  • if you did not have currfilename in the file isn't the required output just File1.tex input{File1.tex} File2.tex input{File2.tex} ?

    – David Carlisle
    22 mins ago













  • Forgive my English David. I wish I had know about 'currfilename' before I wrote the 100 (actually more) subfiles. In MWE it was easy to implement the result I wanted. How could I avoid the burden of rewriting 'currfilename' in every single subfile ?

    – Julien-Elie Taieb
    17 mins ago













  • The mwe would if it had over 100 similar {filecontents} be a simple internal find and replace on a key phrase such as the begin{itemize} replace with currfilename begin{itemize} . However I suspect in reality your file is nothing like the mwe structure (is it ?) so I then have to query could you not do a find and replace in each of the real inputs. to give an accurate answer requires knowing it is a true reflection of the question.

    – KJO
    6 mins ago


















0















I have a large project split in multiple files. I'd like to get each subfile name in the pdf to monitor my document.



From different posts on this forum i understand Currfile package could help by using currfilename.
From this post, I get an answer that would be far too manual to implement since I have probably 100 subfiles, it would be far too long to add currfilename to every one of them.



Is there a clever way to input the file name of the subfile that in being input in Main.tex without having to type it for each subfile ? In other words, ws there a way to include currfilename right after input calls the subfile ?



begin{filecontents}{File1.tex}
currfilename
begin{itemize}
item first
end{itemize}
end{filecontents}

begin{filecontents}{File2.tex}
currfilename
begin{itemize}
item first
item second
end{itemize}
end{filecontents}

begin{filecontents}{File3.tex}
currfilename
begin{itemize}
item first
item second
item third
end{itemize}
end{filecontents}

begin{filecontents}{File4.tex}
currfilename
begin{itemize}
item first
item second
item third
item fourth
end{itemize}
end{filecontents}


documentclass[10pt]{article}
usepackage{currfile}

begin{document}

input{File1.tex}
input{File2.tex}
input{File3.tex}
input{File4.tex}

end{document}









share|improve this question

























  • if you did not have currfilename in the file isn't the required output just File1.tex input{File1.tex} File2.tex input{File2.tex} ?

    – David Carlisle
    22 mins ago













  • Forgive my English David. I wish I had know about 'currfilename' before I wrote the 100 (actually more) subfiles. In MWE it was easy to implement the result I wanted. How could I avoid the burden of rewriting 'currfilename' in every single subfile ?

    – Julien-Elie Taieb
    17 mins ago













  • The mwe would if it had over 100 similar {filecontents} be a simple internal find and replace on a key phrase such as the begin{itemize} replace with currfilename begin{itemize} . However I suspect in reality your file is nothing like the mwe structure (is it ?) so I then have to query could you not do a find and replace in each of the real inputs. to give an accurate answer requires knowing it is a true reflection of the question.

    – KJO
    6 mins ago
















0












0








0








I have a large project split in multiple files. I'd like to get each subfile name in the pdf to monitor my document.



From different posts on this forum i understand Currfile package could help by using currfilename.
From this post, I get an answer that would be far too manual to implement since I have probably 100 subfiles, it would be far too long to add currfilename to every one of them.



Is there a clever way to input the file name of the subfile that in being input in Main.tex without having to type it for each subfile ? In other words, ws there a way to include currfilename right after input calls the subfile ?



begin{filecontents}{File1.tex}
currfilename
begin{itemize}
item first
end{itemize}
end{filecontents}

begin{filecontents}{File2.tex}
currfilename
begin{itemize}
item first
item second
end{itemize}
end{filecontents}

begin{filecontents}{File3.tex}
currfilename
begin{itemize}
item first
item second
item third
end{itemize}
end{filecontents}

begin{filecontents}{File4.tex}
currfilename
begin{itemize}
item first
item second
item third
item fourth
end{itemize}
end{filecontents}


documentclass[10pt]{article}
usepackage{currfile}

begin{document}

input{File1.tex}
input{File2.tex}
input{File3.tex}
input{File4.tex}

end{document}









share|improve this question
















I have a large project split in multiple files. I'd like to get each subfile name in the pdf to monitor my document.



From different posts on this forum i understand Currfile package could help by using currfilename.
From this post, I get an answer that would be far too manual to implement since I have probably 100 subfiles, it would be far too long to add currfilename to every one of them.



Is there a clever way to input the file name of the subfile that in being input in Main.tex without having to type it for each subfile ? In other words, ws there a way to include currfilename right after input calls the subfile ?



begin{filecontents}{File1.tex}
currfilename
begin{itemize}
item first
end{itemize}
end{filecontents}

begin{filecontents}{File2.tex}
currfilename
begin{itemize}
item first
item second
end{itemize}
end{filecontents}

begin{filecontents}{File3.tex}
currfilename
begin{itemize}
item first
item second
item third
end{itemize}
end{filecontents}

begin{filecontents}{File4.tex}
currfilename
begin{itemize}
item first
item second
item third
item fourth
end{itemize}
end{filecontents}


documentclass[10pt]{article}
usepackage{currfile}

begin{document}

input{File1.tex}
input{File2.tex}
input{File3.tex}
input{File4.tex}

end{document}






input subfiles currfile






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 24 mins ago







Julien-Elie Taieb

















asked 30 mins ago









Julien-Elie TaiebJulien-Elie Taieb

31519




31519













  • if you did not have currfilename in the file isn't the required output just File1.tex input{File1.tex} File2.tex input{File2.tex} ?

    – David Carlisle
    22 mins ago













  • Forgive my English David. I wish I had know about 'currfilename' before I wrote the 100 (actually more) subfiles. In MWE it was easy to implement the result I wanted. How could I avoid the burden of rewriting 'currfilename' in every single subfile ?

    – Julien-Elie Taieb
    17 mins ago













  • The mwe would if it had over 100 similar {filecontents} be a simple internal find and replace on a key phrase such as the begin{itemize} replace with currfilename begin{itemize} . However I suspect in reality your file is nothing like the mwe structure (is it ?) so I then have to query could you not do a find and replace in each of the real inputs. to give an accurate answer requires knowing it is a true reflection of the question.

    – KJO
    6 mins ago





















  • if you did not have currfilename in the file isn't the required output just File1.tex input{File1.tex} File2.tex input{File2.tex} ?

    – David Carlisle
    22 mins ago













  • Forgive my English David. I wish I had know about 'currfilename' before I wrote the 100 (actually more) subfiles. In MWE it was easy to implement the result I wanted. How could I avoid the burden of rewriting 'currfilename' in every single subfile ?

    – Julien-Elie Taieb
    17 mins ago













  • The mwe would if it had over 100 similar {filecontents} be a simple internal find and replace on a key phrase such as the begin{itemize} replace with currfilename begin{itemize} . However I suspect in reality your file is nothing like the mwe structure (is it ?) so I then have to query could you not do a find and replace in each of the real inputs. to give an accurate answer requires knowing it is a true reflection of the question.

    – KJO
    6 mins ago



















if you did not have currfilename in the file isn't the required output just File1.tex input{File1.tex} File2.tex input{File2.tex} ?

– David Carlisle
22 mins ago







if you did not have currfilename in the file isn't the required output just File1.tex input{File1.tex} File2.tex input{File2.tex} ?

– David Carlisle
22 mins ago















Forgive my English David. I wish I had know about 'currfilename' before I wrote the 100 (actually more) subfiles. In MWE it was easy to implement the result I wanted. How could I avoid the burden of rewriting 'currfilename' in every single subfile ?

– Julien-Elie Taieb
17 mins ago







Forgive my English David. I wish I had know about 'currfilename' before I wrote the 100 (actually more) subfiles. In MWE it was easy to implement the result I wanted. How could I avoid the burden of rewriting 'currfilename' in every single subfile ?

– Julien-Elie Taieb
17 mins ago















The mwe would if it had over 100 similar {filecontents} be a simple internal find and replace on a key phrase such as the begin{itemize} replace with currfilename begin{itemize} . However I suspect in reality your file is nothing like the mwe structure (is it ?) so I then have to query could you not do a find and replace in each of the real inputs. to give an accurate answer requires knowing it is a true reflection of the question.

– KJO
6 mins ago







The mwe would if it had over 100 similar {filecontents} be a simple internal find and replace on a key phrase such as the begin{itemize} replace with currfilename begin{itemize} . However I suspect in reality your file is nothing like the mwe structure (is it ?) so I then have to query could you not do a find and replace in each of the real inputs. to give an accurate answer requires knowing it is a true reflection of the question.

– KJO
6 mins ago












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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487464%2finclude-filename-in-a-nested-document%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
















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%2f487464%2finclude-filename-in-a-nested-document%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

Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...