I used to insert section labels right after the heading:
1. Some heading[sec:Some-heading]
This is actually how it is done in the User Guide as well. However, this
produces the following source:
\section{Some heading\label{sec:Some-heading}}
But it actually leads to problems when I tried to have uppercase section
headings with:
\usepackage{sectsty}
\sectionfont{\MakeUppercase}
I guess the error occurs for the same reason as
\MakeUppercase{\label{sec:Some-heading}} generates an error.
So I looked around and saw that often the label is inserted *after* the
section:
\section{Some heading}\label{sec:Some-heading}
But I am not sure how to achieve this with LyX. So instead I did this:
1. Some heading
[sec:Some-heading]
Where the label is just inserted in an extra default paragraph. Apart
from looking a bit odd, it seems to work and not to create extra spacing
or so. So is this the "saver" way to insert section labels in LyX?
Daniel