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

PIC mathematical operations weird problem

How do I check if a string is entirely made of the same substring?

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

How to open locks without disable device?

Align column where each cell has two decimals with siunitx

Is accepting an invalid credit card number a security issue?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

Is this homebrew racial feat, Stonehide, balanced?

The art of proof summarizing. Are there known rules, or is it a purely common sense matter?

Can you stand up from being prone using Skirmisher outside of your turn?

What is "leading note" and what does it mean to "raise a note"?

How long after the last departure shall the airport stay open for an emergency return?

How to find the right literary agent in the USA?

Flash for group photos near wall

All ASCII characters with a given bit count

What to do with someone that cheated their way through university and a PhD program?

Is a 5 watt UHF/VHF handheld considered QRP?

What was Apollo 13's "Little Jolt" after MECO?

How to count in linear time worst-case?

How would I use different systems of magic when they are capable of the same effects?

What's parked in Mil Moscow helicopter plant?

Additive group of local rings

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

Are all CP/M-80 implementations binary compatible?



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 filenameCan't include child document in subfigurePath to External Files in Nested inputinput can't find file (nested directory structure)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 filenameLatexpand not finding include and input files“Run section” in LaTeX?












0















I have a large project split in multiple files in subfolders. I'd like to get the file 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



























    0















    I have a large project split in multiple files in subfolders. I'd like to get the file 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

























      0












      0








      0








      I have a large project split in multiple files in subfolders. I'd like to get the file 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














      I have a large project split in multiple files in subfolders. I'd like to get the file 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












      share










      share



      share










      asked 4 mins ago









      Julien-Elie TaiebJulien-Elie Taieb

      31519




      31519






















          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

          Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

          Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

          How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...