pdflatex -no-parse-first-line not ignoring first lineIs the parsing of --translate-file in the first line...

Please, smoke with good manners

How come there are so many candidates for the 2020 Democratic party presidential nomination?

Do I have an "anti-research" personality?

Is there a way to get a compiler for the original B programming language?

How can I practically buy stocks?

Don’t seats that recline flat defeat the purpose of having seatbelts?

Why is it that the natural deduction method can't test for invalidity?

Why do games have consumables?

Does the sign matter for proportionality?

Examples of subgroups where it's nontrivial to show closure under multiplication?

Why does processed meat contain preservatives, while canned fish needs not?

Phrase for the opposite of "foolproof"

How can the Zone of Truth spell be defeated without the caster knowing?

Why do Computer Science majors learn Calculus?

How to pronounce 'C++' in Spanish

What is the difference between `command a[bc]d` and `command `a{b,c}d`

US visa is under administrative processing, I need the passport back ASAP

Was there a Viking Exchange as well as a Columbian one?

Are Boeing 737-800’s grounded?

French for 'It must be my imagination'?

How to stop co-workers from teasing me because I know Russian?

Pass By Reference VS Pass by Value

Who is the Umpire in this picture?

What language was spoken in East Asia before Proto-Turkic?



pdflatex -no-parse-first-line not ignoring first line


Is the parsing of --translate-file in the first line disabled by default?Trouble with my first latex documentCommand line pdflatex vs TeXShopCannot build file on Editorial Managerpdflatex of list of filesInput a file ignoring the main body by command lineHow can I create compile command pdfLatex+Bibtex+pdfLatex+pdfLatex?Compiling laTeX file from C++ => ! LaTeX Error: File `colortbl.sty' not foundChange directory using PDFLatex in command lineCompile error on only some devices













0















I want to be able to compile my documents with a simple ./main.tex. The first thing I tried was #!/usr/bin/pdflatex which gave me an error because the first line is nonsense to the TeX engine. I then tried it with a % instead but that, as expected didn't do much of anything.



Looking this problem up online I tried adding -no-parse-first-line to the shebang, but again no luck. Then I thought "executing a script defaults to /usr/bin/sh so why not just use a normal line". To this end I put pdflatex -no-parse-first-line $0 as my first line, but that doesn't work either.



$ ./main.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2018-12-01>

! LaTeX Error: Missing begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.1 p
dflatex -no-parse-first-line $0
?









share|improve this question





























    0















    I want to be able to compile my documents with a simple ./main.tex. The first thing I tried was #!/usr/bin/pdflatex which gave me an error because the first line is nonsense to the TeX engine. I then tried it with a % instead but that, as expected didn't do much of anything.



    Looking this problem up online I tried adding -no-parse-first-line to the shebang, but again no luck. Then I thought "executing a script defaults to /usr/bin/sh so why not just use a normal line". To this end I put pdflatex -no-parse-first-line $0 as my first line, but that doesn't work either.



    $ ./main.tex
    This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=pdflatex)
    restricted write18 enabled.
    entering extended mode
    (./main.tex
    LaTeX2e <2018-12-01>

    ! LaTeX Error: Missing begin{document}.

    See the LaTeX manual or LaTeX Companion for explanation.
    Type H <return> for immediate help.
    ...

    l.1 p
    dflatex -no-parse-first-line $0
    ?









    share|improve this question



























      0












      0








      0








      I want to be able to compile my documents with a simple ./main.tex. The first thing I tried was #!/usr/bin/pdflatex which gave me an error because the first line is nonsense to the TeX engine. I then tried it with a % instead but that, as expected didn't do much of anything.



      Looking this problem up online I tried adding -no-parse-first-line to the shebang, but again no luck. Then I thought "executing a script defaults to /usr/bin/sh so why not just use a normal line". To this end I put pdflatex -no-parse-first-line $0 as my first line, but that doesn't work either.



      $ ./main.tex
      This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=pdflatex)
      restricted write18 enabled.
      entering extended mode
      (./main.tex
      LaTeX2e <2018-12-01>

      ! LaTeX Error: Missing begin{document}.

      See the LaTeX manual or LaTeX Companion for explanation.
      Type H <return> for immediate help.
      ...

      l.1 p
      dflatex -no-parse-first-line $0
      ?









      share|improve this question
















      I want to be able to compile my documents with a simple ./main.tex. The first thing I tried was #!/usr/bin/pdflatex which gave me an error because the first line is nonsense to the TeX engine. I then tried it with a % instead but that, as expected didn't do much of anything.



      Looking this problem up online I tried adding -no-parse-first-line to the shebang, but again no luck. Then I thought "executing a script defaults to /usr/bin/sh so why not just use a normal line". To this end I put pdflatex -no-parse-first-line $0 as my first line, but that doesn't work either.



      $ ./main.tex
      This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Arch Linux) (preloaded format=pdflatex)
      restricted write18 enabled.
      entering extended mode
      (./main.tex
      LaTeX2e <2018-12-01>

      ! LaTeX Error: Missing begin{document}.

      See the LaTeX manual or LaTeX Companion for explanation.
      Type H <return> for immediate help.
      ...

      l.1 p
      dflatex -no-parse-first-line $0
      ?






      compiling






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 8 mins ago









      Andrew

      31.5k34483




      31.5k34483










      asked 58 mins ago









      Nero grisNero gris

      286




      286






















          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%2f488001%2fpdflatex-no-parse-first-line-not-ignoring-first-line%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%2f488001%2fpdflatex-no-parse-first-line-not-ignoring-first-line%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

          Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

          Schneeberg (Smreczany) Bibliografia | Menu...

          Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...