emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* exporting src as html
@ 2008-07-12 18:07 Richard G Riley
  2008-07-14 18:31 ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Richard G Riley @ 2008-07-12 18:07 UTC (permalink / raw)
  To: org-mode


is it possible to tell the exporter to wrap src code? e.g in this

,----
| #+HTML: <div id="Content">
| #+INCLUDE: "~/.emacs.d/init.el" src emacs-lisp
| [[../][Back]]
| #+HTML: </div>
`----

some lines in the htmlized source code extends out beyond the containing
div.

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

* Re: exporting src as html
  2008-07-12 18:07 exporting src as html Richard G Riley
@ 2008-07-14 18:31 ` Carsten Dominik
  2008-07-15  2:21   ` Richard G Riley
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2008-07-14 18:31 UTC (permalink / raw)
  To: Richard G Riley; +Cc: org-mode

How about adding

   .src { overflow:auto }

to the CSS style definitions?  Is that what you are looking for?  It  
seems to me that a scroll bar is better than wrapping, because source  
code is usually formatted the way it is for a reason.

- Carsten

On Jul 12, 2008, at 11:07 AM, Richard G Riley wrote:

>
> is it possible to tell the exporter to wrap src code? e.g in this
>
> ,----
> | #+HTML: <div id="Content">
> | #+INCLUDE: "~/.emacs.d/init.el" src emacs-lisp
> | [[../][Back]]
> | #+HTML: </div>
> `----
>
> some lines in the htmlized source code extends out beyond the  
> containing
> div.
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: exporting src as html
  2008-07-14 18:31 ` Carsten Dominik
@ 2008-07-15  2:21   ` Richard G Riley
  2008-07-16 17:42     ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Richard G Riley @ 2008-07-15  2:21 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode, Richard G Riley


Carsten Dominik <dominik@uva.nl> writes:

> How about adding
>
>   .src { overflow:auto }
>
> to the CSS style definitions?  Is that what you are looking for?  It
> seems to me that a scroll bar is better than wrapping, because source
> code is usually formatted the way it is for a reason.
>
> - Carsten

Yes, this is a good idea ( I didnt know of the overflow property to be
honest).

But I would still suggest one tiny amendment - the export could also wrap
source code in a src type specific div in addition to the general src
div. Hence we can easily add CSS information specific to the stated src
type in addition to the base src class.

e.g 

where I have in my org file:

#+INCLUDE: "~/.emacs.d/init.el" src emacs-lisp

the resulting html is

<div class="src">
<div class="src-emacs-lisp">
..
..

or something similar which someone more experienced with CSS can
recommend.

cheers,

r.

>
> On Jul 12, 2008, at 11:07 AM, Richard G Riley wrote:
>
>>
>> is it possible to tell the exporter to wrap src code? e.g in this
>>
>> ,----
>> | #+HTML: <div id="Content">
>> | #+INCLUDE: "~/.emacs.d/init.el" src emacs-lisp
>> | [[../][Back]]
>> | #+HTML: </div>
>> `----
>>
>> some lines in the htmlized source code extends out beyond the
>> containing
>> div.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: exporting src as html
  2008-07-15  2:21   ` Richard G Riley
@ 2008-07-16 17:42     ` Carsten Dominik
  2008-07-17 14:16       ` Jason F. McBrayer
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2008-07-16 17:42 UTC (permalink / raw)
  To: Richard G Riley; +Cc: org-mode

Hi,

do any of the HTML gurus on this list have an opinion on the  
additional div for specific
source examples?

Thanks

- Carsten

On Jul 14, 2008, at 7:21 PM, Richard G Riley wrote:

>
> Carsten Dominik <dominik@uva.nl> writes:
>
>> How about adding
>>
>>  .src { overflow:auto }
>>
>> to the CSS style definitions?  Is that what you are looking for?  It
>> seems to me that a scroll bar is better than wrapping, because source
>> code is usually formatted the way it is for a reason.
>>
>> - Carsten
>
> Yes, this is a good idea ( I didnt know of the overflow property to be
> honest).
>
> But I would still suggest one tiny amendment - the export could also  
> wrap
> source code in a src type specific div in addition to the general src
> div. Hence we can easily add CSS information specific to the stated  
> src
> type in addition to the base src class.
>
> e.g
>
> where I have in my org file:
>
> #+INCLUDE: "~/.emacs.d/init.el" src emacs-lisp
>
> the resulting html is
>
> <div class="src">
> <div class="src-emacs-lisp">
> ..
> ..
>
> or something similar which someone more experienced with CSS can
> recommend.
>
> cheers,
>
> r.
>
>>
>> On Jul 12, 2008, at 11:07 AM, Richard G Riley wrote:
>>
>>>
>>> is it possible to tell the exporter to wrap src code? e.g in this
>>>
>>> ,----
>>> | #+HTML: <div id="Content">
>>> | #+INCLUDE: "~/.emacs.d/init.el" src emacs-lisp
>>> | [[../][Back]]
>>> | #+HTML: </div>
>>> `----
>>>
>>> some lines in the htmlized source code extends out beyond the
>>> containing
>>> div.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: exporting src as html
  2008-07-16 17:42     ` Carsten Dominik
@ 2008-07-17 14:16       ` Jason F. McBrayer
  2008-07-17 14:24         ` Richard G Riley
  0 siblings, 1 reply; 7+ messages in thread
From: Jason F. McBrayer @ 2008-07-17 14:16 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode

Carsten Dominik <dominik@uva.nl> writes:

> Hi,
>
> do any of the HTML gurus on this list have an opinion on the
> additional div for specific source examples?
>

Instead of doing something like this:
<div class="src">
  <div class="src-emacs-lisp">
    (psychoanalyze-pinhead)
  </div>
</div>

you should do something like this:

<div class="src src-emacs-lisp">
  (psychoanalyze-pinhead)
</div>

Both the src and src-emacs-lisp classes will get applied to that div.

-- 
+-----------------------------------------------------------+
| Jason F. McBrayer                    jmcbray@carcosa.net  |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors.  --- The Dhammapada    |

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

* Re: exporting src as html
  2008-07-17 14:16       ` Jason F. McBrayer
@ 2008-07-17 14:24         ` Richard G Riley
  2008-07-17 16:29           ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Richard G Riley @ 2008-07-17 14:24 UTC (permalink / raw)
  To: Jason F. McBrayer; +Cc: Carsten Dominik, org-mode


jmcbray@carcosa.net (Jason F. McBrayer) writes:

> Carsten Dominik <dominik@uva.nl> writes:
>
>> Hi,
>>
>> do any of the HTML gurus on this list have an opinion on the
>> additional div for specific source examples?
>>
>
> Instead of doing something like this:
> <div class="src">
>   <div class="src-emacs-lisp">
>     (psychoanalyze-pinhead)
>   </div>
> </div>
>
> you should do something like this:
>
> <div class="src src-emacs-lisp">
>   (psychoanalyze-pinhead)
> </div>
>
> Both the src and src-emacs-lisp classes will get applied to that div.

Yes, but end result the same. I think it's a nice addition to be able to
customise different src types ones self.

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

* Re: exporting src as html
  2008-07-17 14:24         ` Richard G Riley
@ 2008-07-17 16:29           ` Carsten Dominik
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2008-07-17 16:29 UTC (permalink / raw)
  To: Richard G Riley; +Cc: org-mode


On Jul 17, 2008, at 7:24 AM, Richard G Riley wrote:

>
> jmcbray@carcosa.net (Jason F. McBrayer) writes:
>
>> Carsten Dominik <dominik@uva.nl> writes:
>>
>>> Hi,
>>>
>>> do any of the HTML gurus on this list have an opinion on the
>>> additional div for specific source examples?
>>>
>>
>> Instead of doing something like this:
>> <div class="src">
>>  <div class="src-emacs-lisp">
>>    (psychoanalyze-pinhead)
>>  </div>
>> </div>
>>
>> you should do something like this:
>>
>> <div class="src src-emacs-lisp">
>>  (psychoanalyze-pinhead)
>> </div>
>>
>> Both the src and src-emacs-lisp classes will get applied to that div.
>
> Yes, but end result the same. I think it's a nice addition to be  
> able to
> customise different src types ones self.

OK, you got it.  src-emacs-lisp for emacs list and accordingly for  
other modes.  BEGIN_EXAMPLE get the "example" class.

- Carsten

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

end of thread, other threads:[~2008-07-17 16:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-12 18:07 exporting src as html Richard G Riley
2008-07-14 18:31 ` Carsten Dominik
2008-07-15  2:21   ` Richard G Riley
2008-07-16 17:42     ` Carsten Dominik
2008-07-17 14:16       ` Jason F. McBrayer
2008-07-17 14:24         ` Richard G Riley
2008-07-17 16:29           ` Carsten Dominik

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).