3

[UPDATED]PLEASE READ AT THE BOTTOM OF THE POST[UPDATED]

I'm still using TexLive 2010 (ubuntu) and I need to create some tight pdf (using pdflatex and pdfcrop with --hires option).

I need to use microtype, and also I need to work without margins (I want to create some text strips). The problem is that result pdf are wrong, cutting out some piece of text as you cas see from screenshots.

Removing microtype, is working fine in some cases. In others i also need to add some mm to lmargin

This is my geometry setup:

\usepackage[paperwidth=100mm, paperheight=8.5372222276mm, %
marginparsep=0mm, marginparwidth=0mm, columnsep=0mm,tmargin=0mm,bmargin=0mm,lmargin=0mm,rmargin=0mm,headheight=0mm,headsep=0mm,footskip=0mm]{geometry}

Full code

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{microtype}
\usepackage[paperwidth=100mm, paperheight=8.5372222276mm, %
marginparsep=0mm, marginparwidth=0mm, columnsep=0mm,tmargin=0mm,bmargin=0mm,lmargin=0mm,rmargin=0mm,headheight=0mm,headsep=0mm,footskip=0mm]{geometry}
\pagestyle{empty}
\setlength{\parindent}{0mm}\setlength{\lineskiplimit}{0pt}\setlength{\lineskip}{0pt}
\begin{document}\frenchspacing
\fontfamily{psb}
\fontsize{20bp}{22}
\selectfont
\textit{``xp}
\end{document}

[UPDATED]PLEASE READ AT THE BOTTOM OF THE POST[UPDATED]

Using mirotype:

With microtype

Without microtype:

Without microtype

How can I fix it?

[UPDATE]

i made some tests. Please tell me if this solution is correct even in theory: i need for example a 100mm (width) x 10mm (height), so i add (using common word processor margins as model) 0,49cm (4.9mm) as margin in every margin.

\usepackage[paperwidth=109.8mm, paperheight=19.8mm, textwidth=100mm,textheight=10mm]{geometry} 

Then i compile it with pdflatex and cropped using --hires (pdfcrop). Is it a good and clean solution ? Thank's

7
  • Would you be able to provide the entire document code (in the form of a compilable minimal working example (MWE)) that was used to produce the images above?
    – Werner
    Sep 26 '11 at 16:01
  • 2
    You should disable character protrusion. Please, add a complete TeX source sample and be more precise about the steps you follow for producing the final PDF.
    – egreg
    Sep 26 '11 at 16:08
  • 1
    Why do you need microtype? Sep 26 '11 at 16:13
  • 1
    I use microtype to optimize interword space and because in every latex guide/book i have read. it is suggested to use this package to increase justification quality
    – Flavio
    Sep 26 '11 at 16:20
  • 5
    But obviously you don't want in your case the optimization of microtype. Protrusion e.g. doesn't make sense if you want to generate pdfs with exact bounding boxes. Apart from this: It is always possible that parts of glyphs and other objects stick outside their own bounding box. You will have to enlarge the margins or use \strut if you want to make sure nothing is clipped. Sep 26 '11 at 17:48
1

Here's what I get by compiling

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\pagestyle{empty}
\begin{document}\frenchspacing
\fontfamily{ptm}
\fontsize{20bp}{22}
\selectfont
\textit{``xp}
\end{document}

and processing the result through pdfcrop --hires (I later added a frame, just to show the the result against a white background). I used Times as I don't have Sabon, but that's not the point. Ulrike is mentioning in her comment that characters may have parts outside their bounding box and that's the case, for example, with quotes.

enter image description here

Here's what's get by compiling Flavio's example and doing pdfcrop --hires

enter image description here

It should be clear what's the correct procedure.

5
  • ok, but how i have to setup geometry package to get a (for example) 100mm text area without the risk of cutted chars ?
    – Flavio
    Sep 26 '11 at 22:37
  • i made some tests. Please tell me if this solution is correct even in theory: i need for example a 100mm (width) x 10mm (height), so i add (using common word processor margin as model) 0,49cm (4.9mm) as margin in every margin. {\usepackage[paperwidth=109.8mm, paperheight=19.8mm, % marginparsep=0mm, marginparwidth=0mm, columnsep=0mm,tmargin=4.9mm,bmargin=4.9mm,lmargin=4.9mm,rmargin=4.9mm,headheight=0mm,headsep=0mm,footskip=0mm]{geometry} } Then i compile it with pdflatex and cropped using --margins 1 --hires (pdfcrop). Is it a good and clean solution ? Thank's
    – Flavio
    Sep 26 '11 at 22:58
  • y but time has expired before i edit previous post to format it correctly
    – Flavio
    Sep 26 '11 at 23:05
  • @Flavio It's better to edit your question, than to add long comments.
    – egreg
    Sep 26 '11 at 23:25
  • question edited, really thank you. Is my new example/idea clear ?
    – Flavio
    Sep 27 '11 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.