Philipp Müller | 3 Jun 2012 12:12

Extracting table format within AUCTeX

Hi all,
I read that AUCTeX can retrieve the current environment
(LaTeX-current-environment). If I'm currently within a
tabular-environment, is there some function that retrieves the format
(for example: c|cc|l) of the tabular?
Regards,
Philipp
Philipp Müller | 3 Jun 2012 13:38

C-j for tabular environments

I added some lines to latex.el to acchieve automatic insertion of
separator lines within tabular environments similar to automatic
insertion of \item within description or itemize environments.

The diff is below (sorry, I'm no expert in creating diffs/patches, so I
used Emacs' diff-backup).

diff -c /usr/local/share/emacs/site-lisp/auctex/latex.el\~
/usr/local/share/emacs/site-lisp/auctex/latex.el

*** /usr/local/share/emacs/site-lisp/auctex/latex.el~	2012-03-21
00:25:06.143391917 +0100
--- /usr/local/share/emacs/site-lisp/auctex/latex.el	2012-06-03
13:29:25.224582648 +0200
***************
*** 1133,1138 ****
--- 1133,1150 ----
    "Insert a new bibitem."
    (TeX-insert-macro "bibitem"))

+ (defun LaTeX-item-tabular ()
+   (interactive)
+   (save-excursion
+     (re-search-backward
+      "\\\\\\(begin\\|end\\) *{ *tabular *} *{\\([^%]*\\)}" nil t)
+     (message (match-string 2))
+   )
+   (let ((tableformat
+ 	 (replace-regexp-in-string "{.*?}\\||\\| <at> \\| " "" (match-string 2))))
+     (message tableformat)
(Continue reading)

Myles | 18 Jun 2012 16:40
Picon

Feature request: RefTeX, access the "file" BibTeX field for use with org-mode

Hi,

Would somebody please consider changing (at least) reftex-format-citation to
allow access to the "file = {}" field in a BibTeX file?

This would be useful for improving co-usage of two very apps: Zotero and emacs
org-mode, towards the goal of bibliography management.

Currently it is possible to export a bib file and attached (pdf) files from
Zotero, with the "file" field including a relative path to the actual (pdf) file:

  file = {npont.pdf:files/5/npont.pdf:application/pdf}

This could be used for inserting a heading and link to the file in an org-mode
document, containing notes on a collection of papers:

(reftex-set-cite-format
	  '((?h . "** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%z][%l]]")))
((unload-feature 'reftex-cite )

I think this could be as easy as changing reftex-format-citation to include:

 ;; zotero path to the (pdf) file
 ((= l ?z) (reftex-get-bib-field "file" entry))

...plus extracting the path from the field.

An almost identical request, from a slightly different angle, was made in
September 2011 but it appears to have fizzled out inconclusively:

(Continue reading)

Myles | 19 Jun 2012 15:01
Picon

[PATCH] Re: Feature request: RefTeX, access the "file" BibTeX field for use with org-mode

Allow access to the 'file' field, and split it to give the relative path (for
zotero).

diff --git a/lisp/reftex-cite.el b/lisp/reftex-cite.el
index e1d2e92..f6adbcd 100644
--- a/lisp/reftex-cite.el
+++ b/lisp/reftex-cite.el
 <at>  <at>  -1063,8 +1063,10  <at>  <at>  While entering the regexp, completion on knows citation
keys is possible.
                ((= l ?T) (reftex-abbreviate-title
                           (reftex-get-bib-field "title" entry)))
                ((= l ?v) (reftex-get-bib-field "volume" entry))
-               ((= l ?y) (reftex-get-bib-field "year" entry)))))
-
+               ((= l ?y) (reftex-get-bib-field "year" entry))
+	       ;; zotero path to the (pdf) file
+               ((= l ?z) (nth 1 (split-string
+				 (reftex-get-bib-field "file" entry) ":"))))))
       (if (string= rpl "")
           (setq b (match-beginning 2) e (match-end 2))
         (setq b (match-beginning 3) e (match-end 3)))
Mads Jensen | 23 Jun 2012 19:11
Favicon

Missing symbols in latex.el

There appears to be missing the symbols from section 5.2 and 5.4 from
the manual (texdoc latex2e) in latex.el.  Is there a good reason for
leaving them out?
--

-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
Everybody is a genius. But if you judge a fish by its ability to climb a
tree, it will live its whole life believing that it is stupid.
      -- Albert Einstein

_______________________________________________
auctex-devel mailing list
auctex-devel <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

Gmane