Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to create multiple pages with varying page heights using the standalone package. When I try to run my file (using XeLaTeX on a mac) the content gets shifted up and to the left so that it's no longer on the page. When I increase the margins I'm able to force a page size that will display the content but I end up with unnecessary white space at the bottom of the page (which defeats the purpose of using the standalone package).

Could my issue have anything to do with the large font size I'm using or the page width constraint? If so, is there any way to resolve these issue?

I'm rather new to using LaTeX so any help is greatly appreciated.

\documentclass[multi=minipage, border=0]{standalone}

\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{float}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{geometry}
\usepackage{anyfontsize}
\usepackage{t1enc}
\usepackage{fontspec}
\usepackage[none]{hyphenat}
\usepackage{standalone}

\pagestyle{empty}
\geometry{papersize={500bp}}
\begin{document}
\setmainfont{Georgia}
\raggedright
\fontsize{20}{24}
\selectfont
\begin{minipage}{1\linewidth}
This is some question text.
\end{minipage}
\end{document}
share|improve this question
    
Do you need the geometry package? Why set the papersize then use standalone to create pages of varying heights? Taking this out seems to get better results. – Matthew Leingang Mar 18 '13 at 16:02
    
Also, what is \setfontsize supposed to do? It gives me an undefined control sequence error. – Matthew Leingang Mar 18 '13 at 16:06
    
I'm using the geometry package because I need the paper width to be a constant, I only want the page height to resize. I've edited the MWE to take out \setfontsize, that was something a command I'd created. – ekrah Mar 18 '13 at 16:07
    
For best results, please trim down your minimal working example (MWE) excluding unnecessary code, and soup up the example to include the effect you see. For instance, does this only happen in XeTeX with fontspec and the Georgia font? If not, cut it out and just leave the default. Your question is about mutiple pages but your example has only one page in it. – Matthew Leingang Mar 18 '13 at 16:18

2 Answers 2

up vote 5 down vote accepted

it makes no sense to set the papersize, because standalonestrips all whitespace around the text anyway.

use the minipage width for setting the paper (text) width:

\documentclass[multi=minipage, border=0]{standalone}
\usepackage{fontspec}

\begin{document}
\setmainfont{Georgia}
\raggedright
\fontsize{20}{24}\selectfont
\begin{minipage}{350bp}
This is some question text.
\end{minipage}
\end{document}

enter image description here

share|improve this answer
    
This works perfectly, thank you! – ekrah Mar 18 '13 at 16:18

Try this, does it make what you want?

\documentclass[multi=varwidth, border=0]{standalone}

\pagestyle{empty}
\begin{document}
\begin{varwidth}
This is a very huge text with lot of words\dots
\end{varwidth}
\begin{varwidth}
This is a small text
\end{varwidth}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/103103/problem-with-content-location-with-standalone-package
tex.stackexchange.com
crawl=CC-MAIN-2015-48
81198
application/http; msgtype=response
sha1:PA3GYWHXFR2OEUTKCMSV6ZWKXP2GI626
<urn:uuid:26380e8b-f40d-4b68-991f-ec17562a5fcc>
2015-11-26T14:39:32Z
104.16.117.182
sha1:TNUXB2VNGLZFTZA372QJHDOHIUO3Z7GD
<urn:uuid:01310174-99cd-41fc-a4ca-e518cd010cdf>
http://tex.stackexchange.com/questions/103103/problem-with-content-location-with-standalone-package
response
<urn:uuid:7f185dc6-feaa-4f93-a838-591f01f2801b>
robots: classic
hostname: ip-10-71-132-137.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2015-48
operator: CommonCrawl Admin
description: Wide crawl of the web for Nov 2015
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf