AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[latex](computer)

Martin Hope
guest4308
Asked: 2023-05-24 02:40:57 +0800 CST

在 Microsoft Teams 会议聊天中键入和渲染 Latex

  • 5

我最近发现,如果您在 Word 中有一个方程式保存为乳胶,如下所示: 带有 LaTeX 格式方程的 Microsoft Word 然后复制方程式并将其粘贴到团队会议聊天中,它看起来像这样: 它实际上呈现了方程式。当它在我的剪贴板中时,它看起来像纯文本,而不是图像: 方程粘贴到团队会议聊天中
在剪贴板中设置格式

是否有某种方法可以在 Teams 会议聊天中本地渲染 Latex 方程,而无需从 Word 复制?

latex
  • 1 个回答
  • 487 Views
Martin Hope
christopher2007
Asked: 2022-01-09 02:33:36 +0800 CST

pandoc 给讲师/读者的评论和笔记

  • 6

例如,当使用pandoc将 Markdown 文件转换为 pdf 文件进行讲座时,除了评论之外的所有内容

<!---
comment
-->

将出现在输出 pdf 文件中。

但是有没有更优雅的方式在源 Markdown 文件中添加注释而不是使用此类注释?也许生成两个输出文件:

  • 一个带有幻灯片的 pdf 文件,供内容较少的观众使用
  • 一个带有注释和注释的 pdf 文件,供讲师/读者阅读,内容更多

是否已经有机制、标签、命令等?或者这样的评论是要走的路吗?

目前我在 KUBUNTU 20 上使用以下设置,但我不需要坚持下去。我需要的只是最后的幻灯片 pdf 和注释 pdf 文件(或带有附加文本的幻灯片):

依赖项:

  • 潘多克
  • XeTeX(带sudo apt install texlive-xetex)
  • latexmk(带sudo apt install latexmk)
  • mtheme全局安装make install

项目结构:

  • slides.md用 Markdown 编写的带有演示内容的文件,例如
---
author: Author
title: Presentation Title
date: \today
---

# first chapter

## sub title

<!---
a comment for `point 1` with additional information to
say but not to display for the listeners.
-->
- point 1

<!---
a comment for `point 2` with additional information to
say but not to display for the listeners.
-->
- point 2
  • 一个类似的makefile东西:
default:
    @pandoc -t beamer -H settings.tex \
        --pdf-engine=xelatex --highlight-style=espresso \
        -V lang=en -V theme:metropolis \
        -o dist/output.pdf slides.md
  • 和settings.tex:
%% Metro Settings
\metroset{numbering=fraction,
            progressbar=frametitle,
            background=dark,
            block=fill}
pdf latex
  • 1 个回答
  • 139 Views
Martin Hope
ChrisAga
Asked: 2021-10-19 06:57:21 +0800 CST

带有pandoc和lua脚本的markdown的两列pdf

  • 6

我想使用降价围栏 div 呈现两列 pdf 文档。最小的例子是这样的:

:::::::::::::: {.columns data-latex=""}
::: {.column width="40%" data-latex="[t]{0.4\textwidth}"}
contents...
:::
::: {.column width="60%" data-latex="[t]{0.6\textwidth}"}
contents...
:::
::::::::::::::

html 中的渲染是可以的,但显然有人认为乳胶中的多列渲染仅适用于 beamer,因此它不适用于普通乳胶,然后是 pdf。我无法切换到 pandoc 的 html pdf 引擎,因为我的最终文档需要乳胶模板。

minipage latex 环境似乎很方便实现我想要的。经过大量调查后,我得到了这个 lua 过滤器:

local pandocList = require 'pandoc.List'

Div = function (div)
  local options = div.attributes['data-latex']
  if options == nil then return nil end

  -- if the output format is not latex, the object is left unchanged
  if FORMAT ~= 'latex' and FORMAT ~= 'beamer' then
    div.attributes['data-latex'] = nil
    return div
  end

  local env = div.classes[1]
  -- if the div has no class, the object is left unchanged
  if not env then return nil end

  local returnedList
  
  -- build the returned list of blocks
  if env == 'column' then
    local beginEnv = pandocList:new{pandoc.RawBlock('tex', '\\begin' .. '{' .. 'minipage' .. '}' .. options)}
    local endEnv = pandocList:new{pandoc.RawBlock('tex', '\\end{' .. 'minipage' .. '}')}
    returnedList = beginEnv .. div.content .. endEnv
  end
  return returnedList
end

不幸的是,生成的乳胶文档 ( pandoc --lua-filter ./latex-div.lua -o test.latex test.md) 如下,由于第一个 minipage 的结尾和第二个 minipage 的开头之间的空白行,它没有按预期呈现:

\begin{document}

\begin{minipage}[t]{0.4\textwidth}

contents\ldots{}

\end{minipage}

\begin{minipage}[t]{0.6\textwidth}

contents\ldots{}

\end{minipage}

\end{document}

我快到了。如何在不重新处理乳胶文件的情况下摆脱这个不需要的空白行?

markdown latex
  • 2 个回答
  • 571 Views
Martin Hope
young_souvlaki
Asked: 2020-09-03 05:27:23 +0800 CST

在 Linux 本地将数学公式转换为图像

  • 5

寻找一种在本地生成 .png 或类似数学公式的方法,以用于文档和演示文稿。

有很多在线工具,但我希望有一个可以从命令行使用的工具,无需互联网连接。

如果有办法用 Latex 做到这一点,那是一个有效的解决方案。

linux latex
  • 2 个回答
  • 497 Views
Martin Hope
TTT
Asked: 2020-02-06 15:05:55 +0800 CST

如何删除由 TexStudio 创建且不会删除的文件夹?

  • 7

我是 Latex 的新手,在 Windows 10 上使用 TexStudio。在输入包含文件的命令后我做了一些意想不到的事情,我还没有关闭表达式,当 TexStudio 询问它是否应该创建不存在的文件时,我单击了“是”。那一刻,我真的很迷茫……

结果,TexStudio 创建了一系列嵌套文件夹,这些文件夹的名称很长,由我的 .tex 文件代码片段组成。队列中的最后一个文件夹名为“C$”。

在任何级别,我都无法删除这些文件夹中的任何一个。Windows 10 说“它不再在那个位置”,或者运行删除但所有文件夹最终仍然存在。我还尝试通过命令行重命名文件夹。我可以重命名一些但不能删除它们,我根本不能重命名“C$”。我怎样才能摆脱这样的文件夹?

编辑:当在某些子文件夹中时,我不能cd..说系统找不到路径。文件夹未出现在net share attrib D:\[folder]\C$且属性\\?\D:\[folder]\C$未找到该文件夹

windows-10 latex
  • 1 个回答
  • 191 Views
Martin Hope
Victor Kong
Asked: 2019-11-09 17:55:39 +0800 CST

无法使用 TinyTeX 编织成 PDF:缺少 *.sty 文件

  • 9

我已经安装了 TinyTeX,现在正在尝试将通用的“Untitled.Rmd”文件编织成 PDF,

> install.packages("tinytex")
> tinytex::install_tinytex()

> options(tinytex.verbose = TRUE)
> rmarkdown::render("Untitled.Rmd", output_format = "pdf_document")

返回此错误消息:

tlmgr search --file --global "/grffile.sty"
! LaTeX Error: File `grffile.sty' not found.

! Emergency stop.
<read *>

Error: Failed to compile Untitled.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See Untitled.log for more info.
In addition: Warning message:
In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains grffile.sty

我已经尝试安装该软件包,但这似乎没有帮助。

> tinytex::tlmgr_install("grffile")

其他人遇到过这个问题吗?到目前为止,当第二个 LaTeX 发行版不存在时,我已经能够在 Windows 和 MacOS 上重现此错误。

r latex
  • 2 个回答
  • 2764 Views
Martin Hope
Dead_Ling0
Asked: 2019-09-07 07:05:49 +0800 CST

Latex tabularx 间距问题

  • 6

因此,我只是尝试编辑某人在 tabularx 中完成的表格,因为我喜欢这种风格,但我不知道我在做什么,因此我遇到了一个问题。在下面的代码中,在“设置”条目之后有一个很大的空间,我希望这一切都很好而且对称,这个空间使它非常不对称。有没有办法删除这个空间?

\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{ragged2e}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}


\begin{document}
    \noindent
    \edef\TabularRowHeight{\the\dimexpr-\arraystretch\baselineskip}

    \begin{tabularx}{\textwidth}{YY}
    \toprule
    Alice  &  Bob \\
    \midrule
    \emph{Setup}\\
    \cmidrule(lr){1-1}
    Alice \& Bob select a prime $p$ and a generator $g$ for the finite field $\mathbb{F}_p$
    &\\

    &\emph{Private Computation}\\
    \cmidrule(lr){2-2}
    &  Bob randomly selects $b \in \mathbb{F}_p$ and then computes the following:

     $B \equiv g^b \mod p$ once computed Bob sends Alice $B$

     \\[\TabularRowHeight] & \\

    & \emph{Key Computation}\\
    \cmidrule(lr){2-2}
    & Bob who now has $A$, calculates the following:$A^b \equiv (g^a)^b \equiv g^{ab} \mod p$

     \\


    \emph{Private Computation}\\ 
    \cmidrule(lr){1-1}
    Alice randomly selects $a \in \mathbb{F}_p$ and then computes the following:

    $A \equiv g^a \mod p$ once computed Alice sends Bob $A$ & \\ \pagebreak

    \emph{Key Computation}\\ 
    \cmidrule(lr){1-1}
    Alice who now has $B$, calculates the  following:$B^a \equiv (g^b)^a \equiv g^{ab} \mod p$ & \\


    \bottomrule


    \end{tabularx}
\end{document}

电流输出图

我想实现的输出

latex
  • 1 个回答
  • 544 Views
Martin Hope
Dead_Ling0
Asked: 2019-08-29 04:22:45 +0800 CST

参考书目的 LaTeX 问题

  • 5

我对 LaTeX 很陌生,所以我对它知之甚少,请记住这一点。所以我刚刚写了一个文件,我用下面的方法做了参考书目。

\begin{thebibliography}{}
    \bibitem{label}
\end{thebibliography}

然而,我被告知我需要使用哈佛风格的引用,随后建议我使用 bib 文件。所以我用我的书目信息创建了一个 bib 文件。但是,我似乎根本无法让它工作,我尝试了各种资源都无济于事。

如何在 LaTeX 中使用 bib 文件作为参考书目(哈佛风格)?

当前当我实现 bib 文件时输出。

Process started: bibtex.exe "Project"

This is BibTeX, Version 0.99d (TeX Live 2019/W32TeX)
The top-level auxiliary file: Project.aux
I found no \citation commands---while reading file Project.aux
I found no \bibdata command---while reading file Project.aux
I found no \bibstyle command---while reading file Project.aux
(There were 3 error messages)

Process exited with error(s)



Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode "Project".tex

Process exited normally

这是我的 bib 文件中的一个示例:

@book{codebreakers3,
    author = {Kahn,D.},
    title = {The Codebreakers: the story of secret writing },
    year = {1996},
    publisher = {Scribner},
    isbn = {0684831309},
    page ={235},

}

@book{Cryptonetwork,
    title={Cryptography and Network Security: Principles and Practice, Global Edition},
    author={Stallings, W.},
    isbn={9781292158587},
    year={2016},
    pages = {314,451},
    publisher={Pearson Education},
}

@article{diffie,
    author = {  W. Diffie. and  M. Hellman.},
    title = {New directions in cryptography},
    journaltitle = {IEEE Transactions on Information Theory},
    year = {1976},
    volume = {22},
    issue = {6},
    month = {November},
    pages = {644-654},
    publisher = {IEEE Press Piscataway, NJ, USA },
    issn = {0018-9448},
}
latex bibliography
  • 1 个回答
  • 1462 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve