【latex學習筆記】 論文寫作工具實用技巧
阿新 • • 發佈:2020-12-31
技術標籤:latex
1. 定義Paper revising和Submission Mode
即在生成的pdf 自定義標記待討論的部分
(ps: vscode 的外掛有點問題,編譯順序或者中間檔案,會影響引用最後的生成,重新複製貼上下premble.tex 又正常了,玄學,或許是因為preamble.tex只能在編譯前修改一次,只要編譯過了,再修改在編譯就報錯了。。)
使用的語法:
[Latex]ifhen 巨集包的使用提供了兩個強大的判斷條件:
\ifthenelse{判斷條件}{肯定結構}{否定結構}
例:
%設定COMMENTS為yes \newcommand{\COMMENTS}{yes} % 這裡的判斷條件:\equal{\COMMENTS}{yes},比較COMMENTS與yes是否相等, % 如果相等則進入肯定結構(即Writing Mode ),否則進入否定結構(即Submission Mode) %% Paper revising \ifthenelse{\equal{\COMMENTS}{yes}}{ %% Writing Mode \newcommand{\todo}[1]{\textcolor{red}{\textbf{\xspace[TODO:} #1]\xspace}} \newcommand{\fyi}[1]{\textcolor{blue}{#1}} %content will be included \newcommand{\fye}[1]{\textcolor{red}{#1}} %content will be excluded \newcommand{\remind}[1]{\footnote{\textit{\textcolor{red}{\textbf{Remind:} #1}}}} \newcommand{\repl}[2]{\textcolor{red}{#1}\textcolor{blue}{\sout{#2}}} % replacement \newcommand{\add}[1]{\textcolor{red}{#1}} \newcommand{\del}[1]{\color{blue} {\sout{#1}}} %\newcommand{\p}[1]{\noindent\parbox{\columnwidth}{\textcolor{magenta}{\textbf{Point to make:} #1}}\vskip 0.5ex} \newcommand{\p}[1]{\vskip 1ex \noindent\colorbox{yellow}{\parbox{\columnwidth}{#1}}\vskip 4pt} \newcommand{\note}[1]{\vskip 4ex \noindent\colorbox{yellow}{\parbox{\columnwidth}{#1}}\vskip 6ex} % highlight \newcommand{\dc}[1]{\textcolor{red}{\underline{#1}}} % double check % \uwave \newcommand{\q}[1]{\vskip 1ex \noindent\colorbox{magenta}{\parbox{\columnwidth}{\textbf{Question:} #1}}\vskip 4pt} \newcommand{\qa}[1]{\hl{\textbf{Answer:} #1}} %\newcommand{\qa}[1]{\noindent\colorbox{yellow}{\parbox{\columnwidth}{\textbf{Answer:} #1}}\vskip 2ex} % highlight }{ %%Submission Mode \newcommand{\todo}[1]{} \newcommand{\fyi}[1]{#1} \newcommand{\fye}[1]{} \newcommand{\remind}[1]{} \newcommand{\repl}[2]{#1} \newcommand{\add}[1]{#1} \newcommand{\del}[1]{} \newcommand{\p}[1]{} \newcommand{\note}[1]{} \newcommand{\dc}[1]{#1} \newcommand{\qm}[1]{#1} \newcommand{\q}[1]{} \newcommand{\qa}[1]{} }