Math & Sciencemissplaced text in a long algorithm

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

missplaced text in a long algorithm

Post by NELLLY »

Hello, I have a long algorithm to put in my report. There is a text before the beginning of it. I used the following code

Code: Select all

Code, edit and compile here:
\documentclass{report}
\usepackage{minitoc}
\usepackage{nomencl}
\usepackage{glossaries}
\usepackage[pdftex]{graphicx} % to insert PostScript figures
\usepackage{rotating}
\usepackage{footnote} % for sideways tables/figures
\usepackage{siunitx,amsmath,geometry}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage[chapter]{algorithm}
\usepackage{algorithmicx,tabularx}
%\usepackage{algorithmicx,tabularx}
\usepackage{rotating,multirow}
\usepackage[format=hang]{caption}
\usepackage{fancybox}
\usepackage{fancyhdr}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{float,array}
\usepackage{algcompatible,enumitem}
\usepackage[compatible]{algpseudocode}
\usepackage{xcolor,colortbl,threeparttable}
\usepackage{filecontents,pgfplotstable,mathtools}
%\usepackage[round]{natbib}
\floatstyle{boxed}
\renewcommand{\baselinestretch}{1.5}
\setlength{\evensidemargin}{3.5cm}
\setlength{\textwidth}{6in}%6 inc
\setlength{\textheight}{8.9in}
\setlength{\topmargin}{-0.6in}
\setlength{\topmargin}{-0.2in}
\setlength{\headsep}{.4in}
\setlength{\footnotesep}{.2in}
\setlength{\parindent}{0.5cm}
%\nofiles
\hyphenpenalty 10000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\let\OldStatex\Statex
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
By doing so, I got some text betwwen the different parts of the algorithms. I tried to use \begin{algorithm}[H] in the two parts break of the algorithm, there is no text betwwen them however I got an extra horizontal line at the beginning of them.
Is there a solution?

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
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: missplaced text in a long algorithm

Post by Johannes_B »

Better place huge algorithms like that into the appendix.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply