2

I am trying to run a r markdown file but got an error message

"! LaTeX Error: File `titling.sty' not found."

From googling around, the internet is telling me to do this in the terminal:

sudo apt-get install texlive-latex-extra

Tried that and got:

apt-get: command not found

More googling around told me to install hombrew, which I already have. Nevertheless I uninstalled and re-installed homebrew but same error was shown afterwards.

I found anoter post that told me to do this:

brew install wget

That installed correctly.

But then when I run sudo apt-get install texlive-latex-extra again I get the same apt-get not found message.

I'm on Osx 10.9

Doug Fir
  • 19,971
  • 47
  • 169
  • 299
  • `apt-get` is a package manager for **Linux**, and you're running **Mac OS**, also, I don't see how `wget` could help you. *`I am trying to run a r markdown file`* > How ? – Thomas Ayoub Jun 24 '16 at 08:38
  • Hi, initially this message was generated from within application "R Studio" advising me I need the Latex titling file. Then I wnet down a rabbit hole of trying to install stuff on the terminal by pasting stuff I found online where people had the same issue. I really don;t know much about linux/unix/terminal at all, as is probably evident from my question. Do you happen to know how to install latex files on a mac via terminal? – Doug Fir Jun 24 '16 at 08:46
  • 1
    Try to install [mactex](http://www.tug.org/mactex/) – Thomas Ayoub Jun 24 '16 at 08:47
  • You should check the link http://stackoverflow.com/questions/19688424/why-is-apt-get-function-not-working-in-terminal-on-mac-osx-10-9 – Create Explorer Jun 24 '16 at 09:04
  • @DineshKumarSoni I did come across that post but still could not get anywhere. Is it implying that I just substitute "apt-get" with the command "brew"? – Doug Fir Jun 24 '16 at 09:25

1 Answers1

1

I installed the "light" version of mactex in Thomas' link above since the regular one is 2.7gb. That Gave me the same errors. I found this page and from ran the following two commands in terminal:

sudo tlmgr install framed

and

sudo tlmgr install titling

Did the trick

Doug Fir
  • 19,971
  • 47
  • 169
  • 299