PreTeXtBook / pretext

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

Add <part> on refactor of chunking code #25

Closed rbeezer closed 9 years ago

rbeezer commented 9 years ago

For kcrisman and kkedlaya.

Design question: should the distinction between a book and an article simply be based on which sections are present?

kcrisman commented 9 years ago

Maybe. My real sense is that the names of subitems should be 100% configurable. What's the current state?

davidfarmer commented 9 years ago

I can think of two reasonable ways to handle this:

1) Use exactly the standard LaTeX divisions, starting with "part" and going down to "subsubsection." Have a small number options for chunking these in standard ways.

2) Allow an arbitrary number of levels in the hierarchy, with (almost) arbitrary names. Allow an option for arbitrary chunking at the output file level, and configurable depth in the TOC, and configurable expand/collapse options in the TOC.

The first option is reasonable because you can do it once and forget about it, and 95 percent of the people will find it satisfactory. The second option has a possibly large amount of one-time work, probably by one person. Anything between those options seems like asking for trouble.

I have been thinking about the second option for SL2X, and if I think about it enough I will probably conclude that I can do it and it maybe isn't really that hard. But I don't know enough about XSLT to guess if the same is true for MBX.

rbeezer commented 9 years ago

I thought seriously about allowing generic

to many depths. It has its advantages. But it gets very confusing when you author. I've got nested lists going lately, and it can be a real rat's nest sometimes if you lose your place. With named subdivisions, and a good editor (tag-completion, tag-matching), it is hard to make syntax errors (and I rarely do now). I could say more, but I think part/chapter/section/subsection/subsubsection is superior.

I am definitely shooting for 95% satisfaction resulting in 100% ease-of-use. Structure should be an MBX core feature and should not be configurable or customizable. The presentation of that structuure can be. So I like (1) and it would be a huge effort/chore to switch now and would break many, may things. As is, chunking can happen easily at any level and it is totally generic/general. So there is no need to limit it.

Rob

On 20/01/2015 04:17, davidfarmer wrote:

I can think of two reasonable ways to handle this:

1) Use exactly the standard LaTeX divisions, starting with "part" and going down to "subsubsection." Have a small number options for chunking these in standard ways.

2) Allow an arbitrary number of levels in the hierarchy, with (almost) arbitrary names. Allow an option for arbitrary chunking at the output file level, and configurable depth in the TOC, and configurable expand/collapse options in the TOC.

The first option is reasonable because you can do it once and forget about it, and 95 percent of the people will find it satisfactory. The second option has a possibly large amount of one-time work, probably by one person. Anything between those options seems like asking for trouble.

I have been thinking about the second option for SL2X, and if I think about it enough I will probably conclude that I can do it and it maybe isn't really that hard. But I don't know enough about XSLT to guess if the same is true for MBX.

— Reply to this email directly or view it on GitHub https://github.com/rbeezer/mathbook/issues/25#issuecomment-70594285.

davidfarmer commented 9 years ago

I was heading to that same decision for SL2X, until this thread which made me start thinking about allowing more general structures. I am happy to go back to my original plan.

Let me know when you will start implementing "part" because I'll do the SL2X work in parallel. I am not in a hurry.

Also, from the author's perspective there is one more level: "paragraph", which can be thought of as a subsubsubsection* that you can put anywhere.

On Mon, 19 Jan 2015, Rob Beezer wrote:

I thought seriously about allowing generic

to many depths. It has its advantages. But it gets very confusing when you author. I've got nested lists going lately, and it can be a real rat's nest sometimes if you lose your place. With named subdivisions, and a good editor (tag-completion, tag-matching), it is hard to make syntax errors (and I rarely do now). I could say more, but I think part/chapter/section/subsection/subsubsection is superior.

I am definitely shooting for 95% satisfaction resulting in 100% ease-of-use. Structure should be an MBX core feature and should not be configurable or customizable. The presentation of that structuure can be. So I like (1) and it would be a huge effort/chore to switch now and would break many, may things. As is, chunking can happen easily at any level and it is totally generic/general. So there is no need to limit it.

Rob

On 20/01/2015 04:17, davidfarmer wrote:

I can think of two reasonable ways to handle this:

1) Use exactly the standard LaTeX divisions, starting with "part" and going down to "subsubsection." Have a small number options for chunking these in standard ways.

2) Allow an arbitrary number of levels in the hierarchy, with (almost) arbitrary names. Allow an option for arbitrary chunking at the output file level, and configurable depth in the TOC, and configurable expand/collapse options in the TOC.

The first option is reasonable because you can do it once and forget about it, and 95 percent of the people will find it satisfactory. The second option has a possibly large amount of one-time work, probably by one person. Anything between those options seems like asking for trouble.

I have been thinking about the second option for SL2X, and if I think about it enough I will probably conclude that I can do it and it maybe isn't really that hard. But I don't know enough about XSLT to guess if the same is true for MBX.

— Reply to this email directly or view it on GitHub https://github.com/rbeezer/mathbook/issues/25#issuecomment-70594285.

— Reply to this email directly or view it on GitHub.[AAM6LCLyy1RB4TF-JaDrkhvS3AKLYrXIks5njfG2gaJpZM4DT0XN.gif]

kcrisman commented 9 years ago

Also, from the author's perspective there is one more level: "paragraph", which can be thought of as a subsubsubsection* that you can put anywhere.

Interesting - elsewhere it says that this is the same as <p>, but maybe that is not quite the case? (Are they numbered, for instance?)

Structure should be an MBX core feature and should not be configurable or customizable. The presentation of that structuure can be.

Examples of this would be really really helpful to see. Maybe I just have to look at the source of some of the other books - just kind of a drag to search through them looking for exactly what I'm looking for.

Anyway, sounds like this confirms that adding <part> is the way to go on this ticket.

davidfarmer commented 9 years ago

A contains a and one or more <p>s.</p> <p>That title is typically typeset an bold-face words at the start of the first <p>, in line with the first actual sentence of that paragraph, not numbered.</p> <p>On Tue, 20 Jan 2015, kcrisman wrote:</p> <blockquote> <pre><code> Also, from the author's perspective there is one more level: "paragraph", which can be thought of as a subsubsubsection* that you can put anywhere.</code></pre> <p>Interesting - elsewhere it says that this is the same as <p>, but maybe that is not quite the case? (Are they numbered, for instance?)</p> <pre><code> Structure should be an MBX core feature and should not be configurable or customizable. The presentation of that structuure can be.</code></pre> <p>Examples of this would be really really helpful to see. Maybe I just have to look at the source of some of the other books - just kind of a drag to search through them looking for exactly what I'm looking for.</p> <p>Anyway, sounds like this confirms that adding <part> is the way to go on this ticket.</p> <p>— Reply to this email directly or view it on GitHub.[AAM6LOz6oSn0dEOHIB0ZSXp6F2uZT2h5ks5njmNGgaJpZM4DT0XN.gif]</p> </blockquote> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rbeezer"><img src="https://avatars.githubusercontent.com/u/1881714?v=4" />rbeezer</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>Exactly. No numbers, no chunking at this depth, can sit inside of most any other subdivision. It is a kind of light-weight section. Modeled after LaTeX's \paragraph (which technically sits below subsubsection, and above subsubparagraph, but is not not numbered by default.) I use it frequently for shorter documents.</p> <p>Rob</p> <p>On 20/01/2015 17:10, davidfarmer wrote:</p> <blockquote> <p>A <paragraph> contains a <title> and one or more <p>s.</p> <p>That title is typically typeset an bold-face words at the start of the first <p>, in line with the first actual sentence of that paragraph, not numbered.</p> <p>On Tue, 20 Jan 2015, kcrisman wrote:</p> <blockquote> <p>Also, from the author's perspective there is one more level: "paragraph", which can be thought of as a subsubsubsection* that you can put anywhere.</p> <p>Interesting - elsewhere it says that this is the same as <p>, but maybe that is not quite the case? (Are they numbered, for instance?)</p> <p>Structure should be an MBX core feature and should not be configurable or customizable. The presentation of that structuure can be.</p> <p>Examples of this would be really really helpful to see. Maybe I just have to look at the source of some of the other books - just kind of a drag to search through them looking for exactly what I'm looking for.</p> <p>Anyway, sounds like this confirms that adding <part> is the way to go on this ticket.</p> <p>— Reply to this email directly or view it on GitHub.[AAM6LOz6oSn0dEOHIB0ZSXp6F2uZT2h5ks5njmNGgaJpZM4DT0XN.gif]</p> </blockquote> <p>— Reply to this email directly or view it on GitHub <a href="https://github.com/rbeezer/mathbook/issues/25#issuecomment-70668005">https://github.com/rbeezer/mathbook/issues/25#issuecomment-70668005</a>.</p> </blockquote> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rbeezer"><img src="https://avatars.githubusercontent.com/u/1881714?v=4" />rbeezer</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>On 20/01/2015 16:52, kcrisman wrote:</p> <blockquote> <pre><code>Also, from the author's perspective there is one more level: "paragraph", which can be thought of as a subsubsubsection* that you can put anywhere.</code></pre> <p>Interesting - elsewhere it says that this is the same as |<p>|, but maybe that is not quite the case? (Are they numbered, for instance?)</p> <pre><code>Structure should be an MBX core feature and should not be configurable or customizable. The presentation of that structuure can be.</code></pre> <p>Examples of this would be really really helpful to see. Maybe I just have to look at the source of some of the other books - just kind of a drag to search through them looking for exactly what I'm looking for.</p> </blockquote> <p>What is "this"?</p> <paragraph> or "presentation of structure"? > Anyway, sounds like this confirms that adding |<part>| is the way to go on this > ticket. > > — > Reply to this email directly or view it on GitHub > https://github.com/rbeezer/mathbook/issues/25#issuecomment-70664979. </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/kcrisman"><img src="https://avatars.githubusercontent.com/u/1775728?v=4" />kcrisman</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Exactly. No numbers, no chunking at this depth, can sit inside of most any other subdivision. It is a kind of light-weight section. </p> </blockquote> <p>Perfect, this is actually what I was looking for for some stuff, maybe for some of my current subsubsections.</p> <blockquote> <p>What is "this"? <paragraph> or "presentation of structure"?</p> </blockquote> <p>Presentations of structure. Like how to use css or something to (easily) customize presentation of things. See <a href="https://groups.google.com/forum/#!topic/mathbook-xml-support/E7QTemrZybo">https://groups.google.com/forum/#!topic/mathbook-xml-support/E7QTemrZybo</a> where the conversation has already begun.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/kcrisman"><img src="https://avatars.githubusercontent.com/u/1775728?v=4" />kcrisman</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>By the way, in the localization file there is already</p> <pre><code> <localization string-id='part'><xsl:text>Part</xsl:text></localization></code></pre> <p>as well as a <code><volume></code> element. Are those relevant? (Maybe you already implemented it and just forgot?)</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rbeezer"><img src="https://avatars.githubusercontent.com/u/1881714?v=4" />rbeezer</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>Not implemented. Planning ahead while I had translators.</p> <p>Rob</p> <p>On 20/01/2015 20:53, kcrisman wrote:</p> <blockquote> <p>By the way, in the localization file there is already</p> <table> <thead> <tr> <th><localization string-id='part'>xsl:textPart/xsl:text</localization></th> </tr> </thead> <tbody> </tbody> </table> <p>as well as a |<volume>| element. Are those relevant? (Maybe you already implemented it and just forgot?)</p> <p>— Reply to this email directly or view it on GitHub <a href="https://github.com/rbeezer/mathbook/issues/25#issuecomment-70709836">https://github.com/rbeezer/mathbook/issues/25#issuecomment-70709836</a>.</p> </blockquote> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/kcrisman"><img src="https://avatars.githubusercontent.com/u/1775728?v=4" />kcrisman</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>Understood, makes sense.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/kcrisman"><img src="https://avatars.githubusercontent.com/u/1775728?v=4" />kcrisman</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>Since you've now implemented poems (which I'm sure I'll find a way to get in my project), and since I plan to work on using this again off and on for the next several weeks, wondering whether this particular item is in the near future.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rbeezer"><img src="https://avatars.githubusercontent.com/u/1881714?v=4" />rbeezer</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>Now have <code><part></code> (roughly) at 917273b7. Two caveats:</p> <ol> <li>Their numbers should be Roman, but are now Arabic in HTML. Easy to fix when I do the hard job of fixing up numbering generally.</li> <li>Chapters numbers are reset for each part. This contradicts out-of-the-box LaTeX. But it was easiest to change LaTeX to sync with HTML. This will be configurable at #116.</li> </ol> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>