Skip to content

Commit

Permalink
To remove redundant \MakeUppercase from LaTeX filter.
Browse files Browse the repository at this point in the history
It might make sense to footnote an ancronym definition, but upcasing capitals just made for trouble in moving arguments like a section header.
  • Loading branch information
kleb committed Mar 12, 2009
1 parent 526d386 commit 7c9a390
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/redcloth/formatters/latex.rb
Expand Up @@ -34,8 +34,6 @@ def latex_image_styles
:b => 'textbf',
:ins => 'underline',
:del => 'sout',
:acronym => 'MakeUppercase',
:caps => 'MakeUppercase',
}.each do |m,tag|
define_method(m) do |opts|
"\\#{tag}{#{opts[:text]}}"
Expand Down Expand Up @@ -68,6 +66,8 @@ def latex_image_styles
# ignore (or find a good solution later)
[ :span,
:div,
:acronym,
:caps
].each do |m|
define_method(m) do |opts|
opts[:text].to_s
Expand Down
2 changes: 1 addition & 1 deletion test/code.yml
Expand Up @@ -31,7 +31,7 @@ latex: "This paragraph is aligned left but if you add this: \\verb@p>.@ to the b
name: escapes code snippet containing html tag
in: 'At the top of each page, please put @<h2>Title</h2>@ in the HTML.'
html: '<p>At the top of each page, please put <code>&lt;h2&gt;Title&lt;/h2&gt;</code> in the <span class="caps">HTML</span>.</p>'
latex: "At the top of each page, please put \\verb@<h2>Title</h2>@ in the \\MakeUppercase{HTML}.\n\n"
latex: "At the top of each page, please put \\verb@<h2>Title</h2>@ in the HTML.\n\n"
---
name: escaping in blockcode
in: 'bc. This is within a block of code, so < and > should be entities. You can talk about a <p class="foo"> tag if you wish and it will be properly escaped.'
Expand Down

0 comments on commit 7c9a390

Please sign in to comment.