
\maketitle
こんばんは。最初のページに適切な日付を取得する方法がわかりません。過去には問題なく実行できました。ドキュメントが大きいため、ネストされています。
root: -> title
-> any other file needed
-> the one forgotten file
主要:
\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 には次のように表示されます\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}
そして最後に、次のような 5 つの異なるファイルを含む簡略化されたバージョンがあり、これもメイン ファイルまたはルート ファイルに一緒に表示されます。
\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
はい、wrapfig は PS トリックで重要な部分を強調表示するために使用され、さらにいくつかの pgf グラフをプロットするための多くのパッケージも使用されています。また、テキスト フォントに応じて数値を表示するsiunitx
コマンドを取得するための作業も行っています\qty{}{}
が、これは彼の投稿用ではありません。
\maketitle
私はすでに、自分のを配置するつもりだった場所に偽の を作成しようとしましたが、何も起こらず、\date{\today}
も機能しなかったため、titlepage env
インクルード ファイルの内側と外側で試しました (コメント行をすべて見てください)。
2 週間前、TeXstudio を 4.6.3 バージョンから 4.7.0 バージョンにアップグレードしました。
ご協力ありがとうございました。
私はOverleafで見つけたこの個人的な日記のテンプレートを使って作業しました(https://www.overleaf.com/latex/templates/personal-journal-template/cnhkpjpfkrdn)、@campa のコメントを読んでいると、ジャーナル内の \day の再帰的な再定義が \today の動作に影響を与えるのではないかと疑いました。正しいでしょうか?
もしそうだとしたら、私はその明白なことに気づかなかったので、100 ポイントの評判を失うに値します... 私の愚かな質問であなたの時間を無駄にさせてしまい、本当に申し訳ありません。
答え1
@campa のコメントを見てください。私は Overleaf のテンプレートを忠実に実行しました....... https://www.overleaf.com/latex/templates/personal-journal-template/cnhkpjpfkrdn
11番目の戒律、インターネット上のものは一切信用しないこと。皆さんに1時間も無駄にしてもらって申し訳ないです。本当にありがとう。
大文字の新しい定義で問題は解決しましたが、解決しなかったのです...。しかし、最終的に犯人は前文の部分\def\day{}
にいました。これで意図したとおりに動作します!fancyhf
ゆふぅぅ