emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Let orgtbl export the last table line with a different ending.
@ 2008-02-29  0:02 Jason Riedy
  2008-02-29  1:00 ` title for single page export to html Xin Shi
  2008-02-29 10:03 ` [PATCH] Let orgtbl export the last table line with a different ending Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Jason Riedy @ 2008-02-29  0:02 UTC (permalink / raw)
  To: emacs-orgmode

If the last line ends with the default :lend in LaTeX (\\),
a horizontal line placed after the table will have too much
preceeding vertical space.

Signed-off-by: Jason Riedy <jason@acm.org>
---
   Yeah, this is the cheap version.  The "better" version
   would break the loop into header and body pieces and allow
   a :hllend.  But right now I'm splicing all my tables for
   other reasons.

 org.el   |    7 ++++---
 org.texi |    5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/org.el b/org.el
index 476cee8..a4e0e43 100644
--- a/org.el
+++ b/org.el
@@ -11771,6 +11771,7 @@ Valid parameters are
 
 :lstart     String to start a new table line.
 :lend       String to end a table line
+:llend      String to end the last line of a table
 :sep        Separator between two fields
 :lfmt       Format for entire line, with enough %s to capture all fields.
             If this is present, :lstart, :lend, and :sep are ignored.
@@ -11832,7 +11833,7 @@ directly by `orgtbl-send-table'.  See manual."
 	  (push (concat
 		 (org-get-param p h i :lstart :hlstart)
 		 (mapconcat 'identity line (org-get-param p h i :sep :hsep))
-		 (org-get-param p h i :lend :hlend))
+		 (org-get-param p h i (if table :lend :llend) :hlend))
 		rtn))))
 
     (unless splicep
@@ -11869,7 +11870,7 @@ this function is called."
 	  (list
 	   :tstart (concat "\\begin{tabular}{" alignment "}")
 	   :tend "\\end{tabular}"
-	   :lstart "" :lend " \\\\" :sep " & "
+	   :lstart "" :lend " \\\\" :llend "" :sep " & "
 	   :efmt "%s\\,(%s)" :hline "\\hline")))
     (orgtbl-to-generic table (org-combine-plists params2 params))))
 
@@ -11934,7 +11935,7 @@ this function is called."
 	  (list
 	   :tstart (concat "@multitable @columnfractions " colfrac)
 	   :tend "@end multitable"
-	   :lstart "@item " :lend "" :sep " @tab "
+	   :lstart "@item " :lend "" :llend "" :sep " @tab "
 	   :hlstart "@headitem ")))
     (orgtbl-to-generic table (org-combine-plists params2 params))))
 
diff --git a/org.texi b/org.texi
index fab72ec..daad533 100644
--- a/org.texi
+++ b/org.texi
@@ -8228,7 +8228,7 @@ generic translator.  Here is the entire code:
           (list
            :tstart (concat "\\begin@{tabular@}@{" alignment "@}")
            :tend "\\end@{tabular@}"
-           :lstart "" :lend " \\\\" :sep " & "
+           :lstart "" :lend " \\\\" :llend "" :sep " & "
            :efmt "%s\\,(%s)" :hline "\\hline")))
     (orgtbl-to-generic table (org-combine-plists params2 params))))
 @end group
@@ -8256,7 +8256,8 @@ a single line!):
 
 @example
 #+ORGTBL: SEND test orgtbl-to-generic :tstart "!BTBL!" :tend "!ETBL!"
-                              :lstart "!BL! " :lend " !EL!" :sep "\t"
+                              :lstart "!BL! " :lend " !EL!" :llend " !EL!"
+                              :sep "\t"
 @end example
 
 @noindent
-- 
1.5.4.3

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

* title for single page export to html
  2008-02-29  0:02 [PATCH] Let orgtbl export the last table line with a different ending Jason Riedy
@ 2008-02-29  1:00 ` Xin Shi
  2008-02-29  1:09   ` Bastien Guerry
  2008-02-29 10:03 ` [PATCH] Let orgtbl export the last table line with a different ending Carsten Dominik
  1 sibling, 1 reply; 5+ messages in thread
From: Xin Shi @ 2008-02-29  1:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Is that possible to add a line in the .org file indicating the title of 
the exported HTML, in stead of the file name?  For example:

#title This is the title of the HTML

Thanks!

Xin

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

* Re: title for single page export to html
  2008-02-29  1:00 ` title for single page export to html Xin Shi
@ 2008-02-29  1:09   ` Bastien Guerry
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien Guerry @ 2008-02-29  1:09 UTC (permalink / raw)
  To: emacs-orgmode

Xin Shi <xs32@cornell.edu> writes:

> Is that possible to add a line in the .org file indicating the title of
> the exported HTML, in stead of the file name?  For example:
>
> #title This is the title of the HTML

#+TITLE: This is the title of the HTML

`C-c C-c' on this line to make org-mode aware of it.

-- 
Bastien

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

* Re: [PATCH] Let orgtbl export the last table line with a different ending.
  2008-02-29  0:02 [PATCH] Let orgtbl export the last table line with a different ending Jason Riedy
  2008-02-29  1:00 ` title for single page export to html Xin Shi
@ 2008-02-29 10:03 ` Carsten Dominik
  2008-03-03  0:28   ` Jason Riedy
  1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-02-29 10:03 UTC (permalink / raw)
  To: Jason Riedy; +Cc: emacs-orgmode

Hi Jason,

nice idea, I would like to take this patch.  However, I think it  
should be
done such that if the user only specifies :lend, then the default  
for :llend should be that.
Would you like to fix this minor issue and then resubmit your patch?

- Carsten

On Feb 29, 2008, at 1:02 AM, Jason Riedy wrote:

> If the last line ends with the default :lend in LaTeX (\\),
> a horizontal line placed after the table will have too much
> preceeding vertical space.
>
> Signed-off-by: Jason Riedy <jason@acm.org>
> ---
>   Yeah, this is the cheap version.  The "better" version
>   would break the loop into header and body pieces and allow
>   a :hllend.  But right now I'm splicing all my tables for
>   other reasons.
>
> org.el   |    7 ++++---
> org.texi |    5 +++--
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/org.el b/org.el
> index 476cee8..a4e0e43 100644
> --- a/org.el
> +++ b/org.el
> @@ -11771,6 +11771,7 @@ Valid parameters are
>
> :lstart     String to start a new table line.
> :lend       String to end a table line
> +:llend      String to end the last line of a table
> :sep        Separator between two fields
> :lfmt       Format for entire line, with enough %s to capture all  
> fields.
>             If this is present, :lstart, :lend, and :sep are ignored.
> @@ -11832,7 +11833,7 @@ directly by `orgtbl-send-table'.  See manual."
> 	  (push (concat
> 		 (org-get-param p h i :lstart :hlstart)
> 		 (mapconcat 'identity line (org-get-param p h i :sep :hsep))
> -		 (org-get-param p h i :lend :hlend))
> +		 (org-get-param p h i (if table :lend :llend) :hlend))
> 		rtn))))
>
>     (unless splicep
> @@ -11869,7 +11870,7 @@ this function is called."
> 	  (list
> 	   :tstart (concat "\\begin{tabular}{" alignment "}")
> 	   :tend "\\end{tabular}"
> -	   :lstart "" :lend " \\\\" :sep " & "
> +	   :lstart "" :lend " \\\\" :llend "" :sep " & "
> 	   :efmt "%s\\,(%s)" :hline "\\hline")))
>     (orgtbl-to-generic table (org-combine-plists params2 params))))
>
> @@ -11934,7 +11935,7 @@ this function is called."
> 	  (list
> 	   :tstart (concat "@multitable @columnfractions " colfrac)
> 	   :tend "@end multitable"
> -	   :lstart "@item " :lend "" :sep " @tab "
> +	   :lstart "@item " :lend "" :llend "" :sep " @tab "
> 	   :hlstart "@headitem ")))
>     (orgtbl-to-generic table (org-combine-plists params2 params))))
>
> diff --git a/org.texi b/org.texi
> index fab72ec..daad533 100644
> --- a/org.texi
> +++ b/org.texi
> @@ -8228,7 +8228,7 @@ generic translator.  Here is the entire code:
>           (list
>            :tstart (concat "\\begin@{tabular@}@{" alignment "@}")
>            :tend "\\end@{tabular@}"
> -           :lstart "" :lend " \\\\" :sep " & "
> +           :lstart "" :lend " \\\\" :llend "" :sep " & "
>            :efmt "%s\\,(%s)" :hline "\\hline")))
>     (orgtbl-to-generic table (org-combine-plists params2 params))))
> @end group
> @@ -8256,7 +8256,8 @@ a single line!):
>
> @example
> #+ORGTBL: SEND test orgtbl-to-generic :tstart "!BTBL!" :tend "!ETBL!"
> -                              :lstart "!BL! " :lend " !EL!" :sep "\t"
> +                              :lstart "!BL! " :lend " !EL!" :llend  
> " !EL!"
> +                              :sep "\t"
> @end example
>
> @noindent
> -- 
> 1.5.4.3
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [PATCH] Let orgtbl export the last table line with a different ending.
  2008-02-29 10:03 ` [PATCH] Let orgtbl export the last table line with a different ending Carsten Dominik
@ 2008-03-03  0:28   ` Jason Riedy
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Riedy @ 2008-03-03  0:28 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

And Carsten Dominik writes:
> Would you like to fix this minor issue and then resubmit your patch?

Heh.  Took a few minutes and refactored the relevant routines.
Will post shortly.

Jason

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

end of thread, other threads:[~2008-03-03  0:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29  0:02 [PATCH] Let orgtbl export the last table line with a different ending Jason Riedy
2008-02-29  1:00 ` title for single page export to html Xin Shi
2008-02-29  1:09   ` Bastien Guerry
2008-02-29 10:03 ` [PATCH] Let orgtbl export the last table line with a different ending Carsten Dominik
2008-03-03  0:28   ` Jason Riedy

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).