Comments (15)
Thanks! Will be able to look at it in about an hour. Keep those bug reports coming!!
On Jun 24, 2015, at 10:27 AM, Eduardo de Santana Medeiros Alexandre [email protected] wrote:
I'm having a problem with monospace. I'm not a latex expect, but when I try to compile a document with monospace I end up with an error.
Let's see how it is implemented:
$ echo "
monospace
italic bold" | asciidoctor-latex -a header=no -
The result was:{\tt monospace} \emph{italic} \textbf{bold}
I propose to change {\tt monospace} to \texttt{monospace} (works for me).The \texttt is documented at https://en.wikibooks.org/wiki/LaTeX/Fonts https://en.wikibooks.org/wiki/LaTeX/Fonts
—
Reply to this email directly or view it on GitHub #36.
from asciidoctor-latex.
Hi there!
I think that your difficulty has to do with the backlashes, not
with \tt or \textt per se. The following works:
monospace
italic bold => {\tt monospace} \emph{italic} \textbf{bold}
but this (for example)
\monospace
italic bold =>{\tt \monospace} \emph{italic} \textbf{bold}
won’t work because for TeX, backslash has a special meaning. That is
why you are getting errors.
If you have things
like \foo \bar in your source text, then you can do something like this:
\monospace is a macro
Use four dashes above and below. This will be translated into valid tex.
Here we are using what is called a verbatim
macro package for TeX.
Asciidoctor-LaTeX knows how to translate the above into valid TeX.
If you need it in-line, I will need to do a little work to add this feature.
Best regards,
Jim
http://noteshare.io http://noteshare.io/
http://home.noteshareblog.io http://home.noteshareblog.io/
On Jun 24, 2015, at 10:27 AM, Eduardo de Santana Medeiros Alexandre [email protected] wrote:
I'm having a problem with monospace. I'm not a latex expect, but when I try to compile a document with monospace I end up with an error.
Let's see how it is implemented:
$ echo "
monospace
italic bold" | asciidoctor-latex -a header=no -
The result was:{\tt monospace} \emph{italic} \textbf{bold}
I propose to change {\tt monospace} to \texttt{monospace} (works for me).The \texttt is documented at https://en.wikibooks.org/wiki/LaTeX/Fonts https://en.wikibooks.org/wiki/LaTeX/Fonts
—
Reply to this email directly or view it on GitHub #36.
from asciidoctor-latex.
No, I put the backlash in the echo
command because if I leave the ` it will be interpreted as a bash command:
$ echo "`monospace`"
monospace: command not found
from asciidoctor-latex.
OK, I agree that this works as stated - no errors. What is it that is giving you errors?
When I run {\tt whatever} and compare it to \texttt{whatever}, the outputs look the same to me.
On Jun 25, 2015, at 8:40 AM, Eduardo de Santana Medeiros Alexandre [email protected] wrote:
No, I put the backlash in the echo command because if I leave the ` it will be interpreted as a bash command:
$ echo "
monospace
"
monospace: command not found
—
Reply to this email directly or view it on GitHub #36 (comment).
from asciidoctor-latex.
$ cat rascunho.adoc
== my Chapter
`monospace`
$ cat rascunho.adoc | asciidoctor-latex -b latex -d book -a header=no -a numbered -
\hypertarget{_my_chapter}{\chapter{my Chapter}}
{\tt monospace}
So I copy this text, and put inside an template with this packages:
\usepackage{lmodern} % Usa a fonte Latin Modern
\usepackage[T1]{fontenc} % Selecao de codigos de fonte.
\usepackage[utf8]{inputenc} % Codificacao do documento (conversão automática dos acentos)
\usepackage{lastpage} % Usado pela Ficha catalográfica
\usepackage{indentfirst} % Indenta o primeiro parágrafo de cada seção.
\usepackage{color} % Controle das cores
\usepackage{graphicx} % Inclusão de gráficos
\usepackage{microtype} % para melhorias de justificação
When I compile it with pdflatex:
! Class memoir Error: Font command \tt is not supported.
I see now that asciidoc-latex was made to work with xelatex:
$ asciidoctor-latex -b latex rascunho.adoc
$ pdflatex rascunho.tex
(....)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
$ xelatex rascunho.tex
(...)
Output written on rascunho.pdf (1 page).
Since I was using with header=no, the produced code was made for xelatex', not working with
pdflatex`.
I think that the {\tt} command is not inside of these packages.
When I change to use with texttt
my tex compiles with pdflatex,
from asciidoctor-latex.
Here's the complete file:
https://gist.github.com/edusantana/341c947dcffa9da4c27d
The error:
! Class memoir Error: Font command \tt is not supported.
See the memoir class documentation for explanation.
Type H <return> for immediate help.
...
l.445 Testing {\tt
monospace}.
?
! Emergency stop.
...
l.445 Testing {\tt
monospace}.
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on document.log.
When I change the \tt to \texttt it works.
from asciidoctor-latex.
The microfile that you wrote with the class article ( at #37 ) , worked. It compiled with tt and texttt, both became monospace. I will test with memoir
class.
from asciidoctor-latex.
Yes, the problem is with the memoir
class:
\documentclass[11pt, oneside]{memoir}
\begin{document}
{\tt monospace with tt}
\texttt{monospace with texttt}
\end{document}
This one doesn't compile.
from asciidoctor-latex.
I have tested how pandoc does it, it uses \texttt
:
$ cat pandoc.md
`monospace with pandoc` *italic* **bold**
$ pandoc pandoc.md -t latex
\texttt{monospace with pandoc} \emph{italic} \textbf{bold}
from asciidoctor-latex.
Thanks, I’ll change to \textt later today
On Jun 26, 2015, at 7:34 AM, Eduardo de Santana Medeiros Alexandre [email protected] wrote:
I have tested how pandoc http://pandoc.org/getting-started.html does it, it uses \texttt:
$ cat pandoc.md
monospace with pandoc
italic bold
$ pandoc pandoc.md -t latex
\texttt{monospace with pandoc} \emph{italic} \textbf{bold}
—
Reply to this email directly or view it on GitHub #36 (comment).
from asciidoctor-latex.
I’ve changed to \textt — could you
test? I am having some system
problems and can’t be sure that all is OK
until I get them fixed.
On Jun 26, 2015, at 7:34 AM, Eduardo de Santana Medeiros Alexandre [email protected] wrote:
I have tested how pandoc http://pandoc.org/getting-started.html does it, it uses \texttt:
$ cat pandoc.md
monospace with pandoc
italic bold
$ pandoc pandoc.md -t latex
\texttt{monospace with pandoc} \emph{italic} \textbf{bold}
—
Reply to this email directly or view it on GitHub #36 (comment).
from asciidoctor-latex.
$ echo "\`monospace\` _italic_ *bold*" | asciidoctor-latex -a header=no -
the output was:
\textt{ monospace} \emph{italic} \textbf{bold}
I think there's an extra space: textt{ monospace}
it should be -> textt{monospace}
from asciidoctor-latex.
Should be ok now -- no extra space. Again, could you double check?
Thanks so much for bringing up this problem -- sorry it took so much back and forth.
Please let me know if there are further problems .. the converter is still beta software
from asciidoctor-latex.
It's okay now. thanks!
May I suggest put the number of the issue in the commit message? This way when can track it more easy...
from asciidoctor-latex.
For those led here by searching about the memoir
package error regarding \tt
(mentioned above), the memoir
class does not define old font commands (LaTeX 2.09) by default. These commands can be activated by explicitly passing the class option oldfontcommands
to memoir
, as described in this answer.
from asciidoctor-latex.
Related Issues (20)
- Proposal to promote project to asciidoctor-latex-plus HOT 9
- dollar signs in source blocks HOT 2
- Equation number in LaTeX example does not produce expected result HOT 1
- Enhancement: Support for LaTeX tables
- Multiple math mode glitches HOT 3
- Negative line number reported in output messages
- Inline stem not quoted in the latex backend HOT 1
- Missing backslash escapes in generated .tex source HOT 1
- Latex conversion of tables with "asciidoctor" style columns fails. Table captions missing too.
- Experimental macros left out HOT 1
- Fix, potentially, for fontspec/pdflatex problem
- asterisk lists aren't converted to lists
- `method_missing': undefined method `convert_environment' HOT 3
- Image captions are not getting generated with `asciidoctor-latex` HOT 4
- asciidoctor-bibtex not working with current version HOT 1
- Multiple errors and dysfunctional .tex file HOT 1
- Non escaped underscore in constrained quotes
- Does Not Handle @ In Emails Correctly HOT 1
- % sign is transcribed as is, causing it to comment rest of line
- Issue with labels in Asciidioc to LaTeX HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-latex.