|
@@ -4138,10 +4138,12 @@ A cell is of the format
|
|
|
|
|
|
If SNIPPET-FLAG is non-nil, the package also needs to be included
|
|
|
when compiling LaTeX snippets into images for inclusion into
|
|
|
-non-LaTeX output. COMPILERS is a list of compilers that should
|
|
|
-include the package, see `org-latex-compiler'. If the document
|
|
|
-compiler is not in the list, and the list is non-nil, the package
|
|
|
-will not be inserted in the final document.
|
|
|
+non-LaTeX output.
|
|
|
+
|
|
|
+COMPILERS is a list of compilers that should include the package,
|
|
|
+see `org-latex-compiler'. If the document compiler is not in the
|
|
|
+list, and the list is non-nil, the package will not be inserted
|
|
|
+in the final document.
|
|
|
|
|
|
A string will be inserted as-is in the header of the document."
|
|
|
:group 'org-latex
|
|
@@ -4175,6 +4177,11 @@ SNIPPET-FLAG, when non-nil, indicates that this package is also
|
|
|
needed when turning LaTeX snippets into images for inclusion into
|
|
|
non-LaTeX output.
|
|
|
|
|
|
+COMPILERS is a list of compilers that should include the package,
|
|
|
+see `org-latex-compiler'. If the document compiler is not in the
|
|
|
+list, and the list is non-nil, the package will not be inserted
|
|
|
+in the final document.
|
|
|
+
|
|
|
A string will be inserted as-is in the header of the document.
|
|
|
|
|
|
Make sure that you only list packages here which:
|
|
@@ -7640,22 +7647,25 @@ unconditionally."
|
|
|
(member arg '((4) (16)))
|
|
|
(and (not invisible-ok)
|
|
|
(invisible-p (max (1- (point)) (point-min)))))
|
|
|
- ;; Position point at the location of insertion.
|
|
|
- (if (not level) ;before first headline
|
|
|
- (org-with-limited-levels (outline-next-heading))
|
|
|
- ;; Make sure we end up on a visible headline if INVISIBLE-OK
|
|
|
- ;; is nil.
|
|
|
- (org-with-limited-levels (org-back-to-heading invisible-ok))
|
|
|
- (cond ((equal arg '(16))
|
|
|
- (org-up-heading-safe)
|
|
|
- (org-end-of-subtree t t))
|
|
|
- (t
|
|
|
- (org-end-of-subtree t t))))
|
|
|
- (unless (bolp) (insert "\n")) ;ensure final newline
|
|
|
+ ;; Position point at the location of insertion. Make sure we
|
|
|
+ ;; end up on a visible headline if INVISIBLE-OK is nil.
|
|
|
+ (org-with-limited-levels
|
|
|
+ (if (not level) (outline-next-heading) ;before first headline
|
|
|
+ (org-back-to-heading invisible-ok)
|
|
|
+ (when (equal arg '(16)) (org-up-heading-safe))
|
|
|
+ (org-end-of-subtree)))
|
|
|
+ (unless (bolp) (insert "\n"))
|
|
|
(unless (and blank? (org-previous-line-empty-p))
|
|
|
(org-N-empty-lines-before-current (if blank? 1 0)))
|
|
|
- (insert stars " \n")
|
|
|
- (forward-char -1))
|
|
|
+ (insert stars " ")
|
|
|
+ (when (eobp) (save-excursion (insert "\n")))
|
|
|
+ ;; When INVISIBLE-OK is non-nil, ensure newly created headline
|
|
|
+ ;; is visible.
|
|
|
+ (unless invisible-ok
|
|
|
+ (pcase (get-char-property-and-overlay (point) 'invisible)
|
|
|
+ (`(outline . ,o)
|
|
|
+ (move-overlay o (overlay-start o) (line-end-position 0)))
|
|
|
+ (_ nil))))
|
|
|
;; At a headline...
|
|
|
((org-at-heading-p)
|
|
|
(cond ((bolp)
|