* centering text in html @ 2010-10-10 17:27 Vinh Nguyen 2010-10-11 7:41 ` Carsten Dominik 0 siblings, 1 reply; 7+ messages in thread From: Vinh Nguyen @ 2010-10-10 17:27 UTC (permalink / raw) To: emacs-orgmode Dear all, Sorry this may seem trivial but I'm not getting any success. I'm trying to get the following centered when outputting to html: { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } Can anyone help? Thanks. -- Vinh ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: centering text in html 2010-10-10 17:27 centering text in html Vinh Nguyen @ 2010-10-11 7:41 ` Carsten Dominik 2010-10-11 15:21 ` Vinh Nguyen 0 siblings, 1 reply; 7+ messages in thread From: Carsten Dominik @ 2010-10-11 7:41 UTC (permalink / raw) To: Vinh Nguyen; +Cc: emacs-orgmode On Oct 10, 2010, at 7:27 PM, Vinh Nguyen wrote: > Dear all, > > Sorry this may seem trivial but I'm not getting any success. I'm > trying to get the following centered when outputting to html: > > { [[file:index.org][Home]] | [[file:files.org][Announcements and > Files]] } > > Can anyone help? Thanks. You give us *very* little to chew on. How about: - what have you tried? - an example HTML code that would do the right thing etc etc etc. If you want people to help you solve a problem, please do your part by giving them *as much as possible* information. - Carsten ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: centering text in html 2010-10-11 7:41 ` Carsten Dominik @ 2010-10-11 15:21 ` Vinh Nguyen 2010-10-11 17:02 ` Christian Moe 0 siblings, 1 reply; 7+ messages in thread From: Vinh Nguyen @ 2010-10-11 15:21 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode On Mon, Oct 11, 2010 at 12:41 AM, Carsten Dominik <carsten.dominik@gmail.com> wrote: > You give us *very* little to chew on. Sorry about this. I meant to elicit on what folks do when they want to center text I general. I should've known better to put down what I've tried. I just got it working but will also put down what I tried to let others know what did not work. > How about: > > - what have you tried? #+HTML: <p style="text-align: center;"> { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } #+HTML: </p> and #+HTML: <DIV CLASS="centeralign"> { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } #+HTML: </div> > - an example HTML code that would do the right thing > THIS WORKED: #+HTML: <div align=center> { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } #+HTML: </div> > etc etc etc. If you want people to help you solve a problem, > please do your part by giving them *as much as possible* information. > > - Carsten -- Vinh ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: centering text in html 2010-10-11 15:21 ` Vinh Nguyen @ 2010-10-11 17:02 ` Christian Moe 2010-10-12 7:41 ` Christian Moe 0 siblings, 1 reply; 7+ messages in thread From: Christian Moe @ 2010-10-11 17:02 UTC (permalink / raw) To: Vinh Nguyen; +Cc: emacs-orgmode, Carsten Dominik Hi, Of the two non-working examples, one is due to what I think is slightly buggy behavior by Org where =#+HTML:= lines are followed immediately by a line of text. The other should work fine. * With =<p>= and inline CSS #+HTML: <p style="text-align: center;"> { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } #+HTML: </p> doesn't work because it results in #+begin_src html <p style="text-align: center;"> <p> { <a href="index.html">Home</a> | <a href="files.html">Announcements and Files</a> } </p> </p></div> #+end_src A new =<p>...</p>= is added at the line breaks. A =<p>= element isn't supposed to contain another =<p>= element, so it won't work. I think this is undesirable, perhaps a bug; only text blocks delimited by blank lines should be considered paragraphs and exported as =<p>=. * With =<div>= and class #+HTML: <DIV CLASS="centeralign"> { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } #+HTML: </div> This should work, supposing you write CSS for it, e.g. by adding this to your header: : #+STYLE: <style>.centeralign {text-align: center}</style> There is no =centeralign= class in the default stylesheet, so you can't expect it to work out of the box. On 10/11/10 5:21 PM, Vinh Nguyen wrote: > On Mon, Oct 11, 2010 at 12:41 AM, Carsten Dominik > <carsten.dominik@gmail.com> wrote: >> You give us *very* little to chew on. > > Sorry about this. I meant to elicit on what folks do when they want > to center text I general. I should've known better to put down what > I've tried. I just got it working but will also put down what I tried > to let others know what did not work. > >> How about: >> >> - what have you tried? > > #+HTML:<p style="text-align: center;"> > { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } > #+HTML:</p> > > and > > #+HTML:<DIV CLASS="centeralign"> > { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } > #+HTML:</div> > > >> - an example HTML code that would do the right thing >> > > THIS WORKED: > #+HTML:<div align=center> > { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } > #+HTML:</div> > > >> etc etc etc. If you want people to help you solve a problem, >> please do your part by giving them *as much as possible* information. >> >> - Carsten > > -- Vinh > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Christian Moe E-mail: mail@christianmoe.com Website: http://christianmoe.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: centering text in html 2010-10-11 17:02 ` Christian Moe @ 2010-10-12 7:41 ` Christian Moe 2010-10-12 15:35 ` Vinh Nguyen 0 siblings, 1 reply; 7+ messages in thread From: Christian Moe @ 2010-10-12 7:41 UTC (permalink / raw) Cc: Carsten Dominik, emacs-orgmode, Vinh Nguyen Hi again, Vinh, More to the point, why don't you just use #+BEGIN_CENTER { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } #+END_CENTER See info:org:Paragraphs. Cheers, CM On 10/11/10 7:02 PM, Christian Moe wrote: > Hi, > > Of the two non-working examples, one is due to what I think is > slightly buggy behavior by Org where =#+HTML:= lines are followed > immediately by a line of text. The other should work fine. > > * With =<p>= and inline CSS > > #+HTML: <p style="text-align: center;"> > { [[file:index.org][Home]] | [[file:files.org][Announcements and > Files]] } > #+HTML: </p> > > doesn't work because it results in > > #+begin_src html > <p style="text-align: center;"> > <p> > { <a href="index.html">Home</a> | <a href="files.html">Announcements > and Files</a> } > </p> > > </p></div> > #+end_src > > A new =<p>...</p>= is added at the line breaks. A =<p>= element isn't > supposed to contain another =<p>= element, so it won't work. > > I think this is undesirable, perhaps a bug; only text blocks delimited > by blank lines should be considered paragraphs and exported as =<p>=. > > * With =<div>= and class > > #+HTML: <DIV CLASS="centeralign"> > { [[file:index.org][Home]] | [[file:files.org][Announcements and > Files]] } > #+HTML: </div> > > This should work, supposing you write CSS for it, e.g. by adding this > to your header: > > : #+STYLE: <style>.centeralign {text-align: center}</style> > > There is no =centeralign= class in the default stylesheet, so you > can't expect it to work out of the box. > > > > > > On 10/11/10 5:21 PM, Vinh Nguyen wrote: >> On Mon, Oct 11, 2010 at 12:41 AM, Carsten Dominik >> <carsten.dominik@gmail.com> wrote: >>> You give us *very* little to chew on. >> >> Sorry about this. I meant to elicit on what folks do when they want >> to center text I general. I should've known better to put down what >> I've tried. I just got it working but will also put down what I tried >> to let others know what did not work. >> >>> How about: >>> >>> - what have you tried? >> >> #+HTML:<p style="text-align: center;"> >> { [[file:index.org][Home]] | [[file:files.org][Announcements and >> Files]] } >> #+HTML:</p> >> >> and >> >> #+HTML:<DIV CLASS="centeralign"> >> { [[file:index.org][Home]] | [[file:files.org][Announcements and >> Files]] } >> #+HTML:</div> >> >> >>> - an example HTML code that would do the right thing >>> >> >> THIS WORKED: >> #+HTML:<div align=center> >> { [[file:index.org][Home]] | [[file:files.org][Announcements and >> Files]] } >> #+HTML:</div> >> >> >>> etc etc etc. If you want people to help you solve a problem, >>> please do your part by giving them *as much as possible* information. >>> >>> - Carsten >> >> -- Vinh >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > -- Christian Moe E-mail: mail@christianmoe.com Website: http://christianmoe.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: centering text in html 2010-10-12 7:41 ` Christian Moe @ 2010-10-12 15:35 ` Vinh Nguyen 2010-10-12 16:51 ` Christian Moe 0 siblings, 1 reply; 7+ messages in thread From: Vinh Nguyen @ 2010-10-12 15:35 UTC (permalink / raw) To: mail; +Cc: emacs-orgmode, Carsten Dominik On Tue, Oct 12, 2010 at 12:41 AM, Christian Moe <mail@christianmoe.com> wrote: > Hi again, Vinh, > > More to the point, why don't you just use > > #+BEGIN_CENTER > { [[file:index.org][Home]] | [[file:files.org][Announcements and Files]] } > #+END_CENTER > > See info:org:Paragraphs. > > Cheers, > CM Thanks Christian! I was not aware of this. I actually was expecting this but when I googled I did not end up with anything useful. However, a quick text search for "center" on the monolithic manual did. On a similar note, I searched for "right" on the manual but did not see anything for right aligned. Just to confirm, there isn't a #BEGIN_RIGHT feature right? Thanks. Vinh ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: centering text in html 2010-10-12 15:35 ` Vinh Nguyen @ 2010-10-12 16:51 ` Christian Moe 0 siblings, 0 replies; 7+ messages in thread From: Christian Moe @ 2010-10-12 16:51 UTC (permalink / raw) To: Vinh Nguyen; +Cc: emacs-orgmode, Carsten Dominik > > On a similar note, I searched for "right" on the manual but did not > see anything for right aligned. Just to confirm, there isn't a > #BEGIN_RIGHT feature right? Not that I know of, but Org-mode contains multitudes... CM ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-12 16:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-10 17:27 centering text in html Vinh Nguyen 2010-10-11 7:41 ` Carsten Dominik 2010-10-11 15:21 ` Vinh Nguyen 2010-10-11 17:02 ` Christian Moe 2010-10-12 7:41 ` Christian Moe 2010-10-12 15:35 ` Vinh Nguyen 2010-10-12 16:51 ` Christian Moe
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.