Tag Info

Hot answers tagged

62

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 = ...


40

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. ...


37

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. ...


16

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

You should use \bigm| to make a relation symbol, so that the three consecutive bars are distinguishable from each other. If you want to make them slightly bigger, here's a way: \documentclass{article} \usepackage{amssymb} \newcommand{\divides}{\bigm|} \newcommand{\ndivides}{% \mathrel{\mkern.5mu % small adjustment % superimpose \nmid to \big| ...


13

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 ...


13

Automatically sized parentheses are obtained with \left and \right, as any LaTeX guide or manual tells. However, automatic sizing is not good in every case; one of these cases is precisely that of summations with limits above and below: compare the results of \[ \left( \sum_{i=1}^{n-1} i \right)\biggl(\sum_{i=1}^{n-1} i\biggr) \] (the font is that ...


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

One way is using \left and \right, followed by the parenthesis you want to use. These are mostly () [] {} \langle\rangle and |. You can also use a . to have no parenthesis displayed, e.g. when you want an opening, but no closing one. \left( \frac12 \right) \quad \left\langle \frac23 \right. \quad \left\{ \frac34 \right] creates If you want to control ...


13

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} ...


13

\begin{tikzpicture} \draw node[fill,circle,scale=0.3]{} (0,0);% \end{tikzpicture}


12

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. ...


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

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 ...


12

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 ...


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}{} ...


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 ...


9

You can set minimum height=<length>, or minimum width=<length> as shown in MWE: Notes: As Qrrbrbirlbel commented, setting minimum size is setting both the values of minimum width and minimum height and hence you end up with a circle. If you want to specify both the minimum height= and minimum width= parameters you need to set them to ...


9

The following example measures the formula inside \abs with \left/\right and with \bigl/\bigr. If the version \left/\right is larger, then the version with \bigl/\bigr is used. \documentclass{article} \usepackage{amsmath} \usepackage{mleftright} \makeatletter \newcommand*{\abs}[1]{% \mathpalette\@abs{#1}% } % Version with the horizontal spacing of ...


9

A solution more simple ( for me ) and with the possibility of scaling. I add the solution with Andrew's idea The code is very clear but we can not make a scale and perhaps there is a better solution to create more space vertically. The brace is more pretty with the matrix's delimiter. \documentclass[]{scrartcl} \usepackage{tikz} ...


8

(Summarising the comments as an answer.) pdfTeX will work with px units, but you have to set these up appropriately using \pdfpxdimen. This is the physical width of one pixel, and has default value of 1 bp, meaning that images initially are assumed to be 72 dpi. \pdfpxdimen is a low-level dimen primitive, and so is best set using \dimexpr: ...


8

You can use scalebox from the graphicx package to create one: \documentclass{article} \usepackage{graphicx} \newcommand*{\medcap}{\mathbin{\scalebox{1.5}{\ensuremath{\cap}}}}% \begin{document} \[ Hom(A,B) \cap Hom(B,C)\] \[ Hom(A,B) \medcap Hom(B,C)\] \[ Hom(A,B) \bigcap Hom(B,C)\] \end{document}


8

What you have is the right answer: \documentclass[10pt,a4paper]{article} \newlength{\mytextsize} %This part fails.... (no it doesn't:-) \makeatletter \show\f@size \setlength{\mytextsize}{\f@size pt} \makeatother \showthe\mytextsize \begin{document} %do something. \end{document} which produces a log of: > \f@size=macro: ...


8

This has some limitations on the tabular: you can't have \multicolumn in the last row, nor optional arguments to \\ (this one may be lifted off). \documentclass{article} \usepackage{environ} \makeatletter \NewEnviron{mtabular}[3][c]{% \begingroup \renewcommand{\multicolumn}[3]{\multispan{##1}##3}% \let\\\cr \setbox\tw@=\vbox{% ...


8

This way: \documentclass{article} \begin{document} \[ \mathit{cl}(V, q) = \biggl(\sum_{r=0}^{\infty} \bigotimes^r V\biggr) \bigg/ \bigl\{v\otimes v = -q(v,v)\bigr\} \] \end{document} Several comments: don't use \left\right around summation and integration symbols, it produces way too large delimiters. (Better don't use them at all.) cl seems to ...


8

This seems to be a good compromise: \documentclass{article} \usepackage{graphicx} \newcommand{\smallerrel}[1]{\mathrel{\mathpalette\smallerrelaux{#1}}} \newcommand{\smallerrelaux}[2]{\raisebox{.1ex}{\scalebox{.75}{$#1#2$}}} \newcommand{\smallin}{\smallerrel{\in}} \newcommand{\smallnotin}{\smallerrel{\notin}} \begin{document} $x\smallin y\smallnotin z$ ...


8

You can use the visualization depends on=<expr>\as<macro> key for to make another variable available. If you set visualization depends on=\thisrow{w2}\as\wtwo, the content of the w2 column will be available as a macro called \wtwo: \begin{filecontents*}{temp.dat} x y w1 w2 1 1 2 4 2 2 1 3 3 3 4 2 4 4 3 1 \end{filecontents*} ...



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