Tag Info

Hot answers tagged

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


8

The image appears to be part of the chapter head design so the most natural place to add it is in \@makechapterhead (or equivalent command in other classes. This adds an image with name \chappic if that command is non empty. \documentclass{book} \usepackage{graphicx} \makeatletter \def\@makechapterhead#1{% \ifx\chappic\@empty \vspace*{50\p@}% \else ...


6

++ instructions are pen instructions (in PostScript lingo). What it does is to lift the pen and move that much added to the current point. Single + is another instruction but in the end the pen is brought back to the current point. So effectively what you are doing is \draw[line width=4] % Set pen properties (coorda) % move to coorda labeled point. This ...


5

The initial point of the angle needs to be located along the line, so using polar coordinates (20:0.7) is the easiest way to specify that: To add a caption you can use the caption package. Alternatively you can add a \node to place text below the axis. Notes: I added rotation to the blue node as that seemed the easiest way to display the text. If you ...


5

Standard marginpars are added by the page breaker so don't work in any kind of box, so a caption or float box on its own would be a enough, a caption inside a float doubly so. Also the caption is written to the list of figures where you probably don't want the note. You could use \caption[..]{...} to have a note-less caption for the lof. There are ...


5

\arraystretch is set to 3. That means also the descender part of the strut box is multiplied by 3. But the \includegraphics lines do not have a descender part, thus that part is filled with white space. The example does the opposite, setting \arraystretch to 0 and the vertical gap is set explicitly to 2\tabcolsep as the horizontal gap (adjust to your ...


5

You can't have lstlisting in the argument to another command, in this case \UnaryInfC. The usual trick is to prepare the listing in a box and use the box in the argument: \documentclass[12pt, twoside]{scrreprt} \usepackage{listings} \usepackage{bussproofs} \newsavebox{\lstA} \newsavebox{\lstB} \begin{document} \begin{prooftree} \AxiomC{test} ...


4

According to the beamer manual you can use the textpos package to position things absolutely on a page: 12.8 Positioning Text and Graphics Absolutely Normally, beamer uses TEX’s normal typesetting mechanism to position text and graphics on the page. In certain situation you may instead wish a certain text or graphic to appear at a page position that ...


3

Basically you want to use the sidecap package. I'll show a usage and also reformat the table to be more typographycally sound. \documentclass{article} \usepackage[leftcaption]{sidecap} \usepackage{booktabs,siunitx} % better tables \begin{document} \begin{SCtable} \caption{Caption} \label{tab:1} \begin{tabular}{lS[table-format=3.3]} \toprule ...


3

You can also rotate the caption: \documentclass{article} \usepackage{graphicx,caption,varwidth} \begin{document} \section{My Table} \paragraph{} Please print my table on this page! \begin{table}[htbp] \centering \captionsetup{justification=centering} \rotatebox{90}{\begin{varwidth}{\textheight}\centering \parbox{8cm}{\caption{My Table ...


3

I am not sure what you are really doing so this may be completely unhelpful. If so, just say and I can delete it. You can use pics to define small pictures which you can reuse later over and over. Technically, you could create a pic for each node you want and then call the relevant code at the relevant point. However, this is really an abuse of the ...


3

You could also just define your own macro that builds the \node content.. On the left is the manually specified examples you provided and on the right are the ones obtained by calling \Node: Notes: You should use \tikzset instead of \tikzstyle as per Should \tikzset or \tikzstyle be used to define TikZ styles? Code: \documentclass{article} ...


3

Here are a few options: Code: \documentclass[a4paper,10pt]{article} \usepackage{showframe} \usepackage{amsthm} \usepackage{amsmath, amssymb, amsfonts} \usepackage{dsfont} \begin{document} \begin{equation} \parbox{0.7\linewidth}{ Als X een overaftelbare deelverzameling van $\mathds{R}$ is, dan is er een bijectie van X naar $\mathds{R}$. $\implies$ it ...


3

As @percusse pointed out, the anchor for an image is the center of the image. In order to make the image fit in the page, tikz moves the canvas center. To keep the origin (0,0) at the bottom left of the canvas, we need to anchor the image to the bottom (south) and left (west). Then, the code will look like: \noindent\begin{tikzpicture} ...


3

The labels package in combination with textmerg is very useful for this. I use this to print pages of labels on a laser printer but you could obviously print on ordinary paper and cut them out and glue if preferred. The address details are kept in a separate file, included here using filecontents. \documentclass{article} \usepackage{textmerg} ...


3

In general it's better to avoid rescaling a table; never rescale the caption. Your main problem is due to the wide column headers; I don't think it's useful to have the table extending to the whole line width, so I'll present two solutions. \documentclass{article} \usepackage[showframe=true]{geometry} \usepackage{caption}% http://ctan.org/pkg/caption ...


3

You can set the width of the table to \textwidth by choosing a tabularx environment. The only trick, so to say, is that whereas the body of the four middle columns ought to be specified to have column type S (from the siunitx package, so that the numbers are aligned on the decimal columns), the column headers should be specified to have (a modified form of ...


3

With a bit of care you can set the float placement parameters to prevent floats within the region, here I set totalnumber to 0. It is a global setting so you need to explicitly set it back at the end, you can not use a group to restore things. Also because of its global nature and the timing of the page breaking sometimes a bit of care needs to be taken into ...


3

As noted in How to prevent page break between section title and table You could use the needspace package to conditionally ad a \clearpage if the heading is near the bottom of the page. (The problem that is solving is slightly different, a page break happening before the table, after the heading, whereas you have a page break within the heading). In ...


3

I'm not getting “erratic” behavior. However, there's a better way for drawing the symbol so that it has the same height as a Y; I set the width to .5em in the current font and the proportion between the two parts as 1:3 \documentclass{article} \usepackage{amsmath} \usepackage{pict2e,picture} \newcommand\drawY{% \begingroup \dimen0=.5em ...


3

Since you're interested in particular float placement, the float package's [H]ere placement option can be of help. Place the table-in-question within a \vfill spacing on both sides: \documentclass{article} \usepackage{lipsum,float} \begin{document} \lipsum[1-7] \vfill \begin{table}[H]% This table will not float \centering ...


3

The only way I can reproduce this is to edit the file between runs. \documentclass{article} \addtolength\textheight{-35\baselineskip} \usepackage{varioref} \begin{document} abc\\abc\\abc\\abc%\\ABC aaa aaaa aaaa aaa aaa aaa aaaa aaaa aaa aaa vref produces: Figure \vref{zz}. aaaa\\zzz \begin{figure}[ht] \fbox{XXXX} \caption{fff\label{zz}} \end{figure} ...


2

It is indeed possible that varioref generates sub-optimal results in special circumstances but you MWE is actually not an example of this. If you run this starting without any .aux file then everything comes out fine, i.e., you first get and if you re-run (as requested) you get the best possible result, i.e., Basically your assuming that varioref ...


2

You can adjust LaTeX's bottom float area so that the floats are centred in the space, thanks to Werner for the MWE:-) \documentclass{article} \usepackage{lipsum,float} \makeatletter \def \@cflb {% \let\@elt\@comflelt \setbox\@tempboxa \vbox{}% \@botlist \setbox\@outputbox \vbox{% \unvbox\@outputbox ...


2

\documentclass[twocolumn]{article} \usepackage{stfloats} \usepackage{subcaption} \usepackage[demo]{graphicx} \begin{document} \begin{figure*}[p] \begin{minipage}{.45\textwidth} \centering \subcaptionbox{Fig A1} {\includegraphics[width=0.48\columnwidth]{teste}} \hfill \subcaptionbox{Fig A2} {\includegraphics[width=0.48\columnwidth]{teste}} \hfill ...


2

I encountered the same problem when using biblatex with memoir trying to print separated bibliographies. When using \printbibliography, the headings defined in biblatex.def specifically for memoir (and only those) add a \phantomsection after the chapter/section/subsection. Is this really by design? A simple solution is to define a custom heading that has ...


2

You can use a minipage and size it appropriately where I have used the pgffor package was used just to create a simple loop to demonstrate the technique. If you store the files in a CSV file as: Stephen P Jobs, 1 Infinite Loop, Cupertino, CA 95014 Tim Cook, 1 Infinite Loop, Cupertino, CA 95014 Larry Page, 1600 Amphitheatre Pkwy, Mountain View, CA 94043 ...


2

longtable environments do not float, so the text placed after the table in the source will be typeset after the table. Also a center environment has no affect on longtable (which technically is always full width). As an alternative to just placing it after the table you can place it in a \multicolumn so it is aligned with the columns. ...


2

I will agree with @egreg that this does not seem to be the right way to do what you intend. In any case, if you insist, here's what I suggest. Beamer uses \vfill to vertically justify your slide. You may think of it this way: there's a \vfill above your slide's contents and one more below them. So, roughly speaking, the \vfill that you introduce only ...


2

Styles can greatly improve readability. Here's a proof of concept using only styles. The idea is to define a <name-of-node>pos style for each named node so that you can specify positioning by defining this style using keys like at or left etc, separately from the point of creation of the nodes. \documentclass{standalone} \usepackage{tikz} \tikzset{ ...



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