How to horizontal align titles, author names and affiliations in APA6 in latex - latex

I am currently using the following latex code.
\documentclass[jou,apacite]{apa6}
\title{Example of journal article}
\twoauthors{Author One}{Author Two}
\twoaffiliations{Institute of Psychology}{Freud's Institute}
\abstract{This is an example of a journal article using the \texttt{apa6.cls} document class to typeset manuscripts according to 6th edition of the Americal Psychological Association (APA) manual}
\rightheader{APA style}
\leftheader{Author One}
\begin{document}
\maketitle
\section{Sample section}
Sample text. Sample text. Sample text. Sample text. Sample text. Sample text.
\bibliography{sample}
\end{document}
The title, author names and affiliations are currently centered. I want to left align them as shown in figure below.
I tried the solutions provided for article document type in other questions. But they did not work for my template.
Please let me know if any details are needed.

Related

<apa7> Why is professor, course, and duedate not appearing on the title page?

I am using the LaTeX package apa7 to format my research paper. However, the professor, course, and duedate for the assignment is not appearing in the title when the \maketitle command is called while my name and affiliation appears just fine. I don't see any references to this problem on the Internet for some reason, what is the issue?
\documentclass[man,donotrepeattitle]{apa7}
\usepackage[style=apa,sortcites=true,backend=biber]{biblatex}
\addbibresource{references.bib}
\title{Natural Language Processing With GPT3:\\ More than just a cheating tool}
\shorttitle{More than just a cheating tool}
\author{Anish Goyal}
\affiliation{GSMST}
\course{American Literature and Composition}
\professor{Susan Kohanek}
\duedate{January 31, 2023}
\newcommand{\HRule}{\rule{\linewidth}{0.25mm}}
\setlength\parindent{36pt}
\begin{document}
\maketitle
\end{document}
I tried looking at the apa7 manual. I expect the course, professor, and duedate to appear on the title page as indicated on the apa formatting guide. Instead, only my name and affiliation appears.
The information is displayed if you use the student paper document mode instead of the manuscript mode:
\documentclass[stu,donotrepeattitle]{apa7}
\usepackage[style=apa,sortcites=true,backend=biber]{biblatex}
\addbibresource{references.bib}
\title{Natural Language Processing With GPT3:\\ More than just a cheating tool}
\shorttitle{More than just a cheating tool}
\author{Anish Goyal}
\affiliation{GSMST}
\course{American Literature and Composition}
\professor{Susan Kohanek}
\duedate{January 31, 2023}
\newcommand{\HRule}{\rule{\linewidth}{0.25mm}}
\setlength\parindent{36pt}
\begin{document}
\maketitle
\end{document}

Latex Figures side-by-side in AR document class

I am currently working on formatting an article for publication in Annual Reviews journal. They provide the class file that suppose to make the process easier.
The file could be downloaded here: https://www.annualreviews.org/pb-assets/Authors%20Assets/AR-Style1-1653591280420.zip
Here is the MRE:
\documentclass{ar-1col-S2O}
\usepackage[caption=false]{subfig}
% Document starts
\begin{document}
%Example of a Figure
\section{ELEMENTS\ OF\ THE\ MANUSCRIPT}
\subsection{Figures}Figures should be cited in the main text in chronological order. This is dummy text with a citation to the first figure (\textbf{Figure \ref{fig:sub_a}}). Citations to \textbf{Figure \ref{fig:sub}} (and other figures) will be bold.
\begin{figure}
\subfloat[Figure A]{\includegraphics[width=0.4\textwidth]{example-image-a}\label{fig:sub_a}}\quad
\subfloat[Figure A]{\includegraphics[width=0.4\textwidth]{example-image-b}\label{fig:sub_b}}
\caption{Combined figure}\label{fig:sub}
\end{figure}
\end{document}
Which gives me this:
And I need it to look like this (side-by-side with bold panel marker in the corner):
Any help or suggestions are welcome. Thank you.
\documentclass{ar-1col-S2O}
\usepackage[caption=false]{subfig}
% Document starts
\begin{document}
%Example of a Figure
\section{ELEMENTS\ OF\ THE\ MANUSCRIPT}
\subsection{Figures}Figures should be cited in the main text in chronological order. This is dummy text with a citation to the first figure (\textbf{Figure \ref{fig:sub_a}}). Citations to \textbf{Figure \ref{fig:sub}} (and other figures) will be bold.
\begin{figure}
\begin{minipage}{.4\textwidth}
\subfloat[Figure A]{\includegraphics[width=\textwidth]{example-image-a}\label{fig:sub_a}}
\end{minipage}
\hfill
\begin{minipage}{.4\textwidth}
\subfloat[Figure A]{\includegraphics[width=\textwidth]{example-image-b}\label{fig:sub_b}}
\end{minipage}
\caption{Combined figure}\label{fig:sub}
\end{figure}
\end{document}

How can I change the placement of Table of Contents in a Quarto book project?

I am using Quarto inside RStudio to create a book project. The output will be a pdf/LaTeX file. Quarto originally puts the Table of Content just after the title page. But I need to put the abstract, preface and acknowledgements first before the Table of Contents. How can I change this sequence? Is it possible to change this sequence using _quarto.yml file or do I need to change it through LaTeX?
You can do this using template-partials
To do that you need to create a before-body.tex file as a partial latex template and put all the necessary latex code that will go before the table of contents, list of figures, list of tables, and rest of the document.
before-body.tex
$if(has-frontmatter)$
\frontmatter
$endif$
$if(title)$
\maketitle
$endif$
\newpage
%----------------------------------------------
% Abstract
%----------------------------------------------
\begin{center}
\Large{Abstract}
\end{center}
\vspace*{\baselineskip}
This is the Abstract part
\newpage
%----------------------------------------------
% Preface
%----------------------------------------------
\begin{center}
\Large{Preface}
\end{center}
\vspace*{\baselineskip}
This is the Preface part
\newpage
%----------------------------------------------
% Acknowledgement
%----------------------------------------------
\begin{center}
\Large{Acknowledgement}
\end{center}
\vspace*{\baselineskip}
This is the acknowledgement part
\newpage
Then to add this template, use the template-partials option in _quarto.yml
_quarto.yaml
project:
type: book
book:
title: "Quarto book"
author: "Shafee"
date: "7/31/2022"
chapters:
- index.qmd
- intro.qmd
format:
pdf:
toc: true
documentclass: scrreprt
template-partials:
- before-body.tex
Also, create the partial file named exactly as before-body.tex, since per the documentation,
Note that the name of the partial files is important. You choose which portion of the template to replace by providing a partial with that name.

Latex - how to add the name and reference of the image on the titlepage in list of figures

I'm writing my thesis in latex and can not find a way to include the picture I have on my titlepage in my list of figures.
I'm writing in the report class. Is there an easy way to add this manually?
So I write in the report class and my title def. looks loke this (preamble of the document) and within the document only with the \maketitle command:
\title{\vspace{-5ex}{XY}\vspace{2ex}
{\includegraphics[angle=270,origin=c,scale=0.5]{good.pdf}}\vspace{-5ex}
{\large Department of XY, University of XY}\vspace{-2ex}
}
\author{Bachelor thesis submitted by XY\\ Supervision:
Dr XY, Prof. XY}\vspace{-2ex}
\date{August 2018}

getting a decimal number while creating section on my texmate?

\documentclass[12pt] {book}
\begin{document}
\begin{titlepage}
\begin{center}
\line(1,0){300}\\
[4mm]
\huge{\bfseries THIS IS MY NOVEL}\\
[1mm]
\line(1,0){300}\\
\end{center}
\end{titlepage}
\section{Introduction}\label{sec:intro}
here I am explaining the story of me and about my family and where I am right now and and so on.
\end{document}
for the section I am getting an output as 0.1 introduction please let me know how to fix this.
You are using the document class book. The class book defines the commands \part, \chapter, \section, \subsection... see. If you add a section, latex will use {chapter number}.{section number} as default. Since you haven't started a chapter, the current chapter number is 0.
You can either promote your sections to chapters, or change the class from book to article (or something similar).

Resources