I'm using the scrartcl documentclass and try to insert some vertical space after including an image.
Lorem ipsum...\\\\
\includegraphics[width=\textwidth]{image.png}
% Add vertical space here
Lorem ipsum...
Before the image I can just add like \\\\ to add some space (which I don't like as well...), but I can't add these after the image because there is no line to end.
Is there an option to add a margin before and after the image?
I know that I could use figures, but I like the simple way of just adding one simple line of \inludegraphics{blah}
You should try using \vspace. \\ just adds newlines while \vspace adds vertical skips. Alternatively you could use \smallskip \medskip or \bigskip.
Related
I want to add add the '+' symbol to some of my text in Latex and am struggling to format it correctly. I want the end result to be "Hello+", and to look just like plain text
Just Hello+ results in
which doesn't look quite right
while Hello{\LARGE\texttt{+}} results in
with the plus symbol too high vertically (The LARGE was used to approximately match the font size)
I don't really understand which layout you are aiming for, but if you just want to move it further down, you can use
\documentclass{standalone}
\usepackage{graphics}
\begin{document}
Hello\raisebox{-0.5ex}{+}
\end{document}
(adjust the value of -0.5ex as needed)
I'm currently writing a report where I write new paragraphs like this:
I like sharks, sharks are cool.
Also bears are really cool.
Which basically has one completely empty line between then. In order to create a new paragraph I use the "\" code:
I like sharks, sharks are cool. \\
Also bears are really cool.
However this generates "Underfull \hbox (badness 10000)" error. What is the correct way of starting a new paragraph?
use \par after the line of code you want there to be a new paragraph
after
I like sharks, sharks are cool. \par
Also bears are really cool.
https://www.sharelatex.com/learn/Paragraphs_and_new_lines
If your looking for line breaks go here
https://www.sharelatex.com/learn/Line_breaks_and_blank_spaces
You have several options
\\ (two backslashes)
\newline
\hfill \break
\vspace{5mm}
Inserts a vertical spaces whose length is 5mm. Other LATEX units can be used with this command.
\vfill
Inserts a blank space that will stretch accordingly to fill the vertical space available. That's why the line "Text at the bottom of the page." is moved to the bottom, and the rest of the space is filled in.
\smallskip
Adds a 3pt space plus or minus 1pt depending on other factors (document type, available space, etc)
\medskip
Adds a 6pt space plus or minus 2pt depending on other factors (document type, available space, etc)
\bigskip
Adds a 12pt space plus or minus 4pt depending on other factors (document type, available space, etc)
Not sure if it's best practice, but I would use:
I like sharks, sharks are cool. \newline
Also bears are really cool.
\newline followed by an empty line will give you the space between the two lines.
I just put a blank line in between.
I like sharks, sharks are cool.
Also bears are really cool.
I wouldn't worry about an underfull \hbox warning though. You probably have better things to do than try to make all of LaTeX's warnings go away.
I would also take a look at \paragraph{} command, that may provide paragraph heading too.
I'm trying to get a way to automatically adjust the size of a minipage.
I am creating a report which will have several "paragraphs" that have a floating image on the left and some text on the right of that image and eventually below it if there is enough text. The both of them ( image + text ) make together a "semantic block".
First I did that :
\begin{wrapfigure}{L}{0.15\textwidth}
\centering
\includegraphics[width=0.1\textwidth]{image}\\
\emph{image caption with no "figure1"}
\end{wrapfigure}
Text related to this image\\
Text related to this image\\
Text not related to this image\\
and of course the text not related to the image was considered like the other lines of text, printing on the right of the image.
So i tried to wrap it all :
\begin{minipage}[c][10cm]{20cm}
\begin{wrapfigure}{L}{0.15\textwidth}
\centering
\includegraphics[width=0.1\textwidth]{image}\\
\emph{image caption with no "figure1"}
\end{wrapfigure}
Text related to this image\\
Text related to this image\\
\end{minipage}
Text not related to this image\\
but it really isn't convenient and the height is fixed.
If there is a better way to do it not using minipage that would be great too.
In the end i plan to make it into a \newenvironment taking 2 parameters : image name and text so I can use it easily in the article.
EDIT: fixed a typo in 2nd code
when using \listoffigues and \listoftables the numbers and the captions overlap each other. For example: "2-10 laminar flow" --> 10 and lam overlap each other.
I'd like to add horizontal space without changing the format.
I tried "\l#figure{\#dottedtocline{1}{0em}{6em}}" already. The horizontal space is fine now, but this command added vertical space between the lines which I don't want.
The tocloft package changes the entire format so I don't want to use it.
Any ideas how to change the horizontal space between numbers and caption only?
I have a quote on a blank page in latex. I have managed to center it horizontally, however, when i try to center it vertically it gives me some problems. I have tried
\vspace{}
\begin{quote}
\centering
quote
\end{quote}
However it doesnt work.
Try this:
\vspace*{\fill}
\begin{quote}
\centering
quote
\end{quote}
\vspace*{\fill}
You can also use increments of \paperheight. For instance if you wish to have the quote 1/3 down the page you can do
\vspace*{0.15\pageheight}
\begin{quote}
\centering
quote
\end{quote}
\newpage
Note:
The multiplication factor is based on having twice the pageheight, therefore 1/3 = 0.3 . 0.3/2 = 0.15 -> 0.15\pageheight
Rather than adding a fraction of vertical space underneath it is easier to tell continuing content to start at the top of the next page with \newpage.