mbredel / thesis-template

A LaTeX template for Bachelor and Master thesis
GNU General Public License v3.0
85 stars 83 forks source link

Problems compiling on recent TexLive version due to issue in hdathesis.sty #26

Open joelMuehlena opened 7 months ago

joelMuehlena commented 7 months ago

When compiling on a recent TexLive version registry.gitlab.com/islandoftex/images/texlive:TL2023-2024-02-04-full the compilation fails with the following error.

(/usr/local/texlive/2023/texmf-dist/tex/generic/intcalc/intcalc.sty
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
)
\Hy@SavedSpaceFactor=\count458

! LaTeX socket Error: Sockets can only be declared at top-level!

For immediate help type H <return>.
 ...                                              

l.2088  {\providecommand\UseSocket[2]{#2}}

? 
! Emergency stop.
 ...                                              

l.2088  {\providecommand\UseSocket[2]{#2}}

It is not allowed to declare sockets inside a group. Move the declaration to
the top-level.

In comparison version TL2023-2023-03-27-full still works. I digged into the issue and found its roots in the hdathesis.sty file. Concretely in the following block:

\theoremstyle{plain} {{\theorembodyfont{\normalfont}
\newtheorem{Definition}{Definition}}
\newcommand{\qed}{\hfill \mbox{\raggedright \rule{.07in}{.1in}}}
\newenvironment{proof}{\vspace{1ex}\noindent{\textbf Proof}\hspace{0.5em}}
    {\hfill\qed\vspace{2ex}}

I guess there is a missing } somewhere which I solved by replacing the block with:

\theoremstyle{plain} {{\theorembodyfont{\normalfont}
      \newtheorem{Definition}{Definition}}}
\newcommand{\qed}{\hfill \mbox{\raggedright \rule{.07in}{.1in}}}
\newenvironment{proof}{\vspace{1ex}\noindent{\textbf Proof}\hspace{0.5em}}
{\hfill\qed\vspace{2ex}}

or as diff (maybe easier to spot the additional brace here)

diff --git a/hdathesis.sty b/hdathesis.sty
index 3128fc9..24ea445 100644
--- a/hdathesis.sty
+++ b/hdathesis.sty
@@ -54,8 +54,9 @@
   \newtheorem{Lemma}{Lemma}
   \newtheorem{Corollary}{Corollary}
 }
+
 \theoremstyle{plain} {{\theorembodyfont{\normalfont}
-    \newtheorem{Definition}{Definition}}
+    \newtheorem{Definition}{Definition}}}
 \newcommand{\qed}{\hfill \mbox{\raggedright \rule{.07in}{.1in}}}
 \newenvironment{proof}{\vspace{1ex}\noindent{\textbf Proof}\hspace{0.5em}}
 {\hfill\qed\vspace{2ex}}

However I'm not using this environment or theorems and therefore have not validated the correctness of my fix.

jealka commented 3 months ago

Thank you, solved the problem for me on MacTeX! The "Definition" environment also works fine and compiles without any errors.

Kronroyal commented 2 months ago

Thank you very much! Fixed several Issues for me aswell on Windows 11 with TexLive + TexStudio! :)

Zeratoxx commented 4 weeks ago

I'm a bit irritated. With your changes, the amount of opening and closing braces don't match anymore?