Giter Club home page Giter Club logo

pretext's People

Contributors

alex-jordan avatar ascholer avatar ascholerchemeketa avatar bjones1 avatar bnmnetp avatar cmhughes avatar daverosoff avatar davidfarmer avatar dbrianwalton avatar jdeisenberg avatar jeansebastienturcotte avatar jirilebl avatar jjrsylvestre avatar kcrisman avatar mdoob avatar mitchkeller avatar nwintersgill avatar oscarlevin avatar rbeezer avatar rpruim avatar saludes avatar sean-fitzpatrick avatar siefkenj avatar sklarjk avatar stevenclontz avatar trshemanske avatar valelav avatar vincentcote87 avatar whaynes avatar zorkow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pretext's Issues

Extensible arrows break partial lines in LaTeX tables

I am implementing horizontal partial lines across tables, of variable thickness. The minimal working example from tex.se is the basis of the implementation. Add in the extensible arrow package extpfeil and it silently breaks. The horizontal lines just become their default thickness. Have not decided what to do about this conflict (tables should win, I think), but a fix would be even better. I cannot see how the conflict arises.

http://tex.stackexchange.com/questions/24549/horizontal-rule-with-adjustable-height-behaving-like-clinen-m

\documentclass{book}

% \usepackage{extpfeil}

\newlength{\Oldarrayrulewidth}
\newcommand{\Cline}[2]{%
  \noalign{\global\setlength{\Oldarrayrulewidth}{\arrayrulewidth}}%
  \noalign{\global\setlength{\arrayrulewidth}{#1}}\cline{#2}%
  \noalign{\global\setlength{\arrayrulewidth}{\Oldarrayrulewidth}}}
\begin{document}

\begin{tabular}{ccc}
  a & b & c \\\Cline{2pt}{2-3}
  d & e & f \\\Cline{5pt}{1-2}
\end{tabular}

\end{document}

urls should have title attribute

There is no tooltip for the <url href="...">text</url> tag. That is against good accessibility guidelines as well as normal <a> tag practice. At least one should be able to do so, but it doesn't seem to work.

Can't click on contents or "book icon" links

In the default presentation, there is a little book symbol on the upper left which does nothing useful (keeps you on the same page but reloads) and the word "Contents" does not give you the front TOC page as one might expect. In effect, it becomes impossible to go up to the top without clicking "up" several times when drilled far down into a <book>.

Script elements in Sage workseets

I seem to recall that the Sage notebook intercepts script tags in worksheet source. This has required disabling

  • Analytics
  • Google code prettification
  • Geogebra applets

And there will be more. I am pretty sure there is a workaround - this is a reminder to go find it.

Warn on tabs

Some sections of "code" in source have critical alignment properties, and even if not, the current "sanitize-sage-code" template gets confused with tabs. So we should check first for a tab character and issue a warning.

percent in math mode doesn't work right

<m>0\leq x <percent /> m &lt;m</m>

If I leave it as %, it works fine in html but not latex. If I leave it this way, it doesn't show up in HTML. Exactly the thing that <percent /> was supposed to avoid... sigh. It's my fault for putting non-math in there, I know, but anyway thought it was worth reporting. I have a feeling some other such things will also not render properly in math mode. My workaround was to get the % out of the math and put it in a code tag for now.

remove all whitespace between the children of headings

I'm doing the spacing for environment and section headings in the CSS, as mentioned in BooksHTML/mathbook-assets/issues/25. Part of it was broken before, but it's fixed now, so it will be important that you remove the whitespace from between the <span> elements so that the browser doesn't interpret it as a single space.

There are a couple of different ways to do this:

<span class="type">Proof</span><span class="codenumber">1.2.3</span><span class="title">Loch Ness Monster Proof</span>
<span class="type">Proof</span
><span class="codenumber">1.2.3</span
><span class="title">Loch Ness Monster Proof</span>
<span class="type">Proof</span><!-- no whitespace
--><span class="codenumber">1.2.3</span><!-- no whitespace
--><span class="title">Loch Ness Monster Proof</span>

There also might be some XSLT specific ways to handle whitespace. This looks promising.

Multicolumn and MathJax can be a bit haywire

HTML multicolumn lists with semi-complicated MathJax seem to sometimes put just one item on a line (or otherwise skip over certain items).

Two known examples: Judson's AATA Exercises 1.17 and 4.4.

Likely beyond our control and one to report to MathJax.

Per-document settings

It should be possible to set a document-wide switch from the XML source, and perhaps have it "overideable" by the "param" passing on the command-line or in extensions of the XSL.

Add algorithm tag

Like fact, theorem, statement, etc. This is common enough in things like discrete math textbooks. (I didn't find it in the sample article, anyway.)

Allow nested toc menus on left (or something like that)

In a web interface it makes more sense to have a shorter list on the left of just chapters (say, or to whatever depth you want since you provide some configuration) but then allow either mouseover or clicking to expand that particular thing. Say that it looks like

  1. Foo
  2. Bar
  3. Foobar
    3.1 Chocolate foobar
    3.2 Vanilla foobar
  4. Eggs

and then you want to see the list of subsections in 3.2, you could click or mouseover it, just like in zillions of very well-designed web pages like Amazon, nested javascript menus or whatnot.

Clearly this would need to be an option only, and maybe it should be tagged "wish list" or something, but figured I'd put it out there.

Document various things that aren't documented.

As requested in #31, here is a ticket with a list of things that need to be documented. I'll keep changing this list as things are done.

  • The hierarchy of containers, e.g. that appendices only are at the level of chapters for LaTeX (and probably shouldn't work for HTML, though it does)
  • The strict hierarchy in such environments - no <p> or other stuff outside the few legal containers in them.
  • When you must use <p>, for instance apparently inside remarks.
  • Math mode, ala percent discussion at #43
  • What the heck the <acro> tag is for (?)
  • Exactly how to make an index - namely, makeindex filename for filename.tex
  • The difference between <md>, <me>, <mdn>, <men>. (And using number="no".) Eventually I figured it out, but because the d doesn't convey "rows" to me, I wasn't sure at first exactly what was going on.
  • More to come.

Allow collapsible subsection stuff on the left

The little mini-toc on the left of a typical MBX output is not collapsible by chapter. Likewise, it is not "uncollapsible" in the sense that if one clicks on a subsection with sub subsections, that one would want to see a list of the subsubsections on the left.

enumitem

The enumitem package appears to only load if there are exercises or references. But it is also needed for lists, since currently the enumitem optional argument is used in things like \begin{itemize}[label=\textbullet].

I can fix this. Just making a note here. I may work on a pull request to handle a bunch of these issues later, with a commit for each one.

Inline math in captions

Captions get a bold font, so the math should do the same.

Wrapping each element's contents in \mathbf{} would appear to look perfect.

@mxdubois: is the style (font weight) for captions stable?

Minimal readme for mbx script

This is sort of hidden in the scripts directory, and I didn't even know about it, and I still am not quite sure what it does - presumably helps with conversion to sws? A readme or some other mention of it would be great, as time allows. See also #16.

image description

Image-like elements could benefit from a description tag to put in alt test. Possibly as a tooltip in pdf. For <image>, <tikz>, <sageplot>, <asymptote>.

Equivalent of <pre> tag

For now, workaround is

        <program>
            <input>
            stuff
            </input>
        </program>

at least I think that should work, but maybe that's not ideal.

MathJax zoom on displayed math

Hi Rob,
This is a great project! We met last year (June 2013) in Vancouver at the WeBWorK coding camp.

I've been playing with the mathbook, and it works very nicely. I have noticed that when viewing the html version, if I enable Zoom factor for MathJax, then the displayed math mode gets cut off when zoomed in. I'm using the sample-article.xml; I've posted a screenshot here:

http://spot.pcc.edu/~chughes/nozoom.png

It seems like the issue stems from:

http://aimath.org/mathbook/mathbook-modern-3.css

Do you have any insight on this?

Chris

Old ToC markup with extraneous heading

Hey Rob,

You may have fixed this somewhere and not yet merged it into "dev", but when I generated the sample-article off the "dev" branch, I got markup like this:

<div id="toc-navbar-item" class="navbar-item">
    <h2 class="navbar-item-text icon-navicon-round ">Table of Contents</h2>
    <nav id="toc"><h2 class="link"><a href="section-1.html">1 Introduction</a></h2>
        {{ all good in here }}
    </nav>
</div>

It looks like the old ToC markup. You can remove the <div id="toc-navbar-item"> and <h2 class="navbar-item-text icon-navicon-round"> elements. We just need the <nav id="toc"> now.

You can view it here.

Thanks!

Allow override of tag name for display

As requested in #21, I am asking for a <comment> tag. In this case, it should not be something numbered - that would be a <remark>. Ideally it could be marked up in some way with a custom style sheet. Comments are just asides that need to be clearly marked as asides; that is not really possible in the usual <p> format, as parentheses around a paragraph is not a strong indication.

(Alternately, one could have a switch on various things allowing them to not be numbered; an unnumbered remark is a comment, in my current thinking, though probably not universally.)

Asymptote graphics in Sage worksheets

Asymptote makes SVG images, but when the image is lots of pixels not amenable to SVG, it includes some PNG images. These migrate to the DATA+'/images' directory, but teh SVG include mechanism seems to be confused by Sage's redirection on the data directory.

  1. Experiment in a scratch worksheet with placing the files a level higher.
  2. Use a single PNG replacement as a fallback consistently (so do not package the main SVG, making this automatic). Use existing code (the glob list is non-empty) to see when this is necessary.

Comprehensive test/sample pages

I've brought this up in a couple of email chains, but I'm going to make an issue for it, so it doesn't get lost in the shuffle.

I think some comprehensive test pages would make it a lot easier to ensure styling and markup is working as intended across all features. They'd also double as great examples for prospective authors.

We need...

  • A page for each supported layout
    • has-sidebar-left, has-sidebar-right (?), both (?), neither
  • A page for each level of chunking that contains all the environments/features allowed in that chunk
    • whatever subsections make sense
    • minimal lorem ipsum text
    • theorem-like, example-like, exercise-like, proof-like, etc.
    • knowls
    • code block, code inline, sagecells
    • tables
    • figures (with and without caption)
    • images
    • blockquotes
    • author information, summary-links, terminology, references, etc
    • Mathjax displays (short and wide)
    • any special cases where something weird happens when one element comes after another (we can add these as they come up).
  • Instructions in the README for generating them all.

Here's an example from a premium wordpress theme. It's not exactly like what we need, but it gives you an idea of how this could be extremely useful both as a test page and a demo.

Here's another example that also displays the code for generating each item right above the item. Something like that might make it a handy guide for authors.

make first compilation have no error messages

This is probably not the ideal intro to MBX for those who haven't already seen you give lots of presentations on it. Yes, I am on the dev branch.

$ xsltproc xsl/mathbook-html.xsl examples/sample-article.xml
examples/sample-article.xml:1068: element biblio: validity error : ID biblio-strang-article already defined
                <biblio type="raw" xml:id="biblio-strang-article">Gilbert Strang
                                                                 ^
URL: demonstration-1.html
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: <cite provisional="just-a-test"> is deprecated, convert to <xref provisional="just-a-test">
MBX:WARNING: <cite ref="biblio-only-a-test> is deprecated, convert to <xref ref="biblio-only-a-test">
MBX:WARNING: unresolved <xref> due to ref="pointer-to-nowhere-as-test"
MBX:WARNING: Cross-reference (xref) with no ref or provisional attribute, check spelling
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "note" into language for code "en-US"
MBX:WARNING: could not translate string with id "backmatter" into language for code "en-US"

CSS for byline in a section

Just a note that the CSS for a byline at the level of a section might get some attention. A byline at the level of a chapter stands out as separate from the text, but not so much with a section.

CSS for titles of unnumbered sections

For example, in a preface element, with a title, the title comes out with space before it. I think the space is meant to be there between a section number and the title, but since there is no number, the title looks oddly indented.

Use <time> for dates

Would be good to use <time class="publication-date" pubdate datetime="2011-07-03"> for dates like the published date on the frontmatter.

Here's the reference page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time

The pubdate and datetime attributes are from the HTML spec.

The publication-date class would be good for styling. I could make it bold if you like or bold and light gray. Up to you.

Not high priority, but good practice for SEO and such.

Allow copyright elsewhere than colophon (and document)

It doesn't seem to just magically turn up in frontmatter. In scla it is in the "colophon" but frankly you should be able to put it wherever you want to, and not everyone wants a "colophon". It's also not mentioned in the article, even though transferring copyright of articles is this annoying thing we have to deal with for many publishers.

About the `tgroup` tag

Hi Rob,
I've been wondering about the tgroup tag.

Referencing sample-article.xml, I see that you have code such as

 <table xml:id="table-euler1">
                <tgroup cols="4" align="center">

This puts all 4 columns as centered.

I've been working on a feature that allows the following mark-up:

 <table>
                  <caption/>
                  <coltypes>
                    <col align="center"/>
                    <col align="left"/>
                    <col align="right"/>
                    <col align="decimal" format="4.4"/>
                    <col align="decimal" format="6.6"/>
                  </coltypes>

which produces tables such as the following

27644100-969d-11e4-8756-59b8876ed364

Note that each column has different alignment, and that it also allows decimal alignment.

I have another feature (called multobjects) that allows multiple tables, multiple figures, figures and tables, subfigures, subtables, to be placed next to each other.

Both of the features that I have developed do not use the tgoup element. Before I submit these features for your review, I wondered if I could know your thoughts on the tgroup tag--other than column types, what does it do? :) If I've misunderstood its use, I'm sure I can work it back into my features.

Thanks for your time
Chris

Can't have hash/pound/sharp character in latex

! You can't use `macro parameter character #' in horizontal mode.
l.991 ...thon, comments on them are given after '#
                                                  ' signs.%

Replacing it by <c>#</c> works, but maybe sometimes I don't WANT to make it code.

Other tikz-based packages

It would be nice to be able to specify some extra packages when using the <tikz> tag. The packages would be loaded in the template before the \begin{document}.

For instance, right now I'd like to use the forest package to make a tikz-based tree diagram. I think there are a lot of packages out there that would work similarly.

I'm happy to make modifications to extract-tikz.xsl and submit a pull request, but I'm interested if you have a suggestion for the right way to do this.

Pass in XSL parameters to MBX script

It would be convenient, especially for testing, to be able to send a string through MBX to the Sage (or otherwise) XSL converters in their command-line invocations.

It will tokenizing them by spaces for the Python subprocess command I think.

Add the class "mathbook-content" to #content

I'm ready to merge feature/refactor into develop, but it will break the content styling unless you add the class "mathbook-content" to the <div id="content"> element. If you want to test that it works, you can use http://mathbook.staging.michaeldubois.me/feature/refactor/stylesheets/mathbook-modern-3.css.

This refactor will have a mathbook-content.css for external use (Python Notebooks, etc). As you've probably guessed, that file will add content styling for everything inside of an element with the class "mathbook-content".

You will not have to add mathbook-content.css to the standard mathbook html, though. It's all included in mathbook-modern.css.

When you're ready for it, I'll complete the merge.

Per-project CSS file inclusion

Develop a way for an author to specify a CSS file that extends the stock style provided for HTML. This would likey be a param as part of processing, since adding it to <docinfo> does not seem entirely right (the default files are given as param's).

Cross-worksheet links for Sage worksheets

It seems impossible to predict a link from worksheet to another. So we have killed all linking in Sage worksheets.

It should be possible (generally) to manufacture intra-page links (href="#foo") and then recognize them for use.

This would be wise for single worksheet documents.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.