[scribus] designing instructional posters on code/programming -- lots of syntax highlighting

Gregory Pittman gpittman at iglou.com
Thu Jan 5 17:21:00 UTC 2017


On 01/05/2017 11:43 AM, Alec Hill wrote:
> 
> ## Method B ##
> 
> Printing to postscript from the web browser changes the coloring (greys get
> turned to black, background color is removed, perhaps other changes) --
> which I presume is the web browser trying to make the document more
> "printer friendly".  This is a drawback here, as the Solarized color theme
> looks really good in kate or other editors, but once I import the .ps file
> into scribus the code comments are darker (instead of lighter) than
> function names.
> 
The workaround here is in the editing. For me, the gray areas are
comments, so many might be just deleted if not needed. If they are
needed, "rubber-band" around the area after Ungrouping down to the
sentence level, and Group it, then under the Group tab, reduce Opacity
as needed to the desired level.
If you need some other color, you have to Ungroup all the way down to
individual glyphs, after which you can rubber-band around them and
adjust color in the Color tab (don't Group them because you can't change
colors in grouped objects).

> 
> ## Method D (for Danger) ##
> 
> Noone's said anything about Tex... is this a scary subject?  It kinda
> scares me ;^)
> When trying to use Minted with LaTex inside a Render Frame I had previously
> ignored the error message because it was in a tiny dialog/window that was
> near-impossible to read from, but this time I copy/pasted it into a text
> document (attached for reference) and got some insight in it...
> 
> The error sounds like the minted library is expecting to be used from a
> command line with the --shell-escape flag passed to it and that it wants to
> be producing a pdf file.  It also says "pygmentize" must be installed, but
> I suspect this results from not being able to effectively run the command
> as I think pygmentize is actually installed.
> 
> Previously I was able to run some command (linux shell) (I have no idea
> what the command actually was, a critical omission in my notes) and it
> successfully generated (from a tex file) a pdf file of syntax-highlighted
> code.  It generated a log file and I can see in that log that pygmentize
> command is successfully executed.
> 
> Anyhow... the errors in this attached file sound like Scribus is struggling
> to invoke Minted.
> Anyone know about this?  Is this user error?  Or is this incompatibility
> between the software packages?
> FYI https://www.sharelatex.com/learn/Code_Highlighting_with_minted and
> https://github.com/gpoore/minted.
> 
> Thanks,
> Alec
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170105/00e1317e/attachment.html>
> -------------- next part --------------
> This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
>  restricted \write18 enabled.
> entering extended mode
> (/tmp/scribus_temp_render_mK2504
> LaTeX2e <2011/06/27>
> Babel <3.9h> and hyphenation patterns for 78 languages loaded.
> (/usr/share/texlive/texmf-dist/tex/latex/extsizes/extarticle.cls
> Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class
> (/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo)
> (/usr/share/texlive/texmf-dist/tex/latex/base/exscale.sty))
> (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
> (/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def
> (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)
> (/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)
> (/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))
> (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
> (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
> (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
> (/usr/share/texlive/texmf-dist/tex/latex/minted/minted.sty
> (/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
> Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
> <2008/02/07> (tvz)) (/usr/share/texmf/tex/latex/xcolor/xcolor.sty
> (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
> (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
> (/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)
> (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
> (/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
> (/usr/share/texlive/texmf-dist/tex/latex/ifplatform/ifplatform.sty
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty))
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/catchfile.sty
> (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty))
> 
> Package ifplatform Warning: 
>     shell escape is disabled, so I can only detect \ifwindows.
> 
> ))
> 
> ! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
> 
> See the minted package documentation for explanation.
> Type  H <return>  for immediate help.
>  ...                                              
>                                                   
> l.8 \usemintedstyle
>                    {monokai}
> 
> ! Package minted Error: You must have `pygmentize' installed to use this packag
> e.
> 
> See the minted package documentation for explanation.
> Type  H <return>  for immediate help.
>  ...                                              
>                                                   
> l.8 \usemintedstyle
>                    {monokai}
> 
> ! LaTeX Error: File `scribus_temp_render_mK2504.pyg' not found.
> 
> Type X to quit or <RETURN> to proceed,
> or enter new name. (Default extension: pyg)
> 
> Enter file name: 
> ! Emergency stop.
> <read *> 
>          
> l.8 \usemintedstyle{monokai}
>                             ^^M
> !  ==> Fatal error occurred, no output PDF file produced!
> Transcript written on scribus_temp_render_mK2504.log.
> 

I've used some LaTeX, but not exactly an expert. It looks like you are
invoking minted incorrectly, and you don't have the pygmentize package
installed, or perhaps not using minted correctly causes pdflatex to
think you don't have pygmentize.

Greg



More information about the scribus mailing list