I use the following code

   \mid H(j\omega) \mid = \frac{\omega CR}{\sqrt{1+(\omega CR)^2}}
   \angle H = 90^o - arctan(\omega CR)

However I get 5 errors

  1. Extra \else
  2. Missing \endcsname inserted
  3. Incomplete \iffalse; all text was ignored after line 329 (This is line "\begin{equation}")
  4. Emergency stop
  5. Fatal Error occurred; no output pdf file produced.

I already use amsmath in my preamble.

My minimal Example is

   \lvert H(j\omega) \rvert = \frac{\omega CR}{\sqrt{1+(\omega CR)^2}}
 \angle H = 90^\circ - \arctan(\omega CR)


Typing the aforementioned code produces no error. So I believe that there must be sth wrong in the preamble, which is

\usepackage{framed} % ãéá ãêñé background ðßóù áðü êÜðïéá paragraphs
 %\usepackage[twoside,pdftex,total={16.4cm,24cm}, left=2.9cm, top=3.2cm, headsep=1.4cm]            {geometry}
%\usepackage[top=3.2cm, bottom=3.4cm, left=2.9cm, right=2.9cm,headsep=0.8cm]{geometry}

%\lstset{ %
%language=matlab,                % choose the language of the code
%basicstyle=\footnotesize,       % the size of the fonts that are used for the code
%numbers=left,                   % where to put the line-numbers
%numberstyle=\footnotesize,      % the size of the fonts that are used for the line-     numbers
%stepnumber=1,                   % the step between two line-numbers. If it is 1 each    line will be numbered
%numbersep=5pt,                  % how far the line-numbers are from the code
%backgroundcolor=\color{white},  % choose the background color. You must add     \usepackage{color}
%showspaces=false,               % show spaces adding particular underscores
%showstringspaces=false,         % underline spaces within strings
%showtabs=false,                 % show tabs within strings adding particular    underscores
%frame=single,           % adds a frame around the code
%tabsize=2,          % sets default tabsize to 2 spaces
%captionpos=b,           % sets the caption-position to bottom
%breaklines=true,        % sets automatic line breaking
%breakatwhitespace=false,    % sets if automatic breaks should only happen at   whitespace
%escapeinside={\%*}{*)}          % if you want to add a comment within your code
    prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},


\definecolor{mygray}{gray}{.75}%{.9, .9, .9}
\definecolor{lightgray}{gray}{.8}%{.9, .9, .9}
\definecolor{shadecolor}{gray}{.90} %gia framed package
%\definecolor{mygray}{rgb}{.9, .9, .9} %enallaktika !! anti gia panw

%\renewcommand{\topfraction}{0.85}%gia na min uparxoun 2 figures se mia selida kai   tipota allo

\newcommand{\kai}{\quad \text{êáé} \quad}
\newcommand{\kkai}{\qquad \text{êáé} \qquad}



\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{} % delete current setting for header and footer
\addtolength{\headheight}{0.5pt} % make space for the rule      %Ôï ÷ù ïñßóåé 0.8 áð ôï  package
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line}


\parskip 3mm
\footskip = 15mm
  • 1
    Welcome to TeX.sx! Copy-pasting your code snippet into a compilable example yields no error for me, so you must be doing something different. Therefore, please add a minimal working example (MWE) that illustrates your problem. – lockstep Dec 17 '11 at 10:57
  • This works for me too, simply with amsmath and the article class, nothing more. Btw. I recommend writing \arctan as operator, and using \circ instead of o. – Stefan Kottwitz Dec 17 '11 at 10:58
  • The preamble does not seem to have problems (but it's not that pretty). The problem seems to be on the text that precedes the subequations environment. – egreg Dec 17 '11 at 12:18
  • Since I erased \usepackage{hyperref} it works! However I need this package... – Thanos Dec 17 '11 at 12:25
  • @Thanos: Does moving \usepackage{hyperref} towards the end of your preamble work? Since hyperref redefines a large number of standard LaTeX macros, it should usually be loaded last to maintain its usage. – Werner Dec 17 '11 at 22:01

I don't get any errors from that snippet, so the problem is somewhere else before that. The code can be improved:

   \lvert H(j\omega) \rvert = \frac{\omega CR}{\sqrt{1+(\omega CR)^2}}
   \angle H = 90^\circ - \arctan(\omega CR)

Notice that \mid is not to be used for absolute value; the "degree" symbol is better typeset with ^\circ and math operators such as "arctan" have their command.

Don't use two consecutive math environments: amsmath provides many environments for this purpose, in this case gather is appropriate.

| improve this answer | |
  • @Thanos Please, add to your question rather than in comments that are of limited size. – egreg Dec 17 '11 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.