Re: [O] How to generate subscript followed overstriking in org-mode

2017-05-01 Thread XP Chen
 @@latex:\textbf{html:@@bold@@latex:}html:@@_{subscripted} works 
well for latex and pdf.

But cannot bold in ODT format... I think html exporter is the same as ODT 
format before, but a little different...

So I choose using *bold*\mbox{}_{subscripted} , then in ODT file replace all 
the \mbox{} as blank...







在2017年05月01 23时49分, "Eric S Fraga"写道:

On Monday,  1 May 2017 at 13:16, XP Chen wrote:
> Hi, everyone,
>
> How to generate subscript followed overstriking when export to latex or 
> pdf, I want use general org-mode method to generate html format also.
>
> Mix latex is ok as:  \textbf{d1}_{sub}
>
> But org method like:  " *d1*_{sub} "  or   " *d1* _{sub} " cannot achieve.

The following works for me:  This is *bold*\mbox{}_{subscripted}
although probably only for LaTeX export... possibly okay for your use
case but not a general solution.

You could put inline LaTeX and HTML codes:

This is @@latex:\textbf{html:@@bold@@latex:}html:@@_{subscripted}

but this is incredibly ugly and difficult to parse...  but it works.
--
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576


Re: [O] How to generate subscript followed overstriking in org-mode

2017-05-01 Thread Eric S Fraga
On Monday,  1 May 2017 at 13:16, XP Chen wrote:
> Hi, everyone,
>
> How to generate subscript followed overstriking when export to latex or 
> pdf, I want use general org-mode method to generate html format also.
>
> Mix latex is ok as:  \textbf{d1}_{sub}
>
> But org method like:  " *d1*_{sub} "  or   " *d1* _{sub} " cannot achieve.

The following works for me:  This is *bold*\mbox{}_{subscripted}
although probably only for LaTeX export... possibly okay for your use
case but not a general solution.

You could put inline LaTeX and HTML codes:

This is @@latex:\textbf{html:@@bold@@latex:}html:@@_{subscripted}

but this is incredibly ugly and difficult to parse...  but it works.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576


signature.asc
Description: PGP signature


[O] [PATCH] contrib/lisp/ox-confluence.el: Export checkboxes; fix timestamps in headlines

2017-05-01 Thread Marc Ihm

Hi,

the attached patch changes ox-confluence.el:

- Export checkboxes in lists to appear in the resulting
  confluence-markup (with some minor refactoring of
  org-confluence-item).
- Fix spurious closing braces following timestamps in headlines.


Please review and let me know, if you have any comments or questions.

Thanks,
Marc

>From 4e638796f39918ade4c8717569315d8b4ca61818 Mon Sep 17 00:00:00 2001
From: "U-IHM-NOTEBOOK\\Olli" 
Date: Mon, 1 May 2017 16:59:10 +0200
Subject: [PATCH 1/1] Export checkboxes; fix timestamps in headlines

---
 contrib/lisp/ox-confluence.el | 29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el
index c70fe853b..8ee22f5b7 100644
--- a/contrib/lisp/ox-confluence.el
+++ b/contrib/lisp/ox-confluence.el
@@ -83,16 +83,19 @@
   (format "_%s_" contents))
 
 (defun org-confluence-item (item contents info)
-  (let* ((plain-list (org-export-get-parent item))
- (type (org-element-property :type plain-list))
- (bullet (if (eq type 'ordered) ?\# ?\-)))
-(concat (make-string (1+ (org-confluence--li-depth item)) bullet)
-" "
-(if (eq type 'descriptive)
- (concat "*"
- (org-export-data (org-element-property :tag item) info)
- "* - "))
-(org-trim contents
+  (let ((list-type (org-element-property :type (org-export-get-parent item
+
+(concat
+ (make-string (1+ (org-confluence--li-depth item))
+  (if (eq list-type 'ordered) ?\# ?\-))
+ " "
+ (cl-case (org-element-property :checkbox item)
+   ('on "*{{(X)}}* ") 
+   ('off "*{{( )}}* ")
+   ('trans "*{{(\\-)}}* "))
+ (when (eq list-type 'descriptive)
+   (concat "*" (org-export-data (org-element-property :tag item) info) "* - "))
+ (org-trim contents
 
 (defun org-confluence-fixed-width (fixed-width contents info)
   (org-confluence--block
@@ -117,7 +120,7 @@
 			(string= todo ""))
 			""
 		  (format "*{{%s}}* " todo
-;; Else: Standard headline.
+
 (format "h%s. %s%s\n%s" level todo-text text
 (if (org-string-nw-p contents) contents ""
 
@@ -181,7 +184,7 @@ a communication channel."
 (defun org-confluence-timestamp (timestamp _contents _info)
   "Transcode a TIMESTAMP object from Org to Confluence.
 CONTENTS and INFO are ignored."
-  (let ((translated (org-timestamp-translate timestamp)))
+  (let ((translated (org-trim (org-timestamp-translate timestamp
 (if (string-prefix-p "[" translated)
 (concat "(" (substring translated 1 -1) ")")
   translated)))
@@ -208,7 +211,7 @@ CONTENTS and INFO are ignored."
 (or (eq tag 'item) ; list items interleave with plain-list
 (eq tag 'plain-list)))
   (when (eq tag 'item)
-(incf depth))
+(cl-incf depth))
   (setq item (org-export-get-parent item)))
 depth))
 
-- 
2.12.2



Re: [O] Exporting PDF (new setup)

2017-05-01 Thread Joost Kremers


On Mon, May 01 2017, Peter Davis wrote:

Nick Dokos  writes:



As a first step, switch to buffer *Org PDF LaTeX Output* and 
check for errors.


Thanks, Nick. I found the same error I got running pdflatex in a 
command shell:


! LaTeX Error: File `wrapfig.sty' not found.

I had installed basictex using Homebrew (one of several Mac 
package managers), but I think I'd be better off with TeXLive or

MacTeX. I'm trying that now.


IIUC BasicTeX is a subset of TeXLive. If it comes with the TeXLive 
Manager, it should be possible to add packages on a need-to-have 
basis, rather than installing all of TeXLive. Just do `tlmgr 
install wrapfig` in a shell, or (if installed) use the graphical 
TeXLive Manager.



--
Joost Kremers
Life has its moments



Re: [O] Exporting PDF (new setup)

2017-05-01 Thread Peter Davis
Nick Dokos  writes:

>
> As a first step, switch to buffer *Org PDF LaTeX Output* and check for errors.

Thanks, Nick. I found the same error I got running pdflatex in a command shell:

! LaTeX Error: File `wrapfig.sty' not found.

I had installed basictex using Homebrew (one of several Mac package managers), 
but I think I'd be better off with TeXLive or
MacTeX. I'm trying that now.

Thanks!

-pd




Re: [O] Exporting PDF (new setup)

2017-05-01 Thread Nick Dokos
Peter Davis  writes:

> Joost Kremers  writes:
>
>> On Mon, May 01 2017, Peter Davis wrote:
>>> I'm running Org 8.2.10 on a new MacBook with El Capitan as the OS. I can't 
>>> seem to get PDF export working. I get these messages:
>>>
>>> Processing LaTeX file ./blahblahblah.tex...
>>> /bin/bash: pdflatex: command not found [3 times]
>>> org-latex-compile: PDF file ./blahblahblah.pdf wasn’t produced
>>>
>>> I did install basictex, and when I enter pdflatex on the command line, it 
>>> works with no problems. Any clues why org export isn't
>>> finding the executable?
>>
>> This:
>>
>> https://github.com/purcell/exec-path-from-shell
>>
>> perhaps?
>
> Ah! Thank you. That's gotten me past the first problem.
>
> Now I'm getting:
>
> Wrote /Users/peterdavis/Dropbox/Org/blahblahblah.tex
> Processing LaTeX file ./blahblahblah.tex...
> org-latex-compile: PDF file ./blahblahblah.pdf wasn’t produced: [LaTeX error]
>
> I suppose I have to have to debug this like any LaTeX file.
>
> Thank you, Joost.
>

As a first step, switch to buffer *Org PDF LaTeX Output* and check for errors.

-- 
Nick




[O] How to generate subscript followed overstriking in org-mode

2017-05-01 Thread XP Chen
Hi, everyone,

How to generate subscript followed overstriking when export to latex or 
pdf, I want use general org-mode method to generate html format also.

Mix latex is ok as:  \textbf{d1}_{sub} 

But org method like:  " *d1*_{sub} "  or   " *d1* _{sub} " cannot achieve.  
  

According to 
https://emacs.stackexchange.com/questions/31149/superscript-or-subscript-inside-italics-in-org-buffer-does-not-change-text-app
 ,  " *d1*._{sub} "  or " *d1* ._{sub} " can also done except a point in the 
char...

   So anyone have idea?

Thanks.

 








Re: [O] Exporting PDF (new setup)

2017-05-01 Thread Peter Davis
Joost Kremers  writes:

> On Mon, May 01 2017, Peter Davis wrote:
>> I'm running Org 8.2.10 on a new MacBook with El Capitan as the OS. I can't 
>> seem to get PDF export working. I get these messages:
>>
>> Processing LaTeX file ./blahblahblah.tex...
>> /bin/bash: pdflatex: command not found [3 times]
>> org-latex-compile: PDF file ./blahblahblah.pdf wasn’t produced
>>
>> I did install basictex, and when I enter pdflatex on the command line, it 
>> works with no problems. Any clues why org export isn't
>> finding the executable?
>
> This:
>
> https://github.com/purcell/exec-path-from-shell
>
> perhaps?

Ah! Thank you. That's gotten me past the first problem.

Now I'm getting:

Wrote /Users/peterdavis/Dropbox/Org/blahblahblah.tex
Processing LaTeX file ./blahblahblah.tex...
org-latex-compile: PDF file ./blahblahblah.pdf wasn’t produced: [LaTeX error]

I suppose I have to have to debug this like any LaTeX file.

Thank you, Joost.

-pd




Re: [O] Exporting PDF (new setup)

2017-05-01 Thread Joost Kremers


On Mon, May 01 2017, Peter Davis wrote:
I'm running Org 8.2.10 on a new MacBook with El Capitan as the 
OS. I can't seem to get PDF export working. I get these 
messages:


Processing LaTeX file ./blahblahblah.tex...
/bin/bash: pdflatex: command not found [3 times]
org-latex-compile: PDF file ./blahblahblah.pdf wasn’t produced

I did install basictex, and when I enter pdflatex on the command 
line, it works with no problems. Any clues why org export isn't

finding the executable?


This:

https://github.com/purcell/exec-path-from-shell

perhaps?


--
Joost Kremers
Life has its moments



[O] Exporting PDF (new setup)

2017-05-01 Thread Peter Davis

I'm running Org 8.2.10 on a new MacBook with El Capitan as the OS. I can't seem 
to get PDF export working. I get these messages:

Processing LaTeX file ./blahblahblah.tex...
/bin/bash: pdflatex: command not found [3 times]
org-latex-compile: PDF file ./blahblahblah.pdf wasn’t produced

I did install basictex, and when I enter pdflatex on the command line, it works 
with no problems. Any clues why org export isn't
finding the executable?

Thanks!

-pd




Re: [O] More clocktable breakage

2017-05-01 Thread Achim Gratz
Nicolas Goaziou writes:
> Sadly, what a "timestamp" is depends on what function is asking. AFAICT,
> there are three categories of "timestamps".

Well, taking a further setp back, before Org started to have a formal
syntax anything that looked like a timestamp was treated as one.  The
different categories of timestamps really arise from the fact that we
now have syntactical timestamps and non-syntactical ones.  This in turn
requires that each function dealing with timestamps needs to specify
what exactly it wants to deal with, but as this discussion amply shows,
that isn't quite as straightforward as one would think.

> Let's consider the following examples:
>
>   (1)
>   SCHEDULED: <2017-04-30 dim.>
>
>   (2)
>   CLOCK: [2017-04-30 dim. 08:10]--[2017-04-30 dim. 08:11] =>  0:01
>
>   (3)
>   : <2017-04-30 dim.>
>
>   (4)
>   :PROPERTIES:
>   :DATE: <2017-04-30 dim.>
>   :END:
>
>   (5)
>   # <2017-04-30 dim.>
>
>   (6)
>
>   #+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
>
> The first category is the "strict" one, which follows Org syntax
> definition. None of the examples above belong to that category.
> `org-element-context' should be the relative predicate, which means that
> it probably shouldn't return a timestamp object on planning lines, as it
> does at the moment.

I'd say anything org-element-* should exclusively return syntactical
things.  Context dependence needs to be dealt with elsewhere.

> The second category, which is a super-set of the previous one, is
> "agenda" one. Historically, Org allowed to insert timestamps in property
> drawers, e.g., as in (4), and use them in the agenda. So basically, this
> category contains "every timestamp that would appear as a plain
> timestamp in the agenda if it were active". `org-at-timestamp-p' is
> currently the relative predicate for that category. Note that the
> category also contains (2) if inactive timestamps are meant to be
> displayed in the agenda.

I would call that meta-syntax or maybe quoted syntax: you are looking at
a proper timestamp, to be used somewhere else where a timestamp is
needed, but in a context that doesn't specify a timestamp itself.  There
are many analogous cases elsewhere in Org, so it may be a fruitful
endeavour to consider this in a more general fashion.  Providing
timestamps as arguments to any processing functions (built into Org or
otherwise) carries the requirement that they should syntactically be
correct as a timestamp (so they can be converted into a timestamp object
at the place of use), so all functions to insert and edit a timestamp
need to work at those places.

> The last category, a super-set of the "agenda" one, is the "convenience"
> category. Basically, it contains every occurrence of what looks like
> a timestamp, but isn't necessarily one. Obviously, every example given
> above fits in there, as in every case, you can ignore that Org has
> a context-dependant grammar and pretend you are on a timestamp. There is
> no predicate relative to that category, but `org-at-timestamp-p'
> docstring suggests to use (org-in-regexp org-ts-regexp).

If I'd follow that road, I could edit what looks like a timestamp
everywhere, regardless of context.  I don't know if that's the right
thing to do and I don't even expect consensus among the Org user base.
I personally see no need to do that.

> So, about the predicates, I guess we could move the second one into
> "org-agenda.el" and rename it `org-agenda-at-timestamp-p'. However,
> using `org-at-timestamp-p' for the last category seems a bit
> far-stretched to me, since it doesn't always match timestamps. In
> particular, (3) and (5) sound counter-intuitive to me and I wouldn't
> like it from a developer standpoint. `org-at-timestamp' is also not
> really needed for the first category, since there is already
> `org-element-context'.

Agreed.  That's why I'm hesitant to change the org-at-timestamp-p to
(org-in-regexp org-ts-regexp) in the edit functions.  What I don't agree
with (if I've read you correctly) is the implied assertion that the
clocktable example is in the last category.  Or maybe it is at the
moment, but it ought to be in the second one.  I consider only examples
(3) and (5) to be in the "last" category.

> Yet, `org-at-timestamp-p' is something users are going to look after.
> Different names may also introduce confusion (remember `org-at-regexp-p'
> and `org-in-regexp-p'?). So, even if it looks like bad factoring to you,
> a single predicate, or even two if we set "agenda" apart, with
> a docstring explaining the different categories and how to select them
> may also be a good natural choice. Hence my suggestion.

Since org-at-timestamp-p already has an argument, adding a second one
doesn't look appealing to me, especially when the first one would often
be nil.  Maybe it's possible to change the definition of that argument
(which would need the equivalence between t meaning 'inactive).

> WDYT? Do you have any other concrete proposal?

I really only