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
103 stars 36 forks source link

Added dynamic configuration of the .pdf metadata with hyperref #42

Open danielvcorreia opened 9 months ago

danielvcorreia commented 9 months ago

Since it is not possible to use the fields (author's name, thesis title, etc.) in the matter.tex file (from the cover.tex file), this was the best solution I found to go around that problem.

The alternative was for each template user to change the .pdf metadata parameters to their own. Is that a better solution?

jpbarraca commented 9 months ago

There is an ongoing discussion with the University regarding the inclusion of metadata in the final PDF. Besides the fields you identify, it should also consider a clean version of the abstract.

Regarding your PR, why don't we change the definition of the original macros in order to define the correct values for hyperref, or to create a temporary file which can be used by matter.tex or the Makefile.

jpbarraca commented 8 months ago

The cover.tex file is already very simple, allowing students to define simple variables which are later used. This colides with the fields.txt file you propose and may introduce further confusion.

If another file is required, why not using \write to create it without increasing the complexity for users?

danielvcorreia commented 8 months ago

I can write the variables to a temporary file, but I'm having trouble reading the variables in the preamble of the cover.tex file... It occurs an Emergency stop with the error:

(cannot \read from terminal in nonstop modes)

danielvcorreia commented 8 months ago

The current implementation uses a temporary file to store the information used in the file metadata. It no longer uses the fields.tex file to store that information.

A warning occurred when \\ was used in the metadata parameters, so I changed the \Author command.

Regarding the clean version of the abstract. The current abstract example also uses \\ (warning occurs), and commands like \selectlanguage and \begin{itemize} that originate errors. How do I approach this situation? Should I change the example, or is there a way to clean the text from such commands?

danielvcorreia commented 7 months ago

(I don't know if my previous comment was read)

The current implementation works and uses a temporary file.

I don't know how to approach this:

Regarding the clean version of the abstract. The current abstract example also uses \ (warning occurs), and commands like \selectlanguage and \begin{itemize} that originate errors. How do I approach this situation? Should I change the example, or is there a way to clean the text from such commands?

@jpbarraca

jpbarraca commented 7 months ago

I saw the comment but had no time to compile and check for side effects.