[Orgmode] LaTeX export of tables
Hi, When exporting tables to LaTeX, I think it would be good to have the following options to be able to define: - the table environment to be used: now we have the option to have tabular and longtable, but I could also use array, tabular*, tabularx, tabulary, etc. The general rule is: \begin{TABLEENV}{WIDTH}[VPOS]{COLS} ROWS \end{TABLEENV} TABLEENV can be any of tabular, array, tabular*, tabularx, etc., depending on the type of table I want. Some types of table need a WIDTH to be specified; in this case, I would add a WIDTH option. An extra vertical position VPOS option can also be added to some types of table. The COLS parameter already receives the value from the align org attribute. The following options #+ATTR_LATEX: tabularx width=\textwidth align=lX vpos=tb would generate the following LaTeX code: \begin{tabularx}{\textwidth}[tb]{lX} ROWS \end{tabularx} - the rule to be used as hline (similar option as in #+ORGTBL: :hline=\\midrule): #+ATTR_LATEX: hline=midrule or #+ATTR_LATEX: hline=\\midrule - define the top and bottom rules: #+ATTR_LATEX: toprule=\\toprule bottomrule=\\bottomrule Does it make sense? Would it be possible to have these new options in a future orgmode release? Thanks a lot. Francesco ___ 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
Re: [Orgmode] LaTeX export of images
Hi Nick and Carsten, First of all I thank you for your replies and the already checked-in patch. The behavior for images inserted in the middle of a paragraph is now correct. Yes sure, but what is wrong with \centerline? does the \centering lead to a different result? Using \centerline in the middle of a paragraph makes the image centered in the rest of the line: if you have word before and after the image, you get first the words before the image, then you get the image which is centered according to the remaining space on the line, and finally the words that come after the images are printed on the following line... it was really weird. Now, thanks to Nick's patch the image is correctly printed in the middle of the text. Currently, specifying either a #+CAPTION or a #+LABEL (or both) floats the image. Absent both of these the image is inlined (although without the above patch, it's inlined badly). LaTeX implicitly assumes that a floating figure has a caption: that's where the figure number is incremented for example. Given that, it does not seem productive to have a separate indicator for floats. Of course, if one is willing to forego the incrementing of the counter, then a float without a caption is possible in LaTeX - but is it useful? If it is, then using the #+LABEL specifier alone is enough to float the image (but currently, there is a problem in org-latex in that a \caption is always output - but that is a minor problem, easily fixed, if so desired). To summarize: org-latex currently always produces a \caption which causes LaTeX to increment the figure counter, but also to produce a Figure N: caption, even if the caption is empty. We could change org-latex not to produce a \caption if #+CAPTION is absent, but that would mean that the figure counter does not get incremented. I'm not sure that a saparate specifier is needed (it might be desirable only on readability grounds: saying #+FLOAT, rather than #+CAPTION or #+LABEL makes it a bit more obvious). These specifiers are per-image, afaict, not per-file/subtree. For my part, I don't see the need for the coarser kind of control: per-image is enough. But if desired, then maybe #+FLOAT: t (default nil) or perhaps better #+OPTIONS: float:t can be used for the coarser control. I hope this is clear but if there are questions, let me know. What do you think? This is perfectly clear. I thought a little bit more about this and I come with the following idea. We should float an image by default if the image is alone on a line (with or without caption or label). If label and caption are present than we add them to the float. If not, we simply float the image. An extra option like #+OPTIONS: float:nil/t could be used if we want to override the default behavior. In summary: 1) an image in the middle of the text simply exports as a \includegraphics command (this works perfectly no, so nothing to do here); 2) an image alone on a line should be floated by default; 3) caption and label are added only if present; 4) and extra option can be used to override the default behavior determining if the image is floated of not. Does all this make sense to you? Do you think this is feasible? If you have questions, please let me know. Regards, Francesco ___ 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
[Orgmode] LaTeX export of images
Hi, I have a question about the LaTeX export of images. I wondering why we treat differently images with caption/label than the ones that do not have caption/label. I suppose that we want to make the difference between images that appear in the middle of the text and those who will appear in a float (with possibly label and caption). 1) Images in the middle of the text If I have the following example: , | For this example, I will use this image [[myimage.png]] which is a very good one. ` Then, when exported, it produces the following LaTeX code: , | For this example, I will the use this image | \centerline{\includegraphics{myimage}} which is a very good one. ` Which produces weird layout when compiled to PDF. In this case, we should just generate \includegraphics{myimage} without the centerline command. 2) Images in floats In the case of floats, the correct generated code should be something like: \begin{figure}[htb] \centering \includegraphics{myimage} \label{LABEL} \caption{CAPTION} \end{figure} and not \begin{figure}[htb] \centerline{\includegraphics{myimage}} \label{LABEL} \caption{CAPTION} \end{figure} This can also be fixed quickly I think. Now, the question is: is it correct to identify a float image thanks to its caption and label attributes? Can't we have a float image without label or caption? Thanks for your help and input. Francesco ___ 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
[Orgmode] Re: LaTeX export bugs?
Hi Carsten, indeed, it looks like I did make a mistake when recently trying to fix this. I believe I have got it right this time (current git version), please verify. It works perfectly now. Thanks! Francesco ___ 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
Re: [Orgmode] Re: LaTeX export bugs?
Hi, Carsten Dominik wrote: On Jul 1, 2009, at 10:21 PM, Sébastien Vauban wrote: Other things I've noticed: - Even with version 6.28, the `#+TBLNAME' tag must be located in column 0 (at least, for the highlighting features to work) Fixed, thanks. I'm using orgmode 6.30c and I still have this problem: if the #+TBLNAME: tag is not located in column 0, the remote reference does not work. Here's my little test: #+TBLNAME: A | | T | |---+---| | | 2.00 | | | 5.00 | |---+---| | # | 9.00 | | ^ | total | #+TBLFM: $2=vsum(@-...@-ii);%.2f #+TBLNAME: price |T |PU | Total | |--+---+---| | 9.00 | 10.25 | 92.25 | |--+---+---| #+TBLFM: @2$1=remote(A,$total);%.2f::@2$3=$1*$2;%.2f Just add a few spaces at the first line and when you recompute the second table you get a Can't find remote table A message. Moreover, in a LaTeX environment, using the orgtbl minor mode, the highlighting (font locking) does not work on the #+TBLNAME: line, even if located in column 0. Thanks. F. ___ 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
Re: [Orgmode] Timeline view Headers not time-sorted
Hi, Strange, because if I try your file, I get the correct sequence. I finally located the problem: when I add the following line to my .emacs file then the problem happens. (require 'dircolors) Without dircolors everything works fine. Maybe you have an explanation (dircolors.el is attached)? Thanks for your help, Francesco dircolors.el Description: application/emacs-lisp ___ 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
Re: [Orgmode] Timeline view Headers not time-sorted
Hi Dominik, Thanks for your reply. have you modified org-agenda-sorting strategy? What is its value? I didn't modify its value. Here it is: ((agenda time-up priority-down category-keep) (todo priority-down category-keep) (tags priority-down category-keep) (search category-keep)) Francesco ___ 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
[Orgmode] Timeline view Display total time per day
Hi, In the timeline view of a single Org file, I would like to display the total amount of clocked time per day, something like the following: Wednesday 1 April 2009 (6:30) Clocked: (0:30) P1 Clocked: (4:00) P2 Clocked: (2:00) P1 Thursday2 April 2009 (5:00) Clocked: (3:00) P2 Clocked: (2:00) P3 etc. Could you tell me how to achieve that? Thanks a lot, Francesco ___ 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
[Orgmode] Timeline view Headers not time-sorted
Hi, I'm using org-mode version 6.25a and I'm getting the following problem: in the timeline view of a single Org file, headers are not time-sorted. Here's an Org file example: --8---cut here---start-8--- * P1 :LOGBOOK: CLOCK: [2009-04-30 Thu. 13:00]--[2009-04-30 Thu. 15:00] = 2:00 :END: * P2 :LOGBOOK: CLOCK: [2009-04-30 Thu. 10:00]--[2009-04-30 Thu. 12:00] = 2:00 :END: --8---cut here---end---8--- With the previous Org file, I end up with the following timeline view (C-c a L): --8---cut here---start-8--- --- Thursday 30 April 2009 Clocked: (2:00) P1 Clocked: (2:00) P2 --8---cut here---end---8--- I would expect to see P2 before P1 in the timeline. Could you tell me what I'm doing wrong? Thanks a lot, Francesco ___ 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
[Orgmode] Re: Time computation errors
Bernt Hansen, Bernt Hansen wrote: Francesco Pizzolante fpz-djc/ipccudyqhejpep6iedvlejwur...@public.gmane.org writes: Problems: 1) The sum of Time1 for Test headline is wrong: 3:30 instead of 2:30; 2) I'm unable to sum times through a formula (see Time3 column). The same formula works perfectly when you replace times with integers. Any feedback is welcome. I don't believe negative times are supported currently. You are probably right. The fact is that: 1) when you clock in and out, you can get negative durations (I know, it seems weird...) and then your clock table is wrong (negative duration are not taken into account when calculating the sums). Anyway, I think it should be good to support negative durations in order, for example, to compute differences between durations (which can lead to positive or negative times); How do you get negative times by clocking in and out? The only way I can think of that you can get negative time is if you edit the clocked values after they are created. By definition you have to clock in _before_ you clock out (right?) so everything clocked should be 0 minutes or positive. Am I missing something? Not at all, you're right: you only get negative times when you manually edit your clocks. 2) I'm still unable to sum positive times value in my table (see my problem 2) in my previous email). Is there a specific operator in order to sum times? I'm not sure what the answer to this is. I use the clocking features to summarize time spent working on tasks in clock reports only and I've never had the need to deal with negative values or summing clocked values manually in a table. Maybe other users have experience with summing times in tables outside of clock reports? On example could be to determine the difference between the estimated effort and the time really spent. You would necessarily end up with negative durations (supposing that some asks took less time than the estimated effort). Does it make sense? Thanks, Francesco ___ 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
Re: [Orgmode] Record extra info for each time block
Hi Matthew, First of all, thanks for your quick answer. But sometimes, you also need to record some other information related to that time block, for example, the distance you had to drive to go to the meeting or some costs (like parking costs) that you had to pay for it. Example: * Project1 ** Meetings :LOGBOOK: CLOCK: [2009-03-02 mon. 10:00]--[2009-03-02 mon. 12:30] = 2:30 15 kilometers CLOCK: [2009-03-03 tue. 09:30]--[2009-03-03 tue. 12:30] = 3:00 15 kilometers + 12,00 EUR :END: Is there a way to record this information? If not, what is your advice? You could also record this information as properties. E.g., , | * Meetings | :PROPERTIES: | :COLUMNS: %30ITEM %CLOCKSUM %10distance{+} %10expenses{$} | :END: | ** Meeting One |:LOGBOOK: |CLOCK: [2009-04-06 Mon 13:25]--[2009-04-06 Mon 14:37] = 1:12 |:END: |:PROPERTIES: |:distance: 15 |:expenses: 13.45 |:END: | | ** Meeting Two |:LOGBOOK: |CLOCK: [2009-04-06 Mon 16:41]--[2009-04-06 Mon 18:41] = 2:00 |:END: |:PROPERTIES: |:distance: 28 |:expenses: 22.31 |:END: | ` Of course, it would be nice to get a final table with everything summed up: total work, total kilometers, total fees. If you add a column line (as in the example above) you can use column view (C-c C-x C-c) to get a nice overview with everything summed up in the top heading. Or you could capture the data in a table (C-x C-c i). E.g., , | ** Summary | #+BEGIN: columnview :hlines 1 :id local | | ITEM | CLOCKSUM | distance | expenses | | |+--+--+--| | | * Meetings | 3:12 | 43 |35.76 | | | ** Meeting One | 1:12 | 15 |13.45 | | | ** Meeting Two | 2:00 | 28 |22.31 | | #+END: ` Your solution is nice and works but it doesn't fit all my needs: the distance and expense information are recorded for a headline but it is not related to a specific time block. When I think a little further, I realize that it would be great to attach information to time blocks. Here's, in more details, what I'd like to have. The idea is to generate 2 views from the same set of information: the first view would be a per project view and a second one, a per day view. Let's take an example. Let's assume that we have the following headline view (with new attributes associated to each time block, in an imaginary syntax): --8---cut here---start-8--- * Work for April 2009 *** Project 1 This is project 1. * Task 11 This is task 11. :LOGBOOK: CLOCK: [2009-04-06 mon. 10:00]--[2009-04-06 mon. 12:30] = 2:30 + expense 10.00 CLOCK: [2009-04-06 mon. 13:00]--[2009-04-06 mon. 14:00] = 1:00 + distance 15 :END: * Task 12 This is task 12. :LOGBOOK: CLOCK: [2009-04-06 mon. 08:00]--[2009-04-06 mon. 10:00] = 2:00 + distance 5 :END: *** Project 2 This is project 2. * Task 21 This is task 21. :LOGBOOK: CLOCK: [2009-04-06 mon. 15:00]--[2009-04-06 mon. 17:00] = 2:00 :END: * Task 22 This is task 22. :LOGBOOK: CLOCK: [2009-04-06 mon. 14:00]--[2009-04-06 mon. 15:00] = 1:00 :END: *** Project3 This is project 3. * Task 31 This is task 31. :LOGBOOK: CLOCK: [2009-04-07 tue. 08:00]--[2009-04-07 tue. 11:30] = 3:30 + expense 10.00 + distance 5 :END: --8---cut here---end---8--- This project view is very important as it is the main view for time clocking on a per project basis. From this single view, I would like to be able to generate 2 kinds of exportable tables (in LaTex or other documents -- not an overlay solution like column view). The first one would be a summary per project for April 2009 and would be mainly used by project managers. --8---cut here---start-8--- |---+---+--+--| | Description | Work | Distance | Expenses | |---+---+--+--| | * Work for April 2009 | 12:00 | 25 |20.00 | |---+---+--+--| | *** Project 1 | 5:30 | 20 |10.00 | | * Task 11 | 3:30 | 15 |10.00 | | * Task 12 | 2:00 |5 | | | *** Project 2 | 3:00 | | | | * Task 21 | 2:00 | | | | * Task 22 | 1:00 | | | | *** Project 3 | 3:30 |5 |10.00 | | * Task 31 | 3:30 |5 |10.00 | | | | | | |---+---+--+--| --8---cut here---end---8--- The second one would be a
[Orgmode] Time computation errors
Hi, Going on in discovering org-mode, I found 2 problems when trying to make computations on times. Consider the following example: --8---cut here---start-8--- * Test #+COLUMNS: %25ITEM(Description) %Time1{:} %Time2{:} %Time3{:} #+BEGIN: columnview :hlines 1 :id local | Description | Time1 | Time2 | Time3 | |-+---+---+| | * Test | 3:30 | 3:00 | #ERROR | | *** Item 1 | -1:30 | 1:00 | #ERROR | | *** Item 2 | 4:00 | 2:00 | #ERROR | #+TBLFM: $4=$2+$3 #+END: *** Item 1 :PROPERTIES: :Time1:-1:30 :Time2:1:00 :END: *** Item 2 :PROPERTIES: :Time1:4:00 :Time2:2:00 :END: --8---cut here---end---8--- Problems: 1) The sum of Time1 for Test headline is wrong: 3:30 instead of 2:30; 2) I'm unable to sum times through a formula (see Time3 column). The same formula works perfectly when you replace times with integers. Any feedback is welcome. Thanks, Francesco ___ 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
[Orgmode] Re: Time computation errors
Hi Bernt, Thanks for your answer. Consider the following example: --8---cut here---start-8--- * Test #+COLUMNS: %25ITEM(Description) %Time1{:} %Time2{:} %Time3{:} #+BEGIN: columnview :hlines 1 :id local | Description | Time1 | Time2 | Time3 | |-+---+---+| | * Test | 3:30 | 3:00 | #ERROR | | *** Item 1 | -1:30 | 1:00 | #ERROR | | *** Item 2 | 4:00 | 2:00 | #ERROR | #+TBLFM: $4=$2+$3 #+END: *** Item 1 :PROPERTIES: :Time1:-1:30 :Time2:1:00 :END: *** Item 2 :PROPERTIES: :Time1:4:00 :Time2:2:00 :END: --8---cut here---end---8--- Problems: 1) The sum of Time1 for Test headline is wrong: 3:30 instead of 2:30; 2) I'm unable to sum times through a formula (see Time3 column). The same formula works perfectly when you replace times with integers. Any feedback is welcome. I don't believe negative times are supported currently. You are probably right. The fact is that: 1) when you clock in and out, you can get negative durations (I know, it seems weird...) and then your clock table is wrong (negative duration are not taken into account when calculating the sums). Anyway, I think it should be good to support negative durations in order, for example, to compute differences between durations (which can lead to positive or negative times); 2) I'm still unable to sum positive times value in my table (see my problem 2) in my previous email). Is there a specific operator in order to sum times? Thanks, F. ___ 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
[Orgmode] Record extra info for each time block
Hi, I'm discovering org-mode and it's really great. I'm still wondering how to do several things... like this one: regarding a headline, it is possible to clock the amount of time you worked on it. But sometimes, you also need to record some other information related to that time block, for example, the distance you had to drive to go to the meeting or some costs (like parking costs) that you had to pay for it. Example: * Project1 ** Meetings :LOGBOOK: CLOCK: [2009-03-02 mon. 10:00]--[2009-03-02 mon. 12:30] = 2:30 15 kilometers CLOCK: [2009-03-03 tue. 09:30]--[2009-03-03 tue. 12:30] = 3:00 15 kilometers + 12,00 EUR :END: Is there a way to record this information? If not, what is your advice? Of course, it would be nice to get a final table with everything summed up: total work, total kilometers, total fees. Thanks in advance for your help. F. ___ 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