"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "TeXmacs/progs/text/text-edit.scm" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

text-edit.scm  (TeXmacs-1.99.4-src):text-edit.scm  (TeXmacs-1.99.5-src)
skipping to change at line 396 skipping to change at line 396
(tm-define (make-bib style file-name) (tm-define (make-bib style file-name)
(:argument style "Bibliography style") (:argument style "Bibliography style")
(:proposals style '("tm-plain" "tm-alpha" "tm-acm" "tm-elsart-num" (:proposals style '("tm-plain" "tm-alpha" "tm-acm" "tm-elsart-num"
"tm-ieeetr" "tm-siam" "tm-unsrt")) "tm-ieeetr" "tm-siam" "tm-unsrt"))
(:argument file-name "Bibliography file") (:argument file-name "Bibliography file")
(with aux (if (context-has? "bib-prefix") (get-env "bib-prefix") "bib") (with aux (if (context-has? "bib-prefix") (get-env "bib-prefix") "bib")
(if (not (make-return-after)) (if (not (make-return-after))
(insert (list 'bibliography aux style file-name '(document "")))))) (insert (list 'bibliography aux style file-name '(document ""))))))
(tm-define (automatic-section-context? t)
(tree-in? t (automatic-section-tag-list)))
(define (automatic-name-var t)
(cond ((tm-func? t 'table-of-contents) "table-of-contents-text")
((tm-func? t 'bibliography) "bibliography-text")
((tm-func? t 'the-index) "index-text")
((tm-func? t 'the-glossary) "glossary-text")
((tm-func? t 'list-of-figures) "list-of-figures")
((tm-func? t 'list-of-tables) "list-of-tables")
(else #f)))
(define (automatic-section-name)
(with-innermost t automatic-section-context?
(let* ((var (automatic-name-var t))
(val (if var (get-env-tree var) "")))
(when (tm-func? val 'macro 1)
(set! val (tm-ref val 0)))
(when (and (tm-func? val 'localize 1) (tm-atomic? (tm-ref val 0)))
(set! val (tm-ref val 0)))
(if (tm-atomic? val) (tm->string val) ""))))
(tm-define (automatic-section-rename new-name)
(:argument new-name "New name")
(:proposals new-name (list (automatic-section-name)))
(with-innermost t automatic-section-context?
(when t
(let* ((l (tree-label t))
(l* (symbol-append l '*)))
(tree-set t `(,l* ,@(cDr (tm-children t))
,new-name ,(tm-ref t :last)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Editing enunciations ;; Editing enunciations
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(tm-define (style-category p) (tm-define (style-category p)
(:require (in? p (list "framed-theorems" "hanging-theorems"))) (:require (in? p (list "framed-theorems" "hanging-theorems")))
:theorem-decorations) :theorem-decorations)
(tm-define (dueto-supporting-context? t) (tm-define (dueto-supporting-context? t)
(or (tree-in? t (numbered-unnumbered-append (enunciation-tag-list))) (or (tree-in? t (numbered-unnumbered-append (enunciation-tag-list)))
skipping to change at line 633 skipping to change at line 665
(list (list "ornament-border" "Border width") (list (list "ornament-border" "Border width")
(list "ornament-hpadding" "Horizontal padding") (list "ornament-hpadding" "Horizontal padding")
(list "ornament-vpadding" "Vertical padding")))) (list "ornament-vpadding" "Vertical padding"))))
(tm-define (customizable-parameters t) (tm-define (customizable-parameters t)
(:require (tree-in? t (ornament-tag-list))) (:require (tree-in? t (ornament-tag-list)))
(list (list "ornament-shape" "Shape") (list (list "ornament-shape" "Shape")
(list "ornament-border" "Border width") (list "ornament-border" "Border width")
(list "ornament-hpadding" "Horizontal padding") (list "ornament-hpadding" "Horizontal padding")
(list "ornament-vpadding" "Vertical padding"))) (list "ornament-vpadding" "Vertical padding")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Floating objects and environments
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(tm-define (float-context? t)
(cond ((tree-is? t 'float) #t)
((tree-in? t '(big-figure big-figure*
big-table big-table*
algorithm algorithm*
document concat))
(and (tree-up t) (float-context? (tree-up t))))
(else #f)))
(tm-define (floatable-context? t)
(and (tree-in? t '(big-figure big-figure*
big-table big-table*
algorithm algorithm*))
(not (tree-innermost t 'float))
(tree-is? t :up 'document)))
(tm-define (turn-floating t)
(when (floatable-context? t)
(with f `(float "float" "thb" ,t)
(tree-set! t f)
(tree-go-to t :start)
(remove-text #f))))
(tm-define (cursor-at-anchor?)
(with t (cursor-tree)
(tree-in? t '(float footnote))))
(tm-define (go-to-anchor)
(cond ((inside? 'float)
(with-innermost t 'float
(tree-go-to t :end)))
((inside? 'footnote)
(with-innermost t 'footnote
(tree-go-to t :end)))))
(tm-define (go-to-float)
(with t (cursor-tree)
(cond ((tree-is? t 'float)
(tree-go-to t 2 :start))
((tree-is? t 'footnote)
(tree-go-to t 0 :start)))))
(tm-define (cursor-toggle-anchor)
(:check-mark "v" cursor-at-anchor?)
(if (cursor-at-anchor?)
(go-to-float)
(go-to-anchor)))
 End of changes. 2 change blocks. 
0 lines changed or deleted 32 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS