I changed the paper size in the Legrand Orange Book template from A4 to Letter, and as a result the table of contents part number (the big Roman numeral) was moved from the left of the part name to above it, as can be seen here:
Starting with a fresh copy of the template, I've replaced the first coding line of structure.tex that specifies geometry with your command and I can't reproduce the problem. Perhaps you've modified something else that's causing it?
Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
Vel wrote:Starting with a fresh copy of the template, I've replaced the first coding line of structure.tex that specifies geometry with your command and I can't reproduce the problem. Perhaps you've modified something else that's causing it?
Thanks for the response, Vel. I've modified structure.tex extensively at this point -- not only have I added packages and configurations and such, but I painstakingly reformatted the entire file because I simply can't make heads or tails of the original version. So that makes it hard to figure out where the problem is!
But assuming that something did happen to my structure.tex, I've started with the original again and am replacing it bit by bit with the contents of my customized version. At this point the TOC problem is fixed, apparently -- the numbers and titles appear on the same line. The hyperlink boxes only extend to the right of the part title, though, rather than to the extreme right of the colored boxes. Can you confirm that this is the right behavior?
Now I have to keep going in order to restore the formatting I had changed. For example, the Roman numerals VII and VIII on the top left of the part title pages run off past the left edge of the page.
As a note to anyone else dealing with these kinds of issues, I've been re-reformatting structure.tex and recompiling my document after every couple changes, and I've realized something that I've never seen mentioned elsewhere: LaTeX syntax is incredibly fragile, even compared to a language like Python, where white space is actually semantic.
For example, the following original code produces (part of) the TOC formatting in the Legrand template:
And frankly, it almost looks like it's been obfuscated! It's very, very hard to browse such code in order to find out where various things are done and modify them.
But if you reformat the code in order to simply separate elements from each other...
...then by doing nothing more than inserting some line breaks and tabs, the code breaks in half a dozen ways -- justification, spacing and other things get all messed up!
In fact, LaTeX code is so fragile that I've completely borked files by doing nothing more than deleting a single % sign that was sitting alone on a line.
So let that be a warning to other LaTeX newbies -- this is not a robust langauge! Now that I know this, I can try and take the appropriate precautions, but there are undoubtedly tons of landmines that I've yet to stumble upon.
Yeah, it's certainly not a modern language and the fragility arises due to you adding line breaks, which are interpreted. The typical solution is, when you are breaking up code into lines for readability, to put % at the end of each line (without a space before it). This will ensure no newline is interpreted before the next line so the code behaves as if it was on one line. This doesn't look very pretty though which annoys me but it's either that or putting everything on one line.
By the way, if you think you're making improvements to the template that would benefit other users, send them my way and I'll have a look. If you could make it obvious what each change is and what it does rather than sending 100 at once that would be much more helpful
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com