使用 Overleaf 与 Texpad 的修剪和剪辑选项裁剪图形

使用 Overleaf 与 Texpad 的修剪和剪辑选项裁剪图形

正如您在我示例中看到的,我尝试包含一个矢量 PDF 图形并裁剪掉其标题(我想将标题中写的信息放入标题中)。当我使用 trim={} 和 clip 选项执行此操作时,我在 Overleaf 中获得了预期的结果。但是,如果我在 Texpad 中执行完全相同的操作,标题将保留在 PDF 图形中,而图形会向上移动,因此它现在与文本重叠(见屏幕截图)。当对 .jpeg 版本的图形执行相同操作时,它突然起作用了。

我在 MacOS 10.15.7 上使用 Texpad,并且我依赖于内部编译器,它不会输出任何错误消息,除了这个问题之外,到目前为止从未给我带来任何麻烦。

这是示例(我没有设法上传矢量 pdf,只需使用任何 pdf,例如仅包含文本的 pdf 和任何光栅 jpg,否则请指导我如何在此处上传矢量图形):

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}

\lipsum[2]

\begin{figure}[h]
\centering
\includegraphics[trim={0 0 0 0.6cm},clip,width=0.7\textwidth]{test.jpg}
\includegraphics[trim={0 0 0 0.6cm},clip,width=0.7\textwidth]{test.pdf}
\caption{test}
\end{figure}

\lipsum[2]

\end{document}

以下是 overleaf 的输出: 在此处输入图片描述

以下是来自 Texpad 的内容: 在此处输入图片描述

编辑:这是来自 Texpad 的日志:

This is TexpadTeX (based on TeX Version 3.14159265 with e-TeX extensions) running in extended mode (preloaded format=latex 2020.7.30)  3 JAN 2021 14:19
**
(MinimumExample.tex
LaTeX2e <2017-04-15>
Babel <3.16> and hyphenation patterns for 84 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (fontenc.sty
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
(t1enc.def
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
)) (inputenc.sty
Package: inputenc 2015/03/17 v1.2c Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(utf8.def
File: utf8.def 2017/01/28 v1.1t UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
... processing UTF-8 mapping file for font encoding T1
(t1enc.dfu
File: t1enc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc
   defining Unicode char U+00A0 (decimal 160)
   ...
)
Now handling font encoding OT1 ...
... processing UTF-8 mapping file for font encoding OT1
(ot1enc.dfu
File: ot1enc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc
   defining Unicode char U+00A0 (decimal 160)
   ...
)
Now handling font encoding OMS ...
... processing UTF-8 mapping file for font encoding OMS
(omsenc.dfu
File: omsenc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc
   defining Unicode char U+00A7 (decimal 167)
   ...
)
Now handling font encoding OMX ...
... no UTF-8 mapping file for font encoding OMX
Now handling font encoding U ...
... no UTF-8 mapping file for font encoding U
   defining Unicode char U+00A9 (decimal 169)
   ...
)) (lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
) (babel.sty
Package: babel 2018/01/04 3.16 The Babel package
(switch.def
File: switch.def 2018/01/04 3.16 Babel switching mechanism
) (english.ldf
Language: english 2017/06/06 v3.3r English support from the babel system
(babel.def
File: babel.def 2018/01/04 3.16 Babel common definitions
(switch.def
File: switch.def 2018/01/04 3.16 Babel switching mechanism
)
\babel@savecnt=\count87
\U@D=\dimen103
(txtbabel.def)
\bbl@dirlevel=\count88
)
\l@canadian = a dialect from \language\l@american 
\l@australian = a dialect from \language\l@british 
\l@newzealand = a dialect from \language\l@british 
)) (graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
) (graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
(trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) (graphics.cfg
File: graphics.cfg 2018/05/3 Graphics configuration of TexpadTeX
)
Package graphics Info: Driver file: texpadtex.def on input line 99.
(texpadtex.def
File: texpadtex.def 2017/10/21 v2.0
))
\Gin@req@height=\dimen104
\Gin@req@width=\dimen105
) (lipsum.sty
Package: lipsum 2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
\c@lips@count=\count89
)
No file MinimumExample.aux.
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Try loading font information for T1+lmr on input line 8.
(t1lmr.fd
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
File: test.jpg Graphic file (type vvtimg)
<test.jpg>
File: test.pdf Graphic file (type vvtimg)
<test.pdf> [1

] (MinimumExample.aux) )


This is TexpadTeX (based on TeX Version 3.14159265 with e-TeX extensions) running in extended mode (preloaded format=latex 2020.7.30)  3 JAN 2021 14:19
**
(MinimumExample.tex
LaTeX2e <2017-04-15>
Babel <3.16> and hyphenation patterns for 84 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (fontenc.sty
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
(t1enc.def
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
)) (inputenc.sty
Package: inputenc 2015/03/17 v1.2c Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(utf8.def
File: utf8.def 2017/01/28 v1.1t UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
... processing UTF-8 mapping file for font encoding T1
(t1enc.dfu
File: t1enc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc
   defining Unicode char U+00A0 (decimal 160)
   ...
)
Now handling font encoding OT1 ...
... processing UTF-8 mapping file for font encoding OT1
(ot1enc.dfu
File: ot1enc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc
   defining Unicode char U+00A0 (decimal 160)
   ...
)
Now handling font encoding OMS ...
... processing UTF-8 mapping file for font encoding OMS
(omsenc.dfu
File: omsenc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc
   defining Unicode char U+00A7 (decimal 167)
   ...
)
Now handling font encoding OMX ...
... no UTF-8 mapping file for font encoding OMX
Now handling font encoding U ...
... no UTF-8 mapping file for font encoding U
   defining Unicode char U+00A9 (decimal 169)
   defining Unicode char U+00AA (decimal 170)
   ...
)) (lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
) (babel.sty
Package: babel 2018/01/04 3.16 The Babel package
(switch.def
File: switch.def 2018/01/04 3.16 Babel switching mechanism
) (english.ldf
Language: english 2017/06/06 v3.3r English support from the babel system
(babel.def
File: babel.def 2018/01/04 3.16 Babel common definitions
(switch.def
File: switch.def 2018/01/04 3.16 Babel switching mechanism
)
\babel@savecnt=\count87
\U@D=\dimen103
(txtbabel.def)
\bbl@dirlevel=\count88
)
\l@canadian = a dialect from \language\l@american 
\l@australian = a dialect from \language\l@british 
\l@newzealand = a dialect from \language\l@british 
)) (graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
) (graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
(trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) (graphics.cfg
File: graphics.cfg 2018/05/3 Graphics configuration of TexpadTeX
)
Package graphics Info: Driver file: texpadtex.def on input line 99.
(texpadtex.def
File: texpadtex.def 2017/10/21 v2.0
))
\Gin@req@height=\dimen104
\Gin@req@width=\dimen105
) (lipsum.sty
Package: lipsum 2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
\c@lips@count=\count89
) (MinimumExample.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Try loading font information for T1+lmr on input line 8.
(t1lmr.fd
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
File: test.jpg Graphic file (type vvtimg)
<test.jpg>
File: test.pdf Graphic file (type vvtimg)
<test.pdf> [1

] (MinimumExample.aux) )

相关内容