
다음과 같은 MWE가 있습니다.
\documentclass{book}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
Lorem ipsum dolor sit amet, \(k_\delta=\frac{3 \mathit{EJ}}{l^3}\) consectetur:
\begin{equation*}k_\delta=\frac{3 \mathit{EJ}}{l^3}\end{equation*}
\begin{centering}
\includegraphics[width=0.5\textwidth]{myimage.eps}
\end{centering}
\end{document}
html
( htlatex example.tex "myconfig, xhtml, charset=utf-8" " -cunihtf -utf8"
Ubuntu TeXLive에서) 잘 컴파일됩니다 myconfig.cfg
.
\Preamble{xhtml}
\Configure{graphics*}
{jpg}
{\Picture[pict]{\csname Gin@base\endcsname .jpg
\space width="\expandafter\the\csname Gin@req@width\endcsname"}}
\Configure{graphics*}
{png}
{\Picture[pict]{\csname Gin@base\endcsname .png
\space width="\expandafter\the\csname Gin@req@width\endcsname"}}
\begin{document}
\EndPreamble
해결 방법을 찾고 있습니다.해결되지 않은 문제출력되는 이미지 크기가 작기 때문에 소스와 이중 및 모든 이미지를 html
구문 분석하는 Python 스크립트를 작성하여 '이중' 이미지 의 품질이 좋지 않다는 새로운 문제에 직면했습니다 . 그래서 섹션 에서 밀도를 110x110에서 220x220으로 높이려고 했습니다 .html
width
height
eps
tex4ht.env
<convert>
Gconvert -trim +repage -density 220x220 -transparent '#FFFFFF' zz%%4.ps %%3
이는 실제로 이미지의 해상도를 증가시켜 eps
이제 html
Python 스크립트를 사용하여 소스에서 이미지 크기를 두 배로 늘릴 수 있습니다.크기수학 공식 이미지(그 크기는 속성 width
도 보유하지 않기 때문에 내 Python 스크립트의 영향을 받지 않습니다 height
).
eps
수학 이미지 크기에 영향을 주지 않고 이미지 해상도를 높이는 방법이 있습니까 ?
html
다음은 수학 공식의 크기를 두 배로 늘린 출력 의 스크린샷입니다 .
답변1
혼자서 해결책을 찾은 것 같습니다. 이미지로 렌더링된 수학 공식이 이제 안전하도록 변경 사항을 로 롤백하고 tex4ht.env
위에서 언급한 서문에 다음 섹션을 추가했습니다 myconfig.cfg
.
\Configure{graphics*}
{eps}
{\Needs{"convert -density 110x110 \csname Gin@base\endcsname.eps \csname Gin@base\endcsname.png"}
\Picture[pict]{\csname Gin@base\endcsname.png}}
이런 식으로 eps
이미지는 다른 방식으로 관리됩니다( dvi
말한 대로 코드가 우회됩니다).여기) 이제 소스 width
에 속성이 부족합니다 . html
그러나 이제 eps
이미지가 출력에서 더 크게 보이고 html
크기가 만족스러우며 제작 후 Python 스크립트를 통해 "외부적으로" 확대될 필요가 없기 때문에 이러한 부족함은 전혀 문제가 되지 않습니다.
다음은 해결 후 원본 예의 스크린샷입니다.
후속 조치
실제로 위의 솔루션은 이미지를 확대할 수 있지만 eps
그 크기는 LaTeX 소스에 지정된 크기와 독립적이며 출력 에 및 를 유지하는 이미지 jpg
와 일치하지 않는다는 것을 발견했습니다 . 당신이 찾고 있다면png
width
height
html
일관된솔루션 eps
의 섹션은 myconfig.cfg
다음과 같아야 합니다.
\Configure{graphics*}
{eps}
{\Needs{"convert -density 110x110 \csname Gin@base\endcsname.eps \csname Gin@base\endcsname.png"}
\Picture[pict]{\csname Gin@base\endcsname.png
\space width="\expandafter\the\csname Gin@req@width\endcsname"}}
출력 의 이러한 방식 width
과 속성은 이미지 에도 유지되며 크기는 이미지 와 일치합니다.height
html
eps
jpg
png
문제예전에 인용한 적이 있습니다.