# Tag Info

## Hot answers tagged positioning

8

You could adjust the way the plain (default) style sets the caption (from bottom to above or top): \documentclass{article} \usepackage{algorithm2e}% http://ctan.org/pkg/algorithm2e \makeatletter \renewcommand{\@algocf@capt@plain}{above}% formerly {bottom} \makeatother \begin{document} \begin{algorithm}[H] \SetAlgoLined \KwData{this text} ...

6

Simply removing \par\noindent should be OK. Also, there is a spurious space in the line \end{minipage}} %\par\bigskip% Complete code \documentclass{article} \usepackage[margin=2cm]{geometry} \newlength\cardheight \newlength\cardwidth \setlength\cardheight{0.25\textheight} \setlength\cardwidth{0.4\textwidth} \newcommand\cards[1]{% ...

5

Here is one option: Don't use overlay at all. \documentclass{article} \usepackage{lipsum,tikz} \usepackage[margin=1in,showframe]{geometry} \begin{document} \noindent \hspace*{-2mm} \begin{tikzpicture} \coordinate (my spot) at (0,0); \fill[blue] (my spot) circle (1mm); \node[above right,align=left,blue,draw=blue,thick,outer sep=0pt] at (my spot) ...

5

You can use the command \prescript of the maththools package. See the following minimal working example: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{equation*} \prescript{2}{}{K} \end{equation*} \end{document}

5

The converter shouldn't use \overset and \underset: it's just wrong! Correct code for the examples is \documentclass[11pt,a4paper]{exam} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry} \begin{document} ...

4

Try something like this: \documentclass{article} \usepackage[demo]{graphicx} % the option demo is used for the example, remove it \usepackage{tabu} \begin{document} \begin{table}[hbtp] \centering \tabulinesep=\tabcolsep \begin{tabu} to \textwidth {|X[4,c,m]|X[1,c,m]|X[0.75,c,m]|X[1.25,c,m]|} \hline \textbf{Motif} ...

4

You can position the legend relative to the axis using (without hard coding any lengths): legend style={at=(current axis.south east), anchor=south west} \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{polar} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture} \definecolor{lgray}{rgb}{0.7,0.7,0.7} ...

4

The problem is in the fact that positioning redefines the above key which is used by moderntimeline to position the text over the timeline. Here are two patches that could solve your problem. One is to redefine the macro \tl@textstartabove using \def and not using \pgfmathsetmacro as is done in moderntimeline.sty: \def\tl@textstartabove{\tl@width+1pt} ...

4

Sometimes you may have to cheat a little... Below I set the date as part of the address, leaving the date empty: \documentclass{scrlttr2} %\usepackage{fontspec} % Allows font customization %\usepackage{marvosym} % Allows the use of symbols \usepackage[english]{babel} % Required to compile in Windows \usepackage{graphicx} \setlength\parindent{0pt} % ...

3

This answer proposes a notion of relative position between [0 1] where 0 means starting point and 1 means end point of a line. Thus, pos=0.1, 0.5, 0.9 would means near start, midway and near end respectively. By doing so words for location are turned into decimal numbers between 0 and 1. These numbers can be defined by users in the foreach loop. Note: The ...

3

LaTeX fills the top area before the bottom area and only attempts the bottom area if the float will not fit in the top. thus to encourage floats to go top and bottom you need to restrict the top \setcounter{topnumber}{1}% 2 in article would only allow one float at the top, or \renewcommand\topfraction{.5}% .7 in article would restrict the top area to ...

3

The MWE package offers a nice solution: \documentclass{article} \usepackage{mwe}% or load ’graphicx’ and ’blindtext’ manually \begin{document} \blindtext \begin{figure} \includegraphics[width=.48\linewidth]{example-image-a}\hfill \includegraphics[width=.48\linewidth]{example-image-b} \caption{MWE to demonstrate how to place to images side-by-side} ...

3

To just shift it form its default position use xshift and/or yshift inside legend style key in this way: (you can also use axis coordinate in this way legend style={anchor=north west, at={(axis cs:45,4)}}) \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{polar} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture} ...

3

Assuming I understand what is required, then you should take a look at the documentation (in the CVS manual) about graph layouts, in particular the tree layout: \documentclass[tikz,border=0.125cm]{standalone} \usetikzlibrary{graphs} \usetikzlibrary{graphdrawing} \usegdlibrary{trees} \begin{document} \tikz\graph [tree layout, grow down] {a -> {b,c}}; ...

3

If that's an official journal cls file, you shouldn't change it. I suppose it is. Here is a nice and easy solution which leaves the class definition as it is right now, but won't let the floats from appendix go before it actually begins. Use the \FloatBarrier macro of the placeins package. If you put it right before the section title, it will prevent ...

3

\documentclass{article} \usepackage[a4paper,margin=1in,showframe,marginparsep=0pt,marginparwidth=0pt]{geometry} \usepackage{graphicx} \usepackage{eso-pic} \AddToShipoutPictureBG*{% \AtTextLowerLeft{\makebox[\textwidth][r]{% \includegraphics[width=1cm,height=1cm,keepaspectratio]{example-image-a}}}} \begin{document} Some text here \end{document}

2

A tikz solution any way. \documentclass{article} \usepackage[a4paper,margin=1in,showframe]{geometry} \usepackage{tikz} \usetikzlibrary{backgrounds,calc} \usepackage{graphicx,lipsum} \begin{document} \begin{tikzpicture}[remember picture,overlay] \begin{pgfonlayer}{background} \node[anchor=south east,outer sep=0pt,inner sep=0pt] at (\$(current page.south ...

2

I omit the tabular's lines at the top, bottom, left and right. Then use the [t] option of tabular to force alignment on the first line. Finally, put the surrounding lines back with \fbox, which preserves the baseline: \documentclass{article} \begin{document} \begin{enumerate} \item test \item \begin{minipage}[t]{0.5\textwidth} Multiply the value of ...

2

Assume that your invitation was called invite.pdf and created using: \documentclass{article} \usepackage{lipsum}% http://ctan.org/pkg/lipsum \usepackage[paperwidth=4.25in,paperheight=5.5in,margin=0.7in]{geometry}% http://ctan.org/pkg/geometry \begin{document} \lipsum[1]% The invitation \end{document} Now create printing.tex resembling: ...

2

It's not realy the indentation that's changing. What's happening is that memoir is using different widths for the left and right hand margins of your page. I might suggest using the geometry package to change this. You can use \usepackage[margin=1.75in]{geometry} to set the margins to 1.75in all around. But also, I'm not very familiar with the memoir ...

1

You can just create two foreach loops, and only specify the position for the ones you want to change: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usepackage[english]{babel} \begin{document} \tikzstyle{vertex}=[draw=black!25,shape=circle,fill=black!25, edge=black!25,minimum size=20pt,inner sep=0pt] \tikzstyle{edge} = [draw,thick,-] ...

1

For reference, this issue seems to have been fixed in recent versions of cleveref (at least since 0.18.10; not yet in CTAN but available from my web site). The redefinitions in the other answers are no longer be necessary. I haven't tracked down precisely which version of cleveref fixed this bug.

1

\documentclass[a4paper]{scrreprt} \usepackage{booktabs} \usepackage[labelfont=bf, labelsep=newline,singlelinecheck=false,]{caption} \setcapindent{0em} \parindent=0pt \newsavebox\TBox \begin{document} \rule{\linewidth}{1pt}% only demo \begin{table}[htb] \centering \savebox\TBox{% save it to get the width of the table \begin{tabular}{lccccc}\toprule ...

1

I finally solved the problem: I used the comments of Ulrike and Chris, thanks, and the package smartref to save the page number in a variable. A new command calculates the difference and writes the text: \newcount\totalfloatingpages \newcommand{\floating}[1]{ \sgetpageval{\refp}{#1_ref} \sgetpageval{\floatp}{#1} \newcount\floatingpages ...

1

The problem is that the base line of the included graphics is at the bottom side of the picture and not in the middle. This could by corrected by e.g. an adapted raisebox around the includegraphics. Another option is to use tcolorbox with its sidebyside option: \documentclass{article} \usepackage{exercise} \usepackage{graphicx} \usepackage[many]{tcolorbox} ...

1

More advanced scenario with tabu (not taboo). \documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class \usepackage[demo]{graphicx} % the option demo is used for the example, remove it \graphicspath{{../Img/05Core/}} \usepackage{tabu,mathtools,tikz} \begin{document} \begin{table}[hbtp] \centering ...

1

Using the multicol package provides a more general solution which works even if the stuff you want in a single column is just text, for example. Your code wouldn't easily compile for me as I don't know what package defines the \ce macro of if this is a custom macro or whatever. So I changed that to maths just to demonstrate the idea. I also added some text ...

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