LaTeX forum ⇒ GeneralStrange 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

Postby bourne_identity » Wed Jul 25, 2018 9:15 pm

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

User avatar
Johannes_B
Site Moderator
Posts: 3803
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Jul 26, 2018 12:06 am

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

Postby bourne_identity » Thu Jul 26, 2018 6:59 am

Tx for replying.

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 8979
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Jul 26, 2018 1:42 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
Site admin

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

Postby bourne_identity » Thu Jul 26, 2018 2:04 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

User avatar
Stefan Kottwitz
Site Admin
Posts: 8979
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Jul 26, 2018 5:13 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
Site admin

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

Postby bourne_identity » Thu Jul 26, 2018 7:51 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


Return to “General”

Who is online

Users browsing this forum: Majestic-12 [Bot], marcocintra and 9 guests