2

I am trying to create a beamer presentation on TeXMaker and the problem that I'm having is that if I try to insert any type of equation into the presentation or just anything requiring $$, for example $x^2$, TeXMaker will fail to compile the presentation. Is there something in the preamble I'm missing?

Currently I have:

\documentclass[12pt]{beamer}
\usetheme{Warsaw}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{movie15}
\usepackage{hyperref}
%\usepackage{flashmovie}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{epstopdf}
\author{...}
\title{}
%\setbeamercovered{transparent} 
%\setbeamertemplate{navigation symbols}{} 
%\logo{} 
\institute{...}
%\date{} 
%\subject{} 
\setbeamercovered{transparent} 
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}{title}
$x$
\end{frame}
\end{document}

and I thought amsmath was the main thing I should have to allow math mode?

Thanks!

JSmith
  • 21
  • 2
    Welcome to TeX.SX! In principle, amsmath is not needed for math mode at all, but it's recommendable to use it. Concerning your issue: You've provided a fragment of code, but this does not help to solve it. The relevant code is invisible for us –  May 31 '16 at 16:39
  • 1
    We really need a complete MWE, as your code fragment together with a basic documents, works fine:\documentclass{beamer}

    \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{movie15} \usepackage{hyperref} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf}

    \begin{document}

    \begin{frame} $x^2$ \end{frame}

    \end{document}

    – samcarter_is_at_topanswers.xyz May 31 '16 at 16:42
  • I've edited it so it now includes everything before \begin{document}. If this is still not sufficient can you specify exactly what you need me to include? Also what is a complete MWE? Thanks. – JSmith May 31 '16 at 16:47
  • Still works perfectly fine. Can you add a frame which shows the problem? – samcarter_is_at_topanswers.xyz May 31 '16 at 16:47
  • A minimal working example (MWE) is the shortest program, which demonstrates your problem. It should start with \documentclass and end with \end{document}. – samcarter_is_at_topanswers.xyz May 31 '16 at 16:48
  • I've edited it to include an example that doesn't work for me. If I remove the $ on both sides of the x then it works perfectly fine. – JSmith May 31 '16 at 16:53
  • If I remove the strange • character in the frametitle and add \begin{document} and \end{document} its works for me – samcarter_is_at_topanswers.xyz May 31 '16 at 16:55
  • Oh yes my bad I've edited it to include \begin{document} and \end{document} but it still doesn't seem to work even if I change the frame title as shown above. Maybe it's my copy of TeXMaker that's the problem and I need to reinstall it completely. – JSmith May 31 '16 at 16:59
  • TeXmaker has nothing to do with it, its just an editor. A few questions: 1) What error message do you get? 2) how do you compile? e.g. latex, pdflatex or something else? 3) which tex distribution do you have? 4) have you tried to delete the auxiliary files and compile again? – samcarter_is_at_topanswers.xyz May 31 '16 at 17:01
  • 1)Font shape OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted and Size substitutions with differences(Font) up to 1.0pt have occurred.. 2) latex, 3) MikTex 2.9, 4) I have't tried this and I guess this is probably the best way forward, I just don't understand why it only fails to work on a beamer presentation though. If I try math mode on a standard latex document it works perfectly fine. – JSmith May 31 '16 at 17:11
  • 1
    That's just a warning, either ignore it or disable it with \let\Tiny=\tiny. If you use latex with beamer you have to be careful how you transform the .dvi file to .pdf. Can you try pdflatex? – samcarter_is_at_topanswers.xyz May 31 '16 at 17:13
  • It still doesn't seem to work. I think I'm going to have to try 4) as you suggested. Thanks. – JSmith May 31 '16 at 17:40
  • Don't load hyperrefas Beamer already loads it. Don't load epstopdf. You are making 4 sound like a nuclear option: it is not. It is just a question of cleaning up the working directory so that LaTeX generates new auxiliary files when you compile. – cfr Jun 01 '16 at 00:31
  • @JSmith Do you get any ouput files (pdf or dvi)? Do get get any error messages? – samcarter_is_at_topanswers.xyz Jun 01 '16 at 08:59
  • I do get output files but if I try to open the pdf output it says that it's corrupt and cannot be repaired. – JSmith Jun 01 '16 at 14:22
  • @JSmith Is your Tex distribution up to date? I am using TeXlive 2015. Otherwise I am out of ideas. [And if you answer, please ping me with an @ before my name - like this I will get a notification] – samcarter_is_at_topanswers.xyz Jun 01 '16 at 18:33
  • @samcarter I don't think it's the latest one since I installed it 2 years ago. I'll update it and see if this solves the problem. Thanks. – JSmith Jun 02 '16 at 13:17
  • @JSmith Can you compile a very basic documents, let's say \documentclass{beamer} \begin{document} \begin{frame}{title} $x$ \end{frame} \end{document} – samcarter_is_at_topanswers.xyz Jun 02 '16 at 13:22
  • @samcarter Nope I can't even do that. If I try to add anything that requires $$ then it will fail to compile. If it's just plain text with no equations etc.then it will compile just fine. – JSmith Jun 02 '16 at 13:55
  • 1
    @samcarter I think I've finally figured out the problem. It's to do with MikTeX's font maps apparantly. If I add \usepackage{sansmathaccent} and \pdfmapfile{+sansmathaccent.map} into my document's preamble it will compile just fine. The only problem is fixing it since I cannot seem to run initexmf.exe file required to fix it. – JSmith Jun 02 '16 at 14:15
  • @JSmith That sounds rather wired. Maybe you can increase your changes by editing your question to include your latest findings. Hopefully some MikTeX user comes across this question. – samcarter_is_at_topanswers.xyz Jun 02 '16 at 17:48
  • @JSmith I asked in chat, see http://chat.stackexchange.com/transcript/message/30084015#30084015 – samcarter_is_at_topanswers.xyz Jun 03 '16 at 09:51
  • @samcarter Apologies for the late reply, it's been quite busy for me in the last couple of days and yes that does seem to be the problem. I have tried to fix it using what other users suggested but it still doesn't seem to work properly. In this link: http://tex.stackexchange.com/questions/133781/font-display-error-in-windows they suggested running the exe file initexmf but I cannot seem to open it. Everytime I try to open it, it closes straight away. – JSmith Jun 06 '16 at 12:29

0 Answers0