-
Notifications
You must be signed in to change notification settings - Fork 205
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
Make WeBWorK image widths be percentages #736
Conversation
You'll need to kill your local copy of this branch, because of the commit message edit in the previous PR. |
Off-duty tomorrow, so message will need to wait for Thursday. Please take a look at the |
1a5614e
to
1166a4f
Compare
I force pushed with the suggested edits. But I see that I will have to do so again. So wait until I say something, or Thursday, whichever comes later :) |
No problem.
When I fetch (not pull) I rename the branch to something that makes sense to me
locally. I don't think new commits up on GitHub cause me any problems, so long
as I haven't built on top of the old ones locally in the meantime. Even then,
if they are not too intermingled, I can probably work it out.
I can probably work up the deprecations independently anyway. But not tonight.
…On 09/26/2017 09:13 PM, Alex Jordan wrote:
I force pushed with the suggested edits. But I see that I will have to do so
again. So wait until I say something, or Thursday, whichever comes later :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#736 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABy2cnwyjemwpxeqs1A8MbZd8vKQJpnHks5smctUgaJpZM4PlJnI>.
|
OK, I do have questions. In WW, an I considered adding the full sidebyside machinery to And (b), I'm not sure how it would work. In HTML and LaTeX, the So I'm having trouble seeing how a full sbs implementation would work for PG. Because if it can't, I keep the simple sbs template I have now for PG, which merely applies image and tabular templates. Should I forget about sbs machinery, but still ask authors to specify their widths in the parent sbs? And the image uses its parent's "widths" to declare its width? |
In other words, which is right for within a webwork?
or
where if using the latter, the XSLT is not going to be the full mechanism you've developed elsewhere. The |
Too late to be too coherent, but this sounds right. Let's be consistent, so
authors don't need to remember different ways of doing things. We'll just want
to warn about multiple items in a "sidebyside" (later).
Look around - the template that gets the width looks outward to the enclosing
sidebyside, perhaps via computing a $layout, or something like that. See if you
can avoid doing too much duplicative until you need to convert a percentage into
a pixel count.
…On 09/26/2017 09:48 PM, Alex Jordan wrote:
or
|<sidebyside widths="25%"> <image pg-name="$gr[0]"/> <sidebyside> |
where if using the latter, the XSLT is not going to be the full mechanism you've
developed elsewhere. The |image| would just look to its parent's ***@***.***|,
maybe check that there is only a single percentage there, and use that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#736 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABy2cjhTHkI65V4sCIm_3PhF-7MHNN7aks5smdOpgaJpZM4PlJnI>.
|
1166a4f
to
39c3e03
Compare
OK, ready for you to look at again. Common did not have a "get-width-percentage" template matching on Common had "get-width-percentage" matching on So I hope I didn't overlook something, but I removed the one from the latex style sheet and just added the additional match to common. I'm going to need that template for the forthcoming |
To list them here in one place, I think the deprecations are that webwork//sidebyside/image[@width] moves to webwork//sidebyside[@widths]/image. And instead of being a pixel count, it's a percentage. And maybe now is when you'd add some sort of alert that in this context, widths should only have on width and the sbs should only have one tabular or image child. And this all has ramifications for the schema that you understand far better than I. |
Down the rabbit hole, and back. <xsl:template match="image[ancestor::sidebyside]|video[ancestor::sidebyside]|jsxgraph[ancestor::sidebyside]" mode="get-width-percentage"> copied into |
Perhaps the final template in the chain of overrides/replacements needs a |
Most templates in webwork-pg.xsl start the match with "webwork//..." for
precisely this kind of reason.
You could add that before each option, or use "and ancestor::webwork".
Either way.
Sorry for the oversight.
…On Wed, Nov 8, 2017 at 9:48 PM, Rob Beezer ***@***.***> wrote:
Perhaps the final template in the chain of overrides/replacements needs a and
ancestor::webwork in it? I'll test later.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#736 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEg3AOO67wzfYmJjqSh1PDB0fBjD-U68ks5s0pJFgaJpZM4PlJnI>
.
--
Alex Jordan
Mathematics Instructor
Portland Community College
|
OK, immediate problem solved. Limiting to
No problem. I was being spectacularly dim-witted about debugging it. |
Looking good. Miscellaneous comments:
I'm going to work on deprecation. It will be a warning only, since it looks too complicated to try to fix up old style to new style, especially due to side-by-side (plus I'll do schema). Holler soon if above needs small changes, but I'll likely proceed no matter what. Rob |
It is the HTML design width. My suggestion:
If you give the thumbs up, you could just do nothing now and I'd do item 2 when I introduce the PR with
Are you easily able to tell me what's in the
I'm inclined not to invest much here since |
Sounds good. No point in fixing up small details if they are going away. Lost the stray spaces example, which is why it had |
Question: when I move `$design-width` to common, should it keep that name?
It has the value 600, but nothing about the name or the value indicates
this is a pixel measurement. The commentary does. Just thinking that now
this commentary will be in the common file, and actual use of the variable
will be in 3+ other files.
…On Thu, Nov 9, 2017 at 11:54 AM, Rob Beezer ***@***.***> wrote:
Closed #736 <#736>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#736 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEg3AE-YlgSC8NBPagZ_lmk1nTgL2Uzbks5s01iDgaJpZM4PlJnI>
.
--
Alex Jordan
Mathematics Instructor
Portland Community College
|
I thought about units on that at one point earlier today. I want to say that if the units are pixels then it should go in If a stylesheet will not pick it up this way, then it should be defined there, even if it is |
This will need a deprecation warning/alert. And it's not backward compatible: WW image widths need to be percentages now like everywhere else. Also, this should allow you to tidy up the schema some.
After this, I can PR the new extraction style sheets and the new webwork component for the mbx script.