I’m currently working on a LaTeX document where I have defined a new command entry that takes two arguments:
newcommand{entry}[2]{markboth{#1}{#1}textbf{#1} — hfill{#2}}
This command is used to create entries that are nicely aligned to the left and right, which is a combination of flushleft and flushright. This is something that ragged2e wouldn’t provide. It also prevents texts from overlapping to the other side of the twoside page after subsequent entry like this:
However, I’m facing an issue with the spacing after the emdash. When I use hfill, there is a space after the emdash which I don’t want. If I remove hfill to deal with the emdash problem, there is no spacing after the emdash, but then there is the problem of the text overlapping.
Is there a solution to this that can let the new command achieve the wrapping align left+right, and solves the spacing problem after the emdash?