|
318 | 318 | (tree-go-to t :end) |
319 | 319 | (make 'label)) |
320 | 320 |
|
| 321 | +(tm-define (focus-label t) |
| 322 | + (:require (section-context? t)) |
| 323 | + (and-with p (tree-up t) |
| 324 | + (and (tm-func? p 'concat) |
| 325 | + (focus-search-label p)))) |
| 326 | + |
321 | 327 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
322 | 328 | ;; Routines for lists, enumerations and description |
323 | 329 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
358 | 364 | (:require (tree-is? t 'item*)) |
359 | 365 | (go-end-of 'item*)) |
360 | 366 |
|
| 367 | +(tm-define (focus-label t) |
| 368 | + (:require (or (list-context? t) (tree-is? t 'bib-list))) |
| 369 | + (and-with doc (tree-down t) |
| 370 | + (and (tree-is? doc 'document) |
| 371 | + (and-with par (tree-down doc) |
| 372 | + (focus-search-label par))))) |
| 373 | + |
361 | 374 | (tm-define (numbered-context? t) |
362 | 375 | (:require (or (itemize-context? t) (enumerate-context? t))) |
363 | 376 | #t) |
|
399 | 412 | (insert ins))) |
400 | 413 |
|
401 | 414 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
402 | | -;; Inserting formulas |
| 415 | +;; Formulas |
403 | 416 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
404 | 417 |
|
405 | 418 | (tm-define (make-equation) |
|
417 | 430 | (make 'eqnarray*) |
418 | 431 | (temp-proof-fix)) |
419 | 432 |
|
| 433 | +(tm-define (focus-label t) |
| 434 | + (:require (tree-is? t 'equation)) |
| 435 | + (focus-list-search-label (tree-children t))) |
| 436 | + |
| 437 | +(define (down-to-row t) |
| 438 | + (cond ((not (tree? t)) #f) |
| 439 | + ((tree-is? t 'row) t) |
| 440 | + ((tree-in? t '(document tformat table)) (down-to-row (tree-down t))) |
| 441 | + (else #f))) |
| 442 | + |
| 443 | +(tm-define (focus-label t) |
| 444 | + (:require (tree-in? t '(eqnarray eqnarray*))) |
| 445 | + (and-with row (down-to-row (tree-down t)) |
| 446 | + (focus-search-label row))) |
| 447 | + |
420 | 448 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
421 | 449 | ;; Routines for inserting miscellaneous content |
422 | 450 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
505 | 533 | (tree-go-to t :last :start) |
506 | 534 | (make 'dueto)) |
507 | 535 |
|
| 536 | +(tm-define (focus-label t) |
| 537 | + (:require (tree-in? t (enunciation-tag-list))) |
| 538 | + (and (== (tree-arity t) 1) |
| 539 | + (focus-search-label (tree-ref t 0)))) |
| 540 | + |
508 | 541 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
509 | 542 | ;; Editing algorithms |
510 | 543 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
584 | 617 | (tree-insert! t (- (tree-arity t) 1) '((document ""))) |
585 | 618 | (tree-go-to t (- (tree-arity t) 2) :start))))) |
586 | 619 |
|
| 620 | +(tm-define (focus-label t) |
| 621 | + (:require (algorithm-context? t)) |
| 622 | + (focus-list-search-label (tree-children t))) |
| 623 | + |
587 | 624 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
588 | 625 | ;; Possible to use a custom note symbol |
589 | 626 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
797 | 834 | (tm-define (footnote-context? t) |
798 | 835 | (tree-in? t '(footnote wide-footnote))) |
799 | 836 |
|
| 837 | +(tm-define (figure-context? t) |
| 838 | + (tree-in? t (figure-tag-list))) |
| 839 | + |
800 | 840 | (tm-define (float-or-footnote-context? t) |
801 | 841 | (tree-in? t '(float wide-float footnote wide-footnote))) |
802 | 842 |
|
|
911 | 951 | (if (cursor-at-anchor?) |
912 | 952 | (go-to-float) |
913 | 953 | (go-to-anchor))) |
| 954 | + |
| 955 | +(tm-define (focus-label t) |
| 956 | + (:require (or (footnote-context? t) (figure-context? t))) |
| 957 | + (focus-list-search-label (tree-children t))) |
0 commit comments