[Tex/LaTex] Error making the first Texworks document


I was trying to make my first document using Texworks but in the moment of saving I got this error message:

C:/Users/Nicolò Ruggeri/AppData/Local/MiKTeX/2.9/miktex/log/initexmf.log

You may want to visit the MiKTeX project page (http://miktex.org), if you
need help.
log4cxx: setFile(C:\Users\Nicolò Ruggeri\AppData\Local\MiKTeX\2.9\miktex\log/miktex-pdftex.log,true) call failed.
log4cxx: IO Exception : status code = 720003
log4cxx: No output stream or file set for the appender named [RollingLogFile].

Sorry, but C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\miktex-pdftex.exe did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:/Users/Nicolò Ruggeri/AppData/Local/MiKTeX/2.9/miktex/log/miktex-pdftex.log

You may want to visit the MiKTeX project page (http://miktex.org), if you
need help.

This is what I wrote,based on an online document:

% !TEX encoding = UTF-8
% !TEX program = pdflatex




\title{Un articolo inutile}
\author{A. U. Tore}


\section{Un paragrafo}

Testo che mostra quanto si possa scrivere

\subsection{Un paragrafo di secondo livello}

Testo sempre più inutile, ma con léttere accentàte
 e riferimenti allo stranißimo posto chiamato Ööç.

Ci mettiàmo anche un secondo capoverso.


What should I do?

Best Answer

I had the same exact problem and fought it for a while. Just got it working!

I believe it behaves the same way as Arduino does with special characters in user name. For me it tries to use AppData under two separate directories.

C:\Users\Filip Granö\AppData and C:\Users\Filip Granö\AppData

When initexmf.exe --quiet --update-fndb tries to update font database it fails and therefore pdflatex fails.

Here's what I did:

  1. closed anything related to miktex
  2. opened TeXworks as administrator
  3. tried to run a typeset -> failed
  4. closed TeXworks
  5. deleted C:\Users\Filip Granö\AppData (created when ran as administrator)
  6. opened cmd as administrator
  7. created a symbolic link: C:\Users\Filip Granö>mklink /D AppData "..\Filip Granö\AppData"
  8. opened cmd as myself
  9. ran: C:\Program Files\MiKTeX 2.9\miktex\bin\x64>initexmf.exe --update-fndb (no output == good)
  10. tried to run a typeset -> asks to install packages needed
  11. Install needed packages for user only! - you can set it to do it automatically

Result: it now works for me!