
Boa noite, não consigo descobrir como colocar a data adequada na minha primeira página e já fiz isso sem \maketitle
problemas no passado. Documento grande, tão aninhado:
root: -> title
-> any other file needed
-> the one forgotten file
Eu recebo o seguinte documento
Principal:
\documentclass[10pt,a4paper,twoside]{article}
\usepackage{ragged2e} % toglie il rientro anglosassone dei paragrafi nuovi
%\usepackage[T1]{fontenc} % non necessario con XeLaTeX
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{datetime}
\usepackage{mwe}
\usepackage{blindtext}
\usepackage{fontspec} % per selezionare nuovi font
\setmainfont{Arial}
\setsansfont{Arial}
\setlength\evensidemargin{0.0in}
\setlength\oddsidemargin{0.0in}
\setlength\textwidth{6.5in}
\setlength\textheight{9.5in}
\setlength\topmargin{-0.5in}
\usepackage[raggedright]{titlesec}
\usepackage{nicefrac}
\usepackage[dvipsnames]{xcolor}
%\usepackage{fr3d-colors} %% my personal defined colors, will change in something dvipsname
\usepackage{float}
\usepackage{wrapfig}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{positioning,calc}
\usepackage{lscape}
\usepackage{csvsimple}
\usepackage{anyfontsize}
\usepackage{rotating}
\usepackage[normalem]{ulem} % permette di avere testo barrato
\usepackage{tocloft}
\usepackage{titletoc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For "Outlining pain"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \def\Vicodin{Vicodin 150mg}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}
%\usepackage{} % Ps fill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For Footer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.2pt}
%\rhead{Share\LaTeX}
%\lhead{Guides and tutorials}
\rhead{\month \year}
\rfoot{\thepage}
\def\day{}
\cfoot{\scriptsize \textit{\textsf{\sffamily\textcopyright} Stupid \textsc{Guy}} 2023}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For Multiple Columns within Text
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{multicol}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For Links to Websites
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% https://www.sharelatex.com/learn/Hyperlinks
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
}
\urlstyle{same}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% More customisation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\setcounter{secnumdepth}{1}
%\setcounter{tocdepth}{1}
%\copyright symbol
\usepackage{textcomp}
% note a piè pagina per altre parti nel corpo di testo
%\usepackage{scrextend}
\usepackage{footmisc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Title Page
% \begin{titlepage}
\include{title}
\newpage
\pagestyle{empty}
\cleardoublepage %in aggiunta alla paginabianca
% \end{titlepage}
% \newpage
% \thispagestyle{empty}
% \cleardoublepage %in aggiunta alla paginabianca
\include{otherFile}
\end{document}
Title.tex, que deve mostrar \today
:
\begin{titlepage}
\pagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=black] (current page.north west) rectangle (current page.south east);
%Striscia verticale Green4!25
\node[rectangle, fill=OliveGreen!30, anchor=south west, minimum width=12mm, minimum height=\paperheight](sidebar) at ($(current page.south west)+(0,0)$){};
\node [anchor=north west, xshift=-1mm, yshift=2mm] (colVert) at ($(sidebar.north east)+(-.02,0)$) {\includegraphics[width=0.5\paperwidth]{example-image-c}};
%Striscia orizontale
\node[rectangle, fill=OliveGreen, anchor=north west, minimum width=\paperwidth, minimum height=24mm](footbar) at ($(colVert.south west)+(0.1,0.12)$){};
\node [anchor=east, text width=\paperwidth, color=white,
% below right=of colVert,
] (titolo) at ($(footbar.east)+(-.3,-.0)+(-1.3,0)$)
{
\begin{flushright}
\fontsize{32pt}{32pt}\selectfont \bfseries Spinal surgery
\end{flushright}
};
% \node (sTitolo) {Diario medico postoperatorio}
\node [anchor=east, text width=\textwidth, color=white,
% below right=of colVert,
] (sTitolo)
at ($(footbar.east)+(-.3,-2.25)+(-1.3,-0)$)
{
\begin{flushright}
\fontsize{26pt}{30pt}\selectfont \itshape Journal
\end{flushright}
};
\node [anchor=east, text width=\textwidth, color=white,
% below right=of colVert,
] (autore)
at ($(footbar.east)+(-.3,-5.25)+(-1.3,-0)$)
{
\begin{flushright}
\fontsize{16pt}{20pt}\selectfont \bfseries \scshape Stupid guy
\end{flushright}
};
\node [anchor=east, text width=\textwidth, color=white,
% below right=of colVert,
] (info)
at ($(footbar.east)+(-.3,-15.75)+(-1.3,-0)$)
{
% \raggedright
\begin{flushright}
\fontsize{12pt}{18pt}\selectfont
\begin{tabular}{rl}
% %more text as Admission date ,ecc
\textbf{v 1.16}& \today \\
\end{tabular}
\end{flushright}
};
\end{tikzpicture}
\end{titlepage}
E finalmente a versão simplificada com 5 arquivos diferentes parecidos com este que também virão juntos no arquivo principal ou raiz:
\section*{1st day}
\blindtext
\section*{2nd day}
\begin{wrapfigure}[22]{l}{0.63\textwidth}
\centering
\includegraphics[\width=0.6\textwidth]{example-image-a}
\end{wrapfigure}
\blindtext
\blindtext
\subsection*{3rd day}
\begin{wrapfigure}[22]{l}{0.63\textwidth}
\centering
\includegraphics[\width=0.6\textwidth]{example-image-a}
\end{wrapfigure}
\blindtext
\blindtext
\section*{4th day}
\begin{wrapfigure}[22]{l}{0.63\textwidth}
\centering
\includegraphics[\width=0.6\textwidth]{example-image-a}
\end{wrapfigure}
\blindtext
\blindtext
\subsection*{6th day}
\begin{wrapfigure}[22]{l}{0.63\textwidth}
\centering
\includegraphics[\width=0.6\textwidth]{example-image-a}
\end{wrapfigure}
\blindtext
\blindtext
and so on for the other important days
Sim, o wrapfig é usado com truques PS para destacar coisas importantes e muitos pacotes para traçar ainda mais algum gráfico pgf, e também estou trabalhando em uma guerra para obter siunitx
o comando \qty{}{}
para exibir o número de acordo com a fonte do texto, mas isso não é para seu posto.
Já tentei criar um falso \maketitle
, onde pretendia colocar o meu, nada, \date{\today}
também não funcionou, então tentei com titlepage env
dentro e fora do arquivo incluído (vejam todas aquelas linhas comentadas).
Há 2 semanas atualizei o TeXstudio da versão 4.6.3 para a versão 4.7.0, se for importante.
Obrigado por toda a ajuda.
Eu trabalhei em torno deste modelo de diário pessoal que encontrei no verso (https://www.overleaf.com/latex/templates/personal-journal-template/cnhkpjpfkrdn), lendo os comentários de @campa, suspeitei que a redefinição recursiva de \day no diário pode afetar o comportamento de \today. Estou correcto?
Se for esse o caso, mereço perder 100 pontos por repetição, pois não percebi algo tão óbvio... Sinto muito por fazer você perder tempo com minha pergunta estúpida.
Responder1
Veja o comentário do @campa, segui timidamente um modelo no verso....... https://www.overleaf.com/latex/templates/personal-journal-template/cnhkpjpfkrdn
11º mandamento, nunca confie em nada na internet. Sinto muito por todos vocês terem perdido uma hora para me ajudar, muito obrigado pessoal
Então a nova definição com letra maiúscula resolveu o problema, até que não resolveu.... Mas finalmente o culpado estava \def\day{}
na fancyhf
parte do preâmbulo. Agora funciona como pretendido!
Yuhuuuu