Discussion:
[scribus] designing instructional posters on code/programming -- lots of syntax highlighting
Alec Hill
2017-01-04 15:00:40 UTC
Permalink
Hello folks :)

I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...

I need to design informational/instructional posters that have lots of code
samples in which the code is properly syntax-highlighted like you'd see in
Kate/Gedit/Vim/any IDE etc.

What approach should I take for this?

A while back, I discovered the Minted package for LaTex and learned enough
about LaTex at the time that I could create a .tex file and then run some
command to produce a pdf file. But I have yet to get it working inside
Scribus. LaTex-frames setup is working (I can read the sample math
formula) but as soon as I edit the headers and enter some code it fails to
render.

It's possible that some little mistake is causing rendering to fail. But
it's also possible that I'm taking the wrong approach with this
altogether. Either way, I don't know.

Is LaTex what I need to be doing this(and if so, using the frames and
copy/pasting code into the frames? or maybe there's a way to embed/link-to
source files the way we do with images and text docs?)? Does Scribus offer
other tools that would be better suited for this? And perhaps, are there
insights to answer questions I'm not yet wise enough to ask (words of
caution, etc)?

Thanks and best regards,
Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170104/13d52081/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-04 15:42:16 UTC
Permalink
Post by Alec Hill
Hello folks :)
I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...
I need to design informational/instructional posters that have lots of code
samples in which the code is properly syntax-highlighted like you'd see in
Kate/Gedit/Vim/any IDE etc.
What approach should I take for this?
Here is something I tried just now, that worked surprisingly well.
I used Kwrite, and imported a python file. In Kwrite, I have an option
to Export as HTML, which I did. I then loaded into firefox, and
"printed" as a PS file.
I could then in Scribus import the PS file, and all the syntax
highlighting was intact. Checking at high zoom, the resolution of
characters was excellent. I noted that I could have sent from firefox as
a PDF file, which should also work.

I would add that I tried importing the HTML to Scribus into a text
frame, and the highlighting was lost. If you look at the HTML file in a
text editor, you will see that the various colors used should be easily
editable with Find/Replace.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Alec Hill
2017-01-04 17:33:02 UTC
Permalink
Post by Alec Hill
Hello folks :)
I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...
I need to design informational/instructional posters that have lots of
code
Post by Alec Hill
samples in which the code is properly syntax-highlighted like you'd see
in
Post by Alec Hill
Kate/Gedit/Vim/any IDE etc.
What approach should I take for this?
Thanks for checking this out Greg!!
Here is something I tried just now, that worked surprisingly well.
I used Kwrite, and imported a python file. In Kwrite, I have an option
to Export as HTML, which I did. I then loaded into firefox, and
"printed" as a PS file.
I could then in Scribus import the PS file, and all the syntax
highlighting was intact. Checking at high zoom, the resolution of
characters was excellent. I noted that I could have sent from firefox as
a PDF file, which should also work.
This method is humorously different than what I had imagined :)
It does work. Though there seems to be a "gotcha" that would be
problematic if I can't find a way to work around it....

- When I import the .ps file through the "Import > Get vector file" option,
the code is placed on a large white canvas, the code takes up a small
portion of the canvas, and there doesn't seem to be any way to crop it.
- When I import it as an image frame the resolution is horrible, so I go
into the filename.html and set large fontsize, reopen that in firefox, and
re-print to the post script file. By the time I've enlarged the font
enough to get a good resolution in Scribus, half of the code is
clipped/cropped out of the image. And playing with this some more, the
background color that is specified in the .html file does not seem to get
preserved when firefox goes to print it and the font colors get altered
then as well.

I would add that I tried importing the HTML to Scribus into a text
frame, and the highlighting was lost. If you look at the HTML file in a
text editor, you will see that the various colors used should be easily
editable with Find/Replace.
Yeah I see the colors are lost. Line breaks also seem to be lost.

This is a very different angle than what I anticipated. I wonder if it
would be better to go forward in this direction trying to resolve the
issues I'm seeing or if it would be better to try something more along the
lines of what I did previously with LaTex? Or maybe there are still other
methods? The LaTex method seems like it might be most appropriate, but I'm
a bit ignorant here so that might be a poor assessment.

Thanks,
Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170104/0449753b/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-04 19:48:22 UTC
Permalink
Post by Alec Hill
Post by Alec Hill
Hello folks :)
I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...
I need to design informational/instructional posters that have lots of
code
Post by Alec Hill
samples in which the code is properly syntax-highlighted like you'd see
in
Post by Alec Hill
Kate/Gedit/Vim/any IDE etc.
What approach should I take for this?
Thanks for checking this out Greg!!
Here is something I tried just now, that worked surprisingly well.
I used Kwrite, and imported a python file. In Kwrite, I have an option
to Export as HTML, which I did. I then loaded into firefox, and
"printed" as a PS file.
I could then in Scribus import the PS file, and all the syntax
highlighting was intact. Checking at high zoom, the resolution of
characters was excellent. I noted that I could have sent from firefox as
a PDF file, which should also work.
This method is humorously different than what I had imagined :)
It does work. Though there seems to be a "gotcha" that would be
problematic if I can't find a way to work around it....
- When I import the .ps file through the "Import > Get vector file" option,
the code is placed on a large white canvas, the code takes up a small
portion of the canvas, and there doesn't seem to be any way to crop it.
This is easier to deal with than you think.
PostScript and PDF files are groups of objects, usually groups of groups
of groups, finally down to individual characters.
Usually there is some sort of "container", which I guess is the large
canvas you're talking about. In my case it had no color.
So ungroup until you're down to the level you need, delete the parts you
don't want. You probably want to then group the parts (lines of code)
that you do want, so you can move them around together and position as
needed.

The other thing to consider is trimming down the original source before
converting to html, then PS.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Peter Nermander
2017-01-04 19:34:30 UTC
Permalink
- When I import it as an image frame the resolution is horrible, so I go
Post by Alec Hill
into the filename.html and set large fontsize, reopen that in firefox, and
re-print to the post script file. By the time I've enlarged the font
enough to get a good resolution in Scribus, half of the code is
clipped/cropped out of the image. And playing with this some more, the
background color that is specified in the .html file does not seem to get
preserved when firefox goes to print it and the font colors get altered
then as well.
Did you try to export to PDF? Or try to change the preview resolution to
high?

Because normally Scribus renders preview at a lower resolution to improve
performance.

Also note that when exporting to PDF there is a checkbox for _not_
rasterizing embedded PDF/Postscript at PDF export (it is labeled as
experimental mainly due to that color management is not correctly handled).

/Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170104/0fdccb02/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-04 19:55:07 UTC
Permalink
Post by Alec Hill
- When I import it as an image frame the resolution is horrible, so I go
Post by Alec Hill
into the filename.html and set large fontsize, reopen that in firefox, and
re-print to the post script file. By the time I've enlarged the font
enough to get a good resolution in Scribus, half of the code is
clipped/cropped out of the image. And playing with this some more, the
background color that is specified in the .html file does not seem to get
preserved when firefox goes to print it and the font colors get altered
then as well.
Did you try to export to PDF? Or try to change the preview resolution to
high?
Because normally Scribus renders preview at a lower resolution to improve
performance.
Also note that when exporting to PDF there is a checkbox for _not_
rasterizing embedded PDF/Postscript at PDF export (it is labeled as
experimental mainly due to that color management is not correctly handled).
Especially for something like posters, I would not import into a text
frame. You really need to use a vector image so you can stretch to the
size you need.
You can import PDF as vectors only in the 1.5.x series, not 1.4.x or
earlier, but you can import PS as vectors in all. After import as
vector, zooming to 2000% or more continued to show sharp margins of the
characters. So if you wanted, you could probably make a billboard out of it.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Christoph Schäfer
2017-01-05 06:52:03 UTC
Permalink
Gesendet: Mittwoch, 04. Januar 2017 um 16:00 Uhr
Betreff: [scribus] designing instructional posters on code/programming -- lots of syntax highlighting
Hello folks :)
I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...
I need to design informational/instructional posters that have lots of code
samples in which the code is properly syntax-highlighted like you'd see in
Kate/Gedit/Vim/any IDE etc.
What approach should I take for this?
Hi Alec,

Please try the following: Enable sytax hightlighting for the language you are using in Kate or KWrite (assuming you are using Linux or *BSD). Export the file as HTML.

Launch LibreOffice Writer (*not* LibreOffice Writer Web), open the HTML file and save it as ODT. You can then import the ODT file into a Scribus text frame with all colours intact.

HTH,
Christoph

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-05 14:34:20 UTC
Permalink
Post by Christoph Schäfer
Gesendet: Mittwoch, 04. Januar 2017 um 16:00 Uhr
Betreff: [scribus] designing instructional posters on code/programming -- lots of syntax highlighting
Hello folks :)
I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...
I need to design informational/instructional posters that have lots of code
samples in which the code is properly syntax-highlighted like you'd see in
Kate/Gedit/Vim/any IDE etc.
What approach should I take for this?
Hi Alec,
Please try the following: Enable sytax hightlighting for the language you are using in Kate or KWrite (assuming you are using Linux or *BSD). Export the file as HTML.
Launch LibreOffice Writer (*not* LibreOffice Writer Web), open the HTML file and save it as ODT. You can then import the ODT file into a Scribus text frame with all colours intact.
This seems like a great solution, though I can't seem to get it to work.
I get the HTML markup in LibreOffice, and then in Scribus after saving
as ODT.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Fahad Al-Saidi
2017-01-05 14:58:25 UTC
Permalink
Post by Christoph Schäfer
Hi Alec,
Please try the following: Enable sytax hightlighting for the language you
are using in Kate or KWrite (assuming you are using Linux or *BSD). Export
the file as HTML.
Post by Christoph Schäfer
Launch LibreOffice Writer (*not* LibreOffice Writer Web), open the HTML
file and save it as ODT. You can then import the ODT file into a Scribus
text frame with all colours intact.
This seems like a great solution, though I can't seem to get it to work.
I get the HTML markup in LibreOffice, and then in Scribus after saving
as ODT.

Greg

___


The above solution doesn't work for me but what works for me is copying the
code from firefox and paste it into libreoffice writer then save it as ODT
then import it into scribus.
Cheers,
Fahad Al-Saidi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170105/e854b2be/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-05 15:35:58 UTC
Permalink
Post by Christoph Schäfer
Post by Christoph Schäfer
Hi Alec,
Please try the following: Enable sytax hightlighting for the language you
are using in Kate or KWrite (assuming you are using Linux or *BSD). Export
the file as HTML.
Post by Christoph Schäfer
Launch LibreOffice Writer (*not* LibreOffice Writer Web), open the HTML
file and save it as ODT. You can then import the ODT file into a Scribus
text frame with all colours intact.
This seems like a great solution, though I can't seem to get it to work.
I get the HTML markup in LibreOffice, and then in Scribus after saving
as ODT.
Greg
___
The above solution doesn't work for me but what works for me is copying the
code from firefox and paste it into libreoffice writer then save it as ODT
then import it into scribus.
I couldn't get this to work either and retain syntax highlighting. I was
able to get it to work by exporting as PDF from LibreOffice after
pasting from the browser, but the downside was that in KWrite I use a
colored background, which came through to LO and then the PDF.

For me, KWrite -> export as HTML -> print as PS file -> import to
Scribus as vector works the best, and eliminates the extra step of
LibreOffice.

Perhaps there is some setting in LO to interpret the HTML markup.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Alec Hill
2017-01-05 16:43:32 UTC
Permalink
Post by Gregory Pittman
Post by Christoph Schäfer
Post by Christoph Schäfer
Hi Alec,
Please try the following: Enable sytax hightlighting for the language
you
Post by Christoph Schäfer
are using in Kate or KWrite (assuming you are using Linux or *BSD).
Export
Post by Christoph Schäfer
the file as HTML.
Post by Christoph Schäfer
Launch LibreOffice Writer (*not* LibreOffice Writer Web), open the HTML
file and save it as ODT. You can then import the ODT file into a Scribus
text frame with all colours intact.
This seems like a great solution, though I can't seem to get it to work.
I get the HTML markup in LibreOffice, and then in Scribus after saving
as ODT.
Greg
___
The above solution doesn't work for me but what works for me is copying
the
Post by Christoph Schäfer
code from firefox and paste it into libreoffice writer then save it as
ODT
Post by Christoph Schäfer
then import it into scribus.
I couldn't get this to work either and retain syntax highlighting. I was
able to get it to work by exporting as PDF from LibreOffice after
pasting from the browser, but the downside was that in KWrite I use a
colored background, which came through to LO and then the PDF.
For me, KWrite -> export as HTML -> print as PS file -> import to
Scribus as vector works the best, and eliminates the extra step of
LibreOffice.
Perhaps there is some setting in LO to interpret the HTML markup.
Greg
Thank you all for the input! Go team :)

## Method A ##

What's working best for me is:
1) Open code_file.php in Kate/whichever and Export as HTML
2) Open code_file_php.html in Firefox and copy the rendered code
3) Paste that code into LO Writer and save as .odt
4) Import that into a text frame in scribus.

This gives me code in scribus that looks exactly how it does in Kate --
except that background color is missing in Scribus, which is fine because
it's easy to re-create.

## 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.
Post by Gregory Pittman
Did you try to export to PDF? Or try to change the preview resolution to
high?
Post by Gregory Pittman
Because normally Scribus renders preview at a lower resolution to improve
performance.
No I didn't think of / realize that. Noted for future use. Thank you.

## 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.

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-05 17:21:00 UTC
Permalink
Post by Alec Hill
## 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).
Post by Alec Hill
## 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))
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)
! 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

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Alec Hill
2017-01-05 18:28:02 UTC
Permalink
Post by Gregory Pittman
Post by Alec Hill
## Method B ##
Printing to postscript from the web browser changes the coloring (greys
get
Post by Alec Hill
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
Post by Alec Hill
looks really good in kate or other editors, but once I import the .ps
file
Post by Alec Hill
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).
Oh yes, the grouping --- ungrouping did allow me to get rid of the
background/canvas, and now I see how it could be made to correct for the
changed colors.
Post by Gregory Pittman
Post by Alec Hill
## Method D (for Danger) ##
Noone's said anything about Tex... is this a scary subject? It kinda
scares me ;^)
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.
Yeah, I guess my question is whether Scribus is capable of invoking Minted
correctly.
But I'll leave this be for now, though I may explore this more in the
future.

'Method A' of copy-paste from browser into Writer and saving as odt works
quite well enough :)

Thanks again!
-Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170105/4efc9e35/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Lars Behrens
2017-01-06 10:05:14 UTC
Permalink
Post by Alec Hill
'Method A' of copy-paste from browser into Writer and saving as odt works
quite well enough :)
Fine.

Just fyi, I did a very quick test with the 'listings' package and the
LaTeX-method works here (Ubuntu 14.04). The big advantage is that one
can edit right inside of Scribus and does not have to go via several
applications.

So in the future it might be worth a try.

Best,
Lars


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5373 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170106/20ebe5ab/attachment.bin>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-06 14:56:55 UTC
Permalink
Post by Lars Behrens
Post by Alec Hill
'Method A' of copy-paste from browser into Writer and saving as odt works
quite well enough :)
Fine.
Just fyi, I did a very quick test with the 'listings' package and the
LaTeX-method works here (Ubuntu 14.04). The big advantage is that one
can edit right inside of Scribus and does not have to go via several
applications.
So in the future it might be worth a try.
Great Lars!

Maybe you might explain the process so that we might have something on
the wiki about this. Having done a few things with Render frames, I know
from experience it's not as easy as it would seem at first. You have the
learning curve for LaTeX, and then its peculiarities in Render frames.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Lars Behrens
2017-01-06 19:51:27 UTC
Permalink
Post by Gregory Pittman
Maybe you might explain the process so that we might have something on
the wiki about this. Having done a few things with Render frames, I know
Yes, sure. Glad if I can help.

Short instruction:

As I am no LaTeX hero myself, I just did an internet search "latex
syntax highlighting" which made me find this page:

https://www.overleaf.com/latex/examples/syntax-highlighting-in-latex-with-the-listings-package/jxnppmxxvsvk

from there I copied the basics into a render frame and that just worked
(the given color names didn't work for me, so I changed them).

Step by step instruction:

---------------------------------------------------------------------
*** Display highlighted code with a render frame in Scribus

- Prerequisites: Of course you need LaTeX installed, plus the
"listings"-package which may or may not be in your default LaTeX
installation, depending on your environment. A pdf file with detailed
documentation "listings.pdf" should be available in your LaTeX
documentation directory when you have the package on board (e.g.
/usr/share/doc/texlive-doc/latex/listings/ in Ubuntu).

- In Scribus insert a render frame (shortcut "D")

- Right-click on the frame and choose "Edit Source"

- On the "Fonts/Headers" tab insert the following in the "Additional
Headers" text field on the right:

\usepackage{listings}
\usepackage{color}
\lstset{ %
backgroundcolor=\color{white}, % choose the background color
basicstyle=\footnotesize, % size of fonts used for the code
breaklines=true, % automatic line breaking only whitespace
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{green}, % comment style
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
keywordstyle=\color{blue}, % keyword style
stringstyle=\color{red}, % string literal style
}

The variables in the lstset section define how your source code examples
will be displayed, find details in the mentioned doc file "listings.pdf".

- Remove the example text in the code field on the left

- Now you can insert your code examples in the text field on the left.
Make sure that you choose the right language in the "[language=XXX]"
tag. A short example in Java:

\section{Java}
\begin{lstlisting}[language=java]
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
for (int i = 0; i < 100; ++i) {
System.out.println(i);
}
}
}
\end{lstlisting}

As you can see, basically you just have to surround your code example with
\begin{lstlisting}[language=YourLanguage]

\end{lstlisting}

- by clicking the "Update" button at the bottom of the render frame
dialog you can check if your code is rendered correctly

- make sure to click "Ok" when your done inserting your example code,
otherwise your input might get lost

- you can edit your code at any time by right clicking the render frame
again and clicking "Edit Source"

- if you need more render frames just copy an existing one and edit it,
so that you won't have to go through the process of inserting the header
lines again.

Examples mainly with the help of this page:
https://www.overleaf.com/latex/examples/syntax-highlighting-in-latex-with-the-listings-package/jxnppmxxvsvk
---------------------------------------------------------------------

Hope that is helpfull and understandable, as English is not my mother
tongue.

Cheerz,
Lars


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5373 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170106/94a6cf69/attachment.bin>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-07 17:20:05 UTC
Permalink
Post by Lars Behrens
Post by Gregory Pittman
Maybe you might explain the process so that we might have something on
the wiki about this. Having done a few things with Render frames, I know
Yes, sure. Glad if I can help.
As I am no LaTeX hero myself, I just did an internet search "latex
https://www.overleaf.com/latex/examples/syntax-highlighting-in-latex-with-the-listings-package/jxnppmxxvsvk
Thanks to Lars, I was able to slave my way through this last night (and
slaving it was!), and today made a wiki page outlining the process using
a Python script as an example:

https://wiki.scribus.net/canvas/Render_frames_and_the_LaTeX_listings_package

Using LaTeX and render frames for this is a LOT of work unless you have
an excellent understanding of LaTeX to begin with. Even so, as the
screenshots show, it's not clear to me that the render frame method is
worthwhile. One might even question how much we need render frames given
the ability to import PDFs as vectors in 1.5.x versions.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Lars Behrens
2017-01-08 00:20:14 UTC
Permalink
Post by Gregory Pittman
Thanks to Lars, I was able to slave my way through this last night
(and slaving it was!), and today made a wiki page outlining the
https://wiki.scribus.net/canvas/Render_frames_and_the_LaTeX_listings_package
Thanks for your effort in the wiki. I dug through the page and followed
your examples.

I was surprised that you had such problems, because here on Unbuntu
14.04 with Scribus 1.4.2 the only thing that caused a choke was the
copyright symbol in your original example, the comment signs don't cause
any problems here.

There's also no difference in font display here (I declared my tex file
for import into scribus as "\documentclass[a4paper,11pt]{extarticle}"
like scribus does internally, but I don't think that this is the real
source for the difference on your side). I can't zoom

So there may be a difference either in Scribus' LaTeX handling between
1.4.2 and 1.5 or in the LaTeX systems on your and my computer.

Or I didn't understand the problem :)
Post by Gregory Pittman
method is worthwhile. One might even question how much we need render
frames given the ability to import PDFs as vectors in 1.5.x
versions.
While I agree that using LaTeX for syntax highlighting in Scribus might
be not the best or most practicable idea for some or even most users, I
don't quite agree with your questioning render frames generally.

I find them extremely helpful when dealing with scientific posters or
scientific text containing formulas generally and when there are "moving
targets" among them which may have to be changed eventually. Not having
to leave Scribus makes the workflow much easier and helps to keep an
overview.

I would really miss render frames.

Cheerz,
Lars

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5373 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170108/081356a6/attachment.bin>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-08 01:02:58 UTC
Permalink
Post by Lars Behrens
Post by Gregory Pittman
Thanks to Lars, I was able to slave my way through this last night
(and slaving it was!), and today made a wiki page outlining the
https://wiki.scribus.net/canvas/Render_frames_and_the_LaTeX_listings_package
Thanks for your effort in the wiki. I dug through the page and followed
your examples.
I was surprised that you had such problems, because here on Unbuntu
14.04 with Scribus 1.4.2 the only thing that caused a choke was the
copyright symbol in your original example, the comment signs don't cause
any problems here.
Basically I thought that sorting out the issue that came up with
pdflatex outside of Scribus wasn't of great interest to me. Especially
since it's been quite a while since I generated LaTeX files, I had slid
down my prior learning curve, and the documentation that comes with
listings has a paucity of real world concrete examples. I had to modify
the simple examples they showed in order to get them to work.
Post by Lars Behrens
There's also no difference in font display here (I declared my tex file
for import into scribus as "\documentclass[a4paper,11pt]{extarticle}"
like scribus does internally, but I don't think that this is the real
source for the difference on your side). I can't zoom
So there may be a difference either in Scribus' LaTeX handling between
1.4.2 and 1.5 or in the LaTeX systems on your and my computer.
Or I didn't understand the problem :)
Post by Gregory Pittman
method is worthwhile. One might even question how much we need render
frames given the ability to import PDFs as vectors in 1.5.x
versions.
While I agree that using LaTeX for syntax highlighting in Scribus might
be not the best or most practicable idea for some or even most users, I
don't quite agree with your questioning render frames generally.
I find them extremely helpful when dealing with scientific posters or
scientific text containing formulas generally and when there are "moving
targets" among them which may have to be changed eventually. Not having
to leave Scribus makes the workflow much easier and helps to keep an
overview.
I would really miss render frames.
Render frames exist, as I see it, because at the time, importing a PDF
as a vector image didn't exist, so this was the workaround. What I was
envisioning was that, rather than having something like a render frame,
which I guess we have to say creates a PDF, then rasterizes it into a
frame, why not have the same process generate a PDF that we import as a
vector as the final result? Ok, perhaps there is some expediency in
having this rasterization for review, but finally, why not favor quality
over expediency? At this stage of Scribus development, the current
results of render frames looks shabby and nonprofessional. InDesign
would be made a laughingstock if they did something like this - good
enough for hobbyists, not professionals.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Andreas Vox
2017-01-08 09:52:51 UTC
Permalink
Am 08.01.2017 2:03 vorm. schrieb "Gregory Pittman" <***@iglou.com>:



Render frames exist, as I see it, because at the time, importing a PDF
as a vector image didn't exist, so this was the workaround. What I was
envisioning was that, rather than having something like a render frame,
which I guess we have to say creates a PDF, then rasterizes it into a
frame, why not have the same process generate a PDF that we import as a
vector as the final result? Ok, perhaps there is some expediency in
having this rasterization for review, but finally, why not favor quality
over expediency? At this stage of Scribus development, the current
results of render frames looks shabby and nonprofessional. InDesign
would be made a laughingstock if they did something like this - good
enough for hobbyists, not professionals.


Basically render frames generate a PDF via an external command and places
that into an image frame. That is why you should not rasterize PS/PDF
images on export if you use render frames.

You can edit the render frame template for LaTeX to invoke other tools on
your system. You could probably get minted to work, too, if you adapt the
template.

Render frames and PDFs placed in image frames are more efficient than
importing PDF as Scribus objects.
For editing text in Scribus, odt Import currently works best.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170108/9eaea780/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-08 17:50:23 UTC
Permalink
Post by Andreas Vox
Basically render frames generate a PDF via an external command and places
that into an image frame. That is why you should not rasterize PS/PDF
images on export if you use render frames.
I've looked at this again, and now can finally understand the setting in
PDF Export about embedding the PDF. Yes, this does make a big
difference, with the output indistinguishable from using pdflatex alone.
I've updated the page on the wiki to show this:

https://wiki.scribus.net/canvas/Render_frames_and_the_LaTeX_listings_package#Two_methods:_Head-to-Head

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Alec Hill
2017-01-09 22:57:30 UTC
Permalink
https://wiki.scribus.net/canvas/Render_frames_and_the_LaTeX_listings_package#Two_methods:_Head-to-Head

I'll try this out and see if the demonstration of using listings can
illuminate for me what went wrong with my minted efforts. When I got
minted to work I was using pdflatex, so minted works on my system in that
context.

Listings is considered inferior to minted
<http://tex.stackexchange.com/questions/102596/minted-vs-texments-vs-verbments>
because it doesn't utilize a full lexer, supposedly. In practice I'm not
sure what this means, but I wonder or suspect that it would deal with how
the code gets colored, for example...

I've got arrays in which the value is usually a string but sometimes a
boolean. In Vim the array values are displaying consist in color
regardless of whether it's boolean or string, whereas Kate and other
applications are displaying the booleans a different color.

Being able to fine-tune that is appealing, kinda, though not needing to
sounds much better ;^)
Post by Owen Cook
1. Use Vim (the latest version on Linux Mint 18.1 is what I used)
2. Drop your code into vim
3. Then print the file to postscript
:hardcopy >file.ps
4. Open Scribus (I am using the latest 1.5.3 and import your ps vector
file.

So I was very intrigued by this Vim method :hardcopy > file.ps ((thanks!))
but even though Vim supposedly just uses the colors that are currently
being displayed, I got altogether different colors. I may explore this one
more also.

Grateful that I'm not going this way alone :)
Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170109/72692ccc/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2017-01-10 01:33:33 UTC
Permalink
Post by Gregory Pittman
https://wiki.scribus.net/canvas/Render_frames_and_the_LaTeX_listings_package#Two_methods:_Head-to-Head
I'll try this out and see if the demonstration of using listings can
illuminate for me what went wrong with my minted efforts. When I got
minted to work I was using pdflatex, so minted works on my system in that
context.
If you can make minted work with pdflatex, you should be able to get it
to work in a render frame. Look on the wiki page how the parts of your
latex need to be divided up in the Edit Source dialog, and some things
you don't need, like \begin{document}.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Lars Behrens
2017-01-10 08:11:42 UTC
Permalink
Am Mon, 9 Jan 2017 20:33:33 -0500
Post by Gregory Pittman
If you can make minted work with pdflatex, you should be able to get
it to work in a render frame. Look on the wiki page how the parts of
your latex need to be divided up in the Edit Source dialog, and some
things you don't need, like \begin{document}.
I second that.

Scribus internally just uses pdflatex for renderframes per default.
So, like Greg said, if your not afraid of or even capable of LaTeX
usage, then using renderframes could be an option to look at.

Cheerz,
Lars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5787 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20170110/5d4e6a95/attachment.bin>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
ale rimoldi
2018-05-20 16:33:59 UTC
Permalink
hi alec

if you're interested in a solution that does not involve postscript, i
would be willing to work on it.

my preferred way would be a python script that runs in scribus and scans
all the frames for code (attributes? paragraph styles?) and applies
character styles for the highlighting.

you will probably then have to use 1.5.x, since it's likely that
i will need to create small patches to scribus and improve the
scripter (the patches will be proposed for inclusion in the scribus main
code).

the alternative is an external python script that produces html files,
that then can then be imported in scribus.
on top of it a python scripts runs inside of scribus and updates the
frames from the external html files.
in this case too, it might be necessary to improve the html importer
and possible the scripter.
again, you'll probably need to use the development
version of scribus.

defining a css file that can be read by scribus, is an interesting
project and i might be able to create a scribus plugin that exports and
imports css for syncing the styles between files.
it is very likely that it also would be integrated in the development
version of scribus.

so, if you're ready to work with the development version of scribus, i
could write a project description (and make you a quote).

hiring me is possible, but i'm not sure it will be trivial.
i'm probably not in the same country as you and i'm not yet officially
a freelancers... i won't relocate, but i can do the paperwork with my
tax authorities.

getting money for this project is not a condition for me to work on
it, but i would welcome it, i could earn some money through it.

finally, getting the whole thing to work with the stable scribus 1.4 is
for sure possible, but i would only do it for money and only by first
programming it for the development version and then porting the code to
the stable version.

have a wonderful start to the week
a.l.e

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Alec Hill
2018-06-01 15:54:29 UTC
Permalink
Hello a.l.e -- thanks for the response! (and for all your contributions to
Scribus too of course!)

I'm unfamiliar with some of the technical parts of your proposition --
primarily Scribus's html importer and its scripter -- and so that prompted
me to dig back in and see what sense I could make of the place where I left
off.

It turns out, I wasn't far from having a working solution and I now have a
workflow that might be sufficient!

Mainly I just had to mess around with latex to solve some formatting
problems in the pdf's generated by pdflatex.

I'm embedding these pdfs in scribus. Is there any downside to that?

And I made a shell script to run on a directory of code that will
regenerate all the pdfs. Scribus pulls in these updated versions
automatically.

I'm very pleased to have something working like this, and as long as
embedding pdfs in Scribus isn't a bad practice to avoid (is this ok?) then
I think I'll be all set with this.

Thanks,
Alec
Post by ale rimoldi
hi alec
if you're interested in a solution that does not involve postscript, i
would be willing to work on it.
my preferred way would be a python script that runs in scribus and scans
all the frames for code (attributes? paragraph styles?) and applies
character styles for the highlighting.
you will probably then have to use 1.5.x, since it's likely that
i will need to create small patches to scribus and improve the
scripter (the patches will be proposed for inclusion in the scribus main
code).
the alternative is an external python script that produces html files,
that then can then be imported in scribus.
on top of it a python scripts runs inside of scribus and updates the
frames from the external html files.
in this case too, it might be necessary to improve the html importer
and possible the scripter.
again, you'll probably need to use the development
version of scribus.
defining a css file that can be read by scribus, is an interesting
project and i might be able to create a scribus plugin that exports and
imports css for syncing the styles between files.
it is very likely that it also would be integrated in the development
version of scribus.
so, if you're ready to work with the development version of scribus, i
could write a project description (and make you a quote).
hiring me is possible, but i'm not sure it will be trivial.
i'm probably not in the same country as you and i'm not yet officially
a freelancers... i won't relocate, but i can do the paperwork with my
tax authorities.
getting money for this project is not a condition for me to work on
it, but i would welcome it, i could earn some money through it.
finally, getting the whole thing to work with the stable scribus 1.4 is
for sure possible, but i would only do it for money and only by first
programming it for the development version and then porting the code to
the stable version.
have a wonderful start to the week
a.l.e
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20180601/05136165/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
ale rimoldi
2018-06-12 15:06:03 UTC
Permalink
hi alex
Post by Alec Hill
It turns out, I wasn't far from having a working solution and I now
have a workflow that might be sufficient!
that's perfect, then!
scribus still needs to a way for syncing text sources but it does not
have to be right now : - )
Post by Alec Hill
I'm embedding these pdfs in scribus. Is there any downside to that?
depending on how you're embedding the pdfs you will lose the color
management and / or the text will be converted to outlines.

but if it's not an issue for you, it's all fine!

ciao
a.l.e

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net

Owen Cook
2017-01-05 22:30:59 UTC
Permalink
Post by Alec Hill
Hello folks :)
I would greatly appreciate some advice about what direction to go...
realizing this may be a bit of a rabbit hole that might require I spend
several hours learning various things, if it's a rabbit hole indeed I'd
like to avoid travelling the wrong tunnels if possible...
I need to design informational/instructional posters that have lots of code
samples in which the code is properly syntax-highlighted like you'd see in
Kate/Gedit/Vim/any IDE etc.
What approach should I take for this?
I have been following the ensuing thread. Perhaps try this;

1. Use Vim (the latest version on Linux Mint 18.1 is what I used)

2. Drop your code into vim

3. Then print the file to postscript

:hardcopy >file.ps

4. Open Scribus (I am using the latest 1.5.3 and import your ps vector file.


All good, an example is

http://members.pcug.org.au/~rcook/scribus/perl_poem.ps (original ps)
http://members.pcug.org.au/~rcook/scribus/perl_poem.sla (A0 size sla)
http://members.pcug.org.au/~rcook/scribus/perl_poem.pdf (resulting pdf)






___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Loading...