-
Notifications
You must be signed in to change notification settings - Fork 205
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
Indentation missing from 'pre' example in sample article? #1389
Comments
The white space in the source has been stripped from the HTML.
…On Thu, 19 Nov 2020, Sean Fitzpatrick wrote:
In the sample article there is an example of using the <pre> tag for code with indentation.
There is then a short <pre> paragraph that claims to include a normal line, an indented line, and an outdented line.
But all three lines appear with the same alignment, and there is no whitespace in the source.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or
unsubscribe.[AABTULCXZ36UFGRAGK7CUT3SQVWZXA5CNFSM4T32ONYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LEEGQAA.gif]
|
OK. But shouldn't the second line appear with indentation? It doesn't on my browser. But for programming languages like Python, indentation is part of the code. |
David is saying that the reason there is no indentation is because that indentation would be caused by whitespace characters in the source which are now gone from the HTML. For Python code, I think someone should be using I think maybe PTX |
Meaning, there is a bug in the HTML translation. |
A mistake somewhere, but I can't say just what might have led to it, which is odd (alarming?). This is why we have the sample article. See PDF where the right things happen with this example. A few things with deadlines are stacking up - may be the weekend before I can investigate. Should be easy to fix. |
Perhaps a better alternative would be the |
@sean-fitzpatrick Forgot to say. Convince your colleague that we'll get it right quickly. |
OK, thanks! If it works in PDF, that might be good enough. I think she was dealing with the same frustration of HTML ignoring whitespace. (But maybe was trying to make PDF.) Anyway, I think the goal was to provide students with (possibly flawed) code samples and have them use annotation to analyze (and possibly debug) the code. I think PreTeXt HTML with hypothes.is built in might be a good candidate for this. |
While we are looking at this page of the sample article, there are some https://pretextbook.org/examples/sample-article/annotated/section-20.html#p-885 At first if looked like a CSS issue. But the HTML for the PTX |
Thanks, Alex. Let's put proposing name changes on |
Really mystified now. Checked the code. Appears fine. Tested a minimal example, https://pretextbook.org/examples/sample-article/html/section-20.html @sean-fitzpatrick Can you pull and try a test with that example in the sample article? Just to make sure I am not delusional? (See you at drop-in?) |
It looks fine to me as well! But the indentation is still missing in the annotated version of the sample article. |
The link this started with was "annotated" and I still see the issue there:
https://pretextbook.org/examples/sample-article/annotated/section-20.html
…On Fri, Nov 20, 2020 at 8:03 AM Sean Fitzpatrick ***@***.***> wrote:
It looks fine to me as well! But the indentation is still missing in the
annotated version of the sample article.
Maybe something with the annotation ("View Source") is causing the problem?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1389 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABEDOAA5MBQW5XKFA4TCZWDSQ2HMPANCNFSM4T32ONYA>
.
--
Alex Jordan
Mathematics Instructor
Portland Community College
|
Aah - I did not notice you were talking about the annotated version! |
The "annotated" version has not been updated in months, since the script to produce it has an error. I believe this pull request would fix it: Then we can see what morte needs to happen. This might be a part of a bigger-picture issue: |
Got it. Sorry for causing undue alarm. I always go to the annotated version because I'm usually looking for some |
Rebuilt annotated version of sample article, now that |
The annotated article is such a mess, and my style a bit archaic, that we pretty-print the article before making annotations. Independent of our use, this will clobber indentation in programs (e.g. Python, Sage), so this needs to be addressed in the pretty-printing code. And once done, all the improvements will migrate here automatically, since the website build pulls automatically from relevant repositories and so is always up-to-date. So I'm closing this in lieu of Much more detail there. Thanks, @sean-fitzpatrick for the report. Sorry for my initial mis-understanding. |
In the sample article there is an example of using the
<pre>
tag for code with indentation.There is then a short
<pre>
paragraph that claims to include a normal line, an indented line, and an outdented line.But all three lines appear with the same alignment, and there is no whitespace in the source.
The text was updated successfully, but these errors were encountered: