access to :style-sheet from <lisp> tag

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

access to :style-sheet from <lisp> tag

Sebastian P.Luque
Hi,

If we have a style defined:

(muse-derive-style "my-xhtml" "xhtml"
                   :style-sheet "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\"
                                href=\"include/style.css\" />")

and we want to write a header file for the projects using this derived
style, what variable can be used inside a <lisp> tag to insert the
contents of :style-sheet above?  For the projects using the xhtml style, I
can use <lisp>muse-xhtml-style-sheet</lisp>, but what's the variable for a
derived style?  Thanks.


Cheers,

--
Seb



_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: access to :style-sheet from <lisp> tag

Jim Ottaway
[apologies to Seb for accidentally sending this to him personally]

>>>>> Seb  <[hidden email]> writes:

> Hi,
> If we have a style defined:

> (muse-derive-style "my-xhtml" "xhtml"
[+]
>   :style-sheet "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\"
>                                 href=\"include/style.css\" />")

> and we want to write a header file for the projects using this derived
> style, what variable can be used inside a <lisp> tag to insert the
> contents of :style-sheet above?  For the projects using the xhtml style, I
> can use <lisp>muse-xhtml-style-sheet</lisp>, but what's the variable for a
> derived style?  Thanks.

You could make your own variable instead of using a string literal:

(defvar my-style-sheet "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\"
                         href=\"include/style.css\" />")

(muse-derive-style "my-xhtml" "xhtml"
                   :style-sheet 'my-style-sheet)



Regards,
--
Jim Ottaway


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: access to :style-sheet from <lisp> tag

Sebastian P.Luque
On Tue, 09 Oct 2007 20:31:07 +0100,
Jim Ottaway <[hidden email]> wrote:

[...]

> You could make your own variable instead of using a string literal:

> (defvar my-style-sheet "<link rel=\"stylesheet\" type=\"text/css\"
> media=\"all\" href=\"include/style.css\" />")

> (muse-derive-style "my-xhtml" "xhtml" :style-sheet 'my-style-sheet)

Thank you Jim, so one would insert a <lisp>my-style-sheet</lisp> wherever
it's needed in the header file?  In that case, what would be the purpose
of having a :style-sheet in the muse-derive-style call above?  Thanks.


--
Seb



_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: access to :style-sheet from <lisp> tag

Sebastian P.Luque
On Tue, 09 Oct 2007 14:39:56 -0500,
Seb <[hidden email]> wrote:

[...]

> Thank you Jim, so one would insert a <lisp>my-style-sheet</lisp>
> wherever it's needed in the header file?  In that case, what would be
> the purpose of having a :style-sheet in the muse-derive-style call
> above?

That should have been better phrased: what does the :style-sheet directive
do when used inside muse-derive-style?  Thanks!


--
Seb



_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: access to :style-sheet from <lisp> tag

Michael Olson-2
In reply to this post by Sebastian P.Luque
Seb <[hidden email]> writes:

> Hi,
>
> If we have a style defined:
>
> (muse-derive-style "my-xhtml" "xhtml"
>   :style-sheet "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\"
>                                 href=\"include/style.css\" />")
>
> and we want to write a header file for the projects using this derived
> style, what variable can be used inside a <lisp> tag to insert the
> contents of :style-sheet above?  For the projects using the xhtml
> style, I can use <lisp>muse-xhtml-style-sheet</lisp>, but what's the
> variable for a derived style?  Thanks.
<lisp>
(muse-style-element :style-sheet muse-publishing-current-style)
</lisp>

--
       Michael Olson -- FSF Associate Member #652     |
 http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net  |  /` |\ | | |
            Sysadmin -- Hobbies: Lisp, GP2X, HCoop    | |_] | \| |_|
Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |

_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: access to :style-sheet from <lisp> tag

Jim Ottaway
In reply to this post by Sebastian P.Luque
[apologies *again* to Seb for sending this directly to him:
misconfigured Gnus]

>>>>> Seb  <[hidden email]> writes:

> On Tue, 09 Oct 2007 20:31:07 +0100,
> Jim Ottaway <[hidden email]> wrote:

> [...]

>> You could make your own variable instead of using a string literal:

>> (defvar my-style-sheet "<link rel=\"stylesheet\" type=\"text/css\"
>> media=\"all\" href=\"include/style.css\" />")

>> (muse-derive-style "my-xhtml" "xhtml" :style-sheet 'my-style-sheet)

> Thank you Jim, so one would insert a <lisp>my-style-sheet</lisp> wherever
> it's needed in the header file?  In that case, what would be the purpose
> of having a :style-sheet in the muse-derive-style call above?  Thanks.


> --
> Seb



> _______________________________________________
> emacs-wiki-discuss mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss


Regards,
--
Jim Ottaway


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: access to :style-sheet from <lisp> tag

Jim Ottaway
In reply to this post by Sebastian P.Luque
[apologies *again* to Seb for sending this directly to him:
misconfigured Gnus]

>>>>> Seb  <[hidden email]> writes:

> On Tue, 09 Oct 2007 20:31:07 +0100,
> Jim Ottaway <[hidden email]> wrote:

> [...]

>> You could make your own variable instead of using a string literal:

>> (defvar my-style-sheet "<link rel=\"stylesheet\" type=\"text/css\"
>> media=\"all\" href=\"include/style.css\" />")

>> (muse-derive-style "my-xhtml" "xhtml" :style-sheet 'my-style-sheet)

> Thank you Jim, so one would insert a <lisp>my-style-sheet</lisp> wherever
> it's needed in the header file?  In that case, what would be the purpose
> of having a :style-sheet in the muse-derive-style call above?  Thanks.

Hmm. Sorry, I don't know, I'm afraid, I didn't really think hard enough
about what you might be trying to do, and I have only just started to do
any serious publishing to (x)html [today in fact!].

Doesn't a header get inserted that is inherited from the xhtml style?
There appears to be a bit of code in muse-xhtml-header that inserts the
style-sheet.

By the way, you might get a bigger audience on the muse e-mail list:

https://mail.gna.org/listinfo/muse-el-discuss 

emacs-wiki is quite obsolete these days.

Regards,
--
Jim Ottaway


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: access to :style-sheet from <lisp> tag

Jim Ottaway
In reply to this post by Sebastian P.Luque
>>>>> Seb  <[hidden email]> writes:

> On Tue, 09 Oct 2007 14:39:56 -0500,
> Seb <[hidden email]> wrote:

> [...]

>> Thank you Jim, so one would insert a <lisp>my-style-sheet</lisp>
>> wherever it's needed in the header file?  In that case, what would be
>> the purpose of having a :style-sheet in the muse-derive-style call
>> above?

> That should have been better phrased: what does the :style-sheet directive
> do when used inside muse-derive-style?  Thanks!

It's more of a slot than a directive; it just stores the value for that
style that you can extract using muse-style-element [qv Michael's
answer].

Regards,
--
Jim Ottaway


_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss
Reply | Threaded
Open this post in threaded view
|

Re: access to :style-sheet from <lisp> tag

Sebastian P.Luque
In reply to this post by Michael Olson-2
On Tue, 09 Oct 2007 16:24:16 -0400,
Michael Olson <[hidden email]> wrote:

[...]

> <lisp> (muse-style-element :style-sheet muse-publishing-current-style)
> </lisp>

Excellent, muse-style-element rocks.  Thank you both for your input!


--
Seb



_______________________________________________
emacs-wiki-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss