3:30 AM
My algorithm crossing the text area. How to bring it to the next page?
This thread helped a little bit, but it is increasing line spacing. How to reduce it?

2 hours later…
5:23 AM
@manetsus Do you use longtable? Is there a table on the same page?

1 hour later…
6:40 AM
@manetsus it's pointless just posting pictures of the output and asking people to debug some unseen (apart from some picture of a more or less unrelated fragment) input. make a complete small document that shows the problem and ask a question on site.
close voters: I see no reason to close a question off topic just because it mentions mathjax if the question and answer apply equally to latex — David Carlisle 8 hours ago

6:56 AM
@egreg Haha, just seen this now. :-)

7:18 AM
@wilx No, should I? I used breakablealgorithm
@DavidCarlisle I have done the same as in this answer. But it is giving more vertical space.

7:46 AM
@manetsus No. I mention it just because longtable might cause issues with floats on the same page as the table.

8:17 AM
@manetsus presumably you have something elsewhere messing with baselineskip (the text below the rule in your image is also spaced out)

1 hour later…
9:32 AM
@DavidCarlisle I have a \renewcommand{\baselinestretch}{1.5}  command for keeping the line distance 1.5 in general. But I do not want to follow this rule in algorithm.
I have added the following in the preamble:
\makeatletter
\newenvironment{breakablealgorithm}
{% \begin{breakablealgorithm}
\begin{center}
\refstepcounter{algorithm}% New algorithm
\hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
\renewcommand{\caption}[2][\relax]{% Make a new \caption
{\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%
\ifx\relax##1\relax % #1 is \relax
\else % #1 is not \relax

@manetsus well why say that now surely it's clear that's the reason just set it back to 1 locally. that's why posting images of unrelated code isn't helpful:-)
@manetsus the comment \ifx\relax##1\relax % #1 is \relax  is misleading, the intention is probably to check whether #1 is empty (although you are passing in \relax as the default, it's true.)

@DavidCarlisle should I remove this line? Note that, I do not know what I am doing, I just copied it from the thread mentioned above.

@manetsus no just comment doesn't really accurately describe what the code is doing

Oh, I see. Now, what should I do? This is my code in document (removed some portion from middle):
\begin{breakablealgorithm}
\caption{Indexing All Minimizers in Reference Running a Window of Length W in $O(n)$ }
\label{alg:mini_algo}
\begin{algorithmic}[1]
\Require bla bla bla.
\Ensure bla bla bla.
\Function{MinimizerIndexing}{$S, W, K$}
\Local{$bla bla bla$}

\State{sliding\_window.push\_back( \{minimizer, i-K+1\} )}
\If{$sliding\_window.front().minimizer not equal to prevmin$}
\If{$Map.count(sliding\_window.front().minimizer) = 0$}

9:48 AM
@manetsus what do you mean what should you do you just need to set baselinestretch back to 1 more or less anywhere in the definition you posted before, but again posting fragments is really unhelpful you should post complete documents and preferably as questions. asking here about 1-liners is Ok occasionally but this format doesn't really work for code debugging.

@Johannes_B Did you like the subtitle?

10:04 AM
@DavidCarlisle Oh, I am sorry. I just wanted to make the spacing as like before when I used \begin{algorithm}  instead of \begin{breakablealgorithm}  to make it consistent with other algorithms.

@manetsus yes as I say just define baselinestretch to be 1 anywhere in the start code of your environment (you presumably have that already for float environments)

10:33 AM
@DavidCarlisle Yes, saw that

Tell me, is it a common thing to all creative people that they are often absent-minded?

@DavidCarlisle What are you thinking?

10:51 AM
I am hungry!

@DavidCarlisle like \renewcommand{\baselinestretch}{1} in between \begin{breakablealgorithm} and \end{breakablealgorithm}?

@JosephWright I'm thinking that the implementation of l3fp would be simpler if it used lua's ieee arithmetic where possible:-)
@manetsus in the definition not in the use of that environment
@PauloCereda eat roast duck

11:07 AM
@DavidCarlisle oh no

@DavidCarlisle To some extent

@JosephWright well the common cases such as \tracingall \xxxeval{2.5*3.6} are likely to show logs of distinctly different lengths for the two implementations.

@PauloCereda @DavidCarlisle @JosephWright I read: "eat roast duck" -- "to some extent"

11:23 AM
@yo' :)

11:44 AM
@DavidCarlisle Sure

11:55 AM
@DavidCarlisle The approach in pgfplots is I think to pass everything straight through to Lua. That's fine for the case you suggest, but l3fp works like \numexpr and similar, and can expand registers. To do that you still need some TeX 'wrapper' code (certainly simplified ...)

12:14 PM
@DavidCarlisle Sorry, but I could not understand what did you mean by definition. In preamble?

12:34 PM
@manetsus you posted the definition earlier \newenvironment{breakablealgorithm} .... you can add it more or less anywhere in there eg just before \begin{center}
@JosephWright yes there were some comments about changed expansion behaviour in that pgf code (didn't follow the details but looked like any difference could have been avoided if they wanted to avoid them)

@DavidCarlisle Indeed: it's a question of what's desirable. I think that being able to write expressions that do deal with registers is probably desirable.

@JosephWright yes agreed makes sense to handle the tex stuff in tex, but whether it makes sense to re-implement ieee arithmetic in tex if you have lua doubles available so you'd end up with some lightweight pre-expansion step probably (more or less just sticking \the in front of registers and expanding to get a lua double expression to pass to lua (with details to be filled in later....)

@DavidCarlisle Yes, sure: I've wondered about this. If you go Lua-only there is an argument 'don't bother, just tell people to use \directlua', but at the same time at the document level it is handy to be able to use the same syntax ideas as for integer cases (where \numexpr probably remains sensible)/lengths (\dimexpr or nothing)
@DavidCarlisle Back to 'have you looked at Frank's edit for L3 News' :)
@DavidCarlisle One might also wonder about \numexpr and the division truncation/rounding question

1:35 PM
@JosephWright no, been looking at C :-)

ConTeXt has paranormal bugs.

1:56 PM
@egreg @PauloCereda @JosephWright The moment when the professor writes to the teachers: "Finished Chapter 4 in the lecture, you can teach it now" at the same moment when you finished teaching Chapter 4.

@yo' You can start guessing what chapter 5 will eventually deal with.

@egreg I know the syllabus. I also know that if I'm not faster than the lectures, I can't finish all the necessary teaching before the first midterm. Which means that not only I'm faster than the lectures, but I also occasionally substitute them.

@egreg What i write might be a pain to read for most people. I believe you.

2:50 PM
So I know what I will do this evening, my next mini-project: Enforce basic Czech typography rules in HTML text through JavaScript. :)

1 hour later…

2 hours later…
6:09 PM
@TorbjørnT. Response by people who actually know Word to people blaming Word for their troubles: You aren't doing it right. Have a look at the manual. Sounds familiar.

@Johannes_B Very much so.

2 hours later…
7:50 PM
Morning

@Canageek well it's not the morning, but hello:-)

OH, so it isn't.
>.>

@Canageek What time is it at your place? :-)

@Johannes_B 12:54 pm
@DavidCarlisle That WOULD explain why I've had lunch

@Canageek and your clock is 8 hours out (unless the world is round)

7:55 PM
Now the interesting part of editing: converting the PDF to word, then figuring out if the red underlines are mistakes, Canadian English that it doesn't know, or chemistry terms it doesn't know
opens up the OED, as there is no such thing as a good Canadian English dictionary

@Canageek use OED for A-M and Merriam-Webster for N-Z?

@Canageek Morning is over ;-)

1 hour later…
9:23 PM
@DavidCarlisle Colour and theater?

9:34 PM
@egreg seems reasonable to me

@DavidCarlisle If you divide A-L and M-Z, you'd have litre and meter.

@egreg could be an option in siunitx

@DavidCarlisle \sisetup{suffix=random}

1 hour later…
10:58 PM
@egreg ....I hate to say this, but that is how they are normally spelled in Canada.
@egreg I mean, you also see liter, but it is less common then litre I think.