Generalmissing number inserted \hfil

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Gertian
Posts: 7
Joined: Thu Oct 25, 2012 12:48 am

missing number inserted \hfil

Post by Gertian »

Hi there,

I have an error that keeps showing up when I try to compile my docuement...
Here are my loaded packaged

Code: Select all

\documentclass[10pt,a4paper,twoside]{article}
\usepackage[dutch]{babel}
\usepackage{amsmath,amssymb,amsfonts,textcomp}
\usepackage{graphicx}
\usepackage{float,flafter}
\usepackage{inputenc}
\usepackage[small,bf,hang]{caption}
\usepackage{fancyhdr}
\usepackage{multirow}
\pagenumbering{Arabic}
\setlength\paperwidth{20.999cm}\setlength\paperheight{29.699cm}\setlength\voffset{-1in}\setlength\hoffset{-1in}\setlength\topmargin{1.499cm}\setlength\headheight{12pt}\setlength\headsep{0cm}\setlength\footskip{1.131cm}\setlength\textheight{25cm}
\setlength\oddsidemargin{2.499cm}\setlength\textwidth{15.999cm}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\begin{document}
\begin{center}
The error message i get when i try to compile this is the following :

Code: Select all

! Missing number, treated as zero.
<to be read again>
\hfil
l.52
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
[1
]
Overfull \hbox (41.46872pt too wide) in paragraph at lines 69--82
[]
[]
! Missing number, treated as zero.
<to be read again>
\hfil
l.115 N
u wordt het gemiddelde berekend van de twee tophoeken uit methode 1 e...
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
[2]
! Missing number, treated as zero.
<to be read again>
\hfil
l.170
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
[3]
Overfull \hbox (2.80354pt too wide) in paragraph at lines 176--177
[]\OT1/cmr/bx/n/10 Nu wordt de brek-ingsin-dex op de cor-recte nauwkeurigheid a
fgerond. De de-fen-i-tieve uitkomst
[]
! Missing number, treated as zero.
<to be read again>
\hfil
l.187 \end{document}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
[4] (./Goniometer.aux) )
I will upload the regions around the errors in the following part of my post, personally I guess that I am making the same fault time after time but I really cant find it, (btw I am using Texmaker)

Code: Select all

\section{Meetresultaten}
De metingen van de goniometer zijn allemaal in graden, minuten en seconden. Aangezien dit geen Si-eenheid is worden deze in de tabellen en in de verdere verwerking van de gegevens allemaal weergegeven in radialen. Bij de bespreking van het rapport worden er benaderende waarden van de hoeken in graden weergegeven aangezien deze "leesbaarder"' zijn.

Om de nauwkeurigheid van 30" niet te veranderen wordt de volgende redenering gemaakt : 
\begin{equation}
\label{nauwkeurigheid}
\frac{30"}{360^{\circ}} = \frac{gezochte nauwkeurigheid^r}{2\pi^r} \leftrightarrow \frac{30"2\pi^r}{360^{\circ}} = gezochte nauwkeurigheid^r
\end{equation}

Code: Select all

\subsection {berekening van de gemiddelde tophoek}

De twee bekomen waarden voor de tophoek liggen binnen elkaars fouteninterval, ze zijn dus compatibel.

Nu wordt het gemiddelde berekend van de twee tophoeken uit methode 1 en 2. Er wordt opnieuw een sf op dit gemmidelde berekend, de uitgekomen waarde zal in het verdere verloop van dit verslag gebruikt worden als tophoek van het prisma. Dit heeft het volgende resultaat :
$\overline{tophoek}=\delta=0.3351\pi^{rad} \pm 0.0056^\pi{rad} $ de tophoek heeft dus een relatieve fout van $0.017$.
De fout wordt hier opnieuw bepaald door $3*sf$.

Code: Select all

\begin{equation}
\label{formule brekingsindex}
n=\frac{\sin{\frac{\theta+\delta}{2}}}{\sin{\frac{\delta}{2}}}
\end{equation}
De brekingsindex van het glas is dus $=1.515774165$, dit is natuurlijk een onafgeronder waarde, om de juiste afronding te bepalen moet eerst de fout gezocht worden. Aangezien de formule voor de brekingsindex een functie is wordt er met foutenpropagatie door functies gewerkt. De berekening van de fout wordt berekend in vergelijking \ref{foutenpropagatie}

\begin{equation}
\label{foutenpropagatie}
Af(n) = \left|\frac{\frac{\sin{\frac{(0.216+0.022+0.3351+0.0056)\pi^{rad}}{2}}}{\sin{\frac{(0.3351+0.0056)\pi^{rad}}{2}}}-\frac{\sin{\frac{(0.216-0.022+0.3351-0.0056)\pi^{rad}}{2}}}{\sin{\frac{(0.3351-0.0056)\pi^{rad}}{2}}}}{2}\right| = 0.19
\end{equation}

Code: Select all

\section{Besluit}
De brekingsindex van de onbekende glassoort is $n=1.52 \pm0.19$, dit is een acceptabele waarde. Er zijn geen gegevens gemeten die vroegere experimenten tegenspraken, dit experiment bevestigd enkel reeds bekende gegevens.
\end{document}
Hopefully somebody can help me out here...

Best regards Gertian
Last edited by cgnieder on Sat Oct 27, 2012 5:34 pm, edited 1 time in total.

Recommended reading 2024:

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

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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

missing number inserted \hfil

Post by cgnieder »

Would you mind instead of giving us 5 code snippets creating 1 Infominimal working example (MWE), so that we can copy and paste it at once? If you don't know what an MWE is please follow the link.

The log file says the error must be caused by something in line 52 of your code. That's where I'd start looking.

Regards
site moderator & package author
User avatar
Stefan Kottwitz
Site Admin
Posts: 10347
Joined: Mon Mar 10, 2008 9:44 pm

missing number inserted \hfil

Post by Stefan Kottwitz »

Hi Gertian,

write Arabic in lower case for page numbering:

Code: Select all

\pagenumbering{arabic}
Using uppercase brings that error. Anyway have a look at Clemens' link. It will help you next time even if it may be solved now.

Stefan
LaTeX.org admin
Gertian
Posts: 7
Joined: Thu Oct 25, 2012 12:48 am

Re: missing number inserted \hfil

Post by Gertian »

hmm,

If using uppercase causes the error, how can I use uppercase without causing that error...
I really need to use it :/

And I know what an mwe is, but how on earth can I make a mwe of my document if I dont know what causes the error I cant make an mwe with the error in it can I?

And thanks for the answers :)

*that was stupid, tried it after I typed it and seemed your post was the answer...
Thanks a lot for what you guys have done! I appreciate it, and even dough you might think that I am not trying hard enough to solve the problem, please trust me I am...
I have been working over 30 hours on Latex this week (all the time I have spare besides studieing other courses...) and that is all the experience I have...

But slowly I am getting vision of the point of the program and that is becouse of people like you guys!

So thanks a lot! :)
Last edited by Gertian on Sat Oct 27, 2012 11:29 pm, edited 1 time in total.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

missing number inserted \hfil

Post by cgnieder »

You used

Code: Select all

\pagenumbering{Arabic}
instead of

Code: Select all

\pagenumbering{arabic}
and in this specific case you can't use uppercase, because the Arabic format doesn't exist.

I have a feeling that you didn't read the link I provided. The whole point of creating an MWE is tracking down the source of the error. This is done but subsequently removing code until the error disappears so one knows that the error is in the last part one removed.

Regards
site moderator & package author
Post Reply