I'm seeking for automatic line breaking of math expressions (the example bellow), best recommended option seems breqn
package. After MikTeX installed mh packages, MikTeX cannot build an output (I use TeXnic Center editor) (the text content is shortened):
\documentclass[a4paper,fleqn,leqno]{article}
\usepackage[utf8]{inputenc}
\usepackage[czech]{babel}
\usepackage[IL2]{fontenc}
\usepackage{color}
\usepackage[top=1.5in, bottom=1.5in, left=1in, right=1in]{geometry}
\usepackage{hyperref}
\usepackage{tikz}
\usepackage{amsmath,breqn}
\usepackage[fontsize=12]{scrextend}
\DeclareMathSizes{12}{16}{16}{16}
\pagestyle{headings}
\linespread{1}
\hypersetup{colorlinks=true,linkcolor=black,pdfnewwindow=true,urlcolor=blue}
\begin{document}
\section{Nadpis}\label{sec:nadpisa}
Text pod nadpisem.
\subsection{Podnadpis}\label{sec:podnadpisa}
Text pod podnadpisem.
\subsubsection{Podpodnadpis}\label{sec:podpodnadpisa}
Text pod podpodnadpisem.
\begin{multline}
t_{2}x_{1}cos\alpha+t_{2}y_{1}sin\alpha+t_{2}z_{1}sin\gamma cos\alpha-t_{2}z_{1}sin\alpha sin\beta-t_{3}x_{1}cos\alpha-t_{3}y_{1}sin\alpha-t_{3}z_{1}sin\gamma cos\alpha+t_{3}z_{1}sin\alpha sin\beta-t_{1}x_{2}cos\alpha-t_{1}y_{2}sin\alpha-t_{1}z_{2}sin\gamma cos\alpha+t_{1}z_{2}sin\alpha sin\beta+ t_{1}x_{3}cos\alpha+t_{1}y_{3}sin\alpha+t_{1}z_{3}sin\gamma cos\alpha-t_{1}z_{3}sin\alpha sin\beta+ t_{3}x_{2}cos\alpha+t_{3}y_{2}sin\alpha+t_{3}z_{2}sin\gamma cos\alpha-t_{3}z_{2}sin\alpha sin\beta- t_{2}x_{3}cos\alpha-t_{2}y_{3}sin\alpha-t_{2}z_{3}sin\gamma cos\alpha+t_{2}z_{3}sin\alpha sin\beta
\end{multline}
\end{document}
It freezes displaying:
without pdf output.
After excluding
breqn
package the error disappear.
After excluding \usepackage[IL2]{fontenc}
it freezes three lines before:
showing the same error. Is there any solution without rewriting the whole content?
dmath
environment should be used, notmultline
. Also,hyperref
should be loaded last. And the\DeclareMathSizes
line doesn't make any sense. – egreg May 23 '14 at 16:07