Open Pelonza opened 7 years ago
Note: If you are able to just work on my current files with a script, pull from the "webwork" branch.
I'm leaving the main branch as a "complete" and supposedly compiliable version...though with the changes to PreTeXt, I'm not even sure....
Among other things,
< task>
< p>
Give a normal vector to the plane through these three points.
< hint>
example that works
< /hint>
< /p>
< /task>
should be
< task>
< statement>
< p>
Give a normal vector to the plane through these three points.
< /p>
< /statement>
< hint>
< p>
example that works
< /p>
< /hint>
< /task>
I can send a pull request with that change. Please let me know of other constructions that need to be reorganized.
On Mon, 21 Aug 2017, Karl R. B. Schmitt wrote:
@davidfarmer
So, turns out that in validating the tasks/explorations... If explorations have "tasks" they can't start with
... all the first content needs to be wrapped in an "introduction"
More-over, any sub-list of tasks, also can't be preceded by a
... but must be wrapped in an introduction.
My reg-exp skills aren't up to the task of creating something that correctly parses through and fixes this across all the files... I'm going to work on getting the first chapter working right as I need it next week, but I'd prefer not to have to fix them all by hand. If you can't get to them, let me know and I'll see if I can write my own script or get a student to help.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.[AAM6LOoTg72x9_4jgrRZmbAqSI8GaIpWks5saM7PgaJpZM4O8xpy.gif]
Can you edit the items in this task and put a space after every less than, or do whatever else it takes to make the item visible. Look at the issue on GitHub to see what I mean.
I thought putting statement tags in should be fine... ?? I'm not quite sure what you are asking about here? the task example you gave was visible if I expanded the comment.
Can you view your first comment in the issue in GitHub? I can't.
On Mon, 21 Aug 2017, Karl R. B. Schmitt wrote:
I thought putting statement tags in should be fine... ?? I'm not quite sure what you are asking about here? the task example you gave was visible if I expanded the comment.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.[AAM6LIJdX7aatcVtrnEwOqjK9mBxuvmGks5sahT3gaJpZM4O8xpy.gif]
I can... let me see if I can summarize the issues I found when going through...
1) There were incorrectly placed < /p> and < p> 's anywhere tasks had replaced a nested list inside an exploration or sub-task. Those have all been manually fixed... (but if you are re-running that script elsewhere, be aware!) ... they were both unnecessary and incorrectly inserted (they had the < /p> first)
By the schema these should be:
< exploration> < introduction> < p> Initial Problem Statement < /p> < /p> Possible more problem < p> < /introduction> < task> < introduction> < p> Sub explanations < /p> < /introduction> < task> -- sub-listed tasks.... stuff. < /task> < /exploration>
You can see a couple examples of both of these that I fixed within Chapter 1's mbx files, under the webwork branch.
Similarly, I think I fixed/moved out all the < aside> < /aside> tags to not be wrapped in a p, but their own part of explorations...
What do I do with material after the last task in an exploration? For example, the exploration starting on line 55 of chapter02/section2-4.mbx has this paragraph at the end: Give a geometric reason as to why some vectors above have a plus sign, and some have a minus sign.
Looks like according to the schema, that needs to get wrapped in a < conclusion> < /conclusion> tag.
OR... to avoid more complications, perhaps a: < postlude> < /postlude> tag would be better.
Then you could apply that also to the explorations you are wrapping in "statement" with "hints" ... like the exploration starting line 84 of chatper02/section2-4.mbx
That one doesn't have tasks, but got broken into two chunks... (I think mostly because of where the hint got put, but whatever).
================================================== To schedule a meeting or appointment try: https://karlrbschmitt.youcanbook.me/
On Tue, Aug 22, 2017 at 4:33 PM, David W. Farmer notifications@github.com wrote:
What do I do with material after the last task in an exploration? For example, the exploration starting on line 55 of chapter02/section2-4.mbx has this paragraph at the end: Give a geometric reason as to why some vectors above have a plus sign, and some have a minus sign.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Pelonza/multivariable-calculus-IBL/issues/30#issuecomment-324158093, or mute the thread https://github.com/notifications/unsubscribe-auth/AMRGUzYT02ttTiHZgS0fnBTg2AnwiO52ks5sa0kpgaJpZM4O8xpy .
I think "conclusion" is better, but you can change it.
Here is something for you to try:
clone https://github.com/davidfarmer/LaTeXtoLaTeX
from withing that directory, try
./ltol.py mbx inputdirectory outputdirectory
where inputdirectory ends in something like
ptx/chapter02
and outputdirectory ends in something like
ptx_new/chapter02
where you have to make the directories ptx_new and chapter02 before you run ltol.py
In the brief test I did, it worked. Note that the result is not prettyprinted, but you can do that by un-commenting line 134 in ltol.py
Probably it does not handle every case. If you notice problems then let me know what you see and the file where you see it.
Note that you have to run that script a bunch of times, because you put your files on many different directories, and my script expects to have them all in one place. No time to adjust for that right now.
Note that the script expects to be run as python2. This thread has some discussion about using this script (but note that you want to be on the master branch of LaTeXtoLaTeX)
https://groups.google.com/forum/?hl=en#!topic/pretext-support/YGWFCmaTho0
Let me know if it works. I think it is pretty close and only minor additional adjustments will be needed.
Hi David,
I downloaded and tried running the script on some files... there were some issues:
1) It doesn't actually put the new files in the output directory, it actually over-writes the original files. --I may just try to fix this in the code and do a pull request. I might also try to make it recursive for you...
2) It seems to add empty conclusion tags... which might be ok?? but I'm guessing those will not validate properly either.
3) Minor, it seems to not put the intro/conc tags on their own lines.
I may know why the empty conclusion tags are happening. Please let me know which file it occurs.
Also please cut and paste the exact ltol.py command you are using. Also please describe the structure of the new directories you made.
I intentionally turned off prettyprinting, but could possibly do a slightly better job on the formatting.
Ok. I made a pull request on your latex-to-latex for recursion.
Using that recursive code, I can convert the full directory structure. When I do that, an example of the empty conclusion brackets can be found in file: ptx_new\chapter02\section2-4.mbx, line 52-53
And it looks like it appears anywhere the code introduced an "introduction" tag...
@davidfarmer
So, turns out that in validating the tasks/explorations... If explorations have "tasks" they can't start with
... all the first content needs to be wrapped in an "introduction"
More-over, any sub-list of tasks, also can't be preceded by a
... but must be wrapped in an introduction.
My reg-exp skills aren't up to the task of creating something that correctly parses through and fixes this across all the files... I'm going to work on getting the first chapter working right as I need it next week, but I'd prefer not to have to fix them all by hand. If you can't get to them, let me know and I'll see if I can write my own script or get a student to help.