2
Could not start Build & View:PdfLaTeX:
pdflatex -synctex=1 -interaction=nonstopmode "moderncv".tex.

When I try to Build my Project with F5, I get the error above. I do not understand why. The file structure of my project is below:

enter image description here

I do not understand why I am getting this error right now.

texlive is already installed on my system. Invoking sudo apt-get install texlive on my Ubuntu, I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
texlive is already the newest version (2015.20160320-1).
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-72 linux-headers-4.4.0-72-generic
  linux-image-4.4.0-72-generic linux-image-extra-4.4.0-72-generic
  linux-signed-image-4.4.0-72-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 214 not upgraded.

I am currently getting these errors on TeXstudio.

When I invoke the command pdflatex cv_7 within my project folder, I get:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./cv_7.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 3 language(s) loaded.
(./moderncv.cls
Document Class: moderncv 2012/10/31 v1.2.0 modern curriculum vitae and letter d
ocument class
(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo)
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/lm/lmodern.sty)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/xargs/xargs.sty
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex))))
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-pdftex.def)
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg))
(./moderncvcompatibility.sty)
(/usr/share/texlive/texmf-dist/tex/latex/bigfoot/suffix.sty) (./tweaklist.sty))
 (./moderncvstyleclassic.sty
(/usr/share/texlive/texmf-dist/tex/latex/marvosym/umvs.fd))
(./moderncvcolorpurple.sty)
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def))

Package hyperref Message: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(./cv_7.aux) (/usr/share/texmf/tex/latex/lm/t1lmr.fd)
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg)
(/usr/share/texmf/tex/latex/lm/t1lmss.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./cv_7.out) (./cv_7.out) (/usr/share/texmf/tex/latex/lm/ot1lmr.fd)
(/usr/share/texmf/tex/latex/lm/omllmm.fd)
(/usr/share/texmf/tex/latex/lm/omslmsy.fd)
(/usr/share/texmf/tex/latex/lm/omxlmex.fd)
(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-mvs.cfg)
<pictures/picture.JPG, id=27, 1183.3008pt x 1135.1208pt>
<use pictures/picture.JPG>
Underfull \hbox (badness 10000) in paragraph at lines 56--56


LaTeX Font Warning: Font shape `T1/lmss/m/sc' in size <10.95> not available
(Font)              Font shape `T1/lmr/m/sc' tried instead on input line 80.


Underfull \hbox (badness 10000) in paragraph at lines 80--80


Underfull \hbox (badness 10000) in paragraph at lines 82--82


Underfull \hbox (badness 10000) in paragraph at lines 86--86


Underfull \hbox (badness 10000) in paragraph at lines 90--90

[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./pictures/picture.JPG>]

Underfull \hbox (badness 10000) in paragraph at lines 95--95

[2] (./cv_7.aux)

Package rerunfilecheck Warning: File `cv_7.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.

 )
(see the transcript file for additional information){/usr/share/texmf/fonts/enc
/dvips/lm/lm-ec.enc}</usr/share/texmf/fonts/type1/public/lm/lmcsc10.pfb></usr/s
hare/texmf/fonts/type1/public/lm/lmss10.pfb></usr/share/texmf/fonts/type1/publi
c/lm/lmss12.pfb></usr/share/texmf/fonts/type1/public/lm/lmss17.pfb></usr/share/
texmf/fonts/type1/public/lm/lmss8.pfb></usr/share/texmf/fonts/type1/public/lm/l
mssbx10.pfb></usr/share/texmf/fonts/type1/public/lm/lmsso10.pfb></usr/share/tex
mf/fonts/type1/public/lm/lmsso17.pfb></usr/share/texlive/texmf-dist/fonts/type1
/public/marvosym/marvosym.pfb>
Output written on cv_7.pdf (2 pages, 3521903 bytes).
Transcript written on cv_7.log.
  • Please tell us more: Which tool on which OS are you using? – Martin Schröder Jun 1 '17 at 8:58
  • have you installed tex? – David Carlisle Jun 1 '17 at 8:58
  • @DavidCarlisle I added more details to the question. – Sharan Duggirala Jun 1 '17 at 9:08
  • 1
    @SharanDuggirala can you tell us which editor you are using? – user36296 Jun 1 '17 at 9:09
  • 1
    @SharanDuggirala Ok, can you do two things? Open a terminal, cd into the folder of your latex project and type pdflatex cv_7. Does this work? Is the pdf updated? – user36296 Jun 1 '17 at 9:15
2

If your main document is cv_7.tex, Texstudio obviously uses the wrong root document, because it runs pdflatex for "moderncv".tex instead of "cv_7".tex.

Changing the root document can be done in several ways:

  • Open cv_7.tex in Texstudio and click select the menu entry OptionsRoot DocumentSet Current Document as Explicit Root. This will set cv_7.tex as root document.
  • Open cv_7.tex in Texstudio and right click to cv_7.tex structure view (left side of the Texstudio window) and select set as explicit root document. This will set cv_7.tex as root document.
  • Open cv_7.tex in Texstudio and click select the menu entry OptionsRoot DocumentDetect Automatically. This will unset the current root document and switch back to use the current document as root.
  • In Texstudio right click to moderncv.tex in the structure view (left side of the Texstudio window) and select remove explicit root document role. This will unset moderncv.tex from being the root document and switch back to use the current document as root.
  • Remove an existing magic comment from the document. That would be a line like

    % !TeX root = moderncv.tex
    

    Such a line would set moderncv.tex a root document and removing the line should reset moderncv.tex from being the root document if it has been set by the magic comment only.

  • Adding a magic comment at the very beginning of the document, in your case:

    % !TeX root = cv_7.tex
    

    This will set cv_7.tex as root document, but does not work, if another document has been set as explicit root using the menu or structure view.

Note: You do not need to use all of the described solutions. Try one by one and test, whether or not Texstudio compiles cv_7.tex.

See section 4.1.1, Root Document, in the Texstudio manual for more information about the root document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.