Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Incompatible with titlesec #16

Open
tobiasBora opened this issue Nov 5, 2024 · 0 comments
Open

[BUG] Incompatible with titlesec #16

tobiasBora opened this issue Nov 5, 2024 · 0 comments

Comments

@tobiasBora
Copy link
Contributor

Describe the bug

Fails with titlesec + option text link section.

To Reproduce: Minimal Working Example
Provide here a Minimal Working Example (MWE) code that exhibits the issue (please, consider putting a MWE, it really helps):

\documentclass{article}
\usepackage{titlesec}
\titleformat
{\chapter} % command
[display] % shape
{\bfseries\Large\itshape} % format
{Story No. \ \thechapter} % label
{0.5ex} % sep
{
    \rule{\textwidth}{1pt}
    \vspace{1ex}
    \centering
} % before-code
[
\vspace{-0.5ex}%
\rule{\textwidth}{0.3pt}
] % after-code


\titleformat{\section}{\normalfont\bfseries}{\thesection.}{0.5em}{}

\titlespacing{\section}{12pc}{1.5ex plus .1ex minus .2ex}{1pc}

\usepackage{xparse} % Not needed with recent LaTeX
\usepackage{amsthm}

% Create new theorems, or use ntheorem/thmtools/...
\newtheorem{thm}{Theorem}[section]
% Default uses autoref, but you can also use cleveref, see the documentation.
% Say to autoref that "thm" are Theorems.
\newcommand{\thmautorefname}{Theorem}

% %% Load the library. createShortEnv automatically creates the shortcuts
% %% thmE, theoremE, lemmaE, propositionE, corollaryE, proofE. See \newEndThm for more details.
\usepackage[createShortEnv]{proof-at-the-end}
\pratendSetGlobal{text link section}

\begin{document}

%\chapter{Foo}
\section{Theorems}

This is  theorem:
%% If you don't have any title, leave an empty bracket like \begin{thmE}[][end]
\begin{thmE}[My title][end, restate]
  I am a theorem
\end{thmE}
\begin{proofE}
  And I am a proof.
\end{proofE}


\section{Proofs}
\printProofs

\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant