GeneralSeveral warnings in this small code. Why ?

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Several warnings in this small code. Why ?

Post by Johannes_B »

A blank line denotes a paragraph. You don't want paragraphs in tables or equations. In fact, those are the only places you really need \\ (though spacing seems strange here).

Using a double backslash in a list isn't a big deal either. You just shouldn't use it in regular text.

All i saw was your log file, i don't know how/why the warning was created. I just pointed out the most common mistake a beginner makes.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

So just to be sure : you suggest that I could use the \\ inside tables, equations and lists, but not in text, right ?

If so, I don't understand the nag warnings (about the \rm, which I never use). I don't use the \\ in the text itself, only in equations/tables/list.

EDIT : I'm getting a total of 10 (+1 ?) nag warnings, like this one :
Package nag Warning: Command \rm is an old LaTeX 2.09 command.
(nag) Use \rmfamily or \textrm instead on input line 141.
Yet, line 141 is the end of that code :

Code: Select all

\begin{equation}
	\label{définition du grandissement}
	m = \frac{\tensor{y}{_{\mathcal{I}}}}{\tensor{y}{_{\mathcal{O}}}}.
\end{equation}
So what is wrong here ? I never encountered these nag warnings before.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Several warnings in this small code. Why ?

Post by Johannes_B »

You are using package fancyhdr, which used those old font commands even twenty years after they were deprecated. It got updated. You won't get those warning with an updated version.

By the way, you should avoid non-ascii charackters in labels and refs. They can work, but they don't have to based on the way LaTeX works with them.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

Johannes_B wrote:You are using package fancyhdr, which used those old font commands even twenty years after they were deprecated. It got updated. You won't get those warning with an updated version.
That's what I was suspecting. I'll then update my LaTeX installation. Thanks for the info. I hope it wont get me in troubles with other codes I have done.
Johannes_B wrote: By the way, you should avoid non-ascii charackters in labels and refs. They can work, but they don't have to based on the way LaTeX works with them.
Hmm. Then I may have lots of work to fix that. :x
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Several warnings in this small code. Why ?

Post by Johannes_B »

I know you have docuents, a lot. Many of them with manual spacing and all kinds of manual tweaking.

As written above, there is a pretty high chance that your documents won't compile as expected.
The LaTeX kernel itself got some important updates and changes. (Though the team is trying very hard to not break anything, it happens).

I would not uninstall TeX Live 2015, if i were you.

You can install a separate version of TeX Live (though i would really wait till 2017 is ready in may or june), you can also try it out on a virtual machine.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

Johannes_B wrote: You can install a separate version of TeX Live (though i would really wait till 2017 is ready in may or june), you can also try it out on a virtual machine.
I have two computers, each with its own LaTeX installation. On both computers, I can select a different version of LaTeX, from 2010, 2010-64bit, 2011 and 2015. I'll wait for the 2017 version, as you suggest.

Despite the pesky nag warnings in this only document I'm working on since 3 days, I think everything is fine. The output is really beautifull, and I don't see any glitch. 8-)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Several warnings in this small code. Why ?

Post by Stefan Kottwitz »

The 2015 version of fancyhdr has this line:

\fancyfoot[c]{\rm\thepage}

As Johannes said, that's the cause of the \rm warning.

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Several warnings in this small code. Why ?

Post by Cham »

It's a bit weird that a package from 2015 is using some old commands like this.

For the moment, I can ignore the warning, until I upgrade LaTeX. The document is compiling fine and the output is perfect.
Post Reply