Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRS document formatting problem for long labels #1877

Closed
deemaalomair1 opened this issue Sep 12, 2019 · 5 comments · Fixed by #3889
Closed

SRS document formatting problem for long labels #1877

deemaalomair1 opened this issue Sep 12, 2019 · 5 comments · Fixed by #3889
Assignees

Comments

@deemaalomair1
Copy link

deemaalomair1 commented Sep 12, 2019

@smiths There is a presentation problem I faced when I download the PDF. Some letters in some sections are sifted toward the left-side of the page, so not all the letters appear clearly and I could not understand the word.
sections effected are:
4.1.3 Goal statements , 4.2.1 Assumptions , 5.1 Functional Requirements, 6 Likely Changes and 7 Unlikely Changes.

Attached one page as an example:
presentation_issue

@smiths
Copy link
Collaborator

smiths commented Sep 13, 2019

Thank you @deemaalomair1. You are correct about the formatting of the labels. We know about this problem, but have let it remain in the interest of pursuing other priorities. Having said that, we do not have any open issues related to this formatting issue, so I will keep your issue in the issue tracker, as a future enhancement to Drasil.

Your issue is for SWHS, but the formatting issue actually applies to all of the Drasil examples. Therefore, I will rename your issue as well.

@deemaalomair1, this is a nice example of an issue. I especially like that you included a screen shot so that the issue is self-contained. My only advice for next time is that the issue should have been assigned to me. There is a drop-down option for Assignees on the right hand side of this window.

@smiths smiths changed the title document presentation issue for Solar Water Heating Systems(SRS) document SRS document formatting problem for long labels Sep 13, 2019
@deemaalomair1
Copy link
Author

Thank you Dr.Smith for the quick respond. Actually i tried to assign the issue , but it seems that i do not have the privilege to assign . The assignees option is not open for me. @smiths

@smiths
Copy link
Collaborator

smiths commented Sep 13, 2019

Now that you mention it @deemaalomair1, that makes sense, since you are not a collaborator on this project. Thank you for letting me know. Since you cannot assign the issue, you did the next best thing, you at-ed me in the body of your issue.

@BilalM04
Copy link
Collaborator

This issue caught my eye. The lists with labels that flow off the page in LaTeX are of type Simple in Drasil. See here for the different list types. Looking at the Haddock docs, Simple lists should be rendered as "Title: item".

In the Haddock docs, it says Desc items should be rendered as "Title: Item" (all bold), which I believe should be "Title: Item" (only Title is bold). Correct me if I'm wrong.


To address the issue mentioned, the Desc list type in LaTeX is rendered using the \begin{description} environment, which automatically bolds the titles. Currently, the Simple items are rendered using the \begin{itemize} environment, resulting in the misaligned rendering observed in the original post. Since the Simple list type is essentially the same as Desc but without the bold titles, we can use the description environment with an argument to achieve the desired formatting.

\begin{description}[font=\normalfont]
...
\end{description}

I manually tested the code above, and it works as expected. Additionally, the argument (font=\normalfont) does not override any text formatting within the list items themselves (such as \textbf), it will only remove the bold off the title. The Simple lists will render as follows:

image

Here is the original for reference.

@smiths
Copy link
Collaborator

smiths commented Jul 26, 2024

Great investigation @BilalM04. I like your proposed fix of using the description environment. That is what I tend to use in my own manually created LaTeX documents. Let's go ahead and make this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants