Latex: section title on the left [closed] - latex

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I have some problem with Latex with section titles. I would like to do something of this:
section title1 |text...
|text...
|text..
|text..
|text
section title2 |text...
How could I do this effect? Thank you for your answers!

You could indent the whole section text that follows the heading with the changepage package.
\documentclass[a4paper,10pt]{article}
\usepackage{changepage}
\begin{document}
\section{section heading}
\begin{adjustwidth}{30mm}{0mm}
section text line one
section text line two
\end{adjustwidth}
\section{section two heading}
...
\end{document}
Which gives you something like
section heading
section text line one
section text line two
section two heading
...

Related

Why do LaTeX documents have a whacking great big space at the top? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed last year.
Improve this question
I am extremely new to LaTeX but have noticed that in the examples I have seen of LaTeX documents that there is always a massive number of empty lines at the top of the compiled pdf file. Nobody seems to say a word about this! Is this some kind of academic convention?
Here is an example:
\documentclass[]{article}
\usepackage{graphicx}
\title{Here is my title}
\author{Kevin Wright}
\begin{document}
\maketitle
\begin{abstract}
This is my abstract stuff
\end{abstract}
hello $\sqrt{x+y-10}$
\end{document}
Yes, by default the article class uses a lot of whitespace above the title of the paper. If you use a separate title page about 60 points of it.
With regard to the space on top of a regular page,
add \usepackage{layout} to your example, and just before the \end{document} add:
\section{Layout}
\layout
Now process and view the document and you will see exactly what the space on top of the page is made up of.
If you want to modify that, have a look at e.g. the geometry and fancyhdr packages.

How to change top and bottom page margins for odd and even pages? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I have a problem with my LaTeX code. I want to change page geometry for odd and even pages. However, i also have to change top margins differently for odd and even pages.
All answers for odd and even page margins include actually change in right margin.
I am runnnig TeXMaker in Ubuntu with a Texlive-full.
\documentclass[a4paper,12pt,twoside]{report}
\usepackage[a4paper,margin=1in,landscape]{geometry}
\setlength{\oddsidemargin}{25mm}
\setlength{\evensidemargin}{40mm} #These change only left margin
Based on https://tex.stackexchange.com/a/332272/36296 maybe the following could help:
\documentclass[a4paper,12pt,twoside]{report}
\usepackage[a4paper,inner=1cm,outer=2cm,landscape,bottom=5cm]{geometry}
\usepackage{etoolbox}
\makeatletter
\patchcmd\#outputpage{\headheight}{\ifodd\count\z# 3cm\else 0.5cm\fi}{}{}
\patchcmd\#outputpage{\global\#colht\textheight}{\global\advance\textheight by\ifodd\count\z# 2.5cm\else -2.5cm\fi\global\#colht\textheight}{}{}
\makeatother
\usepackage{lipsum}
\begin{document}
\lipsum\lipsum\lipsum\lipsum
\end{document}

Latex Beamer Custom "Out of" Slide Number [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I am doing Latex beamer and I want to have all slides appear out of 100 no matter how many slides I have.
So slide 1 will be: 1/100
slide 2 will be: 2/100
slide 3 will be: 3/100
I have no idea to do this?
With up-to-date beamer version:
\setbeamertemplate{page number in head/foot}{\insertframenumber /100}
(and maybe some footline template that shows the page number, but without seeing a minimal working example (MWE) that shows which theme your are using, this is pure speculation)
Compilable MWE:
\documentclass{beamer}
\usetheme{Berlin}
\setbeamertemplate{page number in head/foot}{\insertframenumber /100}
\begin{document}
\begin{frame}
content...
\end{frame}
\end{document}

Start new section at top of page, not below a figure [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
When I use more than one figure per section in LATEX, I am no longer able to dictate that the section number start just after a page break. I've been struggling with this for a while. If there are any LATEX wizards out there, your help would be much appreciated.
In the file referenced below, it is section 2 that I am struggling with. The final document is much, much longer than this and this problem happens several times, but I thought for the sake of clarity I would create a simpler version that still exhibits the problem.
zip file containing everything
\documentclass{article}
\usepackage{graphicx}
\usepackage{placeins}
\widowpenalty=2000
\clubpenalty=2000
\begin{document}
\section{}
\begin{figure} [h]
\center
\includegraphics[width=12cm]{Figure}
\label{fig:example}
\end{figure}
\FloatBarrier
My goal is to have section 2 start on a new page.
$$\\$$
\begin{figure} [h]
\center
\includegraphics[width=14cm]{Figure}
\label{fig:example}
\end{figure}
\newpage
\pagebreak [4]
$$\\$$
\section{}
\begin{figure} [h]
\center
\includegraphics[width=14cm]{Figure}
\label{fig:example}
\end{figure}
This is the body text for section 2.
\end{document}
Figure.jpg
Have you tried \clearpage instead of \newpage?

latex, documentstyle book, how page numbers always bottom centered? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am writing a 100+ page thesis using latex, with the document style "book".
Right now the page number is bottom centered on the first page of a chapter, on the top outer margin on the subsequent pages of a chapter.
I want the page numbers to always be bottom centered on each page, for roman as well as arabic page numbers. How I can I do this?
Use \pagestyle{plain} in the header, and read this section of the LaTeX Book on Wikibooks for more details.
Take a look on the fancyheader package.
You will probably have to do something like
\documentclass{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\begin{document}
Your content \ldots
\end{document}
Setting the page style can also affect the defaults. For example setting the page style to \pagestyle{empty}
will also remove both header and footer information, such as the page numbers in the footer.
The apporach with fancyhdr as mentioned is the way to directly modify these. Another way to clear the header and footer information with that package is \fancyhf{}.
The free online LaTeX wikibook is an excelent resource, here is the link for the page layout page which covers issues such as headers nad footers.
LaTeX Wikibook - Page Layout
Hope that helps,
Jay

Resources