-
Notifications
You must be signed in to change notification settings - Fork 77
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
update/fix xrefs in derived classes section #770
Conversation
I upgraded from 2.3.0 to 2.7.0. It builds without trouble. |
I'll upgrade to 2.7.0 as well |
I posted about the Nodetab issue in Discord. I think the converter put them into the conversion. I would really prefer not to remove the Python because my students did their CS1 in Python. @bnmnetp convinced me to keep them in the original RST version "as pseudocode." |
The tabs were added after the conversion program... Things in tabbed interface will need a script or some manual work to help out. |
Ok, I think we can follow the example in |
I think that what was done in |
@bnmnetp do you know if tabbing of code been discussed at all among the leadership of the RST to PreTeXt conversion initiative? |
@pearcej -- So, tabs were implemented in PreTeXt sometime this spring if I recall correctly. Various people have been contributing to the converter at https://github.com/bnmnetp/Runestone2PreTeXt including. That code is there for anyone to update. Now that the PreTeXt is defined adding the output mechanisms to support the XML would not be too bad. Working on that is an easy enough one-off contribution that I'm not making it a priority for myself to write code for newly supported conversions. Each book comes with its own priorities, and I think we are getting toward the end. of books that will get converted. After that the converter has limited use. So, if it makes your life easier to update the code to emit PreTeXt versions of tabs, then I'm happy to advise, but I simply don't have the time to take responsibility for writing it. -- Andrew Scholer may also be a good resources as he has really become quite an expert on XSL. |
I don't think rerunning conversion tools is where we're at. It's easier just to fix the existing ptx. That said, I'm having a devil of a time finding any reference to tab groups in ptx. and I found this ominous comment in Runestone2PreTeXt:
|
@wrigjl for sure there comes a point where the manual updates are way better than starting over and reconverting. See here: https://pretextbook.org/examples/sample-book/noparts/html/interactive-projects.html For the source you can clone the https://github.com/PreTeXtBook/pretext repo and look at the source under examples/sample-book -- rune.xml. OR check out the annotated sample book which lets you view source for each question. (https://pretextbook.org/examples/sample-book/annotated/interactive-projects.html) |
Ah! |
Here's what I have so far. Note: I don't know if it's possible to change (a) and (b) to something else. This uses the To get this to work also requires some editing of the <exercises tabbed-tasks="inline project"/> |
Not to be pedantic, but tasks are PreTeXt's semantic way of saying that this exercise has several parts. Different output methods get different renderings. We just choose to display them as tabs. Have you tried giving the task a title? Not sure that is the answer, but it would be the first thing I would try before asking on the pretext-support group. |
@bnmnetp I don't see the explanation as pedantic. It is most helpful! Tasks look like what we are hoping for. Thanks! |
Yes, titles don't change the (a), (b) markings. In the image below "C++ implementation" is the title of the first task. Also, you can link to the specific task and the knowl will show the code (w/out syntax highlights). However, if you link to the exploration as a whole, you get a knowl that says "The interactive that belongs here is already on the page and cannot appear multiple times. Scroll to interactive. Btw, the tasks appear to be a little strange still. On this page, https://pretextbook.org/examples/sample-book/annotated/interactive-projects.html find exercise 3.20.2 and click "Introduction", (a), (b), etc. Introduction is unique, from (a) through conclusion, they all render the same (and aren't supposed to). |
I would have made the title the first tag inside a task |
That's where it is: <exploration xml:id="expl-code">
<title>Implementation of the algorithm</title>
<task xml:id="task-cpp">
<title>C++ implementation</title>
<statement>
<program language="cpp" line-numbers="yes">
... |
OK... That was just a guess on my part.... I'm not in charge of PreTeXt syntax. I would ask on the pretext-support google group if there is a way to change the labels on the tabs. I'm not a PreTeXt expert but there are plenty on that list. |
No sweat, I appreciate all of your suggestions. All in all, I think this is the way to go for the html/runestone rendering (even if we're stuck with (a), (b), ...), and I'm going to apply it to this section and see what it looks like. |
@pearcej This is worth looking at again. This is an attempt at using task's to tab group the C++ and python implementations. |
@wrigjl Exploration 1.13.1. The complete LogicGate class looks good. The others all only show the C++ implementation on both tabs in my local build. Are the later two explorations working for you locally? |
I think this is a a bug in the pretext markup. I'll see if it's a known issue. |
Signed-off-by: Jason L. Wright <jAson@thought.net>
This appears to be a pretext markup bug for sure (it happens in the sample book, too). I propose we move forward with this, but without the change to @pearcej Can you try a build with this applied but with the following line deleted from <exercises tabbed-tasks="inline project"/> |
It seems like the best choice for now. |
@pearcej Ok, let's merge this as it stands (I removed the inlining from the pretext publication file and made sure the branch was completely up to date). Btw, I showed the tab problem to Rob Beezer and he was aware of it. We also had a discussion about better handling the (a) (b) markers and I think those will (eventually) look nicer too |
Great news about what Rob said. |
This is a replacement for #767, but updated to the current master. Please apply and try a build before merging. Please send along the pretext output if it fails (I've built it twice with pretext 2.6.1).