Theses, Books, Title pages\sum doesn't work when placing in this template

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

\sum doesn't work when placing in this template

Post by templateuser »

Hi Vel,

I have an equation as follows:

Code: Select all

\begin{equation}
W_w(x)‎ ‎=‎ ‎‎\sum_{i=1}^{n‎} {w_ix_{[i]}}
\end{equation}
It works perfectly when i test it in a single file. However, if i place the equation in my chapter 1 and add the package in Thesis.tex (\usepackage{amsmath}), Latex got an error "Package inputenc Error: Unicode char \u8:‎ not set up for use with LaTeX." For me, Latex error doesn't provide helpful info. I don't know what is going wrong with the equation. I hope you will give me some explain. Thanks.

yellow_tulip_84

Recommended reading 2024:

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

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

User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

\sum doesn't work when placing in this template

Post by Vel »

Hey,

It looks like you have invisible "no-break space" characters in that equation. They don't show up in a text editor except when you press backspace and the cursor doesn't move back, meaning that it has erased one of these invisible characters. See here for a better explanation: http://tex.stackexchange.com/questions/ ... with-latex

The fix is to either remove them, which I have done for you so you can just copy/paste this in:

Code: Select all

\begin{equation}
W_w(x) = \sum_{i=1}^{n}{w_ix_{[i]}}
\end{equation}
or, if you want to keep these characters in, just go into Thesis.cls and change:

\RequirePackage[utf8]{inputenc}

to

\RequirePackage[utf8x]{inputenc}

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: \sum doesn't work when placing in this template

Post by templateuser »

Thanks Vel alot. Your suggestion work out perfectly. You just make my day brighter :)
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Re: \sum doesn't work when placing in this template

Post by Vel »

No problem! :)
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
Post Reply