Re: Feature request: Footnotes immediately following the paragraph when exported ($)

2020-05-23 Thread D. C. Toedt
Thanks for the response, Bastien. No one has answered up, suggesting that
there's not widespread interest.






On Sat, May 23, 2020 at 4:29 AM Bastien  wrote:

> Hi,
>
> "D. C. Toedt"  writes:
>
> > For an ongoing pro bono project, it would be nice if there were an
> > in-buffer #+OPTION: configuration for footnotes, when exporting to
> > HTML (or DOCX or PDF), to have the footnote text in small print just
> > below the paragraph in which the footnote reference occurs.
>
> I don't know if you find someone to implement this, but FWIW I don't
> think it would be a good idea to support it in Org by default.  This
> is more a job for a new specific export backend (HTML based, if your
> need is just for the HTML export.)
>
> Best,
>
> --
>  Bastien
>


Feature request: Footnotes immediately following the paragraph when exported ($)

2020-04-22 Thread D. C. Toedt
For an ongoing pro bono project, it would be nice if there were an
in-buffer #+OPTION: configuration for footnotes, when exporting to HTML (or
DOCX or PDF), to have the footnote text in small print just below the
paragraph in which the footnote reference occurs.

I'd be willing to pay something to have this done and contributed to the
standard installation.

Here's an example of the desired "look"; it's copied and pasted from a court
opinion <https://casetext.com/case/caradigm-us-llc-v-pruitthealth-inc>,
with the footnote numbers bolded:



[T]he CSA allowed Pruitt to not only access CIP, but also to "build
Customer Use Cases*[4]*
<https://casetext.com/case/caradigm-us-llc-v-pruitthealth-inc#N196682> and
configure Data Feeds*[5]* for those" cases. *[remainder of paragraph
omitted]*


*[4]* The CSA defines "Use Case" as a "Cloud Services configuration that
incorporates Data Feeds with designated views to address specific issues
within [Pruitt] or [Pruitt's] Facilities." Doc. 1–1 at 7. "Customer Use
Cases," in turn, "means any Use Case developed by or for [Pruitt] or
customized for [Pruitt]." *Id.*

*[5]* "Data Feeds" are "inbound electronic data messages from [Pruitt]
information systems to the Cloud Services." Doc. 1–1 at 7. Essentially, a
data feed is the delivery of information from a Pruitt electronic medical
records software system to CIP, which Caradigm hosts on its own computers,
and which Pruitt accesses via the "cloud." *See* doc. 73 at 6 ("data feeds
are the electronic data messages from PruittHealth systems to [CIP].")
(quotes omitted).

The Order—"made as of June 25th, 2013 ("Order Effective Date ") pursuant to
the [CSA]"—meanwhile, reveals that Pruitt, in addition to the $20,000/month
CIP development license, purchased two other "Cloud Services:" *[remainder
of text omitted]*



I've just (re)checked the manual
<https://orgmode.org/org.html#Creating-Footnotes> but didn't see this
feature.

A Google search yielded a 2014 Stack Overflow question
<https://stackoverflow.com/questions/26160126/emacs-org-mode-html-footnotes>
along
the same lines.

D. C. Toedt III   Attorney & neutral arbitrator — tech contracts & IP
*(My last name is pronounced "Tate")  * +1 (713) 364-6545
d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
Skype: dctoedt

www.OnContracts.com/About <http://www.oncontracts.com/About>
Unless expressly stated otherwise, this message is not intended to serve
as assent to an agreement or other document, even if attached to this
message.


[O] TOC local for specified heading and its subheadings - now broken?

2018-07-30 Thread D. C. Toedt
1. In November 2015, Sacha Chua very kindly put together a patch to allow
the following:

> # = The next line is the desired feature:  Generate a TOC
list (with links) of *all subheadings in the specified heading *
> *#+TOC: headlines 1 local ConfInfoClauses *


2. Nicholas subsequently proposed
<https://lists.gnu.org/archive/html/emacs-orgmode/2015-11/msg00697.html>
modifying the syntax:

  #+toc: headlines 1 :headline #headline
> or
>   *#+toc: headlines 1 :target #headline*
> since TOC keywords always refer to headlines.



3. Sacha's patch appears to have been applied to ox-html.el for a couple of
years now — but it doesn't seem to work anymore, regardless of the syntax
used.

I've tried it on my main file, and also on a small test file, as follows:

#+TITLE: Test of subTOC for specified headline

* Section 1
  :PROPERTIES:
  :CUSTOM_ID: SectionOne
  :END:

** Section 1.1
  :PROPERTIES:
  :CUSTOM_ID: SecOneOne
  :END:


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum
dui eu commodo sodales. Nunc ac pulvinar augue. Suspendisse sagittis tempus
aliquet. Ut placerat, magna quis blandit pretium, risus libero maximus dui,
non sollicitudin ligula orci non massa. Morbi bibendum facilisis elit a
congue. Suspendisse blandit iaculis quam, sed molestie leo. Nulla porttitor
leo eu urna fermentum pretium. In congue nulla laoreet nunc accumsan, vel
malesuada lacus porta. Praesent vulputate arcu lectus, vitae tincidunt elit
laoreet eget. Suspendisse lobortis nibh sed est scelerisque imperdiet.

** Another section: 1.2
  :PROPERTIES:
  :CUSTOM_ID: SecOneTwo
  :END:


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam interdum
dui eu commodo sodales. Nunc ac pulvinar augue. Suspendisse sagittis tempus
aliquet. Ut placerat, magna quis blandit pretium, risus libero maximus dui,
non sollicitudin ligula orci non massa. Morbi bibendum facilisis elit a
congue. Suspendisse blandit iaculis quam, sed molestie leo. Nulla porttitor
leo eu urna fermentum pretium. In congue nulla laoreet nunc accumsan, vel
malesuada lacus porta. Praesent vulputate arcu lectus, vitae tincidunt elit
laoreet eget. Suspendisse lobortis nibh sed est scelerisque imperdiet.

* Next top-level section: Two
  :PROPERTIES:
  :CUSTOM_ID: SecTwo
  :END:

The next portion should be a sub-TOC for Section 1:

#+TOC: headlines 2 :target #SectionOne

But what it produces is a complete table of contents.

So let's try adding "local" as a keyword:

#+TOC: headlines 2 local  :target #SectionOne

But that produces no TOC at all.


I've got GNU Emacs 26.1 (9.0) installed for Mac OS and the 2018-07-23
update of org-mode.

Any suggestions?

D. C. Toedt III   Attorney & neutral arbitrator — tech contracts & IP
*(My last name is pronounced "Tate")  *Houston, Texas, USA
O: +1 (713) 364-6545   C: +1 (713) 516-8968

d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
Skype: dctoedt

www.OnContracts.com/About <http://www.oncontracts.com/About>

Unless expressly stated otherwise, this message is not intended to serve
as assent to an agreement or other document, even if attached to this
message.


Re: [O] [ox-html] Why are dedicated targets automatically renamed?

2016-10-18 Thread D. C. Toedt
I'm late to this thread but found it in researching a similar problem.  I
use designated targets to create a permanently-named internal HTML anchor
that I can use in providing a precisely-targeted complete URL that points
to a specific paragraph (as opposed to a section).  Example:  In the file
index.org, the org-mode dedicated target  <> should export to
HTML as: http://www.example.com/index.html#ThisTarget.  The name #ThisTarget
needs to be permanent because the document in question is a work in
progress.

Based on Nicolas's suggestion (downthread) about using #+HTML: or @@html: ,
I did a couple of quickie macros to create  anchors and links, but
that's a pain and clutters up the on-screen display in org-mode.
​​

​--D. C.​



D. C. Toedt III
Attorney & neutral arbitrator <http://www.OnContracts.com/arb-prefs>  —
tech contracts & IP
*(My last name is pronounced "Tate")*
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
​
Skype: dctoedt
​

www.OnContracts.com/About <http://www.oncontracts.com/About>
​​


Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


Re: [O] Configurable prefixes for heading-tree numbering in HTML export? ($)

2016-07-30 Thread D. C. Toedt
Many thanks, Nick -- an interesting approach, but it's not a good fit for
what I need.

Another approach would be possible if org-mode had a way of including
arbitrary attribute text in HTML exports of headings.  This would enable
use of the CSS attr()
<https://developer.mozilla.org/en-US/docs/Web/CSS/attr>functionality,
combined with the ::before pseudo-element and counters.   I've tested out
the following in HTML; it seems to work for what I need:

==BEGIN HTML SNIPPET==


body   { counter-reset: section-counter; }
h2  { counter-reset: sub-section-counter; }
h3  { counter-reset: sub-sub-section-counter; }

h2::before {
counter-increment: section-counter;
content: attr(CDArticlePrefix) "-" counter(section-counter) " ";
}

h3:before {
counter-increment: sub-section-counter;
content: attr(CDArticlePrefix) "-" counter(section-counter) "."
counter(sub-section-counter) " ";
}

h4:before {
counter-increment: sub-sub-section-counter;
content: attr(CDArticlePrefix) "-" counter(section-counter) "."
counter(sub-section-counter) "." counter(sub-sub-section-counter) " ";
}



Definitions 

Consulting Services

Payment Terms

General Provisions

==END HTML SNIPPET==

Unfortunately, org-mode does not seem to be able to include the
CDArticlePrefix="DEFN" attribute text in headings, as opposed to in divs.

I appreciate the response.

Regards,

D. C.





D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
​
Skype: dctoedt
​

www.OnContracts.com/About <http://www.oncontracts.com/About>
​​


Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.



On Sat, Jul 30, 2016 at 5:06 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> "D. C. Toedt" <d...@toedt.com> writes:
>
> > So far as I can tell, org-mode currently allows heading numbering in only
> > one style (1, 1.1, 1.1.1, etc.).  For HTML export, I'm interested in
> having
> > the heading numbering be configurable on a per-subtree basis, along
> > something like the following lines for a hypothetical
> consulting-agreement
> > contract  (indentation is for convenient reading only).  This is for my
> Common
> > Draft <http://www.CommonDraft.org> contract terms and conditions project
> > --- I'd like to be able to arrange the trees in an arbitrary order and
> have
> > the top-level headings start with prefixes and heading numbers instead of
> > heading numbers alone.
> >
> > This can be done in a very kludgy fashion with CSS (see below), but doing
> > it in org-mode would be far preferable for several reasons.
> >
> > I'd be happy to pay an honorarium, or make a donation, of USD$100-$200
> for
> > the appropriate elisp code that I could include in the relevant file(s).
> > I'd want the elisp code to be open-sourced, and at least minimal
> > documentation, so that it could be made a candidate for possible
> inclusion
> > in a future org-mode release.
> >
> > Here's an example of the desired org-mode code:
> >
> >
> > ===BEGIN===
> >
> >
> > * Services
> >
> >   :PROPERTIES:
> >
> >   :CUSTOM_ID: SVC
> >
> >   :CUSTOM_PREFIX: t
> >
> >   :END:
> > #  NOTE THE :CUSTOM_PREFIX: property above === #
> >
> >
> > ** Statements of Work
> >
> > [properties and text omitted]
> >
> >
> > *** Written Statements of Work Required
> >
> > [properties and text omitted]
> > # === AN ARBITRARY NUMBER OF SUBHEADING LEVELS BENEATH THE TOP
> > LEVEL = #
> >
> >
> > *** Changes Must Be in Writing
> > [properties and text omitted]
> >
> >
> >
> > ** Billing Rates
> >
> > [properties and text omitted]
> >
> >
> > ** IP Ownership
> >
> > [properties and text omitted]
> >
> >
> > * General Provisions
> >
> >   :PROPERTIES:
> >
> >   :CUSTOM_ID: GP
> >   :CUSTOM_PREFIX: t
> >
> >   :END:
> >
> >
> > ** Amendments
> >
> > [properties and text omitted]
> >
> >
> > ** Notices
> >
> > [properties and text omitted]
> >
> > ===END===
> >
> >
> > I'd like for the resulting HTML export to be something like the
> following:
> >
> > SVC Services
> >
> > # 

[O] Configurable prefixes for heading-tree numbering in HTML export? ($)

2016-07-28 Thread D. C. Toedt
So far as I can tell, org-mode currently allows heading numbering in only
one style (1, 1.1, 1.1.1, etc.).  For HTML export, I'm interested in having
the heading numbering be configurable on a per-subtree basis, along
something like the following lines for a hypothetical consulting-agreement
contract  (indentation is for convenient reading only).  This is for my Common
Draft <http://www.CommonDraft.org> contract terms and conditions project
--- I'd like to be able to arrange the trees in an arbitrary order and have
the top-level headings start with prefixes and heading numbers instead of
heading numbers alone.

This can be done in a very kludgy fashion with CSS (see below), but doing
it in org-mode would be far preferable for several reasons.

I'd be happy to pay an honorarium, or make a donation, of USD$100-$200 for
the appropriate elisp code that I could include in the relevant file(s).
I'd want the elisp code to be open-sourced, and at least minimal
documentation, so that it could be made a candidate for possible inclusion
in a future org-mode release.

Here's an example of the desired org-mode code:


===BEGIN===


* Services

  :PROPERTIES:

  :CUSTOM_ID: SVC

  :CUSTOM_PREFIX: t

  :END:
#  NOTE THE :CUSTOM_PREFIX: property above === #


** Statements of Work

[properties and text omitted]


*** Written Statements of Work Required

[properties and text omitted]
# === AN ARBITRARY NUMBER OF SUBHEADING LEVELS BENEATH THE TOP
LEVEL = #


*** Changes Must Be in Writing
[properties and text omitted]



** Billing Rates

[properties and text omitted]


** IP Ownership

[properties and text omitted]


* General Provisions

  :PROPERTIES:

  :CUSTOM_ID: GP
  :CUSTOM_PREFIX: t

  :END:


** Amendments

[properties and text omitted]


** Notices

[properties and text omitted]

===END===


I'd like for the resulting HTML export to be something like the following:

SVC Services

#  NOTE THAT THERE'S NO HEADING /NUMBER/ FOR THE TOP-LEVEL HEADING,
JUST THE PREFIX == #


SVC-1 Statements of Work

[properties and text omitted]

#  PREFERABLY THE SEPARATOR IN "SVC-1" COULD BE CONFIGURED AS A
HYPHEN, A PERIOD, A COLON, A FORWARD SLASH, ETC. = #


SVC-1.1  Written Statements of Work Required

[properties and text omitted]

SVC-1.2  Changes Must Be in Writing

[properties and text omitted]


SVC-2 Billing Rates

[properties and text omitted]


SVC-3 IP Ownership

[properties and text omitted]


GP General Provisions


GP-1 Amendments

[properties and text omitted]


GP-2 Notices

[properties and text omitted]



I've played with doing this in CSS --- a suboptimal solution would be to:

   1. set the :UNNUMBERED: property to non-nil
   2. define separate CSS div classes for each top-level heading (e.g., SVC
   and GP in the examples above)
   3. for each top-level heading in question:
  1. use the :HTML_CONTAINER_CLASS: property to specify the div class
  for that top-level heading
  2. for each subheading level in that div class, use the
  psuedo-element ":before" to add the appropriate prefix and counter

Apart from being kludgy, doing it this way (in CSS) would eliminate
org-mode's ability to produce automatic cross-referencing during export.
Also, the heading numbers wouldn't transfer over when copying and pasting
from HTML to a Word document, which is an important user feature.

In case it matters, I run the 2016-07-25 release of org-mode on Emacs
25.1.50 (9.0) with the most recent update of Mac OS X El Capitan.  I know a
little about elisp and have cobbled together a few simple functions for my
own use, but I'm far from being even minimally competent at it.

Any ideas for an org-mode elisp solution?

​Thanks in advance,

--D. C.

D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
​
Skype: dctoedt
​

www.OnContracts.com/About <http://www.oncontracts.com/About>
​​


Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


Re: [O] Internal non-PROPERTY links don't export to HTML with the "a" IDs that were assigned

2016-03-28 Thread D. C. Toedt
> So what problems are you seeing (other than that the label looks funny)?

The problem is that the label can vary from export to export.  EXAMPLE:  I
added a <> target ID in the paragraph before the paragraph
containing <>; the result was that <> now
exports as http://www.CommonDraft.org/#orgtarget21; the link would no longer point to
where it was supposed to.

> CUSTOM_ID

That works for heading properties, but I'm not aware that CUSTOM_ID can be
used in the text internal to a heading-designated section.




>
>
>
>


[O] Internal non-PROPERTY links don't export to HTML with the "a" IDs that were assigned

2016-03-28 Thread D. C. Toedt
I'm using the latest update from the package updater, released 2016-03-28:
 Org-mode version 8.3.2 (release_8.3.2-164-g50a182).

I can best illustrate the problem with an example:

*Org source:  *

See also the [[IndemnNonAssign][Indemnity rights not
> ​​
> assignable]] provision.


*​Former exported HTML (correct):*


See also the http://www.commondraft.org/#IndemnNonAssign>
> demnNonAssign <http://www.commondraft.org/#IndemnNonAssign>">Indemnity rig
> ​​
> hts not assignable provision.

​​

*Current exported HTML (incorrect):*

​​
> See also the <
> ​​
> a href="#orgtarget21">Indemnity rights not assignable provision.

​​

​​
This causes problems, because "orgtarget21" won't necessarily be assigned
to the same point in the text, which in turn means that "jump cite" ​​links
to specific points internal to the document will break.​​
​​
​​I scanned through the documentation but didn't see anything indicating
​that there's a setting to use assigned names instead of "orgtargetNN"


​​

D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
​
Skype: dctoedt
​

www.OnContracts.com/About <http://www.oncontracts.com/About>
​​


Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


[O] TOC local for specified heading and its subheadings (in HTML export)?

2015-11-27 Thread D. C. Toedt
The #+TOC: headlines [n] local feature is really useful; I use it a lot.
How easy would it be to do a macro to generate a similar table of contents
for the subheadings of an arbitrary specified heading?  That would be an
alternative to transclusion <https://en.wikipedia.org/wiki/Transclusion>,
allowing re-use of text but with links instead of the actual text.  For UX
purposes this will sometimes be preferable to actual transclusion, e.g.,
with Angular.js.  I'm not even a cargo-cult programmer in elisp and
wouldn't have the level of skill to do this myself without spending a lot
of time.

EXAMPLE:  In the Common Draft contract form file
<http://www.CommonDraft.org>, I'd like to add a Model Confidentiality
Agreement, a Model Software Development Agreement, a Model Consulting
Services Agreement, etc.  Each of these model agreements would include
several TOC-style lists of clauses under various other headings, as shown
in the following hypothetical file excerpt:

* Model Confidentiality Agreement
  :PROPERTIES:
  :CUSTOM_ID: ConfAgrmt
  :END:

** Parties; Effective Date

This Agreement is entered into as of November 27, 2015, between ABC Ltd.
and XYZ Inc.

** Confidential Information

# = The next line is the desired feature: Generate a TOC list
(with links) of all subheadings in the specified heading
=
#+TOC: headlines 1 local ConfInfoClauses

** Notices

#+TOC: headlines 1 local NoticesClauses

* Signatures

AGREED:

ABC Ltd, by:

[Signature block]


AGREED:

XYZ Inc., by:

[Signature block]


* Confidential Information Clauses
  :PROPERTIES:
  :CUSTOM_ID: ConfInfoClauses
  :END:

** Confidential Information Definition
  :PROPERTIES:
  :CUSTOM_ID: ConfInfoDefn
  :END:

[text of clause]

** Confidentiality Obligation
  :PROPERTIES:
  :CUSTOM_ID: ConfInfoOblig
  :END:

[text of clause]


* Notices Clauses
  :PROPERTIES:
  :CUSTOM_ID: NoticesClauses
  :END:

​** Notices Must Be in Writing
  :PROPERTIES:
  :CUSTOM_ID: NoticesWriting
  :END:
​
​[text of clause]

** Notices by Email
  :PROPERTIES:
  :CUSTOM_ID: NoticesEmail
  :END:
​
​[text of clause]​

​I'd be happy to make a donation for this.

​


D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
Common Draft <http://www.CommonDraft.org> contract clauses & checklists,
annotated
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

d...@toedt.com@dctoedt <https://twitter.com/DCToedt>
www.OnContracts.com/About

Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


Re: [O] Exporter aborts upon encountering even one unresolvable link

2015-10-10 Thread D. C. Toedt
UPDATE:

> I haven't tried org-lint yet (
http://steve.planetbarr.com/posts/2015-08-11-org-lint.html).
> That requires building org from a separate branch in git.  That makes me
nervous --
> I'm a user, not a dev, and while I'm sort of familiar with git, it seems
like yet another layer of complexity.

1.  OK, I got org-mode version 8.3.2 up and running using git.

The org-lint feature works -- very nice.

> The old way, namely just marking the problem link in the output file and
continuing with the export,
> made it very easy to search for the problem in the output file. That
approach was simple and worked quite well.

I still think that, but at least I'm up and running again.

Thanks to all for putting up with my lack of expertise, and especially to
the org-mode creator(s) and maintainers for a very-useful tool.

2.  For background: I'm a lawyer and part-time law professor.  I've been
using org-mode for several years now in building http:/www.CommonDraft.org
-- a free (Creative Commons) library of clauses for tech- and commercial
contracts, extensively annotated with citations, commentary, and links to
further reading.  The long-term goal is to have a Common Draft reference
version of each substantive variation of each type of contract clause
that's typically seen in the wild. That will free up lawyers from always
having to draft detailed contract language, and from having to review other
people's detailed language --- instead, we can simply incorporate desired
Common-Draft clauses by reference. (It's analogous to a library of callable
functions in software development.)  That will save time for both the
contract drafter and for the other side's legal reviewer, which in turn
will help the parties get a workable contract to signature sooner, at lower
cost.

In pitching the Common Draft concept, my latest metaphor for non-techies is
this:  If you're ordering a meal in a Chinese-food restaurant, but you
don't want any monosodium glutamate (MSG) in your food, you're _not_ going
to hand your server a set of detailed recipes for the dishes you want and
ask that the kitchen staff use those recipes.  No, you're simply going to
order from the menu --- hot-and-sour soup, kung-pao chicken, or whatever
--- but you'll say to your server, "no MSG, please," as a desired
variation.  It's the same idea for the Common Draft project:  A contract
drafter can "order from the menu" and specify any desired variations. The
Common Draft project is starting to get some attention in the
contract-management community; the International Association for Contract
and Commercial Management (http://www.IACCM.com), which has around 35,000
members worldwide, is supporting it.





D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
Common Draft <http://www.CommonDraft.org> toolkit for contract drafters
O: +1 (713) 364-6545
C: +1 (713) 516-8968
​​

d...@toedt.com
www.OnContracts.com/About

Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.



On Fri, Oct 9, 2015 at 5:28 PM, D. C. Toedt <d...@toedt.com> wrote:

> >> Look at publishing instead of exporting to html which works with missing
> links.
> ​​
>
> Apparently it doesn't.
> I'm still having the same problem of throwing a fatal error --- even when
> publishing, not exporting --- when encountering a missing (unresolvable)
> link.  This was after doing a clean install of org-mode 8.3.2 (20151005,
> using the emacs package manager) on top of a clean install of the latest
> stable version of emacs (24.5) from EmacsForMacOSX. (I'm running the latest
> version of Mac OS X Yosemite; haven't gotten around to El Capitan.)  I then
> set up publishing the way Rainer suggested in his email.  Well, publishing
> likewise throws an error when it encounters a missing link target, just as
> does exporting.
>
> > You can use org-lint for this.
>
> I haven't tried org-lint yet (
> http://steve.planetbarr.com/posts/2015-08-11-org-lint.html).  That
> requires building org from a separate branch in git.  That makes me nervous
> -- I'm a user, not a dev, and while I'm sort of familiar with git, it seems
> like yet another layer of complexity.
>
> I don't mean to be a nag, but I genuinely don't understand why org-mode's
> former way of dealing with unresolvable links during export was disabled.
> The old way, namely just marking the problem link in the output file and
> continuing with the export, made it very easy to search for the problem in
> the output file. That approach was simple and worked quite well.  It also
> allowed exporting a single .org file, instead of jumping through the hoops
> of publishing a project.  The new way seems like a giant step backwards;
> it's likely to be a signifi

Re: [O] Exporter aborts upon encountering even one unresolvable link

2015-10-09 Thread D. C. Toedt
>> Look at publishing instead of exporting to html which works with missing
links.
​​

Apparently it doesn't.
I'm still having the same problem of throwing a fatal error --- even when
publishing, not exporting --- when encountering a missing (unresolvable)
link.  This was after doing a clean install of org-mode 8.3.2 (20151005,
using the emacs package manager) on top of a clean install of the latest
stable version of emacs (24.5) from EmacsForMacOSX. (I'm running the latest
version of Mac OS X Yosemite; haven't gotten around to El Capitan.)  I then
set up publishing the way Rainer suggested in his email.  Well, publishing
likewise throws an error when it encounters a missing link target, just as
does exporting.

> You can use org-lint for this.

I haven't tried org-lint yet (
http://steve.planetbarr.com/posts/2015-08-11-org-lint.html).  That requires
building org from a separate branch in git.  That makes me nervous -- I'm a
user, not a dev, and while I'm sort of familiar with git, it seems like yet
another layer of complexity.

I don't mean to be a nag, but I genuinely don't understand why org-mode's
former way of dealing with unresolvable links during export was disabled.
The old way, namely just marking the problem link in the output file and
continuing with the export, made it very easy to search for the problem in
the output file. That approach was simple and worked quite well.  It also
allowed exporting a single .org file, instead of jumping through the hoops
of publishing a project.  The new way seems like a giant step backwards;
it's likely to be a significant barrier to entry for non-expert users.

Can the old way of dealing with unresolvable links be restored, at least as
an option?



D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
Common Draft <http://www.CommonDraft.org> toolkit for contract drafters
O: +1 (713) 364-6545
C: +1 (713) 516-8968
​​

d...@toedt.com
www.OnContracts.com/About

Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


Re: [O] Exporter aborts upon encountering even one unresolvable link

2015-10-07 Thread D. C. Toedt
To the org-mode maintainers (all praise and thanks to them, incidentally):
 Is there any chance that this can be made into a per-file configuration
#+OPTION?  No doubt the publishing approach suggested by Rainer (thanks
also to him for suggesting it) would work, but it would take some effort to
get it set up; I've looked into publishing on previous occasions and
concluded it was easier just to do a simple HTML export.  Other things
being equal, #+OPTION options would be easier for non-expert users such as
me to work with, than fiddling with the .emacs file.

D. C. Toedt III
*(My last name is pronounced "Tate")*
Attorney & arbitrator -- tech contracts & IP
Common Draft <http://www.CommonDraft.org> contracts project
O: +1 (713) 364-6545
C: +1 (713) 516-8968
​​

d...@toedt.com
www.OnContracts.com/About

Unless expressly stated otherwise,
this message is not intended to serve
as assent to an agreement or other document,
even if attached to this message.


On Fri, Sep 25, 2015 at 12:04 AM, Rainer M Krug <rai...@krugs.de> wrote:

[portions omitted]​​



> ​​
> Look at publishing instead of exporting to html which works with
> ​​
> missing links.
> ​​
>
> ​​
> I have the following in my emacs.org which makes it possible to publish
> all org files to html in the folder ./pubHTML/ which is equivalent to
> exporting.
>
> #+begin_src emacs-lisp
> (setq org-publish-project-alist
>   '(
> ("local"
>  :base-directory "./"
>  :base-extension "org"
>  :publishing-directory "./pubHTML/"
>  :recursive t
>  :publishing-function org-html-publish-to-html
>  :headline-levels 6
>  :auto-preamble t)
> ))
> #+end_src
>
>
>


[O] Exporter aborts upon encountering even one unresolvable link

2015-09-24 Thread D. C. Toedt
I just updated to 8.3.1 from 8.3beta (from git).  That appears to have been
a terrible mistake on my part.

>From this thread
<https://lists.gnu.org/archive/html/emacs-orgmode/2015-09/msg00040.html> I
see that the exporter now throws an error and aborts when it encounters an
unresolvable link.  That makes things really, REALLY difficult.  It means I
can't get a complete, working export to HTML (in my case) until all link
problems are fixed in my 22KLOC .org file (which I use to generate
http://www.CommonDraft.org/index.html
<http://www.commondraft.org/index.html>).  That seems EXTREMELY suboptimal.
(I'm trying to be tactful here.)

Worse, the exporter doesn't even generate a list of unresolvable links
before aborting.  That means the only way that I can find and fix busted
links (so far as I know) is to do an export --- which takes several minutes
given the large file  --- and have the export abort on a single link. Then
I fix that one link, export again, and have it abort again. Repeat.
Aaaargg.

I started looking at the hooks, as suggested in a message in the previous
thread, but I'm not nearly skilled enough in elisp to be able to do
anything useful.

Any suggestions?


*D. C. Toedt III  **(My last name is pronounced "Tate"; I go by "D. C.,"
which stands for Dell Charles**) *
Attorney & neutral arbitrator -- tech contracts & IP  |  Adjunct professor,
University of Houston Law Center
​Author, ​​​Common Draft <http://www.commondraft.org/> desk book of
contract clauses & research notes   |  LinkedIn: dctoedt
<http://www.linkedin.com/in/dctoedt>   |   Calendar
<https://www.google.com/calendar/embed?src=dc.to...@toedt.com=WEEK>
(redacted)
E: d...@toedt.comO: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as assent to an agreement or other document, whether or not
attached to this message.


Re: [O] Exporter aborts upon encountering even one unresolvable link

2015-09-24 Thread D. C. Toedt
P.S.:   Thank heavens for Time Machine.




On Thu, Sep 24, 2015 at 9:50 PM, D. C. Toedt <d...@toedt.com> wrote:

> I just updated to 8.3.1 from 8.3beta (from git).  That appears to have
> been a terrible mistake on my part.
>
> From this thread
> <https://lists.gnu.org/archive/html/emacs-orgmode/2015-09/msg00040.html>
> I see that the exporter now throws an error and aborts when it encounters
> an unresolvable link.  That makes things really, REALLY difficult.  It
> means I can't get a complete, working export to HTML (in my case) until all
> link problems are fixed in my 22KLOC .org file (which I use to generate
> http://www.CommonDraft.org/index.html
> <http://www.commondraft.org/index.html>).  That seems EXTREMELY
> suboptimal. (I'm trying to be tactful here.)
>
> Worse, the exporter doesn't even generate a list of unresolvable links
> before aborting.  That means the only way that I can find and fix busted
> links (so far as I know) is to do an export --- which takes several minutes
> given the large file  --- and have the export abort on a single link.
> Then I fix that one link, export again, and have it abort again. Repeat.
> Aaaargg.
>
> I started looking at the hooks, as suggested in a message in the previous
> thread, but I'm not nearly skilled enough in elisp to be able to do
> anything useful.
>
> Any suggestions?
>
>
> *D. C. Toedt III  **(My last name is pronounced "Tate"; I go by "D. C.,"
> which stands for Dell Charles**) *
> Attorney & neutral arbitrator -- tech contracts & IP  |  Adjunct
> professor, University of Houston Law Center
> ​Author, ​​​Common Draft <http://www.commondraft.org/> desk book of
> contract clauses & research notes   |  LinkedIn: dctoedt
> <http://www.linkedin.com/in/dctoedt>   |   Calendar
> <https://www.google.com/calendar/embed?src=dc.to...@toedt.com=WEEK>
> (redacted)
> E: d...@toedt.comO: +1 (713) 364-6545C: +1 (713) 516-8968
> ​​
>
> ​
> Houston, Texas (Central time zone)
>
> Unless expressly stated otherwise, this message is not intended
> to serve as assent to an agreement or other document, whether or not
> attached to this message.
>
>
>


Re: [O] Table of contents for just one section?

2015-03-16 Thread D. C. Toedt
I see this feature is now in the beta of Org-Mode 8.3.  Excellent!   I'm
doing several things with it in the forthcoming release of the Common Draft
contract clause library (linked below).

I also see that there now seems to be some reluctance by the maintainers to
accept donations. (See http://comments.gmane.org/gmane.emacs.orgmode/83318).
Has that been resolved?  I'd like to do a donation.




*D. C. Toedt III  **(I go by D. C., which stands for Dell Charles; my** last
name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft http://www.commondraft.org/ contract clauses and
templates, with research notes
Lecturer, University of Houston Law Center
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.



On Sun, Oct 26, 2014 at 6:03 AM, D. C. Toedt d...@toedt.com wrote:

 Many thanks!  I'll wait till this shows up in the package updater (I've
 toyed with Git only enough to be dangerous) but am eagerly looking forward
 to trying it.



 D. C. (Dell Charles) Toedt III  *(my** last name is pronounced Tate) *
 Attorney and neutral arbitrator -- tech contracts and intellectual property
 Lecturer, University of Houston Law Center
 ​Editor, ​​​Common Draft http://www.commondraft.org/ contract form file
 d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
   Calendar
 https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)
 O: +1 (713) 364-6545C: +1 (713) 516-8968
 ​​

 ​
 Houston, Texas (Central time zone)

 Unless expressly stated otherwise, this message is not intended
 to serve as an electronic signature nor as assent to an agreement.



 On Sun, Oct 26, 2014 at 3:15 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
 wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  The local keyword would be great.

 The following patch implements local tocs for ascii, html and odt export
 back-ends. I skipped latex because using minitoc looks too tricky to
 automate.

 Feedback welcome.


 Regards,

 --
 Nicolas Goaziou





Re: [O] Table of contents for just one section?

2014-10-26 Thread D. C. Toedt
Many thanks!  I'll wait till this shows up in the package updater (I've
toyed with Git only enough to be dangerous) but am eagerly looking forward
to trying it.



D. C. (Dell Charles) Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
Lecturer, University of Houston Law Center
​Editor, ​​​Common Draft http://www.commondraft.org/ contract form file
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.



On Sun, Oct 26, 2014 at 3:15 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  The local keyword would be great.

 The following patch implements local tocs for ascii, html and odt export
 back-ends. I skipped latex because using minitoc looks too tricky to
 automate.

 Feedback welcome.


 Regards,

 --
 Nicolas Goaziou



Re: [O] Table of contents for just one section?

2014-10-20 Thread D. C. Toedt
The local keyword would be great.

Right now I'm interested only in HTML export -- I can use Pandoc to convert
to anything else.

Thanks!



D. C. (Dell Charles) Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
Lecturer, University of Houston Law Center
​Editor, ​​​Common Draft http://www.commondraft.org/ project:  A readable
library of best-practices contract clauses,
 with extensive citations and commentary, updated often.
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.



On Mon, Oct 20, 2014 at 8:41 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  I'd like to do sub-TOCs for individual sections and subsections.

 We could add a local keyword to TOC lines, e.g.,

   #+TOC: headlines 1 local

 would mean only top level children in current headline.

 This feature is trivial to add to ox-ascii, probably easy for ox-html or
 ox-odt, assuming someone can provide the expected code.

 Implementing it in ox-latex probably boils down to requiring another
 package (minitoc?).

 WDYT?


 Regards,

 --
 Nicolas Goaziou



[O] Table of contents for just one section?

2014-10-15 Thread D. C. Toedt
I'd like to do sub-TOCs for individual sections and subsections.

EXAMPLE

*#+TOC: headlines 1*

** Business operations*

{{{SUBTOC}}}  # Inserts just the level-2 headings for this level-1
section

*** Services*

{{{SUBTOC}}}  # Shows just the level-3 headings for this level-2
section

*** Statements of work

*** Changes to statements of work

*** No obligation to agree to statement of work

*** Sales of goods*

{{{SUBTOC}}}

etc.

Any suggestions?

Regards, and thanks in advance,

--D. C.

D. C. (Dell Charles) Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
Lecturer, University of Houston Law Center
​Editor, ​​​Common Draft http://www.commondraft.org/ project:  A readable
library of best-practices contract clauses,
 with extensive citations and commentary, updated often.
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.


[O] Get :PROPERTY: value from drawer in other heading during HTML export?

2014-09-12 Thread D. C. Toedt
When generating an HTML file from an org-mode document, I'd like to do a
GET operation to retrieve a property value from the drawer of an arbitrary
heading, using the CUSTOM_ID property to identify the heading.  From
Google-searching, I suspect that org-heading-components will be involved,
but I'm not proficient enough in elisp to be able to figure out how to use
it from the on-line examples I've found --- and I'm not proficient enough
in Emacs to use any built-in documentation about it (apropos doesn't
produce any results).

Here's an example, where GET-PROP is a macro I'd like to use:

==BEGIN==

#+MACRO: get-prop []

#+MACRO: get-title [omitted -- thanks to Nicolas Goaziou for the get-title
macro, at
https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00386.html]

* CLAUSES

** Affiliate status from voting control
  :PROPERTIES:
  :CUSTOM_ID: AffilDefn
  :CD-ID: AFFIL-VOTE
  :IMPORTANCE: Situational
  :PUSHBACK: Unlikely
  :END:

(a) One individual or organization (Person) is an {{{DEFN(Affiliate)}}}
of another Person if,  directly or indirectly via one or more
intermediaries, one of those Persons /controls/ (as defined in subdivision
(b) below), or is controlled by, or is under common control with, the other
Person.

(b) [other text omitted]


* CONTRACT TEMPLATES

** Nondisclosure Agreement

{{{GET-PROP(AffilDefn,CD-ID)}}}: {{{GET-TITLE(AffilDefn)}}} -- pushback
from the other side is {{{GET-PROP(AffilDefn,PUSHBACK)}}}.

# This should export to:
# AFFIL-VOTE: Affiliate status from voting control -- pushback from the
other side is: Unlikely.

==END==

Thanks in advance,

--D. C.

*D*ell *C*harles D. C. Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
Lecturer, University of Houston Law Center
​Editor, ​​​Common Draft http://www.commondraft.org/ project:  A readable
library of best-practices contract clauses,
 with extensive citations and commentary, updated often.
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.


Re: [O] Get :PROPERTY: value from drawer in other heading during HTML export?

2014-09-12 Thread D. C. Toedt
Beautiful -- thanks!

Is there any documentation I can read to get a sense of how things work?
 I've done a little bit of browsing inside org.el and its comments, but
that seems like it's not the most effective way to get up to speed.


Regards,

--D. C.

*D*ell *C*harles D. C. Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
Lecturer, University of Houston Law Center
​Editor, ​​​Common Draft http://www.commondraft.org/ project:  A readable
library of best-practices contract clauses,
 with extensive citations and commentary, updated often.
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.



On Fri, Sep 12, 2014 at 2:06 PM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  When generating an HTML file from an org-mode document, I'd like to do a
  GET operation to retrieve a property value from the drawer of an
 arbitrary
  heading, using the CUSTOM_ID property to identify the heading.  From
  Google-searching, I suspect that org-heading-components will be
 involved,
  but I'm not proficient enough in elisp to be able to figure out how to
 use
  it from the on-line examples I've found --- and I'm not proficient enough
  in Emacs to use any built-in documentation about it (apropos doesn't
  produce any results).
 

 [...]

  #+MACRO: get-title [omitted -- thanks to Nicolas Goaziou for the
 get-title
  macro, at
 
  https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00386.html]

 You can use the same macro, replacing

   (org-get-heading nil nil)

 with

   (org-entry-get (point) $2)

 IOW,

   #+MACRO: GET-PROP (eval (or (save-excursion (ignore-errors (let
 ((org-link-search-inhibit-query t)) (org-open-link-from-string [[#$1]])
 (org-entry-get (point) $2 UNKNOWN VALUE))


 Regards,

 --
 Nicolas Goaziou



[O] Get headline number w/o link?

2014-07-12 Thread D. C. Toedt
During HTML export, I'm trying to automatically get the headline number of
the then-current headline, WITHOUT a link, so I don't want to use [[$1]].
 EXAMPLE:

=== ORG MODE TEXT: ===

* Definitions {{{HL-NUM}}}

** Affiliate Definition {{{HL-NUM}}}

*[body text omitted]*

** Arbitration {{{HL-NUM}}}

*[body text omitted]*



=== DESIRED EXPORTED TEXT: ===

1. Affiliate Definition [1]

1.1  Affiliate Definition [1.1]

*[body text omitted]*

1.2  Arbitration [1.2]

*[body text omitted]*


Suggestions?  I've gone rummaging through org.el, ox.el, and the HTML
exporter.  I tried the following but it doesn't work:

#+MACRO: HL-NUM (eval (org-export-get-headline-number (org-get-heading nil
nil)) nil)

I'm a cargo-cult programmer at best and am just scratching the surface of
Lisp and emacs Lisp.

Thanks in advance.

Regards,

--D. C.

*D*ell *C*harles D. C. Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft http://www.commondraft.org/ project:  Model
contract term sheets  clauses, annotated
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.


Re: [O] Tables of contents for individual sections wanted -- will donate

2014-06-30 Thread D. C. Toedt
Thanks, Ian.  I've done things like that in the past, but it'd entail
maintaining the TOC by hand, which I was hoping to avoid.  True, I'd be
able to create the initial TOC using org-mode, followed by manually
inserting jQuery calls.  But I'd have to manually edit the TOC every time I
added a new chapter or section and every time I edited a heading title.






On Mon, Jun 30, 2014 at 1:40 PM, Ian Barton li...@wilkesley.net wrote:

 On 29/06/14 19:51, D. C. Toedt wrote:
  at http://www.CommonDraft.org, and plan to expand and maintain it.


 QUESTION:  I'm currently using a single, multi-level table of contents
 (TOC) at the beginning of the document.  That ends up being a lot to
 scroll through to get to the first chapter.  I'd like instead to have:

   * a one-level master TOC at the beginning of the document, listing

 and linking to just the articles (in contracts, articles are the
 same as chapters in books, that is, the top-level sections); and

   * at the beginning of each article, a TOC listing and linking to the
 subheadings within that article.


 Not an org-mode solution, but if your audience is consuming the content as
 a web page generated from org-mode, you can do most of this using jQuery.

 What I am suggesting is you make your TOC collapsible and clicking on a
 heading in the TOC expands the links to the sub headings underneath the
 heading. You can probably do nested collapsible headings so you can expand
 various level of subheadings like a concertina.

 I am definitely not a Javascript expert, but I have managed to use this
 technique on some of my documents.

 Ian.




Re: [O] Tables of contents for individual sections wanted -- will donate

2014-06-30 Thread D. C. Toedt
That would be very much of interest, Ian.  One potential issue, though:
 The table of contents generated by org-mode uses just one div/div,
with nested ulli elements.

I spent a few hours tinkering with variations on the jQuery approach at
http://www.sitepoint.com/forums/showthread.php?822342-JavaScript-list-of-links-with-sub-lists-hide-and-show,
with code at http://jsfiddle.net/GeekyJohn/9kaQQ/.  It initially
looked promising, but I haven't been able to make it reliably play well
with having links in the TOC headings.  Of course, when it comes to jQuery
I'm not much better than a cargo-cult programmer.

Thanks,

--D. C.


[O] Tables of contents for individual sections wanted -- will donate

2014-06-29 Thread D. C. Toedt
Hi all --

BACKGROUND:  I've been using org-mode to develop the *Common Draft*
annotated collection of business contract clauses, in part for the law
school course in contract drafting that I teach to third-year law students.
 I've been posting the collection as a Creative Commons document at
http://www.CommonDraft.org, and plan to expand and maintain it.

QUESTION:  I'm currently using a single, multi-level table of contents
(TOC) at the beginning of the document.  That ends up being a lot to scroll
through to get to the first chapter.  I'd like instead to have:

   - a one-level master TOC at the beginning of the document, listing and
   linking to just the articles (in contracts, articles are the same as
   chapters in books, that is, the top-level sections); and


   - at the beginning of each article, a TOC listing and linking to the
   subheadings within that article.

EXAMPLE of the desired capability:

[book title:] COMMON DRAFT:  Business Contract Clauses, Annotated and
Explained


SUMMARY OF CONTENTS


1.  Definitions  Usages


2.  Arbitration


3.  Assignment of Agreement


[etc.]


ART. 1.  DEFINITIONS  USAGES


TABLE OF CONTENTS

1.1  Affiliate Status


1.2  Agreement Definition


[etc.]


1.1  Affiliate Status

Two entities are affiliates if one of them controls, is controlled by, or
is under common control of the other, where control refers 


1.2  Agreement Definition

The term this Agreement refers to this signed document as well as its
exhibits, appendixes, annexes, .


​Suggestions?  ​If it can't currently be done in org-mode but can be
implemented, I'd donate US$100.00 to the org-mode support fund if someone
were to come up with and publish a working solution.  As for doing it
myself in e-lisp, I'm just scratching the surface of e-lisp, so it's not
something I could undertake at this juncture.


Regards,

--D. C.

*D*ell *C*harles D. C. Toedt III  *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property
​Editor, ​​​Common Draft http://www.commondraft.org/ project:  Model
contract term sheets  clauses, annotated
d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendar
https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
(redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968
​​

​
Houston, Texas (Central time zone)

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.


Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread D. C. Toedt
 Why don't you use [[#IntroTechContracts][Introduction to Technology
Contracts]]
 as a link?

I routinely tweak the text of the target headings as I edit the document.
 For example, the section heading Introduction to Technology Contracts
might become, say, Introduction:  Why Technology Contracts are Fun.

I don't want to have to manually revise the link text for the many internal
cross-reference links that exist in the document.  I'd really like to have
a way for a link to automatically retrieve the heading text during HTML
export.





On Sun, Feb 9, 2014 at 2:19 AM, Bastien b...@gnu.org wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  (Org-mode maintainer [Bastien, still?], can you please let me know if
  / when this gets implemented in an official release.)

 I'm not Org's maintainer anymore, I'm just /de facto/ taking decisions
 in accordance with the other core maintainers, our level of trust lets
 us move forward happily.

 To come back to you original question:

 ,
 | #+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t
 |
 | * Introduction to Technology Contracts
 |   :PROPERTIES:
 |   :CUSTOM_ID: IntroTechContracts
 |   :END:
 |
 | Lorem ipsum etc. etc.
 |
 | * Dangerous Clauses
 |   :PROPERTIES:
 |   :CUSTOM_ID: DangerousClauses
 |   :END:
 |
 | Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].
 `

 Why don't you use

 [[#IntroTechContracts][Introduction to Technology Contracts]]

 as a link?  It is the link stored by org-store-link, and later
 inserted by org-insert-link, and AFAICS it is correctly exported.

 But it's true there are a few things we can make more consistent
 in this area though, so thanks for bringing this up.

 Best,

 --
  Bastien



Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread D. C. Toedt
Excellent -- that seems to export just fine.

Interestingly, the export now generates the message, Position saved to
mark ring, go back with C-c  .  I presume that comes from the
((org-link-search-inhibit-query t)) argument in the let function.  It doesn't
seem to harm the export results.

One of these years I'll have to start poking around the Emacs-Lisp code to
try to puzzle out the workings of the functions being called, especially
org-get-heading
--- is there a comparable one (or arguments) to get the section number of a
heading?

Many thanks, Nicolas.



On Sun, Feb 9, 2014 at 2:29 AM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 D. C. Toedt d...@toedt.com writes:

  I found a problem when trying this on a bigger file (my book file):  If
 $1
  (actually, #$1) is for a link target that doesn't exist, then org-mode
 goes
  into its No match - create this as a new heading? (y or n) routine.
 That
  causes the rest of the export to fail.  It'd be better if get-title could
  do the same thing org-mode does natively, that is, including the text of
 $1
  as italics to indicate a non-existent link.
 
  Example file below:
 
 
  #+MACRO: get-title (eval (save-excursion (org-open-link-from-string
  [[#$1]]) (org-get-heading nil nil)))
  #+MACRO: SECREF [[#$1][{{{get-title($1)}}}]]
  #+OPTIONS: H:7 toc:nil num:1 email:t author:t
 
  * Introduction to Technology Contracts
:PROPERTIES:
:CUSTOM_ID: IntroTechContracts
:END:
 
  Lorem ipsum etc. etc.
 
  * Dangerous Clauses
:PROPERTIES:
:CUSTOM_ID: DangerousClauses
:END:
 
  Lorem ipsum etc. etc. -- see Section {{{SECREF(
  BogusLinkTarget
  )}}}

 The following should work.

   #+MACRO: get-title (eval (or (save-excursion (ignore-errors (let
 ((org-link-search-inhibit-query t)) (org-open-link-from-string [[#$1]])
 (org-get-heading nil nil /$1/))


 Regards,

 --
 Nicolas Goaziou



[O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-08 Thread D. C. Toedt
I'm using Org-mode version 8.2.5f with Gnu Emacs 24.3 on a Macbook Air with
Mavericks. I'm using it to build building an annotated collection of
contract clauses that I'm releasing under a Creative Commons license (see
http://www.CommonDraft.org), which I hope to monetize with a book on
contract drafting and negotiation.

I've done a fair amount of Google searching and also searching within this
list. If the following isn't already implemented, I'd pay USD$100 (via
PayPal) to have that done to whoever implements it in an official org-mode
release, plus another USD$100 donation to the org-mode maintainer.

QUESTION:  When org-mode headings are NUMBERED, and the file is exported to
HTML, is there any way to have org-mode include the TITLE, not just the
section number, of a cross-referenced section, along the lines of the LaTex
\nameref{} function?  Here's an example:

==BEGIN EXAMPLE==

#+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t

* Introduction to Technology Contracts
  :PROPERTIES:
  :CUSTOM_ID: IntroTechContracts
  :END:

Lorem ipsum etc. etc.

* Dangerous Clauses
  :PROPERTIES:
  :CUSTOM_ID: DangerousClauses
  :END:

Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].

==END EXAMPLE==

With numbering turned ON (#+OPTIONS: num:1), the link is exported to HTML
as:  Section a href=#IntroTechContracts1/a.

With numbering turned OFF (#+OPTIONS: num:nil), the link is exported to
HTML as:  Section a href=#IntroTechContractsIntroduction to Technology
Contracts/a.

Using a macro, I'd like to be able to AUTOMATICALLY do the latter --- that
is, have the link text be the heading title --- even with numbering turned
ON, so that a macro such as {{{SECREF(IntroTechContracts)}}} would render
in HTML as, let's say:   Section a href=#IntroTechContracts1/a,
entitled a href=#IntroTechContractsIntroduction to Technology
Contracts/a.

Is that currently doable?

*D. C. Toedt III * *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property

d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendarhttps://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968

Houston, Texas (Central time zone)
*Common Draft* http://www.commondraft.org annotated collection of
contract clauses

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.


Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-08 Thread D. C. Toedt
That works -- please email me privately with where to send the $100 via
PayPal.  Thanks!

(Org-mode maintainer [Bastien, still?], can you please let me know if /
when this gets implemented in an official release.)

Regards,

D. C.


*D. C. Toedt III * *(my** last name is pronounced Tate) *
Attorney and neutral arbitrator -- tech contracts and intellectual property

d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt
Calendarhttps://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968

Houston, Texas (Central time zone)
*Common Draft* http://www.commondraft.org annotated collection of
contract clauses

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.




On Sat, Feb 8, 2014 at 3:50 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  QUESTION:  When org-mode headings are NUMBERED, and the file is exported
 to
  HTML, is there any way to have org-mode include the TITLE, not just the
  section number, of a cross-referenced section, along the lines of the
 LaTex
  \nameref{} function?  Here's an example:
 
  ==BEGIN EXAMPLE==
 
  #+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t
 
  * Introduction to Technology Contracts
:PROPERTIES:
:CUSTOM_ID: IntroTechContracts
:END:
 
  Lorem ipsum etc. etc.
 
  * Dangerous Clauses
:PROPERTIES:
:CUSTOM_ID: DangerousClauses
:END:
 
  Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].
 
  ==END EXAMPLE==

 [...]

  Is that currently doable?

 I think so. Not trivial, but doable nonetheless.

 --8---cut here---start-8---
 #+MACRO: get-title (eval (save-excursion (org-open-link-from-string
 [[#$1]]) (org-get-heading nil nil)))
 #+MACRO: SECREF [[#$1][{{{get-title($1)}}}]]
 #+OPTIONS: H:7 toc:nil num:1 email:t author:t

 * Introduction to Technology Contracts
   :PROPERTIES:
   :CUSTOM_ID: IntroTechContracts
   :END:

 Lorem ipsum etc. etc.

 * Dangerous Clauses
   :PROPERTIES:
   :CUSTOM_ID: DangerousClauses
   :END:

 Lorem ipsum etc. etc. -- see Section {{{SECREF(IntroTechContracts)}}}
 --8---cut here---end---8---


 Regards,

 --
 Nicolas Goaziou



Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-08 Thread D. C. Toedt
I found a problem when trying this on a bigger file (my book file):  If $1
(actually, #$1) is for a link target that doesn't exist, then org-mode goes
into its No match - create this as a new heading? (y or n) routine. That
causes the rest of the export to fail.  It'd be better if get-title could
do the same thing org-mode does natively, that is, including the text of $1
as italics to indicate a non-existent link.

Example file below:

--8---cut here---start-8---

#+MACRO: get-title (eval (save-excursion (org-open-link-from-string
[[#$1]]) (org-get-heading nil nil)))
#+MACRO: SECREF [[#$1][{{{get-title($1)}}}]]
#+OPTIONS: H:7 toc:nil num:1 email:t author:t

* Introduction to Technology Contracts
  :PROPERTIES:
  :CUSTOM_ID: IntroTechContracts
  :END:

Lorem ipsum etc. etc.

* Dangerous Clauses
  :PROPERTIES:
  :CUSTOM_ID: DangerousClauses
  :END:

Lorem ipsum etc. etc. -- see Section {{{SECREF(
BogusLinkTarget
)}}}

--8---cut here---end---8---






[O] HTML export -- footnote section -- blank lines between footnote number and footnote text

2013-09-25 Thread D. C. Toedt
The footnote section in my HTML-export doc has the footnote number
separated from the footnote text by a blank line.  See
http://www.commondraft.org for the document.

Here's an example of what it looks like:


==BEGIN EXAMPLE==

[TEXT:]

The term Agreement-Related[9] refers to something – for example, a
dispute – that arises out of or relates to any of the following:
[remainder of section omitted]


[FOOTNOTES:]

[9]

Agreement-Related definition: This defined term is available for use
in, for example, attorneys' fees clauses, limitations of liability,
and the like.


==END EXAMPLE==


DETAILS:

Org version 8.2-4 (version 20130923) on Mac OS X Mountain Lion.

I upgraded to 8.2-4 by uninstalling and reinstalling Emacs after
encountering the ELPA bug (see
http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00176.html).

Relevant portion of my .emacs file:

 '(org-footnote-section nil)
 '(org-html-footnote-format [%s])

In the .org file itself:

#+STARTUP: nofnadjust indent showstars

QUESTION:

Is this a bug in the code, or a PICNIC problem
(http://en.wikipedia.org/wiki/User_error)?


--

D
. C. Toedt III  (my last name is pronounced Tate)
Attorney and arbitrator -- contracts and intellectual property

d...@toedt.com LinkedIn: dctoedtCalendar (redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968

Houston, Texas (Central time zone)
B
log: On Contracts.com
Book project: Common Draft encyclopedic dictionary of contract clauses

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.



Re: [O] HTML export -- footnote section -- blank lines between footnote number and footnote text

2013-09-25 Thread D. C. Toedt
I thought the footnotes would come out as follows, which I believe is
the way it did before I upgraded from org version 7.9.3 (I think it
was):

==BEGIN EXAMPLE==

[FOOTNOTES:]

[9]  Agreement-Related definition: This defined term is available for use
in, for example, attorneys' fees clauses, limitations of liability,
and the like.

==END EXAMPLE==

Here's the HTML generated by the exporter -- note that the footnote
number comes just before the p containing the text:

==BEGIN HTML==

div class=footdef[a id=fn.9 name=fn.9 class=footnum
href=#fnr.99/a] p class=footpara
bAgreement-Related definition:/b  This defined term is available
for use in, for example, attorneys' fees clauses, limitations of
liability, and the like.
/p/div

==END HTML==


--

D
. C. Toedt III  (my last name is pronounced Tate)
Attorney and arbitrator -- contracts and intellectual property

d...@toedt.com LinkedIn: dctoedtCalendar (redacted)
O: +1 (713) 364-6545C: +1 (713) 516-8968

Houston, Texas (Central time zone)
B
log: On Contracts.com
Book project: Common Draft encyclopedic dictionary of contract clauses

Unless expressly stated otherwise, this message is not intended
to serve as an electronic signature nor as assent to an agreement.




On Wed, Sep 25, 2013 at 7:35 AM, Bastien b...@gnu.org wrote:
 Hi,

 D. C. Toedt d...@toedt.com writes:

 The footnote section in my HTML-export doc has the footnote number
 separated from the footnote text by a blank line.  See
 http://www.commondraft.org for the document.

 What did you expect instead of this rendering?

 Did you try to adapt the CSS to get what you need?

 Thanks,

 --
  Bastien



[O] LaTex / PDF export doesn't hyphenate

2013-05-03 Thread D. C. Toedt
ENVIRONMENT:  Using Mac OS X Mountain Lion, Emacs 24.3, Org-mode 7.9.1.

PROBLEM:  When I export to LaTex, there's no hyphenation.

The problem exists even when I manually insert hyphenation points with \-
as shown below.

This problem exists when I process a book manuscript, and also when I
process a tiny file such as the following:

=begin quote=

#+LATEX_CLASS: book

** Affiliate

a) One individual or organization (Person) is an Affiliate of another
Per\-son if, either directly or indirectly via one or more intermediaries,
the first Person controls, or is controlled by, or is under common
con\-trol with, the other Person.

b) For this purpose, a\nbsp{}Person controls an organization if the Person
has voting control\nbsp{}--- via legal, beneficial or equitable ownership;
a\nbsp{}voting agreement; or otherwise\nbsp{}--- of securities of (or other
interest in) the organization having more than the Minimum Voting
Percentage (51% if the Agreement does not specify otherwise) of the
aggregate right to vote for the organization's board of directors or
comparable governing body.

c) A\nbsp{}Person also controls an organization if the Person has a
legally-enforceable right to select, or to prevent the selection, of
a\nbsp{}majority of the members of that board or other body.

=end quote=


INVESTIGATION:  I looked at the buffer *Org PDF LaTex Output*; the only
occurrences of any hyphen-related string are:

=begin quote=

Babel v3.8m and hyphenation patterns for english, dumylang,
nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus,
arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech,
danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi,
finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek,
greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada,
malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish,
italian,
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal,
nynorsk,
 polish, portuguese, romanian, romansh, russian, sanskrit, serbian,
serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian,
uppersorbian,
welsh, loaded.

=end quote=

EXPERIMENTS:  In the course of a lot of Google-searching, I've tried,
without success, the following:

#+LATEX_HEADER: \usepackage[english]{babel}


and

#+LATEX_HEADER: \usepackage[english=hyphenation]{babel}


All suggestions gratefully received.

*--*
*
*
*D. C. Toedt III * |  IP and contracts lawyer for tech companies   |
 Houston (Central time)
My last name is pronounced Tate   |   E: d...@toedt.com  |  O: +1 (713)
364-6545  |  C: +1 (713) 516-8968
*Blog:* On Contracts http://www.OnContracts.com  |  *LinkedIn:*
dctoedthttp://www.linkedin.com/in/dctoedt
|   
Calendarhttps://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)


[O] Emacs non-breaking space (Ctrl-x 8 space) doesn't export to HTML nbsp;

2012-11-13 Thread D. C. Toedt
Emacs allows you to enter a non-breaking space by typing Ctrl-x 8 space.
 That doesn't export to HTML as nbsp; though.  Is this expected behavior,
or a bug?

I've worked around it by globally-replacing non-breaking spaces with nbsp;
before exporting.

I'm using 7.9.2, the Nov. 5, 2012 build.


-- 
*D. C. Toedt III * |  Lawyer for tech companies  |  Houston, Texas (Central
time zone)|  Last name is pronounced Tate
d...@toedt.com  |  +1 (713) 364-6545   |  *Blog:* On
Contractshttp://www.OnContracts.com  |
 *LinkedIn:* dctoedt http://www.linkedin.com/in/dctoedt  |
Calendarhttps://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK
 (redacted)


[O] External link abbreviations don't work when contained in #+INCLUDE file

2012-04-30 Thread D. C. Toedt
External link abbreviations don't seem to work if they're in an #+INCLUDE
file -- they end up pointing to a (non-existent) anchor within the main
document.

The same external link abbreviations seem to work fine if they're in the
main file.

I'm using the latest build of GNU Emacs (24.1.50.1, April 23) and the
latest version of Org-mode 7.8.09 (built-in).

I've done a fair amount of Google searching for possible answers.

Any thoughts?  Here are excerpts from the relevant files.  The same
(presumably-)erroneous behavior exists even with stripped-down files
containing only the text below.

---

[In Chapter.org:]

 #+INCLUDE: Links.org


For an example of a confidentiality provision protecting each party's
information, see [[Disney-Pixar][Disney Pixar]] § 19(c)(1).



---

[In Links.org:]

 #+LINK: Disney-Pixar http://goo.gl/P3ak2


---

[In Chapter.html:]

 For an example of a confidentiality provision protecting each party's
information, see a href=#Disney-PixarDisney Pixar/a § 19(c)(1).





Thanks in advance,

D. C.

-- 
*D. C. Toedt III * |  Lawyer for tech companies  |  Houston, Texas (Central
time zone)
d...@toedt.com  |  O: +1 (713) 364-6545  C: +1 (713) 516-8968  |  Last name
pronounced: Tate
*LinkedIn:* dctoedt http://www.linkedin.com/in/dctoedt  |  *Blog: *
www.TechLawNotes.com http://www.techlawnotes.com  |  Twitter:
dctoedthttp://twitter.com/#!/dctoedt






On Mon, Apr 30, 2012 at 10:48, Bastien b...@gnu.org wrote:

 Greetings,

 thank you very much for the generous donation, it is really appreciated.

 Just out of curiosity, may I ask you how you use Org-mode?  More
 precisely, do you use it as a publishing tool or in your publishing
 toolchain?

 Thanks a lot in advance for your answers!

 Best regards,

 --
  Bastien