Bitcoin Forum

Other => Off-topic => Topic started by: AliceWonder on July 17, 2013, 09:58:54 AM



Title: Any LaTeX gurus here?
Post by: AliceWonder on July 17, 2013, 09:58:54 AM
Issue I am having is not bitcoin specific but it is related to a bitcoin article I am writing.
It is with using foreign characters in a PDF bookmark, specifically mu.

I posted at

http://latex-community.org/forum/viewtopic.php?f=48&t=23567

Lot of geeks here, lot of math geeks here, so hoping maybe some LaTeX users who have come across this and know a solution.


Title: Re: Any LaTeX gurus here?
Post by: xeroc on July 17, 2013, 10:42:02 AM
What you are searching for is in mathmode

$\mu$BTC
try

\newcommand{\ubtc}{$\mu$BTC}


// EDIT just read the first answer there -- donna do some searching now

// EDIT 2
you may try

\usepackage{textcomp}
\newcommand{\ubtc}{\textmu BTC}


Title: Re: Any LaTeX gurus here?
Post by: AliceWonder on July 17, 2013, 11:11:12 AM
That works except it doesn't use the right font.

Code:
\newcommand{\ubtc}{{\fontfamily{mak}\selectfont\textmu{}}BTC}

uses the right font but not the right variant of the font (e.g. doesn't use bold in headings) but I think I'm on the right path.
I think I just need to redefine the font for textcomp in the preamble so textmu itself can take care of selecting the right variant.

I'll look at the textcomp documentation, it may have it.


Title: Re: Any LaTeX gurus here?
Post by: AliceWonder on July 17, 2013, 04:37:17 PM
Solved - I can use the fonts psgreek.sty makes available w/o screwed up PDF bookmarks.

Code:
\newcommand{\ubtc}{\texorpdfstring{\foreignlanguage{greek}{m}}{\textmu{}}BTC}

It uses the specified psgreek font when typesetting the document but when creating the PDF bookmarks, uses the more generic mu from the textcomp.sty package - which hyperref understands.


Title: Re: Any LaTeX gurus here?
Post by: RichG on July 17, 2013, 06:44:00 PM
Quote from: OP
Any LaTeX gurus here?

Latex? Really?

Did 1995 visit this forum?


Title: Re: Any LaTeX gurus here?
Post by: AliceWonder on July 18, 2013, 02:11:26 AM
Quote from: OP
Any LaTeX gurus here?

Latex? Really?

Did 1995 visit this forum?

I discovered LaTeX when I had to a make a math presentation - powerpoint just really sucked for equations, LaTeX made a beautifully typeset PDF slideshow.

I never looked back, I use it for everything from business letters to erotica to whatever I need that will be printed.
There really is not any equal when it comes to beautifully typeset documents. It does all the hard work for you.

Sometimes it takes a little searching to figure something out but once figured out it works well.

And since the source files are all plain text, it works really well for group projects on a revision control system where you can use standard text diff to see changes since other revisions.

And it's immune to word macro viruses.


Title: Re: Any LaTeX gurus here?
Post by: xeroc on July 18, 2013, 07:23:19 AM
BTW:

Self-Made Offline Paper Wallets Using LaTeX
https://bitcointalk.org/index.php?topic=213946.0


Title: Re: Any LaTeX gurus here?
Post by: AliceWonder on July 18, 2013, 11:40:21 AM
BTW:

Self-Made Offline Paper Wallets Using LaTeX
https://bitcointalk.org/index.php?topic=213946.0

Thank you for that!