我试图在论文开头插入一个二维码,其内容是它的 BibTeX 条目。
有什么方法可以嵌入原始文本\psbarcode
吗?
\documentclass[a4paper,12pt]{minimal}
\usepackage[utf8]{inputenc}
\usepackage{pst-barcode}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}(1.378in, 1.5in)
\psbarcode{
\begin{verbatim} % won't work
@MastersThesis{,
author = {J\'ulio ...},
title = {...},
year = {...},
...
}
\end{verbatim}
}{}{qrcode}
\end{pspicture}
\end{document}
似乎幻想VRB包BVerbatim
为此提供了一个环境。
答案1
我不认为你想要逐字逐句,因为你还需要照顾 PostScript 引用,\\
如\
。
在线解码器说的是
Raw text @MastersThesis{, author = {J\'ulio ...}, title = {...}, year = {...}, ... }
Raw bytes 44 d2 04 04 d6 17 37 46 57 27 35 46 86 57 36 97 37 b2 c2 06 17 57 46 86 f7 22 03 d2 07 b4 a5 c2 77 56 c6 96 f2 02 e2 e2 e7 d2 c2 07 46 97 46 c6 52 03 d2 07 b2 e2 e2 e7 d2 c2 07 96 56 17 22 03 d2 07 b2 e2 e2 e7 d2 c2 02 e2 e2 e2 07 d2 00 ec 11 ec 11 ec 11 ec 11 ec 11 ec 11 ec
Barcode format QR_CODE
Parsed Result Type TEXT
Parsed Result @MastersThesis{, author = {J\'ulio ...}, title = {...}, year = {...}, ... }
文本:
\documentclass[a4paper,12pt]{minimal}
\usepackage[utf8]{inputenc}
\usepackage{pst-barcode}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}(1.378in, 1.5in)
\psbarcode{
@MastersThesis{,
author = {J\string\\'ulio ...},
title = {...},
year = {...},
...
}
}{}{qrcode}
\end{pspicture}
\end{document}
对于换行符来说这是有效的:
\begin{pspicture}(1.378in, 1.5in)
\psbarcode{\string\n
@MastersThesis{,\string\n
author = {J\string\\'ulio ...},\string\n
title = {...},\string\n
year = {...},\string\n
...\string\n
}
}{}{qrcode}
\end{pspicture}
答案2
使用可选参数parse
和字符的十进制值:
\documentclass{minimal}
\usepackage[utf8]{inputenc}
\usepackage{pst-barcode}
\begin{document}
\begin{pspicture}(1.378in, 1.5in)
\psbarcode{%
@MastersThesis^123,author=^123J^250lio ...^125,title=^123...^125,year=^123...^125,...^125}{parse}{qrcode}
\end{pspicture}
\end{document}
^123
十进制 ASCII 为{
,
^125
为}
, 和^250
为ú