# Tag Info

110

You can use the standalone class for this. It loads the preview package automatically to crop the resulting PDF to the content. This makes the usage of pdfcrop unnecessary. Simply exchange the article class with standalone. (It uses article internally but another class can be specified using the class option.) Note that since v1.0 the default option has ...

49

There are a number of tricks for getting optimized pdfs. Many of them are implemented in the tool pdfsizeopt. With some patches (posted in the pdfsizeopt bugtracker) this tool can run on all my tex-generated pdfs (and nearly all of the non-tex-generated ones). I use the commandline: python ./pdfsizeopt.py --use-pngout=true --use-jbig2=true ...

33

The usual thing to do is replace ( with \left( and ) with \right), which automatically expand to fit the material between them. Note that every \left... requires a \right... (but the type of bracket may be different, i.e. \left(...\right] also works). I would typeset your equation as \begin{equation*} \sum_{i=1}^n i = \left(\sum_{i=1}^{n-1} i\right) + n = ...

32

The node size normally depends on the size of the content. Your node is empty so it is relative small. If you want to set the size manually use the minimum width and/or minimum height or set both at the same time using minimum size. The circle shapes just uses the greatest of both values, otherwise you may be interested in the ellipse shape. ...

26

From the plain TeX reference: pt: Point pc: pica (12 pt) in: inch (72.27 pt) bp: Big point (72 bp = 1 in) cm: Centimeter mm: Millimeter dd: Didot point cc: cicero (12 dd) sp: Scaled point (65536 sp = 1 pt), the smallest TeX unit ex: Nominal x-height em: Nominal m-width Available in math mode: mu: math unit, 1 em = 18 mu, where em is taken from the ...

26

You should add a \strut so that all boxes have the same maximal height and depth, otherwise the framed box will depend on the height of the content. This means that an a gets a small box and Xy gets a higher and deeper one. With \strut a invisible rule is added which has the maximum height and depth of the current font size. ...

19

One thing that's easy to miss is page numbers. The page number restricts the height of the final image so it's best to leave it out. An easy way to do that is to use the minimal document class. What I do when doing images for this place is to have a document a bit like: \documentclass{minimal} \begin{document} Hello. This is a test. L = ...

15

Two thoughts come to mind. Put a \scalebox command from the graphicx package $\scalebox{2}{2+2=4}$ will make an equation twice as big as normal. Another option would be to use the \mathlarger and \mathsmaller commands from the relsize package. I'm sure there are other options too.

14

There is the program pdfopt provided by Ghostscript which converts the PDF in the official web optimised format. This (quote from man pdfopt) puts the elements of the file into a more linear order and adds "hint" pointers, allowing Adobe's Acrobat(TM) products to display individual pages of the file more quickly when accessing the file through a ...

14

Another possibility are the \mathlarger and \mathsmaller commands provided by the relsize package. These can be iterated to make bigger and bigger \documentclass{article} \usepackage{relsize} \begin{document} $x+y=z \leftrightarrow \mathlarger{\mathlarger{\mathlarger{(x+y=z)}}}$ \end{document} It doesn't always work well with large ...

14

Update : before to use a grid it's possible to use pdfcrop to get the dimensions of the "real" picture. You need to use \thispagestyle{empty} and you need to compile only the picture. You get a pdf file then with pdfcrop you get a new pdf file. Inside this pdf, you can read /BBox [0 0 146.908 142.991] (be careful with the units). We don't have the origin but ...

14

The height and width options and the related \resizebox actually calculate a scale factor and then use some internal form of \scalebox to do the scaling. Because this calculation requires a division (which is implemented using a loop in graphic/x) a numeric error is introduced. The size of the error depends on the original and requested size. If the scale ...

14

just use \centering inside the box. \parbox{2cm}{\centering one two three four five six} I assume you are using this package, so with some limitations you can do this: \documentclass{article} \usepackage{pbox} \begin{document} \parbox{2cm}{\centering one two three four five six eight nine ten aaaaaa\\ bbb} \bigskip ...

13

It might be simplest (although possibly overkill) to do this with tikz: \documentclass{article} \usepackage{tikz} \newcommand{\mytag}[1]{ \begin{tikzpicture}[baseline={(TAG.base)}] \node[draw, minimum height=4ex] (TAG) {#1}; \end{tikzpicture}} \begin{document} \mytag{a tag}\mytag{Another Tag} \end{document} It's overkill because the \strut solution ...

13

These are called dropcaps or lettrine (from the French). The best package to use is lettrine which is available from ctan. Use as: \documentclass{article} \usepackage{lettrine} \begin{document} \lettrine{A}{gain find} more words her... \end{document} They are very difficult to handle typographically, unless the whole page design has been developed with ...

13

You could use \DeclareMathSizes to specify the font sizes for math mode. The first argument is a text size, the further arguments set the corresponding math sizes in display/text style, script style and scriptscript style. Example: \documentclass[12pt]{article} \DeclareMathSizes{12}{30}{16}{12} \begin{document} \noindent This is regular text. An equation ...

12

Using true type fonts that are specified in the PDF standard (and thus available with every conforming pdf viewer) dramatically reduces for me the file size of PDFs generated with pdflatex. Else, other fonts are included in the generated PDF which increases the file size. For example via \usepackage{mathptmx} \usepackage[scaled=.95]{helvet} ...

12

(Not specifically font related) A way to create smaller documents with pdf(La)TeX is to use \pdfminorversion=5 \pdfobjcompresslevel=3 \pdfcompresslevel=9 This will generally produce considerably smaller files but it requires pdf version 1.5 and might not be readable by old pdf-viewers.

12

The literal method for doing this looks something like as follows: \usepackage{calc} ... \def\mygraphic{\includegraphics{...}} \newlength\graphicheight \setlength\graphicheight{\heightof{\mygraphic}} % OR: \settoheight\graphicheight{\mygraphic} ... \mygraphic % to insert the graphic ... \vspace{\graphicheight} % whitespace same size as the graphic But ...

12

For this application, you can just define a new combined arrowhead using \pgfarrowsdeclarecombine{name left}{name right}{outer element left}{outer element right}{inner element left}{inner element right}: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,calc,decorations.markings} \begin{document} ...

12

As seen in the answer by Peter Grill, the size of the bounding box is determined not only by the path points, but also by the control points. In order to reduce the size of the bounding box, we have to specify it explicitly. The manual states: PGF is reasonably good at keeping track of the size of your picture and reserving just the right amount of ...

12

This is not an answer, but thought it might be useful to see why this is happening as @user946850 points out. I added the following to the code to see where the control points are: \foreach \x in {{(173.9885,538.4766)}, {(568.5860,261.2969)}, {(44.4337,252.9312)}, {(429.9845,542.5624)}, {(275.9689,41.4788)}, {(119.6549,497.6604)}, {(548.6203,196.3394)}, ...

12

There is the varwidth environment from the package with the same name, which is an auto-sizing version of minipage. You only need to give a maximal width. The text centering inside it or inside \parbox can and should be done using \centering.

12

The package mathtools already provides the necessary features; you just have to add the possibility of using numbers instead of the commands \big and siblings. \documentclass{article} \usepackage{mathtools} \DeclarePairedDelimiterX{\innset}[2]{\lbrace}{\rbrace}{% #1\;\delimsize\vert\;#2} \newcommand{\set}[3][0]{% \ifcase#1\relax \innset{#2}{#3}\or ...

11

Package mathdesign provides \smallin. \in of package MnSymbol looks smaller than the usual form. See also "The Comprehensive LaTeX Symbol List". The example file compares the default with the version of MnSymbol without loading the package (it also changes other symbols): \documentclass{article} \DeclareFontFamily{U}{MnSymbolD}{} ...

11

This is a version of \big that's a bit smaller at 10pt size, but scales with em and with \scriptsize. \documentclass{article} %\def\big#1{{\hbox{$\left#1\vbox to8.5\p@{}\right.\n@space$}}} %\def\bigl{\mathopen\big} %\def\bigr{\mathclose\big} \makeatletter \def\myl{\mathopen\mybig} \def\myr{\mathclose\mybig} \def\mybigx#1{\dimen@#1\relax \mathchoice ...

11


11

The following example uses package zref to remember the size of the math formula in labels. Package mleftright is used to reduce the additional horizontal spacing by \left and \right. Inside a complex math block, the following macros can be used: \mzleft{<label>}{<left delimiter>}{<math formula>} \mzright{<label>}{<math ...

10

If you are prepared to take something like Big as an argument then a simple solution to your request is to use \csname ...\endcsname to generate command names as needed, e.g., \newcommand\set[3]{\csname #3l\endcsname\{#1% \,\csname#3\endcsname\vert\,% #2\csname #3r\endcsname\}} If you want to generate the needed ...

10

When you take a screenshot or export a figure from Matlab as a rasterised image,usually the resulting image file will not contain any resolution information (or "pixel density", usually measured in "dots per inch", or "DPI") in its metadata. When you include such an image in a LaTeX document using \includegraphics, a resolution of 72 DPI will be assumed. ...

Only top voted, non community-wiki answers of a minimum length are eligible