derric / cleanthesis

Clean Thesis is a clean, simple, and elegant LaTeX style (or template) for thesis documents.
http://cleanthesis.der-ric.de/
902 stars 116 forks source link

Incompability with the calc package #101

Closed henrikmidtiby closed 4 years ago

henrikmidtiby commented 5 years ago

The following minimal example fails to compile on my computer. I use the development branch of cleanthesis (commit id: a9d8d69d7f3960882971d6b0d40a3cfa66cacbbd).

\documentclass{scrreprt}
\listfiles
\usepackage{cleanthesis}
\usepackage{calc}

\begin{document}
\chapter{Chap}
\section{Sec 1}
\end{document}

Which lists the following files being used during compilation.

 *File List*
scrreprt.cls    2018/03/30 v3.25 KOMA-Script document class (report)
scrkbase.sty    2018/03/30 v3.25 KOMA-Script package (KOMA-Script-dependent bas
ics and keyval usage)
 scrbase.sty    2018/03/30 v3.25 KOMA-Script package (KOMA-Script-independent b
asics and keyval usage)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty    2018/03/30 v3.25 KOMA-Script package (loading files)
tocbasic.sty    2018/03/30 v3.25 KOMA-Script package (handling toc-files)
scrsize11pt.clo    2018/03/30 v3.25 KOMA-Script font size class option (11pt)
typearea.sty    2018/03/30 v3.25 KOMA-Script package (type area)
cleanthesis.sty    2015/08/26 v0.3.1 A clean LaTeX style for thesis documents
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
dvipsnam.def    2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
 fontenc.sty
   t1enc.def    2017/04/05 v2.0i Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
 charter.sty    2005/04/12 PSNFSS-v9.2a (P.Dyballa) 
microtype.sty    2018/01/14 v2.7a Micro-typographical refinements (RS)
microtype-pdftex.def    2018/01/14 v2.7a Definitions specific to pdftex (RS)
microtype.cfg    2018/01/14 v2.7a microtype main configuration file (RS)
setspace.sty    2011/12/19 v6.7a set line spacing
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
tabularx.sty    2016/02/03 v2.11b `tabularx' package (DPC)
   array.sty    2018/04/30 v2.4h Tabular extension package (FMi)
enumitem.sty    2011/09/28 v3.5.2 Customized lists
blindtext.sty    2012/01/06 V2.0 blindtext-Package
  xspace.sty    2014/10/28 v1.13 Space after command names (DPC,MH)
textcomp.sty    2017/04/05 v2.0i Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
  ts1enc.dfu    2018/04/05 v1.2c UTF-8 support for inputenc
hyperref.sty    2018/02/06 v6.86b Hypertext links for LaTeX
hobsub-hyperref.sty    2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2016/05/16 v1.14 Construct package bundles (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty    2018/09/07 v0.28 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2016/05/16 v1.4 Expandable calculations on big integers (HO)
  bitset.sty    2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty    2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty    2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
 hopatch.sty    2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty    2016/05/16 xcolor patch
atveryend.sty    2016/05/16 v1.9 Hooks at the very end of document (HO)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
refcount.sty    2016/05/16 v3.5 Data extraction from label references (HO)
 hycolor.sty    2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
  pd1enc.def    2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 hpdftex.def    2018/02/06 v6.86b Hyperref driver for pdfTeX
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
scrlayer-scrpage.sty    2018/03/30 v3.25 KOMA-Script package (end user interfac
e for scrlayer)
scrlayer.sty    2018/03/30 v3.25 KOMA-Script package (defining layers and page 
styles)
 caption.sty    2018/05/01 v3.3-147 Customizing captions (AR)
caption3.sty    2018/05/27 v1.8a caption3 kernel (AR)
   t1bch.fd    2004/10/18 font definitions for T1/bch.
csquotes.sty    2018/04/13 v5.2d context-sensitive quotations (JAW)
etoolbox.sty    2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
csquotes.def    2018/04/13 v5.2d csquotes generic definitions (JAW)
csquotes.cfg    
 tocloft.sty    2017/08/31 v2.3i parameterised ToC, etc., typesetting
    calc.sty    2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
  ts1cmr.fd    2014/09/29 v2.5h Standard LaTeX font definitions
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
  mt-bch.cfg    2007/03/03 v1.5 microtype config. file: Bitstream Charter (RS)
 nameref.sty    2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
my-thesis.out
my-thesis.out
  t1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
   t1phv.fd    2001/06/04 scalable font definitions for T1/phv.
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
  ot1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  omllmm.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omslmsy.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omxlmex.fd    2009/10/30 v1.6 Font defs for Latin Modern
 ***********
henrikmidtiby commented 5 years ago

By taking elements out of the cleanthesis package, the following minimal example was found

\documentclass{scrreprt}
\listfiles
\RequirePackage{xkeyval}

\newlength{\lensectionnumber}
\renewcommand{\sectionmark}[1]{%
    \markright{%
        \settowidth{\lensectionnumber}{\thesection\quad}
    }%
}

\usepackage{calc}

\begin{document}
\chapter{Chap}
\section{Sec 1}
\end{document}

Which fails with the error

! Undefined control sequence.
\in@ #1#2->\begingroup \def \in@@ 
                                  ##1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...
l.17 \section{Sec 1}

The full output from pdflatex is given below for reference:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./my-thesis.tex
LaTeX2e <2018-04-01> patch level 5
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrreprt.cls
Document Class: scrreprt 2018/03/30 v3.25 KOMA-Script document class (report)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/calc.sty) (./my-thesis.aux)
chapter 1.
! Undefined control sequence.
\in@ #1#2->\begingroup \def \in@@ 
                                  ##1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...
l.17 \section{Sec 1}

? R
OK, entering \nonstopmode...
! Illegal parameter number in definition of \@themark.
<to be read again> 
                   1
l.17 \section{Sec 1}

! Undefined control sequence.
\in@ ...f \in@@ ##1#1{}\toks@ \expandafter {\in@@ 
                                                  #2{}{}#1}\edef \in@@ {\the...
l.17 \section{Sec 1}

! Undefined control sequence.
\in@ ... \expandafter {\in@@ #2{}{}#1}\edef \in@@ 
                                                  {\the \toks@ }\expandafter...
l.17 \section{Sec 1}

! Extra \else.
\@sect ...name }{\@currenttocentry }\fi \fi \else 
                                                  \def \@svsechd {#6{\nobrea...
l.17 \section{Sec 1}

[1{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./my-thesis.aux)

 *File List*
scrreprt.cls    2018/03/30 v3.25 KOMA-Script document class (report)
scrkbase.sty    2018/03/30 v3.25 KOMA-Script package (KOMA-Script-dependent bas
ics and keyval usage)
 scrbase.sty    2018/03/30 v3.25 KOMA-Script package (KOMA-Script-independent b
asics and keyval usage)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty    2018/03/30 v3.25 KOMA-Script package (loading files)
tocbasic.sty    2018/03/30 v3.25 KOMA-Script package (handling toc-files)
scrsize11pt.clo    2018/03/30 v3.25 KOMA-Script font size class option (11pt)
typearea.sty    2018/03/30 v3.25 KOMA-Script package (type area)
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
    calc.sty    2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
 ***********

 )
(\end occurred when \ifx on line 17 was incomplete)
(\end occurred when \ifdim on line 17 was incomplete)
(see the transcript file for additional information)</usr/local/texlive/2018/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2018/texm
f-dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb>
Output written on my-thesis.pdf (1 page, 16886 bytes).
SyncTeX written on my-thesis.synctex.gz.
Transcript written on my-thesis.log.
derric commented 4 years ago

The aforementioned MWE works with the current cleanthesis v0.4.1. So I assume the issue is resolved.