From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: [PATCH] Optional caption argument Date: Tue, 22 Feb 2011 06:57:03 -1000 Message-ID: <94FA2DD7-B7AB-4140-AA14-3BC5F8EFE6E1@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary=Apple-Mail-5-111560258 Return-path: Received: from [140.186.70.92] (port=42288 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrvXx-0001Ix-AN for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 11:57:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrvXw-0002gr-FW for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 11:57:09 -0500 Received: from cpoproxy2-pub.bluehost.com ([67.222.39.38]:45059) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PrvXw-0002gb-6X for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 11:57:08 -0500 Received: from cpe-66-91-68-127.hawaii.res.rr.com ([66.91.68.127] helo=[192.168.1.3]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1PrvXt-0006lj-Hd for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 09:57:06 -0700 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode ml --Apple-Mail-5-111560258 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Aloha all, The attached patches activate some dormant code that handles an optional argument to #+CAPTION:. An example of use is also added to org.texi. With these patches, Org-mode now recognizes a caption of the form: #+CAPTION: [Short caption for list of figures]{Long caption for table (or link).} and exports it properly to LaTeX. All the best, Tom --Apple-Mail-5-111560258 Content-Disposition: attachment; filename=0001-lisp-org-latex.el-Enable-optional-argument-to-LaTeX-.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-lisp-org-latex.el-Enable-optional-argument-to-LaTeX-.patch" Content-Transfer-Encoding: quoted-printable =46rom=20860b3e5a1b1189e800c3b295dea0bc3ff27c9bf8=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Tom=20Dye=20=0ADate:=20Thu,=20= 17=20Feb=202011=2006:29:03=20-1000=0ASubject:=20[PATCH=201/3]=20*=20= lisp/org-latex.el:=20Enable=20optional=20argument=20to=20LaTeX=20caption=20= command=0A=0A---=0A=20lisp/org-latex.el=20|=20=20=20=204=20++--=0A=201=20= files=20changed,=202=20insertions(+),=202=20deletions(-)=0A=0Adiff=20= --git=20a/lisp/org-latex.el=20b/lisp/org-latex.el=0Aindex=20= c558043..efc6f95=20100644=0A---=20a/lisp/org-latex.el=0A+++=20= b/lisp/org-latex.el=0A@@=20-2196,12=20+2196,12=20@@=20The=20conversion=20= is=20made=20depending=20of=20STRING-BEFORE=20and=20STRING-AFTER."=0A=20=09= =20=20=20(multicolumnp=20"\\begin{figure*}%placement=0A=20\\centering=0A=20= \\includegraphics[%attr]{%path}=0A-\\caption{%labelcmd%caption}=0A= +\\caption%shortn{%labelcmd%caption}=0A=20\\end{figure*}")=0A=20=09=20=20= =20(floatp=20"\\begin{figure}%placement=0A=20\\centering=0A=20= \\includegraphics[%attr]{%path}=0A-\\caption{%labelcmd%caption}=0A= +\\caption%shortn{%labelcmd%caption}=0A=20\\end{figure}")=0A=20=09=20=20=20= (t=20"\\includegraphics[%attr]{%path}")))=0A=20=0A--=20=0A1.7.1=0A=0A= --Apple-Mail-5-111560258 Content-Disposition: attachment; filename=0002-lisp-org-exp.el-Set-shortn-nil-before-parsing-a-capt.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-lisp-org-exp.el-Set-shortn-nil-before-parsing-a-capt.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ccf83187afe11175ed60911e657945d29a7b989c=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Tom=20Dye=20=0ADate:=20Thu,=20= 17=20Feb=202011=2015:23:29=20-1000=0ASubject:=20[PATCH=202/3]=20*=20= lisp/org-exp.el:=20Set=20shortn=20nil=20before=20parsing=20a=20caption=0A= =0A---=0A=20lisp/org-exp.el=20|=20=20=20=201=20+=0A=201=20files=20= changed,=201=20insertions(+),=200=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/org-exp.el=20b/lisp/org-exp.el=0Aindex=200e525e1..9f0e378=20= 100644=0A---=20a/lisp/org-exp.el=0A+++=20b/lisp/org-exp.el=0A@@=20= -1721,6=20+1721,7=20@@=20table=20line.=20=20If=20it=20is=20a=20link,=20= add=20it=20to=20the=20line=20containing=20the=20link."=0A=20=20=20=20=20=20= =20=20;;=20there=20is=20a=20caption=0A=20=20=20=20=20=20=20=20= ((match-end=201)=0A=20=09(progn=0A+=09=20=20(setq=20shortn=20nil)=0A=20=09= =20=20(setq=20cap=20(concat=20cap=20(if=20cap=20"=20"=20"")=20(org-trim=20= (match-string=201))))=0A=20=09=20=20(when=20(string-match=20= "\\[\\(.*\\)\\]{\\(.*\\)}"=20cap)=0A=20=09=20=20=20=20(setq=20shortn=20= (match-string=201=20cap)=0A--=20=0A1.7.1=0A=0A= --Apple-Mail-5-111560258 Content-Disposition: attachment; filename=0003-doc-org.texi-Added-example-of-short-caption-use.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-doc-org.texi-Added-example-of-short-caption-use.patch" Content-Transfer-Encoding: quoted-printable =46rom=20736638b0e7bd522989125f10fca8c0184770d895=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Tom=20Dye=20=0ADate:=20Tue,=20= 22=20Feb=202011=2006:47:38=20-1000=0ASubject:=20[PATCH=203/3]=20*=20= doc/org.texi:=20Added=20example=20of=20short=20caption=20use.=0A=0A---=0A= =20doc/org.texi=20|=20=20=20=205=20+++++=0A=201=20files=20changed,=205=20= insertions(+),=200=20deletions(-)=0A=0Adiff=20--git=20a/doc/org.texi=20= b/doc/org.texi=0Aindex=20c8e0597..7fc886e=20100644=0A---=20= a/doc/org.texi=0A+++=20b/doc/org.texi=0A@@=20-8735,6=20+8735,11=20@@=20= the=20object=20with=20@code{\ref@{tab:basic-data@}}:=0A=20=20=20=20= |-----|----|=0A=20@end=20example=0A=20=0A+Optionally,=20the=20caption=20= can=20take=20the=20form:=0A+@example=0A+#+CAPTION:=20[Caption=20for=20= list=20of=20figures]{Caption=20for=20table=20(or=20link).}=0A+@end=20= example=0A+=0A=20@cindex=20inlined=20images,=20markup=20rules=0A=20Some=20= backends=20(HTML,=20@LaTeX{},=20and=20DocBook)=20allow=20you=20to=20= directly=20include=0A=20images=20into=20the=20exported=20document.=20=20= Org=20does=20this,=20if=20a=20link=20to=20an=20image=0A--=20=0A1.7.1=0A=0A= --Apple-Mail-5-111560258 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --Apple-Mail-5-111560258--