Re: [O] tables, comment in one line, export to html
Michael Brand writes: > <#> will have to be considered for removal of the line too. Yes, it is really the same as alignment/width cookies. BTW, it should be possible to merge them together. E.g., one could write for a right aligned 10 characters large column not meant to be exported. This probably requires some slight changes in org-table.el. > <#> will have to be fontified like <5> as org-formula (name and > description of the face are not precise) wich is the easiest part of > the change. Shouldn't < and > in a table be fontified too? They should, as long as the first field is "/", unlike to alignment/width cookies. I wouldn't bother too much though, since fontification needs to be rewritten using the parser, once the latter get a more robust cache, that is. Regards,
Re: [O] tables, comment in one line, export to html
Hi Nicolas I agree, together all the below makes sense. Some comments added. Nicolas Goaziou wrote: > You are talking about section "3.5 The spreadsheet". I don't think this > feature is directly related to spreadsheet capabilities. > > Actually, / in first column is described earlier in the manual, in "3.3 > Column groups". Besides, there is a similar feature described in "3.2 > Column width and alignment", about lines containing only alignment > cookies: > > Lines which only contain these formatting cookies will be removed > automatically when exporting the document. <#> will have to be considered for removal of the line too. > IMO, a better change would be to merge 3.2 and 3.3 as "Column > operations" or some such, and add "<#>" as a way to ignore columns upon > exporting. This way, everything related to columns is packed in the same > subsection, and every column markup uses < or >. Moreover, there is no > possible confusion with # markup from spreadsheet. > > WDYT? > Another advantage about this is that there is no need for "/" in the > first column, much like alignments cookies. <#> will have to be fontified like <5> as org-formula (name and description of the face are not precise) wich is the easiest part of the change. Shouldn't < and > in a table be fontified too? > It makes it simpler to ignore the first column. Michael
Re: [O] tables, comment in one line, export to html
Completing myself, > IMO, a better change would be to merge 3.2 and 3.3 as "Column > operations" or some such, and add "<#>" as a way to ignore columns upon > exporting. This way, everything related to columns is packed in the same > subsection, and every column markup uses < or >. Moreover, there is no > possible confusion with # markup from spreadsheet. Another advantage about this is that there is no need for "/" in the first column, much like alignments cookies. It makes it simpler to ignore the first column.
Re: [O] tables, comment in one line, export to html
Hello, Michael Brand writes: > To have similar things look similar and make it clear in the manual I > suggest to change the long existing > > ~/~ > Do not export this line. Useful for lines that contain the > narrowing `' markers or column group markers. > > Finally, just to whet your appetite [...] > > to > > ~/~ > Do not export this row or column. In the first column ~/~ means > do not export this row which is useful for rows that contain the > narrowing ~~ markers, column group markers or markers to not > export a column. In all other columns ~/~ means do not export > this column if also the first column is marked with ~/~. When > the first column should not be exported move its content other > than markers into an other column. > > When more than one marker is needed in a column put each in an own > row with ~/~ in the first column. > > Finally, just to wet your appetite [...] You are talking about section "3.5 The spreadsheet". I don't think this feature is directly related to spreadsheet capabilities. Actually, / in first column is described earlier in the manual, in "3.3 Column groups". Besides, there is a similar feature described in "3.2 Column width and alignment", about lines containing only alignment cookies: Lines which only contain these formatting cookies will be removed automatically when exporting the document. IMO, a better change would be to merge 3.2 and 3.3 as "Column operations" or some such, and add "<#>" as a way to ignore columns upon exporting. This way, everything related to columns is packed in the same subsection, and every column markup uses < or >. Moreover, there is no possible confusion with # markup from spreadsheet. WDYT? Regards, -- Nicolas Goaziou
Re: [O] tables, comment in one line, export to html
Hi On Tue, Apr 26, 2016 at 11:10 PM, Nicolas Goaziou wrote: > Michael Brand writes: >> # in non-first columns to mean noexport of the column has the >> disadvantage of possible confusion with # in the first column where it >> means special effect for recalculation when using the spreadsheet. As >> I understand your first paragraph you want to avoid such confusion. > > I don't think there is a possible confusion if the manual makes it > clear. > >> <#> I find a bit too near to <5>, <, > or <>. > > That was exactly the point, since those all apply to columns, unlike to > rows special markers. IOW, so far, columns syntax systematically uses < > or > (or both). > >> % or ; used for comments in LaTeX or Emacs Lisp I would find a good >> space saving single character alternative. Why not % as this would not >> be the first time that Org borrowed some syntax elements from LaTeX? > > Org comment syntax is related to #, not % or ;. I'd rather have similar > things look similar. To have similar things look similar and make it clear in the manual I suggest to change the long existing ~/~ Do not export this line. Useful for lines that contain the narrowing `' markers or column group markers. Finally, just to whet your appetite [...] to ~/~ Do not export this row or column. In the first column ~/~ means do not export this row which is useful for rows that contain the narrowing ~~ markers, column group markers or markers to not export a column. In all other columns ~/~ means do not export this column if also the first column is marked with ~/~. When the first column should not be exported move its content other than markers into an other column. When more than one marker is needed in a column put each in an own row with ~/~ in the first column. Finally, just to wet your appetite [...] Michael
Re: [O] tables, comment in one line, export to html
Hello, Michael Brand writes: > # in non-first columns to mean noexport of the column has the > disadvantage of possible confusion with # in the first column where it > means special effect for recalculation when using the spreadsheet. As > I understand your first paragraph you want to avoid such confusion. I don't think there is a possible confusion if the manual makes it clear. > <#> I find a bit too near to <5>, <, > or <>. That was exactly the point, since those all apply to columns, unlike to rows special markers. IOW, so far, columns syntax systematically uses < or > (or both). > % or ; used for comments in LaTeX or Emacs Lisp I would find a good > space saving single character alternative. Why not % as this would not > be the first time that Org borrowed some syntax elements from LaTeX? Org comment syntax is related to #, not % or ;. I'd rather have similar things look similar. Regards, -- Nicolas Goaziou
Re: [O] tables, comment in one line, export to html
Hi On Tue, Apr 26, 2016 at 9:14 PM, Nicolas Goaziou wrote: > It sounds good, as long as it is clear this markers is for export > consumption only, and has no special effect when using the spreadsheet. > > I suggest to use # or <#> instead of / so as to refer to "comment" (but > still use / as the marker for the first column). # in non-first columns to mean noexport of the column has the disadvantage of possible confusion with # in the first column where it means special effect for recalculation when using the spreadsheet. As I understand your first paragraph you want to avoid such confusion. / in non-first columns to mean noexport of the column as I did before has the disadvantage of possible confusion with / in the first column where it means noexport of the row. <#> I find a bit too near to <5>, <, > or <>. % or ; used for comments in LaTeX or Emacs Lisp I would find a good space saving single character alternative. Why not % as this would not be the first time that Org borrowed some syntax elements from LaTeX? The glyph has also similarities to / that has a similar meaning. > The removal could be done in a function like > `org-export--delete-commented-rows' (see `org-export--delete-comments' > in "ox.el"). And just to mention if someone wants to start: The non-greediness I did before is not necessary and could be omitted for better readability: old: "^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" new: "^[ \t]*| +/ +|\\(.*|\\)? +\\(%\\) +|" > This would also require documenting it in the manual and providing > tests. And a change note. > Does anyone feel like doing that? Let me see. If anyone wants to beat me please go ahead. Michael
Re: [O] tables, comment in one line, export to html
Hello, torys.ander...@gmail.com (Tory S. Anderson) writes: > Second the suggestion to make | / | columns ignored for export in > mainstream orgmode. > > Uwe Brauer writes: > >> > Hi Uwe >> > On Tue, Apr 19, 2016 at 1:08 PM, Uwe Brauer > >> wrote: >> >> >> > I have the same need now and just hacked something simple >> > together to >> > export >> >> > | / | / || | >> > | | 1n | 2y | 3y | >> >> Great!! thanks, I just tested it. So all columns having a / header >> are >> ignored, at least for html and latex export. This is really great. >> Thanks again. I'd say that code should be somehow included in >> mainstream >> orgmode, if you don't mind? It sounds good, as long as it is clear this markers is for export consumption only, and has no special effect when using the spreadsheet. I suggest to use # or <#> instead of / so as to refer to "comment" (but still use / as the marker for the first column). The removal could be done in a function like `org-export--delete-commented-rows' (see `org-export--delete-comments' in "ox.el"). This would also require documenting it in the manual and providing tests. Does anyone feel like doing that? Regards, -- Nicolas Goaziou
Re: [O] tables, comment in one line, export to html
Second the suggestion to make | / | columns ignored for export in mainstream orgmode. Uwe Brauer writes: > Hi Uwe > On Tue, Apr 19, 2016 at 1:08 PM, Uwe Brauer > wrote: > I have the same need now and just hacked something simple > together to > export > | / | / || | > | | 1n | 2y | 3y | Great!! thanks, I just tested it. So all columns having a / header are ignored, at least for html and latex export. This is really great. Thanks again. I'd say that code should be somehow included in mainstream orgmode, if you don't mind? regards Uwe -- Tory S. Anderson Computational Cognitive Narratologist & Application Developer http://toryanderson.com
Re: [O] tables, comment in one line, export to html
> Hi Uwe > On Tue, Apr 19, 2016 at 1:08 PM, Uwe Brauer wrote: > I have the same need now and just hacked something simple together to > export > | / | / || | > | | 1n | 2y | 3y | Great!! thanks, I just tested it. So all columns having a / header are ignored, at least for html and latex export. This is really great. Thanks again. I'd say that code should be somehow included in mainstream orgmode, if you don't mind? regards Uwe
Re: [O] tables, comment in one line, export to html
Hi Uwe On Tue, Apr 19, 2016 at 1:08 PM, Uwe Brauer wrote: > I would like to have a table entry in which the last colum contains > comments which I don't want to export to html. > > Like this > > | Joe Smith | 7 | 25 | 5 || 37 | | #+begin_comment from > group B B #+end_comment | > > But this does not work. So how can I achieve it? I have the same need now and just hacked something simple together to export | / | / || | | | 1n | 2y | 3y | | / | | / || | | 1y | 2n | 3y | | / | | / | | 1y | 2y | 3n | | / | / | / | | / | / | / | | | 1n | 2n | 3y | 4n | 5n | 6n | | / | | | | | | | | / | / | / | / | | / | / | | | 1n | 2n | 3n | 4y | 5n | 6n | # Same result with a less useful notation: | / | | | | | | | | / | / | / | | | / | / | | / | | / | / | | | | | | 1n | 2n | 3n | 4y | 5n | 6n | # Deletion must not get trapped with this: | / | | | | | | | | / | | | | | | | | | / | / | / | | | | | | 1y | 2y | 3y | 4y | 5y | 6y | as e. g. ASCII to : 2y 3y : : 1y 3y : : 1y 2y : : 3y : : 4y : : 4y : : / // : 1y 2y 3y 4y 5y 6y with (add-hook 'org-export-before-processing-hook 'f-ox-filter-table-column-del) (defun f-ox-filter-table-column-del (back-end) "Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1. If you want a non-empty column $1 to be deleted make it $2 by inserting an empty column before or rearrange column order in some other way. Make sure \"/\" is in $1 again after that." (while (re-search-forward "^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t) (goto-char (match-beginning 2)) (org-table-delete-column) (beginning-of-line))) Michael
Re: [O] tables, comment in one line, export to html
On Tuesday, 19 Apr 2016 at 19:54, Uwe Brauer wrote: > Cool, thanks very much I tried out > > | name | result | @@html:@@ > | Smith | 10 | @@html:@@ > > Which does almost all I want, it inserts an empty third column, but I > presume this cannot be changed? Without real hackery, not unless you want the comment construct to be part of the previous column in org? I.e. move the | before the @@ to the end of the line. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa
Re: [O] tables, comment in one line, export to html
>>> "Eric" == Eric S Fraga writes: > On Tuesday, 19 Apr 2016 at 17:01, Fraga, Eric wrote: >> How about inline html: @@html:@@ > Sorry, I mistyped the HTML comment enclosure... this should be > @@html:@@ Cool, thanks very much I tried out | name | result | @@html:@@ | Smith | 10 | @@html:@@ Which does almost all I want, it inserts an empty third column, but I presume this cannot be changed? Anyhow this solution is sufficient for me, but if you know how to get rid of that third column, I would be even more grateful! Thanks again Uwe
Re: [O] tables, comment in one line, export to html
On Tuesday, 19 Apr 2016 at 17:01, Fraga, Eric wrote: > How about inline html: @@html:@@ Sorry, I mistyped the HTML comment enclosure... this should be @@html:@@ -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412
Re: [O] tables, comment in one line, export to html
On Tuesday, 19 Apr 2016 at 11:08, Uwe Brauer wrote: > Hello > > I would like to have a table entry in which the last colum contains > comments which I don't want to export to html. > > Like this > > | Joe Smith | 7 | 25 | 5 | | 37 | | #+begin_comment from group B B > #+end_comment | How about inline html: @@html:@@ ? (untested) -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa
Re: [O] tables, comment in one line, export to html
>>> "Michael" == Michael Welle writes: > Hello, > Uwe Brauer writes: >> Hello >> >> I would like to have a table entry in which the last colum contains >> comments which I don't want to export to html. >> >> Like this >> >> | Joe Smith | 7 | 25 | 5 | | 37 | | #+begin_comment from group B B >> #+end_comment | >> >> But this does not work. So how can I achieve it? > one way to achieve that would be: > * Table example > ** Exported table > #+BEGIN_HTML > > #+END_HTML > #+BEGIN_HTML > > #+END_HTML > ** Internal table :noexport: > #+ORGTBL: SEND table_name orgtbl-to-html :skipcols (3) > | 3 | 3 | void | > | 4 | 4 | foo | > | 5 | 5 | bar | Thanks but this is supposed to work in a org mode buffer? Does not work for me. Also I wanted to export the whole file not just a part of it in the file. It seems that you are in a HTML buffer and use orgtbl radio tables? That I do in latex files but not in HTML files, they are just for me too ugly to edit them directly.
Re: [O] tables, comment in one line, export to html
> Hello, > Uwe Brauer writes: > one way to achieve that would be: > * Table example > ** Exported table > #+BEGIN_HTML > > #+END_HTML > #+BEGIN_HTML > > #+END_HTML > ** Internal table :noexport: > #+ORGTBL: SEND table_name orgtbl-to-html :skipcols (3) > | 3 | 3 | void | > | 4 | 4 | foo | > | 5 | 5 | bar | > Sort of, at least. I hope there are better ways. Correction to my reply: it works, but it generates html code which I have then to insert into a HTML file. I prefer directly to import the whole org file. Can that be achieved?
[O] tables, comment in one line, export to html
Hello I would like to have a table entry in which the last colum contains comments which I don't want to export to html. Like this | Joe Smith | 7 | 25 | 5 || 37 | | #+begin_comment from group B B #+end_comment | But this does not work. So how can I achieve it? thanks Uwe Brauer