General ⇒ Custom Quotation Environment
Custom Quotation Environment
paragraph spacing of 4cm and simple spacing between lines.
thanks for your help.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Custom Quotation Environment
- Does "paragraph spacing" mean the indentation of the environment content? Perhaps on both sides?
- Presumably "simple line spacing" means that the rest of your document has as different line spacing. How do you do that?
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Custom Quotation Environment
More details about the new environment
Spacing (indentation) on the left side only.
And just single space in the environment. Why the rest of the text already using spacing of 1.5
Thank you.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Custom Quotation Environment
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Custom Quotation Environment
So far I did this:
Code: Select all
% ------------------------------------------------- ------------
\newenvironment{novoambiente}
{ \small
\setlength{\parindent}{4cm}% ss
\setlength{\baselineskip}{0.1 \baselineskip}%
}{
\setlength {\parindent}{4cm}
}
% ------------------------------------------------- -
Sorry for not being well understood, is that do not speak English and I'm trying to understand what you are writing.
Thanks anyway!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Custom Quotation Environment
I'm also not natively speaking English. But fluency in this language is quite important when asking questions in a forum like this.fabioled wrote:[…] Sorry for not being well understood, is that do not speak English and I'm trying to understand what you are writing. […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Custom Quotation Environment
PREAMBLE file with the settings:
Code: Select all
\NeedsTeXFormat{LaTeX2e}
\input{cvs-id.def}
\CVSExtract$Id: abakos.sty,v 0.1 2012/29/08 15:08:25 gweber Exp $
\CVSPackage{abakos}{} %substitui \ProvidesPackage (replaces \ProvidesPackage)
% Pacotes de codificação das fontes para português
\usepackage[T1]{fontenc}
\usepackage{times}
% \usepackage{memhfixc} % Para mudança de tamanho de fontes
% Merge em duas células (linhas diferentes)
\usepackage{multirow}
%desenhar cabeçalho e rodapé
\usepackage{fancyhdr}
\pagestyle{fancy}
% Pacote para divisão silábica do portugues
\usepackage[english, brazil]{babel}
% Pacote de adequação do formato ABNT para normas da PUCMinas
%\usepackage{abnt-PPGInf-PUCMG}
% Pacote para citação e referências seguindo ABNT no sistema (AUTOR, Data)
\usepackage[alf]{abntcite}
\usepackage{cite}
\usepackage{abnt-alf}
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\citeoption{abnt-full-initials=yes}
\usepackage[portugues, linesnumbered, ruled, vlined]{algorithm2e}
\usepackage{algorithmic} %algorithm
\usepackage{listings}
\usepackage{leading} %espaçamento variavel
% Alterar o espaçamento da margem no algoritmo
\setlength{\algomargin}{1em}
% Margens
% \usepackage[inner=30mm,outer=20mm,top=30mm,bottom=20mm]{geometry}
\usepackage{geometry}
\geometry{tmargin=20mm,bmargin=20mm,lmargin=30mm,rmargin=20mm}
% %%%%%%%%%%%%%%%% NEWENVIRONMENT %%%%%%%%%%%%
\newenvironment{novoambiente}
{ \small
\setlength{\parindent}{4cm} % Paragrafo
\setlength{\baselineskip}{0.1\baselineskip} %
}
{
\setlength{\parindent}{4cm}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- Titulo de secao ---
\newcommand{\secao}[1]{\section{#1}}
\renewcommand{\section}{\@startsection
{section} %Nome
{0} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries\textsc}} % Estilo - negrito e maiusculo
% Titulo de subsecao ---
\newcommand{\subsecao}[1]{\subsection{#1}}
\renewcommand{\subsection}{\@startsection
{subsection} %Nome
{1} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries}} % Estilo
% Titulo de subsubsecao ---
\newcommand{\subsubsecao}[1]{\subsubsection{#1}}
\renewcommand{\subsubsection}{\@startsection
{subsubsection}% %Nome
{2} %Nivel
{0mm} %Indentacao
{1.5\baselineskip} % Antes do paragrafo
{1.5\baselineskip} % Depois do paragrafo
{\noindent\bfseries\itshape}} % Estilo
%% Comando para citação individual de Autor e Ano
\newcommand{\citeAutorAno}[1]{\citeauthoronline{#1} (\citeyear{#1})}
\newcommand{\citeCitacao}[1]{\citeauthoronline{#1}, \citeyear{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Recuo da primeira linha de cada parágrafo
\setlength{\parindent}{1.25cm}
\usepackage{indentfirst}
%Desenhar figuras geometricas
\usepackage{tikz}
% Formata tipo e tamanho da fonte das subseções.
\fancyhf{}
\rhead[\footnotesize{\por}]{\footnotesize{\monog}}
\renewcommand{\footrulewidth}{1.5pt}
\rfoot [\footnotesize{\editorial}]{\thepage}
\lfoot [\thepage]{\footnotesize{\editorial}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Code: Select all
\documentclass[a4paper,12pt,Times]{article}
\usepackage{abakos} % package created by me
\newcommand{\monog}{Modelo da revista Abakos da PUC em \LaTeX}
\newcommand{\monogES}{Model magazine Abakos in \LaTeX}
\newcommand{\origem}{Brasil}
\newcommand{\editorial}{\textbf{Abakos}, Belo Horizonte, jun./jul. 2012 - ISSN: 2175-5841}
\newcommand{\por}{Fábio Cordeiro}
\author{\por}
\newcommand{\univ}{Pontifícia Universidade Católica de Minas Gerais}
\newcommand{\funcao}{Mestrando em Engenharia Elétrica pelo Programa de Pós-graduação em Engenharia Elétrica da PUC Minas }
\newcommand{\curs}{Programa de Pós-graduação em Engenharia Elétrica da PUC Minas}
\newcommand{\keyword}[1]{\textsf{#1}}
\begin{document}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Pagina de titulo
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{flushleft}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\footnotetext{Artigo recebido em 10 de julho de 1983 e aprovado em 29 de maio 2012}
\vspace{.1cm} {
\Large{\monog \footnote{Este artigo apresentado a revista Abakos, mais texto mais texto mais texto texto
mais texto mais texto mais texto mais texto mais texto mais texto mais texto mais texto mais texto mais texto.} \\ }
\normalsize{\monogES}
}
\end{flushleft}
\begin{flushright}
\normalsize{\por \footnote{\funcao \\ Pais de origem: \origem. E-mail: \email}}
\end{flushright}
\thispagestyle{empty}
\begin{abstract}
\noindent
Este artigo irá abordar as principais linguagens de programação voltadas a ambiente WEB usadas atualmente.
\\\textbf{\keyword{Palavras Chave:}} Modelo \LaTeX, Abakos, Periodicos.
\end{abstract}
\selectlanguage{english}
\begin{abstract}
\noindent
This present article will address the main features of the web programming languages ...
\\\textbf{\keyword{Keywords: }} Template \LaTeX, Abakos, Periodics.
\end{abstract}
\onehalfspace % espaçamento 1.5 entre linhas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% INICIO DO TEXTO - BEGIN
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{textos}
\selectlanguage{brazil}
\newpage
% \bibliographystyle{abnt-alf}
\bibliography{bibliografia}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FIM DO TEXTO - END
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Code: Select all
\section{Introdução}
\begin{novoambiente} % quotation similar
%
... um \textit{cluster} é um computador paralelo construído de componentes e processos de \textit{software} (tal como sistema de \textit{software}).
Um \textit{cluster} é formado de nós, cada um contendo um ou mais processadores, memória que é compartilhada por todos os processadores do nodo
(somente eles), e dispositivos periféricos adicionais (tais como discos), conectados pela rede e que permitem tráfego de dados entre os nós...
Tradução\footnote { … a cluster is a parallel computer that is constructed of commodity componets and runs
(as its system software) commodity software. A cluster is made of nodes, each conteining one or more processors, memory that is shared
by all of the processors in (and only on) the node, and addtional peripheral devices (surch as disks),
connected by network that allows data to move between the nodes}
\end{novoambiente} % similar ao quotation
Above are the three files that I'm using.
The first are all my settings (preamble)
The second main file for compilation and called the preamble and text files. And lastly this a text file and using an example of what I need.
Hopefully now I can get to demonstrate what I need help.
And Thank you for your attention, I know the importance of English, so I'm taking courses to improve my understanding.
Thank you.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Custom Quotation Environment
The below code introduces a new environment that prints text with single line spacing and an indentation of 4cm at the left side.
Code: Select all
\documentclass[12pt,a4paper,brazil]{article}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{ % Semi-automatic input selection
atilde={ã}, % by a list of selected glyphs
aacute={á}, % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
ccedilla={ç}
}
\usepackage{babel}
\usepackage{txfonts} % Font in Times New Roman style
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum} % Only for dummy text, to be dropped in actual document
\newenvironment{novoambiente}{%
\begin{list}{}{%
\setlength{\leftmargin}{4cm}
\singlespacing
}
\item\relax
}{\end{list}}
\begin{document}
\lipsum[1]
\begin{novoambiente}
\lipsum[2]
\end{novoambiente}
\lipsum[3]
\end{document}
abakos
package. It uses obsolete packages. Furthermore it loads non-standard packages and so makes your example not compilable for others.It is appreciated very much if you follow given links and the instructions on the respective web sites. This way problems can be solved much faster than in this case.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Custom Quotation Environment
I thank your help because it worked very well.
I had to make some changes to compile here, because some packages such as UTF8, among others inputenc to format citations in Brazil and are not covered by abntex (http://abntex.codigolivre.org.br/)
Thank you for your attention.