1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
|
%%
%% This is file `PTLatexCommands.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% PTLatexCommands.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from PTLatexCommands.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file PTLatexCommands.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesFile{PTLatexCommands.dtx}
[2023/05/14 v0.1 PTLatexCommands package]
\RequirePackage{biblatex}
\RequirePackage{amsmath}
\RequirePackage{algorithm}
\RequirePackage{algorithmic}
\RequirePackage{graphicx}
\newcommand{\larguradotexto}{\textwidth}
\newcommand{\enfatizar}[1]{\emph{#1}}
\newcommand{\negrito}[1]{\textbf{#1}}
\newcommand{\italico}[1]{\textit{#1}}
\newcommand{\sublinhar}[1]{\underline{#1}}
\newcommand{\parte}[1]{\part{#1}}
\newcommand{\capitulo}[1]{\chapter{#1}}
\newcommand{\paragrafo}[1]{\paragraph{#1}}
\newcommand{\subparagrafo}[1]{\subparagraph{#1}}
\newcommand{\secao}[1]{\section{#1}}
\newcommand{\subsecao}[1]{\subsection{#1}}
\newcommand{\subsubsecao}[1]{\subsubsection{#1}}
\newcommand{\hoje}{\today{}}
\newcommand{\anoatual}{\the\year{}}
\newcommand{\referenciar}[1]{\ref{#1}}
\newcommand{\rotulo}[1]{\label{#1}}
\newcommand{\inserirarquivo}[1]{\input{#1}}
\newcommand{\novalinha}{\newline}
\newcommand{\novapagina}{\newpage}
\newenvironment{conteúdo}{\begin{document}}{\end{document}}
\newenvironment{listar}{\begin{itemize}}{\end{itemize}}
\newenvironment{enumerar}{\begin{enumerate}}{\end{enumerate}}
\newenvironment{alinhamentoadireita}{\begin{flushright}}{\end{flushright}}
\newcommand{\alinharadireita}[1]{%
\begin{flushright}%
#1%
\end{flushright}%
}%
\newenvironment{alinhamentoaesquerda}{\begin{flushleft}}{\end{flushleft}}
\newcommand{\alinharaesquerda}[1]{%
\begin{flushleft}%
#1%
\end{flushleft}%
}%
\newenvironment{centralizar}{\begin{center}}{\end{center}}
\newcommand{\centralizado}[1]{%
\begin{center}%
#1%
\end{center}%
}%
\newcommand{\centraliza}{\centering}
\newcommand{\autorcitado}[1]{ \citeauthor{#1}}
\newcommand{\imprimirbibliografia}{\printbibliography}
\newcommand{\citarparenteses}[1]{\parencite{#1}}
\newcommand{\citartexto}[1]{\textcite{#1}}
\newcommand{\citarrodape}{\footcite}
\newcommand{\citarcompleto}{\fullcite}
\newcommand{\incluirfigura}[2]{\includegraphics[#1]{#2}}
\newcommand{\figura}[3][0.4]{%
\begin{figure}[h!]
\centering
\includegraphics[width=#1\columnwidth]{#2}
\caption{#3}
\end{figure}
}
\newcommand{\novoquadro}[5][0.5]{%
\begin{quadro}[h!]%
\caption{\rotulo{#2}#3}%
\resizebox{#1\columnwidth}{!}{%
\begin{tabular}{#4}%
#5%
\end{tabular}}%
\end{quadro}%
}
\newcommand{\citacaodireta}[1]{%
\begin{citacao}%
#1%
\end{citacao}%
}
\newcommand{\equacao}[2]{
\begin{equation}\label{#1}
#2
\end{equation}
}
\newcommand{\alinhar}[2]{
\begin{align}\label{#1}
#2
\end{align}
}
\newcommand{\pmatriz}[1]{
\begin{pmatrix}
#1
\end{pmatrix}
}
\newcommand{\divisao}[1]{
\begin{split}
#1
\end{split}
}
\newcommand{\algoritmo}[3]{%
\begin{algorithm}
\caption{\label{#1}#2}
\begin{algorithmic}[1]
#3
\end{algorithmic}%
\end{algorithm}%
}
\documentclass{ltxdoc}
\begin{document}
\title{The \textsf{PTLaTexCommands} package\\
Example LaTeX Package}
\author{Geraldo Pereira de Morais Júnior\\
%\texttt{geraldopmj@gmail.com}
}
\date{\today}
\maketitle
\tableofcontents
\section*{Introduction}
\addcontentsline{toc}{section}{Introduction}
The \texttt{PTLatexCommands} package provides a set of commands that transform commonly used LaTeX commands into Portuguese commands. It aims to make it easier for Portuguese speakers, especially those in humanities, to remember and use LaTeX commands. The package is recommended for use with the \texttt{abntex2} document class, as well as with \texttt{biblatex}, \texttt{amsmath} packages and \texttt{algorithm \& algorithmic} packages.
\section*{Why translate common commands to portuguese?}
\addcontentsline{toc}{section}{Why translate common commands to portuguese?}
Many people in academia, especially in the humanities, find LaTeX difficult to learn and use LaTex because they often forget the commands. The PTLatexCommands package aims to make the commands easier to remember for Portuguese humanities scholar.
\section*{Usage}
\addcontentsline{toc}{section}{Usage}
To use the PTLatexCommands package, include the following line in the preamble of your LaTeX document:
\begin{verbatim}
\usepackage{PTLatexCommands}
\end{verbatim}
\section*{Available Commands}
\addcontentsline{toc}{section}{Avilable Commands}
\subsection*{Common Commands}
\addcontentsline{toc}{subsection}{Common Commands}
\begin{itemize}
\item \texttt{\textbackslash larguradotexto}: Sets the width of the text.
\item \texttt{\textbackslash enfatizar\{text\}}: Emphasizes the \texttt{text} using italics.
\item \texttt{\textbackslash negrito\{text\}}: Makes the \texttt{text} bold.
\item \texttt{\textbackslash italico\{text\}}: Makes the \texttt{text} italic.
\item \texttt{\textbackslash sublinhar\{text\}}: Underlines the \texttt{text}.
\item \texttt{\textbackslash parte\{title\}}: Starts a new part with the \texttt{title}.
\item \texttt{\textbackslash capitulo\{title\}}: Starts a new chapter with the \texttt{title}.
\item \texttt{\textbackslash paragrafo\{title\}}: Starts a new paragraph with the \texttt{title}.
\item \texttt{\textbackslash secao\{title\}}: Starts a new section with the \texttt{title}.
\item \texttt{\textbackslash subsecao\{title\}}: Starts a new subsection with the \texttt{title}.
\item \texttt{\textbackslash subsubsecao\{title\}}: Starts a new subsubsection with the \texttt{title}.
\item \texttt{\textbackslash hoje}: Prints the current date.
\item \texttt{\textbackslash anoatual}: Prints the current year.
\item \texttt{\textbackslash referenciar\{label\}}: References a label.
\item \texttt{\textbackslash rotulo\{label\}}: Sets a label for referencing.
\item \texttt{\textbackslash inserirarquivo\{filename\}}: Inserts the contents of \texttt{filename} into the document.
\item \texttt{\textbackslash novalinha}: Starts a new line.
\item \texttt{\textbackslash novapagina}: Starts a new page.
\end{itemize}
\subsection*{Lists}
\addcontentsline{toc}{subsection}{Lists}
\begin{itemize}
\item \texttt{\textbackslash listar} environment: Begins an itemized list.
\item \texttt{\textbackslash enumerar} environment: Begins an enumerated list.
\end{itemize}
\subsection*{Paragraphs}
\addcontentsline{toc}{subsection}{Paragraphs}
\begin{itemize}
\item \texttt{\textbackslash alinhamentoadireita} environment: Aligns the content to the right.
\item \texttt{\textbackslash alinharadireita\{text\}}: Aligns the \texttt{text} to the right.
\item \texttt{\textbackslash alinhamentoaesquerda} environment: Aligns the content to the left.
\item \texttt{\textbackslash alinharaesquerda\{text\}}: Aligns the \texttt{text} to the left.
\item \texttt{\textbackslash centralizar} environment: Centers the content.
\item \texttt{\textbackslash centralizado\{text\}}: Centers the \texttt{text}.
\item \texttt{\textbackslash centraliza}: Centering translated.
\end{itemize}
\subsection*{Biblatex Commands}
\addcontentsline{toc}{subsection}{Biblatex Commands}
\begin{itemize}
\item \texttt{\textbackslash autorcitado{key}}: Cites the author of the reference with the given \texttt{key}.
\item \texttt{\textbackslash imprimirbibliografia}: Prints the bibliography.
\item \texttt{\textbackslash citarparenteses{key}}: Parenthetical citation of the reference with the given \texttt{key}.
\item \texttt{\textbackslash citartexto{key}}: Citation of the reference with the given \texttt{key} in the text.
\item \texttt{\textbackslash citarrodape}: Footnote citation.
\item \texttt{\textbackslash citarcompleto}: Full citation of the reference.
\end{itemize}
\subsection*{Figures}
\addcontentsline{toc}{subsection}{Figures}
\begin{itemize}
\item \texttt{\textbackslash figura[size]\{filename\}\{caption\}}: Creates a centered figure with the specified \texttt{size} (multiplied to columnwidth), \texttt{filename}, and \texttt{caption}.
\end{itemize}
\subsection*{Quadros}
\addcontentsline{toc}{subsection}{Quadros}
\begin{itemize}
\item \texttt{\textbackslash novoquadro[size]\{label\}\{caption\}\{columns\}\{content\}}: Creates a new centered quadro (table) with the specified \texttt{size} (multiplied to columnwidth), \texttt{label}, \texttt{caption}, \texttt{columns}, and \texttt{content}.
\end{itemize}
\subsection*{amsmath Commands}
\addcontentsline{toc}{subsection}{amsmath Commands}
\begin{itemize}
\item \texttt{\textbackslash equacao\{label\}\{equation\}}: Creates a numbered equation with the specified \texttt{label} and \texttt{equation}.
\item \texttt{\textbackslash alinhar\{label\}\{alignments\}}: Creates a numbered aligned equation with the specified \texttt{label} and \texttt{alignments}.
\item \texttt{\textbackslash pmatriz\{matrix\}}: Creates a matrix using the \texttt{pmatrix} environment with the specified \texttt{matrix}.
\item \texttt{\textbackslash divisao\{equation\}}: Creates a split equation with the specified \texttt{equation}.
\end{itemize}
\subsection*{abntex2 class Commands}
\addcontentsline{toc}{subsection}{abntex2 class Commands}
\begin{itemize}
\item \texttt{\textbackslash citacaodireta\{quote\}}: Inserts a direct quotation with the specified \texttt{quote} using ABNT rules (4 cm indentation from the left margin and the direct quotation should be presented in a 10-point font, single spacing, and without quotation marks.).
\end{itemize}
\section*{Examples}
\addcontentsline{toc}{section}{Examples}
\subsection*{Usage of Common Commands}
\begin{verbatim}
\larguradotexto
\enfatizar{texto}
\negrito{texto}
\italico{texto}
\sublinhar{texto}
\parte{Título}
\capitulo{Título}
\paragrafo{Título}
\secao{Título}
\subsecao{Título}
\subsubsecao{Título}
\hoje
\anoatual
\referenciar{label}
\rotulo{label}
\inserirarquivo{filename}
\novalinha
\novapagina
\end{verbatim}
\subsection*{Usage of Lists}
\begin{verbatim}
\begin{listar}
\item Item 1
\item Item 2
\item Item 3
\end{listar}
\begin{enumerar}
\item Item 1
\item Item 2
\item Item 3
\end{enumerar}
\end{verbatim}
\subsection*{Usage of Paragraphs}
\begin{verbatim}
\begin{alinhamentoadireita}
Texto alinhado à direita.
\end{alinhamentoadireita}
\alinharadireita{Texto alinhado à direita.}
\begin{alinhamentoaesquerda}
Texto alinhado à esquerda.
\end{alinhamentoaesquerda}
\alinharaesquerda{Texto alinhado à esquerda.}
\begin{centralizar}
Texto centralizado.
\end{centralizar}
\centralizado{Texto centralizado.}
\end{verbatim}
\subsection*{Usage of Biblatex Commands}
\begin{verbatim}
\autorcitado{key}
\imprimirbibliografia
\bibliografia
\citarparenteses{key}
\citartexto{key}
\citarrodape{key}
\citarcompleto{key}
\end{verbatim}
\subsection*{Usage of Figures}
\begin{verbatim}
\figura[size]{filename}{caption}
\end{verbatim}
\subsection*{Usage of Quadros}
\begin{verbatim}
\novoquadro[size]{label}{caption}{columns}{content}
\end{verbatim}
\subsection*{Usage of abntex Commands}
\begin{verbatim}
\citacaodireta{quote}
\end{verbatim}
\subsection*{Usage of amsmath Commands}
\begin{verbatim}
\equacao{label}{\equacao{label}{equation} instead of equation environment
\alinhar{label}{align} instead of align environment
\pmatriz{matrix}
\divisao{equation} instead of split environment
\end{verbatim}
\subsection*{Usage of Abntex2 Commands}
\begin{verbatim}
\citacaodireta{quote}
\end{verbatim}
\subsection*{Usage of algorithm and algorithmic Commands}
\begin{verbatim}
\algoritmo{<label>}{<caption>}{<algorithm>}
\end{verbatim}
\end{document}
\endinput
%%
%% End of file `PTLatexCommands.sty'.
|