LaTeX学习笔记

LaTeX学习笔记

问题

引用

  1. BibLaTeX本地编译Empty Bibliography Citation Undefined错误的解决方法

    1
    2
    \usepackage[backend=bibtex]{biblatex}
    %xe->bibtex->xe->xe
  2. 优雅的导入svg
    How to include an SVG image in LATEX

    但是这个教程不适用于最新的inkscape

    https://inkscape.org/doc/inkscape-man.html

    • 下载inkscape
    • 将inkscape放入系统PATH中
    • 用法如下 注意 最后svg内文本框不要有回车!
    1
    2
    3
    4
    5
    #1
    function svg2pdf ($svg) {inkscape -D --export-latex --export-filename=$svg.pdf $svg.svg }
    svg2pdf a.svg
    #2
    inkscape -D --export-filename=a.pdf a.svg --export-latex

    最后在latex文档引用

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    %% To include the image in your LaTeX document, write
    \input{<filename>.pdf_tex}
    %% instead of
    \includegraphics{<filename>.pdf}
    %% To scale the image, write
    \def\svgwidth{<desired width>}
    \input{<filename>.pdf_tex}
    %% instead of
    \includegraphics[width=<desired width>]{<filename>.pdf}
    %%
    %% Images with a different path to the parent latex file can
    %% be accessed with the `import' package (which may need to be
    %% installed) using
    \usepackage{import}
    %% in the preamble, and then including the image with
    \import{<path to file>}{<filename>.pdf_tex}
    %% Alternatively, one can specify
    \graphicspath{{<path to file>/}}

    其他函数(自用)

    1
    2
    3
    function svg2pdf ($svg) {inkscape -D --export-latex --export-filename=./images/$svg.pdf ./images/$svg.svg }
    function svg2jpg ($svg) {inkscape -D --export-filename=./images/$svg.jpg ./images/$svg.svg }
    function svg2png ($svg) {inkscape -D --export-filename=./images/$svg.png ./images/$svg.svg }
作者

GWJ

发布于

2023-12-25

更新于

2024-01-29

许可协议

评论