Re: [O] Latex strikethrough or cancel?
Nick Dokos writes: > ... > You must mean HTML export - MathJax apparently does not know about > \cancel. There is an extension mechanism: > > https://docs.mathjax.org/en/latest/extension-writing.html > > but that's as far as my knowledge extends. If you make it work, please > share. > It's actually simple - the documentation tells you exactly how to do it using the cancel package as an example :-) - see the section "TeX and LaTeX extensions" in https://docs.mathjax.org/en/v2.5-latest/tex.html All you need to do to incorporate that into org is to make it add the script when you export. That is done by appending it to org-html-mathjax-template: --8<---cut here---start->8--- (setq org-html-mathjax-template (concat org-html-mathjax-template " MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () { MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{ cancel: [\"Extension\",\"cancel\"], bcancel: [\"Extension\",\"cancel\"], xcancel: [\"Extension\",\"cancel\"], cancelto: [\"Extension\",\"cancel\"] }); }); ")) --8<---cut here---end--->8--- -- Nick
Re: [O] [RFC] Draft mode
Thomas S. Dye writes: > Rasmus writes: > The interest of such functionality seems to be limited to people who maintain broken-but-soon-to-be-fixed documents... It does not seem to warrant prime real estate in the exporter IMO. Further, I don't think 'draft' is the correct word for this, but that's of course minor. >>> >>> I couldn't find anything better. Suggestions welcome. >> >> I agree. We already have the org-latex-classes, which a very different >> from latex-proper classes. This seems to cause a lot of confusion. >> Perhaps we can limit such overlap in the future. >> >> It’s a "relaxed" mode. I’m not sure what a good term for this is. > > Trial mode? I think I will go with the straight to the point `org-export-barf-on-invalid-link' variable. However, not sure about the OPTIONS item. #+OPTIONS: ???:t Regards,
Re: [O] [BUG] R src blocks untabify literal constant TABs
On Thu, 8 Oct 2015, Nicolas Goaziou wrote: Hello, "Charles C. Berry" writes: [...] The main culprit is `org-do-remove-indentation', which doesn't need to untabify the buffer in order to proceed. I changed that in master. It should go a long way towards fixing the issue. Is there any case left to fix? If there isn't, is the current documentation accurate enough or do you think it needs to be improved? If `org-src-preserve-indentation' is nil, then embedded (not just leading/trailing) tabs in src blocks are converted to spaces when `org-edit-src-code' is called or when exported. Not sure I would call this a bug. If that is not deemed a bug, the docstring needs to mention that embedded tabs get converted. Apart from that, the documentation needs to reverse this in 14.2: "may replace sequences of spaces with tab characters" as it is spaces that replace tab characters. Best, Chuck
[O] [PATCH] Org mode manual proofreading
Hi! I just read the Org mode manual (it was a good read, thanks!), and noted formatting- and spelling errors I found along the way. The attached patch corrects those. This is my first time contributing to Org mode. I have signed the FSF papers for Emacs earlier. -- Simen >From 497f8a29cfa21328094d4ff5418ac9722ee4d8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Fri, 13 Mar 2015 20:18:41 +0100 Subject: [PATCH] org.texi: Fix numerous typos * org.texi: Fix numerous formatting- and typing errors. --- doc/org.texi | 56 +--- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index b701fd7..4020636 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -2437,7 +2437,7 @@ of a @emph{column formula} that will be applied to all non-header fields in a column without having to copy the formula to each relevant field. There is also a formula debugger, and a formula editor with features for highlighting fields in the table corresponding to the references at the point in the -formula, moving these references by arrow keys +formula, moving these references by arrow keys. @menu * References:: How to refer to another field or range @@ -2575,9 +2575,9 @@ Insert the doubled value of each column of row 1 of the table named @noindent For the second/third example, the table named @code{FOO} must have at least as many rows/columns as the current table. Note that this is -inefficient@footnote{The computation time scales as O(N^2) because the table -named @code{FOO} is parsed for each field to be read.} for large number of -rows/columns. +inefficient@footnote{The computation time scales as O(N@math{^2}) because the +table named @code{FOO} is parsed for each field to be read.} for large number +of rows/columns. @subsubheading Named references @cindex named references @@ -2723,7 +2723,7 @@ $0;%.1f @r{Reformat current cell to 1 decimal} ($3-32)*5/9 @r{Degrees F -> C conversion} $c/$1/$cm@r{Hz -> cm conversion, using @file{constants.el}} tan($1);Dp3s1@r{Compute in degrees, precision 3, display SCI 1} -sin($1);Dp3%.1e @r{Same, but use printf specifier for display} +sin($1);Dp3%.1e @r{Same, but use @samp{printf} specifier for display} taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree} @end example @@ -2770,7 +2770,7 @@ not enough. If a formula starts with a single-quote followed by an opening parenthesis, then it is evaluated as a Lisp form. The evaluation should return either a string or a number. Just as with @file{calc} formulas, you can specify modes -and a printf format after a semicolon. +and a @samp{printf} format after a semicolon. With Emacs Lisp forms, you need to be conscious about the way field references are interpolated into the form. By default, a reference will be @@ -3566,7 +3566,7 @@ exact headline will be matched, ignoring spaces and cookies. If the value is @code{query-to-create}, then an exact headline will be searched; if it is not found, then the user will be queried to create it.} file:projects.org::*task title @r{heading search in Org -file}@footnote{ Headline searches always match the exact headline, ignoring +file}@footnote{Headline searches always match the exact headline, ignoring spaces and cookies. If the headline is not found and the value of the option @code{org-link-search-must-match-exact-headline} is @code{query-to-create}, then the user will be queried to create it.} @@ -3728,7 +3728,7 @@ valid link prefixes like @samp{http:} or @samp{ftp:}, including the prefixes defined through link abbreviations (@pxref{Link abbreviations}). If you press @key{RET} after inserting only the @var{prefix}, Org will offer specific completion support for some link types@footnote{This works by -calling a special function @code{org-PREFIX-complete-link}.} For +calling a special function @code{org-PREFIX-complete-link}.}. For example, if you type @kbd{file @key{RET}}, file name completion (alternative access: @kbd{C-u C-c C-l}, see below) will be offered, and after @kbd{bbdb @key{RET}} you can complete contact names. @@ -3887,7 +3887,7 @@ called with the tag as the only argument to create the link. With the above setting, you could link to a specific bug with @code{[[bugzilla:129]]}, search the web for @samp{OrgMode} with @code{[[google:OrgMode]]}, show the map location of the Free Software -Foundation @code{[[gmap:51 Franklin Street, Boston]]} or of Carsten office +Foundation @code{[[gmap:51 Franklin Street, Boston]]} or of Carsten's office @code{[[omap:Science Park 904, Amsterdam, The Netherlands]]} and find out what the Org author is doing besides Emacs hacking with @code{[[ads:Dominik,C]]}. @@ -5231,7 +5231,7 @@ or with a tree they need to be inserted into a special drawer right below a headline, and its planning line (@pxref{Deadlines and scheduling}) when
Re: [O] [BUG] R src blocks untabify literal constant TABs
"Charles C. Berry" writes: > If `org-src-preserve-indentation' is nil, then embedded (not just > leading/trailing) tabs in src blocks are converted to spaces when > `org-edit-src-code' is called This is now fixed in master. Thank you. >or when exported. I cannot reproduce it. Do you have an ECM ? > Not sure I would call this a bug. I think it is one. > If that is not deemed a bug, the docstring needs to mention that > embedded tabs get converted. > > Apart from that, the documentation needs to reverse this in 14.2: > > "may replace sequences of spaces with tab characters" > > as it is spaces that replace tab characters. OK. So with the new behaviour, this is the only necessary change to documentation? Regards,
Re: [O] [RFC] Draft mode
Eric S Fraga writes: > On Thursday, 8 Oct 2015 at 19:00, Nicolas Goaziou wrote: > > [...] > >> I think I will go with the straight to the point >> `org-export-barf-on-invalid-link' variable. >> >> However, not sure about the OPTIONS item. >> >> #+OPTIONS: ???:t > > #+options: barf:t > > ;-) > > More seriously, I'm a big fan of longer is better if more clear so how > about "invalidlinksok:t" or "allowdanglinglinks:t" or some variation > thereof? Can option names contain dashes? If so, combine these two ideas to make a name as similar as possible to the variable name: #+options: barf-on-invalid-link:t But I suspect that dashes are not allowed. -- Nick
Re: [O] SOLVED: LaTeX equation align in orgmode?
I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it generate a very back quality image like this:
Re: [O] org-agenda-files
On 08/10/15 20:42, Eric S Fraga wrote: > On Tuesday, 6 Oct 2015 at 21:34, Paul Jewell wrote: > > [...] > >> So by setting org-user-agenda-files in my .emacs before loading >> org-mode.el (which I have in my ~/.emacs.d/lisp directory), I should be >> setting org-agenda-files to ("~/git/org" "~/git/org/test"). > > When do you load org itself? > > Other than variables set by customize, I load org and then setq > variables. > The problem was customize. I set the org-user-agenda-files in .emacs, then load the org-mode.el. This loads org mode at te top of the file, then sets org-agenda-files to org-user-agenda-files. The bit I missed was that org-agenda-files were set in customize to nil, and this change was happening after the assignment. Once I cleared this, everything works as planned. Thanks for coming back to me!
Re: [O] BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround
On Thu, 1 Oct 2015, Cook, Malcolm wrote: I am not sure what the best solution is, but, in my hands using > > Org-mode version 8.3.2-elpa org-20150929 the reg-expt used to "cleanup > > extra prompts left in output" is over-aggressive and will trim session > > :output at lines consisting exclusively of blanks and periods such as > > produced when printing a BioConductor 'Views' object which wants to > > appear as > [snip] I offer as a possible workaround the following: > > > > So far, I have had good success having removed provision for allowing > leading whitespace by changing the regexp org-babel-R-evaluate-session > from > > "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" > > to > > "^\\([>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" > > > > But I don't know all the test cases so, YMMV I have traced this back to its source, and the culprit appears to be me. See commit dc92eaa08d89e4bc9556f868ae65633196157a8d Author: Eric Schulte Date: Wed Jul 28 08:05:30 2010 -0600 and subsequent modifications. I believe the leading blank(s) in the regex were copied from ess, but nowadays I only see this in code in ess-traceback.el that is commented out. So I guess there would be no harm in pushing the latter regex. Chuck
Re: [O] BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround
> On Thu, 1 Oct 2015, Cook, Malcolm wrote: > > >>> I am not sure what the best solution is, but, in my hands using > > > > Org-mode version 8.3.2-elpa org-20150929 the reg-expt used to > > > > "cleanup extra prompts left in output" is over-aggressive and will > > > > trim session :output at lines consisting exclusively of blanks and > > > > periods such as produced when printing a BioConductor 'Views' > > > > object which wants to appear as > > > > > [snip] > > >>> I offer as a possible workaround the following: > > > > > > > > So far, I have had good success having removed provision for > > > > allowing > > > leading whitespace by changing the regexp > > > org-babel-R-evaluate-session from > > > > "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" > > > > to > > > > "^\\([>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" > > > > > > > > But I don't know all the test cases so, YMMV > > I have traced this back to its source, and the culprit appears to be me. > > See >commit dc92eaa08d89e4bc9556f868ae65633196157a8d >Author: Eric Schulte >Date: Wed Jul 28 08:05:30 2010 -0600 > and subsequent modifications. > > I believe the leading blank(s) in the regex were copied from ess, but > nowadays > I only see this in code in ess-traceback.el that is commented out. > > So I guess there would be no harm in pushing the latter regex. Hi Chuck. Thanks for the history lesson, and taking this on in the first place. Yay!~Malcolm > > Chuck
Re: [O] org-agenda-files
On Tuesday, 6 Oct 2015 at 21:34, Paul Jewell wrote: [...] > So by setting org-user-agenda-files in my .emacs before loading > org-mode.el (which I have in my ~/.emacs.d/lisp directory), I should be > setting org-agenda-files to ("~/git/org" "~/git/org/test"). When do you load org itself? Other than variables set by customize, I load org and then setq variables. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
Re: [O] [RFC] Draft mode
On Thursday, 8 Oct 2015 at 19:00, Nicolas Goaziou wrote: [...] > I think I will go with the straight to the point > `org-export-barf-on-invalid-link' variable. > > However, not sure about the OPTIONS item. > > #+OPTIONS: ???:t #+options: barf:t ;-) More seriously, I'm a big fan of longer is better if more clear so how about "invalidlinksok:t" or "allowdanglinglinks:t" or some variation thereof? -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
[O] org-agenda-files
Good evening! I am starting to use a more complex setup for org-mode, having left it alone for more than a year. The setup I am using is documented here: http://doc.norang.ca/org-mode.html I am having a problem with setting up the org-agenda-files variable in the startup code: In my .emacs: 8< (setq org-user-agenda-files ( quote ("~/git/org" "~/git/org/test"))) (add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp")) (load "org-mode") 8< In the org-mode.el file from the above site: 8< ;; The following setting is different from the document so that you ;; can override the document org-agenda-files by setting your ;; org-agenda-files in the variable org-user-agenda-files ;; (if (boundp 'org-user-agenda-files) (setq org-agenda-files org-user-agenda-files) (setq org-agenda-files (quote ("~/git/org" "~/git/org/client1" "~/git/client2" 8< So by setting org-user-agenda-files in my .emacs before loading org-mode.el (which I have in my ~/.emacs.d/lisp directory), I should be setting org-agenda-files to ("~/git/org" "~/git/org/test"). Results of executing the following code (in this order) in the scratch buffer: (boundp 'org-user-agenda-files) => t org-user-agenda-files => ("~/git/org" "~/git/org/test") (boundp 'org-agenda-files)=> t org-agenda-files => nil (setq org-agenda-files org-user-agenda-files) => ("~/git/org" "~/git/org/test") org-agenda-files => ("~/git/org" "~/git/org/test") So I don't understand why the commands in .emacs and org-mode.el aren't giving me the expected results. Have I missed something with my limited knowledge of lisp? Many thanks in advance for your help!
[O] Suggestion for automatic latex rendering
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I love org-mode and use it a lot for latex notes. I will like to suggest a new latex setting which let org-mode show the latex code when cursor is on the code line. But when the cursor leaves the code line the latex is automatic rendered to a image. This will save many C-c C-x C-l and C-c C-c and make Latex editing much easier. If the latex is a multi line block it should only render when you leave the block. Thanks for Org-mode. Knud -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEcBAEBAgAGBQJWFRvTAAoJEIiA+jisx2wbROYH/3dCDHgxsZqbGydxOUkpzA6I Ls0p92xYOD3be15EXozCftMUMmqbeWB3mMDipwu3ZNJKhRKz/P+m7gHW+quVitkg 4C7O27r0ka7/oDELV7TCkfMFCZ1MSKELqHA/qDegkz3tS14/h542QxGiJo6utTs1 LMajLUNYOm/TbVtvM1otI4f+EqapTeZYyFhvh64KyKZRUvHteUk5wRtZMiTDglKF WhM9ObOS8R6RkMDNb/yWPiuydGnjsCgOoO5B7qr4DxqK5l8+IePcRZBeZpaM767U lEf0gRMbA030q+UXhAbbKN0Kn8s0K+SDt0yAer1/NE9PDGeObIWiOwHXz3nA61E= =PPw+ -END PGP SIGNATURE-
Re: [O] [BUG] R src blocks untabify literal constant TABs
On Thu, 8 Oct 2015, Nicolas Goaziou wrote: "Charles C. Berry" writes: If `org-src-preserve-indentation' is nil, then embedded (not just leading/trailing) tabs in src blocks are converted to spaces when `org-edit-src-code' is called This is now fixed in master. Thank you. or when exported. I cannot reproduce it. Do you have an ECM ? I forgot `org-reload', I think. Seems AOK now. Not sure I would call this a bug. I think it is one. If that is not deemed a bug, the docstring needs to mention that embedded tabs get converted. Apart from that, the documentation needs to reverse this in 14.2: "may replace sequences of spaces with tab characters" as it is spaces that replace tab characters. OK. So with the new behaviour, this is the only necessary change to documentation? Yes. Chuck
Re: [O] Latex strikethrough or cancel?
On Thursday, 8 Oct 2015 at 14:29, Lawrence Bottorff wrote: > Sticking this after my initialization #+ stuff finally worked: > > #+begin_html >
Re: [O] [RFC] Draft mode
Thomas S. Dye writes: The interest of such functionality seems to be limited to people who maintain broken-but-soon-to-be-fixed documents... It does not seem to warrant prime real estate in the exporter IMO. Further, I don't think 'draft' is the correct word for this, but that's of course minor. >>> >>> I couldn't find anything better. Suggestions welcome. >> >> I agree. We already have the org-latex-classes, which a very different >> from latex-proper classes. This seems to cause a lot of confusion. >> Perhaps we can limit such overlap in the future. >> >> It’s a "relaxed" mode. I’m not sure what a good term for this is. > > Trial mode? The latex flag would be "-interaction=nonstopmode". Probably a similar flag exits in GCC. The Knitr option is simply called error ∈ {TRUE, FALSE}. I like nonstopmode, but I don’t care particularly for the "interaction" classification. Rasmus -- Governments should be afraid of their people
Re: [O] [RFC] Draft mode
Thomas S. Dye writes: > Rasmus writes: > The interest of such functionality seems to be limited to people who maintain broken-but-soon-to-be-fixed documents... It does not seem to warrant prime real estate in the exporter IMO. Further, I don't think 'draft' is the correct word for this, but that's of course minor. >>> >>> I couldn't find anything better. Suggestions welcome. >> >> I agree. We already have the org-latex-classes, which a very different >> from latex-proper classes. This seems to cause a lot of confusion. >> Perhaps we can limit such overlap in the future. >> >> It’s a "relaxed" mode. I’m not sure what a good term for this is. > > Trial mode? Dry run?
Re: [O] [RFC] Draft mode
Rasmus writes: >>> The interest of such functionality seems to be limited to people who >>> maintain broken-but-soon-to-be-fixed documents... It does not seem to >>> warrant prime real estate in the exporter IMO. Further, I don't think >>> 'draft' is the correct word for this, but that's of course minor. >> >> I couldn't find anything better. Suggestions welcome. > > I agree. We already have the org-latex-classes, which a very different > from latex-proper classes. This seems to cause a lot of confusion. > Perhaps we can limit such overlap in the future. > > It’s a "relaxed" mode. I’m not sure what a good term for this is. Trial mode? hth, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Latex strikethrough or cancel?
Yes, Nick, I put it in my init and it worked. Amazing to me is how an elisp concat just works, so I don't have to hack around with the org-html-mathjax-template (Too close to Halloween). Thanks, everyone. On Thu, Oct 8, 2015 at 3:12 PM, Nick Dokos wrote: > Nick Dokos writes: > > > ... > > You must mean HTML export - MathJax apparently does not know about > > \cancel. There is an extension mechanism: > > > > https://docs.mathjax.org/en/latest/extension-writing.html > > > > but that's as far as my knowledge extends. If you make it work, please > > share. > > > > It's actually simple - the documentation tells you exactly how to do it > using the cancel package as an example :-) - see the section "TeX and > LaTeX extensions" in > >https://docs.mathjax.org/en/v2.5-latest/tex.html > > All you need to do to incorporate that into org is to make it add the > script when you export. That is done by appending it to > org-html-mathjax-template: > > --8<---cut here---start->8--- > (setq org-html-mathjax-template (concat org-html-mathjax-template " > > MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () { > MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{ > cancel: [\"Extension\",\"cancel\"], > bcancel: [\"Extension\",\"cancel\"], > xcancel: [\"Extension\",\"cancel\"], > cancelto: [\"Extension\",\"cancel\"] > }); > }); > > ")) > --8<---cut here---end--->8--- > > -- > Nick > > >
Re: [O] [BUG] R src blocks untabify literal constant TABs
Hello, "Charles C. Berry" writes: > More than one bug, I am afraid. > >> Do you have any such example? > > Sure, make sure that the whitespace in the `> <' below is a TAB > character (C-q C-i). Running the src block replaces the TAB when > `org-src-preserve-indentation' is nil. > > Also, use `org-edit-src-code' with point in the block and immediately exist, > i.e. =C-c ' C-c '=, and the embedded tab disappears. > > #+BEGIN_SRC emacs-lisp >"this is a TAB--> <--" >#+END_SRC > > `untabify' is called by some functions that honor (in some way) > `org-src-preserve-indentation' which explains some of this. FWIW, here > is a summary of functions that use the variable: > > > |---+---+---| > | function | protect-leading space | effect on > tabs| > |---+---+---| > | org-babel-exp-process-buffer | yes or no | ignore (+/- > to indent)| > | org-export-unravel-code | yes or no | ignore > | > | org-element-src-block-interpreter | contents only or not | ignore > | > | org-element-example-block-interpreter | contents only or not | ignore > | > | org-fixup-indentation | contents only or not | ignore (+/- > to indent)| > | org-babel-parse-src-block-match | yes or no | keep or > remove| > | org-babel-haskell-export-to-lhs | yes or no | keep or > remove| > | org-babel-spec-to-string | yes or no | keep or > remove lead+trail | > | org-src--edit-element | yes or no | keep or > remove| > | org-edit-src-code | yes or no | keep or > remove| > |---+---+---| > > the '(+/- to indent)' means that leading tabs may be added or removed > with org-metaright and friends. `keep or remove lead+trail' == "keep > or remove leading or trailing TABs only". 'contents only or not' means > there is no effect on `#+BEGIN...' etc. The main culprit is `org-do-remove-indentation', which doesn't need to untabify the buffer in order to proceed. I changed that in master. It should go a long way towards fixing the issue. Is there any case left to fix? If there isn't, is the current documentation accurate enough or do you think it needs to be improved? Regards, -- Nicolas Goaziou
Re: [O] Latex strikethrough or cancel?
Sticking this after my initialization #+ stuff finally worked: #+begin_html MathJax.Hub.Config({ TeX: {extensions: ["cancel.js"]}, tex2jax: { inlineMath: [ ['$','$'], ['\\(','\\)'] ], processEscapes: true } }); #+end_html although I, the eternal beginner, don't quite understand other than MathJax is pulling in this cancel.js and applying it. Got it off the MathJax Google Group. I'm sure there's a better way to roll it into Emacs/org-mode or org-html-mathjax-template?
Re: [O] [RFC] Draft mode
Hi, >> Can this just be a variable set by BIND or publish? > > It could. If we keep throwing errors on unknown macros, I think we can > even have an OPTIONS item. I would be happier with this, I think. >> The interest of such functionality seems to be limited to people who >> maintain broken-but-soon-to-be-fixed documents... It does not seem to >> warrant prime real estate in the exporter IMO. Further, I don't think >> 'draft' is the correct word for this, but that's of course minor. > > I couldn't find anything better. Suggestions welcome. I agree. We already have the org-latex-classes, which a very different from latex-proper classes. This seems to cause a lot of confusion. Perhaps we can limit such overlap in the future. It’s a "relaxed" mode. I’m not sure what a good term for this is. Rasmus -- Governments should be afraid of their people
Re: [O] Per command org-agenda-prefix-format
Hi Nick, On Thu, Oct 08, 2015 at 03:02:02AM -0400, Nick Dokos wrote: > Suvayu Ali writes: > > > On Wed, Oct 07, 2015 at 02:52:24PM -0400, Nick Dokos wrote: > >> Suvayu Ali writes: > >> > >> > Hi, > >> > > >> > I wanted to prefix the results of a tags-todo agenda command with > >> > scheduling information. But I can't seem to figure out the > correct way > >> > to do this. This is what I tried: > >> > > >> > (setq org-agenda-custom-commands > >> > '(("J" "Type1/Type2" > >> > ((tags-todo "CATEGORY=\"foo\"+type1" > >> > ((org-agenda-overriding-header "Type1"))) > >> > (tags-todo "CATEGORY=\"foo\"+type2" > >> > ((org-agenda-overriding-header "Type2" > >> > ((org-agenda-files (list "~/tmp/org/tasks.org")) > >> > (org-agenda-prefix-format " % s") > >> > >> org-agenda-prefix-format is an alist, not a string. > > > > Forgot to mention in my earlier post, I tried that too! Something like > > this: > > > > (org-agenda-prefix-format '(tags " % s")) > > > > Same result. > > Although that's not the right form (it should be '((tags . " % s")) - > and according to the doc it should be the whole 5-element alist), you > are right: it does not make any difference. Also, internally, the string > form is accepted just as well as the alist form by > org-compile-prefix-format, so I was wrong about the alist vs string > distinction. Actually I went through these steps too! I am not too familiar with the agenda code, so I wasn't sure whether I was understanding it correctly. > IIUC (do I?), you expect the format to produce the Deadline: or Scheduled: > prefixes that you get in the timeline. Unfortunately, that code is > completely separate from the code that gets executed here. In the > timeline, we go > > org-timeline -> org-agenda-get-scheduled (or org-agenda-get-deadlines) > -> org-agenda-format-item("Scheduled: " ) > > with the first argument providing the appropriate prefix. > But with the custom agenda, we go a different way: > > org-tags-view -> org-scan-tags -> org-agenda-format-item("" ...) > > and org-scan-tags calls org-agenda-format-item with a hardwired empty > string for the "extra" argument - it does not matter that %s has been > specified in org-agenda-prefix-format. So I don't think you can do what > you want (again IIUC). Hmm, I was hoping for the timeline like prefix, but even a normal prefix as in the usual agenda ("Sched. 2x") would also have worked for me. > Presumably, stealing the code that calculates whether the entry should > get a scheduling prefix from org-agenda-get-scheduled and grafting it > into org-scan-tags would do the trick, but that's not the way things are > today. Thanks for clearly outlining the code path for me. Maybe if I find some time, I'll hack around a bit. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] Latex strikethrough or cancel?
On Thursday, 8 Oct 2015 at 03:35, Lawrence Bottorff wrote: > \usepackage[makeroom]{cancel} Put this in a #+latex_header line? -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-239-gd01560
Re: [O] Latex strikethrough or cancel?
Lawrence Bottorff writes: > I've got a fraction done this way in an org file: > > \[ > \frac{1}{(2^3)(5)} > \] > > and I'd like to strike though or cancel the (5) part. The Latex method I've > found says do it this way: > > ... > \usepackage[makeroom]{cancel} > ... > > \[ > \frac{1}{(2^3)\cancel{(5)}} > \] > > But it's ignored and comes back verbatim. Of course +(5)+ doesn't work > either, again, coming back verbatim with the pluses. How can I do this? > Not sure what you tried, but it all works fine here for PDF export. The following latex file works: --8<---cut here---start->8--- \documentclass{article} \usepackage[makeroom]{cancel} \begin{document} \[ \frac{1}{(2^3)\cancel{(5)}} \] \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: --8<---cut here---end--->8--- and the following org file works as well: --8<---cut here---start->8--- #+LATEX_HEADER: \usepackage[makeroom]{cancel} * Some math \[ \frac{1}{(2^3)\cancel{(5)}} \] --8<---cut here---end--->8--- You must mean HTML export - MathJax apparently does not know about \cancel. There is an extension mechanism: https://docs.mathjax.org/en/latest/extension-writing.html but that's as far as my knowledge extends. If you make it work, please share. Alternatively, you can use the (generally inferior) method of exporting math as images - adding #+OPTIONS: tex:imagemagick works OK (assuming you have imagemagick installed of course). There is also #+OPTIONS: tex:dvipng if you have dvipng instead. -- Nick
Re: [O] Latex strikethrough or cancel?
Hi Lawrence, On Thu, Oct 08, 2015 at 03:35:43AM +, Lawrence Bottorff wrote: > I've got a fraction done this way in an org file: > > \[ > \frac{1}{(2^3)(5)} > \] > > and I'd like to strike though or cancel the (5) part. The Latex method I've > found says do it this way: > > ... > \usepackage[makeroom]{cancel} > ... > > \[ > \frac{1}{(2^3)\cancel{(5)}} > \] > > But it's ignored and comes back verbatim. Of course +(5)+ doesn't work > either, again, coming back verbatim with the pluses. How can I do this? Unless the \cancel{..} is not exported properly, this is a LaTeX question. I think you will have better luck finding an answer if you ask a community dedicated to LaTeX, e.g. TeX.SX. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] Per command org-agenda-prefix-format
Suvayu Ali writes: > On Wed, Oct 07, 2015 at 02:52:24PM -0400, Nick Dokos wrote: >> Suvayu Ali writes: >> >> > Hi, >> > >> > I wanted to prefix the results of a tags-todo agenda command with >> > scheduling information. But I can't seem to figure out the correct way >> > to do this. This is what I tried: >> > >> > (setq org-agenda-custom-commands >> > '(("J" "Type1/Type2" >> > ((tags-todo "CATEGORY=\"foo\"+type1" >> > ((org-agenda-overriding-header "Type1"))) >> > (tags-todo "CATEGORY=\"foo\"+type2" >> > ((org-agenda-overriding-header "Type2" >> > ((org-agenda-files (list "~/tmp/org/tasks.org")) >> > (org-agenda-prefix-format " % s") >> >> org-agenda-prefix-format is an alist, not a string. > > Forgot to mention in my earlier post, I tried that too! Something like > this: > > (org-agenda-prefix-format '(tags " % s")) > > Same result. Although that's not the right form (it should be '((tags . " % s")) - and according to the doc it should be the whole 5-element alist), you are right: it does not make any difference. Also, internally, the string form is accepted just as well as the alist form by org-compile-prefix-format, so I was wrong about the alist vs string distinction. IIUC (do I?), you expect the format to produce the Deadline: or Scheduled: prefixes that you get in the timeline. Unfortunately, that code is completely separate from the code that gets executed here. In the timeline, we go org-timeline -> org-agenda-get-scheduled (or org-agenda-get-deadlines) -> org-agenda-format-item("Scheduled: " ) with the first argument providing the appropriate prefix. But with the custom agenda, we go a different way: org-tags-view -> org-scan-tags -> org-agenda-format-item("" ...) and org-scan-tags calls org-agenda-format-item with a hardwired empty string for the "extra" argument - it does not matter that %s has been specified in org-agenda-prefix-format. So I don't think you can do what you want (again IIUC). Presumably, stealing the code that calculates whether the entry should get a scheduling prefix from org-agenda-get-scheduled and grafting it into org-scan-tags would do the trick, but that's not the way things are today. -- Nick