Changeset 32129 for main/trunk/greenstone2/perllib/plugins/LaTeXPlugin.pm
- Timestamp:
- 2018-02-13T10:38:29+13:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/LaTeXPlugin.pm
r32122 r32129 369 369 $text =~ s~\\(?:clearemptydoublepage|newpage)~~g; 370 370 ### counters, contents, environments, labels, etc ### 371 $text =~ s~\\(?:addcontentsline) {.*?}\{.*?}\{.*}~~g;371 $text =~ s~\\(?:addcontentsline)\{.*?}\{.*?}\{.*}~~g; 372 372 $text =~ s~\s*\\begin\{itemize}\s*~\n<ul>\n~g; 373 373 $text =~ s~\s*\\end\{itemize}\s*~</li></ul>\n~g; … … 378 378 $text =~ s~<([ou])l>\s*</li>\s*~<$1l>~g; 379 379 } 380 $text =~ s~\\(?:label|begin|end) {.*?}\s*\n?~ ~g; # remove tag and contents380 $text =~ s~\\(?:label|begin|end)\{.*?}\s*\n?~ ~g; # remove tag and contents 381 381 $text =~ s~\\(?:tableofcontents|listoffigures)~ ~g; 382 382 ### font sizes/styles ### … … 689 689 690 690 # remove {} around a single character (eg \'{e}) 691 $text =~ s!(\\[`'="^~\.]) {(\w)}!{$1$2}!g; # for emacs indenting... `]);691 $text =~ s!(\\[`'="^~\.])\{(\w)}!{$1$2}!g; # for emacs indenting... `]); 692 692 693 693 ## only in bibtex... not in latex proper?! … … 697 697 # remove {} around a single character for special 1 letter commands - 698 698 # need to insert a space. Eg \v{s} -> {\v s} 699 $text =~ s~(\\[uvcH]) {(\w)}~{$1 $2}~g;699 $text =~ s~(\\[uvcH])\{(\w)}~{$1 $2}~g; 700 700 701 701 # only do if the text contains a '\' character.
Note:
See TracChangeset
for help on using the changeset viewer.