Author Topic: Fixing bugs for the render frame and latex...  (Read 5955 times)

pilotmm

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Fixing bugs for the render frame and latex...
« on: August 12, 2011, 03:13:26 am »
Hello There

           New to the scribus community... I have been playing with the render box and noticed some bugs and actually made some fixes. I wanted to pass on the fix to the larger community. However I could not get an account on the bugtracker. Still waiting to get the verification e-mail.

          the problem was when a latex render render was too wide it would cut off the text because the frame would be larger than the a4paper size.

          So the fix is in the preamble in the xml. There are two changes in the \documentclass line and the \usepackage{geometry} line. I simply removed the paper size option, then used geometry to set the paper size, using the scribus "$scribus_realwidth$" and "$scribus_realheight$" macros. See below....

\documentclass[$scribus_fontsize$]{extarticle}
\usepackage[left=0cm,top=0cm,right=0cm,bottom=0cm,nohead,nofoot,paperwidth=$scribus_realwidth$ pt,paperheight=$scribus_realheight$ pt]{geometry}

          This way it will always render on a page the same size as the frame.

Thanks

pilotmm

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Fixing bugs for the render frame and latex...
« Reply #1 on: August 12, 2011, 03:36:39 am »
I want to posterize a small article in latex... instead of making a text box for everything I am trying to copy and paste all my latex code directly into the render frame....

there is a problem though.... the text size options are limited.... so I would like to make a suggestion to fix this. In the preamble, after the \begin{document} there should be a line like:

\fontsize{$scribus_fontsize$}{$scribus_linesize$}\selectfont

Then instead of the predefined sizes in the "Fonts/Headers" tab, there could be an actual counter for it all to work. Then a custom paragraph line spacing and font size can be managed by scribus. This line will not work as it stands now. I have made up the "$scribus_linesize$" macro and $scribus_fontsize$ puts a pt at the end that needs to be stripped. I am not familiar enough with the code to make these changes but hoping the more involved community members will incorporate this....

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2052
  • Karma: 27
    • the graphics lab
Re: Fixing bugs for the render frame and latex...
« Reply #2 on: August 12, 2011, 03:38:36 pm »
hi

please post the patch file to the bug tracker!

i'm sure you'll get the confirmation mail, sooner or later :-)

a.l.e

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2052
  • Karma: 27
    • the graphics lab
Re: Fixing bugs for the render frame and latex...
« Reply #3 on: August 12, 2011, 03:41:24 pm »
the font size it's probably a good idea, too

iirc, there is already a workaround which already allows to set a custom text size, but a clean solution would be much nicer!

ciao
a.l.e

dh

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
  • Scribus User
Re: Fixing bugs for the render frame and latex...
« Reply #4 on: May 08, 2012, 09:40:33 am »
Hey pilotmm and a.l.e, do either of you know the status of incorporating pilot mm's fix into scribus?  I'm on 1.4.1, and was just bit by this glitch when my latex render frame was wider than a4.  I independently came up with the same fix:

--- 100_latex.xml.orig   2012-01-01 06:45:11.000000000 -0500
+++ 100_latex.xml   2012-05-08 01:09:27.000000000 -0400
@@ -107,15 +107,14 @@
       </i18n>
    </empty-frame-text>
    <preamble>
-      \documentclass[a4paper,$scribus_fontsize$]{extarticle}
+      \documentclass[$scribus_fontsize$]{extarticle}
       \usepackage[utf8]{inputenc}
-      \usepackage[left=0cm,top=0cm,right=0cm,bottom=0cm,nohead,nofoot]{geometry}
+      \usepackage[paperwidth=$scribus_realwidth$pt,paperheight=$scribus_realheight$pt,left=0cm,top=0cm,right=0cm,bottom=0cm,nohead,nofoot]{geometry}
       \title{Scribus-Latex-File}
       $scribus_font$
       $scribus_additionalheaders$
       \author{Scribus}
       \pagestyle{empty}
-      \setlength{\textwidth}{$scribus_realwidth$ pt}
       \begin{document}
    </preamble>
    <postamble>

If no one has submitted this to the bug database yet, I'd love to get the ball rolling so that no one else needs to reinvent the wheel.  :)

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2052
  • Karma: 27
    • the graphics lab
Re: Fixing bugs for the render frame and latex...
« Reply #5 on: May 08, 2012, 02:40:12 pm »
any link to the bug submitted? i couldn't find it...

Nermander

  • Hero Member
  • *****
  • Posts: 1305
  • Karma: 17
Re: Fixing bugs for the render frame and latex...
« Reply #6 on: May 08, 2012, 03:40:08 pm »
I think a.l.e. missed the following line:

If no one has submitted this to the bug database yet, I'd love to get the ball rolling so that no one else needs to reinvent the wheel.  :)


Kunda

  • Administrator
  • Full Member
  • *****
  • Posts: 218
  • Karma: 2
  • Scribus User
Re: Fixing bugs for the render frame and latex...
« Reply #7 on: August 10, 2015, 03:56:02 pm »
Did this ever get submitted to the bug tracker ?

 

palmate