Skip to content

Split .sty to .cls and .sty#15

Merged
ppietikainen merged 11 commits into
develfrom
cls
Jun 10, 2025
Merged

Split .sty to .cls and .sty#15
ppietikainen merged 11 commits into
develfrom
cls

Conversation

@ppietikainen

Copy link
Copy Markdown
Member

This branch splits the big .sty back to a .cls that loads report.cls (instead of the original patching of it) and then adds thesis-specific things on top. .sty has more style-related things. Could be even better, but should improve maintainability. Also only use tocloft for the TOC (used titletoc a bit previously)

@ppietikainen ppietikainen requested a review from Copilot June 10, 2025 10:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request splits the original thesis style file into a dedicated class (csethesis.cls) and a style package (csethesis.sty) to improve maintainability and simplify configuration.

  • Migrates from a patched report class to a custom class (csethesis.cls) that loads report.cls with thesis-specific customizations.
  • Introduces a new style package (csethesis.sty) consolidating various configurations and package settings.
  • Updates main.tex and README.md with references to the new class and style package as well as minor improvements in chapter/algorithm handling.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
texlive-basic-packages.txt Added ifmtarg and greek-fontenc; minor package adjustments.
main.tex Changed class from report to csethesis and replaced toc customization.
csethesis.sty New package with style and configuration settings for thesis.
csethesis.cls Revised class that now loads report and csethesis; simplified package usage.
README.md Updated documentation to reflect new file names and usage.
Chapters/implementation.tex Removed language-specific algorithm caption customization.
Chapters/appendices.tex Minor spacing adjustment added.
Comments suppressed due to low confidence (2)

csethesis.cls:160

  • The previous definition of \otsikko included a variant (@isotsikko) that converted the title to uppercase. If this removal is not intentional, consider restoring the uppercasing to preserve formatting consistency or document the change clearly.
\newcommand{\otsikko}[1]{\gdef\@otsikko{#1}}

Chapters/implementation.tex:159

  • The removal of the language-specific customization for algorithm captions may impact the consistency of algorithm naming in Finnish. Verify that this change is intentional and that algorithm captions display as expected in all target languages.
\iflanguage{finnish}{\renewcommand{\algorithmcfname}{Algoritmi}}

@ppietikainen ppietikainen merged commit e47833d into devel Jun 10, 2025
1 check passed
@ppietikainen ppietikainen deleted the cls branch June 10, 2025 10:58
ppietikainen added a commit that referenced this pull request Aug 27, 2025
* Move from times to newtx, subfigure to subcaption, epsfig is obsolete

* Move sec/eq/...ref to .sty so we are closer to standard report.cls

* Use biblatex + biber and IEEE Transactions citation format, which required
some tweaks to the standard version. Also citations.bib had a major cleanup,
so url = {}, doi={} and accessdate={} work.

di.sty refactored to have English/Finnish string differences in one place,
and then generate the actual title/abstract pages in another.

* Add biblatex-ieee/biber to packages

* Add biber to CI/CD pipeline and make it validate the .bib file
Fix entries that would have errored
Macro expansion didn't work properly in the GH action, alternate approach seems to work.

* It didn't actually run biber & pdflatex again

* Big language cleanup and refactoring, now seems to work pretty well.
Needs new ieee.bbx (Newer than the one I had installed on my system), so
probably best to ship it for now...

* Updated ieee.bbx from biblatex-ieee git, older ones don't do URL/urldate etc. properly

* Fix nitpicks from copilot and also old long url kludge

* Fix city name + comma

* Major rework (#14)

* Remove dithesis.cls and use modern packages to implement the changes it does
  * Use titlesec for noindent, spacing etc.
  * No custom \cite needed, example for IEEE style p. 5 and pp. 5--7.
  * There was  a bullet list customization in the text, use standard packages and do it in the style instead
  * Do \bf -> \bftext{} or {\bfseries} to be more explicit. Also have non-breaking space in Fig/etc. references.
  * Move caption setup to style file so all tables get it right
  * Use lmodern since that's what the text says
  * Use geometry for margins
* Run through tex-fmt

* Remove protocolheader from di.sty, instead add example that uses bytefield to do the same
* etc. ie. e.g. are not italic in IEEE, and we didn't use these anyway -> remove

* XMP metadata & doclicense bits inspired from Aalto template
* Add Copyright metadata & example in main.tex for using this + copyright page
  * Add .sty that adds custom doclicense-images to the search path (we have to ship these for now, until upstream ships PDF/A's of these)
  * Add Finnish ldf until upstream ships it 

* Update CI/CD package set
* Use right verapdf. Also finnish doclicense translation needed for now
* Remove all caps from REFERENCES/VIITTEET so they look nice in the PDF toc,
in text they stay caps
* Remove \lskip macro (\par\noident + possible space instead)
* Get Patent citation from Zotero to get fields right

* Split .sty to .cls and .sty (#15)

* Split .cls and .sty
* Algorithm translation doesn't belong in .tex, move to .sty
* Update README.md and to some cleanup
* Make TOC with tocloft only
* Add greek-fontenc to packages, hyperref sometimes just wants it
* Add ifmtarg, with local gh act it was installed

* Babelize strings, add support for BME theses

* abstracttitle and abstractauthors confusion, now fixed

* Rename (back) to dithesis, as we are used by BME/BA too.

* Rename to dithesis, since CSE/BME/BA do their theses with the same template.
Add some copyright examples (CC BY 4.0 and All rights reserved)

* Make abstract more inclusive

* Make abstract more inclusive, use BA title & abstract titles from their current template

* Make abstract page author/title uniform with Electronics template (Add faculty and type of thesis)
Have separate \metadatatitle that can't be babelized.

* Added better text from new ECE template (Greek letter italics being the only functional change)

* Add some very good text from the ECE template on copyright.

Their guidelines (technical side) are quite identical, different margins, dot in table captions, different way of CC image citation (no footnotes)

Urkund is now Turnitin

* Add ECE text about using turnitin yourself

* Add ECE text about using turnitin yourself

* Add ECE text on Accessibility & citations. Also define \alt as a no-op
if it's not defined (by newish LaTeX distro)

* Fix citations to have year & author (BIMP) for book.

* Use ECE style for CC images (Not footnote), link to CC pages.
Also fix sefref to not have the dot afterwards, only the heading itself has it.
Updates from Overleaf (Spellchecks from Tino)

* Refactor Copyright handling, input the right one and a good default text
is included. If nothing is set, no copyright page is printed.

* Add some copyright-related references that will be used when updating
the text

* Run through tex-fmt

* Updated copyright & image caption text

* Updated copyright texts

* Input doclicense in copyright-ccby40.tex

* Make title page count (like text says), which simplifies things
quite a bit.

\hypersetup{pageanchor=false}
\pagenumbering{gobble}

\pagestyle{empty}
\maketitlepage
\makecopyrightpage

\hypersetup{pageanchor=true}
\pagenumbering{arabic}
\setcounter{page}{1} %Set the page number to 1

if we want to not count it again

* Fix getauthors with less than 3 authors (It gave them all). Now you don't
define them at all, comparing to empty is suprisingly difficult especially
when doing the metadata part

* Fix Copyright metadata

* Add xurl so long URL's can be broken in the bibliography

* Add non-breaking spaces & use `` '' instead of "

* Tweak citations

* We've always used Times (except the text),remove lmodern (which was
overridden anyway).

Make Finnish/English keywords go the right way around

* Use ECE version of IEEE citation text, which was better

* Update IEEE citation style a bit

* Improve citation instructions more

* Improve abbreviations text (Adapted from ECE template)

* Update README.md and add instructions for removing transparency

* teatimeguest latex vanished, try another one...

* Add ifthen to deps

* Add everyshi to deps

* Add missing deps, should now pass

* Fix markdown formatting

* Remove MIT license (and add CC BY 4.0 from GitHub next)

* Add CC-BY 4.0 LICENSE

* Small typo fixes

* Improve referencing guidelines a bit

* Small changes to capitalize words that should be and make biber --tool a bit happier

* Turnitin will be mandatory soon, state this in instructions

* State alt texts are not a requirement (since they don't work)
State PNG and PDF images might have transparency

* Make 2.5cm margins (online version) default, optional print version with traditional
4.5cm left margin.

* Add some comments on .cls file use

* Fix typos in Faculty

* Update texlive-basic-packages.txt

Fix indent

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix copilot duplicate packages

* Update copyright-allrightsreserved.tex

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update copyright-allrightsreserved.tex

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update main.tex

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update copyright-ccby40.tex

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dithesis.cls

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update copyright-ccby40.tex

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dithesis.sty

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 2025 Autumn thesis template update (#19)

Revised LaTeX template with changes to the instructions as well

Changes to the instructions:

    “Tiivistelmä” is now required for all theses. In a thesis written in English, abstract precedes “tiivistelmä” and vice versa.
    List of abbreviations and symbols:
        The changes in the italicisation of Greek letters are also reflected in this section.
    General changes:
        ” Greek letters are not italicized.” => ”The lowercase Greek letters used as symbols of quantities are italicized, but uppercase letters are not italicized (e.g. δ vs. Δ).”
    Tables must be in text format – not an image.
    Margins are now 2.5/2.5/2.5/3.0 cm (online), for bound (not just printed) versions of the thesis the old 4.5cm left margin (2.0 right) can chosen from the template.
    Font was Latin Modern in the text, but the template always used Times
    The necessary references are included in the figure captions. Copyright information is also added to the end of the caption. Figures should preferably be placed at the top or bottom of the page, however, structured naturally.
    Copyright
        Copyright page has been added, and proper attribution for reuse/modification of image by others has been included in the instructions. More information in Chapter 3.7.
    The sources are cited according to the IEEE model.
        For example, ”[1, 2, 5]” is now ”[1], [2], [5]”. More information and examples in Chapter 4.6.

Template changes:

* Major cleanup removing obsolete packages and using modern replacements
  * Split to .cls/.sty (was slightly modified report.cls from the '90's)   
   * PDF/A-1b output. If no transparent images (PDF/PNG) are used, Muuntaja is not required, this is also recommended, since Muuntaja might break the thesis in other ways.
    * Abstract, keywords and other metadata automatically included in PDF
    * Support for CSE/BA/BME theses

Some detailed small changes:

* Move from times to newtx, subfigure to subcaption, epsfig is obsolete
* Use biblatex + biber and IEEE Transactions citation format, which required
some tweaks to the standard version. Also citations.bib had a major cleanup,
so url = {}, doi={} and accessdate={} work.
* di.sty refactored to have English/Finnish string differences in one place,
and then generate the actual title/abstract pages in another.
* Add biber to CI/CD pipeline and make it validate the .bib file
* Needs new ieee.bbx (Newer than the one I had installed on my system), so probably best to ship it for now...
* Fix city name + comma
* Remove dithesis.cls and use modern packages to implement the changes it does
  * Use titlesec for noindent, spacing etc.
  * No custom \cite needed, example for IEEE style p. 5 and pp. 5--7.
  * There was  a bullet list customization in the text, use standard packages and do it in the style instead
  * Do \bf -> \bftext{} or {\bfseries} to be more explicit. Also have non-breaking space in Fig/etc. references.
  * Move caption setup to style file so all tables get it right
  * Use geometry for margins
* Run through tex-fmt
* Remove protocolheader from di.sty, instead add example that uses bytefield to do the same
* etc. ie. e.g. are not italic in IEEE, and we didn't use these anyway -> remove
* XMP metadata & doclicense bits inspired from Aalto template
* Add Copyright metadata & example in main.tex for using this + copyright page
* Add .sty that adds custom doclicense-images to the search path (we have to ship these for now, until upstream ships PDF/A's of these)
 * Add Finnish ldf until upstream ships it 
* Remove all caps from REFERENCES/VIITTEET so they look nice in the PDF toc, in text they stay caps
* Remove \lskip macro (\par\noident + possible space instead)
* Get Patent citation from Zotero to get fields right
* Algorithm translation doesn't belong in .tex, move to .sty
* Make TOC with tocloft only
* Babelize strings, add support for BME/BA  theses
* Rename to dithesis, since CSE/BME/BA do their theses with the same template.
* Add some copyright examples (CC BY 4.0 and All rights reserved)
* Make abstract more inclusive, use BA title & abstract titles from their current template
* Make abstract page author/title uniform with Electronics template (Add faculty and type of thesis)
* Have separate \metadatatitle that can't be babelized.
* Added better text from new ECE template (Greek letter italics being the only functiona change 

* Add some very good text from the ECE template on copyright.
* Urkund is now Turnitin
* Add ECE text about using turnitin yourself
* Add ECE text on Accessibility & citations. Also define \alt as a no-op if it's not defined (by newish LaTeX distro)
* Fix citations to have year & author (BIMP) for book.
* Use ECE style for CC images (Not footnote), link to CC pages.
* Also fix sefref to not have the dot afterwards, only the heading itself has it.
* Updates from Overleaf (Spellchecks from Tino)
* Refactor Copyright handling, input the right one and a good default text is included. If nothing is set, no copyright page is printed.
* Add some copyright-related references that will be used when updating
the text
* Make title page count (like text says), which simplifies things
quite a bit.
* Add xurl so long URL's can be broken in the bibliography
* Add non-breaking spaces & use `` '' instead of "
* Use ECE version of IEEE citation text, which was better
* Improve abbreviations text (Adapted from ECE template)
* Update README.md and add instructions for removing transparency
* Turnitin will be mandatory soon, state this in instructions
* State alt texts are not a requirement (since they don't work)
* State PNG and PDF images might have transparency
* Make 2.5cm margins (online version) default, optional print version with traditional 4.5cm left margin.

* And changelog to README.md

* Remove copyright-only .tex file that was used for reviewing purposes

* Update README.md to explain each file in the template

* Update Changelog

* Make dot after chapter/(sub)section number a toggle (always on)
Add it in the TOC too to match previous template

* Add some comments about metadata & reindent

* Add some comments about metadata & reindent

* Clarify section on bound theses (different margins) and that cover color, stickers etc. rules are just to be consistent with out traditional theses

* Change references Finnish translation to LÄHTEET to be same as
ECE (was: VIITTEET)

* Change margins in text as well

* Add BSc thesis time table example
* Update Foreword and README.md with the changes made
* Revert to our old experiments.tex text for core text, was a bit too much
electronics for our theses
* Reindent and add Turnitin being mandatory
* Add example of code listings using minted
* Apply sentence case to be consistent and add clarify main.tex comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants