* Remaining document problems @ 2016-10-12 14:55 Peter Davis 2016-10-12 15:39 ` Nick Dokos 0 siblings, 1 reply; 7+ messages in thread From: Peter Davis @ 2016-10-12 14:55 UTC (permalink / raw To: emacs-orgmode After days and days of wrestling with this, I still seem to be unable to solve some basic problems: A. Source code listings 1) Source code blocks: Using #+BEGIN_SRC js works for HTML output, but not for LaTeX/PDF. It seems js is not understood by the listings package, and I have to use java. 2) Even with java, the output is pretty ugly. Any way to get some color in there? B. Graphics I've tried TikZ, GraphViz dot and ditaa. I believe TikZ has the most potential, once I learn all the options and attributes. However, I'm stuck on a couple of things: 1) How to I get TikZ graphics to fit on a page? The TikZ pictures are always on a separate page in my org PDF output. 2) I'd really like to get all my graphics in SVG format, so the text would be searchable, clickable, etc. However, I haven't found a way to get TikZ output into SVG, or to get SVG into LaTeX. (Yes, I'm aware of the svg package, which requires Inkscape, but even after installing that, I can't get svg images to work in LaTeX.) I've Googled all of these, and tried to understand the answers, though many take a complete understanding of yet another package/tool/etc. It's getting very discouraging. I'd really like to use org-mode, but I'm wondering if AsciiDoc or even MarkDown might be easier. Thanks, -pd -- Peter Davis www.techcurmudgeon.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remaining document problems 2016-10-12 14:55 Remaining document problems Peter Davis @ 2016-10-12 15:39 ` Nick Dokos 2016-10-12 16:35 ` Peter Davis [not found] ` <463a5687c70841b8a6603102739fbf02@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 0 siblings, 2 replies; 7+ messages in thread From: Nick Dokos @ 2016-10-12 15:39 UTC (permalink / raw To: emacs-orgmode Peter Davis <pfd@pfdstudio.com> writes: > A. Source code listings > > 1) Source code blocks: Using > > #+BEGIN_SRC js > > works for HTML output, but not for LaTeX/PDF. It seems js is not > understood by the listings package, and I have to use java. > > 2) Even with java, the output is pretty ugly. Any way to get some color > in there? > > It shouldn't take much to define a language environment for listings: http://tex.stackexchange.com/questions/89574/language-option-supported-in-listings Maybe that helps? Alternatively, can you use minted instead of listings? It requires some external packages and some changes in how the latex is processed (basically adding --shell-escape to the pdflatex (or similar) invocation(s)). C-h v org-latex-listings RET has the details. But it does contain support for javascript, IIRC. -- Nick ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remaining document problems 2016-10-12 15:39 ` Nick Dokos @ 2016-10-12 16:35 ` Peter Davis [not found] ` <463a5687c70841b8a6603102739fbf02@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 1 sibling, 0 replies; 7+ messages in thread From: Peter Davis @ 2016-10-12 16:35 UTC (permalink / raw To: emacs-orgmode On Wed, Oct 12, 2016, at 11:39 AM, Nick Dokos wrote: > Peter Davis <pfd@pfdstudio.com> writes: > > > A. Source code listings > > > > 1) Source code blocks: Using > > > > #+BEGIN_SRC js > > > > works for HTML output, but not for LaTeX/PDF. It seems js is not > > understood by the listings package, and I have to use java. > > > > 2) Even with java, the output is pretty ugly. Any way to get some color > > in there? > > > > > > It shouldn't take much to define a language environment for listings: > > http://tex.stackexchange.com/questions/89574/language-option-supported-in-listings > > Maybe that helps? > Excellent! Thanks to this, I now have great looking JavaScript listings, and I can easily change the styling. Thank you, Nick! -pd -- Peter Davis www.techcurmudgeon.com ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <463a5687c70841b8a6603102739fbf02@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: Remaining document problems [not found] ` <463a5687c70841b8a6603102739fbf02@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2016-10-13 8:08 ` Eric S Fraga 2016-10-13 12:46 ` Peter Davis [not found] ` <1da24f56addb4163963006cdae9703cb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 0 siblings, 2 replies; 7+ messages in thread From: Eric S Fraga @ 2016-10-13 8:08 UTC (permalink / raw To: Peter Davis; +Cc: emacs-orgmode@gnu.org On Wednesday, 12 Oct 2016 at 16:35, Peter Davis wrote: [...] > Excellent! Thanks to this, I now have great looking JavaScript > listings, and I can easily change the styling. For completeness, would you please tell us your solution? I'm sure this question will come up again at some point... Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_8.3.6-1207-g91e263 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remaining document problems 2016-10-13 8:08 ` Eric S Fraga @ 2016-10-13 12:46 ` Peter Davis [not found] ` <1da24f56addb4163963006cdae9703cb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 1 sibling, 0 replies; 7+ messages in thread From: Peter Davis @ 2016-10-13 12:46 UTC (permalink / raw To: Eric S Fraga; +Cc: emacs-orgmode On Thu, Oct 13, 2016, at 04:08 AM, Eric S Fraga wrote: > On Wednesday, 12 Oct 2016 at 16:35, Peter Davis wrote: > > [...] > > > Excellent! Thanks to this, I now have great looking JavaScript > > listings, and I can easily change the styling. > > For completeness, would you please tell us your solution? I'm sure this > question will come up again at some point... > Sure thing, Eric. Basically, I just added the following to my org file: #+LaTeX_HEADER: \lstset{ #+LaTeX_HEADER: columns=fullflexible, #+LaTeX_HEADER: keepspaces=true #+LaTeX_HEADER: language=js, #+LaTeX_HEADER: backgroundcolor=\color{lightgray}, #+LaTeX_HEADER: extendedchars=true, #+LaTeX_HEADER: basicstyle=\footnotesize\ttfamily, #+LaTeX_HEADER: showstringspaces=false, #+LaTeX_HEADER: showspaces=false, #+LaTeX_HEADER: showtabs=false, #+LaTeX_HEADER: numbers=left, #+LaTeX_HEADER: numberstyle=\footnotesize, #+LaTeX_HEADER: numbersep=9pt, #+LaTeX_HEADER: tabsize=2, #+LaTeX_HEADER: breaklines=true, #+LaTeX_HEADER: prebreak=\mbox{\ensuremath{\color{red}\hookleftarrow}}, #+LaTeX_HEADER: postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}}, #+LaTeX_HEADER: captionpos=b #+LaTeX_HEADER: } #+LaTeX_HEADER: \definecolor{lightgray}{rgb}{.9,.9,.9} #+LaTeX_HEADER: \definecolor{darkgray}{rgb}{.4,.4,.4} #+LaTeX_HEADER: \definecolor{purple}{rgb}{0.65, 0.12, 0.82} #+LaTeX_HEADER: \definecolor{darkgreen}{rgb}{0.12, 0.65, 0.30} #+LaTeX_HEADER: \lstdefinelanguage{js}{ #+LaTeX_HEADER: keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break}, #+LaTeX_HEADER: keywordstyle=\color{blue}\bfseries\footnotesize, #+LaTeX_HEADER: ndkeywords={class, export, boolean, throw, implements, import, this}, #+LaTeX_HEADER: ndkeywordstyle=\color{darkgray}\bfseries, #+LaTeX_HEADER: identifierstyle=\color{black}, #+LaTeX_HEADER: sensitive=false, #+LaTeX_HEADER: comment=[l]{//}, #+LaTeX_HEADER: morecomment=[s]{/*}{*/}, #+LaTeX_HEADER: commentstyle=\color{darkgreen}\itshape, #+LaTeX_HEADER: stringstyle=\color{purple}\ttfamily, #+LaTeX_HEADER: morestring=[b]', #+LaTeX_HEADER: morestring=[b]" #+LaTeX_HEADER: } This way, I get syntax highlighting in org, in HTML output, and in LaTeX/PDF output. NOTE: The prebreak and postbreak definitions just add little red hooks to the source block to show me where a line break was added. It's a trick I picked up on this list a while ago. Thanks! -pd -- Peter Davis www.techcurmudgeon.com ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1da24f56addb4163963006cdae9703cb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: Remaining document problems [not found] ` <1da24f56addb4163963006cdae9703cb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2016-10-13 13:01 ` Eric S Fraga 2016-10-13 13:03 ` Eric S Fraga 1 sibling, 0 replies; 7+ messages in thread From: Eric S Fraga @ 2016-10-13 13:01 UTC (permalink / raw To: Peter Davis; +Cc: emacs-orgmode@gnu.org On Thursday, 13 Oct 2016 at 12:46, Peter Davis wrote: >> For completeness, would you please tell us your solution? I'm sure this >> question will come up again at some point... >> > > Sure thing, Eric. Basically, I just added the following to my org file: Thanks. Useful to have the definition for javascript on the list. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_8.3.6-1207-g91e263 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Remaining document problems [not found] ` <1da24f56addb4163963006cdae9703cb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2016-10-13 13:01 ` Eric S Fraga @ 2016-10-13 13:03 ` Eric S Fraga 1 sibling, 0 replies; 7+ messages in thread From: Eric S Fraga @ 2016-10-13 13:03 UTC (permalink / raw To: Peter Davis; +Cc: emacs-orgmode@gnu.org On Thursday, 13 Oct 2016 at 12:46, Peter Davis wrote: > NOTE: The prebreak and postbreak definitions just add little red hooks > to the source block to show me where a line break was added. It's a > trick I picked up on this list a while ago. Oh, and thanks for this! This is very useful. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.1.1, Org release_8.3.6-1207-g91e263 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-10-13 14:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-12 14:55 Remaining document problems Peter Davis 2016-10-12 15:39 ` Nick Dokos 2016-10-12 16:35 ` Peter Davis [not found] ` <463a5687c70841b8a6603102739fbf02@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2016-10-13 8:08 ` Eric S Fraga 2016-10-13 12:46 ` Peter Davis [not found] ` <1da24f56addb4163963006cdae9703cb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2016-10-13 13:01 ` Eric S Fraga 2016-10-13 13:03 ` Eric S Fraga
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.