This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Commit 3da0a29
Release Manager
Trac #31536: Fix Sage rich output problems by coupling MathJax with html
This ticket has grown from its initial motive and now solves multiple
problems related with Sage rich output. In particular, it
- fixes the blocker https://trac.sagemath.org/ticket/31513
- fixes the %matplotlib notebook magic, which is broken in a %display
latex context in Sage 9.2
- performs some code improvement regarding the handling of mathjax
The patch has been quite tested with Jupyter notebooks involving various
types of Sage objects, Matplotlib objects and ipywidgets.
The initial motive, which is the root of the solutions, is
----
Presently mathjax is coupled with latex in Sage. The coupling causes
dilemmas because latex is for printing and mathjax is for rendering math
in html. We encounter such a dilemma in solving #11362, for example.
This ticket takes mathjax from `sage.misc.latex` and place it properly
in `sage.misc.html`.
The command `view(obj)` is used to view the latex representation of an
object. This ticket aims to make `show(obj)` and `pretty_print(obj)`
show the html+mathjax representation of the object. The html+mathjax
representation can be made from the latex representation or given by
`_html_` method of the object.
While we are at it, we also cleaned up old code written for deprecated
sage notebook.
URL: https://trac.sagemath.org/31536
Reported by: klee
Ticket author(s): Kwankyu Lee
Reviewer(s): Eric GourgoulhonFile tree
32 files changed
+540
-737
lines changed- src
- doc
- de/tutorial
- en
- thematic_tutorials/explicit_methods_in_number_theory
- tutorial
- fr/tutorial
- ja/tutorial
- pt/tutorial
- sage
- combinat
- designs
- graphs
- misc
- modular/arithgroup
- numerical
- plot/plot3d
- repl
- display
- rich_output
- rings/asymptotic
- symbolic
- tests
- books/computational-mathematics-with-sagemath
32 files changed
+540
-737
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
| 322 | + | |
| 323 | + | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
| 326 | + | |
327 | 327 | | |
328 | | - | |
329 | | - | |
| 328 | + | |
| 329 | + | |
330 | 330 | | |
331 | | - | |
332 | | - | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 392 | + | |
| 393 | + | |
397 | 394 | | |
398 | 395 | | |
399 | 396 | | |
| |||
440 | 437 | | |
441 | 438 | | |
442 | 439 | | |
443 | | - | |
444 | | - | |
| 440 | + | |
| 441 | + | |
445 | 442 | | |
446 | 443 | | |
447 | 444 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 294 | + | |
298 | 295 | | |
299 | 296 | | |
300 | 297 | | |
| |||
318 | 315 | | |
319 | 316 | | |
320 | 317 | | |
321 | | - | |
322 | | - | |
| 318 | + | |
| 319 | + | |
323 | 320 | | |
324 | | - | |
325 | | - | |
| 321 | + | |
| 322 | + | |
326 | 323 | | |
327 | | - | |
328 | | - | |
| 324 | + | |
| 325 | + | |
329 | 326 | | |
330 | | - | |
331 | | - | |
| 327 | + | |
| 328 | + | |
332 | 329 | | |
333 | 330 | | |
334 | 331 | | |
| |||
388 | 385 | | |
389 | 386 | | |
390 | 387 | | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 388 | + | |
| 389 | + | |
396 | 390 | | |
397 | 391 | | |
398 | 392 | | |
| |||
439 | 433 | | |
440 | 434 | | |
441 | 435 | | |
442 | | - | |
443 | | - | |
| 436 | + | |
| 437 | + | |
444 | 438 | | |
445 | 439 | | |
446 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
311 | 311 | | |
312 | | - | |
313 | | - | |
| 312 | + | |
| 313 | + | |
314 | 314 | | |
315 | | - | |
316 | | - | |
| 315 | + | |
| 316 | + | |
317 | 317 | | |
318 | | - | |
319 | | - | |
| 318 | + | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 372 | + | |
| 373 | + | |
377 | 374 | | |
378 | 375 | | |
379 | 376 | | |
| |||
413 | 410 | | |
414 | 411 | | |
415 | 412 | | |
416 | | - | |
417 | | - | |
| 413 | + | |
| 414 | + | |
418 | 415 | | |
419 | 416 | | |
420 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | | - | |
| 283 | + | |
| 284 | + | |
285 | 285 | | |
286 | | - | |
287 | | - | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | | - | |
290 | | - | |
| 289 | + | |
| 290 | + | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 334 | + | |
| 335 | + | |
339 | 336 | | |
340 | 337 | | |
341 | 338 | | |
| |||
368 | 365 | | |
369 | 366 | | |
370 | 367 | | |
371 | | - | |
372 | | - | |
| 368 | + | |
| 369 | + | |
373 | 370 | | |
374 | 371 | | |
375 | 372 | | |
| |||
384 | 381 | | |
385 | 382 | | |
386 | 383 | | |
387 | | - | |
| 384 | + | |
388 | 385 | | |
389 | 386 | | |
390 | 387 | | |
| |||
0 commit comments