emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org mode export to Groff MM. Feature Freeze
       [not found] <mailman.99.1342454425.6558.emacs-orgmode@gnu.org>
@ 2012-07-16 16:38 ` Luis Anaya
  2012-07-16 17:06   ` Bastien
  2012-07-17  1:56   ` Avdi Grimm
  0 siblings, 2 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-16 16:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi:

I wanted to let you know that the development for the org-export
exporter to groff is in feature freeze. Everything that I thought up
that was useful has been coded. There might be other useful things to
do, but right now... my brain is mush.  

Efforts will be spent on clean-up, stability and documentation. 

Recent items added have been :
  * Fixed issue with planner output. 
  * Added optios for hyphenation and right justification control. 
  * Bug fixes

Regards

-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 16:38 ` Org mode export to Groff MM. Feature Freeze Luis Anaya
@ 2012-07-16 17:06   ` Bastien
  2012-07-16 17:20     ` Nicolas Goaziou
       [not found]     ` <BLU0-SMTP243814C6971CC983CEECAFBB7D40@phx.gbl>
  2012-07-17  1:56   ` Avdi Grimm
  1 sibling, 2 replies; 23+ messages in thread
From: Bastien @ 2012-07-16 17:06 UTC (permalink / raw)
  To: Luis Anaya; +Cc: emacs-orgmode

Hi Luis,

Luis Anaya <papoanaya@hotmail.com> writes:

> I wanted to let you know that the development for the org-export
> exporter to groff is in feature freeze. Everything that I thought up
> that was useful has been coded. There might be other useful things to
> do, but right now... my brain is mush.  

Wow, it's *great*.  Congrats for implementing this!

The examples PDF you gave looks nice.

> Efforts will be spent on clean-up, stability and documentation. 
>
> Recent items added have been :
>   * Fixed issue with planner output. 
>   * Added optios for hyphenation and right justification control. 
>   * Bug fixes

Thanks again for this.  I tested org-e-groff.el and first loaded your
version of org-export.el and org-element.el but maybe I should not have
loaded first, as I get this error:

  if: Cannot read file "/tmp/reshilite11886tjl"

I have full read/write over /tmp/.

Do you have this too?

If you need to backport some changes from your org-export/element I 
let you discuss this with Nicolas, of course.

Also, from the preambule of your files, I assume you already signed 
the FSF copyright papers.  Did you?  If not, are you willing to sign 
them?  It does not prevent us for including org-e-groff.el into
contrib/lisp/ but this will be mandatory if you want this feature 
to be in core Org.

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 17:06   ` Bastien
@ 2012-07-16 17:20     ` Nicolas Goaziou
  2012-07-16 18:35       ` Luis Anaya
       [not found]     ` <BLU0-SMTP243814C6971CC983CEECAFBB7D40@phx.gbl>
  1 sibling, 1 reply; 23+ messages in thread
From: Nicolas Goaziou @ 2012-07-16 17:20 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Luis Anaya

Hello,

Bastien <bzg@gnu.org> writes:

> If you need to backport some changes from your org-export/element I 
> let you discuss this with Nicolas, of course.

AFAICT, these are just older versions of org-export.el and
org-element.el. There are no new features added.

> Also, from the preambule of your files, I assume you already signed 
> the FSF copyright papers.  Did you?  If not, are you willing to sign 
> them?  It does not prevent us for including org-e-groff.el into
> contrib/lisp/ but this will be mandatory if you want this feature 
> to be in core Org.

I think we can add the file to the contrib/lisp/ directory, if only to
ease migration to latest org-element.el and org-export.el.

It will also permit, if Luis Anaya agrees of course, to echo trivial
changes from org-export/org-element in that file.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 23+ messages in thread

* FW: Org mode export to Groff MM. Feature Freeze
       [not found]     ` <BLU0-SMTP243814C6971CC983CEECAFBB7D40@phx.gbl>
@ 2012-07-16 17:42       ` Luis Anaya
  2012-07-16 20:18         ` Bastien
  0 siblings, 1 reply; 23+ messages in thread
From: Luis Anaya @ 2012-07-16 17:42 UTC (permalink / raw)
  To: emacs-orgmode


I should've done a wide reply to the list. 

 > Wow, it's *great*. Congrats for implementing this!
 >

 >
 >> Efforts will be spent on clean-up, stability and documentation.
 >>
 >> Recent items added have been :
 >> * Fixed issue with planner output.
 >> * Added optios for hyphenation and right justification control.
 >> * Bug fixes
 >
 > Thanks again for this. I tested org-e-groff.el and first loaded your
 > version of org-export.el and org-element.el but maybe I should not have
 > loaded first, as I get this error:

 That's because you do not have source-highlight installed. It goes back
 to documentation :( , but I should turn its use off by default in the
 delivered source.

 Just assign to nil the org-e-groff-source-highlight variable and try
 again. It should default to courier.


> > Also, from the preambule of your files, I assume you already signed
> > the FSF copyright papers. Did you? If not, are you willing to sign
> > them? It does not prevent us for including org-e-groff.el into
> > contrib/lisp/ but this will be mandatory if you want this feature
> > to be in core Org.
>
 I have no problem signing those papers. I want this code to be under the same
 licensing terms to avoid any licensing discrepancies between
 components.


 Luis

 --
 Luis R. Anaya
 papo anaya aroba hot mail punto com
 "Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo
 		 	   		  

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 17:20     ` Nicolas Goaziou
@ 2012-07-16 18:35       ` Luis Anaya
  2012-07-16 20:36         ` Nicolas Goaziou
  0 siblings, 1 reply; 23+ messages in thread
From: Luis Anaya @ 2012-07-16 18:35 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bastien, emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> let you discuss this with Nicolas, of course.
>

> AFAICT, these are just older versions of org-export.el and
> org-element.el. There are no new features added.

Most likely that we missed commits between the latest one and the one
I pulled from git.  Do not update org-export.el with the one I used, 
use the one in git. if there are any groff related code, that's the only thing
that should be updated.  When I went back, I could not see any. I would
not go too crazy on that. What I could do is to pull a latest checkout
from git and run the code from an updated code base. 

> I think we can add the file to the contrib/lisp/ directory, if only to
> ease migration to latest org-element.el and org-export.el.

> It will also permit, if Luis Anaya agrees of course, to echo trivial
> changes from org-export/org-element in that file.

The only change I can see is the one to add the ATTR_GROFF string to get the
:attr_groff key in info.  I have no issues propagating changes, at  the
end, you're the boss :). What needs to be done, let's do it. I'm ok with
it. 

Luis

-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: FW: Org mode export to Groff MM. Feature Freeze
  2012-07-16 17:42       ` FW: " Luis Anaya
@ 2012-07-16 20:18         ` Bastien
  0 siblings, 0 replies; 23+ messages in thread
From: Bastien @ 2012-07-16 20:18 UTC (permalink / raw)
  To: Luis Anaya; +Cc: emacs-orgmode

Hi Luis,

Luis Anaya <papoanaya@hotmail.com> writes:

> That's because you do not have source-highlight installed. It goes back
> to documentation :( , but I should turn its use off by default in the
> delivered source.

Okay.

> Just assign to nil the org-e-groff-source-highlight variable and try
> again. It should default to courier.

Thanks -- I can export to groff and pdf flawlessly.

>> > Also, from the preambule of your files, I assume you already signed
>> > the FSF copyright papers. Did you? If not, are you willing to sign
>> > them? It does not prevent us for including org-e-groff.el into
>> > contrib/lisp/ but this will be mandatory if you want this feature
>> > to be in core Org.
>>
> I have no problem signing those papers. I want this code to be under the same
> licensing terms to avoid any licensing discrepancies between
> components.

Please fill in this form and send it to assign@gnu.org:

http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=request-assign-future.txt;hb=HEAD

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 18:35       ` Luis Anaya
@ 2012-07-16 20:36         ` Nicolas Goaziou
  2012-07-16 21:22           ` Luis Anaya
  2012-07-17  1:35           ` Luis Anaya
  0 siblings, 2 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2012-07-16 20:36 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Bastien, emacs-orgmode

Luis Anaya <papoanaya@hotmail.com> writes:

> The only change I can see is the one to add the ATTR_GROFF string to get the
> :attr_groff key in info.

This is already the case since a recent patch.  ATTR_SOMETHING appears
automatically as :attr_something in element/object properties.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 20:36         ` Nicolas Goaziou
@ 2012-07-16 21:22           ` Luis Anaya
  2012-07-17  1:35           ` Luis Anaya
  1 sibling, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-16 21:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bastien, emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Luis Anaya <papoanaya@hotmail.com> writes:
> This is already the case since a recent patch.  ATTR_SOMETHING appears
> automatically as :attr_something in element/object properties.

I remember you mentioned it but it seems that I pulled the git repo too
soon. What I'll do is to refresh my development repository from git and
run regression testing of the groff exporter. 


-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 20:36         ` Nicolas Goaziou
  2012-07-16 21:22           ` Luis Anaya
@ 2012-07-17  1:35           ` Luis Anaya
  2012-07-17  7:50             ` Nicolas Goaziou
  1 sibling, 1 reply; 23+ messages in thread
From: Luis Anaya @ 2012-07-17  1:35 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bastien, emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Luis Anaya <papoanaya@hotmail.com> writes:
>> The only change I can see is the one to add the ATTR_GROFF string to get the
>> :attr_groff key in info.
>
> This is already the case since a recent patch.  ATTR_SOMETHING appears
> automatically as :attr_something in element/object properties.

Nicolas:

I pulled the latest git code and ran my regression test suite (for lack
of a better phrase) to test the groff exporter. There were no unsolvable
issues, but you might want to know that I found:

   - No changes were needed to org-export.el or org-elements.el  All the
     tests were run with the code from git. These two files did not
     cause any problems during the test. Therefore, those can be left as
     they are.

   - The change with the largest imapct on my code had to do with 
     the BEGIN_GROFF/END_GROFF pairs in which now invokes the special 
     block function and process the enclosed text through the plain-text 
     function. Originally these were passed through without the
     invocation of the plain text function. 

     I had to remove all the text pre-processing being that it was causing
     problems in the execution of GROFF macros. I do not think that
     doing this will hurt (much) because of the GROFF  markup syntax.
     For instance:
     
     TeX/LaTeX looks like this:
        \begin{center} 
        Blah 
        \end 
     while GROFF looks like this. 
        .DS C
        Blah
        .DE

    French quotations are not supported now because of this change, quotes are
    significant in GROFF for many things and I cannot translate those
    because GROFF will fail with a syntax error. 

    - There were some other issues found, but those were my doing :). These
      were resolved and pushed into the repository. 

Luis
-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-16 16:38 ` Org mode export to Groff MM. Feature Freeze Luis Anaya
  2012-07-16 17:06   ` Bastien
@ 2012-07-17  1:56   ` Avdi Grimm
  2012-07-17  2:50     ` Luis Anaya
  2012-07-17  2:53     ` Luis Anaya
  1 sibling, 2 replies; 23+ messages in thread
From: Avdi Grimm @ 2012-07-17  1:56 UTC (permalink / raw)
  To: Luis Anaya; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

Does this mean that creating manpages from org source is now a possibility?

On Mon, Jul 16, 2012 at 12:38 PM, Luis Anaya <papoanaya@hotmail.com> wrote:

> Hi:
>
> I wanted to let you know that the development for the org-export
> exporter to groff is in feature freeze. Everything that I thought up
> that was useful has been coded. There might be other useful things to
> do, but right now... my brain is mush.
>
> Efforts will be spent on clean-up, stability and documentation.
>
> Recent items added have been :
>   * Fixed issue with planner output.
>   * Added optios for hyphenation and right justification control.
>   * Bug fixes
>
> Regards
>
> --
> Luis R. Anaya
> papo anaya aroba hot mail punto com
> "Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo
>
>

[-- Attachment #2: Type: text/html, Size: 1172 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17  1:56   ` Avdi Grimm
@ 2012-07-17  2:50     ` Luis Anaya
  2012-07-17 10:20       ` Nicolas Goaziou
  2012-07-17  2:53     ` Luis Anaya
  1 sibling, 1 reply; 23+ messages in thread
From: Luis Anaya @ 2012-07-17  2:50 UTC (permalink / raw)
  To: Avdi Grimm; +Cc: emacs-orgmode

Avdi Grimm <groups@inbox.avdi.org> writes:

> Does this mean that creating manpages from org source is now a
> possibility?

Hmm...

Not right now... berause of the different macro package that man pages uses
for rendering compared to the one used in Org which is based on the MM
package. 

However, one thing that got me thinking was to implement exporters for
other  macro packages, like MOM and MS being that they 
follow similar structure.  The reason why I think this is useful is
because each macro language is geared for a slightly different purpose.  

IMHO: 
  - MM is for business communications
  - MOM for literary writings 
  - MS for general typesetting. (Word grinder uses it for rendering )    
  - MAN well, for man pages :)

The MAN macro package uses different commands for typesetting 
even though is processed through GROFF. But many of the structure are 
shared among all macros package and there is always the option to use
straight GROFF commands.  Even though is an idea on how to use Org mode, 

I have never thought of using it for writing MAN pages. I'm
not sure how many people would; but the idea does 
not have merit and certainly deserves some thought.

But... before going all crazy, probably I want to make sure that the one
I wrote for MM works well before venturing into coding for other macro 
packages. It would make porting to those packages a lot easier.

Something else to consider, if you're inclined to. 

It might be easier to implement a typesetter for MAN pages in muse mode 
because it has a simpler rendering framework.  It may also be a more
appropriate platform considering that MAN pages do not have a lot of
formatting requirements, when they are compared to a document 
with multiple levels, lists, equations and graphics which is what you
find in papers, letters or memorandum. 


Luis


-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17  1:56   ` Avdi Grimm
  2012-07-17  2:50     ` Luis Anaya
@ 2012-07-17  2:53     ` Luis Anaya
  1 sibling, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-17  2:53 UTC (permalink / raw)
  To: Avdi Grimm; +Cc: emacs-orgmode

Avdi Grimm <groups@inbox.avdi.org> writes:

I should have said that the idea *does have* merit and deserves some
thought. Sorry for the mix up. :(

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17  1:35           ` Luis Anaya
@ 2012-07-17  7:50             ` Nicolas Goaziou
  2012-07-17  8:53               ` Luis Anaya
  0 siblings, 1 reply; 23+ messages in thread
From: Nicolas Goaziou @ 2012-07-17  7:50 UTC (permalink / raw)
  To: Luis Anaya; +Cc: Bastien, emacs-orgmode

Hello,

Luis Anaya <papoanaya@hotmail.com> writes:

>    - The change with the largest imapct on my code had to do with 
>      the BEGIN_GROFF/END_GROFF pairs in which now invokes the special 
>      block function and process the enclosed text through the plain-text 
>      function. Originally these were passed through without the
>      invocation of the plain text function. 
>
>      I had to remove all the text pre-processing being that it was causing
>      problems in the execution of GROFF macros. I do not think that
>      doing this will hurt (much) because of the GROFF  markup syntax.
>      For instance:
>      
>      TeX/LaTeX looks like this:
>         \begin{center} 
>         Blah 
>         \end 
>      while GROFF looks like this. 
>         .DS C
>         Blah
>         .DE
>
>     French quotations are not supported now because of this change, quotes are
>     significant in GROFF for many things and I cannot translate those
>     because GROFF will fail with a syntax error. 

You just have to put

  (add-to-list 'org-element-block-name-alist 
               '("GROFF" . org-element-export-block-parser))

in org-e-groff.el so BEGIN_GROFF/END_GROFF blocks are treated as export
blocks again. No need to remove anything in your text pre-processing
because of this.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17  7:50             ` Nicolas Goaziou
@ 2012-07-17  8:53               ` Luis Anaya
  0 siblings, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-17  8:53 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bastien, emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> You just have to put
>
>   (add-to-list 'org-element-block-name-alist 
>                '("GROFF" . org-element-export-block-parser))
>
> in org-e-groff.el so BEGIN_GROFF/END_GROFF blocks are treated as export
> blocks again. No need to remove anything in your text pre-processing
> because of this.

This looks vaguely familiar :( I think this was the change I made in
org-export.el. Let me add that on the org-e-groff.el code. 

Thanks for your help.

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17  2:50     ` Luis Anaya
@ 2012-07-17 10:20       ` Nicolas Goaziou
  2012-07-17 14:06         ` Luis Anaya
                           ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2012-07-17 10:20 UTC (permalink / raw)
  To: Luis Anaya; +Cc: emacs-orgmode

Hello,

Luis Anaya <papoanaya@hotmail.com> writes:

> It might be easier to implement a typesetter for MAN pages in muse mode 
> because it has a simpler rendering framework.  It may also be a more
> appropriate platform considering that MAN pages do not have a lot of
> formatting requirements, when they are compared to a document 
> with multiple levels, lists, equations and graphics which is what you
> find in papers, letters or memorandum.

An advantage of the new export engine is that a back-end can be as
simple as you want it to be.  Sure, e-latex, e-odt, ... try to be as
comprehensive as possible with regards to Org syntax, but it doesn't
mean that every back-end has to handle every syntactic element.

One can imagine specialized back-ends only rendering a limited set of
Org features. As long as the set is explicitly documented in the
back-end, there's nothing wrong with that.

Note that I do not comment the comparison with Muse mode rendering
framework, which I do not know.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17 10:20       ` Nicolas Goaziou
@ 2012-07-17 14:06         ` Luis Anaya
  2012-07-17 18:08         ` Luis Anaya
  2012-07-18  0:04         ` Luis Anaya
  2 siblings, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-17 14:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

Hi:

>
> An advantage of the new export engine is that a back-end can be as
> simple as you want it to be.  

This is correct; you bring a good point. 

> One can imagine specialized back-ends only rendering a limited set of
> Org features. As long as the set is explicitly documented in the
> back-end, there's nothing wrong with that.

Agreed.

But, there's more to the story. I started dabbling with muse
this morning at 4:00 AM (because that's the best time to play with
emacs, just after the ghosts go to bed :) ). I got a fairly modest
version running in muse that created a fairly believable man page.  

I realized some things during the experiment: 

1. Although the subset of MAN macros is small for the creation of man 
pages, there are things that can be done procedurally during export that
can enhance the look of the man page. The new Org backend makes this
task a lot easier because of its flexibility and the availability of all
data items through the "info" variable.   The POD to man page does that,
no reason why it cannot be done in Org. 

2. The ability to render source code, or the execution of embedded code,
would have a positive impact on the end result. 

I can work on a prototype on Org and see how it goes. 

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17 10:20       ` Nicolas Goaziou
  2012-07-17 14:06         ` Luis Anaya
@ 2012-07-17 18:08         ` Luis Anaya
  2012-07-18  0:04         ` Luis Anaya
  2 siblings, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-17 18:08 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> One can imagine specialized back-ends only rendering a limited set of
> Org features. As long as the set is explicitly documented in the
> back-end, there's nothing wrong with that.

Ok folks:

I created an exporter for man page based on the groff one. It probably
has more junk than my grandma's attic, and it was done more as a proof
than anything else. Let me know what you guys think?

Source: 
http://ppl.ug/IyI7M_Kt-3g/

Man Page:
http://ppl.ug/YW6zXUs14FI/

PDF Result of Man Page
http://ppl.ug/SlhZexxNHmA/

PDF Result with the MM macros (just for fun)
http://ppl.ug/_RBFEzrEgzU/

Luis


-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-17 10:20       ` Nicolas Goaziou
  2012-07-17 14:06         ` Luis Anaya
  2012-07-17 18:08         ` Luis Anaya
@ 2012-07-18  0:04         ` Luis Anaya
  2012-07-18  1:23           ` Suvayu Ali
  2012-07-19 15:33           ` Nicolas Goaziou
  2 siblings, 2 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-18  0:04 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

All right fine... I went all crazy :)

Centered text? 

Yes. Implemented centered block in man pages. This is probably one of
the reasons the Org exporter enables the creation of complex
typesetting. In this case, I'm using the .ce groff command to centralize
the text. .ce requires the number of lines to centralized, provided by
the content variable. It is not "dumb" markup translation. 

Tables?

Yes. Man pages are groff files at the end. It can process TBL and
EQN commands. You may need to configure man.conf to make sure that tbl 
and/or eqn is invoked. 

Multi levels? 

Yes, provided via .TP macros. The first two levels are using the
headline macros from man. The next levels are through .TP and
indentation.  

Bullet Lists?

Yes, provided via .IP and using the different markers. 

Alpha lists?

Are you kidding me?! NO! :) 

Ok, not yet. It should be possible to implement though. 


Links?

The new version of the man command allows for URL and for Email. 
But I'm sticking mostly with legacy implementation in which
they will be written out and that's it. For now... 

Want proof?
Org file
   http://ppl.ug/6h0UFKJfm1c/
Man page
   http://ppl.ug/G1D9Y4fIwXA/
PDF
   http://ppl.ug/1R5aCF_CmAE/


Regards

-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-18  0:04         ` Luis Anaya
@ 2012-07-18  1:23           ` Suvayu Ali
  2012-07-19 15:33           ` Nicolas Goaziou
  1 sibling, 0 replies; 23+ messages in thread
From: Suvayu Ali @ 2012-07-18  1:23 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Jul 17, 2012 at 08:04:03PM -0400, Luis Anaya wrote:
> 
> Man page
>    http://ppl.ug/G1D9Y4fIwXA/
> PDF
>    http://ppl.ug/1R5aCF_CmAE/
> 

Aboslutely amazing! Great job Luis. :)

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-18  0:04         ` Luis Anaya
  2012-07-18  1:23           ` Suvayu Ali
@ 2012-07-19 15:33           ` Nicolas Goaziou
  2012-07-19 19:09             ` Luis Anaya
                               ` (2 more replies)
  1 sibling, 3 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2012-07-19 15:33 UTC (permalink / raw)
  To: Luis Anaya; +Cc: emacs-orgmode

Hello,

It sure looks interesting.

Here are a few comment about org-e-man.el.

1. Please do not leave trailing parenthesis (i.e at line 228).

2. You can remove every `declare-function'. You only need to

    (require 'org-export)

   in the file header, actually.

3. You can remove `org-e-man-babel-language-alist' variable and
   `org-e-man--guess-babel-language' function since they are specific to
   the "babel" LaTeX package.

4. For the same reason, you can remove `org-e-man--guess-inputenc'
   ("inputenc" LaTeX package).

5. Do you really need something as complicated as `org-e-man-classes'?

   It is a chore to use in `e-latex' but is tolerated since it allows
   for much configurability, but in a man exporter, I doubt it is worth
   introducing it. Indeed, I don't think there are much packages and
   section configurations to play with.

6. You shouldn't ignore drawers. Simply return their contents with no
   additional syntax. I.e.

   (defun org-e-man-drawer (drawer contents info)
     "Blah..."
     contents)

   In that case, you can safely remove unused
   `org-e-man-format-drawer-function' variable.

7. Something is wrong in `org-e-man-entity'. There is no `:man' format
   for entities. You can choose among `:latex', `ascii', `:html',
   `:latin1' or `:utf-8'.

8. Since there is no image support in man, you can remove unused
   variables `org-e-man-image-default-option',
   `org-e-man-default-figure-position', `org-e-man-inline-image-rules'.

9. `org-e-man--make-option-string' looks unused too. You may remove it.

10. Line 1743: (if (not (null attr-item))...) => (if attr-item ...)

11. I think that you can hard-code text markup macros and remove
    `org-e-man-text-markup-alist'. It will simplify code in
    `org-e-man--text-markup'.

12. Optionally, `org-e-man-headline' can probably be simplified a lot
    too. I imagine that someone using the man exporter doesn't expect
    much configuration for headlines.

13. In `org-e-man-plain-list', it looks like you can simply return
    contents (as for drawers) and remove everything else. Same for
    special blocks. Just return contents.

    By the way (format "%s" contents) is exactly `contents' since this
    argument is always a string.

14. In general, try to remove as much unused stuff as possible.


Thank you for your work,


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-19 15:33           ` Nicolas Goaziou
@ 2012-07-19 19:09             ` Luis Anaya
  2012-07-20  0:07             ` Luis Anaya
  2012-07-20  1:46             ` Luis Anaya
  2 siblings, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-19 19:09 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> It sure looks interesting.

Well, I did it in the spur of the moment. What I'll do is to open a
ticket for each of the item to keep track of them. 


> Here are a few comment about org-e-man.el.
>
> 1. Please do not leave trailing parenthesis (i.e at line 228).

Well, I guess that paredit does not work as good as I though. I have to
check those over, thanks. 

>
> 2. You can remove every `declare-function'. You only need to
>
>     (require 'org-export)
>
>    in the file header, actually.
>
[chomp...]
>
> 5. Do you really need something as complicated as `org-e-man-classes'?

The only thing I can think of is to use to determine what man page
you're creating. But that can be done through the use of a list, or just
place the man number as a variable. 

I have to leave it for the MM one though, it'll be evident when I'm with my
branding exercise and show the results. 

> 14. In general, try to remove as much unused stuff as possible.

Yes, it's on the queue of things to do. Work is heating up, though. But
what'll do is keep track those in github so I can address those 
as I continue with development. (and in org as well :) )

Luis


-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-19 15:33           ` Nicolas Goaziou
  2012-07-19 19:09             ` Luis Anaya
@ 2012-07-20  0:07             ` Luis Anaya
  2012-07-20  1:46             ` Luis Anaya
  2 siblings, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-20  0:07 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:


> 1. Please do not leave trailing parenthesis (i.e at line 228).

Actually, it closes on line 306. I was surprised when you mentioned it
being that I use paredit mode to make sure that I do not leave trailing
parenthesis (because... I do leave them :) )

This defcustom will get simplified once we decide if we are using
classes or just coding them. I know that you coded classes because LaTeX
uses different names for each level according to the document. Groff
uses the same marking, with a level indicator. 

I'll figure out something...

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Org mode export to Groff MM. Feature Freeze
  2012-07-19 15:33           ` Nicolas Goaziou
  2012-07-19 19:09             ` Luis Anaya
  2012-07-20  0:07             ` Luis Anaya
@ 2012-07-20  1:46             ` Luis Anaya
  2 siblings, 0 replies; 23+ messages in thread
From: Luis Anaya @ 2012-07-20  1:46 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

Hi:

Nicolas, I finished the first pass for simplification for the
org-e-man.el. There is probably more that can be removed, but I'm
feeling very sleepy right now... 

In other news:

One thing I wanted to know if I could could replicate a document with
all the brandings that we use at work. I managed to get a reasonable 
fascimile within the constraints of Groff. 

I validated if there were any missing features that would have impede 
the creation of this branded document. There were some minor features 
that were added to match branding. 

Some points:

- Most of the eye candy is done in Groff while Org is used to drive
content.  I created a cover page that defines all the styles, including
a "Top of the Page" macro that is used to insert the header
banner. During the creation of the Groff file, an include statement is
added to read the data from this file. 

- I am using the "class" list to get the right memorandum type
and heading colorization.  However,  Considering Nicolas' comment on 
the org-e-man.el, I should look for a way to simplify this. Adding all 
those colors for the whole list is a chore. 

Source: 
  http://ppl.ug/fhASUoDSXmM/

PDF Output:
  http://ppl.ug/zfx_EqygAXk/

-- 
Luis Anaya
papo anaya aroba hot mail punto com
"Do not use 100 words if you can say it in 10" - Yamamoto Tsunetomo

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-07-20  1:47 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.99.1342454425.6558.emacs-orgmode@gnu.org>
2012-07-16 16:38 ` Org mode export to Groff MM. Feature Freeze Luis Anaya
2012-07-16 17:06   ` Bastien
2012-07-16 17:20     ` Nicolas Goaziou
2012-07-16 18:35       ` Luis Anaya
2012-07-16 20:36         ` Nicolas Goaziou
2012-07-16 21:22           ` Luis Anaya
2012-07-17  1:35           ` Luis Anaya
2012-07-17  7:50             ` Nicolas Goaziou
2012-07-17  8:53               ` Luis Anaya
     [not found]     ` <BLU0-SMTP243814C6971CC983CEECAFBB7D40@phx.gbl>
2012-07-16 17:42       ` FW: " Luis Anaya
2012-07-16 20:18         ` Bastien
2012-07-17  1:56   ` Avdi Grimm
2012-07-17  2:50     ` Luis Anaya
2012-07-17 10:20       ` Nicolas Goaziou
2012-07-17 14:06         ` Luis Anaya
2012-07-17 18:08         ` Luis Anaya
2012-07-18  0:04         ` Luis Anaya
2012-07-18  1:23           ` Suvayu Ali
2012-07-19 15:33           ` Nicolas Goaziou
2012-07-19 19:09             ` Luis Anaya
2012-07-20  0:07             ` Luis Anaya
2012-07-20  1:46             ` Luis Anaya
2012-07-17  2:53     ` Luis Anaya

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).