我試圖在論文開頭插入一個二維碼,其內容是 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 引用,例如\\
for \
。
在線解碼器說的是
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
{
、 和^125
的十進制ASCII}
^250
ú