graphicx package not installed using tinytex in rstudio

259 Views Asked by At

I am new to LaTeX and relatively new to RMarkdown, so I hope this is not a dumb question but I have been stuck on this for a few days.

I am trying to knit a pdf report using rmarkdown and a previously created latex template documents. In the template a svg picture of the logo of my company is added to the top of the page using the packages svg, eso-pic and graphicx. The following LaTeX code is used for that:

\usepackage{eso-pic, graphicx}   
\usepackage{svg}   
\AddToShipoutPicture*{%  
      \AtPageUpperLeft{%  
          \raisebox{-\height}{%  
           \hspace*{0.5\paperwidth}\hspace{-0.6615cm}\includesvg{sjablonen//logo.svg}%  
         }%       
}   
} 

However, each time I try to knit the pdf file I get the following error:

! Package svg Error: File `logo_svg-tex.pdf' is missing.\

I found out that the graphicx package was not installed when installing the tinytex package, however each time I try to install it using tinytex::tlmgr_install("graphicx") I get another error:

tlmgr install graphicx 
'\\path\to\project' CMD.EXE was started with the above path as the current directory. UNC paths are not supported.  Defaulting to Windows directory. 
tlmgr.pl install: package graphicx not present in repository. 
tlmgr.pl: action install returned an error; continuing. 
tlmgr.pl: package repository https://mirror.lyrahosting.com/CTAN/systems/texlive/tlnet (not verified: pubkey missing) 
tlmgr.pl: An error has occurred. 
See above messages. Exiting. 
tlmgr update --self tlmgr 
install graphicx 
'\\path\to\project' CMD.EXE was started with the above path as the current directory. UNC paths are not supported.  Defaulting to Windows directory. 
tlmgr.pl install: package graphicx not present in repository. 
tlmgr.pl: action install returned an error; continuing. 
tlmgr.pl: package repository https://ftp.snt.utwente.nl/pub/software/tex/systems/texlive/tlnet (not verified: pubkey missing) 
tlmgr.pl: An error has occurred. 
See above messages. Exiting.

When I try to google the issue I can only find that the graphicx package should be installed when installing tinytex. I tried reinstalling tinytex and using tinytex::tlmrg_search("graphicx"), which showed me that the following packages do exist: graphicx-psmin graphicxbox graphicxpsd pst-graphicx, but didn't show me graphicx again.

What can I do?

0

There are 0 best solutions below