LaTeX document with several margin settings - layout

I am working on a latex document that needs two different margin settings.
The first part is a header that must have a 0.25in on both sides. It is made of an image and three to five text lines arranged in two columns.
Second part is the main body text with 1in in on both sides. This text can be several pages long.
The header is shown only on the first page.
Right after that header, the second part starts, in the same page. This second part is the document's main body.
I use the geometry page to set margins (for the header), but if write the header and then use \newgeometry command, the main text starts on the next page and I need to place them on the same one.
I do not want to use an image for the header as it will change often and I will create many documents with that structure.
Are there some way to create the document with the main text margins and create "an exception margin" just to insert the header on the same page? Suggestions are welcome :-D
I have tried the following:
\documentclass{article}
% This settings work for the header
\usepackage[margin=0.25in]{geometry}
% Dummy text generator
\usepackage{blindtext}
% Just to simulate logo
\usepackage{tikz}
\begin{document}
% Document Header, first page only
\begin{minipage}[t]{2in}
\vskip0pt
\begin{tikzpicture}
\fill [blue!30] (0,0) rectangle (1.75in, 1.5in);
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}[t]{2.5in}
\vskip0pt
This is the first text block with some info about the company, department another stuff. It is only text.
\end{minipage}
\hfill
\begin{minipage}[t]{3in}
\vskip0pt
This is a second text block with information about content creator, editor, etc. and it just text.
\end{minipage}
\hrulefill
% Starting from here, I need narrow margins, about 1 inch on the left and right. The text must start right after the header
% I have tried with \newgeometry{left=1in,right=1in} but the text starts on the new page.
\section{First section}
\blindtext
\section{Second section}
\blindtext
Text, text and more text... several pages of text...
\end{document}

Quick hack:
\documentclass{article}
% This settings work for the header
\usepackage[margin=1in]{geometry}
% Dummy text generator
\usepackage{blindtext}
% Just to simulate logo
\usepackage{tikz}
\begin{document}
\centerline{%
\begin{minipage}{\dimexpr\paperwidth-0.5in\relax}
% Document Header, first page only
\begin{minipage}[t]{2in}
\vskip0pt
\includegraphics[width=\linewidth]{example-image-duck}
\end{minipage}%
\hfill%
\begin{minipage}[t]{2.5in}
\vskip0pt
This is the first text block with some info about the company, department another stuff. It is only text.
\end{minipage}%
\hfill%
\begin{minipage}[t]{3in}
\vskip0pt
This is a second text block with information about content creator, editor, etc. and it just text.
\end{minipage}%
\hrulefill
\end{minipage}
}
% Starting from here, I need narrow margins, about 1 inch on the left and right. The text must start right after the header
% I have tried with \newgeometry{left=1in,right=1in} but the text starts on the new page.
\section{First section}
\blindtext
\section{Second section}
\blindtext
Text, text and more text... several pages of text...
\end{document}

Related

Custom Cell Formatter to Hide/Show Truncated Text

One of the columns in my table can contain a large amount of text, several paragraphs. This causes each row to be very tall and the table not readable.
I would like to set up a custom formatter for this column to automatically truncate the viewable text after X characters (X would be configurable) and include ellipses after that point and then display a "Show More" link. Clicking on "Show More" would then reveal all of the text in the cell, causing the row's height to expand to show all of the text, then toggling the "Show More" link to say "Show Less". Clicking on "Show Less" would return to the truncated view of the cell.
I can get part of this to work by simply returning from the custom formatter the first X characters of the text followed by a an element with display set to null containing the rest of the text. Clicking on "Show More" would change the element's display to inline.
In one sense this works, because the hidden text is displayed in part when Show More is clicked, but only the part that will fit into the existing cell's size. The rest is hidden and an ellipses is added.
For example, the initial load would show:
The quick brown fox jumped over the lazy
...Show More
Then after toggling it would show:
The quick brown fox jumped over the lazy dog... [this ellipses is added automatically by the CSS]
Show Less
How do I get the cell to expand to show all of the text?
A trickier version of this is to support HTML content, which can't be truncated as easily and still support showing the formatting properly. text-overflow:ellipses seems like it might solve that problem, but I have not figured out how to get it to work in this context. Indeed, text-overflow:ellipses might overall be a simpler solution to this problem if it can be made to work.
Btw, the alternative is to show the full text in a modal dialog, although I have not investigated that approach yet. (I don't think Tabulator supports a modal dialog out of the box, so I would need to add one, such as jquery's. See: Does anyone have or know of any example of a custom popup editor for Tabulator?)

Word - How to stick text to the bottom of page

https://SURU.tinytake.com/sf/MTQxMTgzOV81MDc2MDI2
I want to stick some text of the bottom of the page, like on the screen, just before footer always. When there is text (from mergefield), next should be new lines. I hope screenshot make it easier to see.
You can put the text in a text box or frame with position set to "Bottom
Relative to Margin". It's the only idea I have due you don't want to use a footer.
Or you can see this article
Basically it gives three options:
Negative left indent
Margin text box
Anchor to the header
I found the solution to the problem on Microsoft's page and I hope that this page comes up for as many people as possible.
Select the text you want to stick to the bottom (or top) of the page. Under Layout tab take a look at the bottom right of the page layout section and you should see a small arrow that, when clicked on, opens a new menu. In that menu, go to layout tab and set vertical alignment to be "bottom". IMPORTANT! Make sue that the next menu option (at the bottom of that window) is set to "apply to selected sections" otherwise, you will be writing from the bottom of the page upwards.
Here is the source image that helped me. https://filestore.community.support.microsoft.com/api/images/0382c4a8-ade9-4fc4-be66-bcd2c7101479?upload=true
Here is the visual representation:
Note that the person who took the screenshot set the last setting to whole document, not just selected sections.
If selected sections option isn't available, make sure you selected a text before opening the menu.
Hope this helps!

Filemaker body auto resizing: Blank pages or cut content?

I am building a layout to print (PDFs) of letters. I understood that text fields can shrink automatically to avoid white spaces.
My layout body is about 10 pages high as this would be the longest possible letter. Problem is: I cannot figure out how to tell the body to shrink to one page if I have a one page letter only.
Thus, I end up having 9 empty pages (only page numbers) and one "real" page.
How can I avoid all the empty pages?
If you have one enormous text field that you want to reduce in size based on the contents and have the enclosing part also reduce in size, look closely at the Position tab of the Inspector panel.
Under the "Sliding and Visibility" section, you'll find a checkbox for "Sliding up based on" with an additional pair of radio buttons and one checkbox when that's turned on. The checkbox reads "Also resize enclosing part". That's what you need to make sure is on to reduce the size of the body part the text field appears in.

RTF Document with Page Break and Textboxes or Tables

I am trying to create an RTF Document consisting of 2 pages and some textboxes and/or tables.
So far, I have written the following:
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil Arial;}}
\paperw14173\paperh14173\margl1701\margr1701\margt2268\margb2268
\pard\plain\f0\fs53
\phpg\pvpg\posx4500\posy6000\absw7000\f0\fs53 Text Box 1 on Page 1 Line 1
\par Text Box 1 on Page 1 Line 2
\par\pard Paragraph 1 on Page 1
\par Paragraph 2 on Page 1
\page\f0\fs53
\par\pard\phpg\pvpg\posx4500\posy6000\absw7000\f0\fs53 Text Box 1 on Page 2 Line 1
\par Text Box 1 on Page 2 Line 2
\par\pard\phpg\pvpg\posx8000\posy8000\absw7000\f0\fs53 Text Box 2 on Page 2 Line 1
\par Text Box 2 on Page 2 Line 2
\par\pard Paragraph 1 on Page 2
\par Paragraph 2 on Page 2
}
The text on the pages as well as the text boxes are displayed correctly. However, in OpenOffice as well as in Microsoft Word, an additional line break is inserted on the beginning of page 2.
How can I change my document so that this line break disappears? I have tried to omit the "\par\pard" at the beginning of the first text box on the second page (like it is working on the first page), but this disturbs the entire page break so that I cannot do that.
I have also tried to write something like {\pard Text\par}, but the whole textbox thing seems not to work with that. Perhaps there is some control word I can use after the "\page" in order to do the same like "\par" but without producing the new line?
Important: No solution with rearranging the content! The same applies to tables that cannot be rearranged in any way. The question only refers to the part after the page break!
Here is another example with tables:
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil Corbel;}}
{\colortbl\red0\green0\blue0;\red255\green255\blue255;}
\paperw11905\paperh16838\margl1134\margr1134\margt1134\margb1134
\pard\plain\f0\fs24\cf0\ql\pard
{\trowd\clvertalt\cellx2409\clvertalt\cellx4819\clvertalt\cellx7228\clvertalt\cellx9638\pard\intbl{\f0\fs24\cf0\ql A1}\cell\pard\intbl{\f0\fs24\cf0\ql B1}\cell\pard\intbl{\f0\fs24\cf0\ql C1}\cell\pard\intbl{\f0\fs24\cf0\ql D1}\cell\row}
{\trowd\clvertalt\cellx2409\clvertalt\cellx4819\clvertalt\cellx7228\clvertalt\cellx9638\pard\intbl{\f0\fs24\cf0\ql A2}\cell\pard\intbl{\f0\fs24\cf0\ql B2}\cell\pard\intbl{\f0\fs24\cf0\ql C2}\cell\pard\intbl{\f0\fs24\cf0\ql D2}\cell\row}
{\trowd\clvertalt\cellx2409\clvertalt\cellx4819\clvertalt\cellx7228\clvertalt\cellx9638\pard\intbl{\f0\fs24\cf0\ql A3}\cell\pard\intbl{\f0\fs24\cf0\ql B3}\cell\pard\intbl{\f0\fs24\cf0\ql C3}\cell\pard\intbl{\f0\fs24\cf0\ql D3}\cell\row}
\pard
\par\pard\page\pard\f0\fs24\cf0\ql
\pard
{\trowd\clvertalt\cellx2409\clvertalt\cellx4819\clvertalt\cellx7228\clvertalt\cellx9638\pard\intbl{\f0\fs24\cf0\ql A1}\cell\pard\intbl{\f0\fs24\cf0\ql B1}\cell\pard\intbl{\f0\fs24\cf0\ql C1}\cell\pard\intbl{\f0\fs24\cf0\ql D1}\cell\row}
{\trowd\clvertalt\cellx2409\clvertalt\cellx4819\clvertalt\cellx7228\clvertalt\cellx9638\pard\intbl{\f0\fs24\cf0\ql A2}\cell\pard\intbl{\f0\fs24\cf0\ql B2}\cell\pard\intbl{\f0\fs24\cf0\ql C2}\cell\pard\intbl{\f0\fs24\cf0\ql D2}\cell\row}
{\trowd\clvertalt\cellx2409\clvertalt\cellx4819\clvertalt\cellx7228\clvertalt\cellx9638\pard\intbl{\f0\fs24\cf0\ql A3}\cell\pard\intbl{\f0\fs24\cf0\ql B3}\cell\pard\intbl{\f0\fs24\cf0\ql C3}\cell\pard\intbl{\f0\fs24\cf0\ql D3}\cell\row}
\pard
}
Here are 2 tables and a page break in between. This page break is properly displayed in OpenOffice, but not in Word. It only works in Word if you put "\par" behind the "\page" but this is producing the empty line in front of the table instead of showing the table at the first position of the second page. If you are only writing \page instead of the construct (with \par and \pard) above, it is even not working in Open Office.
So, I think there must be something missing to make it work. Some control word? Some brackets?

Lotus Notes: Printing Footer on each page

I have a basic requirement of printing a Lotus Notes form (it can be a long form depending upon the data filled in the field) and each page should contain a Footer. Footer is very large approx > 256 characters, but the Footer property of the form (6th tab of Form properties) doesn't allow more than 255 characters.
I have tried giving the footer in the "Window title" and using &W in the Footer tab of the Form properties, but the Window title is only taking 1st line of the sentence.
Can someone tell how to get this much big footer in every page and print also.
You'd better use a 3rd party tool to produce output. Some candidates: Notes2Paper, Swing, IntelliPrint

Resources