detiuaveiro / ua-thesis-template

📖 A thesis LaTeX template that complies with the University of Aveiro's guidelines and provides a simple CLI workflow around make and compatibility with Overleaf.
MIT License
110 stars 40 forks source link

Unify thesis under a same document class #56

Open jpbarraca opened 3 weeks ago

jpbarraca commented 3 weeks ago

Unify the document to use a single document class, instead of two (cover and matter). This may be necessary to comply with current template and to allow better handling of PDF metadata.

Currently tracked in the unified-memoir branch

danielvcorreia commented 2 weeks ago

This unified approach does not seem to work on Overleaf... Is the implementation with the temporary file too CPU expensive?

jpbarraca commented 2 weeks ago

Currently we are creating two different documents, using two different document classes. This happened due to historical reasons, and has no effective support. The cover was using the report class, while the main thesis used memoir.

The current template provided by the University suggests the addition of the index and references following the same format used in the cover. At the same time, it is desirable to have metadata directly in the PDF. Both point towards having all information easily available. Currently, the abstract is in the cover, while the lists of chapters, sections, figures, etc... is in the main document.

This work aims to unify everything under the same document. With the feature, we could easily output PDF metadata without side tasks, and effectively comply with the University template.

danielvcorreia commented 2 weeks ago

Are intermediate files still needed?

When using the work from the branch referenced in #56 we do not need intermediate files, as all the information is available. Can you check it?

Some tokens in the abstract text are not allowed and generate errors. In the PR I'm using a static string for now.... These are some possible solutions:

  1. Remove these tokens that are not supported
  2. Use the \pdfstringdefDisableCommands command to redefine commands that are usually not supported
  3. Don't use the abstract text

There are still some compilation errors in this branch

jpbarraca commented 1 week ago

57 is a better approach. Lets close #42

Regarding the Abstract: Which tokens are not supported?

Regarding the compilation: It's a devel branch with compilation and format errors. This was one of the reasons why memoir was not used for the cover. The definition of the margins and text area is different from the report class. So consider it to be WIP. If you have the opportunity, PRs are welcome.

danielvcorreia commented 1 week ago

I think all commands (\anything) are not supported as a PDF string. For example: \selectlanguage{}, \begin{}, \\

jpbarraca commented 1 week ago

We can leave a note warning students to not use commands on the abstract.

danielvcorreia commented 1 week ago

I didn't notice a comment above the abstract that says: %%% Don't remove the \selectlanguage statement or you will end with incorrect hyphenation

Because of this, we need to use the \pdfstringdefDisableCommands command to possibilitate certain commands to be in the Abstract... I added the support for \selectlanguage, \texttt, and \\ commands for now. I also left a note not to use additional commands.

Another aspect is that the Abstract is a list of Abstracts in different languages, so the last added element is the one used in the PDF information dictionary. Should the Portuguese version always be used?