Section bar alignment

Bug #915910 reported by Pierre Neidhardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
moderncv
Fix Released
Medium
Xavier Danaux

Bug Description

Took me a while (and a lot of CV printing) to notice it, but the bar left to the section name is not aligned properly with the base line.

Example: create two section name "experience" and "Computer skills".
I wrote "experience" in lower case on purpose, since the middle height will be slightly different from the one in "Computer Skill".

Since several \parbox[m] are used consecutively, they are aligned following their respective middle, not following the baseline.
To fix it, I just put everything into only one parbox.

I created a branch for this. I wrote it quick, I still have to think about a more ideal convenient solution.

https://code.launchpad.net/~neidy/moderncv/fix-sectionbar

Related branches

Revision history for this message
Xavier Danaux (xdanaux) wrote :

Thanks for reporting it Pierre.

I will change the code and simply use \raisebox to raise the box by a length depending on the baseline height. There is probably no need to use a \parbox at all.

Cheers,

Xavier

Changed in moderncv:
importance: Undecided → Medium
assignee: nobody → Xavier Danaux (xdanaux)
status: New → In Progress
Revision history for this message
Pierre Neidhardt (ambrevar) wrote :

Thank you for your answer.

In fact, the parbox is not needed for the bar, only for title. Otherwise, multiple-lines title will not get justified properly.
So I made a small change to my branch.
You can have a look at it, I think it behaves correctly.

There is still one problem in my opinion: multiple lines title.
Currently, my solution aligns the bar to the last baseline, not the first, which may be better.
But I have absolutely no idea how to do it.

Cheers,

Pierre

Revision history for this message
Xavier Danaux (xdanaux) wrote :

Just released a fix :)

FYI, the trick is to align 2 parboxes top, and ensure their height (of their first line) is the same, e.g. by including a \strut in each of them.

Xavier Danaux (xdanaux)
Changed in moderncv:
status: In Progress → Fix Released
Revision history for this message
Pierre Neidhardt (ambrevar) wrote : Re: [Bug 915910] Re: Section bar alignment

Works perfectly. You got a clue with the \strut commands, good to know.
Thanks for the great work!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.