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

Edits in Chapters 1-4 #311

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Edits in Chapters 1-4 #311

wants to merge 13 commits into from

Conversation

APEXCalculus
Copy link
Owner

Mostly the edits are the shifts in figures.
Other edits are made too, changing some wording in places. (Some key ideas, definitions, asides are edited.)

@sean-fitzpatrick
Copy link
Collaborator

I'm having some trouble tracking all of the changes.

  • In the main apex.ptx file, better to not commit the termporary changes to comment out the chapters you're not building.
  • There are a lot of whitespace changes (e.g. in some of the chapter files, some of the <xi:include> lines have been indented for some reason.
  • Later on there are a few things that look like large changes, but I suspect are just changes in indentation. If you can stick to the existing indentation scheme, it'll make it easier for me to follow along
  • In a lot of places you've made a small change (like changing <dl> to <ol>) by commenting out the original, and then adding a copy of it below that has the changes. Unless there is a reason you want to keep the original in a comment, I think it's a lot easier to see what's going on if you just make the chnage.

(Also, the copied versions had a lot of new, extraneous whitespace that made it hard to compare.)

@APEXCalculus
Copy link
Owner Author

Yes, I am sure this pull request is a mess, much of it due to my status as a git noob. I can redo it in a cleaner way if necessary. Problems I foresaw once I committed:

  1. There is too much in this one pull request. I should do one per chapter. Or per section if better.
  2. Yes, apex.ptx is changed and I didn't mean to commit that.
  3. I made changes that I wasn't sure were good, so I commented out old stuff in case we wanted to refer back to the original. I forgot that git handles that kind of issue well; I am too used to doing things on my own.

Is it better if this pull request is cancelled and I:

  • commit in smaller chunks
  • only commit the sections I am editing (and not apex.ptx & chapters, etc.)
  • delete old content and not comment it out, and
  • try to manage whitespace better?

Sorry for the trouble.

@sean-fitzpatrick
Copy link
Collaborator

I can't complain about large pull requests, considering some of the ones I have sent!

Only start over if it's easier for you.

Otherwise, if you can revert the apex.ptx and chapter files, and clean up some of the whitespace, I should be able to work through the rest.

Edits sections that had comments or extraneous whitespace
@APEXCalculus
Copy link
Owner Author

I didn't officially "revert" apex.ptx and chapter files back to the original, but I did restore them to their original state and re-committed them in commit "fixes apex.ptx and chptrs 1 & 2": (7be3a90)

I edited sections to remove most content that I commented out in "fixes sections":
(f2add70)

If I need to adopt a more git-official method, let me know.

One of the most confusing forms of edits is where certain figures needed to be moved before/after certain paragraphs so that they appear on the proper page. So if it looks like I deleted figures, it's because of that.

@sean-fitzpatrick
Copy link
Collaborator

I added a few other changes to the section on basic derivative rules.

The pagebreak element should probably not go inside a paragraph, etc.

A couple of questions for you about changes to the placement of figures, changes to vshifts, etc.:

  1. When you move a figure, will the new location still make sense if the figure is inline? We only put figures in the margin for PDF output. Probably 95% of students (or more) use the HTML version of the book. Very few are interested in PDF. We get only a handful of orders for print copies every year in our bookstore. So I think it's important not to change anything that compromises the HTML output.
  2. Are you using the verison with or without the QR codes for videos? If the new locations overlap with the QR codes, and there isn't room for me to move the QR codes so they fit, I'll have to do the figure placement all over again.

(I could use versioning for this, and have one set of vshifts for videos, and one for no videos, but it would require duplicating half the figures in the book, so I can put one in the video component, with one vshift, and another in the novideo component, with a different vshift.)

@APEXCalculus
Copy link
Owner Author

APEXCalculus commented Aug 1, 2024 via email

@sean-fitzpatrick
Copy link
Collaborator

I think a page break should go between paragraphs, the same as it does in LaTeX.

If the enlarge page command works better elsewhere, that's ok. (In LaTeX I don't think I've ever put it in without line breaks on either side of it.)

Have your students been given the option of the online version of the book? I can understand preferring a hard copy, but I'd be surprised if anyone chose electronic PDF over HTML.

I think people in some places are being pushed to move to HTML to comply with accessibility requirements. But you also get nice perks like interactive features.
(The built in search works really well, too.)

@sean-fitzpatrick
Copy link
Collaborator

I've just figured out that you're not intentionally adding most of the whitespace changes.
Your text editor is set to use tabs for indentation, and your tabs are equivalent to 8 spaces.

Can you change your settings to use 2 spaces for indentation instead of a tab? If you make that change and save your files, it should fix most of the whitespace problems, I think.

If you are using VSCode, use Ctrl+Shift+p to bring up the command pallette. Type 'indent' into the box.
You'll see one line that says "Indent using spaces", which will let you change the setting going forward. (There is also a place you can click on the bottom-right panel to do this.) Another line will say "Convert tabs to spaces". This will make sure there are no tab characters.

</p>
<p>
For instance, consider the task of steering a self--driving car. If the vehicle drifts to the left, how much should the wheel be turned to the right to correct the path? Too little and the problem may not be corrected at all; too much and the car will overshoot its target and extreme corrective action will need to be taken. PID controllers consider the <em>rate</em> at which the drift and corrective measures take effect.
</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -- for a hyphen is LaTeX code, but it is not valid PreTeXt. You want to use .

Copy link
Owner Author

@APEXCalculus APEXCalculus Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use < n d a s h />?

Copy link
Owner Author

@APEXCalculus APEXCalculus Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! Github doesn't like writing the pretext code. Use < n d a s h / >? (Without spaces - Github turns that command into a space.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put pretext code between back ticks and it works OK. Which I clearly forgot to do!

So yes, you would do self<ndash/>driving.

@@ -1009,7 +1009,7 @@
In <xref ref="fig_sage_sinx"/>,
two graph of <m>y=\sin(x)</m> is given,
generated by <pubtitle>Sage</pubtitle> and <pubtitle>Mathematica</pubtitle>.
The small points represent each of the places where each <init>CAS</init> sampled the function.
The small points represent each of the places where each <!-- <init>CAS</init> --> CAS sampled the function.
Notice how at the <q>bends</q>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why the markup was commented out here. Since CAS is an initialization (short for Computer Algebra System) shouldn't it be marked as such?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably fixed a problem in a wrong way.
For some reason, that markup displays CAS as "cas" in the pdf. I supposed the way PreTeXt handles it should change, right? This also appears in Example 3.5.8, though I missed fixing it there.
At the same time, I wasn't sure of the point of the init markup. My brief search for that markup just led me to running "pretext init" which wasn't helpful.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh.... I think the problem is that the Carlito font set doesn't include small caps. I will ask if there is a good way to work around this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a font based on Carlito that includes small caps, but I didn't figure out how to get LaTeX to use it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep markup like init because it will produce semantic tags in HTML, which is useful for those needing a screen reader. (It should know to pronounce each letter rather than trying to make it a word.)

Options:

  1. Override templates in LaTeX so that small caps are regular caps
  2. Change to a font that supports small caps
  3. Keep the current font, but use an alternate font for small caps

Let me know what you prefer.

@sean-fitzpatrick
Copy link
Collaborator

I made a few changes that were easy to make myself. An earlier comment explains how to fix the whitespace.
There are a few inline comments for things that need your attention.

Other than that, I think this is OK, pending confirmation that the changes are compatible with the HTML output and including video QR codes.

@APEXCalculus
Copy link
Owner Author

I fixed my tab / 2 spaces issue -- I think. We'll see how it looks going forward.

<p>
Adding <m>0</m> in some clever form is a common mathematical proof technique.
</p>
</aside>

<p>
<md>
<mrow>\amp\lzoo{x}{f(x)g(x)} = \lim_{h\to0} \frac{f(x+h)g(x+h)-f(x)g(x)}{h}</mrow>
<mrow>\lzoo{x}{f(x)g(x)} \amp= \lim_{h\to0} \frac{f(x+h)g(x+h)-f(x)g(x)}{h}</mrow>
<mrow>\amp \text{ (now add 0 to the numerator) }</mrow>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the alignment tab here is going to cause a bunch of overfull hboxes.

That will be a problem if this ends up on an odd-numbered page, I think.
And it means that the equations won't fit in HTML: a horizontal slider will be needed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe even pages, not odd, since there's nothing in the margin there.

@Alex-Jordan
Copy link
Collaborator

About the font/smallcaps/init issue. If there is nothing better to do for PTX at large at this time, you could use the custom XSL that this project already has to change how an init is translated. And just not use small caps.

@sean-fitzpatrick
Copy link
Collaborator

I think I will override the default (which seems questionable, IMO -- I've never seen something like PDF in small caps).

I got the Latte font working on my computer, but I don't want our PDF build to depend on installing some font from source from an 8 year old software repo. Probably Greg doesn't want that, either.

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

Successfully merging this pull request may close these issues.

3 participants