PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

WeBWorK set def search depth #489

Open Alex-Jordan opened 7 years ago

Alex-Jordan commented 7 years ago

WeBWorK only searches to a certain file depth for .def files in the templates folder. The distribution default is:

$options{setDefSearchDepth}=4;

But I needed to change it to 5 to see the .def files from APEX. Haven't thought it through, but maybe other books with exercises in subsections and subsubsections would need to go deeper. Probably should just document this in MBX rather than think about changing the WeBWorK default.

rbeezer commented 7 years ago

Why does that even need to be configured? ;-) Don't answer that.

We control the "chunk.level" as a stringparam at build time, so we could even warn if an author sets it "too large." Documentation would be good too.

Alex-Jordan commented 7 years ago

Why does that even need to be configured? ;-) Don't answer that.

Ignoring you because the answer is so short. It's because the search dives into the OPL as well as local folders, and therefore can become a beast in both breadth and depth.

Our .def files all appear to end up in a WeBWorK course's folder: /templates/local/BookTitle/def/ which explains the 5 if you count right. And within that folder the def files are not spread out in a deeper folder tree. For instance with APEX, set1_1 and set2_1 are both there. So I'm thinking a connection to chunk.level won't help.

Option A: lobby webwork to make 5 be the default search depth. Option B: educate MBX authors using webwork in actual webwork course sheels that they need to locally override this search depth. Option C: We put problem files in a subtree of /templates/local/BookTitle/, but we put set definition files into a folder /templates/local/BookTitle-ProblemSets/ so that the search depth of 4 is OK.

rbeezer commented 7 years ago

Aah, chunk.level only affects the layout of the PG problems themselves. Got it.

I kinda like "C", but I'm not sure what a "sheel" is in "B". Makes it obvious what and where.

On 02/12/2017 03:11 PM, Alex Jordan wrote:

Why does that even need to be configured? ;-) Don't answer that.

Ignoring you because the answer is so short. It's because the search dives into the OPL as well as local folders, and therefore can become a beast in both breadth and depth.

Our .def files all appear to end up in a WeBWorK course's folder: /templates/local/BookTitle/def/ which explains the 5 if you count right. And within that folder the def files are not spread out in a deeper folder tree. For instance with APEX, set1_1 and set2_1 are both there. So I'm thinking a connection to chunk.level won't help.

Option A: lobby webwork to make 5 be the default search depth. Option B: educate MBX authors using webwork in actual webwork course sheels that they need to locally override this search depth. Option C: We put problem files in a subtree of /templates/local/BookTitle/, but we put set definition files into a folder /templates/local/BookTitle-ProblemSets/ so that the search depth of 4 is OK.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rbeezer/mathbook/issues/489#issuecomment-279259168, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy2cjBzSQF1W2fO8QdDZYeSr_-Wt1wqks5rb5GJgaJpZM4LdfWd.

Alex-Jordan commented 7 years ago

"sheel" ~ "shell"

A "shell" is the environment in which you manage WeBWorK when you are assigning problems for credit (as opposed to just putting them in MBX HTML output).

Option C would take the least effort on everyone's part. Except that it begs a few nit-picky questions for us to answer.

  1. /templates/local/BookTitle-ProblemSets/ or /templates/local/BookTitle_ProblemSets/ or /templates/local/BookTitle_Problem_Sets/ or ????
  2. Should the problems be put in /templates/local/BookTitle-Problems/ or something like that for symmetry?
  3. And then same question as 2 with the set header files, currently in /templates/local/BookTitle/header/. Move to something like /templates/local/BookTitle-Headers/ ?
rbeezer commented 7 years ago

Didn't get to that conclusion. ;-)

I don't like "B". Teachers don't like to be educated. Horrible students. ;-)

I like dashes, but maybe underscores is WW custom. We must already have a "title-filesafe" template that replces blanks with underscores. I seem to think there was a reason, but can't find it. Not making yet another title template argues for keeping underscores.

Basically, whatever you suggest I think will be easy to engineer. And my opinion is not worth much, so go ahead and decide what will interface best with the WW world.

Rob

On 02/12/2017 03:48 PM, Alex Jordan wrote:

"sheel" ~ "shell"

A "shell" is the environment in which you manage WeBWorK when you are assigning problems for credit (as opposed to just putting them in MBX HTML output).

Option C would take the least effort on everyone's part. Except that it begs a few nit-picky questions for us to answer.

  1. /templates/local/BookTitle-ProblemSets/ or /templates/local/BookTitle_ProblemSets/ or /templates/local/BookTitle_Problem_Sets/ or ????
  2. Should the problems be put in /templates/local/BookTitle-Problems/ or something like that for symmetry?
  3. And then same question as 2 with the set header files, currently in /templates/local/BookTitle/header/. Move to something like /templates/local/BookTitle-Headers/ ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rbeezer/mathbook/issues/489#issuecomment-279264341, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy2ciJRhq-yfBQirLCZ4fLNa-upl88aks5rb5pRgaJpZM4LdfWd.

Alex-Jordan commented 7 years ago

OK, underscores in these things become spaces in certain displays; that's just how it is. Using the book with title "APEX Calculus", I suggest:

local/APEX_Calculus_Problem_Files/ local/APEX_Calculus_Set_Definition_Files/ local/APEX_Calculus_Set_Definition_Files/headers

The first one has a file tree corresponding to the chunking. The second one has all .def files with no file tree. Each .def file gets a name like 1_1-An_Introduction_To_Limits.pg. The third one makes sense as a subfolder of the folder with the .def files, because headers only make sense in the context of a set definition. At present, we are only creating a uniform set header file that works for both WeBWorK HTML output and WeBWorK pdf output. I think we can keep it that way, but in theory we could split and have .../HTML_headers/ and .../hardcopy_headers/ if we ever wanted to.