ul-fmf / fmfdelo

LaTeX predloge za zaključna dela na FMF
https://ul-fmf.github.io/fmfdelo/
4 stars 8 forks source link

XMP generiral prek paketa pdfx #8

Closed matijapretnar closed 1 year ago

matijapretnar commented 2 years ago

Pred tem se je XMP, torej del PDFja, ki vsebuje XML z metapodatki, generiral dvakrat - enkrat prek paketa hyperxmp skupaj s hyperref, kjer so bili pravi podatki, drugič prek pdfx, kjer so bili neki privzeti podatki. Eni programi so prebrali enega, drugi drugega. Zdaj se generira samo enkrat, prek pdfx in se potem tudi npr. pokaže pravilno v Appleovem Previewu. Poleg tega sem uporabil paket newfile, s katerim lahko v preambuli pripravim .xmpdata in ni več treba ročno klicati \zapisiMetapodatke. Zaenkrat sem popravil samo paket za diplome, bi pa na ta paket prešel tudi z magistrskimi deli.

jureslak commented 2 years ago

Zgleda ok, samo meni se vzorec dela ne prevede z:

Command \C undefined. \renewcommand{\C}
$ pdflatex --version                   
pdfTeX 3.141592653-2.6-1.40.23 (TeX Live 2021/Arch Linux)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03
$ pdflatex VzorecDela.tex 
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/Arch Linux) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./VzorecDela.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2021-11-22> (./fmfdelo.cls
Document Class: fmfdelo 2016/10/13 Zakljucna dela na FMF
(/usr/share/texmf-dist/tex/latex/pdfx/pdfx.sty
(/usr/share/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/share/texmf-dist/tex/generic/iftex/ifpdf.sty)
(/usr/share/texmf-dist/tex/generic/iftex/ifxetex.sty)
(/usr/share/texmf-dist/tex/latex/everyshi/everyshi.sty)
(/usr/share/texmf-dist/tex/generic/iftex/ifluatex.sty){/var/lib/texmf/fonts/map
/pdftex/updmap/pdftex.map} (/usr/share/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texmf-dist/tex/latex/pdfx/l8u-penc.def)
(/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def))
(/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
(/usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
(/usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
(/usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty)
(/usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
(/usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty)
(/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def)
(/usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty)
(/usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texmf-dist/tex/latex/url/url.sty)
(/usr/share/texmf-dist/tex/generic/bitset/bitset.sty
(/usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
(/usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty)

Package hyperref Warning: Option `pdfpagelabels' is turned off
(hyperref)                because \thepage is undefined.

) (/usr/share/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty)
(/usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))
(/usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/puenc-greekbasic.def)
(/usr/share/texmf-dist/tex/latex/hyperref/psdextra.def)
(/usr/share/texmf-dist/tex/generic/colorprofiles/colorprofiles.sty
(/usr/share/texmf-dist/tex/generic/colorprofiles/colorprofiles.tex))
(/usr/share/texmf-dist/tex/generic/stringenc/se-pdfdoc.def)
(/usr/share/texmf-dist/tex/latex/pdfx/AdobeColorProfiles.tex)
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
** pdfx: Metadata file VzorecDela.xmpdata read successfully.
(./VzorecDela.xmpdata)<<sRGB.icc>>
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
(/usr/share/texmf-dist/tex/generic/stringenc/se-utf8.def)
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
(/usr/share/texmf-dist/tex/generic/pdftex/glyphtounicode.tex)
(/usr/share/texmf-dist/tex/latex/pdfx/glyphtounicode-cmr.tex)
(/usr/share/texmf-dist/tex/latex/pdfx/glyphtounicode-ntx.tex)
(/usr/share/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texmf-dist/tex/latex/xmpincl/xmpincl.sty)
(/usr/share/texmf-dist/tex/latex/pdfx/8bit.def)
Using XMP template file: pdfa.xmp
<<pdfa.xmpi>>) (/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/latex/newfile/newfile.sty
(/usr/share/texmf-dist/tex/latex/tools/verbatim.sty))
(/usr/share/texmf-dist/tex/latex/amscls/amsart.cls
Document Class: amsart 2020/05/29 v2.20.6
(/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texmf-dist/tex/latex/amsfonts/amssymb.sty)
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texmf-dist/tex/generic/babel/txtbabel.def)
(/usr/share/texmf-dist/tex/generic/babel-slovenian/slovene.ldf))
(/usr/share/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/share/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
(/usr/share/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
Document Style algorithmicx 1.2 - a greatly improved `algorithmic' style
)
Document Style - pseudocode environments for use with the `algorithmicx' style
) (/usr/share/texmf-dist/tex/latex/algorithms/algorithm.sty
(/usr/share/texmf-dist/tex/latex/float/float.sty)))

! LaTeX Error: Command \C undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.50 \renewcommand{\C}
                      {\mathbb C}
? 
matijapretnar commented 2 years ago

Očitno ene verzije hyperref definirajo \C, druge pa ne. So pa makroji taka stvar, da si jih mora vsak uporabnik definirati/povoziti sam in naj jo naš paket raje pusti pri miru, sicer bo sploh zmeda. Bomo dodali komentar v predlogo.

jureslak commented 2 years ago

Ah, seveda... Sicer pa vse kul :)

matijapretnar commented 2 years ago

Z zadnjo spremembo uporabljamo \sep, kot pričakuje pdfx. Če namesto \sep uporabljamo vejico, pride do težav, ker se v PDF metapodatke zapišejo besede, ločene glede na vejico, v XMP pa je vse skupaj ena sama ključna beseda (z vejicami vred).