Tag Info

Hot answers tagged scaling

90

If you're willing to just scale the entire table down, then this is fairly straight-forward, put it in a box and scale the box to \textwidth. \documentclass{article} \usepackage{graphicx} \begin{document} test \begin{table}[ht] \centering \resizebox{\textwidth}{!}{\begin{tabular}{rlrrrrrrr} \hline & X & MASHvstRap & MASHvsBEEML & ...

62

Use the adjustbox package's valign=t key to align the graphics contents at the top: \documentclass{article} \usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox \begin{document} \begin{figure} \centering \includegraphics[scale=0.5,valign=t]{example-image-a} \includegraphics[scale=0.3,valign=t]{example-image-b} \caption{A caption\label{fig:...

59

The question wasn't "should it be done?" But, for the same reason men climb mountains, "could it be done?" The answer, with the scalerel package, is yes. Thus, we introduce \reallywidehat [EDITED to add phantom rule below argument, so that baseline of result matches baseline of original argument. RE-EDITED to \ensuremath on the \widthof calculation (...

44

As already mentioned in https://tex.stackexchange.com/a/97506/2975 you can use \resizebox or better adjustbox to scale the table to a specific width, e.g. \textwidth which is the width of the text on the page. This however might make your table text very small and hard to read. \documentclass{article} \usepackage{adjustbox} \usepackage{lipsum}% example ...

44

With explicitly adding width=7cm,height=3cm options to the Pgfplots axis environment you can control the size of the plot. Giving one of them will keep the aspect ratio constant hence would behave as a scaling only.

41

There is no centering environment. And issuing \centering inside \resizebox doesn't make sense anyway: it should be outside, because you want to center the resized box. \documentclass[11pt,english,titlepage]{article} \usepackage{graphicx} \begin{document} \begin{table} \centering \caption{mytable} \resizebox{.5\textwidth}{!}{% <------ Don't forget this ...

33

It appears as if you want to rescale the x coordinates without extracting some common factor. The scaled x ticks feature has the main use case of generating a common tick factor which is placed into some node... and, in fact, pgfplots has no builtin support for scaled ticks and log axes as it is typically no use-case. However, rescaling the x coordinates is ...

28

I think you have two good choices and a (likely) dreadful choice: Use a tabular* environment, Use a tabularx environment (or its close cousin, tabulary) Use the basic tabular environment and scale it up (or down) using \resizebox. The results are as follows (the first horizontal line is there just to illustrate the width of the text block; the bodies of ...

27

Use the TikZ library arrows.meta and then you can scale the arrow heads as you wish. Here are a few examples. \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \draw[->,line width=4pt] (0,0) to (1,0); \end{tikzpicture} \begin{tikzpicture} \draw[-{>[scale=2.5, length=2, ...

25

If you want to add captions to it, I suggest: \begin{frame}{Pixelweise Segmentierung} \begin{figure}[ht] \begin{minipage}[b]{0.45\linewidth} \centering \includegraphics[width=\textwidth]{a.png} \caption{Label for a} \label{fig:a} \end{minipage} \hspace{0.5cm} \begin{minipage}...

23

The matplotlib PGF backend saves as raw PGF. What you probably want instead is pgfplots, which you can get using tikzplotlib, assuming your plots aren't too complex and all the features are supported. Sample Python script for creating figure: from pylab import * from tikzplotlib import save as tikz_save x = linspace(0, 10, 101) plot(x, sin(x)) xlabel('$x$-...

22

align adjusts its contents based on the available width (in order to place it horizontally in the centre, and to place the appropriate tags/numbering). Inserting it inside a \scalebox causes the problem that there's no defined box to contain it. However, if you provide such a containment, it scales without problem: \documentclass{beamer}% http://ctan.org/...

21

I used pdfpages package to include a png. Simple and effective. Fills the entire page with the graphic. \usepackage{pdfpages} ... \includepdf{image.png} Happy TeXing!

20

Sounds like conditional probability. In that case I usually recommend our students to use something similar to \newcommand\given[1][]{\:#1\vert\:} Which will be manually scalled via, say \given[\Big] Then the code makes sense when read ADDITION. Building further on Francis' suggestion \given can be build into his macros such that the macros only takes ...

20

2017 Update: Since \mid is a relation, under normal circumstances the spaces manually inserted around \middle| should be thick \; instead of thin \,. See table on p.170 of the TEXbook. Instead of \mid, you can use \middle command to enlarge vertical delimiter and insert spaces manually, here is an example: \documentclass{article} \usepackage{mathtools} \...

19

Add this after decorations.pathreplacing is used. It will scale the brace if it is necessary. \makeatletter \let\pgf@decorate@@brace@brace@code@old\pgf@decorate@@brace@brace@code \def\pgf@decorate@@brace@brace@code{ \ifdim\pgfdecoratedremainingdistance<4\pgfdecorationsegmentamplitude \pgftransformxscale{\...

18

If you want to scale everything in your tikz picture, you could also place it within \scalebox or \resizebox Examples: \scalebox{0.6}{ [Your tikz goes here] } \resizebox{.75\textwidth}{!}{ [Your tikz goes here] } This will also work for nodes, text, etc and contrarily to transform canvas it will not beam your picture to places no one would have ever ...

17

Since adjustbox is not easy to install on ubuntu-12.04 the solution proposed in Aligning image and text on top, with minipages can be useful. \begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}} \vspace{0pt} \includegraphics[width=0.49\textwidth]{example-image-a} & \vspace{0pt} \includegraphics[width=0.49\textwidth]{example-image-b} \end{tabular}

17

One option that might be somewhere in the middle: \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \newcommand{\mybinom}[2]{\Bigl(\begin{array}{@{}c@{}}#1\\#2\end{array}\Bigr)} \begin{document} $\binom{b}{p}$ \quad $\tbinom{b}{p}$ \quad $\dbinom{b}{p}$ \quad $\displaystyle\binom{b}{p}$ \quad $\mybinom{b}{p}$ \end{document} Of ...

17

The AMS classes have a \larger command that works out of the box: \documentclass{amsart} \newcommand{\Alpha}{\mbox{\larger$\alpha$}} \begin{document} $\alpha\Alpha$ \Large $\alpha\Alpha$ \end{document} This won't work in subscripts/superscripts, though. Unfortunately \text doesn't update \@currsizeindex, so using \text instead of \mbox, which would be ...

17

(I made the mistake of reading the article ...) I've never read any Official Source on typography. Obviously, as a TeX practitioner (and one-time amateur calligrapher) I'm interested in typography but my knowledge is zero and therefore my typographic wisdom is based entirely on "I know what I like when I see it". I am, however, a professional ...

17

Nobody told you because, simply, you can't do it. This runs without error: \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[width=10pt plus 10pt minus 2pt]{example-image.pdf} \end{document} but this is not a sign that it does something according to your wish. Indeed, it's sufficient to look at the output: Your code \...

17

For good fonts, different font sizes don't only have a different size, but the actual shape of the letters is different. Consider the following example: \documentclass{article} \usepackage{adjustbox} \begin{document} \resizebox{3cm}{!}{\tiny Q} \resizebox{3cm}{!}{\Huge Q} \end{document} As one can see the shape of the letters is different. For the ...

16

While echoing the sentiment expressed in the earlier answer -- "this stuff really shouldn't be encouraged" -- I can't resist pointing out that \widehat can easily be made super-wide with the help of the mtpro2 (MathTime Professional II) package. Note that this package isn't free of charge and can't be downloaded from the CTAN. However, its "lite" subset -- ...

16

The first argument to \resizebox refers to the horizontal dimension (width) and the second one to the vertical dimension (height). However, a tabular also has a depth (that is, it extends below the baseline), so we need \resizebox* in order to refer to the total height (height plus depth); I changed the last entry to show that the table fits completely. \...

15

With scalerel, you can definitely take care of the \left \right problem. And I think I took care of the tine & scriptsize problem, too. What I did was to save a good copy of the normalsize bbraces in boxes, so that \lxbrace and \rxbrace would place the boxes containing good copies of the bbraces. I then used scalerel to scale these boxes to the ...

15

You want \resizebox* not \resizebox the latter scales the height whereas the former scales height + depth. A tabular is vertically centred so the height is half its vertical extent.

15

This question cannot have general answer for ALL monitors. The size of the PNG image on the screen depends on the screen resolution (e.g. 110.27 PPI (pixels per inch) for my MacBook), and on Retina (220 PPI) it will be twice smaller. And the size of image inside PDF, shown at real 100%, will be monitor-independent. Thus solution for my monitor: \...

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