I want to print a missing sheet from the old book. I found text in Internet and measured the page size and margins. After compiling the LaTeX script, it looks good, but doesn't fit to one sheet (two pages). With text size of 9pt text takes up less than two full pages, and with 10pt - more than two pages. How to fit this text to two pages?
Found solution: \linespread{0.93}
Related
I have a dynamic PDF report which gives monthly report of our database. I am using Prawn to generate the PDF report.
The monthly report can contain maximum of 90 rows (maximum 3 per day). There can also be days with no record. So, the number of rows in a monthly report is highly dynamic.
The client needs the report in a single page PDF. They dont care if the font size becomes very small or the row height is really small. But the contents should fit in a single page.
They have shown examples of PDF that are generated using their previous application. In those, it seems that they are creating the table with a fixed font size and row height etc. and they are somehow zooming out so that the PDF has some whitespace in the right side of the page, but it fits in a single page.
Something like this:
Is there a way to achieve this in Prawn?
The needed page layout can be easily achieved with PD4ML's fitPageVertically() API call - but PD4ML approach differs from Prawn quite significantly.
With PD4ML you have to generate an HTML document with report data/table (not that tricky to do) and after that pass it to PD4ML for a converting to PDF.
PD4ML in Ruby scenario can be launched as a standalone converter application.
You can build a fixed size table for print with option:
overflow: :shrink_to_fit
in table cells. That will shrink to a smaller font automatically.
given the number of rows to be print, you can dynamically adjust tables row heights
see: http://prawnpdf.org/prawn-table-manual.pdf
Latex seems to fill in white space between the paragraphs by default, to get every page to end at approx the same height (at least with the book and scrreprt class). This is all fine, but I have a couple of pages with only two paragraphs. Latex insists on putting in 2cm of white space between them, which looks bad. I know that I can use \raggedrift for the whole document, but I kind of like the white fill except for the pages with only two paragraphs. I have also tried to adjust manually with \vspace{-1cm}, but it doesn't seem to work.
Is there a way to set a maximum value to the height of white fill between paragraphs?
If your mostly-empty pages are because the following content starts on a new page (at the end of a chapter, for example), then the easiest way to fix it is probably to insert a vertical fill after your last paragraph. The vertical fill should expand to occupy the extra space, keeping the inter-paragraph fill small.
You can change the vertical space applied to every paragraph by setting the value of \parskip.
The solution is very simple. At the end of the last paragraph of the page, add '\vfill'. This will fill up the rest of the page, making the two paragraphs on it move as close to each other as they would normally.
I just tested it myself and it works.
I'm trying to define a custom layout for my report for which I'm using fancyhdr. On the pages which contains a chapter start I want my header to contain a colorbox spanning across the whole page (0 cm margins) although keeping my defaults margin in the text area. I can get the box to span across the "margin notes" area, but not the other side. Here's some of my code:
\fancypagestyle{plain}{ % pages containing chapter start
\fancyhead{}
\fancyhead[RO]{\colorbox{NavyBlue}{\textcolor{White}{\raisebox{0cm}[1cm][0.5cm]{\makebox[3cm][c]{\textbf{\CNoV\thechapter}}}}}
}
Any ideas on how to do it?
UPDATE
alt text http://docs.google.com/File?id=dg4jt6qx_10nnpxfqdj_b
As you can see I want my header to span across the whole page (on pages containing chapter start). The text should have the normal margins..
Take a look at Fancy chapter headings example at the texample.net site.
It appears to be what your are looking for.
alt text http://media.texample.net/tikz/examples/PNG/fancy-chapter-headings.png
I'm not entirely sure what you want, but perhaps this is it:
\fancypagestyle{plain}{ % pages containing chapter start
\fancyhead{}
\fancyhead[RO]{\hspace*{-5cm}
\colorbox{NavyBlue}{\textcolor{White}{\raisebox{0cm}[1cm][0.5cm]{\makebox[25cm][c]{%
\textbf{\CNoV\thechapter}}}}}}
}
I'm looking for a way of linking box-like environments (e.g. minipages) in LaTeX, so that text that does not fit into the first box spills into subsequent boxes. E.g:
/begin{box-like-environment}
Text, too much to fit in this box...
/end{box-like-environment}
% some LaTeX here, possibly covering several pages...
/begin{box-like-environment}
% Text which doesn't fit in the first box should appear in this box
/end{box-like-environment}
The effect is something like the 'linked text boxes' of MS Publisher. Any ideas as to if and how this could be achieved?
The idea being, I guess, that the program figures out where to split the text between the two boxes, say so that you can have the text filled between two floats that face each other on opposite pages.
I have no idea how this might be done in Latex; Latex lacks sensitivity to page layout, so I'd guess it can't be done. Context is more sophisticated with regards to layout: it uses METAPOST to handle page layout, not primitive Tex, and there was discussion of something similar on the NTG mailing list: cf. Hans Hagen's post.
Maybe this is an option? There is some software for automatic translation of Latex to Context.
I have been alerted to the flowfram package, which does this.
I have a two-column paper where space restrictions are very tight.
I just looked at my last version of the manuscript and saw that the upper half contains a figure (as expected), but in the lower half there is a lot of vertical space between paragraphs (enough to squeeze 10 more lines), and that LaTeX probably added it so that in the beginning of the next page a new numbered section will begin at the top of the page.
I know there's a way to adjust this so LaTeX doesn't try so hard, but I'm not sure how. any help? Thanks!
The parameter that controls inter-paragraph spacing is called \parskip(See Paragraph Spacing ). You set it (with "rubber" values) using something like:
\setlength{\parskip}{1cm plus4mm minus3mm}
The defualt value of \parskip is class dependent. The "plus" and "minus" parts tell TeX how much it can adjust the value to improve the layout (that is they make the spacing elastic, thus the "rubber" designation). Reducing (or eliminating) the "plus" part of the rubber might help.
Watch out though, you can cause other layout artifacts if you constrain TeX too much.
Other things to think about:
The widow and club penalties probably apply section headings, and may be affecting TeX's layout choices (see https://stackoverflow.com/questions/512967/how-can-one-keep-a-section-from-being-at-the-end-of-a-page-in-latex for a discussion).
You may also want to consider messing with \baselineskip which controls the allowed spacing between lines of text and can also have rubber values.
This is a common problem, and there are probably some fairly sophisticated treatments already prepared on CTAN.
\vfill before the new section worked perfectly for me.