How to float long table in latex? - format

When I am using longtable in a two-column article in latex, I need to first make the article one-column by using \onecolumn. But the longtable starts from the next page, so the current page has too much unnecessary space. so what should I do to remove this space by adding content of the next section after the table?
Here is the snapshot of paper
---Some text ---
\onecolumn
\begin{longtable}{|p{1.5cm}|p{1.5cm}|p{3.5cm}|p{3.5cm}|p{3cm}|p{3.5cm}|}
Table text
\end{longtable}
\twocolumn
---some text---

Related

A way to make a Sphinx document subsection start a new page?

I need a way to escape from Sphinx’s limitation that HTML output contains one and only one page per level-1 heading. For the sake of readability, some of my document’s content must be divided into pages at a lower heading level.
I’m considering whether I can do this by manipulating the table of contents in the left sidebar, as follows.
Suppose I have a document with this structure:
Little section
A subsection
Another subsection
Big section
Level 2 in a big section
Another level 2 in a big section
Another little section
Normally the document would have three pages beginning with the headings “Little section,” “Big section,” and “Another little section.” But I want two additional pages, beginning with the headings “Level 2 in a big section” and “Level 2 in another big section.” I would do this as follows.
Put each level-2 section in a separate reST file, which makes its initial heading a level-1 heading from Sphinx’s point of view.
Add the :orphan: option to each “level 2” reST file so that it doesn’t appear in the sidebar TOC automatically.
Manually add level-2 entries to the sidebar TOC under “Big section” which have the text “Level 2 in a big section” and “Another level 2 in a big section,” and link to the orphaned “level 2” files.
I’m asking whether this is possible because I saw the following statement on sphinx-doc.org Directives page. I have put the relevant part in italics:
You can also give a “hidden” option to the [toctree] directive, like
this:
.. toctree::
:hidden:
doc_1
doc_2
This will still notify Sphinx of the document hierarchy, but not
insert links into the document at the location of the directive –
this makes sense if you intend to insert these links yourself, in a different style, or in the HTML sidebar.
This appears to say: Yes, what I propose is possible. But I can’t find a clue to how it’s done. Can anyone provide insight?

BIRT - How to List the Contents of Page Variable

I have a report with page variable implemented to display current/total page numbers for each customer. I have another requirement - Display a list of customer names and the respective page numbers contained in the report on the last page of the report(such as Company A - 3 pages, Company B - 4 pages).
It has to be proper looking with border lines.
I was able to implement the page variable by simply borrowing the code I've found on the Internet, but have no idea how to display the contents(customer names and page numbers) as a list at the end of the report.
Would someone help me to accomplish this requirement?
I don't think this is possible with BIRT.
In similar cases, and only for the special case of PDF output, we are using a post-processing approach, but it requires Java programming:
First, we let BIRT generate Table-of-Content entries ("outline" in PDF speech) for the companies.
The second-step is post-processing: we read the PDF using iText and examine the TOC. That way we get the information about which company starts at which page number. Together with the total page number it is easy to compute how many pages each company takes.
Then iText can generate and add a visible TOC (as you described) to the PDF.

Display Access data with image paths in Word document

I would like to make a Word product catalog from data stored in an Access 2007 database. I can of course use the "mail merge" function in Word for the text data, but I dont know how to make the images show up! They are they stored as file paths in Access and jpg-files in a directory on the hard drive. The images should have a special size, be right aligned to the text paragraphs so that the text is wrapping on the left side (see attached image).
This is possible, but works better in older versions of Word. Unfortunately, you don't mention which version you're using...
Anyway, the key to the question is to use an IncludePicture field to bring the picture in; pass the file path to the field using the MergeField (nested fields). You can find more information on the internet, for example: http://homepage.swissonline.ch/cindymeister/mergfaq1.htm#DBPic
The problem with an IncludePicture field is that it can't be wrapped. But if your version of Word is not too old, tables CAN wrap, so you put the IncludePicture field into a table that's a single cell. Position the table, wrap it, etc.

Automatically assign profile pics to pages in phpfox

Followed by my last question: Automatically create pages in phpfox
Now I'm trying to assign a list of pre-uploaded images to some pages as their profile picture in phpfox.
After checking data changes in the database, I only realized changes in these two fields:
image_path in table of phpfox_pages (which take a an address to the image file)
user_image in table of phpfox_user (which take a string of "user_id+%s".file_extension)
But by inserting data in these two fields in records for a page that has a default profile pic, it's profile pic would not change.
Is there any other fields or options that I should change?
Look at the file /module/pages/include/service/process.class.php In there look for the function update and around line 442 find this
if ($this->_bHasImage)
This piece of code handles setting an image for the page, notice how it creates three thumbnails, maybe the problem you're having is that you didn't create all the needed thumbs. You also need to update the column image_server_id.
Hope it helps
look phpfox_photo table in that you will find is_profile_photo attribute that is always 1 for the profile picture

Force a Content to in new page when generating a PDF

Im using play framework and rendering PDF usin rednerPDF() method.
I would like to display some part of content always be in new page.
For Example I have two tables, One table should be in first page and another table should in next page instead of continue from first page. The first table contents are dynamic and we can't sure the height of the table.
Is it possible?
Is it possible?Yes.
You said one table(first one) should be in first page,and again you said its content is dynamic.Now my question is it span over pages and in the next page you want to write second table?This is a generic scenario and what you mentioned is specific one.
You can start trying using two properties of PdfPTable setSplitLate() and setSplitRows()(just google it out for details read Itext In Action).Just keep Two table as two Rows of outer table.set those two property for inner as well as outer in some way as you want(i.e generic case/Specific case).
Another alternative way is use writeSelectedRows() method over PdfContentByte(I don't konw which Object you gonna use for manipulating pdf but you can get it from PdfWriter,*PdfStamper* by using getDirectContent/*UnderContent*/OverContent) after generating table.To use this method you have to set total width of the table so the height can be calculated by method getTotalHeight of PdfPTable.If You use this height properly you absolutely know where your table ends.But all these specific part you have to read & understand first.
With yahp you can use a special html tag to force a page break
<yahp:pb />
we can achieve this by page-break-after:always
Please refer
Alternate to PDF for dynamically generated document with page breaks

Resources