Tag Info

New answers tagged

1

adjustbox package can be used to change the size of any kind of contents, including TiKZ figures. \documentclass{article} \usepackage{adjustbox} \usepackage{tikz} \begin{document} \def\test{\tikz\draw[thick, green] (0,0) rectangle (2cm,1cm) node[midway,red] {Test};} % the original 2cm x 1cm \test % resized to 4cm x 2cm ...


0

Here is a solution to scale an image using scalebox in a way to fit it in a desired size (and keeping the aspect ratio). \documentclass[varwidth,border=50]{standalone} \usepackage{environ} \usepackage{tikz} \usetikzlibrary{math} % --------------------- begin macro definition \newsavebox{\tikzbox} % fitin environment \NewEnviron{fitin}[2]{ ...


1

You can scale the graphics by k using for example scalebox and scale the font by 1/k to compensate this. If you compile with XeLaTeX or LuaLaTeX you can use the scale features of fontspec. Here is a simple example : % to compile with XeLaTeX or LuaLaTeX \documentclass[varwidth,border=50]{standalone} \usepackage{fontspec} \usepackage{pgf} \begin{document} ...


2

How about using a tabular environment, the precise order depends on the size of the photograph paper? \documentclass{article} \usepackage[a4paper,lmargin=0.5cm,rmargin=0.5cm,tmargin=0.2cm,bmargin=0.2cm]{geometry} \usepackage[demo]{graphicx} \usepackage{calc} \usepackage{ifthen} \newlength{\oH} \newlength{\oW} \newlength{\rH} \newlength{\cH} ...


1

You first need to save/calculate the real width of the table \newsavebox\tableBox \sbox\tableBox{\begin{tabular}{rrrr...}...\end{tabular}} % without the \multicolumn line then \resizebox{\textwidth}{!}{% \begin{tabular}{rrrr...} ... \multicolumn{9}{p{\wd\tableBox}}{...} \end{tabular}% } Full example: \documentclass{article}% ...


1

Better to use threeparttablex, though it is not perfect (a little too wide in the right) \documentclass{article}% \usepackage{graphicx} \usepackage[referable]{threeparttablex} \begin{document} \noindent \rule{\textwidth}{1mm} \noindent \resizebox{\textwidth}{!}{% \begin{threeparttable} \begin{tabular}{rrrrrrrrr} \hline aaaaaaaa & aaaaaaaa & ...


4

\documentclass[tikz,border=5mm]{standalone} \newcommand{\mytab}[1]{% \begin{tabular}{@{}c@{}} #1 \end{tabular} } \begin{document} \begin{tikzpicture} \draw (0,0) -- (11,0); \foreach \x in {0.8,4,5.5,7,10.2} \draw(\x cm,3pt) -- (\x cm, -3pt); \draw (0.8,0) node[below=3pt] {$T_0$}; \draw (4,0) node[below=3pt] {$T_1$}; \draw (5.5,0) node[below=3pt] {$0$}; \draw ...


1

not elegant, but it works \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}\label{fig: timeline} \begin{center} \begin{tikzpicture} \draw (0,0) -- (11,0); \foreach \x in {0.8,4,5.5,7,10.2} \draw(\x cm,3pt) -- (\x cm, -3pt); \draw (0.8,0) node[below=3pt] {$T_0$}; \draw (4,0) node[below=3pt] {$T_1$}; \draw (5.5,0) node[below=3pt] ...


2

With some work, we can remove all unnecessary space: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\svdots}{% \vbox{\baselineskip4\p@\lineskiplimit\z@\kern2\p@\hbox{.}\hbox{.}\hbox{.}}% } \makeatother \begin{document} \[ \left( \begin{array}{*{3}{@{}c} @{} *{7}{c} @{\,} *{3}{c@{}}} &&&& \vdots ...


0

If you do not want to reduce the font size, you will have to reduce the space between the columns in order to set both matrices next to each other: % arara: pdflatex \documentclass[a4paper]{amsart} \usepackage{mathtools} \begin{document} \begin{equation*} \arraycolsep=1.55pt\def\arraystretch{1} % maximum value for this case. ...


2

The tabular is not doing anything useful, you could use array to save putting each entry into math, but here you can just remove it and use the pmatrix. You can reduce fonts and column spacing but it just looks a mess and to cramped to read, so I would break over a line. \documentclass[a4paper]{amsart} \setlength{\parindent}{0pt} \setlength{\parskip}{1ex ...


2

I'd use a simpler approach: \documentclass{article} \usepackage{graphicx} \newlength{\ftextheight} \newcommand{\setfactor}[1]{% \setlength{\ftextheight}{#1\textheight}% } \begin{document} \setfactor{0.15} \includegraphics[height=\ftextheight]{example-image} \includegraphics[height=0.5\ftextheight]{example-image} \end{document} The command ...


5

Evaluate the one factor first using a dimension expression \dimexpr: \documentclass{article} \usepackage{graphicx} \begin{document} \def\factor{0.15} \includegraphics[height=\factor\textheight]{example-image} \includegraphics[height=0.5\dimexpr\factor\textheight]{example-image} \end{document}



Top 50 recent answers are included