Re: ox-html Incorrectly (?) Puts HTML Into the `` Tag</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=emacs-orgmode@gnu.org&q=from:%22Tim+Visher%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Tim Visher</span></span></a></span> <span class="date"><a href="/search?l=emacs-orgmode@gnu.org&q=date:20210422" rel="nofollow">Thu, 22 Apr 2021 10:36:31 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>On Thu, Apr 22, 2021 at 11:36 AM Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote:</pre><pre> > Tim Visher <tim.vis...@gmail.com> writes: > > > Thanks for the tip. What I'm thinking more is somehow getting the heading > > pre-output generation, stripping any characters that `org` would consider > > special (I'm hoping there's already a function that can at least mark > > 'markup' text in a given org string), and _then_ passing it to whatever > ox > > function is responsible for using the title. That way it's as generic as > it > > can possibly be. > > What format has "heading pre-output generation"? Is a string or is it > parsed data? The first part of your paragraph sounds like you want to > rewrite an Org parser. > > How do you pass it to ox function responsible for using the title? I.e., > who/what is responsible for making the change to the title? Is it the > user? > > You may need to clarify your specifications. > > > I confess though that I don't follow exactly what you're talking about > > defining a temporary export back-end. > > In `org-html--build-meta-info' from "ox-html.el", replace the following > > (org-html-plain-text > (org-element-interpret-data (plist-get info :title)) info) > > with > > (org-export-data-with-backend (plist-get info :title) > (org-export-create-backend > :transcoders > '((bold . (lambda (_ c _) c)) > (italic . (lambda (_ c _) c)))) > info) > > Now re-evaluate the function `org-html--build-meta-info' and try > exporting a document to HTML with a title containing bold and italic > syntax, even nested, e.g. > > #+title: /Some *bold* text/ > > > Why would that be necessary or beneficial to the end of teaching org > > how to use only the 'plain text' of a heading for the title in N ox > > backends? > > Adding the function `org-export-strip-syntax below to "ox.el" > > (defun org-export-strip-syntax (data info) > (org-export-data-with-backend data > (org-export-create-backend > :transcoders > '((bold . (lambda (_ c _) c)) > (italic . (lambda (_ c _) c)))) > info)) > > you can now call it from any export back-end whenever its needs to > remove syntax from a piece of code. > > You can also drop the info argument and add it to "org-element.el". But > it depends on what you want to obtain. Also, some syntax is not obvious > to strip, as I suggested in my previous message. > Awesome! This is a ton of great info. If I decide to bite this off I'll be sure to reference this. :) </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg135240.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd9.html#135241">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="maillist.html#135241">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg133517.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email"><span class="subject"><a href="msg134987.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Tim Visher</span></li> <li class="icons-email"><span class="subject"><a href="msg135141.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Kyle Meyer</span></li> <li class="icons-email"><span class="subject"><a href="msg135155.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Jens Lechtenboerger</span></li> <li class="icons-email"><span class="subject"><a href="msg135171.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Tim Visher</span></li> <li class="icons-email"><span class="subject"><a href="msg135175.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Jens Lechtenboerger</span></li> <li class="icons-email"><span class="subject"><a href="msg135177.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Dr. Arne Babenhauserheide</span></li> <li class="icons-email"><span class="subject"><a href="msg135191.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Tim Visher</span></li> <li class="icons-email"><span class="subject"><a href="msg135237.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Nicolas Goaziou</span></li> <li class="icons-email"><span class="subject"><a href="msg135238.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Tim Visher</span></li> <li class="icons-email"><span class="subject"><a href="msg135240.html">Re: ox-html Incorrectly (?) Puts HTML Into the `...</a></span> <span class="sender italic">Nicolas Goaziou</span></li> <li class="icons-email tSliceCur"><span class="subject">Re: ox-html Incorrectly (?) Puts HTML Into the `...</span> <span class="sender italic">Tim Visher</span></li> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="Re: ox-html Incorrectly (?) Puts HTML Into the `<title>` Tag"> <input type="hidden" name="msgid" value="CAHa53uwvvXARYX_Guy_-aMWYoTv=Na3DsZapHfENafHV9ywmZQ@mail.gmail.com"> <input type="hidden" name="relpath" value="emacs-orgmode@gnu.org/msg135241.html"> <input type="submit" value=" Tim Visher "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="emacs-orgmode@gnu.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search emacs-orgmode"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/emacs-orgmode@gnu.org/">emacs-orgmode - all messages</a></li> <li class="icons-about"><a href="/emacs-orgmode@gnu.org/info.html">emacs-orgmode - about the list</a></li> <li class="icons-expand"><a href="/search?l=emacs-orgmode@gnu.org&q=subject:%22Re%5C%3A+ox%5C-html+Incorrectly+%5C%28%5C%3F%5C%29+Puts+HTML+Into+the+%60%3Ctitle%3E%60+Tag%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg135240.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg133517.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">CAHa53uwvvXARYX_Guy_-aMWYoTv=Na3DsZapHfENafHV9ywmZQ@mail.gmail.com</li> </ul> </div> </body> </html>