Benjamin-Loison / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
0 stars 0 forks source link

Automatically create labels for sections #3

Closed Benjamin-Loison closed 7 months ago

Benjamin-Loison commented 7 months ago

https://tex.stackexchange.com/q/323420

Brief outline of the enhancement

LaTeX2e generally cannot add new features without an extreme amount of care to accommodate backwards compatibility. Please do not be offended if your request is closed for being infeasible.

Minimal example showing the current behaviour

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\documentclass{article}

  % Any preamble code goes here

\begin{document}

  % Demonstration of issue here

\end{document}

Minimal example showing the desired new behaviour

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\documentclass{article}

  % Any preamble code goes here

\begin{document}

  % Demonstration of issue here

\end{document}
Benjamin-Loison commented 7 months ago

While:

\let\oldsubsection\subsection
\renewcommand{\subsection}[1]{\oldsubsection{#1}\label{subsection:#1}}

has a weird syntax highlighting in Kile notably, it seems to work correctly.