* Change resolution of LaTeX formulas in HTML output? @ 2010-08-04 17:00 amscopub-mail 2010-08-04 22:32 ` Bastien 2010-08-05 19:14 ` Dan Davison 0 siblings, 2 replies; 17+ messages in thread From: amscopub-mail @ 2010-08-04 17:00 UTC (permalink / raw) To: emacs-orgmode Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML? You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution... BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF. --Uriel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-04 17:00 Change resolution of LaTeX formulas in HTML output? amscopub-mail @ 2010-08-04 22:32 ` Bastien 2010-08-05 19:11 ` Dan Davison 2010-08-06 10:46 ` Carsten Dominik 2010-08-05 19:14 ` Dan Davison 1 sibling, 2 replies; 17+ messages in thread From: Bastien @ 2010-08-04 22:32 UTC (permalink / raw) To: amscopub-mail; +Cc: emacs-orgmode amscopub-mail@yahoo.com writes: > Is there a way to control the resolution of PNG LaTeX formulas when > you export to HTML? I've implemented this. You can define the :html-resolution in `org-format-latex-options'. Please test and report any problem. -- Bastien ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-04 22:32 ` Bastien @ 2010-08-05 19:11 ` Dan Davison 2010-08-06 9:12 ` Bastien 2010-08-06 10:46 ` Carsten Dominik 1 sibling, 1 reply; 17+ messages in thread From: Dan Davison @ 2010-08-05 19:11 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode Bastien <bastien.guerry@wikimedia.fr> writes: > amscopub-mail@yahoo.com writes: > >> Is there a way to control the resolution of PNG LaTeX formulas when >> you export to HTML? > > I've implemented this. > > You can define the :html-resolution in `org-format-latex-options'. > > Please test and report any problem. Bastien -- Am I right in understanding that if we increase html-resolution the resulting images will come out larger in a web browser; i.e that there is no way to maintain the images the same size while making them appear "sharper" in a web browser? Dan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-05 19:11 ` Dan Davison @ 2010-08-06 9:12 ` Bastien 0 siblings, 0 replies; 17+ messages in thread From: Bastien @ 2010-08-06 9:12 UTC (permalink / raw) To: Dan Davison; +Cc: emacs-orgmode Dan Davison <davison@stats.ox.ac.uk> writes: > Am I right in understanding that if we increase html-resolution the > resulting images will come out larger in a web browser; You're right. Actually having a :resolution would perhaps make sense, at least for consistency sake. What do you (and the OP) think? > i.e that there is no way to maintain the images the same size while > making them appear "sharper" in a web browser? I guess this is related to the quality of the png, which is defined by the -Q switch for dvipng. Would you like to set this as well? -- Bastien ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-04 22:32 ` Bastien 2010-08-05 19:11 ` Dan Davison @ 2010-08-06 10:46 ` Carsten Dominik 2010-08-06 17:21 ` Bastien 1 sibling, 1 reply; 17+ messages in thread From: Carsten Dominik @ 2010-08-06 10:46 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode On Aug 5, 2010, at 12:32 AM, Bastien wrote: > amscopub-mail@yahoo.com writes: > >> Is there a way to control the resolution of PNG LaTeX formulas when >> you export to HTML? > > I've implemented this. I would not think that we need this change, the :scale and :html-scale parameters do this for in-buffer display and html formatting, respectively. Please revert this change. - Carsten ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-06 10:46 ` Carsten Dominik @ 2010-08-06 17:21 ` Bastien 0 siblings, 0 replies; 17+ messages in thread From: Bastien @ 2010-08-06 17:21 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Carsten Dominik <carsten.dominik@gmail.com> writes: > I would not think that we need this change, the :scale and :html-scale > parameters do this for in-buffer display and html formatting, > respectively. > > > Please revert this change. Done. -- Bastien ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-04 17:00 Change resolution of LaTeX formulas in HTML output? amscopub-mail 2010-08-04 22:32 ` Bastien @ 2010-08-05 19:14 ` Dan Davison 2010-08-05 20:34 ` Sebastian Rose 1 sibling, 1 reply; 17+ messages in thread From: Dan Davison @ 2010-08-05 19:14 UTC (permalink / raw) To: amscopub-mail; +Cc: emacs-orgmode amscopub-mail@yahoo.com writes: > Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML? > > You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution... > > BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF. Hi Uriel, Could you tell us a bit about what the advantages of PrinceXML are? One question I have is: is it possible to get vector graphics (ps, pdf) incorporated into the resulting pdf? Is there an open source alternative? (I've been doing this with "print to file" in the print dialog box in a web browser in linux). Dan > > --Uriel > > > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: Change resolution of LaTeX formulas in HTML output? 2010-08-05 19:14 ` Dan Davison @ 2010-08-05 20:34 ` Sebastian Rose 2010-08-05 21:36 ` Dan Davison 0 siblings, 1 reply; 17+ messages in thread From: Sebastian Rose @ 2010-08-05 20:34 UTC (permalink / raw) To: Dan Davison; +Cc: emacs-orgmode Dan Davison <davison@stats.ox.ac.uk> writes: > amscopub-mail@yahoo.com writes: > >> Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML? >> >> You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution... >> >> BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF. > > Hi Uriel, > > Could you tell us a bit about what the advantages of PrinceXML are? One > question I have is: is it possible to get vector graphics (ps, pdf) > incorporated into the resulting pdf? Is there an open source > alternative? (I've been doing this with "print to file" in the print > dialog box in a web browser in linux). htmldoc (see http://www.htmldoc.org/) It comes with a GUI and is free enough to be in Debian. Not sure if it is that perfect, but when ever I tried it it worked. Didn't use it for ages. I use Org mode and LaTeX2e instead ;) Sebastian ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-05 20:34 ` Sebastian Rose @ 2010-08-05 21:36 ` Dan Davison 2010-08-05 22:14 ` Sebastian Rose 0 siblings, 1 reply; 17+ messages in thread From: Dan Davison @ 2010-08-05 21:36 UTC (permalink / raw) To: Sebastian Rose; +Cc: emacs-orgmode Sebastian Rose <sebastian_rose@gmx.de> writes: > Dan Davison <davison@stats.ox.ac.uk> writes: >> amscopub-mail@yahoo.com writes: >> >>> Is there a way to control the resolution of PNG LaTeX formulas when you export to HTML? >>> >>> You can control the font size directly in the header but there doesn't seem to be a way to use org-mode to control the resolution... >>> >>> BTW, I'm not exporting to LaTeX directly because I'm using PrinceXML to convert the HTML file to a PDF. >> >> Hi Uriel, >> >> Could you tell us a bit about what the advantages of PrinceXML are? One >> question I have is: is it possible to get vector graphics (ps, pdf) >> incorporated into the resulting pdf? Is there an open source >> alternative? (I've been doing this with "print to file" in the print >> dialog box in a web browser in linux). > > > htmldoc (see http://www.htmldoc.org/) > > It comes with a GUI and is free enough to be in Debian. Thanks. > Not sure if it is that perfect, but when ever I tried it it worked. > Didn't use it for ages. I use Org mode and LaTeX2e instead ;) Can you point me to an example that shows how to make source code in latex look (almost) as nice as html? In case anyone has any enlightenment, a quick try suggests that htmldoc doesn't work out-of-the-box on html produced by org-mode (error below). /tmp> htmldoc --webpage -f x.pdf x.html ERR011: Unable to parse HTML element on line 15! PAGES: 1 BYTES: 39131 /tmp> sed -n 15p x.html <!--/*--><![CDATA[/*><!--*/ Dan > > > > Sebastian > > > > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Change resolution of LaTeX formulas in HTML output? 2010-08-05 21:36 ` Dan Davison @ 2010-08-05 22:14 ` Sebastian Rose 2010-08-06 7:59 ` How to get pretty printed source code in PDFLaTeX Sébastien Vauban 0 siblings, 1 reply; 17+ messages in thread From: Sebastian Rose @ 2010-08-05 22:14 UTC (permalink / raw) To: Dan Davison; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 378 bytes --] Dan Davison <davison@stats.ox.ac.uk> writes: > Can you point me to an example that shows how to make source code in > latex look (almost) as nice as html? That is supposed to work with the `listings' package. I havent tried that yet. I still use my old LaTeX headers and write verbatim LaTeX code. I'd like to switch though, since it's a lot to type. Here is an example: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-verbatim, Size: 487 bytes --] \begin{codeblock} \keyword{public function}~\func{\_\_construct}~(\increaseindent[15]\doindent \variable{\$instance}~=~\konstante{MAP\_STANDARD\_JS\_INSTANCE},\doindent \variable{\$z}~=~\konstante{MAP\_STANDARD\_ZOOM},\doindent \variable{\$centerX}~=~-1,\doindent \variable{\$centerY}~=~-1,\doindent \variable{\$highlights}~=~\keyword{true},\doindent \variable{\$spots}~=~\keyword{false}\doindent )\resetindent \end{codeblock} [-- Attachment #3: Type: text/plain, Size: 178 bytes --] Looks horrible, does it? You can find the "listings.pdf" documentation here: http://www.ctan.org/tex-archive/macros/latex/contrib/listings/ Best wishes Sebastian [-- Attachment #4: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* How to get pretty printed source code in PDFLaTeX 2010-08-05 22:14 ` Sebastian Rose @ 2010-08-06 7:59 ` Sébastien Vauban 2010-08-06 13:39 ` Dan Davison 0 siblings, 1 reply; 17+ messages in thread From: Sébastien Vauban @ 2010-08-06 7:59 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Dan and Sebastian, Sebastian Rose wrote: > Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> writes: >> Can you point me to an example that shows how to make source code in latex >> look (almost) as nice as html? > > That is supposed to work with the `listings' package. I havent tried that > yet. > > I still use my old LaTeX headers and write verbatim LaTeX code. I'd > like to switch though, since it's a lot to type. > > Here is an example: > > \begin{codeblock} > \keyword{public function}~\func{\_\_construct}~(\increaseindent[15]\doindent > \variable{\$instance}~=~\konstante{MAP\_STANDARD\_JS\_INSTANCE},\doindent > \variable{\$z}~=~\konstante{MAP\_STANDARD\_ZOOM},\doindent > \variable{\$centerX}~=~-1,\doindent > \variable{\$centerY}~=~-1,\doindent > \variable{\$highlights}~=~\keyword{true},\doindent > \variable{\$spots}~=~\keyword{false}\doindent > )\resetindent > \end{codeblock} > > Looks horrible, does it? If I understand you right, here's such an example you're after: --8<---------------cut here---------------start------------->8--- #+TITLE: Using the listings package #+AUTHOR: Seb Vauban #+DATE: 2010-08-06 #+LANGUAGE: en_US * Code This must be nice to see in LaTeX. #+SRCNAME: srcModifyDB1.sql #+BEGIN_SRC sql :tangle srcModifyDB.sql -- add column `DossierSentToSecteur' (if column does not exist yet) IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'dossier' AND COLUMN_NAME = 'DossierSentToSecteur') BEGIN ALTER TABLE dossier ADD DossierSentToSecteur smalldatetime NULL END GO #+END_SRC Right? * Much better code For that, you need to customize =listings=: #+begin_LaTeX % typeset source code listings \usepackage{listings} % must be loaded after `babel' \lstloadlanguages{C} \definecolor{sva@lstbackground}{HTML}{FFFFCC} % light yellow \definecolor{sva@lstkeyword}{HTML}{0000FF} % blue \definecolor{sva@lstidentifier}{HTML}{000000} % black \definecolor{sva@lstcomment}{HTML}{FF0000} % red \definecolor{sva@lststring}{HTML}{008000} % dark green \lstset{% basicstyle=\ttfamily\scriptsize, % the font that is used for the code tabsize=4, % sets default tabsize to 4 spaces numbers=left, % where to put the line numbers numberstyle=\tiny, % line number font size stepnumber=0, % step between two line numbers breaklines=false, %!! don't break long lines of code showtabs=false, % show tabs within strings adding particular underscores showspaces=false, % show spaces adding particular underscores showstringspaces=false, % underline spaces within strings keywordstyle=\color{sva@lstkeyword}, identifierstyle=\color{sva@lstidentifier}, stringstyle=\color{sva@lststring}, commentstyle=\color{sva@lstcomment}, backgroundcolor=\color{sva@lstbackground}, % sets the background color captionpos=b, % sets the caption position to `bottom' extendedchars=false %!?? workaround for when the listed file is in UTF-8 } #+end_LaTeX #+SRCNAME: srcModifyDB2.sql #+BEGIN_SRC sql :tangle srcModifyDB.sql -- add column `DossierSentToSecteur' (if column does not exist yet) IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'dossier' AND COLUMN_NAME = 'DossierSentToSecteur') BEGIN ALTER TABLE dossier ADD DossierSentToSecteur smalldatetime NULL END GO #+END_SRC --8<---------------cut here---------------end--------------->8--- with the following in my `.emacs' file: --8<---------------cut here---------------start------------->8--- (setq org-export-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t) ("" "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "soul" t) ("" "t1enc" t) ("" "textcomp" t) ("" "marvosym" t) ("" "wasysym" t) ("" "latexsym" t) ("" "amssymb" t) ("" "hyperref" nil) "\\tolerance=1000")) ;; tell org to use listings (instead of verbatim) for source code (setq org-export-latex-listings t) ;; if you want fontified source code, then you must include the ;; `listings' package (add-to-list 'org-export-latex-packages-alist '("" "listings")) ;; if you want colored source code, then you need to include the ;; `xcolor' package (add-to-list 'org-export-latex-packages-alist '("" "xcolor")) --8<---------------cut here---------------end--------------->8--- I've put the PDF (for easy access) onto my Web site: http://www.mygooglest.com/sva/ECM-Listings.pdf Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to get pretty printed source code in PDFLaTeX 2010-08-06 7:59 ` How to get pretty printed source code in PDFLaTeX Sébastien Vauban @ 2010-08-06 13:39 ` Dan Davison 2010-08-09 20:30 ` Sébastien Vauban 0 siblings, 1 reply; 17+ messages in thread From: Dan Davison @ 2010-08-06 13:39 UTC (permalink / raw) To: Sébastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > Hi Dan and Sebastian, > > Sebastian Rose wrote: >> Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> writes: >>> Can you point me to an example that shows how to make source code in latex >>> look (almost) as nice as html? >> >> That is supposed to work with the `listings' package. I havent tried that >> yet. >> >> I still use my old LaTeX headers and write verbatim LaTeX code. I'd >> like to switch though, since it's a lot to type. >> >> Here is an example: >> >> \begin{codeblock} >> \keyword{public function}~\func{\_\_construct}~(\increaseindent[15]\doindent >> \variable{\$instance}~=~\konstante{MAP\_STANDARD\_JS\_INSTANCE},\doindent >> \variable{\$z}~=~\konstante{MAP\_STANDARD\_ZOOM},\doindent >> \variable{\$centerX}~=~-1,\doindent >> \variable{\$centerY}~=~-1,\doindent >> \variable{\$highlights}~=~\keyword{true},\doindent >> \variable{\$spots}~=~\keyword{false}\doindent >> )\resetindent >> \end{codeblock} >> >> Looks horrible, does it? > > If I understand you right, here's such an example you're after: > > #+TITLE: Using the listings package > #+AUTHOR: Seb Vauban > #+DATE: 2010-08-06 > #+LANGUAGE: en_US > > * Code > > This must be nice to see in LaTeX. > > #+SRCNAME: srcModifyDB1.sql > #+BEGIN_SRC sql :tangle srcModifyDB.sql > -- add column `DossierSentToSecteur' (if column does not exist yet) > IF NOT EXISTS (SELECT * > FROM INFORMATION_SCHEMA.COLUMNS > WHERE TABLE_NAME = 'dossier' > AND COLUMN_NAME = 'DossierSentToSecteur') > BEGIN > ALTER TABLE dossier > ADD DossierSentToSecteur smalldatetime NULL > END > GO > #+END_SRC > > Right? > > * Much better code > > For that, you need to customize =listings=: > > #+begin_LaTeX > % typeset source code listings > \usepackage{listings} % must be loaded after `babel' > \lstloadlanguages{C} > \definecolor{sva@lstbackground}{HTML}{FFFFCC} % light yellow > \definecolor{sva@lstkeyword}{HTML}{0000FF} % blue > \definecolor{sva@lstidentifier}{HTML}{000000} % black > \definecolor{sva@lstcomment}{HTML}{FF0000} % red > \definecolor{sva@lststring}{HTML}{008000} % dark green > \lstset{% > basicstyle=\ttfamily\scriptsize, % the font that is used for the code > tabsize=4, % sets default tabsize to 4 spaces > numbers=left, % where to put the line numbers > numberstyle=\tiny, % line number font size > stepnumber=0, % step between two line numbers > breaklines=false, %!! don't break long lines of code > showtabs=false, % show tabs within strings adding particular underscores > showspaces=false, % show spaces adding particular underscores > showstringspaces=false, % underline spaces within strings > keywordstyle=\color{sva@lstkeyword}, > identifierstyle=\color{sva@lstidentifier}, > stringstyle=\color{sva@lststring}, > commentstyle=\color{sva@lstcomment}, > backgroundcolor=\color{sva@lstbackground}, % sets the background color > captionpos=b, % sets the caption position to `bottom' > extendedchars=false %!?? workaround for when the listed file is in UTF-8 > } > #+end_LaTeX > > #+SRCNAME: srcModifyDB2.sql > #+BEGIN_SRC sql :tangle srcModifyDB.sql > -- add column `DossierSentToSecteur' (if column does not exist yet) > IF NOT EXISTS (SELECT * > FROM INFORMATION_SCHEMA.COLUMNS > WHERE TABLE_NAME = 'dossier' > AND COLUMN_NAME = 'DossierSentToSecteur') > BEGIN > ALTER TABLE dossier > ADD DossierSentToSecteur smalldatetime NULL > END > GO > #+END_SRC > > with the following in my `.emacs' file: > > (setq org-export-latex-default-packages-alist > '(("AUTO" "inputenc" t) > ("T1" "fontenc" t) > ("" "fixltx2e" nil) > ("" "graphicx" t) > ("" "longtable" nil) > ("" "float" nil) > ("" "wrapfig" nil) > ("" "soul" t) > ("" "t1enc" t) > ("" "textcomp" t) > ("" "marvosym" t) > ("" "wasysym" t) > ("" "latexsym" t) > ("" "amssymb" t) > ("" "hyperref" nil) > "\\tolerance=1000")) > > ;; tell org to use listings (instead of verbatim) for source code > (setq org-export-latex-listings t) > > ;; if you want fontified source code, then you must include the > ;; `listings' package > (add-to-list 'org-export-latex-packages-alist '("" "listings")) > > ;; if you want colored source code, then you need to include the > ;; `xcolor' package > (add-to-list 'org-export-latex-packages-alist '("" "xcolor")) > > I've put the PDF (for easy access) onto my Web site: > > http://www.mygooglest.com/sva/ECM-Listings.pdf Wow, that's really nice. Thanks for sharing that. I think we should aim to get to a point where org-mode can produce such nicely formatted source code out-of-the-box. Maybe we could even make latex inherit the colours and fonts that emacs is currently using for source code mark up? I was going to suggest doing this with listings but then came across minted, and I wonder whether that's even more suitable? (See the other post I just made.) Dan > > Best regards, > Seb ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to get pretty printed source code in PDFLaTeX 2010-08-06 13:39 ` Dan Davison @ 2010-08-09 20:30 ` Sébastien Vauban 2010-08-09 22:29 ` Dan Davison 0 siblings, 1 reply; 17+ messages in thread From: Sébastien Vauban @ 2010-08-09 20:30 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Dan, Dan Davison wrote: > Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw-XMD5yJDbdMSQIYZ4X/+iSw@public.gmane.orgrg> writes: >> Sebastian Rose wrote: >>> Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> writes: >>>> Can you point me to an example that shows how to make source code in >>>> latex look (almost) as nice as html? >>> >>> That is supposed to work with the `listings' package. I havent tried that >>> yet. >> >> If I understand you right, here's such an example you're after: >> >> * Much better code >> >> For that, you need to customize =listings=: >> >> #+begin_LaTeX >> % typeset source code listings >> \usepackage{listings} % must be loaded after `babel' >> \lstloadlanguages{C} >> \definecolor{sva@lstbackground}{HTML}{FFFFCC} % light yellow >> \definecolor{sva@lstkeyword}{HTML}{0000FF} % blue >> \definecolor{sva@lstidentifier}{HTML}{000000} % black >> \definecolor{sva@lstcomment}{HTML}{FF0000} % red >> \definecolor{sva@lststring}{HTML}{008000} % dark green >> \lstset{% >> basicstyle=\ttfamily\scriptsize, % the font that is used for the code >> tabsize=4, % sets default tabsize to 4 spaces >> numbers=left, % where to put the line numbers >> numberstyle=\tiny, % line number font size >> stepnumber=0, % step between two line numbers >> breaklines=false, %!! don't break long lines of code >> showtabs=false, % show tabs within strings adding particular underscores >> showspaces=false, % show spaces adding particular underscores >> showstringspaces=false, % underline spaces within strings >> keywordstyle=\color{sva@lstkeyword}, >> identifierstyle=\color{sva@lstidentifier}, >> stringstyle=\color{sva@lststring}, >> commentstyle=\color{sva@lstcomment}, >> backgroundcolor=\color{sva@lstbackground}, % sets the background color >> captionpos=b, % sets the caption position to `bottom' >> extendedchars=false %!?? workaround for when the listed file is in UTF-8 >> } >> #+end_LaTeX >> >> #+SRCNAME: srcModifyDB2.sql >> #+BEGIN_SRC sql :tangle srcModifyDB.sql >> -- add column `DossierSentToSecteur' (if column does not exist yet) >> IF NOT EXISTS (SELECT * >> FROM INFORMATION_SCHEMA.COLUMNS >> WHERE TABLE_NAME = 'dossier' >> AND COLUMN_NAME = 'DossierSentToSecteur') >> BEGIN >> ALTER TABLE dossier >> ADD DossierSentToSecteur smalldatetime NULL >> END >> GO >> #+END_SRC >> >> I've put the PDF (for easy access) onto my Web site: >> >> http://www.mygooglest.com/sva/ECM-Listings.pdf > > Wow, that's really nice. Thanks for sharing that. I really thought that you used such a thing for a long time, having done so much for Org-Babel. Maybe you were more interested by the execution stuff, rather than its printing? For me, the opposite: I was much interested by the printing, now by accessing all the power of Babel. > I think we should aim to get to a point where org-mode can produce such > nicely formatted source code out-of-the-box. I share your point. I'm willing to participate, or even begin, such a page on Worg, with the above info. > Maybe we could even make latex inherit the colours and fonts that emacs is > currently using for source code mark up? For sure, that'd be nice. You mean the way htmlize works, and keeps my colors, right? Dunno what it implies for Org-LaTeX... Generating your own class customization, and having it loaded by default (in the list of LaTeX packages)? > I was going to suggest doing this with listings but then came across minted, > and I wonder whether that's even more suitable? (See the other post I just > made.) Never heard about it before, while I'm trying to follow info about TeX as well. I'm very impressed by the quality and reaction time of french.computers.text.tex. So, I decided to ask them what they thought about Listings vs Minted. 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 list responded on that. I could try to translate the whole, but there already is a lot. Just highlighting that they don't trust that much all the facts that have been used against Listings (and prove what they say): about Utf-8, or the number of languages, etc. They agree with one inconvenient of Listings: the fact that, by default, it uses bad settings (like no color, and proportional font). On the other hand, they don't like implying the use of an external language to LaTeX. 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 goal we can reach. Best regards, Seb -- Sébastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to get pretty printed source code in PDFLaTeX 2010-08-09 20:30 ` Sébastien Vauban @ 2010-08-09 22:29 ` Dan Davison 2010-08-10 16:38 ` Thomas S. Dye 0 siblings, 1 reply; 17+ messages in thread From: Dan Davison @ 2010-08-09 22:29 UTC (permalink / raw) To: Sébastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ 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.orgrg> writes: >>> Sebastian Rose wrote: >>>> Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> writes: >>>>> Can you point me to an example that shows how to make source code in >>>>> latex look (almost) as nice as html? >>>> >>>> That is supposed to work with the `listings' package. I havent tried that >>>> yet. >>> >>> 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.pdf >> >> Wow, that's really nice. Thanks for sharing that. > > I really thought that you used such a thing for a long time, having done so > much for Org-Babel. Maybe you were more interested by the execution stuff, > rather than its printing? For me, the opposite: I was much interested by the > printing, now by accessing all the power of Babel. You're probably right that I should have looked into it. But seeing as the HTML export of code is so nice and requred no configuration, I never got round to it. Although I did write my Ph.D. in latex, and I am enjoying using the listings package for formatting pseudocode in a paper which I'm supposed to be writing, I do need to become better friends with latex, it's true. >> I think we should aim to get to a point where org-mode can produce such >> nicely formatted source code out-of-the-box. > > I share your point. I'm willing to participate, or even begin, such a page on > Worg, with the above info. > >> Maybe we could even make latex inherit the colours and fonts that emacs is >> currently using for source code mark up? > > For sure, that'd be nice. You mean the way htmlize works, and keeps my colors, > right? > > Dunno what it implies for Org-LaTeX... Generating your own class customization, > 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 that is non-nil then code like yours could be inserted into the latex output. > >> I was going to suggest doing this with listings but then came across minted, >> and I wonder whether that's even more suitable? (See the other post I just >> made.) > > Never heard about it before, while I'm trying to follow info about TeX as > well. > > I'm very impressed by the quality and reaction time of > french.computers.text.tex. So, I decided to ask them what they thought about > Listings 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*. But seriously, no problem, in addition to my character assassination, from what I could make out they made lots of good points. Although I will watch out now if I come across any francophones who look like they might be 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 fonts by default, there are two improvement options for us: 1. we work on incorporating nice listings configuration into org mode so that Org users get nice colours and fonts by default 2. we add an option to allow Org users to use the minted package, which gives them nice colours and fonts automatically. (2) was easy and so I did it straight away. And (1) is still something we want to do, not least because listings is in standard latex distributions and doesn't have an extra python requirement. Assuming that minted/pygments are stable software that will be around for a while, I would vote for both options ultimately being available in org-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 list responded on that. > I could try to translate the whole, but there already is a lot. Just > highlighting that they don't trust that much all the facts that have been used > against Listings (and prove what they say): about Utf-8, or the number of > languages, etc. > > They agree with one inconvenient of Listings: the fact that, by default, it > uses bad settings (like no color, and proportional font). > > On the other hand, they don't like implying the use of an external language to > LaTeX. 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 goal we can > reach. Excellent, I think that will be a good addition to org-mode. Dan > > Best regards, > Seb ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Re: How to get pretty printed source code in PDFLaTeX 2010-08-09 22:29 ` Dan Davison @ 2010-08-10 16:38 ` Thomas S. Dye 2010-08-10 17:37 ` Dan Davison 0 siblings, 1 reply; 17+ messages in thread From: Thomas S. Dye @ 2010-08-10 16:38 UTC (permalink / raw) To: Dan Davison Cc: public-emacs-orgmode-mXXj517/zsQ, emacs-orgmode list, Sébastien Vauban Hi Dan, One of the design goals of LaTeX is to use semantic markup in the source and to keep details of representation separate, typically in a style or class file that is used to render the semantic markup. From this perspective, the cleanest implementation would be to create a LaTeX style or class file for use with org-mode, where the gory details of listings vs. minted, etc. could be worked out. This would leave org-mode to do what it does very well, which is to identify and mark the relevant semantic units, and would at the same time simplify org-mode configuration. For the user, this would require the org-mode.sty or org-mode.cls file be placed somewhere LaTeX could find it and creating an export target for it in .emacs. This might not qualify as "out of the box" but the looser coupling between org-mode and LaTeX is likely to be a plus in the long run. All the best, Tom On 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.orgrg >>> > writes: >>>> Sebastian Rose wrote: >>>>> Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> >>>>> writes: >>>>>> Can you point me to an example that shows how to make source >>>>>> code in >>>>>> latex look (almost) as nice as html? >>>>> >>>>> That is supposed to work with the `listings' package. I havent >>>>> tried that >>>>> yet. >>>> >>>> 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.pdf >>> >>> Wow, that's really nice. Thanks for sharing that. >> >> I really thought that you used such a thing for a long time, having >> done so >> much for Org-Babel. Maybe you were more interested by the execution >> stuff, >> rather than its printing? For me, the opposite: I was much >> interested by the >> printing, now by accessing all the power of Babel. > > You're probably right that I should have looked into it. But seeing as > the HTML export of code is so nice and requred no configuration, I > never > got round to it. Although I did write my Ph.D. in latex, and I am > enjoying using the listings package for formatting pseudocode in a > paper > which I'm supposed to be writing, I do need to become better friends > with latex, it's true. > >>> I think we should aim to get to a point where org-mode can produce >>> such >>> nicely formatted source code out-of-the-box. >> >> I share your point. I'm willing to participate, or even begin, such >> a page on >> Worg, with the above info. >> >>> Maybe we could even make latex inherit the colours and fonts that >>> emacs is >>> currently using for source code mark up? >> >> For sure, that'd be nice. You mean the way htmlize works, and keeps >> my colors, >> right? >> >> Dunno what it implies for Org-LaTeX... Generating your own class >> customization, >> 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 that > is > non-nil then code like yours could be inserted into the latex output. > >> >>> I was going to suggest doing this with listings but then came >>> across minted, >>> and I wonder whether that's even more suitable? (See the other >>> post I just >>> made.) >> >> Never heard about it before, while I'm trying to follow info about >> TeX as >> well. >> >> I'm very impressed by the quality and reaction time of >> french.computers.text.tex. So, I decided to ask them what they >> thought about >> Listings 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*. But > seriously, no problem, in addition to my character assassination, from > what I could make out they made lots of good points. Although I will > watch out now if I come across any francophones who look like they > might > be 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 fonts > by > default, there are two improvement options for us: > > 1. we work on incorporating nice listings configuration into org > mode so > that Org users get nice colours and fonts by default > 2. we add an option to allow Org users to use the minted package, > which > gives them nice colours and fonts automatically. > > (2) was easy and so I did it straight away. And (1) is still something > we want to do, not least because listings is in standard latex > distributions and doesn't have an extra python requirement. Assuming > that minted/pygments are stable software that will be around for a > while, I would vote for both options ultimately being available in > org-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 list >> responded on that. >> I could try to translate the whole, but there already is a lot. Just >> highlighting that they don't trust that much all the facts that >> have been used >> against Listings (and prove what they say): about Utf-8, or the >> number of >> languages, etc. >> >> They agree with one inconvenient of Listings: the fact that, by >> default, it >> uses bad settings (like no color, and proportional font). >> >> On the other hand, they don't like implying the use of an external >> language to >> LaTeX. 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 goal >> we can >> reach. > > Excellent, I think that will be a good addition to org-mode. > > Dan > >> >> Best regards, >> Seb > > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to get pretty printed source code in PDFLaTeX 2010-08-10 16:38 ` Thomas S. Dye @ 2010-08-10 17:37 ` Dan Davison 2010-08-10 19:08 ` Thomas S. Dye 0 siblings, 1 reply; 17+ messages in thread From: Dan Davison @ 2010-08-10 17:37 UTC (permalink / raw) To: Thomas S. Dye; +Cc: emacs-orgmode list, Vauban "Thomas S. Dye" <tsd@tsdye.com> writes: > Hi Dan, > > One of the design goals of LaTeX is to use semantic markup in the > source and to keep details of representation separate, typically in a > style or class file that is used to render the semantic markup. From > this perspective, the cleanest implementation would be to create a > LaTeX style or class file for use with org-mode, where the gory > details 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. Dan > could be worked out. This would > leave org-mode to do what it does very well, which is to identify and > mark the relevant semantic units, and would at the same time simplify > org-mode configuration. > > For the user, this would require the org-mode.sty or org-mode.cls file > be placed somewhere LaTeX could find it and creating an export target > for it in .emacs. > > This might not qualify as "out of the box" but the looser coupling > between org-mode and LaTeX is likely to be a plus in the long run. > > All the best, > Tom > > On 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.orgrg >>>> > writes: >>>>> Sebastian Rose wrote: >>>>>> Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> >>>>>> writes: >>>>>>> Can you point me to an example that shows how to make source >>>>>>> code in >>>>>>> latex look (almost) as nice as html? >>>>>> >>>>>> That is supposed to work with the `listings' package. I havent >>>>>> tried that >>>>>> yet. >>>>> >>>>> 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.pdf >>>> >>>> Wow, that's really nice. Thanks for sharing that. >>> >>> I really thought that you used such a thing for a long time, having >>> done so >>> much for Org-Babel. Maybe you were more interested by the execution >>> stuff, >>> rather than its printing? For me, the opposite: I was much >>> interested by the >>> printing, now by accessing all the power of Babel. >> >> You're probably right that I should have looked into it. But seeing as >> the HTML export of code is so nice and requred no configuration, I >> never >> got round to it. Although I did write my Ph.D. in latex, and I am >> enjoying using the listings package for formatting pseudocode in a >> paper >> which I'm supposed to be writing, I do need to become better friends >> with latex, it's true. >> >>>> I think we should aim to get to a point where org-mode can produce >>>> such >>>> nicely formatted source code out-of-the-box. >>> >>> I share your point. I'm willing to participate, or even begin, such >>> a page on >>> Worg, with the above info. >>> >>>> Maybe we could even make latex inherit the colours and fonts that >>>> emacs is >>>> currently using for source code mark up? >>> >>> For sure, that'd be nice. You mean the way htmlize works, and keeps >>> my colors, >>> right? >>> >>> Dunno what it implies for Org-LaTeX... Generating your own class >>> customization, >>> 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 that >> is >> non-nil then code like yours could be inserted into the latex output. >> >>> >>>> I was going to suggest doing this with listings but then came >>>> across minted, >>>> and I wonder whether that's even more suitable? (See the other >>>> post I just >>>> made.) >>> >>> Never heard about it before, while I'm trying to follow info about >>> TeX as >>> well. >>> >>> I'm very impressed by the quality and reaction time of >>> french.computers.text.tex. So, I decided to ask them what they >>> thought about >>> Listings 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*. But >> seriously, no problem, in addition to my character assassination, from >> what I could make out they made lots of good points. Although I will >> watch out now if I come across any francophones who look like they >> might >> be 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 fonts >> by >> default, there are two improvement options for us: >> >> 1. we work on incorporating nice listings configuration into org >> mode so >> that Org users get nice colours and fonts by default >> 2. we add an option to allow Org users to use the minted package, >> which >> gives them nice colours and fonts automatically. >> >> (2) was easy and so I did it straight away. And (1) is still something >> we want to do, not least because listings is in standard latex >> distributions and doesn't have an extra python requirement. Assuming >> that minted/pygments are stable software that will be around for a >> while, I would vote for both options ultimately being available in >> org-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 list >>> responded on that. >>> I could try to translate the whole, but there already is a lot. Just >>> highlighting that they don't trust that much all the facts that >>> have been used >>> against Listings (and prove what they say): about Utf-8, or the >>> number of >>> languages, etc. >>> >>> They agree with one inconvenient of Listings: the fact that, by >>> default, it >>> uses bad settings (like no color, and proportional font). >>> >>> On the other hand, they don't like implying the use of an external >>> language to >>> LaTeX. 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 goal >>> we can >>> reach. >> >> Excellent, I think that will be a good addition to org-mode. >> >> Dan >> >>> >>> Best regards, >>> Seb >> >> >> _______________________________________________ >> 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 > > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to get pretty printed source code in PDFLaTeX 2010-08-10 17:37 ` Dan Davison @ 2010-08-10 19:08 ` Thomas S. Dye 0 siblings, 0 replies; 17+ messages in thread From: Thomas S. Dye @ 2010-08-10 19:08 UTC (permalink / raw) To: Dan Davison; +Cc: emacs-orgmode list, Sébastien Vauban [-- Attachment #1.1: Type: text/plain, Size: 9454 bytes --] Hi Dan, Yes, sorry, "gory" was off the mark. I think your approach with minted, etc. to gain out of the box functionality like this is very useful. I'm following the conversation with interest because I am planning a publication that includes some code snippets. My reservation comes from a decade of creating and maintaining LaTeX code. When I violate the separation of semantics and implementation in a .tex file, I come to regret it sooner or later. Old .tex files with non-semantic markup typically need editing before they can be used again with a different style file. Thinking through this a bit more, I can see that this is not really an issue if the .org source is always the master document--the .tex file can later be regenerated to meet the requirements of a new style. I guess the implementation choice is dependent on the expected use life of the LaTeX code generated by org-mode. If the LaTeX code is just an intermediate step in a single process, then it is probably best to have org-mode specify all the LaTeX implementation details. If the LaTeX code is the goal, and will have its own use life independent of the org-mode file that created it, then the implementation details in the .tex file will eventually get in the way. All the best, Tom On Aug 10, 2010, at 7:37 AM, Dan Davison wrote: > "Thomas S. Dye" <tsd@tsdye.com> writes: > >> Hi Dan, >> >> One of the design goals of LaTeX is to use semantic markup in the >> source and to keep details of representation separate, typically in a >> style or class file that is used to render the semantic markup. From >> this perspective, the cleanest implementation would be to create a >> LaTeX style or class file for use with org-mode, where the gory >> details 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. > > Dan > >> could be worked out. This would >> leave org-mode to do what it does very well, which is to identify and >> mark the relevant semantic units, and would at the same time simplify >> org-mode configuration. >> >> For the user, this would require the org-mode.sty or org-mode.cls >> file >> be placed somewhere LaTeX could find it and creating an export target >> for it in .emacs. >> >> This might not qualify as "out of the box" but the looser coupling >> between org-mode and LaTeX is likely to be a plus in the long run. >> >> All the best, >> Tom >> >> On 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.orgrg >>>>>> writes: >>>>>> Sebastian Rose wrote: >>>>>>> Dan Davison <davison-+7o2aNKnwVPQzY9nttDBhA@public.gmane.org> >>>>>>> writes: >>>>>>>> Can you point me to an example that shows how to make source >>>>>>>> code in >>>>>>>> latex look (almost) as nice as html? >>>>>>> >>>>>>> That is supposed to work with the `listings' package. I havent >>>>>>> tried that >>>>>>> yet. >>>>>> >>>>>> 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.pdf >>>>> >>>>> Wow, that's really nice. Thanks for sharing that. >>>> >>>> I really thought that you used such a thing for a long time, having >>>> done so >>>> much for Org-Babel. Maybe you were more interested by the execution >>>> stuff, >>>> rather than its printing? For me, the opposite: I was much >>>> interested by the >>>> printing, now by accessing all the power of Babel. >>> >>> You're probably right that I should have looked into it. But >>> seeing as >>> the HTML export of code is so nice and requred no configuration, I >>> never >>> got round to it. Although I did write my Ph.D. in latex, and I am >>> enjoying using the listings package for formatting pseudocode in a >>> paper >>> which I'm supposed to be writing, I do need to become better friends >>> with latex, it's true. >>> >>>>> I think we should aim to get to a point where org-mode can produce >>>>> such >>>>> nicely formatted source code out-of-the-box. >>>> >>>> I share your point. I'm willing to participate, or even begin, such >>>> a page on >>>> Worg, with the above info. >>>> >>>>> Maybe we could even make latex inherit the colours and fonts that >>>>> emacs is >>>>> currently using for source code mark up? >>>> >>>> For sure, that'd be nice. You mean the way htmlize works, and keeps >>>> my colors, >>>> right? >>>> >>>> Dunno what it implies for Org-LaTeX... Generating your own class >>>> customization, >>>> 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 that >>> is >>> non-nil then code like yours could be inserted into the latex >>> output. >>> >>>> >>>>> I was going to suggest doing this with listings but then came >>>>> across minted, >>>>> and I wonder whether that's even more suitable? (See the other >>>>> post I just >>>>> made.) >>>> >>>> Never heard about it before, while I'm trying to follow info about >>>> TeX as >>>> well. >>>> >>>> I'm very impressed by the quality and reaction time of >>>> french.computers.text.tex. So, I decided to ask them what they >>>> thought about >>>> Listings 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*. But >>> seriously, no problem, in addition to my character assassination, >>> from >>> what I could make out they made lots of good points. Although I will >>> watch out now if I come across any francophones who look like they >>> might >>> be 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 fonts >>> by >>> default, there are two improvement options for us: >>> >>> 1. we work on incorporating nice listings configuration into org >>> mode so >>> that Org users get nice colours and fonts by default >>> 2. we add an option to allow Org users to use the minted package, >>> which >>> gives them nice colours and fonts automatically. >>> >>> (2) was easy and so I did it straight away. And (1) is still >>> something >>> we want to do, not least because listings is in standard latex >>> distributions and doesn't have an extra python requirement. Assuming >>> that minted/pygments are stable software that will be around for a >>> while, I would vote for both options ultimately being available in >>> org-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 list >>>> responded on that. >>>> I could try to translate the whole, but there already is a lot. >>>> Just >>>> highlighting that they don't trust that much all the facts that >>>> have been used >>>> against Listings (and prove what they say): about Utf-8, or the >>>> number of >>>> languages, etc. >>>> >>>> They agree with one inconvenient of Listings: the fact that, by >>>> default, it >>>> uses bad settings (like no color, and proportional font). >>>> >>>> On the other hand, they don't like implying the use of an external >>>> language to >>>> LaTeX. 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 goal >>>> we can >>>> reach. >>> >>> Excellent, I think that will be a good addition to org-mode. >>> >>> Dan >>> >>>> >>>> Best regards, >>>> Seb >>> >>> >>> _______________________________________________ >>> 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 >> >> >> _______________________________________________ >> 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 Thomas S. Dye, Ph.D. T. S. Dye & Colleagues, Archaeologists, Inc. Phone: (808) 529-0866 Fax: (808) 529-0884 http://www.tsdye.com [-- Attachment #1.2: Type: text/html, Size: 31686 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-08-10 19:08 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-04 17:00 Change resolution of LaTeX formulas in HTML output? amscopub-mail 2010-08-04 22:32 ` Bastien 2010-08-05 19:11 ` Dan Davison 2010-08-06 9:12 ` Bastien 2010-08-06 10:46 ` Carsten Dominik 2010-08-06 17:21 ` Bastien 2010-08-05 19:14 ` Dan Davison 2010-08-05 20:34 ` Sebastian Rose 2010-08-05 21:36 ` Dan Davison 2010-08-05 22:14 ` Sebastian Rose 2010-08-06 7:59 ` How to get pretty printed source code in PDFLaTeX Sébastien Vauban 2010-08-06 13:39 ` Dan Davison 2010-08-09 20:30 ` Sébastien Vauban 2010-08-09 22:29 ` Dan Davison 2010-08-10 16:38 ` Thomas S. Dye 2010-08-10 17:37 ` Dan Davison 2010-08-10 19:08 ` Thomas S. Dye
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.