Texmaker and TeXstudioProblem while compiling

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Problem while compiling

Post by Tolaso »

So,

I updated from 2015 tl version to 2016 and reinstalled the texstudio editor. Now nothing compiles. I have never used XeLaTeX in my documents yet I am receiving an error

"Fatal error Fontspec"

bla bla bla.. I don't have this package loaded in the preamble and the document compiled before updating the version of tl. What can possibly go wrong?

If you wish I can give you the entire preamble... ( although it's quite long )

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Problem while compiling

Post by Stefan Kottwitz »

You can post the preamble as .txt file attachment. Also, it would be good to post the .log file as attachment, since it contains warnings and error messages. The attachment link is below the text edit field, when writing a post.

Stefan
LaTeX.org admin
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Problem while compiling

Post by Tolaso »

Hi Stefan,

sorry for not replying earlier but I was kinda busy and since it was not something urgent I delayed it a bit.

Here is the preamble

Code: Select all

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[lmargin=0.7cm, rmargin=1cm, vmargin=1.5cm]{geometry}
\renewcommand{\qedsymbol}{$\blacklozenge$}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{eulervm}
\usepackage{esint}
\usepackage{fontawesome}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead{Mathematical Analysis ... }
\chead{... \textit{A collection of problems}} 
\rhead{Version 5}
\cfoot{\thepage}
\lfoot{Typesetting \LaTeX }
\rfoot{\textbf{Editor:} Tolaso J. Kos}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{0.5pt}

\usepackage{tcolorbox}


\usepackage{tikz} 
\usetikzlibrary{intersections,backgrounds}
\usepackage[shortlabels]{enumitem}
\usepackage{bigints}
\usepackage{cancel}
\usepackage{multicol}
\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0.5pt}%
\usepackage{xcolor}

%definition of custom colours

\definecolor{DarkRed}{RGB}{139,0,0}
\definecolor{DarkBlue}{RGB}{102, 153, 255}
\definecolor{LightBlue}{RGB}{51, 102, 255}


\usepackage{hyperref}
\hypersetup{colorlinks=true, linkbordercolor=DarkRed,linkcolor=green}


%tasks option

\setlist[enumerate]{wide = 0pt, leftmargin=*}
\usepackage{tasks}
\settasks{counter-format =(tsk[r]), label-align=right, label-width=1.75em, item-indent=-2em }

%macro definition for arcot

\DeclareMathOperator{\arccot}{{\rm arccot}}

%definition of foonote using fontawesome

\renewcommand{\thefootnote}{\faDatabase}

%change qed symbol

\renewcommand\qedsymbol{$\blacklozenge$}

%allow page break equations

\allowdisplaybreaks

%macro definition for displaying text when no solution exists.

\newcommand{\nosol}{\textit{Currently there is no solution for this exercise.}}

%macro definition for editor note.

\newcommand{\editornote}{\textit{The editor's solution is pretty ugly and is looking for a new one. Feel free to contribute by sending him one. Your solution shall be published in the very next booklet update.}}

\newcommand{\sol}[1]{\textit{The following solution is due to #1 .}}


\usepackage{afterpage}

\makeatletter
% Macro \changepagecolor has the same syntax as \pagecolor or \color
% with an optional argument and a mandatory argument.
\newcommand*{\changepagecolor}{%
  \@ifnextchar[\@changepagecolor@i\@changepagecolor@ii
}
% Case: \changepagecolor[...]{...}
\def\@changepagecolor@i[#1]#2{%
  \@changepagecolor@do{[{#1}]{#2}}%
}
% Case: \changepagecolor{...}
\newcommand*{\@changepagecolor@ii}[1]{%
  \@changepagecolor@do{{#1}}%
}
\newcommand*{\@changepagecolor@do}[1]{%
  % Fill the remaining space with a colored rule
  \begingroup
    \offinterlineskip
    \hbox to 0pt{%
      \kern-\paperwidth
      \vtop to 0pt{%
        \color#1%
        \hrule width 5\paperwidth height \paperheight
        \vss
      }%
      \hss
    }%
  \endgroup
}
\makeatother

\usepackage{pagecolor}
\usepackage{atbegshi} % for '\AtBeginShipout' macro
% Make page color "light red" *after* page 2
\AtBeginShipout{\ifnum\value{page}=1\pagecolor{white}\fi}

%the title of this project

\newcommand{\mytitle}{\textbf{Mathematical Analysis}}
\newcommand{\mydescription}{\textbf{A collection of problems}}
\newcommand{\mytiny}{\textbf{Real \& Complex Analysis - General Topology - Multivariable Calculus  - Integrals and Series}}

%font for name

\usepackage{pbsi}
The error says:

! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.43 }
|'''''''''''''''''''''''''''''''''''''''''''''''
| This is a fatal error: LaTeX will abort.
|...............................................
) ) )
Here is how much of TeX's memory you used:
8333 strings out of 493089
152185 string characters out of 6138425
186051 words of memory out of 5000000
11803 multiletter control sequences out of 15000+600000
3940 words of font info for 15 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
45i,1n,41p,10413b,87s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.
PDF statistics:
0 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

As you can see there is no fontspec package in the preamble and I don't know what's causing the error. I am compiling with PDF LaTeX + View PDF.

Note: In this document I am still using TeX Live 2015 but similar errors are being caused to the other documents that are run by 2016. But lets fix this one first as it is the most important project I am developing right now.

The complete log file
log_file.txt
(20.07 KiB) Downloaded 431 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Problem while compiling

Post by Johannes_B »

Package fontawesome is only usable with XeTeX or LuaTeX with TeX Live 2015. With a modern installation, the package can be used with pdflatex as well.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Problem while compiling

Post by Tolaso »

Hmm.. that is the preamble that ran before the update and everything was running properly ... I did not have any problem compiling the document ...

How would I proceed then now ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Problem while compiling

Post by Johannes_B »

Consider if you need package fontawesome. If you don't need it, put a percent sign at the very beginning of the line or remove the line completely.

If you do need it, you can manually update from CTAN -> fontawesome. But i don't know if there are other dependencies that may arise from that.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

Problem while compiling

Post by thomasb »

This works here :
  • Code: Select all

    \documentclass[11pt]{article}
    \usepackage{amsmath}
    \usepackage{amsfonts}
    \usepackage{amssymb}
    \usepackage{amsthm}
    \usepackage[lmargin=0.7cm, rmargin=1cm, vmargin=1.5cm]{geometry}
    \renewcommand{\qedsymbol}{$\blacklozenge$}
    \usepackage[english]{babel}
    \usepackage[utf8]{inputenc}
    \usepackage{eulervm}
    \usepackage{esint}
    \usepackage{fontawesome}
    \usepackage{fancyhdr}
    \pagestyle{fancy}
    \fancyhf{}
    \lhead{Mathematical Analysis ... }
    \chead{... \textit{A collection of problems}} 
    \rhead{Version 5}
    \cfoot{\thepage}
    \lfoot{Typesetting \LaTeX }
    \rfoot{\textbf{Editor:} Tolaso J. Kos}
    \renewcommand{\headrulewidth}{2pt}
    \renewcommand{\footrulewidth}{0.5pt}
    \usepackage{tcolorbox}
    \usepackage{tikz} 
    \usetikzlibrary{intersections,backgrounds}
    \usepackage[shortlabels]{enumitem}
    \usepackage{bigints}
    \usepackage{cancel}
    \usepackage{multicol}
    \setlength{\parskip}{\baselineskip}%
    \setlength{\parindent}{0.5pt}%
    \usepackage{xcolor}
    %definition of custom colours
    \definecolor{DarkRed}{RGB}{139,0,0}
    \definecolor{DarkBlue}{RGB}{102, 153, 255}
    \definecolor{LightBlue}{RGB}{51, 102, 255}
    \usepackage{hyperref}
    \hypersetup{colorlinks=true, linkbordercolor=DarkRed,linkcolor=green}
    %tasks option
    \setlist[enumerate]{wide = 0pt, leftmargin=*}
    \usepackage{tasks}
    \settasks{counter-format =(tsk[r]), label-align=right, label-width=1.75em, item-indent=-2em }
    %macro definition for arcot
    \DeclareMathOperator{\arccot}{{\rm arccot}}
    %definition of foonote using fontawesome
    \renewcommand{\thefootnote}{\faDatabase}
    %change qed symbol
    \renewcommand\qedsymbol{$\blacklozenge$}
    %allow page break equations
    \allowdisplaybreaks
    %macro definition for displaying text when no solution exists.
    \newcommand{\nosol}{\textit{Currently there is no solution for this exercise.}}
    %macro definition for editor note.
    \newcommand{\editornote}{\textit{The editor's solution is pretty ugly and is looking for a new one. Feel free to contribute by sending him one. Your solution shall be published in the very next booklet update.}}
    \newcommand{\sol}[1]{\textit{The following solution is due to #1 .}}
    \usepackage{afterpage}
    \makeatletter
    % Macro \changepagecolor has the same syntax as \pagecolor or \color
    % with an optional argument and a mandatory argument.
    \newcommand*{\changepagecolor}{%
      \@ifnextchar[\@changepagecolor@i\@changepagecolor@ii
    }
    % Case: \changepagecolor[...]{...}
    \def\@changepagecolor@i[#1]#2{%
      \@changepagecolor@do{[{#1}]{#2}}%
    }
    % Case: \changepagecolor{...}
    \newcommand*{\@changepagecolor@ii}[1]{%
      \@changepagecolor@do{{#1}}%
    }
    \newcommand*{\@changepagecolor@do}[1]{%
      % Fill the remaining space with a colored rule
      \begingroup
        \offinterlineskip
        \hbox to 0pt{%
          \kern-\paperwidth
          \vtop to 0pt{%
            \color#1%
            \hrule width 5\paperwidth height \paperheight
            \vss
          }%
          \hss
        }%
      \endgroup
    }
    \makeatother
    \usepackage{pagecolor}
    \usepackage{atbegshi} % for '\AtBeginShipout' macro
    % Make page color "light red" *after* page 2
    \AtBeginShipout{\ifnum\value{page}=1\pagecolor{white}\fi}
    %the title of this project
    \newcommand{\mytitle}{\textbf{Mathematical Analysis}}
    \newcommand{\mydescription}{\textbf{A collection of problems}}
    \newcommand{\mytiny}{\textbf{Real \&  Complex Analysis - General  Topology - Multivariable
        Calculus - Integrals and Series}} 
    %font for name
    \usepackage{pbsi}
    \begin{document}
    Text
    \end{document}
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Problem while compiling

Post by Tolaso »

Yeah it used to work on me too before ... what tl version do you have ?
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Problem while compiling

Post by Tolaso »

Johannes_B wrote:Consider if you need package fontawesome. If you don't need it, put a percent sign at the very beginning of the line or remove the line completely.

If you do need it, you can manually update from CTAN -> fontawesome. But i don't know if there are other dependencies that may arise from that.
The best for me right now is to update all packages running the command line ..!!

.... and one day get away from Windows for good !!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Problem while compiling

Post by Johannes_B »

Updating packages (especially by hand) can cause problems and your document might not compile anymore. This should be mentioned, especially if you are on a deadline.

Out of interest, what do you need package fontawesome for?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply