emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Emphasize caption in html output
@ 2010-03-29  5:45 Thomas S. Dye
  2010-03-29 11:39 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas S. Dye @ 2010-03-29  5:45 UTC (permalink / raw)
  To: emacs-orgmode list

Hi Carsten,

This appears to emphasize org-mode markup in html export of captions.   
It seems to work, but I have a difficult time understanding org-mode  
code and haven't any sense of the proper way to do things, etc., so  
caveat emptor.

All the best,
Tom

---------------
	Modified lisp/org-html.el
diff --git a/lisp/org-html.el b/lisp/org-html.el
index d75d8f5..71e3e99 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1521,7 +1521,7 @@ lang=\"%s\" xml:lang=\"%s\">
    (save-match-data
      (if (string-match "^ltxpng/" src)
  	(format "<img src=\"%s\"/>" src)
-      (let* ((caption (org-find-text-property-in-string 'org-caption  
src))
+      (let* ((caption (org-export-html-convert-emphasize (org-find- 
text-property-in-string 'org-caption src)))
  	     (attr (org-find-text-property-in-string 'org-attributes src))
  	     (label (org-find-text-property-in-string 'org-label src)))
  	(concat
@@ -1599,11 +1599,11 @@ lang=\"%s\" xml:lang=\"%s\">
      ;; column and the special lines
      (setq lines (org-table-clean-before-export lines)))

-  (let* ((caption (or (get-text-property 0 'org-caption (car lines))
+  (let* ((caption (org-export-html-convert-emphasize (or (get-text- 
property 0 'org-caption (car lines))
  		      (get-text-property (or (next-single-property-change
  					      0 'org-caption (car lines))
  					     0)
-					 'org-caption (car lines))))
+					 'org-caption (car lines)))))
  	 (attributes (or (get-text-property 0 'org-attributes (car lines))
  			 (get-text-property (or (next-single-property-change
  						 0 'org-attributes (car lines))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Emphasize caption in html output
  2010-03-29  5:45 [PATCH] Emphasize caption in html output Thomas S. Dye
@ 2010-03-29 11:39 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2010-03-29 11:39 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode list

Hi Thomas,

I have just checked in a similar patch, thanks a lot.

- Carsten

On Mar 29, 2010, at 7:45 AM, Thomas S. Dye wrote:

> Hi Carsten,
>
> This appears to emphasize org-mode markup in html export of  
> captions.  It seems to work, but I have a difficult time  
> understanding org-mode code and haven't any sense of the proper way  
> to do things, etc., so caveat emptor.
>
> All the best,
> Tom
>
> ---------------
> 	Modified lisp/org-html.el
> diff --git a/lisp/org-html.el b/lisp/org-html.el
> index d75d8f5..71e3e99 100644
> --- a/lisp/org-html.el
> +++ b/lisp/org-html.el
> @@ -1521,7 +1521,7 @@ lang=\"%s\" xml:lang=\"%s\">
>   (save-match-data
>     (if (string-match "^ltxpng/" src)
> 	(format "<img src=\"%s\"/>" src)
> -      (let* ((caption (org-find-text-property-in-string 'org- 
> caption src))
> +      (let* ((caption (org-export-html-convert-emphasize (org-find- 
> text-property-in-string 'org-caption src)))
> 	     (attr (org-find-text-property-in-string 'org-attributes src))
> 	     (label (org-find-text-property-in-string 'org-label src)))
> 	(concat
> @@ -1599,11 +1599,11 @@ lang=\"%s\" xml:lang=\"%s\">
>     ;; column and the special lines
>     (setq lines (org-table-clean-before-export lines)))
>
> -  (let* ((caption (or (get-text-property 0 'org-caption (car lines))
> +  (let* ((caption (org-export-html-convert-emphasize (or (get-text- 
> property 0 'org-caption (car lines))
> 		      (get-text-property (or (next-single-property-change
> 					      0 'org-caption (car lines))
> 					     0)
> -					 'org-caption (car lines))))
> +					 'org-caption (car lines)))))
> 	 (attributes (or (get-text-property 0 'org-attributes (car lines))
> 			 (get-text-property (or (next-single-property-change
> 						 0 'org-attributes (car lines))
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-29 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-29  5:45 [PATCH] Emphasize caption in html output Thomas S. Dye
2010-03-29 11:39 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).