"Thomas S. Dye" <tsd@tsdye.com> writes:Hi Dan,One of the design goals of LaTeX is to use semantic markup in thesource and to keep details of representation separate, typically in astyle or class file that is used to render the semantic markup. Fromthis perspective, the cleanest implementation would be to create aLaTeX style or class file for use with org-mode, where the gorydetails of listings vs. minted, etc.
Yes, although may I repeat that in the case of minted there are no gory
details. The patch I submitted already works to give org users
out-of-the-box pretty fontified code with nothing more required than
installation of pygments and putting minted.sty in a suitable
place. Pending the work on listings that you and Seb and I are
proposing, the minted patch is therefore a useful advance for org
mode. It can always be removed later if it becomes clear that it is
completely redundant in view of newly improved org/listings support.
But yes, absolutely, what you say is definitely helpful for those
planning work on improving listings support.
Dancould be worked out. This wouldleave org-mode to do what it does very well, which is to identify andmark the relevant semantic units, and would at the same time simplifyorg-mode configuration.For the user, this would require the org-mode.sty or org-mode.cls filebe placed somewhere LaTeX could find it and creating an export targetfor it in .emacs.This might not qualify as "out of the box" but the looser couplingbetween org-mode and LaTeX is likely to be a plus in the long run.All the best,TomOn Aug 9, 2010, at 12:29 PM, Dan Davison wrote:Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>writes:Hi Dan,Dan Davison wrote:Sébastien Vauban<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw-XMD5yJDbdMSQIYZ4X/+iSw@public.gmane.orgrgwrites:Sebastian Rose wrote:Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org>writes:Can you point me to an example that shows how to make sourcecode inlatex look (almost) as nice as html?That is supposed to work with the `listings' package. I haventtried thatyet.If I understand you right, here's such an example you're after:* Much better code[...]I've put the PDF (for easy access) onto my Web site:http://www.mygooglest.com/sva/ECM-Listings.pdfWow, that's really nice. Thanks for sharing that.I really thought that you used such a thing for a long time, havingdone somuch for Org-Babel. Maybe you were more interested by the executionstuff,rather than its printing? For me, the opposite: I was muchinterested by theprinting, now by accessing all the power of Babel.You're probably right that I should have looked into it. But seeing asthe HTML export of code is so nice and requred no configuration, Inevergot round to it. Although I did write my Ph.D. in latex, and I amenjoying using the listings package for formatting pseudocode in apaperwhich I'm supposed to be writing, I do need to become better friendswith latex, it's true.I think we should aim to get to a point where org-mode can producesuchnicely formatted source code out-of-the-box.I share your point. I'm willing to participate, or even begin, sucha page onWorg, with the above info.Maybe we could even make latex inherit the colours and fonts thatemacs iscurrently using for source code mark up?For sure, that'd be nice. You mean the way htmlize works, and keepsmy colors,right?Dunno what it implies for Org-LaTeX... Generating your own classcustomization,and having it loaded by default (in the list of LaTeX packages)?Usage of listings is controlled by the variable`org-export-latex-listings', so the simplest start would be: if thatisnon-nil then code like yours could be inserted into the latex output.I was going to suggest doing this with listings but then cameacross minted,and I wonder whether that's even more suitable? (See the otherpost I justmade.)Never heard about it before, while I'm trying to follow info aboutTeX aswell.I'm very impressed by the quality and reaction time offrench.computers.text.tex. So, I decided to ask them what theythought aboutListings vs Minted.,----| "sur un post de Dan Davison parlant d'un nouveau paquet qui| serait mieux que Listings."`----Hey, I never said that! :)I said it might be better *for export of code from org-mode*. Butseriously, no problem, in addition to my character assassination, fromwhat I could make out they made lots of good points. Although I willwatch out now if I come across any francophones who look like theymightbe tex enthusiasts (wouldn't one always...)What I meant is that seeing as org-users who set`org-export-latex-listings' get black and white code with ugly fontsbydefault, there are two improvement options for us:1. we work on incorporating nice listings configuration into orgmode sothat Org users get nice colours and fonts by default2. we add an option to allow Org users to use the minted package,whichgives them nice colours and fonts automatically.(2) was easy and so I did it straight away. And (1) is still somethingwe want to do, not least because listings is in standard latexdistributions and doesn't have an extra python requirement. Assumingthat minted/pygments are stable software that will be around for awhile, I would vote for both options ultimately being available inorg-mode.See on[[http://groups.google.com/groups/search?as_umsgid%3D87lj8gp4rr.fsf%40mundaneum.com][Email from Sébastien Vauban: Listings vs Minted]]What's interesting is that 2 brilliant people of that listresponded on that.I could try to translate the whole, but there already is a lot. Justhighlighting that they don't trust that much all the facts thathave been usedagainst Listings (and prove what they say): about Utf-8, or thenumber oflanguages, etc.They agree with one inconvenient of Listings: the fact that, bydefault, ituses bad settings (like no color, and proportional font).On the other hand, they don't like implying the use of an externallanguage toLaTeX. Impacts on shell-escape.The discussion is going on. I'll keep you posted.For sure, the objective of getting better out-of-the-box is a goalwe canreach.Excellent, I think that will be a good addition to org-mode.DanBest regards,Seb_______________________________________________Emacs-orgmode mailing listPlease use `Reply All' to send replies to the list.Emacs-orgmode@gnu.orghttp://lists.gnu.org/mailman/listinfo/emacs-orgmode_______________________________________________Emacs-orgmode mailing listPlease use `Reply All' to send replies to the list.Emacs-orgmode@gnu.orghttp://lists.gnu.org/mailman/listinfo/emacs-orgmode
Thomas S. Dye, Ph.D.
T. S. Dye & Colleagues, Archaeologists, Inc.
Phone: (808) 529-0866 Fax: (808) 529-0884