Bitcoin Forum
December 14, 2024, 04:46:18 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Any LaTeX gurus here?  (Read 602 times)
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 17, 2013, 09:58:54 AM
 #1

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.

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
xeroc
Sr. Member
****
Offline Offline

Activity: 345
Merit: 250



View Profile
July 17, 2013, 10:42:02 AM
 #2

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}
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 17, 2013, 11:11:12 AM
 #3

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.

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 17, 2013, 04:37:17 PM
 #4

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.

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
RichG
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
July 17, 2013, 06:44:00 PM
 #5

Quote from: OP
Any LaTeX gurus here?

Latex? Really?

Did 1995 visit this forum?
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 18, 2013, 02:11:26 AM
 #6

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.

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
xeroc
Sr. Member
****
Offline Offline

Activity: 345
Merit: 250



View Profile
July 18, 2013, 07:23:19 AM
 #7

BTW:

Self-Made Offline Paper Wallets Using LaTeX
https://bitcointalk.org/index.php?topic=213946.0
AliceWonder (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
July 18, 2013, 11:40:21 AM
 #8

BTW:

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

Thank you for that!

QuarkCoin - what I believe bitcoin was intended to be. On reddit: http://www.reddit.com/r/QuarkCoin/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!