4

I realize this might not be as detailed as expected, but I'm working on a series of books (meaning I have subfiles and many different packages loaded).

Turns out I'm running short of space in my C drive, so I reinstall everything TeX into D, and turns out my code for a previously compiling file now gives me the error Argument of \put has an extra }.

I have no idea what could be wrong, as I never used \put in the file. Some research said that using \footnote could lead to situations of "extra } " but there's also no instance of \footnote in the file.

My files are structured as follows: I have 5 .tex files, one for each planned chapter in the book. Then a main.tex file that groups all of them together. I have tried and each of the chapter.tex files still do compile without issues, so I know the problem must be when I try to group them together.

I realize the preamble is a mess, too, I am trying to have everything I need for the series of books in this single preamble so, I realize it's not the best of practices, but it was working up until the moment I had to reinstall everything:

\documentclass[10pt,a5paper,brazil]{book}
\let\oldvec\vec
\usepackage[subpreambles=false]{standalone}

\makeatletter \def@documentnocite#1{@bsphack @for@citeb:=#1\do{% \edef@citeb{\expandafter@firstofone@citeb}% \if@filesw\immediate\write@auxout{\string\citation{@citeb}}\fi @ifundefined{b@@citeb}{\G@refundefinedtrue @latex@warning{Citation `@citeb' undefined}}{}}% @esphack} \AtBeginDocument{\let\nocite@documentnocite} \makeatother

\usepackage{import}

\usepackage{fmtcount}% http://ctan.org/pkg/fmtcount \usepackage{babel} \usepackage{translator}

%%% Esses pacotes colocam símbolos para uso nas Fontes. \setlength{\jot}{10pt} %Espaço entre equações de várias linhas! \usepackage{amsthm} %Permite Customização de Teoremas \usepackage{amssymb} %Símbolos e Letras de nomes de Conjuntos, não usar com newtxmath \usepackage[nointegrals]{wasysym} %Símbolos! Usar opção [integral] se quiser

%% Essas duas linhas definem os caracteres especiais / Código de Fonte \usepackage[T1]{fontenc}

\usepackage{newpxtext} \usepackage[upint]{newpxmath}

\usepackage[Symbol]{upgreek} \usepackage[bb=boondox,scr=rsfso]{mathalfa} % replace its Blackboard bold and use rsfso for \mathscr. \newcommand\bmmax{0} \usepackage{slantsc,bm}

%%% Esses pacotes organizam funções de texto. \usepackage{multicol} %Permite divisão do texto em até 10 colunas \usepackage[x11names,svgnames]{xcolor} %Colocação de cores \usepackage{colortbl} \usepackage[framemethod=TikZ,nobreak=true]{mdframed} \usepackage{paralist,enumitem} %Melhorias para listas. Paralist (no parágrafo) \usepackage{float} %Permite colocação de caixas "flutuantes" \usepackage{comment} %Permite comentários em ambiente \usepackage{setspace} %Espaçamento entre linhas. \usepackage[nobottomtitles]{titlesec}

%%% Pacotes para Gráficos \usepackage{pictexwd} \usepackage{pgfplots} %\pgfplotsset{compat=1.3} \pgfkeys{/pgf/number format/.cd,use comma} \usepgfplotslibrary{fillbetween,statistics} \usepackage{tikz,tikz-3dplot} %Para fazer desenhos \usetikzlibrary{shapes.multipart,shapes.geometric,calc,angles,positioning,intersections,quotes,decorations,babel,patterns,fit,arrows.meta,backgrounds,shadings,matrix,through,trees,mindmap} \usepackage{tkz-euclide} \usepackage{bigstrut} % %%% Tabelas e Melhorias \usepackage{multirow} %Permite a mesclagem de uma célula verticalmente \usepackage{xparse}%Para fazer os números em base n. \usepackage{systeme} \usepackage{siunitx} %Unidades de Medida de forma correta. \sisetup{output-decimal-marker = {,},detect-all=true, per-mode=symbol} %Vírgula como separador decimal no siunitx \DeclareSIUnit\habitants{hab.} \usepackage[singlelinecheck=false] {caption} % Permite ajustar os contadores de imagens/tabelas //usar labelfont={bf, footnotesize} para cabeçalhos em negrito e em outro tamanho de fonte. \usepackage{booktabs} % for \toprule, \midrule, and \bottomrule macros \usepackage{indentfirst} \usepackage{emptypage} \usepackage{titletoc} %espaçamento TOC

\titlecontents{chapter}[3.0em] {\bfseries} {\contentslabel{3.0em}}%change the argument to obtain the %desired spacing {\hspace{-2.3em}} {\titlerule[1pc]{.}\contentspage}

% %%% Melhorias Matemáticas \usepackage{commath} %Permite colocação de diferenciais e outros \usepackage{cancel} %Permite fazer "cancelamentos" em cálculos \usepackage{icomma} %Coloca a vírgula como separador decimal. Cuidar: dcolumn \usepackage{fancyhdr} \usepackage{float} \usepackage{polynom} \usepackage{mathtools} \usepackage{xlop} \opset{decimalsepsymbol={,},voperation=center,lineheight={1.5\baselineskip}}

\usepackage{graphicx}%,tipa}% http://ctan.org/pkg/{graphicx,tipa} \newcommand{\arc}[1]{{% \setbox9=\hbox{#1}% \ooalign{\resizebox{\wd9}{\height}{\texttoptiebar{\phantom{A}}}\cr#1}}} % % %%% OUTROS %%\usepackage{microtype} % FUNÇÃO DESCONHECIDA % %%% AJUSTES

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{\node[shape=circle,draw,inner sep=2pt] (char) {#1};}} %Para fazer números em círculos \let\sin\relax\DeclareMathOperator\sin{sen} %Chama "sin" de "sen" \renewcommand{\abs}[1]{\left\lvert{#1}\right\rvert} \renewcommand{\dif}[1]{\mathsf{d} #1}

\usepackage[hmargin=1.91cm,vmargin=2.54cm]{geometry} \newcommand{\dom}[1]{\operatorname{Dom} \ (#1)} \newcommand{\bis}[1]{\operatorname{bis} \ (#1)} \newcommand{\R}{\mathbb{R}} \newcommand{\id}[1]{\operatorname{id} \ #1} \newcommand{\me}{\mathrm{e}} \newcommand{\mi}{\mathrm{i}} \newcommand*{\defeq}{\stackrel{\text{def}}{=}} \renewcommand{\thefootnote}{\fnsymbol{footnote}}

\newtheorem{theorem}{Teorema} \newtheorem{prop}{Proposição} \theoremstyle{definition} \newtheorem{defi}{Definição} \newtheorem{exe}{Exercício} \newtheorem{obs}{Observação}

%Faz o símbolo § aparecer antes das seções. \makeatletter \renewcommand{@seccntformat}[1]{% \S \csname the#1\endcsname\ \ } \makeatletter

\def\basetwoenum#1{\expandafter@basetwoenum\csname c@#1\endcsname}

\ExplSyntaxOn \def@basetwoenum#1{% \int_set:Nn \l_tmpa_int \c_one \int_step_inline:nnnn {2}{1}{\number#1}{% \int_set:Nn \l_tmpb_int { 2 * \l_tmpa_int } \int_set_eq:NN \l_tmpa_int \l_tmpb_int } \int_use:N \l_tmpa_int } \ExplSyntaxOff \AddEnumerateCounter{\basetwoenum}{@basetwoenum}{100} \makeatother

\makeatletter \g@addto@macro\bfseries{\boldmath} \makeatother

\usepackage{newfloat} \DeclareFloatingEnvironment[ fileext = loc, listname = Lista de Gráficos, name = Gráfico, placement = htbp, ]{chart}

\pagestyle{fancy} \lhead{} \chead{} \rhead{} %\lfoot{} \cfoot{} %\rfoot{\thepage} \renewcommand{\headrulewidth}{0.0pt} \renewcommand{\footrulewidth}{0.0pt} \fancyfoot[LE,RO]{\thepage} % Left side on Even pages; Right side on Odd pages

\newcounter{exercises} \newcounter{examples}

%Ajusta o espaço entre linhas para 1,5. Use {\setstretch{x}} para mudar. \renewcommand{\baselinestretch}{1.5} \renewcommand{\thechapter}{\Roman{chapter}} \renewcommand\thesection{\arabic{section}}

\definecolor{MainColor}{HTML}{8d1d6c}%{5983b0}%{8d1d6c}

TeXworks tells me the error happens at line 248:

Argument of \put has an extra }.
<inserted text> 
                \par 
l.248 \end{titlepage}

But navigating to the area around that line gives me:

\begin{document}

\begin{titlepage} \begin{center}

\LARGE{\scshape Guilherme Moreira Vargas}

\includegraphics[width=\textwidth]{../logo-blog}

\LARGE{Matemática}

\Large{Ensino Médio | Material Modular}

\Large{EM-M02 | Relações e Funções }
\end{center}


\end{titlepage}

\newpage\null\thispagestyle{empty}\newpage

\section*{Prefácio}

And commenting these lines still presents the same error at around this area of the document.

Any guidance would be highly appreciated.

  • Please show the full log and provide a full but minimal self contained example that others can test as is, these are unfinished sniplets and thus not very useful – daleif Dec 11 '20 at 14:23
  • pictexwd destroys the new picture code. Do you need it? It is very old. – Ulrike Fischer Dec 11 '20 at 14:28
  • 1
    A minimal document producing the same error is \documentclass{book} \usepackage{tikz} \usepackage{pictexwd} \begin{document} A \end{document}. (tikz is loaded by mdframed) – gernot Dec 11 '20 at 14:59
  • @gernot it happens with tikz as it uses internally a picture environment with a length, but pictex redefines picture. – Ulrike Fischer Dec 11 '20 at 15:29
  • unrelated but size commands do not take an argument, \LARGE{Matemática} makes the rest of the document (or current environment) LARGE – David Carlisle Dec 11 '20 at 19:05
  • @UlrikeFischer - removing the pictexwd seems to resolve the issue. – Guilherme Vargas Dec 12 '20 at 00:28
  • @DavidCarlisle - the desired effect there is to make sort of a cover for the book, so is the proper usage {\LARGE Lorem Ipsum}? – Guilherme Vargas Dec 12 '20 at 00:30
  • @GuilhermeVargas since they are all \LARGE you just need it once as in my answer, or if they are different sizes include the end of paragraph (blank line}before the}otherwise ifLorem Ipsum` is in reality longer and line breaks you will get LARGE text on a normal baseline – David Carlisle Dec 12 '20 at 00:43

1 Answers1

5

You can restore the standard \put :

\documentclass{article}

\let\latexput\put \usepackage{pictexwd} \let\pictexput\put

\usepackage{tikz,graphicx}

% if you need pictex somewhere use \let\put\pictexput

% use standard \put by default \let\put\latexput

\begin{document}

\begin{titlepage} \begin{center}\LARGE

{\scshape Guilherme Moreira Vargas}


Matemática

Ensino Médio | Material Modular

EM-M02 | Relações e Funções 
\end{center}


\end{titlepage}

\newpage\null\thispagestyle{empty}\newpage

\section*{Prefácio} \end{document}

David Carlisle
  • 757,742
  • Interesting, maybe when I reinstalled my TeX distribution I got some sort of updates for other packages that now conflict with what I had previously? Anyway, I appreciate the solution, and I will take note of that, for now, I'll try to simplify my preamble and will get rid of pictexwd – Guilherme Vargas Dec 12 '20 at 00:33
  • 1
    @GuilhermeVargas no it's an update to latex itself, uses \put as part of the new hook code (see ltnews) – David Carlisle Dec 12 '20 at 00:42
  • @DavidCarlisle I'm not using pictexwd, but got the same kind of new errors... Restoring the "latexput"' at end of my preambule allow proper compilation for some old docs, not for all. Is-it any way to know which packages will cause new errors systématically? – Hérisson Didier Jan 05 '21 at 11:24
  • 1
    @HérissonDidier very few packages will redefine \put stick \typeout{\meaning\put} at a few places in your preamble (starting at the first line before \documentclass and see which one changes it) if it is not clear, post a new question with a small example and someone will debug – David Carlisle Jan 05 '21 at 11:45