# Tag Info

27

As @wvxvw points out, you can use table.el by Takaaki Ota. There is some built-in support for this in org-mode (see manual). Your example can be easily translated to table.el syntax by replacing some | with +: +------------+-----------+----------+----------+-------------+ | | Singular | Plural | | +--------...

19

You can use a multitude of solutions. I assume you want to produce a new table based on an existing one. This involves babel functionality where you define code blocks that produce the new table. The code blocks can be in many languages, and you even can define such a code block to be used afterwards normally in table formulas. I am showing here just an ...

17

org-mode has 2 table formats, the default org-table and the other is table.el. Cell wrapping is available for tables in table.el format. Try this Remove the extra row with <10> so your table will look similar to the example below: | Verse No | Verse | | 1 | Line1 Line1 Line1 | | 2 | Line2 Line2 Line2 | Tip: Add a ...

12

Select your data and type: C-c | (org-table-create-or-convert-from-region) C-c - (org-table-insert-hline)

11

Inspired by Juancho's answer, I decided to use the header line to display the value of the current field. While I was at it, I decided it would be nice to show the location of the field in the header as well: This is the code I used to achieve it: (defun my-trim-string (arg) "Simple function for trimming the whitespace from the ends of a string. Also ...

11

You need 2 things here: The vmean function (stands for vector mean) The references @I and @II which stand for the first and second horizontal lines in the table. So, with the cursor on the draft average cell, type :=vmean(@I..@II) and then RET. This will add the formula tag at the bottom of the table and the result in the table. Repeat for the other column....

10

Try using :mode math and :mode inline-math LaTeX attributes together with :environment array: #+ATTR_LaTeX: :mode math :environment array | Column 1 | Column 2 | |----------+----------| | \sin(x) | \tan(x) | #+ATTR_LaTeX: :mode inline-math :environment array | Column 1 | Column 2 | |----------+----------| | \sin(x) | \tan(x) | See section LaTeX ...

10

Clock tables support formatting options: #+BEGIN: clocktable :formatter my-org-clocktable-notodo #+END: Here's a function which removes TODO and DONE keywords from headlines before handing the data off to the default formatting function: (defun my-org-clocktable-notodo (ipos tables params) (cl-loop for tbl in tables for entries = (nth 2 tbl) ...

10

Yes, that's possible: Select lines you want to add to the table. Press C-c | (org-table-create-or-convert-from-region). This will give you: | line1 | | line2 | | line3 | Now all you need to do is add the header line. Here's one way of doing that: With point (the cursor) on line1, press C-o (org-open-line), then enter C1. Press C-c - (org-ctrl-c-minus) to ...

10

You can achieve that by naming your results table. Then, the code block will update the same table it used as input. #+begin_src emacs-lisp :var table=mytable (append table '((1 2 3))) #+end_src #+name: mytable #+RESULTS: | 0 | 0 | 0 | | 0 | 0 | 0 | | 1 | 2 | 3 | To have the greater flexibility that the OP had in mind: it isn't necessary to have the ...

9

Another smart way is adding :noexport: tag to the section header which includes the data table. C-c C-q (org-set-tags-command), input "noexport" tag at the section. If you want to export again, C-c C-q and delete :noexport: tag. * Data Section not for export :noexport: #+TBLNAME: data | Col1 | Col2 | Col3 | Col4 | Col5 | |------+------+--...

9

You can use an inline babel code block and the lisp function org-table-get-remote-range for getting access to table ranges like in the following example (the number 3 after the source block is what it produced when C-c C-c is executed on it) #+TBLNAME: table1 | Name | Points | |---------+--------| | Andreas | 5 | | Barbara | 8 | | ...

9

Inspired by seth's answer, you may always display the tooltip text on the header line (which is a little-known mode line at the top of the window). Execute the following: (setq-default header-line-format (list '(:eval (help-at-pt-kbd-string)))) Now, every time the text under the point has a tooltip property, it will be displayed on the header line. ...

9

Just use hline instead of linebreak. The following works: * test #+BEGIN_SRC emacs-lisp :results value table '(("First" "Second") hline (a b) (c d)) #+END_SRC #+RESULTS: | First | Second | |-------+--------| | a | b | | c | d |

8

If you put your cursor in the cell and hit C-h . it'll show the help text for that cell in the echo area. The help text contains the full value as well as the other help text. Kind of noisy but it shows the value. See display-local-help and Help Echo.

8

As far as I know, there is no built-in support for customizing truncation of table columns. However, you can modify the command org-table-align to achieve what you want: Find the file org-table.el. It is located in the directory of your org-mode installation. The fastest way to open it is via M-x find-library RET org-table RET. Copy the definition of org-...

8

Is it something like the example below: | Name | Age | Date of Birth | Income | |--------+--------------+------------------+--------| | Joe | 30 years old | <1984-02-20 Mon> | 84000 | | Mark | 40 years old | <1974-04-15 Mon> | 120000 | | Sophie | 44 years old | <1970-08-28 Fri> | 150000 | | Anna | 26 years old | <...

8

Embed your table inside a COMMENT block thus: #+BEGIN_COMMENT #+TBLNAME: data | Col1 | Col2 | Col3 | Col4 | Col5 | ... #+TBLFM: ... #+END_COMMENT I use this method for defining tabular data which I then process to produce an exported diagram or plot.

8

#+ATTR_LaTeX: :center nil will cancel centering (by default LaTeX tables inherit alignment from the document) This is how the table would be exported with default settings: \begin{center} \begin{tabular}{rrr} a & b & c\\ 1 & 2 & 3\\ \end{tabular} \end{center} This is how it would be exported without centering: \begin{tabular}{rrr} a & ...

8

I found the function you need (with a tiny bit of luck). You just have to add the following function to your before-save-hook. org-table-recalculate-buffer-tables Assuming you have no other hooks, this means just to set. (add-hook 'before-save-hook 'org-table-recalculate-buffer-tables) Feel free to adjust it to your needs.

8

Using Calc’s logical operations to handle the first row: | x | delta | |---+-------| | 2 | 0 | | 3 | 1 | | 5 | 2 | | 1 | -4 | | 7 | 6 | #+tblfm: $2=@# < 3 ? 0 :$1-@-1$1 Explanation: Org-tables understand Calc expressions (see (info "(org) Formula syntax for Calc")). The if expression uses the syntax condition ? then-part : ... 8 The difference is which shell gets called to evaluate your block. shell calls whatever your default shell is while sh calls /bin/sh specifically. Your default shell is probably bash, which is an extension of sh. echo$0 will tell you what executable your shell is running: #+BEGIN_SRC shell echo $0 #+END_SRC #+RESULTS: : /bin/bash #+BEGIN_SRC sh echo$0 #...

8

Two notes to answer your questions. The first answers your question directly. Take a look at The Org Manual and its section on References. In short: use @> to refer to the last row. The example provided in the manual says: @>$5 [refers to the] field in the last row, in column 5 Referring to the last-to-one row is not possible in this way, as far ... 7 My previous answer was just too convoluted (and it didn't actually compute what OP wanted). It appears there's a much simpler way to do it: This is actually the way to do it | Date | sleep | productivity | determination coefficient | |-------+-------+--------------+---------------------------| | [meh] | 7.50 | 4.00 | | | ... 7 The following formula will do the trick: #+TBLFM: @2$<..@>\$>=random(@1) This means: all rows 2 onwards, and all columns, get a random number in the range of the first row. Results will be integers. If you want real numbers, do random(@1 * 1.0).

7

At the end of section 3.5.1 of org manual there's a discussion of remote references, that's exactly what you're looking for: You may also reference constants, fields and ranges from a different table, either in the current file or even in a different file. The syntax is remote(NAME-OR-ID,REF) where NAME can be the name of a table in the ...

7

You can export the table to Markdown and use Markdown Here to format the table in your email. M-x org-md-export-as-markdown will export your document as Markdown, but the tables will be exported as HTML. This may be fine for your purposes, but if not you can install ox-pandoc and export your org-mode document with M-x org-pandoc-export-as-markdown_github. ...

7

Getting inspiration from this answer, the following works. You must install the xcolor package as instructed there. #+LATEX_HEADER: \usepackage[table]{xcolor} * table test | hi | there | |------+------------------------------------| | this | @@latex:\cellcolor{blue!25}@@ that | | one | two |

7

Yes, it is. For example, with this org file: * my table | blah | blah | And this elisp: (custom-set-variables '(org-capture-templates (quote (("t" "Table" table-line (file+headline "" "my table") "|%?| Blah |"))))) I can run org-capture and it appends a line to the table. If it doesn't find your org file, you may need to replace ...

6

There are three issues here I think. First, you need to put the markers ^ in a dedicated column, not mixed in like you have. Second, you need to have all your formulae in a single line. Fixing those, you would have: |---+-------------+---------| | | Other | | |---+-------------+---------| | | Spam | 100 | | | Ham | ...

Only top voted, non community-wiki answers of a minimum length are eligible