Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Nicolas Goaziou
Richard Lawrence  writes:

> Sorry, I may not have emphasized this enough, but in the grammar, I wrote:
>
>   - A KEY optionally begins with `-', and obligatorily contains `@' or
> `&' followed by a string of characters which begins with a letter
> or `_', and may contain alphanumeric characters and the following
> *internal* punctuation characters:
>:.#$%&-+?<>~/
>
> The `internal' here was meant to express exactly what Aaron said: keys
> can contain punctuation, but may not end (or begin) with punctuation.

OK. I misunderstood the "internal" part. 

What about "@_" and "@a" ? Are they valid keys?


Regards,



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Nicolas Goaziou
Richard Lawrence  writes:

>> To support multi cites, we must first decide how the parsed will present
>> information, i.e., what are the properties in the following case
>>
>>   [cite:pre; pre1 @k1 post1; pre2 @k2 post2; post]
>
> I was thinking that this should yield a citation object with a structure like:
>
> ('citation ...
>   :common-prefix pre
>   :common-suffix post
>   :references ((:prefix pre1
> :key "k1"
> :suffix post1 ...)
>(:prefix pre2
> :key "k2"
> :suffix post2 ...))
>   ...)
>
> Would that work?

Yes. I find it better than "entries/entry" as discussed with Rasmus.
I'll implement it in a few days.

> Oh, I did not realize there were outstanding issues with this.  I
> remember Rasmus not liking `&'.  I'm fine with changing it, though I
> cannot think of a better symbol.  Does someone think we should not have
> a way of indicating that a reference should produce a full bibliography
> entry?  Or that we should indicate it in some other way?

AFAIC, I don't think a dedicated symbol is useful. It can be implemented
through subtypes/properties. Besides LaTeX, could other back-end provide
that feature anyway?

I have no opinion about the :suppress-author symbol.


Regards,



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Rasmus
Nicolas Goaziou  writes:

> Richard Lawrence  writes:
>
>> Sorry, I may not have emphasized this enough, but in the grammar, I wrote:
>>
>>   - A KEY optionally begins with `-', and obligatorily contains `@' or
>> `&' followed by a string of characters which begins with a letter
>> or `_', and may contain alphanumeric characters and the following
>> *internal* punctuation characters:
>>:.#$%&-+?<>~/

AFAIK Bibtex keys don't understand '#%~', so I'd remove those.  I would
leave out '$' as well, as it's also the math symbol (think of display
support).

The regexp used by bibtex.el is bibtex-entry-head and keys are matched by:

  \\([][[:alnum:].:;?!`'/*@+|()<>&_^$-]+\\)

> What about "@_" and "@a" ? Are they valid keys?

What is wrong with @a?  That seems like a perfectly legit key and one that
you would even use in real life, for a one-citation document, say.

@_ Would be supported by bibtex, but I don't see a reason for supporting
it here (what is "@_1"?  Why would citations take precedence over
subscripts?)


-- 
Together we'll stand, divided we'll fall




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Rasmus
Richard Lawrence  writes:

> Is there any reason to go with citeproc-java over a different CSL
> implementation, like citeproc-js or pandoc-citeproc?  I am a little
> nervous about shelling out to something that sounds it like it requires
> loading the JVM...

For the longest of time, mathtoweb.jar was the blessed MathML producer.
Java is great 'cause it works equally mediocre on all platforms!

This might make citeproc-java very attractive (from its Github page):

 "... citeproc-java contains a BibTeX converter that is able to map
 BibTeX database entries to CSL citations."

But I really know the details of CSL.

—Rasmus


-- 
To err is human. To screw up 10⁶ times per second, you need a computer




Re: [O] Here is a patch I want to add to org.el……

2015-03-03 Thread Andreas Leha
Hi Nicolas,

Nicolas Goaziou  writes:
> Andreas Leha  writes:
>
>> I spoke a little too soon.  I still like it, but there is a regression.
>> See http://permalink.gmane.org/gmane.emacs.orgmode/95563
>
> Indeed. I also fixed a few other things. Here's the update.
>
> Thanks for the feedback.

Thanks for that, which is much better!

A small issue I still see is, that without prefix on the headline of a
section it claims to work on the section, but does so only if all
fragments in the section are overlaid or all are not overlaid.

So, in the example below, if only the first formula is overlaid, C-c C-x
C-l on the first headline has no effect.

I do not mind, actually.  But according to the documentation and to the
message in the minibuffer it should do something, IMO.

Regards,
Andreas

PS: The example again:

#+begin_org
* section 1
** section 1.1
*** section 1.1.1
$\alpha=1$
*** section 1.1.2
$\alpha=2$
** section 1.2
$\alpha=3$

* section 2
** section 2.1
$\alpha=4$
** section 2.2
$\alpha=5$
#+end_org




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Rasmus
Rasmus  writes:

> Richard Lawrence  writes:
>
>> Is there any reason to go with citeproc-java over a different CSL
>> implementation, like citeproc-js or pandoc-citeproc?  I am a little
>> nervous about shelling out to something that sounds it like it requires
>> loading the JVM...
>
> For the longest of time, mathtoweb.jar was the blessed MathML producer.
> Java is great 'cause it works equally mediocre on all platforms!
>
> This might make citeproc-java very attractive (from its Github page):
>
>  "... citeproc-java contains a BibTeX converter that is able to map
>  BibTeX database entries to CSL citations."

Actually, Richard, check out the cli tool of citeproc-java:

http://michel-kraemer.github.io/citeproc-java/using/command-line-tool/

It looks pretty cool.  It reads bib, json and mendeley(?) out of the box
and support text, html output.  From html it's not far to odt.

Unfortunately, Zotero stores its database in sqlite according to their
wiki...  Perhaps, a zotero back-end could be added...

Are there other equivalently "nice" CSL cli-tools?

How would CSL work to get e.g. parentheses citations?  Is it a question of
passing an alternative style, e.g. "format with @foo with
chicago-author-date" versus "format with @foo with
chicago-author-date-parenthesis"?

—Rasmus

-- 
The second rule of Fight Club is: You do not talk about Fight Club




Re: [O] Here is a patch I want to add to org.el……

2015-03-03 Thread Andreas Leha
Andreas Leha  writes:
> Hi Nicolas,
>
> Nicolas Goaziou  writes:
>> Andreas Leha  writes:
>>
>>> I spoke a little too soon.  I still like it, but there is a regression.
>>> See http://permalink.gmane.org/gmane.emacs.orgmode/95563
>>
>> Indeed. I also fixed a few other things. Here's the update.
>>
>> Thanks for the feedback.
>
> Thanks for that, which is much better!
>
> A small issue I still see is, that without prefix on the headline of a
> section it claims to work on the section, but does so only if all
> fragments in the section are overlaid or all are not overlaid.
>
> So, in the example below, if only the first formula is overlaid, C-c C-x
> C-l on the first headline has no effect.
>
> I do not mind, actually.  But according to the documentation and to the
> message in the minibuffer it should do something, IMO.
>
> Regards,
> Andreas

On some more testing, this description is wrong.  C-c C-x C-l never does
anything on the first headline, e.g., which I think it should.

Regards,
Andreas

>
> PS: The example again:
>
> #+begin_org
> * section 1
> ** section 1.1
> *** section 1.1.1
> $\alpha=1$
> *** section 1.1.2
> $\alpha=2$
> ** section 1.2
> $\alpha=3$
>
> * section 2
> ** section 2.1
> $\alpha=4$
> ** section 2.2
> $\alpha=5$
> #+end_org




Re: [O] org-babel-execute: being exported

2015-03-03 Thread Jarmo Hurri
Aaron Ecay  writes:

> Hi Jarmo,
>
> 2015ko martxoak 2an, Jarmo Hurri-ek idatzi zuen:
>
> [...]
>
>> 1. How can I identify, in org-babel-execute:processing, if the code is
>>executed for export or for some other reason?
>
> I think the test (not (null org-babel-exp-reference-buffer)) should thee
> you when you’re being called as part of export.

Seems to work, thanks!

Jarmo




Re: [O] reftex support for figures

2015-03-03 Thread Ken Mankoff

On 2015-03-02 at 10:24, Ken Mankoff  wrote:
> Does anyone have Reftex support working with Org figures?

It seems like RefTeX might be able to do it via the "xr" package and external 
references, where it is searching the exported LaTeX version of the document:

http://www.xemacs.org/Documentation/packages/html/reftex_3.html#SEC35

This means that labels wouldn't be found until after export, but that seems 
like a minor inconvenience. 

  -k.



Re: [O] agenda folding/hiding of sections?

2015-03-03 Thread Sebastien Vauban
Samuel Wales wrote:
> i wonder if anybody has made the agenda sections fold or hide?  i
> often find i want to hide the time section.

M-x org-agenda-toggle-time-grid?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-calendar-holiday and local holidays

2015-03-03 Thread Melleus
jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:

> calendar-holidays, it is because you are calling something that 
> loads holidays.el before you set holiday-local-holidays.

You're right. Now I understand. Thank you for explaining.




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Aaron Ecay
Hi Richard,

2015ko martxoak 3an, Richard Lawrence-ek idatzi zuen:
> 
> Aaron Ecay  writes:
> 
>> It would also be possible to just use an external program like
>> citeproc-java.  WDYT?
> 
> I agree with Rasmus that using an external tool is the preferred way to
> go here.  I don't think introducing a dependency is really a problem, so
> long as we choose the right dependency -- LaTeX is a dependency for the
> PDF exporter, after all.

OK, I’m satisfied that there is good rationale for using an external
tool.  This will make some things a lot easier.

> 
> Is there any reason to go with citeproc-java over a different CSL
> implementation, like citeproc-js or pandoc-citeproc?  I am a little
> nervous about shelling out to something that sounds it like it requires
> loading the JVM...

citeproc-java has a bibtex parser; citeproc-js doesn’t.  (The simplest
of many reasons.)

I looked at pandoc-citeproc, but it seems tightly integrated with
pandoc’s internal JSON representation, and not as flexible for general
purpose usage as citeproc-(js,java).

> 
> I think Zotero also has a built-in CSL processor (actually, I think it
> uses citeproc-js), and Erik Hetzner's zotxt plugin looks like it lets
> you communicate with it in client-server fashion:
> 
> https://bitbucket.org/egh/zotxt/src
> 
> So maybe Zotero + zotxt is a good candidate for a `blessed' citation
> manager and CSL processor?

Requiring a running zotero seems worse to me than requiring the JVM.  I
guess it should be an option, but probably not the default.

-- 
Aaron Ecay



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Aaron Ecay
Hi Nicolas,

2015ko martxoak 2an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> Aaron Ecay  writes:
> 
>> I decided to go ahead and see what I could make of it. The result has
>> been pushed to the org mode repo to the branch wip-cite-awe. (I didn’t
>> want to push to your branch without asking, but if you prefer I’ll do
>> that and delete my own.)
> 
> This is not *my* branch. However, I suggest to push only consensual
> features with documentation and tests there, and experiment features in
> other branches.

OK, I wasn’t sure what the etiquette was.

> 
>> The first issue is that the parser includes trailing punctuation in
>> “bare” @key citations.  So the following does not work as expected (the
>> :key includes the period): “This was demonstrated most recently by
>> @Smith2015.”  I’m not sure what the right approach is – one option
>> would be to say that keys can contain punctuation, but must end (and
>> begin) with an alphanumeric character.
> 
> I'll update the parser once there is a new syntax for keys. At the
> moment, it is correct wrt syntax.
> 
>> The second issue is that the :key property of the citation element
>> includes the @.  This is not right IMO: it’s a detail of the syntax.
>> And it means that consumers of the syntax, who might want to look up
>> the key in a database, will always have to remember to strip the @.
>> I’ve pushed a provisional fix for this in my branch.
> 
> Please apply it to wip-cite. A dedicated test would be nice, too.

OK.

> 
>> The code is very rough and ready, has lots of TODO comments in it, is
>> missing tests, documentation in the manual, etc.  Nonetheless, I want to
>> get feedback on it early, given that many people have already contributed
>> so much useful information to this discussion.
> 
> I didn't look closely at the code, but I suggest to use "org-cite.el"
> instead of "ox-cite.el". Even though this is only related to export at
> the moment, this library will also contain commands to manipulate
> citation objects. It also shorten prefix for these functions.

OK.  It will certainly save some typing.

-- 
Aaron Ecay



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Aaron Ecay
Hi Richard (again),

2015ko martxoak 2an, Richard Lawrence-ek idatzi zuen:
> 
> Could we guess the backend from the file extension on the BIBLIOGRAPHY,
> to keep things simple here?  I don't use a citation manager, so I don't
> know if this is possible for anything other than Bib(La)TeX.
> 
> Also, as mentioned earlier, it would be really nice to support
> org-bibtex as one of the reference database formats.  (It's what I use,
> so naturally it's what I think we should bless. :) This would allow
> storing your reference database in-document.

I too use org-bibtex, and I agree that in-document references would be
nice.  My skeletal implementation supports only org-bibtex at the
moment.

> 
> Some things to think about:
> 
> 1) Is there ever a need to mix reference database formats in the same
> document (e.g., zotero and org-bibtex)?  (I would think not, but my
> needs are simple.)

I think this is most likely in collaborative situations: you have your
carefully curated org-bibtex database, and your co-author sends you a
bunch of references in some other database format.  I think it’s pretty
easy to support (convert everything to bibtex and concat it all
together).

> 
> 2) Is there ever a need to mix multiple reference databases in the
> *same* format (e.g., two different .bib files)?  (I would think so,
> given the existence in BibLaTeX of \addbibresource.)

Certainly yes (this can be seen as a degenerate case of (1) above).

> 
> 3) If the answer to either 1 or 2 is yes, how should we decide
> precedence between multiple reference databases?  (Two databases might
> contain the same key.)

Initially I think an admonition of “don’t do that.”  Eventually, we
could raise a warning (or error) on detecting multiply-defined keys.  I
think allowing, and trying to make sense of, multiple definitions is
more trouble than it’s worth.

-- 
Aaron Ecay



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Aaron Ecay
Hi Rasmus,

2015ko martxoak 2an, Rasmus-ek idatzi zuen:
> 
> Looks cool Aaron.  Thanks!
> 
> Aaron Ecay  writes:
> 
>> The first issue is that the parser includes trailing punctuation in
>> “bare” @key citations.  So the following does not work as expected (the
>> :key includes the period): “This was demonstrated most recently by
>> @Smith2015.”  I’m not sure what the right approach is – one option
>> would be to say that keys can contain punctuation, but must end (and
>> begin) with an alphanumeric character.
> 
> I also tried to solve this in the attached patch.  Feel free to use it in
> the unlikely case that it adds anything to your fix (I didn't check).
> Note, cf. my other recent post, this should probably be part of a
> citations object rather than a citation object (assuming you take my idea
> at good value).

It looks like the patch you sent also adds support for subtypes.  Rather
than try to distill the essential bit from it, I’ll wait for you and/or
Nicolas to get to it (there’s no particular hurry...)

I’m not sure I’m happy about the citations/citation proposal (under any
assignment of different names to the pieces).  A citations containing
only one citation is degenerate: it can never have a :prefix or :suffix
(these will rather be attached to the lone daughter citation).  That’s a
smell in my book.

It also makes the latex export more complicated: a one-daughter
citations should export as \textcite etc., whereas a multi-daughter one
will be \multicite.  From my perspective it would be more
straightforward to only have the citations wrapper be generated if there
are actually multiple citations.  But I don’t know how that would affect
the parser, so you should do what seems best to you.

Another tangentially related issue is what does (org-element-context)
return when point is in a multi-citation.  It would be nice if it
returned the citation daughter, rather than the wrapping citations
element.  This would make implementing goto-citation-at-point very
easy.

>> -> How much of the non-latex citation code is it worth implementing in
>> elisp.
> 
> As little as possible, though a highlevel API is nice, e.g. being able to
> make a citepos using (concat (citeauthor cite) "'s" (citeyear cite)).

I think I have an idea for this (though based on string templates rather
than list forms).

> I haven't tried org-ref, but isn't it just reftex?  

I haven’t either, but my impression is that, while perhaps based on
reftex, there’s a lot of spit and polish that goes into making it work
nicely.  It would be nice to be able to “steal” that because...

> If so something like this
> 
> (add-to-list 'reftex-cite-format-builtin
>'(org "Org-mode citation"
>  ((?t . "[cite:%l]")
>   (?p . "[parencite:%l]"
> 
> Should work.  We'd automatically add subtypes and maybe make an
> intelligent choice based on whether prefix and postfix is used.  

Every time I’ve looked at the reftex internals I get grumpy, because
they are heavily tuned towards latex usecases, and involve some weird
cache structure which manipulates the plist of an interned symbol.  So
customizing it for org always seems precarious.  In the long term I’d be
happy if we built something out of more easily composable pieces.

> Another idea would be to use the ox-export dispatcher code, somehow...

If this was a composable piece I’d be happy (I haven’t looked at it).
There was also an attempt to factor the menu code out of magit (called
makey IIRC).  I’ve used it for some small things, but it wasn’t terribly
pleasant.

> 
>> PS the code uses relatively new functions from the subr-x and let-alist
>> libraries, so it probably works best on a recent-ish (past few months)
>> trunk version of emacs.
> 
> In another post, Nicolas said we can target (at least?) 24.4 for v8.4.
> I'm assuming citation won't make 8.3...

What about XEmacs?  That’s another stumbling block.

Thanks,

-- 
Aaron Ecay



[O] Missing org-mode manual page: Validating OpenDocument XML

2015-03-03 Thread Monroe, Will

  
  
Hello,

I'm trying to troubleshoot a corrupt ODT file that I've exported
from org-mode.  The org-mode manual provides some guidance for this
process on the "Validating OpenDocument XML" page (see
http://orgmode.org/manual/Validating-OpenDocument-XML.html#Validating-OpenDocument-XML). 


It mentions validation of an ODT document against the "OpenDocument
RELAX NG Compact Syntax (RNC) schema".  I have obtained the xml and
RNC files from the org-mode Github site but I'm unsure how to use
them.  The org-mode manual page mentions general help in the
Introduction (see
http://orgmode.org/nxml-mode/Introduction.html#Introduction) but I
get a 404 error when I attempt to load the page.

Does anyone know where I can read this guide?

Will
  




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Rasmus
Hi,

> I’m not sure I’m happy about the citations/citation proposal (under any
> assignment of different names to the pieces).  A citations containing
> only one citation is degenerate: it can never have a :prefix or :suffix
> (these will rather be attached to the lone daughter citation).

This is one of my concerns.  Getting [cite: pre @k post] right.  I
mentioned it in another post, but Nicolas seemed not to worry about it.

> That’s a smell in my book.

I my book it's very pleasant since it means that I can use the same
function no matter the amount of "keys" within the citation.  It's always
a list that you map on.  You don't even need a cond, though in some cases
the length of the list may be nice to have.

> It also makes the latex export more complicated: a one-daughter
> citations should export as \textcite etc., whereas a multi-daughter one
> will be \multicite.  From my perspective it would be more
> straightforward to only have the citations wrapper be generated if there
> are actually multiple citations.  But I don’t know how that would affect
> the parser, so you should do what seems best to you.

With biblatex, which is the only latex backend that has sophisticated
notes functionality, this scheme makes it *super easy*!  Here's the latex
part of the hack I use for citation "in production":

;; type is e.g. textcite, and citations look like
;; [[cite: common pre; pre0 @key0 post0; pre1 @key1 post1; common post ]]
(if (org-export-derived-backend-p backend 'latex)
(format "\\%s%s%s%s%s"
type (if (> (length citations) 1) "s" "")
common-pre common-post
(mapconcat
 (lambda (cite)
   (let ((pre  (org-string-nw-p (plist-get cite :pre)))
 (post (org-string-nw-p (plist-get cite :post
   (concat (cond
((and pre post)
 (format "[%s][%s]" pre post))
(post (format "[%s]" post))
(pre (format "[%s][]" pre))
(t ""))
   (format "{%s}" (plist-get cite :key)
 citations ""))
   ⋯

It works well irrespective of the number of citations because a citation
is a list of keys.

> Another tangentially related issue is what does (org-element-context)
> return when point is in a multi-citation.  It would be nice if it
> returned the citation daughter, rather than the wrapping citations
> element.  This would make implementing goto-citation-at-point very
> easy.

This is a technical detail that I don't know enough about to have an
opinion on.  If it would not be as you say it should be easy enough to
extract :begin and :end from daughters and figure out which one point it
on.

>> As little as possible, though a highlevel API is nice, e.g. being able to
>> make a citepos using (concat (citeauthor cite) "'s" (citeyear cite)).
>
> I think I have an idea for this (though based on string templates rather
> than list forms).

OK.  Although I don't want to make you angry, do you know
reftex-format-citation?  It's what I use for citations outside of latex.

>> I haven't tried org-ref, but isn't it just reftex?  
>
> I haven’t either, but my impression is that, while perhaps based on
> reftex, there’s a lot of spit and polish that goes into making it work
> nicely.  It would be nice to be able to “steal” that because...

I think *that* part of reftex is fairly easy to bend.  Still, Reftex has
some quirkiness.  Initially I think it's OK.

Here's John's setup:

  
https://github.com/jkitchin/org-ref/blob/master/org-ref.org#org-mode--reftex-setup

>  In the long term I’d be happy if we built something out of more easily
> composable pieces.

I agree.

>> Another idea would be to use the ox-export dispatcher code, somehow...
>
> If this was a composable piece I’d be happy (I haven’t looked at it).

Isn't it?  Maybe I remember wrongly.

> There was also an attempt to factor the menu code out of magit (called
> makey IIRC).  I’ve used it for some small things, but it wasn’t terribly
> pleasant.

Magit isn't part of ELPA...  There's the new hydra thing in ELPA (haven't
tried it), which seems similar to the export dispatcher.

> What about XEmacs?  That’s another stumbling block.

I don't know.  I don't even have it installed to be honest...

–Rasmus

-- 
Summon the Mothership!



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Ken Mankoff

On 2015-03-03 at 10:41, Rasmus  wrote:
> ;; type is e.g. textcite, and citations look like
> ;; [[cite: common pre; pre0 @key0 post0; pre1 @key1 post1; common post ]]

My Biblatex keys are currently Author:Four-words-from-title. I don't think 
I'll ever have an author with "[" or "]" characters in their name. But will 
this work if I have an author with last-name "Cite"?

  -k.
  



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Richard Lawrence
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>> Richard Lawrence  writes:
>>
>>> Sorry, I may not have emphasized this enough, but in the grammar, I wrote:
>>>
>>>   - A KEY optionally begins with `-', and obligatorily contains `@' or
>>> `&' followed by a string of characters which begins with a letter
>>> or `_', and may contain alphanumeric characters and the following
>>> *internal* punctuation characters:
>>>:.#$%&-+?<>~/
>
> AFAIK Bibtex keys don't understand '#%~', so I'd remove those.  I would
> leave out '$' as well, as it's also the math symbol (think of display
> support).

I don't think we should remove these just because BibTeX doesn't support
them.  They might be used as keys by other citation databases, and
removing them might break them.

The syntax of KEYs (except for `&') is wholly borrowed from Pandoc,
which I figured had a reason for permitting those characters.  Note that
Pandoc reads reference databases in a lot of different formats,
including MODS, EndNote, etc., which might be more liberal with symbols
in keys:

http://pandoc.org/README.html#citations

So unless we decide we don't want to support people who use these
formats, I suggest we be more liberal here, too.  This won't cause a
problem for BibTeX users. 

Best,
Richard




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Rasmus
Hi,

Ken Mankoff  writes:

> On 2015-03-03 at 10:41, Rasmus  wrote:
>> ;; type is e.g. textcite, and citations look like
>> ;; [[cite: common pre; pre0 @key0 post0; pre1 @key1 post1; common post ]]
>
> My Biblatex keys are currently Author:Four-words-from-title. I
> don't think I'll ever have an author with "[" or "]" characters in
> their name. But will this work if I have an author with last-name
> "Cite"?

I think I'm misunderstanding.

The above was an example of the poor hack I use to support citations to
show Aaron that multicite and normal cite is really easy when the
individual references/daughters are stored in a list.

AFAIK, in the implementation that will be part of org eventually, both "-"
and "cite" would be supported as long as you don't have "[cite:" in the
name.  Then I don't know what would happen.

—Rasmus

-- 
I hear there's rumors on the, uh, Internets. . .



Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Richard Lawrence
Hi Nicolas,

Nicolas Goaziou  writes:

>> Oh, I did not realize there were outstanding issues with this.  I
>> remember Rasmus not liking `&'.  I'm fine with changing it, though I
>> cannot think of a better symbol.  Does someone think we should not have
>> a way of indicating that a reference should produce a full bibliography
>> entry?  Or that we should indicate it in some other way?
>
> AFAIC, I don't think a dedicated symbol is useful. It can be implemented
> through subtypes/properties. 

It would be useful to have a per-key symbol rather than a subtype if one
wants to mix regular and `full' references in the same citation.  But I
am not sure there are any realistic use cases for this, so I am fine
with expressing `full' citations via a subtype.
 
> Besides LaTeX, could other back-end provide that feature anyway?

Yes, I don't think that would be a problem, if we are using a CSL
processor.  You can ask a CSL processor for either a citation or a full
bibliography entry.

> I have no opinion about the :suppress-author symbol.

The case I can think of where it would be most useful to have this
expressed via the key is when you have multiple works by the same author
in a citation, like:

[cite: This was originally proposed by @Doe1999.; See his -@Doe2014 for a 
recent review.]

Apart from that, I would think a subtype/property would suffice.

Best,
Richard




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Richard Lawrence
Hi Avram,

Avram Lyon  writes:

> On Mon, Mar 2, 2015 at 7:16 PM Richard Lawrence <
> richard.lawre...@berkeley.edu> wrote:
>>
>> Is there any reason to go with citeproc-java over a different CSL
>> implementation, like citeproc-js or pandoc-citeproc?  I am a little
>> nervous about shelling out to something that sounds it like it requires
>> loading the JVM...
>
> citeproc-java just calls citeproc-js from Rhino or Nashorn, so there's
> little reason to go with citeproc-java for any application not already
> running on the JVM.

Hmm, good to know.

> Zotero is indeed using citeproc-js directly from XULrunner/Firefox, and
> that is the best-supported usage of the library.
>
> If you're looking for something with citation management and CSL proessing,
> perhaps zotxt is best. If you just want CSL processing, it would be best to
> run citeproc-js by itself (there is a citeproc-node, but it's not quite
> plug-and-play).

That sounds right.  And I agree with Aaron that we probably don't want a
hard dependency on Zotero on the output side, so maybe citeproc-js is
the way to go.  On the other hand, as Aaron points out, citeproc-java
has a BibTeX parser, and citeproc-js doesn't look like it would be easy
to run from the command line...some sort of JS engine is required in
addition to citeproc-js itself.

I wonder if citeproc-js would run under Guile??  Maybe that would be the
easiest way to turn citeproc-js into a lightweight command line utility
that Org (and hence Emacs) could feel good about depending on.
 
Best,
Richard




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Richard Lawrence
Hi Aaron,

Aaron Ecay  writes:

> Another tangentially related issue is what does (org-element-context)
> return when point is in a multi-citation.  It would be nice if it
> returned the citation daughter, rather than the wrapping citations
> element.  This would make implementing goto-citation-at-point very
> easy.

This is an important issue that I think requires more thought.

I can see two ways of going here:

1) Introduce individual references (really, probably just keys) as
first-class objects, which are contained by citation objects.

2) Keep individual references/keys as properties of citation objects,
but store :begin/:end properties individually for them.

I don't really have an informed opinion here, but the second option
seems simpler to me, since it doesn't involve a new class of object (and
therefore doesn't require distinguishing a key-within-a-citation from a
key-which-is-a-citation, as in the `shortcut' syntax).

With the second option, given a (multi-)citation object and a position,
it is still pretty easy to tell which individual reference the position
is in, so it is still pretty easy to implement goto-citation-at-point.

Best,
Richard




Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Avram Lyon
On Tue, Mar 3, 2015 at 9:28 AM Richard Lawrence <
richard.lawre...@berkeley.edu> wrote:
>
> That sounds right.  And I agree with Aaron that we probably don't want a
> hard dependency on Zotero on the output side, so maybe citeproc-js is
> the way to go.  On the other hand, as Aaron points out, citeproc-java
> has a BibTeX parser, and citeproc-js doesn't look like it would be easy
> to run from the command line...some sort of JS engine is required in
> addition to citeproc-js itself.
>
> I wonder if citeproc-js would run under Guile??  Maybe that would be the
> easiest way to turn citeproc-js into a lightweight command line utility
> that Org (and hence Emacs) could feel good about depending on.
>

I know that citeproc-js has tried to be engine-agnostic, so perhaps it can
work with Guile. If not, you may also want to look at citeproc-hs and
citeproc-rb, both of which are quite complete (they, I believe, pass the
entire test suite) and which may be easier to bring in as dependencies (JS
engines are still a rarer dependency than Ruby or Haskell).


Re: [O] What to use for tables with lengthy text in cells?

2015-03-03 Thread Charles C. Berry

On Mon, 2 Mar 2015, Charles C. Berry wrote:


On Mon, 2 Mar 2015, Matt Price wrote:


I have a project which will require me to enter about a paragraph in each
of 5 fields several times a day. I would use org tables, but I need to be
able to see the table contents in the buffer, and org hides long lines. I
tried using table.el but it feels incredibly clumsy - for instance, I can't
find a way to add a row to the end of the table, which seems crazy.

I am wondering  what other people do in this situation - I guess I could
use a spreadsheet or an odt document but I would much rather stay in emacs
if I can.


I sometimes use babel blocks for this purpose.



But I did not give an example of filling in a table using that
strategy.

So here is an example of how you would use that strategy to fill out a
table with fields that get edited. Obviously, you can use the string
resulting from org-fill-template in other ways than in the example
below.

--8<---cut here---start->8---

* Not exported :noexport:

Define a table template (and put it out of the way in a subtree that
is not exported)

#+name: tmplt
#+BEGIN_SRC org
  | Never change me | %a|
  | %b  | Dont modify me either |
#+END_SRC

Define the fill-in cells and be sure they are not exported:

#+name: pcta
#+BEGIN_SRC org
this is ~a~.
#+END_SRC

#+name: pctb
#+BEGIN_SRC org
this is *b*.
#+END_SRC


* This gets exported

#+HEADER: :var a=pcta() :var b=pctb() :var tm=tmplt() 
#+BEGIN_SRC emacs-lisp :wrap latex :exports results

  (org-export-string-as
   (org-fill-template tm `(("a" . ,a)("b" . ,b)))
   'latex t)
#+END_SRC

#+RESULTS:
#+BEGIN_latex
\begin{center}
\begin{tabular}{ll}
Never change me & this is \verb~a~.\\
this is \textbf{b}. & Dont modify me either\\
\end{tabular}
\end{center}
#+END_latex

--8<---cut here---end--->8---

HTH,

Chuck



Re: [O] Missing OpenDocument schema files and ODT file corruption

2015-03-03 Thread J. David Boyd
"Monroe, Will"  writes:

> David,
>
> On 3/2/15 2:25 PM, J. David Boyd wrote:
>
> "Monroe, Will"  writes:
>
> 
> Hello,
>
> I'm using Emacs 24.4, Org-mode version 8.2.10 and I've run into a
> problem with missing OpenDocument schema files. Upon startup, I see
> these messages:
>
> ,
> | Debug (ox-odt): Searching for OpenDocument styles files...
> | Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
> | Debug (ox-odt): Trying /Users/wmonro1/.emacs.d/etc/styles/...
> | Debug (ox-odt): Trying
> /Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/...
> | Debug (ox-odt): Using styles under
> /Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/
> | Debug (ox-odt): Searching for OpenDocument schema files...
> | Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
> | Debug (ox-odt): No OpenDocument schema files installed
> `
>
> I think I've had these errors for some time but I haven't paid much
> attention to them. However, I recently started exporting to
> OpenDocument formats (e.g., ODT) and I've encountered frequent
> problems with "file corruption" and some ODT files that won't even
> open. I want to find out what's happening so I can use the
> export/publishing functions for ODT more reliably.
>
> I searched the org-mode listerv and found a recommendation to check
> the values of org-odt-styles-dir and org-odt-schema-dir. I got the
> following values:
>
> ,
> | org-odt-styles-dir:
> | "/Users/wmonro1/.emacs.d/elpa/org-20150223/etc/styles/"
> | 
> | org-odt-schema-dir
> | nil
> `
>
> There is documentation for `org-odt-schema-dir' the explains the
> following:
>
> ,
> | Documentation:
> | Directory that contains OpenDocument schema files.
> | 
> | This directory contains:
> | 1. rnc files for OpenDocument schema
> | 2. a "schemas.xml" file that specifies locating rules needed
> | for auto validation of OpenDocument XML files.
> | 
> | Use the customize interface to set this variable. This ensures
> | that `rng-schema-locating-files' is updated and auto-validation
> | of OpenDocument XML takes place based on the value
> | `rng-nxml-auto-validate-flag'.
> | 
> | The default value of this variable varies depending on the
> | version of org in use and is initialized from
> | `org-odt-schema-dir-list'. The OASIS schema files are available
> | only in the org's private git repository. It is *not* bundled
> | with GNU ELPA tar or standard Emacs distribution.
> | 
> | You can customize this variable.
> | 
> | This variable was introduced, or its default value was changed, in
> | version 24.1 of Emacs.
> `
>
> So, now I understand why the error messages are occuring but, given
> that the value seems to be `nil' by default, I'm not sure if I need to
> change anything. Again, I'm experiencing some problems with org-mode
> export to ODT and I'd like to clear those up. Would it help to obtain
> the "rnc" and "schemas.xml" files and then point `org-odt-schema-dir'
> to them? 
>
> Will 
>
> 
> If I recall correctly, I was getting errors also until I added these files in.
>
> I found the files schemas.xml, OrgOdtContentTemplate.xml, and OrgOdtStyles.xml
> in the git repository for Org mode, in the etc/schema and
> etc/styles directories.
>
> I then copied the etc/schema/schemas.xmls and etc/styles/OrgOdt*.xml files to 
> my
> /usr/share/emacs/etc/org/styles directory, and the errors went away.
>
> That must be where org-odt-schema-dir defaults to, as I don't have it set
> anywhere.
>
> Thanks for your reply. That helped.
>
> I wasn't sure if it was wise to change the default setting for
> `org-odt-schema-dir' but I went ahead and did so; just chose a
> directory in ~/Dropbox that my other Emacs instances can also access.
>
> Will


I only ever use one instance of Emacs, so that is never a problem.  Glad I was
able to help.

Dave




Re: [O] agenda folding/hiding of sections?

2015-03-03 Thread Samuel Wales
great idea, but that only toggles the grid, not the entries.



Re: [O] What to use for tables with lengthy text in cells?

2015-03-03 Thread Tory S. Anderson
It's not a perfect solution (many of us have wished for some way of doing 
multi-line cells in orgmode, but there's no clear solution...) but I use a 
combination of width restraints[1] and toggle-truncate-lines, which I've bound 
to . If it comes to the worst, I would probably pull out csv-mode and use a 
CSV file. I think the problem is that there's no simple way to wrap within just 
a cell in Emacs. 

"Charles C. Berry"  writes:

> On Mon, 2 Mar 2015, Charles C. Berry wrote:
>
>> On Mon, 2 Mar 2015, Matt Price wrote:
>>
>>> I have a project which will require me to enter about a paragraph in each
>>> of 5 fields several times a day. I would use org tables, but I need to be
>>> able to see the table contents in the buffer, and org hides long lines. I
>>> tried using table.el but it feels incredibly clumsy - for instance, I can't
>>> find a way to add a row to the end of the table, which seems crazy.
>>> 
>>> I am wondering  what other people do in this situation - I guess I could
>>> use a spreadsheet or an odt document but I would much rather stay in emacs
>>> if I can.
>>
>> I sometimes use babel blocks for this purpose.
>>
>
> But I did not give an example of filling in a table using that
> strategy.
>
> So here is an example of how you would use that strategy to fill out a
> table with fields that get edited. Obviously, you can use the string
> resulting from org-fill-template in other ways than in the example
> below.
>
>
> * Not exported   
> :noexport:
>
> Define a table template (and put it out of the way in a subtree that
> is not exported)
>
> #+name: tmplt
> #+BEGIN_SRC org
>| Never change me | %a|
>| %b  | Dont modify me either |
> #+END_SRC
>
> Define the fill-in cells and be sure they are not exported:
>
> #+name: pcta
> #+BEGIN_SRC org
> this is ~a~.
> #+END_SRC
>
> #+name: pctb
> #+BEGIN_SRC org
> this is *b*.
> #+END_SRC
>
>
> * This gets exported
>
> #+HEADER: :var a=pcta() :var b=pctb() :var tm=tmplt() 
> #+BEGIN_SRC emacs-lisp :wrap latex :exports results
>(org-export-string-as
> (org-fill-template tm `(("a" . ,a)("b" . ,b)))
> 'latex t)
> #+END_SRC
>
> #+RESULTS:
> #+BEGIN_latex
> \begin{center}
> \begin{tabular}{ll}
> Never change me & this is \verb~a~.\\
> this is \textbf{b}. & Dont modify me either\\
> \end{tabular}
> \end{center}
> #+END_latex
>
> HTH,
>
> Chuck

Footnotes: 
[1]  
http://orgmode.org/manual/Column-width-and-alignment.html#Column-width-and-alignment




[O] Escape individual underscore?

2015-03-03 Thread Jacob Gerlach
Hi List,

I want to include a literal underscore in LaTeX export, like FOO_BAR. Right
now I get:
FOO$_{\text{BAR}}$

Contrary to this stackexchange question
, if I try to escape the
underscore with a backslash, I get:
FOO$\backslash$$_{\text{BAR}}

I've found that I can set org-export-with-sub-superscripts to "{}" to avoid
this problem, but I'd rather escape individual underscores on a case by
case basis. Is this possible?

As an aside, section 11.7.2 of the org info says "Configure the variable
`org-use-sub-superscripts' to
change this convention." Fortunately the docstring for
org-use-sub-superscripts points out that display and export functionality
are now controlled by separate variables. I would propose a patch to update
the info to clarify that two variables are used, but I'm not currently set
up to do so.

Regards,
Jake


Re: [O] Missing org-mode manual page: Validating OpenDocument XML

2015-03-03 Thread Vaidheeswaran C
On Tuesday 03 March 2015 08:41 PM, Monroe, Will wrote:
>   Hello,
> 
> I'm trying to troubleshoot a corrupt ODT file that I've exported from 
> org-mode.  
> The org-mode manual provides some guidance for this process on the 
> "Validating 
> OpenDocument XML" page (see 
> http://orgmode.org/manual/Validating-OpenDocument-XML.html#Validating-OpenDocument-XML).
>  
> 
> 
> It mentions validation of an ODT document against the "OpenDocument RELAX NG 
> Compact Syntax (RNC) schema".  I have obtained the xml and RNC files from the 
> org-mode Github site but I'm unsure how to use them.  The org-mode manual 
> page 
> mentions general help in the Introduction (see 
> http://orgmode.org/nxml-mode/Introduction.html#Introduction) but I get a 404 
> error when I attempt to load the page.
> 
> Does anyone know where I can read this guide?

You can avoid the cross-manual link errors, by using the manuals at
gnu.org site:

https://www.gnu.org/software/emacs/manual/html_node/org/Validating-OpenDocument-XML.html

For verification, this is roughly what you need to do:

1. Copy over schema file.
2. Reload Emacs.
3. C-x C-f file.odt
4. Press ENTER on content.xml
5. C-c C-n (M-x rng-next-error)

Or

You can try an online validator: http://odf-validator.rhcloud.com/

Based on my own experience, your *.org file is NOT in utf-8 and uses
non-English characters (whatever they are called).  Just switch the
file to utf-8 encoding and you will be all set.







Re: [O] Escape individual underscore?

2015-03-03 Thread Nick Dokos
Jacob Gerlach  writes:

> Hi List,
>
> I want to include a literal underscore in LaTeX export, like FOO_BAR. Right 
> now I get:
> FOO$_{\text{BAR}}$
>
> Contrary to this stackexchange question, if I try to escape the underscore 
> with a backslash, I get:
> FOO$\backslash$$_{\text{BAR}}
>
> I've found that I can set org-export-with-sub-superscripts to "{}" to avoid 
> this problem, but I'd rather escape individual
> underscores on a case by case basis. Is this possible?
>

I don't think so.

FWIW, I always set

#+OPTIONS: ^:{}

in my files. That allows me to use a_b  for the majority of my use
cases, but still allows {subscripts} in the rare cases when I need them.

I'm not sure how useful it would be but maybe there should be a setting
to accommodate the inverse case: mostly subscripts a_b but allow literal
underscores using some additional markup.

Nick





Re: [O] Escape individual underscore?

2015-03-03 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> I'm not sure how useful it would be but maybe there should be a setting
> to accommodate the inverse case: mostly subscripts a_b but allow literal
> underscores using some additional markup.

You can use \under entity, e.g.,

  a\under{}b


Regards,

-- 
Nicolas Goaziou



Re: [O] Here is a patch I want to add to org.el……

2015-03-03 Thread Nicolas Goaziou
Andreas Leha  writes:

> On some more testing, this description is wrong.  C-c C-x C-l never does
> anything on the first headline, e.g., which I think it should.

C-c C-x C-l on the first, or any other, headline toggles LaTeX fragments
in the section (not the subtree) below. If there is nothing to do there,
as in your example, it will not do anything either.

I think behaviour is fine here.

Regards,



Re: [O] Here is a patch I want to add to org.el……

2015-03-03 Thread Andreas Leha
Hi Nicolas,

Nicolas Goaziou  writes:
> Andreas Leha  writes:
>
>> On some more testing, this description is wrong.  C-c C-x C-l never does
>> anything on the first headline, e.g., which I think it should.
>
> C-c C-x C-l on the first, or any other, headline toggles LaTeX fragments
> in the section (not the subtree) below. If there is nothing to do there,
> as in your example, it will not do anything either.
>
> I think behaviour is fine here.
>

I see.  I did not read carefully enough.  Fine with me as well.

Thanks,
Andreas




Re: [O] Missing org-mode manual page: Validating OpenDocument XML

2015-03-03 Thread Monroe, Will

  
  
On 3/3/15 2:26 PM, Vaidheeswaran C wrote:

  On Tuesday 03 March 2015 08:41 PM, Monroe, Will wrote:

  
  Hello,

I'm trying to troubleshoot a corrupt ODT file that I've exported from org-mode.  
The org-mode manual provides some guidance for this process on the "Validating 
OpenDocument XML" page (see 
http://orgmode.org/manual/Validating-OpenDocument-XML.html#Validating-OpenDocument-XML). 


It mentions validation of an ODT document against the "OpenDocument RELAX NG 
Compact Syntax (RNC) schema".  I have obtained the xml and RNC files from the 
org-mode Github site but I'm unsure how to use them.  The org-mode manual page 
mentions general help in the Introduction (see 
http://orgmode.org/nxml-mode/Introduction.html#Introduction) but I get a 404 
error when I attempt to load the page.

Does anyone know where I can read this guide?

  
  
You can avoid the cross-manual link errors, by using the manuals at
gnu.org site:

https://www.gnu.org/software/emacs/manual/html_node/org/Validating-OpenDocument-XML.html

For verification, this is roughly what you need to do:

1. Copy over schema file.
2. Reload Emacs.
3. C-x C-f file.odt
4. Press ENTER on content.xml
5. C-c C-n (M-x rng-next-error)

Or

You can try an online validator: http://odf-validator.rhcloud.com/

Based on my own experience, your *.org file is NOT in utf-8 and uses
non-English characters (whatever they are called).  Just switch the
file to utf-8 encoding and you will be all set.

Hello,

Thanks for your reply.  I checked the text formatting of the .org
document and it was utf-8 (confirmed by Emacs "U" in the modeline). 
I also tried exporting it again and looking at the Messages--can't
believe I didn't do that to begin with--and I saw this:

,
| LaTeX to MathML converter not available.
| Formatting LaTeX using verbatim
| Embedding /Users/wmonro1/Dropbox/org/panopto-create-recording.png
as Images/0001.png...
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/meta.xml
| Using schema
~/Dropbox/emacs/org-odt-schema/schema/od-schema-v1.2-os.rnc [2
times]
| Saving file
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/styles.xml...
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/.styles.xml.~undo-tree~
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/styles.xml
| Using vacuous schema
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/mimetype
| Using vacuous schema
| Saving file
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/manifest.xml...
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/.manifest.xml.~undo-tree~
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/manifest.xml
| Saving file
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/content.xml...
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/.content.xml.~undo-tree~
| Wrote
/var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/content.xml
| (No changes need to be saved)
| Creating ODT file...
| Running zip -mX0 work.odt mimetype
| Running zip -rmTq work.odt .
| Created /Users/wmonro1/Dropbox/org/work.odt
| Parsing archive file...done.
| Running open /Users/wmonro1/Dropbox/org/work.odt...done
| Parsing archive file...done.
`

The presence of the /.content.xml.~undo-tree~,
/.manifest.xml.~undo-tree~, and /.styles.xml.~undo-tree~ got my
attention.  After submitting the document to the online validator
(default settings used), these files, undoubtedly created by my
personal inspection in Emacs, showed up again:

,
| Details:
| work.odt: Info: ODF version of root document: 1.2
| work.odt/META-INF/manifest.xml: Error: The file
'.content.xml.~undo-tree~' shall be listed in the
'META-INF/manifest.xml' file as it exists in the ODF package
'work.odt'!
| work.odt/META-INF/manifest.xml: Error: The file
'.styles.xml.~undo-tree~' shall be listed in the
'META-INF/manifest.xml' file as it exists in the ODF package
'work.odt'!
| work.odt/META-INF/manifest.xml: Error: The file
'META-INF/.manifest.xml.~undo-tree~' shall be listed in the
'META-INF/manifest.xml' file as it exists in the ODF package
'work.odt'!
| work.odt/META-INF/manifest.xml: Warning: The directory 'Images/'
is not a sub-document and should not be listed in the
'META-INF/manifest.xml' file of ODF package 'work.odt'!
|
internal:/schema/odf1.2/OpenDocument-v1.2-cos01-manifest-schema.rng:
Info: parsed.
| work.odt/META-INF/manifest.xml: Info: 3 errors, 1 warnings
| work.odt/mimetype: Info: no errors, no warnings
| work.odt: Info: Media Type:
application/vnd.oasis.opendocument.text
| internal:/s

Re: [O] Citation syntax: a revised proposal

2015-03-03 Thread Matt Price
On Mar 3, 2015 3:43 AM, "Nicolas Goaziou"  wrote:
>
> Richard Lawrence  writes:
>
> >> To support multi cites, we must first decide how the parsed will
present
> >> information, i.e., what are the properties in the following case
> >>
> >>   [cite:pre; pre1 @k1 post1; pre2 @k2 post2; post]
> >
> > I was thinking that this should yield a citation object with a
structure like:
> >
> > ('citation ...
> >   :common-prefix pre
> >   :common-suffix post
> >   :references ((:prefix pre1
> > :key "k1"
> > :suffix post1 ...)
> >(:prefix pre2
> > :key "k2"
> > :suffix post2 ...))
> >   ...)
> >
> > Would that work?
>
> Yes. I find it better than "entries/entry" as discussed with Rasmus.
> I'll implement it in a few days.
>
> > Oh, I did not realize there were outstanding issues with this.  I
> > remember Rasmus not liking `&'.  I'm fine with changing it, though I
> > cannot think of a better symbol.  Does someone think we should not have
> > a way of indicating that a reference should produce a full bibliography
> > entry?  Or that we should indicate it in some other way?
>
> AFAIC, I don't think a dedicated symbol is useful. It can be implemented
> through subtypes/properties. Besides LaTeX, could other back-end provide
> that feature anyway?
>

I have done this with zotxt for HTML and odt export, so it should be
possible. I personally really like this, as I have a personal use case
(course syllabi) where I need this all the time. But I may be unusual in
this.

Matt
> I have no opinion about the :suppress-author symbol.
>
>
> Regards,
>


Re: [O] Missing org-mode manual page: Validating OpenDocument XML

2015-03-03 Thread Vaidheeswaran C
I am not sure what is happening.  Some suggestions:

1. C-h v temporary-file-directory.  Check this variable, particularly
   if your are on Windows machine.

2. Load Emacs without your custom settings.

   a) emacs -Q -L /path/to/org/library

  (`-L' option not needed if org comes from your Emacs
  installation.)

   b) Once Emacs is loaded, do

  M-x load-library ox-odt

  Note where the styles and schema files come from.

   c) Proceed with export

3.  I will focus on XML errors like "loext:contextual-spacing" etc.

The style file used by the exporter comes from `OrgOdtStyles.xml'
(Check messages buffer for where this file comes from).  This file
has no such attributes.

Which version of LibreOffice you are using?  Where did you get
style files from?  Are you using #+ODT_STYLES_FILE option etc



On Wednesday 04 March 2015 03:19 AM, Monroe, Will wrote:
>   On 3/3/15 2:26 PM, Vaidheeswaran C wrote:
>> On Tuesday 03 March 2015 08:41 PM, Monroe, Will wrote:
>>>Hello,
>>>
>>> I'm trying to troubleshoot a corrupt ODT file that I've exported from 
>>> org-mode.
>>> The org-mode manual provides some guidance for this process on the 
>>> "Validating
>>> OpenDocument XML" page (see
>>> http://orgmode.org/manual/Validating-OpenDocument-XML.html#Validating-OpenDocument-XML).
>>>
>>>
>>> It mentions validation of an ODT document against the "OpenDocument RELAX NG
>>> Compact Syntax (RNC) schema".  I have obtained the xml and RNC files from 
>>> the
>>> org-mode Github site but I'm unsure how to use them.  The org-mode manual 
>>> page
>>> mentions general help in the Introduction (see
>>> http://orgmode.org/nxml-mode/Introduction.html#Introduction) but I get a 404
>>> error when I attempt to load the page.
>>>
>>> Does anyone know where I can read this guide?
>> You can avoid the cross-manual link errors, by using the manuals at
>> gnu.org site:
>>
>> https://www.gnu.org/software/emacs/manual/html_node/org/Validating-OpenDocument-XML.html
>>
>> For verification, this is roughly what you need to do:
>>
>> 1. Copy over schema file.
>> 2. Reload Emacs.
>> 3. C-x C-f file.odt
>> 4. Press ENTER on content.xml
>> 5. C-c C-n (M-x rng-next-error)
>>
>> Or
>>
>> You can try an online validator:http://odf-validator.rhcloud.com/
>>
>> Based on my own experience, your *.org file is NOT in utf-8 and uses
>> non-English characters (whatever they are called).  Just switch the
>> file to utf-8 encoding and you will be all set.
> Hello,
> 
> Thanks for your reply.  I checked the text formatting of the .org document 
> and 
> it was utf-8 (confirmed by Emacs "U" in the modeline).  I also tried 
> exporting 
> it again and looking at the Messages--can't believe I didn't do that to begin 
> with--and I saw this:
> 
> ,
> | LaTeX to MathML converter not available.
> | Formatting LaTeX using verbatim
> | Embedding /Users/wmonro1/Dropbox/org/panopto-create-recording.png as 
> Images/0001.png...
> | Wrote /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/meta.xml
> | Using schema ~/Dropbox/emacs/org-odt-schema/schema/od-schema-v1.2-os.rnc [2 
> times]
> | Saving file 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/styles.xml...
> | Wrote 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/.styles.xml.~undo-tree~
> | Wrote 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/styles.xml
> | Using vacuous schema
> | Wrote /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/mimetype
> | Using vacuous schema
> | Saving file 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/manifest.xml...
> | Wrote 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/.manifest.xml.~undo-tree~
> | Wrote 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/META-INF/manifest.xml
> | Saving file 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/content.xml...
> | Wrote 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/.content.xml.~undo-tree~
> | Wrote 
> /var/folders/_r/333b9wt92kncthm2ph8wpp59b0ccdd/T/odt-66242t3k/content.xml
> | (No changes need to be saved)
> | Creating ODT file...
> | Running zip -mX0 work.odt mimetype
> | Running zip -rmTq work.odt .
> | Created /Users/wmonro1/Dropbox/org/work.odt
> | Parsing archive file...done.
> | Running open /Users/wmonro1/Dropbox/org/work.odt...done
> | Parsing archive file...done.
> `
> 
> The presence of the /.content.xml.~undo-tree~, /.manifest.xml.~undo-tree~, 
> and 
> /.styles.xml.~undo-tree~ got my attention.  After submitting the document to 
> the 
> online validator (default settings used), these files, undoubtedly created by 
> my 
> personal inspection in Emacs, showed up again:
> 
> ,
> | Details:
> | work.odt: Info: ODF version of root document: 1.2
> | work.odt/META-INF/manifest.xml: Error: The file '.content.xml.~undo-tree~' 
> shall be