* forcing the end of
@ 2010-03-21 16:16 Łukasz Stelmach
2010-03-21 16:33 ` Łukasz Stelmach
0 siblings, 1 reply; 2+ messages in thread
From: Łukasz Stelmach @ 2010-03-21 16:16 UTC (permalink / raw)
To: emacs-orgmode
Hello.
It's been said couple of times that there is no way in org mode to jump
back on the higher level of the outline tree without creating a new node
on that level. After thinking for a while I've agreed that there is no
need for this. There isn't such things in books. However I start to miss
it and I'll give an example of how I'd use it.
I publish some materials for my students. For example test questions. As
you might expect I'd like to keep them secret until the test starts. So
I write this:
--8<---------------cut here---------------start------------->8---
** "OpenOffice Writer" ( [2010-03-21 nie] ) :ATTACH:
#+HTML: <?php if(time() - mktime(10, 50, 00, 3, 28, 2010) > 0) { ?>
The questions will be availble on Sunday at 10:50.
#+HTML: <?php } else { ?>
+ How to write a poem?
+ How to create a graph?
+ How?
#+HTML: <?php } ?>
--8<---------------cut here---------------end--------------->8---
What I get is roughly this:
--8<---------------cut here---------------start------------->8---
<div id="outline-container-1.3" class="outline-3">
<h3 id="sec-1.3"><span class="section-number-3">1.3</span> "OpenOffice Writer" ( <span class="timestamp-wrapper"> <span class="timestamp">2010-03-21 nie</span></span> )</h3>
<div class="outline-text-3" id="text-1.3">
<?php if(time() - mktime(10, 50, 00, 3, 28, 2010) > 0) { ?>
<p>
The questions will be availble on Sunday at 10:50.
</p>
<?php } else { ?>
<ul>
<li>
How to write a poem?
</li>
<li>
How to create a graph?
</li>
<li>
How?
<?php } ?>
</li> <!-- these two should be -->
</ul> <!-- above the "?php }?" tag -->
</div>
</div>
</div>
--8<---------------cut here---------------end--------------->8---
Which makes the HTML code that comes out of PHP invalid as because of
those dangling </li></ul> (</div>s seem to be OK here).
How? How to force org-mode to close this plain list befor the php
closing curly bracket?
PS. If I add a node below the list some of its cloing </div>s go below
the <?php } ?> too.
--
Miłego dnia,
Łukasz Stelmach
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: forcing the end of
2010-03-21 16:16 forcing the end of Łukasz Stelmach
@ 2010-03-21 16:33 ` Łukasz Stelmach
0 siblings, 0 replies; 2+ messages in thread
From: Łukasz Stelmach @ 2010-03-21 16:33 UTC (permalink / raw)
To: emacs-orgmode
Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:
> I publish some materials for my students. For example test questions. As
> you might expect I'd like to keep them secret until the test starts. So
> I write this:
--8<---------------cut here---------------start------------->8---
> ** "OpenOffice Writer" ( [2010-03-21 nie] ) :ATTACH:
> #+HTML: <?php if(time() - mktime(10, 50, 00, 3, 28, 2010) > 0) { ?>
>
> The questions will be availble on Sunday at 10:50.
>
> #+HTML: <?php } else { ?>
>
> + How to write a poem?
> + How to create a graph?
> + How?
>
> #+HTML: <?php } ?>
--8<---------------cut here---------------end--------------->8---
> What I get is roughly this:
--8<---------------cut here---------------start------------->8---
> How?
>
> <?php } ?>
> </li> <!-- these two should be -->
> </ul> <!-- above the "?php }?" tag -->
> </div>
> </div>
> </div>
--8<---------------cut here---------------end--------------->8---
> Which makes the HTML code that comes out of PHP invalid as because of
> those dangling </li></ul> (</div>s seem to be OK here).
>
> How? How to force org-mode to close this plain list befor the php
> closing curly bracket?
OK. I've found a hack. I put three empty lines between the last "How?"
and the <?php } ?> in the middle one I put <U200B> (ZERO WIDTH SPACE)
which induces closing of the list and creation of an empty paragraph
<p></p>. Yet I'd like to see something cleaner.
PS. <U00A0> NO-BREAK SPACE works too and it's better because Emacs
fontifies it. Shouldn't be exported as a HTML entity ?
--
Miłego dnia,
Łukasz Stelmach
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-21 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-21 16:16 forcing the end of Łukasz Stelmach
2010-03-21 16:33 ` Łukasz Stelmach
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.