Byaidu 11 kuukautta sitten
vanhempi
sitoutus
036f55acd9
3 muutettua tiedostoa jossa 14 lisäystä ja 12 poistoa
  1. 7 1
      README.md
  2. 7 1
      README_zh-CN.md
  3. 0 10
      pdf2zh/gui.py

+ 7 - 1
README.md

@@ -66,7 +66,7 @@ Note that the computing resources of the demo are limited, so please avoid abusi
 
 <h2 id="install">Installation and Usage</h2>
 
-We provide three methods for using this project: [Commandline](#cmd), [Portable](#portable), [GUI](#gui), and [Docker](#docker).
+We provide four methods for using this project: [Commandline](#cmd), [Portable](#portable), [GUI](#gui), and [Docker](#docker).
 
 <h3 id="cmd">Method I. Commandline</h3>
 
@@ -225,6 +225,12 @@ Use regex to specify formula fonts and characters that need to be preserved:
 pdf2zh example.pdf -f "(CM[^RT].*|MS.*|.*Ital)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"
 ```
 
+Preserve `Latex`, `Mono`, `Code`, `Italic`, `Symbol` and `Math` fonts by default:
+
+```bash
+pdf2zh example.pdf -f "(CM[^R]|(MS|XY|MT|BL|RM|EU|LA|RS)[A-Z]|LINE|LCIRCLE|TeX-|rsfs|txsy|wasy|stmary|.*Mono|.*Code|.*Ital|.*Sym|.*Math)"
+```
+
 <h3 id="threads">Specify threads</h3>
 
 Use `-t` to specify how many threads to use in translation:

+ 7 - 1
README_zh-CN.md

@@ -66,7 +66,7 @@
 
 <h2 id="install">安装和使用</h2>
 
-我们提供了种使用该项目的方法:[命令行工具](#cmd)、[便携式安装](#portable)、[图形交互界面](#gui) 和 [容器化部署](#docker).
+我们提供了种使用该项目的方法:[命令行工具](#cmd)、[便携式安装](#portable)、[图形交互界面](#gui) 和 [容器化部署](#docker).
 
 <h3 id="cmd">方法一、命令行工具</h3>
 
@@ -225,6 +225,12 @@ pdf2zh example.pdf -s openai
 pdf2zh example.pdf -f "(CM[^RT].*|MS.*|.*Ital)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"
 ```
 
+默认保留 `Latex`, `Mono`, `Code`, `Italic`, `Symbol` 以及 `Math` 字体:
+
+```bash
+pdf2zh example.pdf -f "(CM[^R]|(MS|XY|MT|BL|RM|EU|LA|RS)[A-Z]|LINE|LCIRCLE|TeX-|rsfs|txsy|wasy|stmary|.*Mono|.*Code|.*Ital|.*Sym|.*Math)"
+```
+
 <h3 id="threads">指定线程数量</h3>
 
 使用 `-t` 指定翻译时使用的线程数量:

+ 0 - 10
pdf2zh/gui.py

@@ -208,16 +208,6 @@ with gr.Blocks(
     .input-file {
         border: 1.2px dashed #165DFF !important;
         border-radius: 6px !important;
-        # background-color: #ffffff !important;
-        transition: background-color 0.4s ease-out;
-    }
-
-    .input-file:hover {
-        border: 1.2px dashed #165DFF !important;
-        border-radius: 6px !important;
-        color: #165DFF !important;
-        background-color: #E8F3FF !important;
-        transition: background-color 0.2s ease-in;
     }
 
     .progress-bar-wrap {