Pode ser uma pergunta simples, mas boba, mas continua me incomodando por dias. Baseie-se no meu código:
\documentclass[a4paper, 11pt]{article}
\usepackage[margin=2cm]{geometry} % changes the margin
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{indentfirst}
\usepackage{blindtext}
\renewcommand\thesection{\Alph{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\titleformat{\section}
{\normalfont\fontsize{11}{.5em}\bfseries}{\thesection}{.5em}
{}
\titleformat{\subsection}
{\normalfont\fontsize{11}{.5em}\selectfont}{\thesubsection}{.5em}
{}
\titlespacing % starred version: first paragraph is not indented
{\subsection} % <command>
{1em} % <left>
{.4em} % <before-sep>
{.3em} % <after-sep>
\begin{document}
\section{Introduction}
\subsection{Subsection One}
\begin{itemize} [leftmargin=1.3cm,topsep=0pt,itemsep=0pt,parsep=0pt,partopsep=0pt]
\item some item here and there
\item some item here and there
\end{itemize}
\subsection{Subsection Two}
\setlength\parindent{.85cm} \blindtext
\end{document}
Minha pergunta é: como posso ajustar a margem do parágrafo paralelamente ao número da subseção? enãoo número da seção?
Responder1
É isso que voce quer? Tudo depende do \llap
comando, que insere seu argumento à esquerda do ponto atual da linha sem movê-lo.
\documentclass[a4paper, 11pt]{article}
\usepackage[margin=2cm]{geometry} % changes the margin
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{indentfirst}
\usepackage{blindtext}
\renewcommand\thesection{\Alph{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\titleformat{\section}
{\normalfont\fontsize{11}{.5em}\bfseries}{\llap{\thesection\hskip0.67em}}{0em}
{}
\titleformat{\subsection}
{\normalfont\fontsize{11}{.5em}\selectfont}{\thesubsection}{.5em}
{}
\titlespacing % starred version: first paragraph is not indented
{\subsection} % <command>
{0em} % <left>
{.4em} % <before-sep>
{.3em} % <after-sep>
\begin{document}
\section{Introduction}
\subsection{Subsection One}
\begin{itemize} [leftmargin=1.3cm,topsep=0pt,itemsep=0pt,parsep=0pt,partopsep=0pt]
\item some item here and there
\item some item here and there
\end{itemize}
\subsection{Subsection Two}
\setlength\parindent{.85cm} \blindtext
\end{document}