mirror of https://github.com/eyhc1/rendercv.git
renderer: update TinyTeX error message
This commit is contained in:
parent
ac65414792
commit
5763b58b71
|
@ -489,7 +489,7 @@ def transform_markdown_sections_to_latex_sections(
|
||||||
|
|
||||||
|
|
||||||
def replace_placeholders_with_actual_values(
|
def replace_placeholders_with_actual_values(
|
||||||
string: str, placeholders: dict[str, Optional[str]]
|
text: str, placeholders: dict[str, Optional[str]]
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Replace the placeholders in a string with actual values.
|
"""Replace the placeholders in a string with actual values.
|
||||||
|
|
||||||
|
@ -502,9 +502,9 @@ def replace_placeholders_with_actual_values(
|
||||||
str: The string with actual values.
|
str: The string with actual values.
|
||||||
"""
|
"""
|
||||||
for placeholder, value in placeholders.items():
|
for placeholder, value in placeholders.items():
|
||||||
string = string.replace(placeholder, str(value))
|
text = text.replace(placeholder, str(value))
|
||||||
|
|
||||||
return string
|
return text
|
||||||
|
|
||||||
|
|
||||||
def make_matched_part_something(
|
def make_matched_part_something(
|
||||||
|
@ -964,11 +964,24 @@ def latex_to_pdf(
|
||||||
output = latex_process.communicate() # wait for the process to finish
|
output = latex_process.communicate() # wait for the process to finish
|
||||||
if latex_process.returncode != 0:
|
if latex_process.returncode != 0:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Running TinyTeX has failed! For debugging, we suggest running the"
|
"Unfortunately, RenderCV's built-in TinyTeX binaries couldn't render"
|
||||||
" LaTeX file manually in https://overleaf.com.",
|
" this LaTeX file into a PDF. This could be caused by one of two"
|
||||||
"If you want to run it locally, run the command below in the terminal:",
|
" reasons:\n\n1- The theme templates might have been updated in a way"
|
||||||
" ".join([str(command_part) for command_part in command]),
|
" RenderCV's TinyTeX cannot render. RenderCV's TinyTeX is minified to"
|
||||||
"If you can't solve the problem, please open an issue on GitHub.",
|
" keep the package size small. As a result, it doesn't function like a"
|
||||||
|
" general-purpose LaTeX distribution.\n2- Special characters, like"
|
||||||
|
" Greek or Chinese letters, that are not compatible with the fonts used"
|
||||||
|
" or RenderCV's TinyTeX might have been used.\n\nHowever, this issue"
|
||||||
|
" can be resolved quickly. RenderCV allows you to run your own LaTeX"
|
||||||
|
" distribution instead of the built-in TinyTeX. This can be done with"
|
||||||
|
" the '--use-local-latex-command' option, as shown below:\n\nrendercv"
|
||||||
|
" render --use-local-latex-command lualatex John_Doe_CV.yaml\n\nIf you"
|
||||||
|
" ensure that the generated LaTeX file can be compiled by your local"
|
||||||
|
" LaTeX distribution, RenderCV will work successfully. You can debug"
|
||||||
|
" the generated LaTeX file in your LaTeX editor to resolve any bugs."
|
||||||
|
" Then, you can start using RenderCV with your local LaTeX"
|
||||||
|
" distribution.\n\nIf you can't solve the problem, please open an issue"
|
||||||
|
" on GitHub."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue