## LaTeX forum ⇒ General ⇒ Strange latex error under Linux for code that compiles under FreeBSD Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
bourne_identity
Posts: 4
Joined: Wed Jul 25, 2018 9:02 pm

### Strange latex error under Linux for code that compiles under FreeBSD

Hi,

I recently wrote a 500-page manuscript in Latex under FreeBSD. Latex worked very nicely for me.

Trying to compile the same code under Linux (Mint 19, amd64) leads to a perplexing problem.

Wherever my code uses the directive \section*{} , the latex compilation fails with the message:

! LaTeX Error: There's no line here to end.

Here is the first of those instances (in preface.tex) for a sample:

\section*{Preface}

Changing the directive to \section{Preface} makes the compilation succeed.

Can anyone please give me tips on what might be causing this strange problem ?

Thank you.
Manish Jain

Johannes_B
Site Moderator
Posts: 3933
Joined: Thu Nov 01, 2012 4:08 pm
Package titlesec out of date. Make an update of all packages.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bourne_identity
Posts: 4
Joined: Wed Jul 25, 2018 9:02 pm

You mean to say I should upgrade the package texlive-latex-recommended under Linux (Mint 19 amd64) ?

Yesterday I deleted all texlive/latex packages under Linux and reinstalled them from scratch. The problem did not go away.

Manish Jain

Stefan Kottwitz
Posts: 9244
Joined: Mon Mar 10, 2008 9:44 pm
How are you using TeX Live with FreeBSD? From BSD repositories, or did you install it over the Internet?

The TeX version over the Internet is the newest. Some Linux versions are very behind with their texlive versions. For example, fictional, a Linux Mint could base on Ubuntu of 2017 that bases on Debian of 2016 that uses TeX Live 2015...

On Ubuntu I don't install TeX over the repositories. I download and install TeX Live over the Internet.

Stefan

bourne_identity
Posts: 4
Joined: Wed Jul 25, 2018 9:02 pm
Hi Stefan,

So nice to hear from you. I suppose you are the famous Latex author.

Yes, I installed Latex packages under FreeBSD as well as Linux from distribution repos, not over the internet.

My Latex runs very well under FreeBSD. Under Linux (Mint 19 / Mint 18.3 / Manjaro 17 virtual machine), I get exactly the same error : "no line here to end" for each instance of \section*{}

I tar'red the .tex files on my Manjaro VM, and diff-ed and cmp-ed with FreeBSD .tex files. The .tex files are exactly the same. Pretty baffling !

I will perhaps try compiling with Latex under a Windows VM, and see how things go therein.

Of course, if anyone has any ideas for things for me to try, I will be happy to hear.

Thanks
Manish Jain

Stefan Kottwitz
Posts: 9244
Joined: Mon Mar 10, 2008 9:44 pm
Perhaps post your code here, at least a minimal example that brings that error message (small document with dummy section/text and your preamble). So we could test it on our system. Maybe there's even an obvious syntax issue because of \\ in s heading or in the heading definition. You could also post your .log file here, as attachment. The Attachments link is below the text edit field, when writing a post.

Stefan

bourne_identity
Posts: 4
Joined: Wed Jul 25, 2018 9:02 pm
Hi Stefan / others,

I traced the problem down : - )

I was implementing using \titleformat incorrectly - with scope for a subtle error, which for some reason does not show up on FreeBSD. My \titleformat macro had an excess newline.

Now my code works equally on FreeBSD / Linux / Windows.

Tx all.
Manish Jain