| 49 | | * Some Plugin will require a plugin_enable method, |
| 50 | | * Why because it's using an external resource, which is not being picked up via perl (M::I). |
| 51 | | * You can see this method has only been enabled for Ubuntu, it needs more os file locations adding. |
| 52 | | |
| 53 | | {{{#!perl |
| 54 | | ######### |
| 55 | | # We need plugin_enable |
| 56 | | # as we have an external dependancy |
| 57 | | ######### |
| 58 | | sub plugin_enable { |
| 59 | | |
| 60 | | my $pdflatex_exists = 0; |
| 61 | | |
| 62 | | # ToDo add other os locations |
| 63 | | # Ubuntu -> /usr/bin/ |
| 64 | | my @directories = qw( /usr/bin/ ); |
| 65 | | find( |
| 66 | | sub { |
| 67 | | if ( $_ eq 'pdflatex' ) { |
| 68 | | $pdflatex_exists = 1; |
| 69 | | } |
| 70 | | }, |
| 71 | | @directories |
| 72 | | ); |
| 73 | | |
| 74 | | return $pdflatex_exists; |
| 75 | | } |
| 76 | | }}} |
| 77 | | From {{{Padre::Plugin::LaTeX}}} |
| | 52 | |
| | 127 | |
| | 128 | ---- |
| | 129 | |
| | 130 | * Some Plugin will require a plugin_enable method, |
| | 131 | * Why because it's using an external resource, which is not being picked up via perl (M::I). |
| | 132 | * You can see this method has only been enabled for Ubuntu, it needs more os file locations adding. |
| | 133 | |
| | 134 | {{{#!perl |
| | 135 | ######### |
| | 136 | # We need plugin_enable |
| | 137 | # as we have an external dependancy |
| | 138 | ######### |
| | 139 | sub plugin_enable { |
| | 140 | |
| | 141 | my $pdflatex_exists = 0; |
| | 142 | |
| | 143 | # ToDo add other os locations |
| | 144 | # Ubuntu -> /usr/bin/ |
| | 145 | my @directories = qw( /usr/bin/ ); |
| | 146 | find( |
| | 147 | sub { |
| | 148 | if ( $_ eq 'pdflatex' ) { |
| | 149 | $pdflatex_exists = 1; |
| | 150 | } |
| | 151 | }, |
| | 152 | @directories |
| | 153 | ); |
| | 154 | |
| | 155 | return $pdflatex_exists; |
| | 156 | } |
| | 157 | }}} |
| | 158 | |
| | 159 | From {{{Padre::Plugin::LaTeX}}} |
| | 160 | |
| | 161 | {{{Padre::Plugin::SpellCheck}}} dose not need this as it depends upon Text::Aspell which won't install with out Aspell files being present. |
| | 162 | |
| | 163 | ---- |
| | 164 | |
| | 165 | * Registered_documents |
| | 166 | * only if you have them |
| | 167 | {{{#!perl |
| | 168 | sub registered_documents { |
| | 169 | 'application/x-latex' => 'Padre::Document::LaTeX', |
| | 170 | 'application/x-bibtex' => 'Padre::Document::BibTeX',; |
| | 171 | } |
| | 172 | }}} |
| | 173 | From {{{Padre::Plugin::LaTeX}}} |
| | 174 | |
| | 175 | ---- |
| | 176 | |