Open Sunethan opened 5 years ago
你的版本應該是0.9以前吧
有gnu make的話編譯時打make WATERMARK=1
沒有gnu make的話在\ifdefined\withwatermark
那行前面自己加上\def\withwatermark{1}
試試看
非常感謝您這麼快就回覆了!按照您的指示操作,成功了!
\def\withwatermark{1} \ifdefined\withwatermark \newwatermark*[allpages,xpos=6.1725cm,ypos=10.5225cm,scale=0.5]{\includegraphics{watermark.pdf}} \fi
我最初是 0.9 版,但是我有上來更新您 1.3 版的 ntuthesis.cls,直接覆蓋,我想說這樣就有更新到了。不過看來我還是得覆蓋其他的檔案嗎?很謝謝您的熱心!^^
您好,想請問浮水印功能目前還可以使用嗎?我測試時發現只要加上有關浮水印部份的code就會出現compile error,但只要把浮水印相關的code都comment out就可以順利compile。目前還沒找出error的原因。
(./ntuvars.tex)
! Extra \endgroup.
\document ->\endgroup
\let \BeforeStartOfDocument \@firstofone \cpt@beforest...
l.51 \begin{document}
?
(./thesis.aux)
\openout1 = `thesis.aux'.
For reference: TeXlive version:
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021) (preloaded format=xelatex 2021.6.26) 5 JUL 2021 09:54
File list with \listfiles
:
*File List*
thesis.tex
ntuthesis.cls 2013/04/23 Thesis template for National Taiwan University
book.cls 2021/02/12 v1.4n Standard LaTeX document class
bk12.clo 2021/02/12 v1.4n Standard LaTeX file (size option)
geometry.sty 2020/01/02 v5.9 Page Geometry
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
ifvtex.sty 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
iftex.sty 2020/03/06 v1.0d TeX engine tests
xeCJK.sty 2021/06/20 v3.8.7 Typesetting CJK scripts with XeLaTeX
expl3.sty 2021-06-18 L3 programming layer (loader)
l3backend-xetex.def 2021-05-07 L3 backend support: XeTeX
ctexhook.sty 2021/06/20 v2.5.7 Document and package hooks (CTEX)
l3keys2e.sty 2021-06-18 LaTeX2e option processing using LaTeX3 keys
xtemplate.sty 2021-06-18 L3 Experimental prototype document functions
xparse.sty 2021-06-18 L3 Experimental document command parser
fontspec.sty 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
fontspec-xetex.sty 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
fontenc.sty
fontspec.cfg
xeCJK.cfg 2021/06/20 v3.8.7 Configuration file for xeCJK package
setspace.sty 2011/12/19 v6.7a set line spacing
background.sty 2014/03/04 v2.1 background material
xkeyval.sty 2020/11/20 v2.8 package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
tikz.sty 2021/05/15 v3.1.9a (3.1.9a)
pgf.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfrcs.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfrcs.code.tex
pgfcore.sty 2021/05/15 v3.1.9a (3.1.9a)
graphicx.sty 2020/12/05 v1.2c Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
xetex.def 2021/03/18 v5.0k Graphics/color driver for xetex
pgfsys.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2021/05/15 v3.1.9a (3.1.9a)
pgfsysprotocol.code.tex 2021/05/15 v3.1.9a (3.1.9a)
xcolor.sty 2016/05/11 v2.12 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
pgfcore.code.tex
pgfcomp-version-0-65.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfcomp-version-1-18.sty 2021/05/15 v3.1.9a (3.1.9a)
pgffor.sty 2021/05/15 v3.1.9a (3.1.9a)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
everypage.sty 2020/10/17 R2.0b Hooks to run on every page
afterpage.sty 2014/10/28 v1.08 After-Page Package (DPC)
pdfpages.sty 2021/03/06 v0.5t Insert pages of external PDF documents (AM)
ifthen.sty 2020/11/24 v1.1c Standard LaTeX ifthen package (DPC)
calc.sty 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
eso-pic.sty 2020/10/14 v3.0a eso-pic (RN)
ppxetex.def 2021/03/06 v0.5t Pdfpages driver for XeTeX (AM)
times.sty 2020/03/25 PSNFSS-v9.3 (SPQR)
verbatim.sty 2020-07-07 v1.5u LaTeX2e package for verbatim enhancements
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
array.sty 2021/04/20 v2.5e Tabular extension package (FMi)
wallpaper.sty 2005/01/18, v1.01 easy wallpaper formatting (MHFW)
hyperref.sty 2021-06-07 v7.00m Hypertext links for LaTeX
ltxcmds.sty 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
pdftexcmds.sty 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty 2019/12/03 v1.5 Providing info/warning/error messages (HO)
kvsetkeys.sty 2019/12/15 v1.18 Key value parser (HO)
kvdefinekeys.sty 2019-12-19 v1.6 Define keys (HO)
pdfescape.sty 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
hycolor.sty 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
letltxmacro.sty 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
auxhook.sty 2019-12-17 v1.6 Hooks for auxiliary files (HO)
kvoptions.sty 2020-10-07 v3.14 Key value format for package options (HO)
pd1enc.def 2021-06-07 v7.00m Hyperref: PDFDocEncoding definition (HO)
hyperref-langpatches.def 2021-06-07 v7.00m Hyperref: patches for babel langu
ages
intcalc.sty 2019/12/15 v1.3 Expandable calculations with integers (HO)
etexcmds.sty 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
puenc.def 2021-06-07 v7.00m Hyperref: PDF Unicode definition (HO)
bitset.sty 2019/12/09 v1.3 Handle bit-vector datatype (HO)
bigintcalc.sty 2019/12/15 v1.5 Expandable calculations on big integers (HO)
atbegshi-ltx.sty 2021/01/10 v1.0c Emulation of the original atbegshi
package with kernel methods
hxetex.def 2021-06-07 v7.00m Hyperref driver for XeTeX
stringenc.sty 2019/11/29 v1.12 Convert strings between diff. encodings (HO)
rerunfilecheck.sty 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)
atveryend-ltx.sty 2020/08/19 v1.0a Emulation of the original atvery package
with kernel methods
uniquecounter.sty 2019/12/15 v1.4 Provide unlimited unique counter (HO)
xwatermark.sty 2011/10/22 v 0.96: framed or shaded text with page breaks
catoptions.sty 2014/08/29 v0.2.7h Securing catcodes and parsing options (AM)
fix-cm.sty 2020/11/24 v1.1t fixes to LaTeX
ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
picture.sty 2020-04-22 v1.6 Dimens for picture macros (HO)
fancyhdr.sty 2021/01/28 v4.0.1 Extensive control of page headers and footers
ltxkeys.sty 2012/11/17 v0.0.3c A robust key-value parser (AM) (Ahmed Musa)
framed.sty 2011/10/22 v 0.96: framed or shaded text with page breaks
thesis.xwm
ntuvars.tex
pdflscape.sty 2019/12/05 v0.12 Display of landscape pages in PDF (HO)
lscape.sty 2020/05/28 v3.02 Landscape Pages (DPC)
nameref.sty 2021-04-02 v2.47 Cross-referencing by name of section
refcount.sty 2019/12/15 v3.6 Data extraction from label references (HO)
gettitlestring.sty 2019/12/15 v1.6 Cleanup title references (HO)
thesis.out
thesis.out
watermark.pdf Graphic file (type pdf)
acknowledgements.tex
abstract.tex
introduction.tex
kl.png Graphic file (type bmp)
thesis.bbl
***********
這似乎是特定版本的 LaTeX 造成的問題,請在 thesis.tex
的開頭指定 LaTeX 的版本再重新編譯試試:
\RequirePackage[2020-02-02]{latexrelease} % 加上這行
\documentclass{ntuthesis}
...
您好,我在這裡下載台大論文浮水印並將其放置在 latex 目錄下編譯後,還是沒有看到浮水印。我有在 thesis.tex 中找到以下指令
\ifdefined\withwatermark \newwatermark*[allpages,xpos=6.1725cm,ypos=10.5225cm,scale=0.5]{\includegraphics{watermark.pdf}} \fi
不曉得是不是得按照您的 wiki 說的,另外下載程式才能放上浮水印呢?感謝您